Skip to content

Commit 4262bf5

Browse files
authored
Update "Galaxy Tyranno (Anime)"
- Fixed error that was causing Xyz Summon to fail - Minor script clean-up
1 parent 94d2397 commit 4262bf5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

unofficial/c511002848.lua

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--Galaxy Tyranno (Anime)
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--special summon
5+
--When a "Galaxy-Eyes Photon Dragon" you control is targeted for an attack: Treat this card as 2 Xyz Materials, then Xyz Summon 1 Xyz monster using that attacked card and this card from your hand as material only
66
local e1=Effect.CreateEffect(c)
77
e1:SetDescription(aux.Stringid(id,0))
88
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
@@ -43,21 +43,22 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
4343
if not a or not a:IsRelateToEffect(e) or not c:IsRelateToEffect(e) then return end
4444
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,c,a)
4545
if #g>0 then
46+
local mg=Group.FromCards(c,a)
4647
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
4748
local xyz=g:Select(tp,1,1,nil):GetFirst()
4849
local e1=Effect.CreateEffect(c)
4950
e1:SetType(EFFECT_TYPE_SINGLE)
5051
e1:SetCode(EFFECT_DOUBLE_XYZ_MATERIAL)
5152
e1:SetValue(1)
52-
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
53+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
5354
c:RegisterEffect(e1)
5455
local e2=Effect.CreateEffect(c)
5556
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
5657
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
57-
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
58+
e2:SetReset((RESET_EVENT|RESETS_STANDARD)&~RESET_TOFIELD)
5859
e2:SetOperation(s.regop)
5960
xyz:RegisterEffect(e2)
60-
Duel.XyzSummon(tp,xyz,Group.FromCards(c,a),nil,2,2)
61+
Duel.XyzSummon(tp,xyz,mg,mg,2,2)
6162
end
6263
end
6364
function s.regop(e,tp,eg,ep,ev,re,r,rp)
@@ -66,7 +67,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
6667
local e1=Effect.CreateEffect(rc)
6768
e1:SetType(EFFECT_TYPE_SINGLE)
6869
e1:SetCode(EFFECT_DISABLE)
69-
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
70+
e1:SetReset(RESETS_STANDARD_PHASE_END)
7071
c:RegisterEffect(e1,true)
7172
local e2=e1:Clone()
7273
e2:SetCode(EFFECT_DISABLE_EFFECT)
@@ -76,4 +77,4 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
7677
e3:SetValue(1)
7778
c:RegisterEffect(e3,true)
7879
e:Reset()
79-
end
80+
end

0 commit comments

Comments
 (0)