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)
local dg=g:Select(tp,5,5,nil)
Duel.HintSelection(dg)
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()
if Duel.Draw(tp,2,REASON_EFFECT)>0
and c:IsRelateToChain()
......
--ハネクリボー・サバティエル LV10
--ハネクリボー・サバティエル LV10
local s,id,o=GetID()
function s.initial_effect(c)
--search
......
......@@ -61,7 +61,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToChain()
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......@@ -75,8 +75,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
end
end
Duel.SpecialSummonComplete()
end
Duel.SpecialSummonComplete()
end
function s.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
......
......@@ -19,7 +19,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
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:SetTarget(s.sctg)
e2:SetOperation(s.scop)
......
......@@ -25,16 +25,16 @@ function s.initial_effect(c)
e2:SetOperation(s.indop)
c:RegisterEffect(e2)
--atk
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.atkcon)
e4:SetTarget(s.atktg)
e4:SetOperation(s.atkop)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.atkcon)
e3:SetTarget(s.atktg)
e3:SetOperation(s.atkop)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
......@@ -92,17 +92,19 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(2500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.bdogcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
c:RegisterFlagEffect(id+o,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
if not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.bdgcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
c:RegisterFlagEffect(id+o,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end
end
end
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
function s.spop(e,tp,eg,ep,ev,re,r,rp)
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)
end
end
......@@ -29,7 +29,7 @@ function s.CreateTempSwapLevelEffect(ec,c1,c2)
c1:RegisterEffect(e1,true)
return e1
end
function s.SetTempSwapLevel(ec,c,reset,callback)
function s.SetTempSwapLevel(ec,c,callback)
local e1=nil
local e2=nil
if ec:IsLevelAbove(1) then
......@@ -38,8 +38,8 @@ function s.SetTempSwapLevel(ec,c,reset,callback)
if c:IsLevelAbove(1) then
e2=s.CreateTempSwapLevelEffect(c,ec,c)
end
local res=callback()
if reset then
local res,resetflag = callback()
if resetflag then
if e1 then e1:Reset() end
if e2 then e2:Reset() end
end
......@@ -47,8 +47,8 @@ function s.SetTempSwapLevel(ec,c,reset,callback)
end
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
return s.SetTempSwapLevel(ec,c,true,function()
return Duel.IsExistingMatchingCard(s.xyzfiltr,tp,LOCATION_EXTRA,0,1,nil,Group.FromCards(c,ec))
return s.SetTempSwapLevel(ec,c,function()
return Duel.IsExistingMatchingCard(s.xyzfiltr,tp,LOCATION_EXTRA,0,1,nil,Group.FromCards(c,ec)), true
end)
end
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)
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.IsFaceup,2,nil) then
s.SetTempSwapLevel(c,tc,false,function()
s.SetTempSwapLevel(c,tc,function()
Duel.AdjustAll()
local xyzg=Duel.GetMatchingGroup(s.xyzfiltr,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g)
return nil, false
end
return nil, true
end)
end
end
......
......@@ -43,10 +43,10 @@ function s.CreateTempLevelEffect(ec,level_source)
ec:RegisterEffect(e1,true)
return e1
end
function s.SetTempLevel(ec,level_source,reset,callback)
function s.SetTempLevel(ec,level_source,callback)
local e1=s.CreateTempLevelEffect(ec,level_source)
local res=callback()
if e1 and reset then e1:Reset() end
local res,resetflag = callback()
if resetflag and e1 then e1:Reset() end
return res
end
function s.xyzlv(e,c,rc)
......@@ -55,8 +55,8 @@ end
function s.xyzfilter(c,tp,mc)
if not c:IsFaceup() or not c:IsLevelAbove(1) then return false end
local mg=Group.FromCards(c,mc)
return s.SetTempLevel(mc,c,true,function()
return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,mg,2,2)
return s.SetTempLevel(mc,c,function()
return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,mg,2,2),true
end)
end
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)
if not tc:IsRelateToChain() or tc:IsFacedown() or not tc:IsControler(tp) then return end
local mg=Group.FromCards(c,tc)
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()
local xyzg=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,mg,2,2)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,mg)
return nil, false
end
return nil, true
end)
end
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