Commit b70ba3e2 authored by POLYMER's avatar POLYMER

fix

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