--Wondertain Patentee function c212215.initial_effect(c) --send to grave local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(212215,0)) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,212215) e1:SetTarget(c212215.tgtg) e1:SetOperation(c212215.tgop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) --tohand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(212215,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_TO_GRAVE) e3:SetCountLimit(1,212216) e3:SetCondition(c212215.thcon) e3:SetTarget(c212215.thtg) e3:SetOperation(c212215.thop) c:RegisterEffect(e3) --atkup local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(212215,2)) e4:SetCategory(CATEGORY_ATKCHANGE) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCost(aux.bfgcost) e4:SetCountLimit(1,212217) e4:SetTarget(c212215.atktg) e4:SetOperation(c212215.atkop) c:RegisterEffect(e4) --spsummon limit local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_FIELD) e5:SetRange(LOCATION_MZONE) e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetTargetRange(1,0) e5:SetTarget(c212215.sumlimit) c:RegisterEffect(e5) end function c212215.tgfilter(c) return c:IsSetCard(0x244d) and c:IsAbleToGrave() end function c212215.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c212215.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) end function c212215.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c212215.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end function c212215.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function c212215.thfilter(c) return c:IsSetCard(0x244d) and c:IsType(TYPE_MONSTER) and not c:IsCode(212215) and c:IsAbleToHand() end function c212215.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c212215.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c212215.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c212215.thfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function c212215.filter(c) return c:IsFaceup() and c:IsSetCard(0x244d) end function c212215.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c212215.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c212215.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c212215.filter,tp,LOCATION_MZONE,0,1,1,nil) end function c212215.atkop(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_UPDATE_ATTACK) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) e1:SetValue(1600) tc:RegisterEffect(e1) end end function c212215.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) end