Commit 862a0d23 authored by Huangnan's avatar Huangnan

fix

parent 4c0f6a48
Pipeline #35775 passed with stages
in 38 minutes and 54 seconds
No preview for this file type
...@@ -135,10 +135,12 @@ end ...@@ -135,10 +135,12 @@ end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x3529) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3529) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ss=Duel.GetLocationCount(tp,LOCATION_MZONE) local ss=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,0,LOCATION_MZONE,1,nil) and ss>0 end
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) and ss>0 end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,2,0,0)
Duel.SetChainLimit(s.chlimit) Duel.SetChainLimit(s.chlimit)
end end
...@@ -148,9 +150,9 @@ end ...@@ -148,9 +150,9 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ss=Duel.GetLocationCount(tp,LOCATION_MZONE) local ss=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if ss>3 then ss=2 end if ss>2 then ss=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_MZONE,1,ss,nil) local g=Duel.SelectMatchingCard(tp,s.ctfilter,tp,0,LOCATION_MZONE,1,ss,nil)
if Duel.GetControl(g,tp,0,0)~=ss then if Duel.GetControl(g,tp,0,0)~=ss then
local tg=g:Filter(Card.IsControler,nil,1-tp) local tg=g:Filter(Card.IsControler,nil,1-tp)
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RULE) Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RULE)
......
...@@ -28,7 +28,29 @@ function Gavv.back(c,tcode,tcode2) ...@@ -28,7 +28,29 @@ function Gavv.back(c,tcode,tcode2)
return e3 return e3
end end
function cm.fumfilter(c) function cm.fumfilter(c)
return c:IsSetCard(0x829) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x829) and c:IsFusionType(TYPE_MONSTER)
end
function Gavv.back2(c,tcode,tcode2)
local tc=c
local e3=Effect.CreateEffect(tc)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND+LOCATION_EXTRA)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetCountLimit(1)
e3:SetCondition(function (e,tp,eg,ep,ev,re,r,rp)
return tcode and tc:GetOriginalCode()==tcode2
end)
e3:SetOperation(function (e,tp,eg,ep,ev,re,r,rp)
tc:SetEntityCode(tcode,true)
Duel.ConfirmCards(tp,Group.FromCards(tc))
Duel.ConfirmCards(1-tp,Group.FromCards(tc))
tc:ReplaceEffect(tcode,0,0)
aux.AddFusionProcFunRep(tc,cm.fumfilter,3,true)
tc:EnableReviveLimit()
end)
tc:RegisterEffect(e3)
return e3
end end
function Gavv.check(c,code,id) function Gavv.check(c,code,id)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
......
...@@ -26,18 +26,18 @@ function cm.filter(c,e,tp) ...@@ -26,18 +26,18 @@ function cm.filter(c,e,tp)
return c:IsSetCard(0x341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x341) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,0,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,0,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then local tg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=tg:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -88,7 +88,7 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +88,7 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_REMOVED,0,1,9,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_REMOVED,0,1,9,e,tp)
if Duel.SendtoDeck(g,tp,SEQ_DECKSHUFFLE,REASON_EFFECT) then if Duel.SendtoDeck(g,tp,SEQ_DECKSHUFFLE,REASON_EFFECT) then
local ct=g:FilterCount(s.refilter2,nil) local ct=g:FilterCount(s.refilter2,nil)
if ct//3>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) and Duel.IsPlayerCanDraw(tp,1) then if ct//3>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) and Duel.IsPlayerCanDraw(tp,1) then
Duel.Draw(tp,ct//3,REASON_EFFECT) Duel.Draw(tp,ct//3,REASON_EFFECT)
end end
end end
......
...@@ -126,8 +126,15 @@ end ...@@ -126,8 +126,15 @@ end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)>0 return e:GetHandler():GetFlagEffect(id)>0
end end
function s.checkfilter1(c,tp)
local typ=c:GetType()&0x7
return Duel.IsExistingMatchingCard(s.checkfilter2,tp,LOCATION_GRAVE,0,1,nil,typ)
end
function s.checkfilter2(c,typ)
return c:IsType(typ)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,tp)
local typ=0 local typ=0
local res=Duel.IsPlayerAffectedByEffect(tp,92600250) local res=Duel.IsPlayerAffectedByEffect(tp,92600250)
for tc in aux.Next(g) do for tc in aux.Next(g) do
...@@ -135,7 +142,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -135,7 +142,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
tc=g:GetNext() tc=g:GetNext()
end end
local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,typ) local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,typ)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,typ) local b2=Duel.IsExistingMatchingCard(s.checkfilter1,tp,LOCATION_HAND,0,1,nil,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
...@@ -162,7 +169,7 @@ end ...@@ -162,7 +169,7 @@ end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local typ=e:GetLabel() local typ=e:GetLabel()
local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,typ) local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,typ)
local b2=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,typ) local b2=Duel.IsExistingMatchingCard(s.checkfilter1,tp,LOCATION_HAND,0,1,nil,tp) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,nil)
if b1 and (not b2 or not Duel.SelectYesNo(tp,aux.Stringid(id,4))) then if b1 and (not b2 or not Duel.SelectYesNo(tp,aux.Stringid(id,4))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,typ) local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,typ)
......
...@@ -126,6 +126,13 @@ end ...@@ -126,6 +126,13 @@ end
function s.con(e,tp,eg,ep,ev,re,r,rp) function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)>0 return e:GetHandler():GetFlagEffect(id)>0
end end
function s.checkfilter1(c,tp)
local typ=c:GetType()&0x7
return Duel.IsExistingMatchingCard(s.checkfilter2,tp,LOCATION_GRAVE,0,1,nil,typ)
end
function s.checkfilter2(c,typ)
return c:IsType(typ)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local typ=0 local typ=0
...@@ -135,7 +142,7 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -135,7 +142,7 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
tc=g:GetNext() tc=g:GetNext()
end end
local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,typ) local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,typ)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,typ) local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(s.checkfilter1,tp,LOCATION_HAND,0,1,nil,tp)
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
...@@ -162,7 +169,7 @@ end ...@@ -162,7 +169,7 @@ end
function s.op(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
local typ=e:GetLabel() local typ=e:GetLabel()
local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,typ) local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,typ)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,typ) local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(s.checkfilter1,tp,LOCATION_HAND,0,1,nil,tp)
if b1 and (not b2 or not Duel.SelectYesNo(tp,aux.Stringid(id,4))) then if b1 and (not b2 or not Duel.SelectYesNo(tp,aux.Stringid(id,4))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,typ) local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,typ)
......
...@@ -126,9 +126,9 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -126,9 +126,9 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
if res and c:IsOriginalCodeRule(92600250) and Duel.SelectYesNo(tp,aux.Stringid(92600250,0)) then if res and c:IsOriginalCodeRule(92600250) and Duel.SelectYesNo(tp,aux.Stringid(92600250,0)) then
c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
local b1=g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) local b1=re:GetActiveType()==TYPE_MONSTER
local b2=g:IsExists(Card.IsType,1,nil,TYPE_SPELL) local b2=re:GetActiveType()==TYPE_SPELL
local b3=g:IsExists(Card.IsType,1,nil,TYPE_TRAP) local b3=re:GetActiveType()==TYPE_TRAP
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(92600250,1),1},{b2,aux.Stringid(92600250,2),2},{b3,aux.Stringid(92600250,3),3}) local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(92600250,1),1},{b2,aux.Stringid(92600250,2),2},{b3,aux.Stringid(92600250,3),3})
if op==1 then typ2=1 end if op==1 then typ2=1 end
if op==2 then typ2=2 end if op==2 then typ2=2 end
......
...@@ -96,6 +96,9 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,6 +96,9 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(typ*500) e1:SetValue(typ*500)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2,tp)
elseif b2 then elseif b2 then
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
......
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