--GUARDIAN的苦战 function c33701074.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --counter local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(33701074,0)) e1:SetCategory(CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1) e1:SetTarget(c33701074.addct) e1:SetOperation(c33701074.addc) c:RegisterEffect(e1) --to hand or grave local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(33701074,0)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_SZONE) e1:SetCost(c33701074.cost) e1:SetTarget(c33701074.target) e1:SetOperation(c33701074.operation) c:RegisterEffect(e1) --counter local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(33701074,1)) e2:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCost(c33701074.thcost) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetTarget(c33701074.cttg) e2:SetOperation(c33701074.ctop) c:RegisterEffect(e2) end function c33701074.addct(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1021) end function c33701074.addc(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then e:GetHandler():AddCounter(0x1021,1) end end function c33701074.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1021,2,REASON_COST) end Duel.RemoveCounter(tp,1,1,0x1021,2,REASON_COST) end function c33701074.cfilter(c) return c:IsAbleToDeck() or c:IsAbleToGrave() end function c33701074.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c33701074.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD) end function c33701074.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33701074,0)) local g=Duel.SelectMatchingCard(tp,c33701074.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) if g:GetCount()>0 then local tc=g:GetFirst() if tc and tc:IsAbleToDeck() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) else Duel.SendtoGrave(tc,REASON_EFFECT) end end Duel.Hint(HINT_MUSIC,0,aux.Stringid(33701074,0)) end function c33701074.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function c33701074.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0x1021,2) end function c33701074.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then tc:AddCounter(0x1021,2) Duel.Hint(HINT_MUSIC,0,aux.Stringid(33701074,0)) end end