Commit 1f71a4fa authored by wind2009's avatar wind2009 Committed by GitHub

Fix 巳剣降臨 (#3104)

parent 39ed3bc5
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
...@@ -35,20 +36,27 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,20 +36,27 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=s2 and (Duel.GetFlagEffect(tp,id+o)==0 or not e:IsCostChecked()) local b2=s2 and (Duel.GetFlagEffect(tp,id+o)==0 or not e:IsCostChecked())
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1)}, {b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2)}) {b2,aux.Stringid(id,2),2})
e:SetLabel(op)
if op==1 then if op==1 then
if e:IsCostChecked() then if e:IsCostChecked() then
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
e:SetOperation(s.spop1)
elseif op==2 then elseif op==2 then
if e:IsCostChecked() then if e:IsCostChecked() then
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
e:SetOperation(s.spop2) end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op==1 then
s.spop1(e,tp,eg,ep,ev,re,r,rp)
elseif op==2 then
s.spop2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.spop1(e,tp,eg,ep,ev,re,r,rp) function s.spop1(e,tp,eg,ep,ev,re,r,rp)
......
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