Commit 11b88261 authored by POLYMER's avatar POLYMER

fix

parent 784071bc
...@@ -79,18 +79,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,18 +79,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(id) e2:SetCode(id)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,1)
e2:Reset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_ADJUST) e3:SetCode(EVENT_ADJUST)
e3:SetCondition(s.discon) e3:SetCondition(s.discon)
e3:SetOperation(s.disop) e3:SetOperation(s.disop)
e3:Reset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0)) e4:SetDescription(aux.Stringid(id,0))
...@@ -117,26 +117,31 @@ function s.checkintab(tab,v) ...@@ -117,26 +117,31 @@ function s.checkintab(tab,v)
end end
return false return false
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e)
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then for tp=0,1 do
local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)} if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then
for _,ke in ipairs(effect_record) do local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)}
if not s.checkintab(record_tab2,ke) then for _,ke in ipairs(effect_record) do
return true if not s.checkintab(record_tab2,ke) then
return true
end
end end
end end
end end
return false return false
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e)
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then for tp=0,1 do
local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)} if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then
for _,ke in ipairs(effect_record) do local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)}
if not s.checkintab(record_tab2,ke) then for _,ke in ipairs(effect_record) do
ke:SetCondition(function(ce,ctp,...) if not s.checkintab(record_tab2,ke) then
return not Duel.IsPlayerAffectedByEffect(ctp,id) and ke:GetCondition()(...) local condition=ke:GetCondition() or aux.TRUE
end) ke:SetCondition(function(...)
table.insert(record_tab2,ke) return not Duel.IsPlayerAffectedByEffect(0,id) and condition(...)
end)
table.insert(record_tab2,ke)
end
end end
end end
end end
......
...@@ -17,9 +17,9 @@ function s.initial_effect(c) ...@@ -17,9 +17,9 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_SPSUMMON) e1:SetCode(EVENT_SPSUMMON)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon_summon) e1:SetCondition(s.spcon_summon)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
...@@ -60,7 +60,7 @@ function s.spcon_move(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function s.spcon_move(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.omefilter,1,nil,tp) return eg:IsExists(s.omefilter,1,nil,tp)
end end
function s.desfilter(c) function s.desfilter(c)
return c:IsFaceup() and c:IsControler(1-tp) and c:GetAttack()>=0 return c:IsFaceup() and c:GetAttack()>=0
end end
function s.gcheck(g) function s.gcheck(g)
return g:GetSum(Card.GetAttack)<=2100 return g:GetSum(Card.GetAttack)<=2100
......
...@@ -4,7 +4,7 @@ cm.name="迅征啼鸟 暮色匕首" ...@@ -4,7 +4,7 @@ cm.name="迅征啼鸟 暮色匕首"
if not require and dofile then function require(str) return dofile(str..".lua") end end if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xc532),2,2) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2,2)
SNNM.AnouguryLink(c) SNNM.AnouguryLink(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -82,8 +82,8 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,8 +82,8 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,2)}, {b1,aux.Stringid(id,2)},
{b2,aux.Stringid(id,3)}, {b2,aux.Stringid(id,3)},
{b3,aux.Stringid(id,4)}) {b3,aux.Stringid(id,4)})
e:SetLabel(op) Duel.SetTargetParam(op)
Duel.RegisterFlagEffect(tp,id+op,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,id+op,RESET_PHASE+PHASE_END,0,1)
if op==2 then if op==2 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD)
...@@ -91,7 +91,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -91,7 +91,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.effop(e,tp,eg,ep,ev,re,r,rp) function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local op=e:GetLabel() local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if op==1 then if op==1 then
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
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