Skip to content

Commit 4df928a

Browse files
authored
Fix "Revelation of Hope (Manga)"
Mislabeled parameter correction
1 parent a475c43 commit 4df928a

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

unofficial/c511001631.lua

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
--希望の天啓
2-
--Revelation of Hope
1+
--希望の天啓 (Manga)
2+
--Revelation of Hope (Manga)
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--spsummon
5+
--Special Summon 1 Dragon Xyz Monster from your Extra Deck by sending 1 non-Xyz Dragon monster from your field to your GY
66
local e1=Effect.CreateEffect(c)
77
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
88
e1:SetType(EFFECT_TYPE_ACTIVATE)
99
e1:SetCode(EVENT_FREE_CHAIN)
10-
e1:SetCost(s.cost)
11-
e1:SetTarget(s.tg)
12-
e1:SetOperation(s.op)
10+
e1:SetCost(s.spcost)
11+
e1:SetTarget(s.sptg)
12+
e1:SetOperation(s.spop)
1313
c:RegisterEffect(e1)
1414
end
15-
function s.cfilter(c,e,tp)
16-
return c:IsRace(RACE_DRAGON) and not c:IsType(TYPE_XYZ) and c:GetLevel()>0 and c:IsAbleToGraveAsCost()
17-
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),tc)
15+
function s.tgfilter(c,e,tp)
16+
return c:IsRace(RACE_DRAGON) and not c:IsType(TYPE_XYZ) and c:HasLevel() and c:IsAbleToGraveAsCost()
17+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),e,tp,c)
1818
end
19-
function s.spfilter(c,e,tp,lv,tc)
20-
return c:IsRank(lv) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
21-
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
19+
function s.spfilter(c,lv,e,tp,tc)
20+
return c:IsRank(lv) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
21+
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
2222
end
23-
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
23+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
2424
e:SetLabel(1)
2525
if chk==0 then return true end
2626
end
27-
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
27+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
2828
if chk==0 then
2929
if e:GetLabel()~=1 then return false end
3030
e:SetLabel(0)
3131
local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_XYZ)
32-
return #pg<=0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
32+
return #pg<=0 and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
3333
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
34-
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
34+
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
3535
Duel.SetTargetParam(g:GetFirst():GetLevel())
3636
Duel.SendtoGrave(g,REASON_COST)
3737
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
3838
end
39-
function s.op(e,tp,eg,ep,ev,re,r,rp)
39+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
4040
local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_XYZ)
4141
if #pg>0 then return end
4242
local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
4343
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
44-
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst()
44+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp):GetFirst()
4545
if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then
4646
sc:CompleteProcedure()
4747
end
48-
end
48+
end

0 commit comments

Comments
 (0)