Commit 80609766 authored by wind2009's avatar wind2009 Committed by GitHub

Fix freechain activation of Golden Land Traps (#1450)

parent e845cf31
...@@ -14,10 +14,12 @@ function c20590515.initial_effect(c) ...@@ -14,10 +14,12 @@ function c20590515.initial_effect(c)
--set --set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(20590515,1)) e2:SetDescription(aux.Stringid(20590515,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c20590515.setcon)
e2:SetCountLimit(1,20590515) e2:SetCountLimit(1,20590515)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c20590515.settg) e2:SetTarget(c20590515.settg)
e2:SetOperation(c20590515.setop) e2:SetOperation(c20590515.setop)
...@@ -54,6 +56,9 @@ end ...@@ -54,6 +56,9 @@ end
function c20590515.setfilter(c) function c20590515.setfilter(c)
return c:IsSetCard(0x2142) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x2142) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end end
function c20590515.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
end
function c20590515.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c20590515.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c20590515.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c20590515.setfilter,tp,LOCATION_DECK,0,1,nil) end
end end
......
...@@ -14,10 +14,12 @@ function c67007102.initial_effect(c) ...@@ -14,10 +14,12 @@ function c67007102.initial_effect(c)
--set --set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67007102,1)) e2:SetDescription(aux.Stringid(67007102,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c67007102.setcon)
e2:SetCountLimit(1,67007102) e2:SetCountLimit(1,67007102)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c67007102.settg) e2:SetTarget(c67007102.settg)
e2:SetOperation(c67007102.setop) e2:SetOperation(c67007102.setop)
...@@ -61,6 +63,9 @@ end ...@@ -61,6 +63,9 @@ end
function c67007102.setfilter(c) function c67007102.setfilter(c)
return c:IsSetCard(0x2142) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x2142) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end end
function c67007102.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
end
function c67007102.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c67007102.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67007102.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c67007102.setfilter,tp,LOCATION_DECK,0,1,nil) end
end end
......
...@@ -14,10 +14,12 @@ function c93191801.initial_effect(c) ...@@ -14,10 +14,12 @@ function c93191801.initial_effect(c)
--set --set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(93191801,1)) e2:SetDescription(aux.Stringid(93191801,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c93191801.setcon)
e2:SetCountLimit(1,93191801) e2:SetCountLimit(1,93191801)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c93191801.settg) e2:SetTarget(c93191801.settg)
e2:SetOperation(c93191801.setop) e2:SetOperation(c93191801.setop)
...@@ -53,6 +55,9 @@ end ...@@ -53,6 +55,9 @@ end
function c93191801.setfilter(c) function c93191801.setfilter(c)
return c:IsSetCard(0x2142) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x2142) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end end
function c93191801.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
end
function c93191801.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c93191801.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c93191801.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c93191801.setfilter,tp,LOCATION_DECK,0,1,nil) 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