--created by Geass, coded by Lyris local cid,id=GetID() function cid.initial_effect(c) c:EnableReviveLimit() aux.AddSynchroProcedure2(c,cid.mfilter,aux.NonTuner(cid.mfilter)) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_F) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(cid.condition) e2:SetTarget(cid.target) e2:SetOperation(cid.operation) c:RegisterEffect(e2) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id+100) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(cid.tg) e1:SetOperation(cid.op) c:RegisterEffect(e1) end function cid.mfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x88a) end function cid.tfilter(c,tp) return c:IsSetCard(0x88a) and c:IsControler(tp) end function cid.condition(e,tp,eg,ep,ev,re,r,rp) if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsExists(cid.tfilter,1,nil,tp) end function cid.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end end function cid.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetCurrentChain()==ev+1 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end function cid.filter(c) return c:IsFaceup() and c:IsSetCard(0x88a) and c:GetAttribute()~=ATTRIBUTE_WATER end function cid.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cid.filter(chkc) and chkc~=c end if chk==0 then return Duel.IsExistingTarget(cid.filter,tp,LOCATION_MZONE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,cid.filter,tp,LOCATION_MZONE,0,1,1,c) end function cid.op(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(ATTRIBUTE_WATER) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end end