Commit 9130e766 authored by Huangnan's avatar Huangnan

fix

parent b4fc00be
Pipeline #30117 passed with stages
in 31 minutes and 28 seconds
......@@ -45,6 +45,6 @@ function s.clop(e,tp,eg,ep,ev,re,r,rp)
ex1:SetTargetRange(1,0)
ex1:SetValue(1)
ex1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(ex1,true,tp)
Duel.RegisterEffect(ex1,tp)
return ex1
end
\ No newline at end of file
......@@ -80,7 +80,7 @@ function s.tdop3(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function s.drfilter(c)
return c:IsSetCard(0xce3) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
return c:IsSetCard(0xce4) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.drfilter(chkc) end
......
......@@ -42,7 +42,7 @@ end
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xc342)
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
......@@ -53,12 +53,12 @@ function cm.hspfilter2(c,tp,sc,tc)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,1,1,nil,tp,c)
local g1=Duel.SelectReleaseGroup(tp,cm.hspfilter,1,1,nil,tp,c)
local tc1=g1:GetFirst()
local g2=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter2,1,1,tc1,tp,c,tc1)
local g2=Duel.SelectReleaseGroup(tp,cm.hspfilter2,1,1,tc1,tp,c,tc1)
g2:Merge(g1)
c:SetMaterial(g2)
Duel.Release(g2,REASON_COST)
......
......@@ -54,7 +54,7 @@ end
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xc342)
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
......@@ -65,12 +65,12 @@ function cm.hspfilter2(c,tp,sc,tc)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,1,1,nil,tp,c)
local g1=Duel.SelectReleaseGroup(tp,cm.hspfilter,1,1,nil,tp,c)
local tc1=g1:GetFirst()
local g2=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter2,1,1,tc1,tp,c,tc1)
local g2=Duel.SelectReleaseGroup(tp,cm.hspfilter2,1,1,tc1,tp,c,tc1)
g2:Merge(g1)
c:SetMaterial(g2)
Duel.Release(g2,REASON_COST)
......
......@@ -54,7 +54,7 @@ function s.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
--
function s.Eqop1(e,tp,eg,ep,ev,re,r,rp)
function s.getop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2),aux.Stringid(id,3),aux.Stringid(id,4),aux.Stringid(id,5))+1
if op==1 then
......
......@@ -5,6 +5,7 @@ function s.initial_effect(c)
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
--set
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
......@@ -50,12 +51,12 @@ function s.setfilter(c)
return c:IsSetCard(0xa344,0xc342) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
local tc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil):GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -107,8 +108,7 @@ end
--
function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.efconf(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.efconf,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end
if chk==0 then return Duel.IsExistingTarget(s.efconf,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.efconf,tp,LOCATION_MZONE,0,1,1,nil)
end
......@@ -120,9 +120,9 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
local ss=Duel.SelectOption(tp,aux.Stringid(id,4),aux.Stringid(id,5),aux.Stringid(id,6),aux.Stringid(id,7),aux.Stringid(id,8))
if ss==0 then
if ss==0 then
--battle indestructable
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
......@@ -131,12 +131,12 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp)
--reflect battle damage
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(id,4))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e3:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e3)
end
if ss==1 then
if ss==1 then
--cannot be target/effect indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......@@ -145,15 +145,15 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e2)
sc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(id,5))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.tgoval)
sc:RegisterEffect(e3)
end
if ss==2 then
if ss==2 then
--cannot tribute
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
......@@ -168,16 +168,15 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp)
sc:RegisterEffect(e5)
--cannot remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,6))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetDescription(aux.Stringid(id,6))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e1)
end
if ss==3 then
if ss==3 then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,7))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
......@@ -187,7 +186,7 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3)
end
if ss==4 then
if ss==4 then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,8))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
......
......@@ -48,7 +48,7 @@ c:EnableReviveLimit()
c:RegisterEffect(e7)
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x6344)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xa344)
end
--
function s.indct(e,re,r,rp)
......@@ -75,7 +75,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.acfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
if Duel.IsExistingMatchingCard(s.acfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
......@@ -156,7 +156,7 @@ local c=e:GetHandler()
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
tc:CompleteProcedure()
end
end
......
......@@ -30,7 +30,7 @@ c:SetUniqueOnField(1,0,id)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_FZONE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.drtg2)
e3:SetOperation(s.drop2)
......@@ -254,13 +254,13 @@ function s.atkval(e,c)
return val
end
--TOKEN2
function s.cfilter(c)
function s.cfilter3(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER)
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
local ex,g,gc,dp,dv=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
return (Duel.IsChainNegatable(ev) and rp==1-tp
and (ex and (dv&LOCATION_GRAVE==LOCATION_GRAVE or g and g:IsExists(s.cfilter,1,nil)) or re:IsHasCategory(CATEGORY_GRAVE_SPSUMMON)))
and (ex and (dv&LOCATION_GRAVE==LOCATION_GRAVE or g and g:IsExists(s.cfilter3,1,nil)) or re:IsHasCategory(CATEGORY_GRAVE_SPSUMMON)))
or (not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:GetActivateLocation()==LOCATION_GRAVE and Duel.IsChainNegatable(ev))
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -298,7 +298,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_DECK,0,1,1,nil,ss)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
end
end
......@@ -320,7 +320,7 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_DECK,0,1,1,nil,ss)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
end
end
......
......@@ -56,12 +56,12 @@ function cm.coop(e,tp,eg,ep,ev,re,r,rp)
if coin~=res then
local t1=Duel.IsPlayerCanDraw(tp)
local op=0
local m={}
local m_tab={}
local n={}
local ct=1
if t1 then m[ct]=aux.Stringid(m,1) n[ct]=1 ct=ct+1 end
m[ct]=aux.Stringid(m,2) n[ct]=2 ct=ct+1
local sp=Duel.SelectOption(tp,table.unpack(m))
if t1 then m_tab[ct]=aux.Stringid(m,1) n[ct]=1 ct=ct+1 end
m_tab[ct]=aux.Stringid(m,2) n[ct]=2 ct=ct+1
local sp=Duel.SelectOption(tp,table.unpack(m_tab))
op=n[sp+1]
Duel.BreakEffect()
if op==1 then
......@@ -72,8 +72,7 @@ function cm.coop(e,tp,eg,ep,ev,re,r,rp)
else
c:RegisterFlagEffect(c,m,RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
if tp:GetFlagEffect()<=0 then
Duel.RegisterFlagEffect(c,m,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(tp,m)<=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......@@ -82,6 +81,7 @@ function cm.coop(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(cm.desop)
Duel.RegisterEffect(e1,tp)
end
Duel.RegisterFlagEffect(c,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if cm[tp]>=3 then
......
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