Commit b70ba3e2 authored by POLYMER's avatar POLYMER

fix

parent c7265715
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local s,id=GetID() local s,id=GetID()
s.ui_hint_effect = s.ui_hint_effect or {} s.ui_hint_effect = s.ui_hint_effect or {}
local CORE_ID = 40020353 local CORE_ID = 40020353
local ArmedIntervention = CORE_ID local ArmedIntervention = CORE_ID
local ArmedIntervention_UI = CORE_ID + 10000 local ArmedIntervention_UI = CORE_ID + 10000
--CB --CB
s.named_with_CelestialBeing=1 s.named_with_CelestialBeing=1
...@@ -41,9 +41,10 @@ function s.initial_effect(c) ...@@ -41,9 +41,10 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+100) e2:SetCountLimit(1,id+100)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
...@@ -72,9 +73,14 @@ end ...@@ -72,9 +73,14 @@ end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local loc = LOCATION_MZONE local loc = LOCATION_MZONE
if aux.IsCanBeQuickEffect(c,tp,40020377) then
loc = LOCATION_ONFIELD local has_special_card = Duel.IsExistingMatchingCard(function(tc)
return tc:IsFaceup() and tc:IsCode(40020377)
end, tp, LOCATION_ONFIELD, 0, 1, nil)
if has_special_card then
loc = LOCATION_ONFIELD
end end
if chk==0 then if chk==0 then
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local s,id=GetID() local s,id=GetID()
s.ui_hint_effect = s.ui_hint_effect or {} s.ui_hint_effect = s.ui_hint_effect or {}
local CORE_ID = 40020353 local CORE_ID = 40020353
local ArmedIntervention = CORE_ID local ArmedIntervention = CORE_ID
local ArmedIntervention_UI = CORE_ID + 10000 local ArmedIntervention_UI = CORE_ID + 10000
--CB --CB
s.named_with_CelestialBeing=1 s.named_with_CelestialBeing=1
...@@ -59,28 +59,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,28 +59,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local owner=e:GetHandler():GetOwner() local owner=e:GetHandler():GetOwner()
return Duel.GetTurnPlayer()==tp and Duel.GetFlagEffect(owner,ArmedIntervention)>=7 return Duel.GetTurnPlayer()==tp and Duel.GetFlagEffect(owner,ArmedIntervention)>=7
end end
function s.costfilter(c, use_extended) function s.costfilter(c,tp,loc)
if not (c:IsFaceup() and c:IsReleasable()) then return false end return s.Exia(c) and c:IsControler(tp) and c:IsFaceup() and c:IsReleasable()
if s.Exia(c) then
return use_extended or c:IsType(TYPE_MONSTER)
end
if s.oo(c) then
return c:IsType(TYPE_MONSTER)
end
return false
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local use_extended = aux.IsCanBeQuickEffect(c,tp,40020377)
local loc = LOCATION_MZONE local loc = LOCATION_MZONE
if use_extended then loc = LOCATION_ONFIELD end
local has_special_card = Duel.IsExistingMatchingCard(function(tc)
return tc:IsFaceup() and tc:IsCode(40020377)
end, tp, LOCATION_ONFIELD, 0, 1, nil)
if has_special_card then
loc = LOCATION_ONFIELD
end
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil,use_extended) return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil,tp,loc)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil,use_extended) local rg=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil,tp,loc)
Duel.Release(g,REASON_COST) Duel.Release(rg,REASON_COST)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local s,id=GetID() local s,id=GetID()
s.ui_hint_effect = s.ui_hint_effect or {} s.ui_hint_effect = s.ui_hint_effect or {}
local CORE_ID = 40020353 local CORE_ID = 40020353
local ArmedIntervention = CORE_ID local ArmedIntervention = CORE_ID
local ArmedIntervention_UI = CORE_ID + 10000 local ArmedIntervention_UI = CORE_ID + 10000
--CB --CB
s.named_with_CelestialBeing=1 s.named_with_CelestialBeing=1
...@@ -56,28 +56,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,28 +56,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetFlagEffect(owner,ArmedIntervention)>=5 and Duel.GetFlagEffect(owner,ArmedIntervention)>=5
end end
function s.costfilter(c, use_extended) function s.costfilter(c,tp,loc)
if not (c:IsFaceup() and c:IsReleasable()) then return false end return s.Exia(c) and c:IsControler(tp) and c:IsFaceup() and c:IsReleasable()
if s.Exia(c) then
return use_extended or c:IsType(TYPE_MONSTER)
end
if s.oo(c) then
return c:IsType(TYPE_MONSTER)
end
return false
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local use_extended = aux.IsCanBeQuickEffect(c,tp,40020377)
local loc = LOCATION_MZONE local loc = LOCATION_MZONE
if use_extended then loc = LOCATION_ONFIELD end
local has_special_card = Duel.IsExistingMatchingCard(function(tc)
return tc:IsFaceup() and tc:IsCode(40020377)
end, tp, LOCATION_ONFIELD, 0, 1, nil)
if has_special_card then
loc = LOCATION_ONFIELD
end
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil,use_extended) return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil,tp,loc)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil,use_extended) local rg=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil,tp,loc)
Duel.Release(g,REASON_COST) Duel.Release(rg,REASON_COST)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local s,id=GetID() local s,id=GetID()
s.ui_hint_effect = s.ui_hint_effect or {} s.ui_hint_effect = s.ui_hint_effect or {}
local CORE_ID = 40020353 local CORE_ID = 40020353
local ArmedIntervention = CORE_ID local ArmedIntervention = CORE_ID
local ArmedIntervention_UI = CORE_ID + 10000 local ArmedIntervention_UI = CORE_ID + 10000
local GLOBAL_END_PHASE_CHECK = id + 900 local GLOBAL_END_PHASE_CHECK = id + 900
--CB --CB
...@@ -50,25 +50,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,25 +50,29 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetFlagEffect(owner,ArmedIntervention)>=9 and Duel.GetFlagEffect(owner,ArmedIntervention)>=9
end end
function s.costfilter(c, use_extended) function s.costfilter(c,tp,loc)
if not (c:IsFaceup() and c:IsReleasable()) then return false end return s.Exia(c) and c:IsControler(tp) and c:IsFaceup() and c:IsReleasable()
if use_extended and s.Exia(c) then return true end
if not c:IsType(TYPE_MONSTER) then return false end
return s.Exia(c) or s.QanT(c) or s.ELS(c)
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local use_extended = aux.IsCanBeQuickEffect(c,tp,40020377)
local loc = LOCATION_MZONE local loc = LOCATION_MZONE
if use_extended then loc = LOCATION_ONFIELD end
local has_special_card = Duel.IsExistingMatchingCard(function(tc)
return tc:IsFaceup() and tc:IsCode(40020377)
end, tp, LOCATION_ONFIELD, 0, 1, nil)
if has_special_card then
loc = LOCATION_ONFIELD
end
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil,use_extended) return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil,tp,loc)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil,use_extended) local rg=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil,tp,loc)
Duel.Release(g,REASON_COST) Duel.Release(rg,REASON_COST)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -10,7 +10,7 @@ function s.CelestialBeing(c) ...@@ -10,7 +10,7 @@ function s.CelestialBeing(c)
end end
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(s,2)) e1:SetDescription(aux.Stringid(id,2))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
...@@ -167,7 +167,7 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -167,7 +167,7 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp)
t[i]=i t[i]=i
end end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
local an=Duel.AnnounceNumber(p,t) local an=Duel.AnnounceNumber(p,table.unpack(t))
cdata=effects[an] cdata=effects[an]
end end
--local cdata=s.findeffect(te) --local cdata=s.findeffect(te)
......
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