Commit 77150787 authored by Huangnan's avatar Huangnan

fix

parent 2ad7999a
Pipeline #40912 failed with stages
in 14 minutes and 26 seconds
......@@ -34,7 +34,7 @@ function s.initial_effect(c)
c:RegisterEffect(e5)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x32a3) 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(0x32a3) 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
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
......
......@@ -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)
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)
local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
if dg:GetCount()>0 then
Duel.ChangePosition(dg,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
......@@ -60,55 +60,92 @@ function s.desfilter(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
end
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 cloc=c:GetLocation()
if cloc&LOCATION_SZONE~=0 and cseq>=5 then return false end
if cloc&LOCATION_MZONE~=0 and cseq>=5 then
if c:IsControler(tp) then
return seq==1 and cseq==6 or seq==3 and cseq==5
else
return seq==1 and cseq==5 or seq==3 and cseq==6
end
end
if c:IsControler(tp) then
return false
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
return cseq==seq and cloc~=loc or cloc==loc and math.abs(cseq-seq)==1
end
function s.desfilter2(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
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
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
if seq>=5 and loc==LOCATION_SZONE then return false end
if seq==7 and loc==LOCATION_MZONE then return false end
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
return false
return cseq==seq and cloc~=loc or seq<5 and cseq<5 and cloc==loc and math.abs(cseq-seq)==1
end
function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
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
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end
function s.seqop(e,tp,eg,ep,ev,re,r,rp)
local filter=0
for i=0,6 do
if not Duel.IsExistingMatchingCard(s.seqfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,nil,i,tp) then
filter=filter|1<<(i+16)
if Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local filter=0
for i=0,6 do
if not Duel.IsExistingMatchingCard(s.seqfilter,tp,0,LOCATION_ONFIELD,1,nil,i,tp) then
filter=filter|1<<(i+16)
end
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local flag=Duel.SelectField(tp,1,LOCATION_ONFIELD,LOCATION_ONFIELD,filter)
Duel.Hint(HINT_ZONE,tp,flag)
local seq=math.log(flag>>16,2)
local g=Duel.GetMatchingGroup(s.seqfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,seq,tp)
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)
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)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
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
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)
if g:GetCount()>0 then
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_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
--
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
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
......
......@@ -31,7 +31,7 @@ function c23100107.initial_effect(c)
e4:SetDescription(aux.Stringid(23100107,2))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE+LOCATION_HAND+LOCATION_GRAVE)
e4:SetCountLimit(1,69522668)
e4:SetCountLimit(1,23100107)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c23100107.settg)
e4:SetOperation(c23100107.setop)
......
......@@ -71,7 +71,7 @@ function c50213220.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c50213220.thfilter(c)
return c:IsSetCard(0xcbf) and not c:IsCode(50213220) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
return c:IsSetCard(0xcbf) and not c:IsCode(50213220) and c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c50213220.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213220.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -50,7 +50,7 @@ function c50221215.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c50221215.adcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and aux.nzatk(Duel.GetAttacker())
return Duel.GetAttacker():IsControler(1-tp)
end
function c50221215.adop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -52,7 +52,7 @@ function c50224115.initial_effect(c)
c:RegisterEffect(e3)
end
function c50224115.mfilter(c)
return c:IsAbleToDeckAsCost() and c:IsCode(50223105,50223110)
return c:IsAbleToRemoveAsCost() and c:IsCode(50223105,50223110)
end
function c50224115.fselect(g,c,tp)
return Duel.GetMZoneCount(tp,g)>0 and g:GetClassCount(Card.GetCode)==2
......
......@@ -20,6 +20,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id+1+EFFECT_COUNT_CODE_OATH)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetTarget(s.target)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
......@@ -103,24 +104,27 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
-- 效果②处理
function s.thfilter(c,tc)
return c.setcard=="Abnormality" and c:IsLevelBelow(tc:GetLevel())
function s.thfilter1(c)
return c.setcard=="Abnormality" and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_TUNER)
end
function s.thfilter2(c)
return c.setcard=="Abnormality" and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TUNER)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_RITUAL) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_RITUAL) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_RITUAL) and Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_RITUAL)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
-- 回收异想体
local lv=tc:GetLevel()
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE,0,tc,tc)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE,0,nil)
local adjust=g:Filter(Card.IsType,tc,TYPE_TUNER)
local nonadjust=g:Filter(Card.IsType,tc,TYPE_MONSTER):Filter(aux.NOT(Card.IsType),tc,TYPE_TUNER)
if adjust:GetCount()>0 and nonadjust:GetCount()>0 then
......@@ -149,5 +153,5 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c.setcard=="Abnormality" and ( c:IsLocation(LOCATION_HAND) and c:IsLocation(LOCATION_GRAVE))
return not c.setcard=="Abnormality" and (c:IsLocation(LOCATION_HAND) and c:IsLocation(LOCATION_GRAVE))
end
......@@ -31,7 +31,7 @@ end
function s.cos1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.GetMatchingGroup(s.cos1f,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetCode)<2 then return end
local g = Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local g = Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,e:GetHandler())
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local c = g:Select(tp,1,1,nil):GetFirst()
......
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