Skip to content

Commit fbeb95d

Browse files
committed
"Gladiator Beast Gyzarus" update
Fixed a bug where it would not be able to use a "Gladiator Beast Bestiari" in the Spell/Trap Zone for its Special Summon
1 parent 0a3857a commit fbeb95d

File tree

1 file changed

+38
-45
lines changed

1 file changed

+38
-45
lines changed

official/c48156348.lua

Lines changed: 38 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,41 @@
22
--Gladiator Beast Gyzarus
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--fusion material
65
c:EnableReviveLimit()
6+
--Fusion Materials: "Gladiator Beast Bestiari" + 1 "Gladiator Beast" monster
77
Fusion.AddProcMix(c,true,true,41470137,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GLADIATOR))
88
Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit)
9-
--destroy
10-
local e3=Effect.CreateEffect(c)
11-
e3:SetDescription(aux.Stringid(id,0))
12-
e3:SetCategory(CATEGORY_DESTROY)
13-
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14-
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
15-
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
16-
e3:SetTarget(s.destg)
17-
e3:SetOperation(s.desop)
18-
c:RegisterEffect(e3)
19-
--special summon
20-
local e4=Effect.CreateEffect(c)
21-
e4:SetDescription(aux.Stringid(id,1))
22-
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
23-
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
24-
e4:SetCode(EVENT_PHASE|PHASE_BATTLE)
25-
e4:SetRange(LOCATION_MZONE)
26-
e4:SetCondition(s.spcon)
27-
e4:SetCost(s.spcost)
28-
e4:SetTarget(s.sptg)
29-
e4:SetOperation(s.spop)
30-
c:RegisterEffect(e4)
9+
--Destroy up to 2 cards on the field
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_DESTROY)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetTarget(s.destg)
17+
e1:SetOperation(s.desop)
18+
c:RegisterEffect(e1)
19+
--Special Summon 2 "Gladiator Beast" monsters from your Deck
20+
local e2=Effect.CreateEffect(c)
21+
e2:SetDescription(aux.Stringid(id,1))
22+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
23+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
24+
e2:SetCode(EVENT_PHASE|PHASE_BATTLE)
25+
e2:SetRange(LOCATION_MZONE)
26+
e2:SetCondition(s.spcon)
27+
e2:SetCost(Cost.SelfToExtra)
28+
e2:SetTarget(s.sptg)
29+
e2:SetOperation(s.spop)
30+
c:RegisterEffect(e2)
3131
end
32+
s.listed_names={41470137} --"Gladiator Beast Bestiari"
3233
s.listed_series={SET_GLADIATOR}
33-
s.listed_names={41470137}
3434
s.material_setcode=SET_GLADIATOR
35+
function s.matfilter(c)
36+
return c:IsAbleToDeckOrExtraAsCost() and (c:IsMonster() or c:IsCode(41470137))
37+
end
3538
function s.contactfil(tp)
36-
return Duel.GetMatchingGroup(function(c) return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() end,tp,LOCATION_ONFIELD,0,nil)
39+
return Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_ONFIELD,0,nil)
3740
end
3841
function s.contactop(g,tp)
3942
Duel.ConfirmCards(1-tp,g)
@@ -59,36 +62,26 @@ end
5962
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
6063
return e:GetHandler():GetBattledGroupCount()>0
6164
end
62-
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
63-
local c=e:GetHandler()
64-
if chk==0 then return c:IsAbleToExtraAsCost() end
65-
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
66-
end
6765
function s.filter(c,e,tp)
6866
return not c:IsCode(41470137) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,120,tp,false,false)
6967
end
7068
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
71-
if chk==0 then
72-
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
73-
if e:GetHandler():GetSequence()<5 then ft=ft+1 end
74-
return ft>1 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
75-
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,2,nil,e,tp)
69+
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>=2
70+
and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
71+
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,2,nil,e,tp)
7672
end
7773
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
7874
end
7975
function s.spop(e,tp,eg,ep,ev,re,r,rp)
8076
if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end
8177
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
82-
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp)
83-
if #g>=2 then
84-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
85-
local sg=g:Select(tp,2,2,nil)
86-
local tc=sg:GetFirst()
87-
Duel.SpecialSummonStep(tc,120,tp,tp,false,false,POS_FACEUP)
88-
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0)
89-
tc=sg:GetNext()
90-
Duel.SpecialSummonStep(tc,120,tp,tp,false,false,POS_FACEUP)
91-
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0)
78+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
79+
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,2,2,nil,e,tp)
80+
if #g==2 then
81+
for tc in g:Iter() do
82+
Duel.SpecialSummonStep(tc,120,tp,tp,false,false,POS_FACEUP)
83+
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0)
84+
end
9285
Duel.SpecialSummonComplete()
9386
end
9487
end

0 commit comments

Comments
 (0)