Commit d35841b1 authored by Huangnan's avatar Huangnan

fix

parent f316ebf0
Pipeline #40871 failed with stages
in 8 minutes and 8 seconds
...@@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if dg:GetCount()>0 then if dg:GetCount()>0 then
Duel.ChangePosition(dg,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) Duel.ChangePosition(dg,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end end
...@@ -60,88 +60,55 @@ function s.desfilter(c) ...@@ -60,88 +60,55 @@ function s.desfilter(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5 return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
end end
function s.seqfilter(c,seq,tp) function s.seqfilter(c,seq,tp)
local loc=LOCATION_MZONE
if seq>8 then
loc=LOCATION_SZONE
seq=seq-8
end
if seq>=5 and seq<=7 then return false end
local cseq=c:GetSequence() local cseq=c:GetSequence()
local cloc=c:GetLocation() local cloc=c:GetLocation()
if cloc==LOCATION_SZONE and cseq>=5 then return false end if cloc&LOCATION_SZONE~=0 and cseq>=5 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and loc==LOCATION_MZONE if cloc&LOCATION_MZONE~=0 and cseq>=5 then
and (seq==1 and cseq==5 or seq==3 and cseq==6) then return true end if c:IsControler(tp) then
return cseq==seq and cloc~=loc or cloc==loc and math.abs(cseq-seq)==1 return seq==1 and cseq==6 or seq==3 and cseq==5
end else
function s.desfilter2(c) return seq==1 and cseq==5 or seq==3 and cseq==6
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5 end
end
function s.exmzfilter2(c,seq)
return c:GetSequence()==seq
end
function s.seqfilter2(c,seq,tp)
local loc=LOCATION_MZONE
if seq>=8 then
loc=LOCATION_SZONE
seq=seq-8
end end
if seq>=5 and loc==LOCATION_SZONE then return false end if c:IsControler(tp) then
if seq==7 and loc==LOCATION_MZONE then return false end return false
local cseq=c:GetSequence()
local cloc=c:GetLocation()
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and loc==LOCATION_MZONE
and (seq==1 and cseq==5 or seq==3 and cseq==6) then return true end
if cloc==LOCATION_MZONE and seq>=5 and loc==LOCATION_MZONE
and Duel.IsExistingMatchingCard(s.exmzfilter2,tp,0,LOCATION_MZONE,1,nil,seq) then
return seq==5 and cseq==1 or seq==6 and cseq==3
end end
return cseq==seq and cloc~=loc or seq<5 and cseq<5 and cloc==loc and math.abs(cseq-seq)==1 if cloc&LOCATION_MZONE~=0 then
return cseq==seq or seq<5 and cseq<5 and math.abs(cseq-seq)==1
else
return cseq==seq
end
return false
end end
function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil) or Duel.IsExistingMatchingCard(s.desfilter2,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end end
function s.seqop(e,tp,eg,ep,ev,re,r,rp) function s.seqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then local filter=0
local filter=0 for i=0,6 do
for i=0,6 do if not Duel.IsExistingMatchingCard(s.seqfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,nil,i,tp) then
if not Duel.IsExistingMatchingCard(s.seqfilter,tp,0,LOCATION_ONFIELD,1,nil,i,tp) then filter=filter|1<<(i+16)
filter=filter|1<<(i+16)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ZONE)
local flag=Duel.SelectField(tp,1,0,LOCATION_ONFIELD,filter)
Duel.Hint(HINT_ZONE,tp,flag)
local seq=math.log(flag>>16,2)
local g=Duel.GetMatchingGroup(s.seqfilter,tp,0,LOCATION_ONFIELD,nil,seq,tp)
Duel.Destroy(g,REASON_EFFECT)
else
local filter=0
for i=0,15 do
if not Duel.IsExistingMatchingCard(s.seqfilter2,tp,LOCATION_ONFIELD,0,1,nil,i,tp) then
filter=filter|1<<(i)
end
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ZONE)
local flag=Duel.SelectField(tp,1,LOCATION_ONFIELD,0,filter)
Duel.Hint(HINT_ZONE,tp,flag)
local seq=math.log(flag,2)
local g=Duel.GetMatchingGroup(s.seqfilter2,tp,LOCATION_ONFIELD,0,nil,seq,tp)
Duel.Destroy(g,REASON_EFFECT)
end end
if Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local flag=Duel.SelectField(tp,1,LOCATION_ONFIELD,LOCATION_ONFIELD,filter)
local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.Hint(HINT_ZONE,tp,flag)
if dg:GetCount()>0 then local seq=math.log(flag>>16,2)
Duel.ChangePosition(dg,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) local g=Duel.GetMatchingGroup(s.seqfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,seq,tp)
end Duel.Destroy(g,REASON_EFFECT)
if Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if dg:GetCount()>0 then
Duel.ChangePosition(dg,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end end
end
end end
-- --
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsSetCard(0x52a3) and ((c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 ) or (c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) return c:IsSetCard(0x52a3) and (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 ) or (c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
......
...@@ -75,19 +75,39 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,19 +75,39 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function s.filter2(c) function s.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return c:IsFaceup() and c:IsAbleToDeck() if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
end if chk==0 then return Duel.IsExistingTarget(Card.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local tg=Duel.SelectTarget(tp,Card.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0)
end end
function s.reop(e,tp,eg,ep,ev,re,r,rp) function s.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)) local tc=Duel.GetFirstTarget()
if g:GetCount()>0 then if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.HintSelection(g) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end end
end end
\ No newline at end of file
...@@ -3,7 +3,7 @@ function c50225005.initial_effect(c) ...@@ -3,7 +3,7 @@ function c50225005.initial_effect(c)
aux.EnablePendulumAttribute(c,false) aux.EnablePendulumAttribute(c,false)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode3(c,50218101,50218102,50218103,true,true) aux.AddFusionProcCode3(c,50218101,50218102,50218103,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,aux.ContactFusionSendToDeck(c)) aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL)
--spsummon condition --spsummon condition
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -3,7 +3,7 @@ function c50225010.initial_effect(c) ...@@ -3,7 +3,7 @@ function c50225010.initial_effect(c)
aux.EnablePendulumAttribute(c,false) aux.EnablePendulumAttribute(c,false)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode3(c,50218104,50218105,50218106,true,true) aux.AddFusionProcCode3(c,50218104,50218105,50218106,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,aux.ContactFusionSendToDeck(c)) aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL)
--spsummon condition --spsummon condition
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -19,7 +19,7 @@ function s.initial_effect(c) ...@@ -19,7 +19,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FLIP)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
......
...@@ -18,7 +18,7 @@ function s.initial_effect(c) ...@@ -18,7 +18,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FLIP)
e2:SetCode(EVENT_FLIP) e2:SetCode(EVENT_FLIP)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
......
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