Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Cocoon of Evolution
- --COPYRIGHT by YAMI AN
- function c999999992.initial_effect(c)
- --Equip
- local e1=Effect.CreateEffect(c)
- e1:SetType(EFFECT_TYPE_IGNITION)
- e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
- e1:SetCategory(CATEGORY_EQUIP)
- e1:SetRange(LOCATION_HAND)
- e1:SetTarget(c999999992.eqtg)
- e1:SetOperation(c999999992.eqop)
- c:RegisterEffect(e1)
- end
- function c999999992.filter(c)
- return c:IsFaceup() and c:IsCode(58192742) or c:IsCode(87756343)
- end
- function c999999992.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
- if chkc then
- return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c999999992.filter(chkc)
- end
- if chk==0 then
- return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c999999992.filter,tp,LOCATION_MZONE,0,1,nil)
- end
- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
- Duel.SelectTarget(tp,c999999992.filter,tp,LOCATION_MZONE,0,1,1,nil)
- end
- function c999999992.eqop(e,tp,eg,ep,ev,re,r,rp)
- local c=e:GetHandler()
- if not c:IsRelateToEffect(e) then return end
- local tc=Duel.GetFirstTarget()
- if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
- Duel.SendtoGrave(c,REASON_EFFECT)
- return
- end
- Duel.Equip(tp,c,tc,true)
- local e1=Effect.CreateEffect(c)
- e1:SetType(EFFECT_TYPE_SINGLE)
- e1:SetCode(EFFECT_EQUIP_LIMIT)
- e1:SetValue(c999999992.eqlimit)
- e1:SetReset(RESET_EVENT+0x1fe0000)
- c:RegisterEffect(e1)
- local e2=Effect.CreateEffect(c)
- e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
- e2:SetRange(LOCATION_SZONE)
- e2:SetCode(EVENT_PHASE+PHASE_END)
- e2:SetCondition(c999999992.checkcon)
- e2:SetOperation(c999999992.checkop)
- e2:SetCountLimit(1)
- e2:SetReset(RESET_EVENT+0x1fe0000)
- c:RegisterEffect(e2)
- --Equip effect
- local e3=Effect.CreateEffect(c)
- e3:SetType(EFFECT_TYPE_EQUIP)
- e3:SetCode(EFFECT_SET_ATTACK)
- e3:SetValue(0)
- e3:SetReset(RESET_EVENT+0x1fe0000)
- c:RegisterEffect(e3)
- local e4=Effect.CreateEffect(c)
- e4:SetType(EFFECT_TYPE_EQUIP)
- e4:SetCode(EFFECT_SET_DEFENCE)
- e4:SetValue(2000)
- e4:SetReset(RESET_EVENT+0x1fe0000)
- c:RegisterEffect(e4)
- c:SetTurnCounter(0)
- end
- function c999999992.checkcon(e,tp,eg,ep,ev,re,r,rp)
- return Duel.GetTurnPlayer()==tp
- end
- function c999999992.checkop(e,tp,eg,ep,ev,re,r,rp)
- local c=e:GetHandler()
- local ct=c:GetTurnCounter()
- ct=ct+1
- c:SetTurnCounter(ct)
- end
- function c999999992.eqlimit(e,c)
- return c:IsCode(58192742) or c:IsCode(87756343)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement