Skip to content

Commit 222969c

Browse files
authored
Update "Shining Hope Road (Manga)"
Duel.XyzSummon function call was breaking script/removed undefined constant.
1 parent 33d4b54 commit 222969c

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

unofficial/c511600071.lua

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ function s.initial_effect(c)
1313
e1:SetOperation(s.activate)
1414
c:RegisterEffect(e1)
1515
end
16-
s.listed_series={SET_NUMBER,SET_NUMBER_S}
17-
function s.filter(c,e)
16+
s.listed_series={SET_NUMBER,0x2048} --"Number S"
17+
function s.matfilter(c,e)
1818
return c:IsSetCard(SET_NUMBER) and c:IsCanBeEffectTarget(e)
1919
end
2020
function s.rescon(sg,e,tp,g)
@@ -23,13 +23,13 @@ end
2323
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
2424
if chkc then return false end
2525
local c=e:GetHandler()
26-
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE,0,nil,e)
27-
local notSg=mg:Filter(aux.NOT(Card.IsSetCard),nil,SET_NUMBER_S)
26+
local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_GRAVE,0,nil,e)
27+
local notSg=mg:Filter(aux.NOT(Card.IsSetCard),nil,0x2048)
2828
for _c in notSg:Iter() do
2929
local e1=Effect.CreateEffect(c)
3030
e1:SetType(EFFECT_TYPE_SINGLE)
3131
e1:SetCode(EFFECT_ADD_SETCODE)
32-
e1:SetValue(SET_NUMBER_S)
32+
e1:SetValue(0x2048)
3333
_c:RegisterEffect(e1,true)
3434
_c:AssumeProperty(ASSUME_RANK,_c:GetRank()+1)
3535
end
@@ -48,20 +48,22 @@ end
4848
function s.activate(e,tp,eg,ep,ev,re,r,rp)
4949
local mg=Duel.GetTargetCards(e)
5050
local c=e:GetHandler()
51-
local notSg=mg:Filter(aux.NOT(Card.IsSetCard),nil,SET_NUMBER_S)
52-
for _c in aux.Next(notSg) do
51+
local notSg=mg:Filter(aux.NOT(Card.IsSetCard),nil,0x2048)
52+
for _c in notSg:Iter() do
5353
local e1=Effect.CreateEffect(c)
5454
e1:SetType(EFFECT_TYPE_SINGLE)
5555
e1:SetCode(EFFECT_ADD_SETCODE)
56-
e1:SetValue(SET_NUMBER_S)
56+
e1:SetValue(0x2048)
5757
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
5858
_c:RegisterEffect(e1,true)
5959
_c:AssumeProperty(ASSUME_RANK,_c:GetRank()+1)
6060
end
6161
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
6262
local xyz=Duel.SelectMatchingCard(tp,Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,mg,#mg,#mg):GetFirst()
63-
if xyz then
64-
Duel.XyzSummon(tp,xyz,mg,nil,#mg,#mg)
63+
if xyz and #mg>0 and mg:Includes(notSg) then
64+
xyz:SetMaterial(mg)
65+
Duel.Overlay(xyz,mg)
66+
Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP)
6567
notSg:KeepAlive()
6668
notSg:ForEach(function(_c) _c:Level((_c:Level()+1)) end)
6769
local e1=Effect.CreateEffect(c)
@@ -74,7 +76,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
7476
e:Reset()
7577
end)
7678
xyz:RegisterEffect(e1,true)
79+
xyz:CompleteProcedure()
7780
else
7881
notSg:ForEach(function(_c) _c:ResetEffect(id,RESET_CARD) end)
7982
end
80-
end
83+
end

0 commit comments

Comments
 (0)