Commit bc7081c3 authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix Double Payback, Kaiju Capture Mission, War Rock Ordeal (#2067)

parent 9410586c
...@@ -14,7 +14,7 @@ function c5914184.actcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,7 +14,7 @@ function c5914184.actcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and 1-tp==rp and ev>=1000 and bit.band(r,REASON_EFFECT)~=0 return ep==tp and 1-tp==rp and ev>=1000 and bit.band(r,REASON_EFFECT)~=0
end end
function c5914184.acttg(e,tp,eg,ep,ev,re,r,rp,chk) function c5914184.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x1a,math.floor(ev/1000)) end if chk==0 then return Duel.IsCanAddCounter(tp,0x1a,math.floor(ev/1000),e:GetHandler()) end
end end
function c5914184.actop(e,tp,eg,ep,ev,re,r,rp) function c5914184.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--ウォークライ・オーディール --ウォークライ・オーディール
function c71331215.initial_effect(c) function c71331215.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
c:EnableCounterPermit(0x5a,LOCATION_SZONE) c:EnableCounterPermit(0x5a,LOCATION_SZONE)
c:SetUniqueOnField(1,0,71331215) c:SetUniqueOnField(1,0,71331215)
--Activate --Activate
...@@ -8,6 +7,7 @@ function c71331215.initial_effect(c) ...@@ -8,6 +7,7 @@ function c71331215.initial_effect(c)
e1:SetCategory(CATEGORY_COUNTER) e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c71331215.target)
e1:SetOperation(c71331215.activate) e1:SetOperation(c71331215.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
...@@ -22,20 +22,11 @@ function c71331215.initial_effect(c) ...@@ -22,20 +22,11 @@ function c71331215.initial_effect(c)
e2:SetOperation(c71331215.drop) e2:SetOperation(c71331215.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71331215.activate(e,tp,eg,ep,ev,re,r,rp) function c71331215.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return Duel.IsCanAddCounter(tp,0x5a,3,e:GetHandler()) end
c:AddCounter(0x5a,3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_SELF_TOGRAVE)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c71331215.sdcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end end
function c71331215.sdcon(e) function c71331215.activate(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x5a)==0 e:GetHandler():AddCounter(0x5a,3)
end end
function c71331215.drcon(e,tp,eg,ep,ev,re,r,rp) function c71331215.drcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
...@@ -50,8 +41,11 @@ function c71331215.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,8 +41,11 @@ function c71331215.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c71331215.drop(e,tp,eg,ep,ev,re,r,rp) function c71331215.drop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():RemoveCounter(tp,0x5a,1,REASON_EFFECT) then local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:RemoveCounter(tp,0x5a,1,REASON_EFFECT) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) if Duel.Draw(p,d,REASON_EFFECT)~=0 and c:GetCounter(0x5a)==0 then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end end
end end
...@@ -41,7 +41,8 @@ function c81057455.filter(c) ...@@ -41,7 +41,8 @@ function c81057455.filter(c)
end end
function c81057455.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81057455.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c81057455.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c81057455.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81057455.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsCanAddCounter(tp,0x37,1,e:GetHandler())
and Duel.IsExistingTarget(c81057455.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c81057455.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c81057455.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
......
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