Commit dd56f802 authored by salix5's avatar salix5

fix

c23303072 モンタージュ·ドラゴン
The atk continuous effect is given before sp_summon success like other similar effect.
parent e0f6412c
--モンタージュ·ドラゴン function c23303072.initial_effect(c) c:EnableReviveLimit() --cannot special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(aux.FALSE) c:RegisterEffect(e1) --atk local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetOperation(c23303072.atkop) c:RegisterEffect(e3) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(23303072,1)) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetRange(LOCATION_HAND) e2:SetCondition(c23303072.spcon) e2:SetOperation(c23303072.spop) e2:SetLabelObject(e3) c:RegisterEffect(e2) end function c23303072.filter(c) return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() end function c23303072.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c23303072.filter,c:GetControler(),LOCATION_HAND,0,3,e:GetHandler()) end function c23303072.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c23303072.filter,tp,LOCATION_HAND,0,3,3,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) local sum=0 local tc=g:GetFirst() while tc do local lv=tc:GetLevel() sum=sum+lv tc=g:GetNext() end e:GetLabelObject():SetLabel(sum*300) end function c23303072.atkop(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_SET_ATTACK) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(e:GetLabel()) e1:SetReset(RESET_EVENT+0x1ff0000) c:RegisterEffect(e1) end
\ No newline at end of file
--モンタージュ·ドラゴン function c23303072.initial_effect(c) c:EnableReviveLimit() --cannot special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(aux.FALSE) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(23303072,1)) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetRange(LOCATION_HAND) e2:SetCondition(c23303072.spcon) e2:SetOperation(c23303072.spop) c:RegisterEffect(e2) end function c23303072.filter(c) return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() end function c23303072.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c23303072.filter,c:GetControler(),LOCATION_HAND,0,3,e:GetHandler()) end function c23303072.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c23303072.filter,tp,LOCATION_HAND,0,3,3,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) local sum=0 local tc=g:GetFirst() while tc do local lv=tc:GetLevel() sum=sum+lv tc=g:GetNext() end local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(sum*300) e1:SetReset(RESET_EVENT+0xff0000) c:RegisterEffect(e1) end
\ No newline at end of file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment