Skip to content

Commit 2db6b2b

Browse files
authored
Added new card scripts
1 parent 0afc24e commit 2db6b2b

File tree

6 files changed

+423
-0
lines changed

6 files changed

+423
-0
lines changed

pre-release/c100455023.lua

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
--ウィッチクラフト・テラコッタン
2+
--Witchcrafter Terracottan
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If this card is in your hand: You can target 1 "Witchcrafter" card in your GY, except "Witchcrafter Terracottan"; add it to your hand, and if you do, Special Summon this card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except "Witchcrafter" monsters
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,{id,0})
14+
e1:SetTarget(s.thsptg)
15+
e1:SetOperation(s.thspop)
16+
c:RegisterEffect(e1)
17+
--During your Main Phase: You can Fusion Summon 1 "Witchcrafter" Fusion Monster from your Extra Deck, using monsters from your hand or field
18+
local fusion_params=aux.FilterBoolFunction(Card.IsSetCard,SET_WITCHCRAFTER)
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
22+
e2:SetType(EFFECT_TYPE_IGNITION)
23+
e2:SetRange(LOCATION_MZONE)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetTarget(Fusion.SummonEffTG(fusion_params))
26+
e2:SetOperation(Fusion.SummonEffOP(fusion_params))
27+
c:RegisterEffect(e2)
28+
end
29+
s.listed_series={SET_WITCHCRAFTER}
30+
s.listed_names={id}
31+
function s.thfilter(c)
32+
return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsAbleToHand()
33+
end
34+
function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
35+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end
36+
local c=e:GetHandler()
37+
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil)
38+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
39+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
40+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
41+
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
42+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
43+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
44+
end
45+
function s.thspop(e,tp,eg,ep,ev,re,r,rp)
46+
local c=e:GetHandler()
47+
local tc=Duel.GetFirstTarget()
48+
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
49+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
50+
end
51+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except "Witchcrafter" monsters
52+
local e1=Effect.CreateEffect(c)
53+
e1:SetDescription(aux.Stringid(id,2))
54+
e1:SetType(EFFECT_TYPE_FIELD)
55+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
56+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
57+
e1:SetTargetRange(1,0)
58+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_WITCHCRAFTER) end)
59+
e1:SetReset(RESET_PHASE|PHASE_END)
60+
Duel.RegisterEffect(e1,tp)
61+
end

pre-release/c100455025.lua

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
--大魔女サンドリヨン
2+
--Witchcrafter Madame Rilliona
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: "Witchcrafter Madame Verre" + 2 Spellcaster monsters
8+
Fusion.AddProcMixN(c,true,true,21522601,1,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),2)
9+
--If this card is Fusion Summoned: You can Special Summon up to 3 Level 7 or lower "Witchcrafter" monsters with different Attributes from each other from your hand and/or Deck, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Fusion Monsters
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_DELAY)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetCountLimit(1,{id,0})
17+
e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end)
18+
e1:SetTarget(s.witchsptg)
19+
e1:SetOperation(s.witchspop)
20+
c:RegisterEffect(e1)
21+
--During your End Phase, if this card is in your GY: You can reveal 1 Spell in your hand; Special Summon this card in Defense Position
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,1))
24+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
25+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
26+
e2:SetCode(EVENT_PHASE+PHASE_END)
27+
e2:SetRange(LOCATION_GRAVE)
28+
e2:SetCountLimit(1,{id,1})
29+
e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end)
30+
e2:SetCost(Cost.Reveal(Card.IsSpell))
31+
e2:SetTarget(s.selfsptg)
32+
e2:SetOperation(s.selfspop)
33+
c:RegisterEffect(e2)
34+
end
35+
s.listed_names={21522601} --"Witchcrafter Madame Verre"
36+
s.listed_series={SET_WITCHCRAFTER}
37+
s.material_setcode=SET_WITCHCRAFTER
38+
function s.witchspfilter(c,e,tp)
39+
return c:IsLevelBelow(7) and c:IsSetCard(SET_WITCHCRAFTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
40+
end
41+
function s.witchsptg(e,tp,eg,ep,ev,re,r,rp,chk)
42+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
43+
and Duel.IsExistingMatchingCard(s.witchspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end
44+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
45+
end
46+
function s.witchspop(e,tp,eg,ep,ev,re,r,rp)
47+
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
48+
local g=Duel.GetMatchingGroup(s.witchspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp)
49+
if ft>0 and #g>0 then
50+
local attr_count=g:GetClassCount(Card.GetAttribute)
51+
ft=math.min(ft,3,attr_count)
52+
if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end
53+
local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_SPSUMMON)
54+
if #sg>0 then
55+
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
56+
end
57+
end
58+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except Fusion Monsters
59+
local e1=Effect.CreateEffect(e:GetHandler())
60+
e1:SetDescription(aux.Stringid(id,2))
61+
e1:SetType(EFFECT_TYPE_FIELD)
62+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
63+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
64+
e1:SetTargetRange(1,0)
65+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsFusionMonster() end)
66+
e1:SetReset(RESET_PHASE|PHASE_END)
67+
Duel.RegisterEffect(e1,tp)
68+
end
69+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
70+
local c=e:GetHandler()
71+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
72+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
73+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
74+
end
75+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
76+
local c=e:GetHandler()
77+
if c:IsRelateToEffect(e) then
78+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
79+
end
80+
end

pre-release/c100455027.lua

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
--ウィッチクラフト・セレブレーション
2+
--Witchcrafter Celebration
3+
--scripted by pyrQ
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_ACTIVATE)
10+
e1:SetCode(EVENT_FREE_CHAIN)
11+
e1:SetCountLimit(1,id)
12+
e1:SetTarget(s.efftg)
13+
e1:SetOperation(s.effop)
14+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
15+
c:RegisterEffect(e1)
16+
--During your End Phase, if you control a "Witchcrafter" monster, while this card is in your GY: You can add this card to your hand
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_TOHAND)
20+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
21+
e2:SetCode(EVENT_PHASE+PHASE_END)
22+
e2:SetRange(LOCATION_GRAVE)
23+
e2:SetCountLimit(1,id)
24+
e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) end)
25+
e2:SetTarget(s.thtg)
26+
e2:SetOperation(s.thop)
27+
c:RegisterEffect(e2)
28+
end
29+
s.listed_series={SET_WITCHCRAFTER}
30+
function s.desfilter(c,opp)
31+
return (c:IsSetCard(SET_WITCHCRAFTER) and c:IsMonster() and c:IsFaceup()) or c:IsControler(opp)
32+
end
33+
function s.matfilter(c)
34+
return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeck()
35+
end
36+
function s.fextra(e,tp,mg)
37+
return Duel.GetMatchingGroup(aux.NecroValleyFilter(s.matfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil)
38+
end
39+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
40+
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,1-tp)
41+
--● Destroy 1 "Witchcrafter" monster you control and 1 card your opponent controls
42+
local b1=#g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0)
43+
--● Fusion Summon 1 "Witchcrafter" Fusion Monster from your Extra Deck, by shuffling Spellcaster monsters from your GY and/or banishment into the Deck
44+
local fusion_params={
45+
fusfilter=function(c) return c:IsSetCard(SET_WITCHCRAFTER) end,
46+
matfilter=aux.FALSE,
47+
extrafil=s.fextra,
48+
extraop=Fusion.ShuffleMaterial
49+
}
50+
local b2=Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0)
51+
if chk==0 then return b1 or b2 end
52+
local op=Duel.SelectEffect(tp,
53+
{b1,aux.Stringid(id,2)},
54+
{b2,aux.Stringid(id,3)})
55+
e:SetLabel(op)
56+
if op==1 then
57+
e:SetCategory(CATEGORY_DESTROY)
58+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0)
59+
elseif op==2 then
60+
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
61+
Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1)
62+
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED)
63+
end
64+
end
65+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
66+
local op=e:GetLabel()
67+
if op==1 then
68+
--● Destroy 1 "Witchcrafter" monster you control and 1 card your opponent controls
69+
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,1-tp)
70+
if #g<2 or g:GetClassCount(Card.GetControler)<2 then return end
71+
local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_DESTROY)
72+
if #sg==2 then
73+
Duel.HintSelection(sg)
74+
Duel.Destroy(sg,REASON_EFFECT)
75+
end
76+
elseif op==2 then
77+
--● Fusion Summon 1 "Witchcrafter" Fusion Monster from your Extra Deck, by shuffling Spellcaster monsters from your GY and/or banishment into the Deck
78+
local fusion_params={
79+
fusfilter=function(c) return c:IsSetCard(SET_WITCHCRAFTER) end,
80+
matfilter=aux.FALSE,
81+
extrafil=s.fextra,
82+
extraop=Fusion.ShuffleMaterial
83+
}
84+
Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp)
85+
end
86+
end
87+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
88+
local c=e:GetHandler()
89+
if chk==0 then return c:IsAbleToHand() end
90+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0)
91+
end
92+
function s.thop(e,tp,eg,ep,ev,re,r,rp,chk)
93+
local c=e:GetHandler()
94+
if c:IsRelateToEffect(e) then
95+
Duel.SendtoHand(c,nil,REASON_EFFECT)
96+
end
97+
end

pre-release/c100455028.lua

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
--魔女の聖夜行
2+
--Witchcrafter Walpurgis
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_ACTIVATE)
9+
e0:SetCode(EVENT_FREE_CHAIN)
10+
c:RegisterEffect(e0)
11+
--During your Main Phase: You can add 1 "Witchcrafter" monster from your Deck to your hand, then discard 1 card. You can only use this effect of "Witchcrafter Walpurgis" once per turn
12+
local e1=Effect.CreateEffect(c)
13+
e1:SetDescription(aux.Stringid(id,0))
14+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
15+
e1:SetType(EFFECT_TYPE_IGNITION)
16+
e1:SetRange(LOCATION_FZONE)
17+
e1:SetCountLimit(1,id)
18+
e1:SetTarget(s.thtg)
19+
e1:SetOperation(s.thop)
20+
c:RegisterEffect(e1)
21+
--During your turn, if you would discard to activate the effect of a "Witchcrafter" monster you control, you can send 1 "Witchcrafter" Spell/Trap from your Deck to the GY instead, except "Witchcrafter Walpurgis"
22+
local e2=Witchcrafter.CreateCostReplaceEffect(c)
23+
e2:SetRange(LOCATION_FZONE)
24+
e2:SetCondition(s.repcon)
25+
e2:SetOperation(s.repop)
26+
c:RegisterEffect(e2)
27+
end
28+
s.listed_names={id}
29+
s.listed_series={SET_WITCHCRAFTER}
30+
function s.thfilter(c)
31+
return c:IsSetCard(SET_WITCHCRAFTER) and c:IsMonster() and c:IsAbleToHand()
32+
end
33+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
34+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
35+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
36+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1)
37+
end
38+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
40+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
41+
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then
42+
Duel.ConfirmCards(1-tp,g)
43+
Duel.ShuffleHand(tp)
44+
Duel.BreakEffect()
45+
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil)
46+
end
47+
end
48+
function s.repcostfilter(c)
49+
return c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToGraveAsCost()
50+
end
51+
function s.repcon(e)
52+
local tp=e:GetHandlerPlayer()
53+
return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_DECK,0,1,nil)
54+
end
55+
function s.repop(base,e,tp,eg,ep,ev,re,r,rp)
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
57+
local g=Duel.SelectMatchingCard(tp,s.repcostfilter,tp,LOCATION_DECK,0,1,1,nil)
58+
if #g>0 then
59+
Duel.SendtoGrave(g,REASON_COST)
60+
end
61+
end

pre-release/c100455029.lua

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
--ウィッチクラフト・ディストーション
2+
--Witchcrafter Distortion
3+
local s,id=GetID()
4+
function s.initial_effect(c)
5+
--When a Spell/Trap Card, or monster effect, is activated and you control a Level 5 or higher "Witchcrafter" monster: Negate the activation, and if you do, destroy that card
6+
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
8+
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_CHAINING)
11+
e1:SetCountLimit(1,{id,0})
12+
e1:SetCondition(s.negcon)
13+
e1:SetTarget(s.negtg)
14+
e1:SetOperation(s.negop)
15+
c:RegisterEffect(e1)
16+
--If this card is in your GY, except the turn it was sent there: You can banish it; add 1 Level 5 or higher Spellcaster monster from your Deck to your hand, then discard 1 card
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
20+
e2:SetType(EFFECT_TYPE_QUICK_O)
21+
e2:SetCode(EVENT_FREE_CHAIN)
22+
e2:SetRange(LOCATION_GRAVE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetCondition(aux.exccon)
25+
e2:SetCost(Cost.SelfBanish)
26+
e2:SetTarget(s.thtg)
27+
e2:SetOperation(s.thop)
28+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
29+
c:RegisterEffect(e2)
30+
end
31+
s.listed_series={SET_WITCHCRAFTER}
32+
function s.negconfilter(c)
33+
return c:IsLevelAbove(5) and c:IsSetCard(SET_WITCHCRAFTER) and c:IsFaceup()
34+
end
35+
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
36+
return Duel.IsExistingMatchingCard(s.negconfilter,tp,LOCATION_MZONE,0,1,nil) and (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect())
37+
and Duel.IsChainNegatable(ev)
38+
end
39+
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
40+
if chk==0 then return true end
41+
local rc=re:GetHandler()
42+
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0)
43+
if rc:IsDestructable() and rc:IsRelateToEffect(re) then
44+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0)
45+
end
46+
end
47+
function s.negop(e,tp,eg,ep,ev,re,r,rp)
48+
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
49+
Duel.Destroy(eg,REASON_EFFECT)
50+
end
51+
end
52+
function s.thfilter(c)
53+
return c:IsLevelAbove(5) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
54+
end
55+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
56+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
57+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
58+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
59+
end
60+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
61+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
62+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
63+
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
64+
Duel.ConfirmCards(1-tp,g)
65+
Duel.ShuffleHand(tp)
66+
Duel.BreakEffect()
67+
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil)
68+
end
69+
end

0 commit comments

Comments
 (0)