Commit ca3e021c authored by wind2009's avatar wind2009

Fix extra summon effect

parent 336b4afb
...@@ -29,7 +29,7 @@ function c40441990.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,7 @@ function c40441990.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,c40441990.costfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,c40441990.costfilter,1,1,REASON_COST+REASON_DISCARD)
end end
function c40441990.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c40441990.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) end if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,40441990)==0 end
end end
function c40441990.sumop(e,tp,eg,ep,ev,re,r,rp) function c40441990.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,40441990)~=0 then return end if Duel.GetFlagEffect(tp,40441990)~=0 then return end
......
...@@ -61,13 +61,16 @@ function c42472002.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,13 +61,16 @@ function c42472002.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c42472002.sumop(e,tp,eg,ep,ev,re,r,rp) function c42472002.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) if Duel.GetFlagEffect(tp,42472002)==0 then
e1:SetDescription(aux.Stringid(42472002,1)) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(42472002,1))
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
Duel.RegisterEffect(e1,tp) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,42472002,RESET_PHASE+PHASE_END,0,1)
end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -76,7 +79,6 @@ function c42472002.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +79,6 @@ function c42472002.sumop(e,tp,eg,ep,ev,re,r,rp)
e2:SetTarget(c42472002.splimit) e2:SetTarget(c42472002.splimit)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,42472002,RESET_PHASE+PHASE_END,0,1)
end end
function c42472002.splimit(e,c) function c42472002.splimit(e,c)
return not c:IsSetCard(0x107a) and c:IsLocation(LOCATION_EXTRA) return not c:IsSetCard(0x107a) and c:IsLocation(LOCATION_EXTRA)
......
...@@ -9,7 +9,8 @@ function c52112003.initial_effect(c) ...@@ -9,7 +9,8 @@ function c52112003.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c52112003.target(e,tp,eg,ep,ev,re,r,rp,chk) function c52112003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,52112003)==0 end
end end
function c52112003.activate(e,tp,eg,ep,ev,re,r,rp) function c52112003.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=math.min(5,Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)) local ct=math.min(5,Duel.GetFieldGroupCount(tp,LOCATION_DECK,0))
......
...@@ -37,9 +37,10 @@ function c5795882.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,9 +37,10 @@ function c5795882.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
end end
function c5795882.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c5795882.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,5795882)==0 end
end end
function c5795882.sumop(e,tp,eg,ep,ev,re,r,rp) function c5795882.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,5795882)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(5795882,2)) e1:SetDescription(aux.Stringid(5795882,2))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -75,9 +75,10 @@ function c61322713.cost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,9 +75,10 @@ function c61322713.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
c61322713.cost1(e,tp,eg,ep,ev,re,r,rp,1) c61322713.cost1(e,tp,eg,ep,ev,re,r,rp,1)
end end
function c61322713.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c61322713.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,61322713)==0 end
end end
function c61322713.sumop(e,tp,eg,ep,ev,re,r,rp) function c61322713.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,61322713)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(61322713,2)) e1:SetDescription(aux.Stringid(61322713,2))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -37,7 +37,7 @@ function s.thfilter(c) ...@@ -37,7 +37,7 @@ function s.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x95) and c:IsAbleToHand() return c:IsType(TYPE_SPELL) and c:IsSetCard(0x95) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -25,7 +25,8 @@ function c78665705.filter(c) ...@@ -25,7 +25,8 @@ function c78665705.filter(c)
return c:IsCode(10000010) and c:IsAbleToHand() return c:IsCode(10000010) and c:IsAbleToHand()
end end
function c78665705.target(e,tp,eg,ep,ev,re,r,rp,chk) function c78665705.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c78665705.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c78665705.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
and Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,78665705)==0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function c78665705.activate(e,tp,eg,ep,ev,re,r,rp) function c78665705.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -26,7 +26,7 @@ function c80529459.initial_effect(c) ...@@ -26,7 +26,7 @@ function c80529459.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c80529459.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80529459.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
......
...@@ -31,9 +31,10 @@ function c8567955.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,9 +31,10 @@ function c8567955.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function c8567955.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c8567955.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,8567955)==0 end
end end
function c8567955.sumop(e,tp,eg,ep,ev,re,r,rp) function c8567955.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,8567955)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(8567955,2)) e1:SetDescription(aux.Stringid(8567955,2))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -29,18 +29,20 @@ function c99328137.sumcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,18 +29,20 @@ function c99328137.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,99328137)==0 return Duel.GetFlagEffect(tp,99328137)==0
end end
function c99328137.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c99328137.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,99328137)==0 end
end end
function c99328137.sumop(e,tp,eg,ep,ev,re,r,rp) function c99328137.sumop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.GetFlagEffect(tp,94076521)==0 then
e1:SetDescription(aux.Stringid(99328137,1)) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(99328137,1))
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(c99328137.extrasumtg) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTarget(c99328137.extrasumtg)
Duel.RegisterEffect(e1,tp) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,99328137,RESET_PHASE+PHASE_END,0,1) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,99328137,RESET_PHASE+PHASE_END,0,1)
end
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SUMMON) e2:SetCode(EFFECT_CANNOT_SUMMON)
......
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