Skip to content

Commit bfff809

Browse files
authored
Added new card scripts
1 parent a293824 commit bfff809

File tree

9 files changed

+863
-0
lines changed

9 files changed

+863
-0
lines changed

pre-release/c101301001.lua

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
--ズバババナイト
2+
--Zubababa Knight
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate 1 of these effects
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
10+
e1:SetProperty(EFFECT_FLAG_DELAY)
11+
e1:SetCode(EVENT_SUMMON_SUCCESS)
12+
e1:SetCountLimit(1,id)
13+
e1:SetTarget(s.efftg)
14+
e1:SetOperation(s.effop)
15+
c:RegisterEffect(e1)
16+
local e2=e1:Clone()
17+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
18+
c:RegisterEffect(e2)
19+
--Add 1 "Gagaga" monster from your Deck to your hand
20+
local e3=Effect.CreateEffect(c)
21+
e3:SetDescription(aux.Stringid(id,1))
22+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
23+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
24+
e3:SetProperty(EFFECT_FLAG_DELAY)
25+
e3:SetCode(EVENT_TO_GRAVE)
26+
e3:SetCountLimit(1,{id,1})
27+
e3:SetCondition(s.gathcon)
28+
e3:SetTarget(s.gathtg)
29+
e3:SetOperation(s.gathop)
30+
c:RegisterEffect(e3)
31+
local e4=e3:Clone()
32+
e4:SetCode(EVENT_REMOVE)
33+
c:RegisterEffect(e4)
34+
end
35+
s.listed_series={SET_ZUBABA,SET_GAGAGA}
36+
s.listed_names={id}
37+
function s.zbthfilter(c)
38+
return c:IsSetCard(SET_ZUBABA) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id)
39+
end
40+
function s.desfilter(c)
41+
return c:IsLevelBelow(4) and c:IsDefensePos() and c:IsFaceup()
42+
end
43+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
44+
local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil)
45+
local b1=Duel.IsExistingMatchingCard(s.zbthfilter,tp,LOCATION_DECK,0,1,nil)
46+
local b2=#g>0
47+
if chk==0 then return b1 or b2 end
48+
local op=Duel.SelectEffect(tp,
49+
{b1,aux.Stringid(id,2)},
50+
{b2,aux.Stringid(id,3)})
51+
e:SetLabel(op)
52+
if op==1 then
53+
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_LVCHANGE)
54+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
55+
elseif op==2 then
56+
e:SetCategory(CATEGORY_DESTROY)
57+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
58+
end
59+
end
60+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
61+
local op=e:GetLabel()
62+
if op==1 then
63+
--Add 1 "Zubaba" monster from your Deck to your hand, except "Zubababa Knight", and if you do, this card's Level becomes that added monster's
64+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
65+
local sc=Duel.SelectMatchingCard(tp,s.zbthfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
66+
if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then
67+
Duel.ConfirmCards(1-tp,sc)
68+
local lv=sc:GetLevel()
69+
local c=e:GetHandler()
70+
if c:IsRelateToEffect(e) and c:IsFaceup() and not c:IsLevel(lv) then
71+
--This card's Level becomes the added monster's
72+
local e1=Effect.CreateEffect(c)
73+
e1:SetType(EFFECT_TYPE_SINGLE)
74+
e1:SetCode(EFFECT_CHANGE_LEVEL)
75+
e1:SetValue(lv)
76+
e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE)
77+
c:RegisterEffect(e1)
78+
end
79+
end
80+
elseif op==2 then
81+
--Destroy 1 Level 4 or lower Defense Position monster your opponent controls
82+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
83+
local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
84+
if #g>0 then
85+
Duel.HintSelection(g)
86+
Duel.Destroy(g,REASON_EFFECT)
87+
end
88+
end
89+
end
90+
function s.gathcon(e,tp,eg,ep,ev,re,r,rp)
91+
local c=e:GetHandler()
92+
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY)
93+
end
94+
function s.gathfilter(c)
95+
return c:IsSetCard(SET_GAGAGA) and c:IsMonster() and c:IsAbleToHand()
96+
end
97+
function s.gathtg(e,tp,eg,ep,ev,re,r,rp,chk)
98+
if chk==0 then return Duel.IsExistingMatchingCard(s.gathfilter,tp,LOCATION_DECK,0,1,nil) end
99+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
100+
end
101+
function s.gathop(e,tp,eg,ep,ev,re,r,rp)
102+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
103+
local g=Duel.SelectMatchingCard(tp,s.gathfilter,tp,LOCATION_DECK,0,1,1,nil)
104+
if #g>0 then
105+
Duel.SendtoHand(g,nil,REASON_EFFECT)
106+
Duel.ConfirmCards(1-tp,g)
107+
end
108+
end

pre-release/c101301002.lua

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
--ガガガガンバラナイト
2+
--Gagaga Ganbara Knight
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCost(s.spcost)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--Add 1 "Gogogo" monster from your Deck to your hand
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
21+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetProperty(EFFECT_FLAG_DELAY)
23+
e2:SetCode(EVENT_TO_GRAVE)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetCondition(s.thcon)
26+
e2:SetTarget(s.thtg)
27+
e2:SetOperation(s.thop)
28+
c:RegisterEffect(e2)
29+
local e3=e2:Clone()
30+
e3:SetCode(EVENT_REMOVE)
31+
c:RegisterEffect(e3)
32+
end
33+
s.listed_series={SET_GAGAGA,SET_GOGOGO}
34+
function s.spcostfilter(c)
35+
return c:IsSetCard(SET_GAGAGA) and not c:IsPublic()
36+
end
37+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
38+
if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_EXTRA,0,1,nil) end
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
40+
local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_EXTRA,0,1,1,nil)
41+
Duel.ConfirmCards(1-tp,g)
42+
Duel.ShuffleExtra(tp)
43+
end
44+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
45+
local c=e:GetHandler()
46+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
47+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
48+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
49+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
50+
Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE)
51+
end
52+
function s.gaspfilter(c,e,tp)
53+
return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
54+
end
55+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
56+
local c=e:GetHandler()
57+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
58+
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
59+
and Duel.IsExistingMatchingCard(s.gaspfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
60+
local b2=Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
61+
if not ((b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(id,2))) then return end
62+
local op=Duel.SelectEffect(tp,
63+
{b1,aux.Stringid(id,3)},
64+
{b2,aux.Stringid(id,4)})
65+
if op==1 then
66+
--Special Summon 1 "Gagaga" monster from your hand
67+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
68+
local g=Duel.SelectMatchingCard(tp,s.gaspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
69+
if #g>0 then
70+
Duel.BreakEffect()
71+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
72+
end
73+
elseif op==2 then
74+
--Change the battle position of 1 monster on the field
75+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
76+
local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
77+
if #g>0 then
78+
Duel.HintSelection(g)
79+
Duel.BreakEffect()
80+
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
81+
end
82+
end
83+
end
84+
end
85+
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
86+
local c=e:GetHandler()
87+
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY)
88+
end
89+
function s.thfilter(c)
90+
return c:IsSetCard(SET_GOGOGO) and c:IsMonster() and c:IsAbleToHand()
91+
end
92+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
93+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
94+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
95+
end
96+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
97+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
98+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
99+
if #g>0 then
100+
Duel.SendtoHand(g,nil,REASON_EFFECT)
101+
Duel.ConfirmCards(1-tp,g)
102+
end
103+
end

pre-release/c101301003.lua

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
--ゴゴゴゴブリンドバーグ
2+
--Gogogo Goblindbergh
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon 1 non-Warrior "Gogogo" monster from your hand, Deck or GY
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetCode(EVENT_SUMMON_SUCCESS)
12+
e1:SetCountLimit(1,id)
13+
e1:SetTarget(s.sptg)
14+
e1:SetOperation(s.spop)
15+
c:RegisterEffect(e1)
16+
--Add 1 "Dododo" monster from your Deck to your hand
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
20+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e2:SetProperty(EFFECT_FLAG_DELAY)
22+
e2:SetCode(EVENT_TO_GRAVE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetCondition(s.thcon)
25+
e2:SetTarget(s.thtg)
26+
e2:SetOperation(s.thop)
27+
c:RegisterEffect(e2)
28+
local e3=e2:Clone()
29+
e3:SetCode(EVENT_REMOVE)
30+
c:RegisterEffect(e3)
31+
end
32+
s.listed_series={SET_GOGOGO,SET_DODODO}
33+
function s.spfilter(c,e,tp)
34+
return c:IsSetCard(SET_GOGOGO) and not c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
35+
end
36+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
37+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
38+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end
39+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE)
40+
local c=e:GetHandler()
41+
if c:IsAttackPos() then
42+
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,tp,0)
43+
end
44+
Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,c,1,tp,0)
45+
end
46+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
47+
local c=e:GetHandler()
48+
--You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz Monsters
49+
local e1=Effect.CreateEffect(c)
50+
e1:SetDescription(aux.Stringid(id,2))
51+
e1:SetType(EFFECT_TYPE_FIELD)
52+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
53+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
54+
e1:SetTargetRange(1,0)
55+
e1:SetTarget(function(e,c) return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end)
56+
e1:SetReset(RESET_PHASE|PHASE_END)
57+
Duel.RegisterEffect(e1,tp)
58+
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
59+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
60+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp)
61+
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) and c:IsAttackPos() then
62+
Duel.BreakEffect()
63+
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
64+
end
65+
end
66+
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
67+
local c=e:GetHandler()
68+
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY)
69+
end
70+
function s.thfilter(c)
71+
return c:IsSetCard(SET_DODODO) and c:IsMonster() and c:IsAbleToHand()
72+
end
73+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
74+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
75+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
76+
end
77+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
78+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
79+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
80+
if #g>0 then
81+
Duel.SendtoHand(g,nil,REASON_EFFECT)
82+
Duel.ConfirmCards(1-tp,g)
83+
end
84+
end

pre-release/c101301004.lua

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
--ドドドドウォリアー
2+
--Dodododo Warrior
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE+CATEGORY_ATKCHANGE)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCost(s.spcost)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--Add 1 "Zubaba" monster from your Deck to your hand
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
21+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetProperty(EFFECT_FLAG_DELAY)
23+
e2:SetCode(EVENT_TO_GRAVE)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetCondition(s.thcon)
26+
e2:SetTarget(s.thtg)
27+
e2:SetOperation(s.thop)
28+
c:RegisterEffect(e2)
29+
local e3=e2:Clone()
30+
e3:SetCode(EVENT_REMOVE)
31+
c:RegisterEffect(e3)
32+
end
33+
s.listed_series={SET_DODODO,SET_ZUBABA}
34+
function s.spcostfilter(c)
35+
return c:IsSetCard(SET_DODODO) and c:IsMonster() and c:IsAbleToGraveAsCost()
36+
end
37+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
38+
local c=e:GetHandler()
39+
if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_DECK,0,1,nil) end
40+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
41+
local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_DECK,0,1,1,nil)
42+
Duel.SendtoGrave(g,REASON_COST)
43+
end
44+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
45+
local c=e:GetHandler()
46+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
47+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
48+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
49+
end
50+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
51+
local c=e:GetHandler()
52+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
53+
--Its Level becomes 4
54+
local e1=Effect.CreateEffect(c)
55+
e1:SetType(EFFECT_TYPE_SINGLE)
56+
e1:SetCode(EFFECT_CHANGE_LEVEL)
57+
e1:SetValue(4)
58+
e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE)
59+
c:RegisterEffect(e1)
60+
--Its ATK becomes 1800
61+
local e2=e1:Clone()
62+
e2:SetCode(EFFECT_SET_ATTACK)
63+
e2:SetValue(1800)
64+
c:RegisterEffect(e2)
65+
end
66+
--You cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Xyz Monsters
67+
local e1=Effect.CreateEffect(c)
68+
e1:SetDescription(aux.Stringid(id,2))
69+
e1:SetType(EFFECT_TYPE_FIELD)
70+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
71+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
72+
e1:SetTargetRange(1,0)
73+
e1:SetTarget(function(e,c) return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) end)
74+
e1:SetReset(RESET_PHASE|PHASE_END)
75+
Duel.RegisterEffect(e1,tp)
76+
end
77+
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
78+
local c=e:GetHandler()
79+
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY)
80+
end
81+
function s.thfilter(c)
82+
return c:IsSetCard(SET_ZUBABA) and c:IsMonster() and c:IsAbleToHand()
83+
end
84+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
85+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
86+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
87+
end
88+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
89+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
90+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
91+
if #g>0 then
92+
Duel.SendtoHand(g,nil,REASON_EFFECT)
93+
Duel.ConfirmCards(1-tp,g)
94+
end
95+
end

0 commit comments

Comments
 (0)