name: 右手に盾を左手に剣を
card_text: このカードの発動時にフィールド上に表側表示で存在する全てのモンスターの元々の攻撃力と元々の守備力を、エンドフェイズ時まで入れ替える。
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_ATKCHANGE + CATEGORY_DEFCHANGE)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsDefenseAbove(0)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
  	Duel.SetTargetCard(g)
  end
  function s.efilter(c, e)
  	return s.filter(c) and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local sg = Duel.GetMatchingGroup(s.efilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, e)
  	local c = e:GetHandler()
  	local tc = sg:GetFirst()
  	while tc do
  		local batk = tc:GetBaseAttack()
  		local bdef = tc:GetBaseDefense()
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL)
  		e1:SetValue(bdef)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		local e2 = e1:Clone()
  		e2:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL)
  		e2:SetValue(batk)
  		tc:RegisterEffect(e2)
  		tc = sg:GetNext()
  	end
  end
  
  
source_text: 右手に盾を左手に剣を
  このカードの発動時にフィールド上に表側表示で存在する全てのモンスターの元々の攻撃力と元々の守備力を、エンドフェイズ時まで入れ替える。
target_text: -- 右手に盾を左手に剣を
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_ATKCHANGE + CATEGORY_DEFCHANGE)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsDefenseAbove(0)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
  	Duel.SetTargetCard(g)
  end
  function s.efilter(c, e)
  	return s.filter(c) and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local sg = Duel.GetMatchingGroup(s.efilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, e)
  	local c = e:GetHandler()
  	local tc = sg:GetFirst()
  	while tc do
  		local batk = tc:GetBaseAttack()
  		local bdef = tc:GetBaseDefense()
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_SET_BASE_ATTACK_FINAL)
  		e1:SetValue(bdef)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		local e2 = e1:Clone()
  		e2:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL)
  		e2:SetValue(batk)
  		tc:RegisterEffect(e2)
  		tc = sg:GetNext()
  	end
  end
  
  