name: Aqua
card_text: If you have an "Aquaactress" monster in your GY: Target 1 monster on the field; until the end of this turn, its effects are negated, its ATK/DEF become 100, also it is unaffected by your opponent's card effects.
external_ids: local SETCARD_ID_0 = 0xcd --Aquaactress
  
lua: local SETCARD_ID_0 = 0xcd --Aquaactress
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DISABLE + CATEGORY_ATKCHANGE + CATEGORY_DEFCHANGE)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_DAMAGE_STEP)
  	e1:SetHintTiming(TIMING_DAMAGE_STEP)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return aux.dscon(e, tp, eg, ep, ev, re, r, rp) and Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
  	local g = Duel.SelectTarget(tp, Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DISABLE, g, 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		Duel.NegateRelatedChain(tc, RESET_TURN_SET)
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_DISABLE)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		local e2 = Effect.CreateEffect(c)
  		e2:SetType(EFFECT_TYPE_SINGLE)
  		e2:SetCode(EFFECT_DISABLE_EFFECT)
  		e2:SetValue(RESET_TURN_SET)
  		e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e2)
  		local e3 = Effect.CreateEffect(c)
  		e3:SetType(EFFECT_TYPE_SINGLE)
  		e3:SetCode(EFFECT_SET_ATTACK_FINAL)
  		e3:SetValue(100)
  		e3:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e3)
  		local e4 = e3:Clone()
  		e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
  		tc:RegisterEffect(e4)
  		local e5 = Effect.CreateEffect(c)
  		e5:SetType(EFFECT_TYPE_SINGLE)
  		e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  		e5:SetRange(LOCATION_MZONE)
  		e5:SetCode(EFFECT_IMMUNE_EFFECT)
  		e5:SetValue(s.efilter)
  		e5:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e5)
  	end
  end
  function s.efilter(e, te)
  	return te:GetOwnerPlayer() ~= e:GetOwnerPlayer()
  end
  
  
source_text: Aqua
  If you have an "Aquaactress" monster in your GY: Target 1 monster on the field; until the end of this turn, its effects are negated, its ATK/DEF become 100, also it is unaffected by your opponent's card effects.
target_text: -- Aqua
  local SETCARD_ID_0 = 0xcd --Aquaactress
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DISABLE + CATEGORY_ATKCHANGE + CATEGORY_DEFCHANGE)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_DAMAGE_STEP)
  	e1:SetHintTiming(TIMING_DAMAGE_STEP)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return aux.dscon(e, tp, eg, ep, ev, re, r, rp) and Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
  	local g = Duel.SelectTarget(tp, Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DISABLE, g, 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		Duel.NegateRelatedChain(tc, RESET_TURN_SET)
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_DISABLE)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		local e2 = Effect.CreateEffect(c)
  		e2:SetType(EFFECT_TYPE_SINGLE)
  		e2:SetCode(EFFECT_DISABLE_EFFECT)
  		e2:SetValue(RESET_TURN_SET)
  		e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e2)
  		local e3 = Effect.CreateEffect(c)
  		e3:SetType(EFFECT_TYPE_SINGLE)
  		e3:SetCode(EFFECT_SET_ATTACK_FINAL)
  		e3:SetValue(100)
  		e3:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e3)
  		local e4 = e3:Clone()
  		e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
  		tc:RegisterEffect(e4)
  		local e5 = Effect.CreateEffect(c)
  		e5:SetType(EFFECT_TYPE_SINGLE)
  		e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  		e5:SetRange(LOCATION_MZONE)
  		e5:SetCode(EFFECT_IMMUNE_EFFECT)
  		e5:SetValue(s.efilter)
  		e5:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e5)
  	end
  end
  function s.efilter(e, te)
  	return te:GetOwnerPlayer() ~= e:GetOwnerPlayer()
  end
  
  