Commit 7fc0d976 authored by VanillaSalt's avatar VanillaSalt

fix

parent 39d661d4
--モンタージュ·ドラゴン 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
--モンタージュ·ドラゴン
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)
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,c)
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 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
......@@ -15,13 +15,15 @@ function c52665542.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c52665542.cost)
e2:SetTarget(c52665542.target)
e2:SetOperation(c52665542.activate)
e2:SetOperation(c52665542.operation)
c:RegisterEffect(e2)
--add counter
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c52665542.accon)
e3:SetOperation(c52665542.acop)
c:RegisterEffect(e3)
--destroy replace
......@@ -49,14 +51,14 @@ function c52665542.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x38) and c:IsAbleToHand()
end
function c52665542.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetLabelObject()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52665542.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,c) end
local cc=e:GetLabelObject()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52665542.tgfilter(chkc) and chkc~=cc end
if chk==0 then return Duel.IsExistingTarget(c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,cc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,1,c)
local sg=Duel.SelectTarget(tp,c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,1,cc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c52665542.activate(e,tp,eg,ep,ev,re,r,rp)
function c52665542.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
......@@ -65,16 +67,17 @@ function c52665542.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c52665542.cfilter(c,tp)
return c:GetPreviousLocation()==LOCATION_DECK and c:GetPreviousControler()==tp
return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp
end
function c52665542.accon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c52665542.cfilter,1,nil,tp)
end
function c52665542.acop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c52665542.cfilter,1,nil,tp) then
e:GetHandler():AddCounter(0x5,1)
end
end
function c52665542.dfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD)
and c:IsSetCard(0x38) and c:IsControler(tp)
and c:IsSetCard(0x38) and c:IsControler(tp) and c:IsReason(REASON_EFFECT)
end
function c52665542.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -86,7 +89,7 @@ function c52665542.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c52665542.value(e,c)
return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD)
and c:IsSetCard(0x38) and c:IsControler(e:GetHandlerPlayer())
and c:IsSetCard(0x38) and c:IsControler(e:GetHandlerPlayer()) and c:IsReason(REASON_EFFECT)
end
function c52665542.desop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
......
......@@ -3,7 +3,7 @@ function c54719828.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,4),3)
c:EnableReviveLimit()
--attack up
--act limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(54719828,0))
e1:SetType(EFFECT_TYPE_IGNITION)
......@@ -28,12 +28,10 @@ function c54719828.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
if e:GetLabel()==0 then
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetTarget(c54719828.tg)
e1:SetTarget(c54719828.actg)
elseif e:GetLabel()==1 then
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
......@@ -48,7 +46,7 @@ function c54719828.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
Duel.RegisterEffect(e1,tp)
end
function c54719828.tg(e,c)
function c54719828.actg(e,c)
return c:IsType(TYPE_MONSTER)
end
function c54719828.aclimit2(e,re,tp)
......
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