Skip to content

Commit d47d550

Browse files
committed
"Triamid Loading" fix
- prevent script errors with an undefined group when effect to Special Summon a monster was activated
1 parent 517b75c commit d47d550

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

official/c64576557.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function s.initial_effect(c)
88
e1:SetType(EFFECT_TYPE_ACTIVATE)
99
e1:SetCode(EVENT_FREE_CHAIN)
1010
c:RegisterEffect(e1)
11-
--Search 1 "Triamid" Spell/Trap
11+
--Add 1 "Triamid" Spell/Trap from your Deck to your hand
1212
local e2=Effect.CreateEffect(c)
1313
e2:SetDescription(aux.Stringid(id,0))
1414
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
@@ -41,7 +41,7 @@ end
4141
s.listed_series={SET_TRIAMID}
4242
s.listed_names={id}
4343
function s.thconfilter(c)
44-
return c:IsFaceup() and c:IsLocation(LOCATION_FZONE) and c:IsSpell() and c:IsType(TYPE_FIELD)
44+
return c:IsFaceup() and c:IsLocation(LOCATION_FZONE) and c:IsFieldSpell()
4545
end
4646
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
4747
local c=e:GetHandler()
@@ -58,7 +58,6 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
5858
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
5959
end
6060
function s.thop(e,tp,eg,ep,ev,re,r,rp)
61-
if not e:GetHandler():IsRelateToEffect(e) then return end
6261
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
6362
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
6463
if #g>0 then
@@ -81,10 +80,10 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
8180
end
8281
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
8382
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
84-
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,LOCATION_DECK)
83+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
8584
end
8685
function s.spop(e,tp,eg,ep,ev,re,r,rp)
87-
if not (e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end
86+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
8887
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
8988
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg)
9089
if #g>0 then

0 commit comments

Comments
 (0)