Commit 4b2a5da4 authored by wind2009's avatar wind2009

Fix

parent b8356b35
Pipeline #43485 passed with stages
in 3 minutes and 15 seconds
...@@ -51,7 +51,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local dg=g:Select(tp,5,5,nil) local dg=g:Select(tp,5,5,nil)
Duel.HintSelection(dg) Duel.HintSelection(dg)
if Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 if Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
and dg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then and dg:IsExists(Card.IsLocation,5,nil,LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect() Duel.BreakEffect()
if Duel.Draw(tp,2,REASON_EFFECT)>0 if Duel.Draw(tp,2,REASON_EFFECT)>0
and c:IsRelateToChain() and c:IsRelateToChain()
......
--ハネクリボー・サバティエル LV10 --ハネクリボー・サバティエル LV10
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--search --search
......
...@@ -75,8 +75,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,8 +75,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end
end end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA) return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
......
...@@ -19,7 +19,7 @@ function s.initial_effect(c) ...@@ -19,7 +19,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_END_PHASE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sctg) e2:SetTarget(s.sctg)
e2:SetOperation(s.scop) e2:SetOperation(s.scop)
......
...@@ -25,16 +25,16 @@ function s.initial_effect(c) ...@@ -25,16 +25,16 @@ function s.initial_effect(c)
e2:SetOperation(s.indop) e2:SetOperation(s.indop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk --atk
local e4=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e4:SetCondition(s.atkcon) e3:SetCondition(s.atkcon)
e4:SetTarget(s.atktg) e3:SetTarget(s.atktg)
e4:SetOperation(s.atkop) e3:SetOperation(s.atkop)
c:RegisterEffect(e4) c:RegisterEffect(e3)
if not s.global_check then if not s.global_check then
s.global_check=true s.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
...@@ -92,18 +92,20 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,18 +92,20 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(2500) e1:SetValue(2500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2)) e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.bdogcon) e2:SetCondition(aux.bdgcon)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
c:RegisterFlagEffect(id+o,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) c:RegisterFlagEffect(id+o,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end end
end
end 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 bc=e:GetHandler():GetBattleTarget() local bc=e:GetHandler():GetBattleTarget()
...@@ -117,7 +119,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -117,7 +119,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then if tc:IsRelateToChain() and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -29,7 +29,7 @@ function s.CreateTempSwapLevelEffect(ec,c1,c2) ...@@ -29,7 +29,7 @@ function s.CreateTempSwapLevelEffect(ec,c1,c2)
c1:RegisterEffect(e1,true) c1:RegisterEffect(e1,true)
return e1 return e1
end end
function s.SetTempSwapLevel(ec,c,reset,callback) function s.SetTempSwapLevel(ec,c,callback)
local e1=nil local e1=nil
local e2=nil local e2=nil
if ec:IsLevelAbove(1) then if ec:IsLevelAbove(1) then
...@@ -38,8 +38,8 @@ function s.SetTempSwapLevel(ec,c,reset,callback) ...@@ -38,8 +38,8 @@ function s.SetTempSwapLevel(ec,c,reset,callback)
if c:IsLevelAbove(1) then if c:IsLevelAbove(1) then
e2=s.CreateTempSwapLevelEffect(c,ec,c) e2=s.CreateTempSwapLevelEffect(c,ec,c)
end end
local res=callback() local res,resetflag = callback()
if reset then if resetflag then
if e1 then e1:Reset() end if e1 then e1:Reset() end
if e2 then e2:Reset() end if e2 then e2:Reset() end
end end
...@@ -47,8 +47,8 @@ function s.SetTempSwapLevel(ec,c,reset,callback) ...@@ -47,8 +47,8 @@ function s.SetTempSwapLevel(ec,c,reset,callback)
end end
function s.spfilter(c,e,tp,ec) function s.spfilter(c,e,tp,ec)
if not (not c:IsCode(id) and c:IsSetCard(0x8f,0x54,0x59,0x82) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end if not (not c:IsCode(id) and c:IsSetCard(0x8f,0x54,0x59,0x82) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end
return s.SetTempSwapLevel(ec,c,true,function() return s.SetTempSwapLevel(ec,c,function()
return Duel.IsExistingMatchingCard(s.xyzfiltr,tp,LOCATION_EXTRA,0,1,nil,Group.FromCards(c,ec)) return Duel.IsExistingMatchingCard(s.xyzfiltr,tp,LOCATION_EXTRA,0,1,nil,Group.FromCards(c,ec)), true
end) end)
end 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)
...@@ -73,14 +73,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,14 +73,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2 if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2
and g:IsExists(Card.IsLocation,2,nil,LOCATION_MZONE) and g:IsExists(Card.IsLocation,2,nil,LOCATION_MZONE)
and g:IsExists(Card.IsFaceup,2,nil) then and g:IsExists(Card.IsFaceup,2,nil) then
s.SetTempSwapLevel(c,tc,false,function() s.SetTempSwapLevel(c,tc,function()
Duel.AdjustAll() Duel.AdjustAll()
local xyzg=Duel.GetMatchingGroup(s.xyzfiltr,tp,LOCATION_EXTRA,0,nil,g) local xyzg=Duel.GetMatchingGroup(s.xyzfiltr,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst() local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g) Duel.XyzSummon(tp,xyz,g)
return nil, false
end end
return nil, true
end) end)
end end
end end
......
...@@ -43,10 +43,10 @@ function s.CreateTempLevelEffect(ec,level_source) ...@@ -43,10 +43,10 @@ function s.CreateTempLevelEffect(ec,level_source)
ec:RegisterEffect(e1,true) ec:RegisterEffect(e1,true)
return e1 return e1
end end
function s.SetTempLevel(ec,level_source,reset,callback) function s.SetTempLevel(ec,level_source,callback)
local e1=s.CreateTempLevelEffect(ec,level_source) local e1=s.CreateTempLevelEffect(ec,level_source)
local res=callback() local res,resetflag = callback()
if e1 and reset then e1:Reset() end if resetflag and e1 then e1:Reset() end
return res return res
end end
function s.xyzlv(e,c,rc) function s.xyzlv(e,c,rc)
...@@ -55,8 +55,8 @@ end ...@@ -55,8 +55,8 @@ end
function s.xyzfilter(c,tp,mc) function s.xyzfilter(c,tp,mc)
if not c:IsFaceup() or not c:IsLevelAbove(1) then return false end if not c:IsFaceup() or not c:IsLevelAbove(1) then return false end
local mg=Group.FromCards(c,mc) local mg=Group.FromCards(c,mc)
return s.SetTempLevel(mc,c,true,function() return s.SetTempLevel(mc,c,function()
return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,mg,2,2) return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,mg,2,2),true
end) end)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -77,14 +77,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,14 +77,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToChain() or tc:IsFacedown() or not tc:IsControler(tp) then return end if not tc:IsRelateToChain() or tc:IsFacedown() or not tc:IsControler(tp) then return end
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
s.SetTempLevel(c,tc,false,function() s.SetTempLevel(c,tc,function()
Duel.AdjustAll() Duel.AdjustAll()
local xyzg=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,mg,2,2) local xyzg=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,mg,2,2)
if xyzg:GetCount()>0 then if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst() local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,mg) Duel.XyzSummon(tp,xyz,mg)
return nil, false
end end
return nil, true
end) end)
end end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp) function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
......
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