Commit 5e7b7fc8 authored by Huangnan's avatar Huangnan

fix

parent 2d20944b
Pipeline #40254 canceled with stages
in 3 minutes and 35 seconds
No preview for this file type
...@@ -21,7 +21,6 @@ function s.initial_effect(c) ...@@ -21,7 +21,6 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(s.trcost) e2:SetCost(s.trcost)
e2:SetTarget(s.trtg) e2:SetTarget(s.trtg)
e2:SetOperation(s.trop) e2:SetOperation(s.trop)
...@@ -40,9 +39,9 @@ end ...@@ -40,9 +39,9 @@ end
--①:回到卡组并回复LP和特召 --①:回到卡组并回复LP和特召
function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck()end if chk==0 then return not c:IsPublic() end
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(c,nil,3,REASON_COST)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
...@@ -50,9 +49,8 @@ function s.spfilter(c,e,tp) ...@@ -50,9 +49,8 @@ function s.spfilter(c,e,tp)
end end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -67,28 +65,31 @@ end ...@@ -67,28 +65,31 @@ end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Recover(tp,800,REASON_EFFECT) if Duel.Recover(tp,800,REASON_EFFECT) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
end end
--②:确认对手卡并盖放陷阱 --②:确认对手卡并盖放陷阱
function s.cfilter(c) function s.cfilter(c,tp)
return c.MoJin and c:IsAbleToRemove() and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED)) return c.MoJin and(
(c:IsLocation(LOCATION_GRAVE)and c:IsAbleToRemove(tp,POS_FACEUP,REASON_COST))
or (c:IsLocation(LOCATION_REMOVED)and c:IsAbleToGrave())
)
end end
function s.trcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.trcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RMTOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then if tc:IsLocation(LOCATION_GRAVE) then
Duel.Remove(tc,POS_FACEUP,REASON_COST) Duel.Remove(tc,POS_FACEUP,REASON_COST)
......
...@@ -48,16 +48,21 @@ function s.tfilter(c) ...@@ -48,16 +48,21 @@ function s.tfilter(c)
end end
function s.lockcon(e,tp,eg,ep,ev,re,r,rp) function s.lockcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsFaceup() and c:GetFlagEffect(id)==0 and c:GetFlagEffect(id+1)==0 return c:IsFaceup() and c:GetFlagEffect(id)==0 and not
Duel.IsExistingMatchingCard(s.tipsfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
function s.locktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.locktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
and not Duel.IsExistingMatchingCard(s.tipsfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
--标记已经发动过 --标记已经发动过
c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1,0,aux.Stringid(id,1))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local tc=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()):GetFirst()
tc:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
end
function s.tipsfilter(c)
return c:GetFlagEffect(id+1)>0
end end
function s.lockop(e,tp,eg,ep,ev,re,r,rp) function s.lockop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -111,25 +116,23 @@ function s.lockop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,25 +116,23 @@ function s.lockop(e,tp,eg,ep,ev,re,r,rp)
--不能作为素材 --不能作为素材
local e8=Effect.CreateEffect(c) local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE) e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e8:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e8:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e8:SetRange(LOCATION_MZONE)
e8:SetReset(RESET_EVENT+RESETS_STANDARD) e8:SetReset(RESET_EVENT+RESETS_STANDARD)
e8:SetValue(1)
tc:RegisterEffect(e8) tc:RegisterEffect(e8)
local e9=Effect.CreateEffect(c) local e81=e8:Clone()
e9:SetType(EFFECT_TYPE_SINGLE) e81:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e9:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e81:SetValue(s.fuslimit)
e9:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e81)
tc:RegisterEffect(e9) local e82=e8:Clone()
local e10=Effect.CreateEffect(c) e82:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e10:SetType(EFFECT_TYPE_SINGLE) tc:RegisterEffect(e82)
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) local e83=e8:Clone()
e10:SetReset(RESET_EVENT+RESETS_STANDARD) e83:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e10) tc:RegisterEffect(e83)
local e11=Effect.CreateEffect(c) --不能适用:效果无效
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e11)
--不能适用:效果无效
local e11_5=Effect.CreateEffect(c) local e11_5=Effect.CreateEffect(c)
e11_5:SetType(EFFECT_TYPE_SINGLE) e11_5:SetType(EFFECT_TYPE_SINGLE)
e11_5:SetCode(EFFECT_DISABLE) e11_5:SetCode(EFFECT_DISABLE)
...@@ -140,6 +143,7 @@ function s.lockop(e,tp,eg,ep,ev,re,r,rp) ...@@ -140,6 +143,7 @@ function s.lockop(e,tp,eg,ep,ev,re,r,rp)
e11_6:SetCode(EFFECT_DISABLE_EFFECT) e11_6:SetCode(EFFECT_DISABLE_EFFECT)
e11_6:SetReset(RESET_EVENT+RESETS_STANDARD) e11_6:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e11_6) tc:RegisterEffect(e11_6)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
--目标卡离场时重置计数器 --目标卡离场时重置计数器
local e12=Effect.CreateEffect(c) local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e12:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
...@@ -172,3 +176,6 @@ end ...@@ -172,3 +176,6 @@ end
function s.efilter(e,te) function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner() and te:GetHandler():IsOnField() return te:GetOwner()~=e:GetOwner() and te:GetHandler():IsOnField()
end end
function s.fuslimit(e,c,st)
return st==SUMMON_TYPE_FUSION
end
...@@ -49,9 +49,7 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,9 +49,7 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,3,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,3,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.IsPlayerCanDraw(tp,1) if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==3 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==3
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
......
...@@ -66,7 +66,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,7 +66,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) or (e:GetLabel()==0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)) end if chk==0 then return (Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) or e:GetLabel()==1) or Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
if e:GetLabel()==1 then if e:GetLabel()==1 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
else else
......
...@@ -38,7 +38,7 @@ function s.initial_effect(c) ...@@ -38,7 +38,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return not c.setcard=="Abnormality" return c.setcard~="Abnormality"
end end
function s.thfilter(c,e,tp) function s.thfilter(c,e,tp)
return c:IsType(TYPE_CONTINUOUS) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and aux.IsCodeListed(c,79250009) return c:IsType(TYPE_CONTINUOUS) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and aux.IsCodeListed(c,79250009)
...@@ -115,7 +115,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -115,7 +115,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
function s.remtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x15c1,1,REASON_COST) end if chk==0 then return Duel.IsCanRemoveCounter(tp,0,LOCATION_ONFIELD,0x15c1,1,REASON_COST) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil,e,tp) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil,e,tp)
local ct=g:GetCount() local ct=g:GetCount()
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ct,0,0)
......
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