Commit f9c165de authored by Koishi_Mint's avatar Koishi_Mint Committed by nanahira

field activation fix by Effect.CheckCountLimit (#1025)

parent 039a96d4
...@@ -30,6 +30,7 @@ function c15248873.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,6 +30,7 @@ function c15248873.operation(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
......
...@@ -45,6 +45,7 @@ function c19089195.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +45,7 @@ function c19089195.activate(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
......
...@@ -30,6 +30,7 @@ function c22900598.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,6 +30,7 @@ function c22900598.activate(e,tp,eg,ep,ev,re,r,rp)
if tc then if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
......
...@@ -4,7 +4,7 @@ function c26920296.initial_effect(c) ...@@ -4,7 +4,7 @@ function c26920296.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,26920296) e1:SetCountLimit(1,26920296+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -73,6 +73,7 @@ function c32912040.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,6 +73,7 @@ function c32912040.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
......
...@@ -32,6 +32,7 @@ function c48934760.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,6 +32,7 @@ function c48934760.activate(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
......
...@@ -82,6 +82,7 @@ function c69529337.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,6 +82,7 @@ function c69529337.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
......
...@@ -77,6 +77,8 @@ function c72332074.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,6 +77,8 @@ function c72332074.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RaiseEvent(tc,4179255,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain()) local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end end
end end
...@@ -34,6 +34,7 @@ function c89208725.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,6 +34,7 @@ function c89208725.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
......
...@@ -51,6 +51,7 @@ function c95923441.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,6 +51,7 @@ function c95923441.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
......
...@@ -29,9 +29,11 @@ function c97970833.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,9 +29,11 @@ function c97970833.activate(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5) fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
if fc and fc:IsFaceup() and Duel.IsPlayerCanDraw(1-tp,1) and Duel.SelectYesNo(tp,aux.Stringid(97970833,0)) then if fc and fc:IsFaceup() and Duel.IsPlayerCanDraw(1-tp,1) and Duel.SelectYesNo(tp,aux.Stringid(97970833,0)) then
Duel.Draw(1-tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT)
end end
Duel.RaiseEvent(tc,4179255,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end end
end end
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