Commit 3515cb2c authored by Amiya's avatar Amiya

修复

parent 8ca45d7e
Pipeline #42099 failed with stages
in 2 minutes and 48 seconds
No preview for this file type
...@@ -79,7 +79,6 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,6 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
--check release
function s.chkfilter(c,p) function s.chkfilter(c,p)
return c:GetPreviousControler()==p and (c:IsPreviousLocation(LOCATION_MZONE) or c:IsType(TYPE_MONSTER)) return c:GetPreviousControler()==p and (c:IsPreviousLocation(LOCATION_MZONE) or c:IsType(TYPE_MONSTER))
end end
...@@ -90,7 +89,6 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +89,6 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
--special summon
function s.sscon(e,tp,eg,ep,ev,re,r,rp) function s.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)>0 return Duel.GetFlagEffect(tp,id)>0
end end
...@@ -105,8 +103,9 @@ function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -105,8 +103,9 @@ function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,id+o,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,id+o,RESET_CHAIN,0,1)
end end
function s.ssop(e,tp,eg,ep,ev,re,r,rp) function s.ssop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(s.ssfilter,tp,LOCATION_EXTRA,0,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if tg then local g=Duel.SelectMatchingCard(tp,s.ssfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -25,12 +25,6 @@ function s.initial_effect(c) ...@@ -25,12 +25,6 @@ function s.initial_effect(c)
e2:SetOperation(s.indop) e2:SetOperation(s.indop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk --atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(s.acop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1)) e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_ATKCHANGE) e4:SetCategory(CATEGORY_ATKCHANGE)
...@@ -40,6 +34,20 @@ function s.initial_effect(c) ...@@ -40,6 +34,20 @@ function s.initial_effect(c)
e4:SetTarget(s.atktg) e4:SetTarget(s.atktg)
e4:SetOperation(s.atkop) e4:SetOperation(s.atkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsSetCard(0x49) then
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
end
end end
function s.indes(e,c) function s.indes(e,c)
return not c:IsSetCard(0x48) return not c:IsSetCard(0x48)
...@@ -70,11 +78,8 @@ end ...@@ -70,11 +78,8 @@ end
function s.valcon(e,re,r,rp) function s.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end end
function s.acop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp) function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)==1 return Duel.GetFlagEffect(0,id)==2
end end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -91,6 +91,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,6 +91,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
if tc1 then if tc1 then
if Duel.SpecialSummonStep(tc1,0,p1,p1,true,false,POS_FACEUP) then if Duel.SpecialSummonStep(tc1,0,p1,p1,true,false,POS_FACEUP) then
tc1:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
...@@ -102,6 +103,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,6 +103,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
if tc2 then if tc2 then
if Duel.SpecialSummonStep(tc2,0,p2,p2,true,false,POS_FACEUP) then if Duel.SpecialSummonStep(tc2,0,p2,p2,true,false,POS_FACEUP) then
tc2:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
...@@ -38,6 +38,7 @@ function s.initial_effect(c) ...@@ -38,6 +38,7 @@ function s.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(2,id+o) e4:SetCountLimit(2,id+o)
e4:SetCost(s.descost)
e4:SetTarget(s.destg) e4:SetTarget(s.destg)
e4:SetOperation(s.desop) e4:SetOperation(s.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -89,15 +90,14 @@ end ...@@ -89,15 +90,14 @@ end
function s.costfilter(c,tp) function s.costfilter(c,tp)
return Duel.IsExistingTarget(s.desfilter,tp,0,LOCATION_ONFIELD,1,c,c) return Duel.IsExistingTarget(s.desfilter,tp,0,LOCATION_ONFIELD,1,c,c)
end end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
if e:IsCostChecked() then
return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,tp)
else
return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
......
...@@ -21,6 +21,7 @@ function s.initial_effect(c) ...@@ -21,6 +21,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_BATTLE_DESTROYED) e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCondition(s.spcon2)
e2:SetCost(s.spcost) e2:SetCost(s.spcost)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
...@@ -54,6 +55,12 @@ function s.spcon1(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,6 +55,12 @@ function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) return c:IsPreviousLocation(LOCATION_DECK)
end end
function s.cfilter(c,tp)
return c:IsPreviousControler(tp)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
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()
if chk==0 then return not c:IsPublic() end if chk==0 then return not c:IsPublic() 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