Skip to content

Commit 7817959

Browse files
authored
Added new card scripts
1 parent bf1a646 commit 7817959

File tree

10 files changed

+672
-0
lines changed

10 files changed

+672
-0
lines changed

pre-release/c100442001.lua

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
--星辰槍手ルキアス
2+
--Dragontail Lucias
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add 1 "Dragontail" monster from your Deck to your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1:SetCountLimit(1,id)
14+
e1:SetTarget(s.thtg)
15+
e1:SetOperation(s.thop)
16+
c:RegisterEffect(e1)
17+
local e2=e1:Clone()
18+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e2)
20+
--Set 1 "Dragontail" Spell/Trap from your Deck
21+
local e3=Effect.CreateEffect(c)
22+
e3:SetDescription(aux.Stringid(id,1))
23+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
24+
e3:SetProperty(EFFECT_FLAG_DELAY)
25+
e3:SetCode(EVENT_BE_MATERIAL)
26+
e3:SetCountLimit(1,{id,1})
27+
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end)
28+
e3:SetTarget(s.settg)
29+
e3:SetOperation(s.setop)
30+
c:RegisterEffect(e3)
31+
end
32+
s.listed_series={SET_DRAGONTAIL}
33+
s.listed_names={id}
34+
function s.thfilter(c)
35+
return c:IsSetCard(SET_DRAGONTAIL) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id)
36+
end
37+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
38+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
39+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
40+
end
41+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
42+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
43+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
44+
if #g>0 then
45+
Duel.SendtoHand(g,nil,REASON_EFFECT)
46+
Duel.ConfirmCards(1-tp,g)
47+
end
48+
end
49+
function s.setfilter(c)
50+
return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable()
51+
end
52+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
53+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
54+
end
55+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
57+
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
58+
if #g>0 then
59+
Duel.SSet(tp,g)
60+
end
61+
end

pre-release/c100442002.lua

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
--星辰砲手ファイメナ
2+
--Dragontail Fymena
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Fusion Summon 1 Dragon or Spellcaster Fusion Monster from your Extra Deck
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
10+
e1:SetType(EFFECT_TYPE_QUICK_O)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
14+
e1:SetCountLimit(1,id)
15+
e1:SetCondition(function() return Duel.IsMainPhase() end)
16+
e1:SetCost(aux.SelfDiscardCost)
17+
e1:SetTarget(s.fustg)
18+
e1:SetOperation(Fusion.SummonEffOP({fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)}))
19+
c:RegisterEffect(e1)
20+
--Set 1 "Dragontail" Spell/Trap from your Deck
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,1))
23+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
24+
e2:SetProperty(EFFECT_FLAG_DELAY)
25+
e2:SetCode(EVENT_BE_MATERIAL)
26+
e2:SetCountLimit(1,{id,1})
27+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end)
28+
e2:SetTarget(s.settg)
29+
e2:SetOperation(s.setop)
30+
c:RegisterEffect(e2)
31+
end
32+
s.listed_series={SET_DRAGONTAIL}
33+
function s.fextra(exc)
34+
return function(e,tp,mg)
35+
return nil,s.fcheck(exc)
36+
end
37+
end
38+
function s.fcheck(exc)
39+
return function(tp,sg,fc)
40+
return not (exc and sg:IsContains(exc))
41+
end
42+
end
43+
function s.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
44+
if chk==0 then
45+
local params={extrafil=s.fextra(e:GetHandler()),fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)}
46+
return Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0)
47+
end
48+
Fusion.SummonEffTG({fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)})(e,tp,eg,ep,ev,re,r,rp,1)
49+
end
50+
function s.setfilter(c)
51+
return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable()
52+
end
53+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
54+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
55+
end
56+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
57+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
58+
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
59+
if #g>0 then
60+
Duel.SSet(tp,g)
61+
end
62+
end

pre-release/c100442003.lua

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
--星辰竜パーン
2+
--Dragontail Pan
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Set 1 "Dragontail" Spell/Trap from your Deck, then you can destroy 1 monster on the field
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DESTROY)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCode(EVENT_BE_MATERIAL)
13+
e1:SetCountLimit(1,id)
14+
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end)
15+
e1:SetTarget(s.settg)
16+
e1:SetOperation(s.setop)
17+
c:RegisterEffect(e1)
18+
--Place this card on the bottom of the Deck, and if you do, Special Summon 1 non-Fusion "Dragontail" monster from your GY
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
22+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
23+
e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS)
24+
e2:SetCode(EVENT_DESTROYED)
25+
e2:SetRange(LOCATION_GRAVE)
26+
e2:SetCountLimit(1,{id,1})
27+
e2:SetCondition(s.spcon)
28+
e2:SetTarget(s.sptg)
29+
e2:SetOperation(s.spop)
30+
c:RegisterEffect(e2)
31+
end
32+
s.listed_series={SET_DRAGONTAIL}
33+
function s.setfilter(c)
34+
return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable()
35+
end
36+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
37+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
38+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_MZONE)
39+
end
40+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
42+
local sg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
43+
if #sg>0 and Duel.SSet(tp,sg)>0 then
44+
Duel.ShuffleDeck(tp)
45+
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
46+
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
47+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
48+
local dg=g:Select(tp,1,1,nil)
49+
if #dg==0 then return end
50+
Duel.HintSelection(dg)
51+
Duel.BreakEffect()
52+
Duel.Destroy(dg,REASON_EFFECT)
53+
end
54+
end
55+
end
56+
function s.spconfilter(c,e,tp)
57+
return c:IsPreviousTypeOnField(TYPE_FUSION) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
58+
and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and c:IsReasonPlayer(1-tp)
59+
end
60+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
61+
return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,e,tp)
62+
end
63+
function s.spfilter(c,e,tp)
64+
return c:IsSetCard(SET_DRAGONTAIL) and not c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
65+
end
66+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
67+
local c=e:GetHandler()
68+
if chk==0 then return c:IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
69+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
70+
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0)
71+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
72+
end
73+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
74+
local c=e:GetHandler()
75+
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0
76+
and c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
77+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
78+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
79+
if #g>0 then
80+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
81+
end
82+
end
83+
end

pre-release/c100442004.lua

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
--星辰竜ウルグラ
2+
--Dragontail Urgula
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Set 1 "Dragontail" Spell/Trap from your Deck, then you can destroy 1 Spell/Trap on the field
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DESTROY)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCode(EVENT_BE_MATERIAL)
13+
e1:SetCountLimit(1,id)
14+
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end)
15+
e1:SetTarget(s.settg)
16+
e1:SetOperation(s.setop)
17+
c:RegisterEffect(e1)
18+
--Place this card on the bottom of the Deck, and if you do, add that monster to your hand
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
22+
e2:SetType(EFFECT_TYPE_IGNITION)
23+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
24+
e2:SetRange(LOCATION_GRAVE)
25+
e2:SetCountLimit(1,{id,1})
26+
e2:SetTarget(s.tdtg)
27+
e2:SetOperation(s.tdop)
28+
c:RegisterEffect(e2)
29+
end
30+
s.listed_series={SET_DRAGONTAIL}
31+
function s.setfilter(c)
32+
return c:IsSetCard(SET_DRAGONTAIL) and c:IsSpellTrap() and c:IsSSetable()
33+
end
34+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
35+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
36+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_SZONE)
37+
end
38+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
40+
local sg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
41+
if #sg>0 and Duel.SSet(tp,sg)>0 then
42+
Duel.ShuffleDeck(tp)
43+
local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
44+
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
45+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
46+
local dg=g:Select(tp,1,1,nil)
47+
if #dg==0 then return end
48+
Duel.HintSelection(dg)
49+
Duel.BreakEffect()
50+
Duel.Destroy(dg,REASON_EFFECT)
51+
end
52+
end
53+
end
54+
function s.thfilter(c)
55+
return c:IsRace(RACE_SPELLCASTER) and c:IsSetCard(SET_DRAGONTAIL) and c:IsAbleToHand()
56+
end
57+
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
58+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end
59+
local c=e:GetHandler()
60+
if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end
61+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
62+
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c)
63+
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0)
64+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
65+
end
66+
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
67+
local c=e:GetHandler()
68+
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then
69+
local tc=Duel.GetFirstTarget()
70+
if tc:IsRelateToEffect(e) then
71+
Duel.SendtoHand(tc,nil,REASON_EFFECT)
72+
end
73+
end
74+
end

pre-release/c100442006.lua

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
--星辰爪竜アルザリオン
2+
--Dragontail Altharion
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: 1 "Dragontail" monster + 1+ monsters in the hand
8+
Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsLocation,LOCATION_HAND),1,99,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DRAGONTAIL))
9+
--Register how many materials are used from the hand
10+
local e0=Effect.CreateEffect(c)
11+
e0:SetType(EFFECT_TYPE_SINGLE)
12+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
13+
e0:SetCode(EFFECT_MATERIAL_CHECK)
14+
e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():FilterCount(Card.IsLocation,nil,LOCATION_HAND)) end)
15+
c:RegisterEffect(e0)
16+
--Return monsters on the field and/or in any GY(s) to the hand, up to the number of monsters used as material from the hand
17+
local e1=Effect.CreateEffect(c)
18+
e1:SetDescription(aux.Stringid(id,0))
19+
e1:SetCategory(CATEGORY_TOHAND)
20+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
22+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
23+
e1:SetCountLimit(1,id)
24+
e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabelObject():GetLabel()>0 end)
25+
e1:SetTarget(s.thtg)
26+
e1:SetOperation(s.thop)
27+
e1:SetLabelObject(e0)
28+
c:RegisterEffect(e1)
29+
--Special Summon this card from the GY, but banish it when it leaves the field
30+
local e2=Effect.CreateEffect(c)
31+
e2:SetDescription(aux.Stringid(id,1))
32+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
33+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
34+
e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS)
35+
e2:SetCode(EVENT_CUSTOM+id)
36+
e2:SetRange(LOCATION_GRAVE)
37+
e2:SetCountLimit(1,{id,1})
38+
e2:SetTarget(s.sptg)
39+
e2:SetOperation(s.spop)
40+
c:RegisterEffect(e2)
41+
--Keep track of monsters being sent to the GY at the same time
42+
local e3=Effect.CreateEffect(c)
43+
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
44+
e3:SetCode(EVENT_TO_GRAVE)
45+
e3:SetRange(LOCATION_GRAVE)
46+
e3:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end)
47+
e3:SetOperation(s.regop)
48+
c:RegisterEffect(e3)
49+
local e4=e3:Clone()
50+
e4:SetCode(EVENT_CHAINING)
51+
e4:SetOperation(function(e) e:GetHandler():ResetFlagEffect(id+100) end)
52+
c:RegisterEffect(e4)
53+
local e5=e4:Clone()
54+
e5:SetCode(EVENT_CHAIN_SOLVED)
55+
c:RegisterEffect(e5)
56+
local e6=e4:Clone()
57+
e6:SetCode(EVENT_BREAK_EFFECT)
58+
c:RegisterEffect(e6)
59+
end
60+
s.listed_series={SET_DRAGONTAIL}
61+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
62+
if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsMonster() and chkc:IsAbleToHand() end
63+
if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end
64+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
65+
local ct=e:GetLabelObject():GetLabel()
66+
local g=Duel.SelectTarget(tp,aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,ct,nil)
67+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0)
68+
end
69+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
70+
local tg=Duel.GetTargetCards(e)
71+
if #tg>0 then
72+
Duel.SendtoHand(tg,nil,REASON_EFFECT)
73+
end
74+
end
75+
function s.regop(e,tp,eg,ep,ev,re,r,rp)
76+
local c=e:GetHandler()
77+
local ct=eg:FilterCount(Card.IsMonster,nil)
78+
if ct==0 or eg:IsContains(c) then return end
79+
if ct>=2 or c:HasFlagEffect(id+100) then
80+
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,re,r,rp,ep,ev)
81+
end
82+
local eff=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT)
83+
if eff then
84+
c:RegisterFlagEffect(id+100,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1)
85+
end
86+
end
87+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
88+
local c=e:GetHandler()
89+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
90+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
91+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
92+
end
93+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
94+
local c=e:GetHandler()
95+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
96+
--Banish it when it leaves the field
97+
local e1=Effect.CreateEffect(c)
98+
e1:SetDescription(3300)
99+
e1:SetType(EFFECT_TYPE_SINGLE)
100+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
101+
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
102+
e1:SetValue(LOCATION_REMOVED)
103+
e1:SetReset(RESET_EVENT|RESETS_REDIRECT)
104+
c:RegisterEffect(e1,true)
105+
end
106+
end

0 commit comments

Comments
 (0)