Skip to content

Commit 27f691e

Browse files
authored
Added new card scripts
1 parent 4a4adf8 commit 27f691e

15 files changed

+1317
-0
lines changed

pre-release/c101301008.lua

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
--無垢なる者 メディウス
2+
--Medius the Innocent
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Take 1 "Imprisoned Deity" monster from your Deck and either add it to your hand or Special Summon it
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
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.thsptg)
15+
e1:SetOperation(s.thspop)
16+
c:RegisterEffect(e1)
17+
local e2=e1:Clone()
18+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e2)
20+
--Shuffle 1 monster from your hand or face-up field into the Deck, and if you do, Special Summon this card, but banish it when it leaves the field
21+
local e3=Effect.CreateEffect(c)
22+
e3:SetDescription(aux.Stringid(id,1))
23+
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
24+
e3:SetType(EFFECT_TYPE_IGNITION)
25+
e3:SetRange(LOCATION_GRAVE)
26+
e3:SetCountLimit(1,{id,1})
27+
e3:SetTarget(s.tdtg)
28+
e3:SetOperation(s.tdop)
29+
c:RegisterEffect(e3)
30+
end
31+
s.listed_series={SET_IMPRISONED_DEITY}
32+
function s.thspfilter(c,e,tp,sp_chk)
33+
return c:IsSetCard(SET_IMPRISONED_DEITY) and c:IsMonster()
34+
and (c:IsAbleToHand() or (sp_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
35+
end
36+
function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk)
37+
if chk==0 then
38+
local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
39+
return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,sp_chk)
40+
end
41+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
42+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
43+
end
44+
function s.thspop(e,tp,eg,ep,ev,re,r,rp)
45+
local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
46+
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
47+
local tc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,sp_chk):GetFirst()
48+
if not tc then return end
49+
aux.ToHandOrElse(tc,tp,
50+
function() return sp_chk and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end,
51+
function() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end,
52+
aux.Stringid(id,3)
53+
)
54+
end
55+
function s.tdfilter(c,tp)
56+
return (c:IsLocation(LOCATION_HAND) and c:IsMonster() or c:IsFaceup())
57+
and c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0
58+
end
59+
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
60+
local c=e:GetHandler()
61+
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp)
62+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
63+
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_MZONE)
64+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
65+
end
66+
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
67+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
68+
local sc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
69+
if not sc then return end
70+
if sc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,sc)
71+
else Duel.HintSelection(sc) end
72+
local c=e:GetHandler()
73+
if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
74+
and sc:IsLocation(LOCATION_DECK|LOCATION_EXTRA)
75+
and c:IsRelateToEffect(e)
76+
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
77+
--Banish it when it leaves the field
78+
local e1=Effect.CreateEffect(c)
79+
e1:SetDescription(3300)
80+
e1:SetType(EFFECT_TYPE_SINGLE)
81+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
82+
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
83+
e1:SetValue(LOCATION_REMOVED)
84+
e1:SetReset(RESET_EVENT|RESETS_REDIRECT)
85+
c:RegisterEffect(e1,true)
86+
end
87+
end

pre-release/c101301009.lua

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
--神芸学徒 ファインメルト
2+
--Artmegia Finemelt
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Your opponent cannot target Level 6 or lower "Artmegia" monsters you control with card effects
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_FIELD)
9+
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
10+
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetTargetRange(LOCATION_MZONE,0)
13+
e1:SetTarget(function(e,c) return c:IsLevelBelow(6) and c:IsSetCard(SET_ARTMEGIA) end)
14+
e1:SetValue(aux.tgoval)
15+
c:RegisterEffect(e1)
16+
--Special Summon this card from your hand, then you can draw 1 card
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,0))
19+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetRange(LOCATION_HAND)
22+
e2:SetCountLimit(1,id)
23+
e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_ONFIELD,0,1,nil) end)
24+
e2:SetTarget(s.sptg)
25+
e2:SetOperation(s.spop)
26+
c:RegisterEffect(e2)
27+
--Negate the effects of all face-up monsters your opponent currently controls, also their current ATK become halved until the end of this turn
28+
local e3=Effect.CreateEffect(c)
29+
e3:SetDescription(aux.Stringid(id,1))
30+
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
31+
e3:SetType(EFFECT_TYPE_QUICK_O)
32+
e3:SetCode(EVENT_FREE_CHAIN)
33+
e3:SetRange(LOCATION_MZONE)
34+
e3:SetCountLimit(1,{id,1})
35+
e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
36+
e3:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetRace)>=3 end)
37+
e3:SetTarget(s.distg)
38+
e3:SetOperation(s.disop)
39+
c:RegisterEffect(e3)
40+
end
41+
s.listed_series={SET_ARTMEGIA}
42+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
43+
local c=e:GetHandler()
44+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
45+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
46+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
47+
Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1)
48+
end
49+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
50+
local c=e:GetHandler()
51+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
52+
and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
53+
Duel.BreakEffect()
54+
Duel.Draw(tp,1,REASON_EFFECT)
55+
end
56+
end
57+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
58+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
59+
end
60+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
61+
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,0)
62+
if #g==0 then return end
63+
local c=e:GetHandler()
64+
for tc in g:Iter() do
65+
if tc:IsNegatableMonster() then tc:NegateEffects(c) end
66+
--Its ATK becomes halved until the end of this turn
67+
local e1=Effect.CreateEffect(c)
68+
e1:SetType(EFFECT_TYPE_SINGLE)
69+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
70+
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
71+
e1:SetValue(tc:GetAttack()/2)
72+
e1:SetReset(RESETS_STANDARD_PHASE_END)
73+
tc:RegisterEffect(e1)
74+
end
75+
end

pre-release/c101301010.lua

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
--神芸学徒 グラフレア
2+
--Artmegia Graphlare
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--The first time this card would be destroyed by battle each turn, it is not destroyed
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_SINGLE)
9+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
10+
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetValue(function(e,re,r) return (r&REASON_BATTLE)==REASON_BATTLE end)
14+
c:RegisterEffect(e1)
15+
--Special Summon this card from your hand, then you can Set 1 "Artmegia" Spell from your Deck
16+
local e2=Effect.CreateEffect(c)
17+
e2:SetDescription(aux.Stringid(id,0))
18+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
19+
e2:SetType(EFFECT_TYPE_IGNITION)
20+
e2:SetRange(LOCATION_HAND)
21+
e2:SetCountLimit(1,id)
22+
e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_ONFIELD,0,1,nil) end)
23+
e2:SetTarget(s.sptg)
24+
e2:SetOperation(s.spop)
25+
c:RegisterEffect(e2)
26+
--Destroy 1 Spell/Trap your opponent controls
27+
local e3=Effect.CreateEffect(c)
28+
e3:SetDescription(aux.Stringid(id,1))
29+
e3:SetCategory(CATEGORY_DESTROY)
30+
e3:SetType(EFFECT_TYPE_IGNITION)
31+
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
32+
e3:SetRange(LOCATION_MZONE)
33+
e3:SetCountLimit(1,{id,1})
34+
e3:SetCondition(aux.NOT(s.quickdescon))
35+
e3:SetTarget(s.destg)
36+
e3:SetOperation(s.desop)
37+
c:RegisterEffect(e3)
38+
--This is a Quick Effect if you control 3 or more Monster Types
39+
local e3a=e3:Clone()
40+
e3a:SetType(EFFECT_TYPE_QUICK_O)
41+
e3a:SetCode(EVENT_FREE_CHAIN)
42+
e3a:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
43+
e3a:SetCondition(s.quickdescon)
44+
c:RegisterEffect(e3a)
45+
end
46+
s.listed_series={SET_ARTMEGIA}
47+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
48+
local c=e:GetHandler()
49+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
50+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
51+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
52+
end
53+
function s.setfilter(c)
54+
return c:IsSetCard(SET_ARTMEGIA) and c:IsSpell() and c:IsSSetable()
55+
end
56+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
57+
local c=e:GetHandler()
58+
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
59+
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
60+
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end
61+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
62+
local sg=g:Select(tp,1,1,nil)
63+
if #sg>0 then
64+
Duel.BreakEffect()
65+
Duel.SSet(tp,sg)
66+
end
67+
end
68+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
69+
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() end
70+
if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end
71+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
72+
local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil)
73+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
74+
end
75+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
76+
local tc=Duel.GetFirstTarget()
77+
if tc:IsRelateToEffect(e) then
78+
Duel.Destroy(tc,REASON_EFFECT)
79+
end
80+
end
81+
function s.quickdescon(e,tp,eg,ep,ev,re,r,rp)
82+
return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetRace)>=3
83+
end

pre-release/c101301011.lua

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
--神芸学徒 リテラ
2+
--Artmegia Litera
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--You take no battle damage from battles involving this card
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_SINGLE)
9+
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
10+
e1:SetValue(1)
11+
c:RegisterEffect(e1)
12+
--Special Summon this card from your hand, then you can add 1 "Artmegia" card from your GY to your hand
13+
local e2=Effect.CreateEffect(c)
14+
e2:SetDescription(aux.Stringid(id,0))
15+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
16+
e2:SetType(EFFECT_TYPE_IGNITION)
17+
e2:SetRange(LOCATION_HAND)
18+
e2:SetCountLimit(1,id)
19+
e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMEGIA),tp,LOCATION_ONFIELD,0,1,nil) end)
20+
e2:SetTarget(s.selfsptg)
21+
e2:SetOperation(s.selfspop)
22+
c:RegisterEffect(e2)
23+
--Special Summon 1 "Artmegia" monster from your hand or GY, except "Artmegia Litera", then return this card from the field to the hand
24+
local e3=Effect.CreateEffect(c)
25+
e3:SetDescription(aux.Stringid(id,1))
26+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
27+
e3:SetType(EFFECT_TYPE_QUICK_O)
28+
e3:SetCode(EVENT_FREE_CHAIN)
29+
e3:SetRange(LOCATION_MZONE)
30+
e3:SetCountLimit(1,{id,1})
31+
e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
32+
e3:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) end)
33+
e3:SetTarget(s.sptg)
34+
e3:SetOperation(s.spop)
35+
c:RegisterEffect(e3)
36+
end
37+
s.listed_names={id}
38+
s.listed_series={SET_ARTMEGIA}
39+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
40+
local c=e:GetHandler()
41+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
42+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
43+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
44+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
45+
end
46+
function s.thfilter(c)
47+
return c:IsSetCard(SET_ARTMEGIA) and c:IsAbleToHand()
48+
end
49+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
50+
local c=e:GetHandler()
51+
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
52+
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
53+
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end
54+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
55+
local sg=g:Select(tp,1,1,nil)
56+
if #sg>0 then
57+
Duel.HintSelection(sg)
58+
Duel.BreakEffect()
59+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
60+
end
61+
end
62+
function s.spfilter(c,e,tp)
63+
return c:IsSetCard(SET_ARTMEGIA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
64+
end
65+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
66+
local c=e:GetHandler()
67+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
68+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp)
69+
and c:IsAbleToHand() end
70+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE)
71+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0)
72+
end
73+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
74+
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
75+
local c=e:GetHandler()
76+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
77+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp)
78+
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then
79+
Duel.BreakEffect()
80+
Duel.SendtoHand(c,nil,REASON_EFFECT)
81+
end
82+
end

pre-release/c101301012.lua

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
--アルトメギアの獄神獣
2+
--Imprisoned Deity Beast of Artmegia
3+
--scripted by Naim
4+
local CARD_NERVA=101301033
5+
local s,id=GetID()
6+
function s.initial_effect(c)
7+
--You cannot Special Summon from the Extra Deck, except Fusion Monsters
8+
local e1=Effect.CreateEffect(c)
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
11+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
12+
e1:SetRange(LOCATION_MZONE)
13+
e1:SetTargetRange(1,0)
14+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end)
15+
c:RegisterEffect(e1)
16+
--Fusion Summon 1 "Artmegia" Fusion Monster or "Nerva the Imprisoned Deity of Creation"
17+
local params={fusfilter=s.fusionfilter,gc=Fusion.ForcedHandler}
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,0))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
21+
e2:SetType(EFFECT_TYPE_QUICK_O)
22+
e2:SetCode(EVENT_FREE_CHAIN)
23+
e2:SetRange(LOCATION_MZONE)
24+
e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
25+
e2:SetCountLimit(1,id)
26+
e2:SetCondition(function() return Duel.IsMainPhase() end)
27+
e2:SetTarget(Fusion.SummonEffTG(params))
28+
e2:SetOperation(Fusion.SummonEffOP(params))
29+
c:RegisterEffect(e2)
30+
--Add 1 "Artmegia" Spell/Trap from your Deck to your hand with a different name from the cards in your GY.
31+
local e3=Effect.CreateEffect(c)
32+
e3:SetDescription(aux.Stringid(id,1))
33+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
34+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
35+
e3:SetProperty(EFFECT_FLAG_DELAY)
36+
e3:SetCode(EVENT_TO_GRAVE)
37+
e3:SetCountLimit(1,{id,1})
38+
e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end)
39+
e3:SetTarget(s.thtg)
40+
e3:SetOperation(s.thop)
41+
c:RegisterEffect(e3)
42+
end
43+
s.listed_series={SET_ARTMEGIA}
44+
s.listed_names={CARD_NERVA}
45+
function s.fusionfilter(c)
46+
return c:IsSetCard(SET_ARTMEGIA) or c:IsCode(CARD_NERVA)
47+
end
48+
function s.thfilter(c,tp)
49+
return c:IsSetCard(SET_ARTMEGIA) and c:IsSpellTrap() and c:IsAbleToHand()
50+
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
51+
end
52+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
53+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
54+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
55+
end
56+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
57+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
58+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
59+
if #g>0 then
60+
Duel.SendtoHand(g,nil,REASON_EFFECT)
61+
Duel.ConfirmCards(1-tp,g)
62+
end
63+
end

0 commit comments

Comments
 (0)