local m=11110105 local cm=_G["c"..m] cm.name="Zetta, Warrior Princess of Ichyaltas" function cm.initial_effect(c) aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),aux.NonTuner(Card.IsSetCard,0x2a7),1) c:EnableReviveLimit() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,m) e1:SetCost(cm.buffcost) e1:SetOperation(cm.buffop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,m+100000000) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e2:SetCost(cm.descost) e2:SetTarget(cm.destg) e2:SetOperation(cm.desop) c:RegisterEffect(e2) end function cm.bufffilter(c) return c:IsSetCard(0x2a7) and c:IsType(TYPE_MONSTER) and c:IsReleasable() end function cm.buffcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.bufffilter,tp,0x3,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) local sg=Duel.SelectMatchingCard(tp,cm.bufffilter,tp,0x3,0,1,1,nil) Duel.SendtoGrave(sg,REASON_RELEASE+REASON_COST) end function cm.buffop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) e1:SetValue(DOUBLE_DAMAGE) e1:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD) c:RegisterEffect(e1) end function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.GetTurnPlayer()==tp then return false end e:SetLabel(1) return true end function cm.desfilter(c,tc,ec) return c:GetEquipTarget()~=tc and c~=ec end function cm.costfilter(c,ec,tp) return c:IsSetCard(0x2a7) and Duel.IsExistingTarget(cm.desfilter,tp,0,LOCATION_ONFIELD,1,c,c,ec) end function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chk==0 then if e:GetLabel()==1 then e:SetLabel(0) return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,nil,c,tp) else return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end end if e:GetLabel()==1 then e:SetLabel(0) local sg=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,nil,c,tp) Duel.Release(sg,REASON_COST) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function cm.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end