--created by Geass, coded by Lyris local cid,id=GetID() function cid.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_DESTROYED) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCondition(cid.condition) e1:SetTarget(cid.sptg) e1:SetOperation(cid.spop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id+100) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetTarget(cid.target) e2:SetOperation(cid.operation) c:RegisterEffect(e2) end function cid.cfilter(c,tp) return c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp end function cid.condition(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsSetCard(0x88a) and eg:IsExists(cid.cfilter,1,e:GetHandler(),tp) end function cid.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function cid.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function cid.filter(c) return c:IsFaceup() and c:IsSetCard(0x88a) and c:GetAttribute()~=ATTRIBUTE_WATER end function cid.target(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.operation(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) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetValue(1) tc:RegisterEffect(e2) end end