Skip to content

Commit 352d69d

Browse files
authored
Added new card scripts
1 parent 92baabc commit 352d69d

File tree

2 files changed

+163
-0
lines changed

2 files changed

+163
-0
lines changed

pre-release/c100296202.lua

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
--召喚獣マギストス・セリオン
2+
--Invoked Magistus Omega
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: "Aleister the Invoker" + 1 Fusion, Synchro, Xyz, or Link Monster
8+
Fusion.AddProcMix(c,true,true,86120751,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EXTRA))
9+
--Banish 1 Fusion, Synchro, Xyz, or Link Monster from your GY and 1 monster on the field
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_REMOVE)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetCountLimit(1,id)
17+
e1:SetTarget(s.rmtg)
18+
e1:SetOperation(s.rmop)
19+
c:RegisterEffect(e1)
20+
--Special Summon 1 Level 4 Spellcaster monster from your Deck, then you can equip this card to it
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,1))
23+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
24+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
25+
e2:SetProperty(EFFECT_FLAG_DELAY)
26+
e2:SetCode(EVENT_DESTROYED)
27+
e2:SetCountLimit(1,{id,1})
28+
e2:SetCondition(s.spcon)
29+
e2:SetTarget(s.sptg)
30+
e2:SetOperation(s.spop)
31+
c:RegisterEffect(e2)
32+
end
33+
s.listed_names={86120751} --"Aleister the Invoker"
34+
s.miracle_synchro_fusion=true
35+
function s.rmfilter(c,e)
36+
return c:IsCanBeEffectTarget(e) and c:IsAbleToRemove() and (c:IsType(TYPE_EXTRA) or c:IsLocation(LOCATION_MZONE))
37+
end
38+
function s.rmrescon(sg,e,tp,mg)
39+
return sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)==1
40+
end
41+
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
42+
if chkc then return false end
43+
local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,LOCATION_MZONE,nil,e)
44+
if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rmrescon,0) end
45+
local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rmrescon,1,tp,HINTMSG_REMOVE)
46+
Duel.SetTargetCard(sg)
47+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,2,tp,0)
48+
end
49+
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
50+
local tg=Duel.GetTargetCards(e):Match(Card.IsMonster,nil)
51+
if #tg>0 then
52+
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
53+
end
54+
end
55+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
56+
local c=e:GetHandler()
57+
return c:IsFusionSummoned() and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
58+
end
59+
function s.spfilter(c,e,tp)
60+
return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
61+
end
62+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
63+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
64+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
65+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
66+
Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0)
67+
end
68+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
69+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
70+
local c=e:GetHandler()
71+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
72+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
73+
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0
74+
and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
75+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
76+
Duel.BreakEffect()
77+
if Duel.Equip(tp,c,sc) then
78+
--Equip limit registration
79+
local e0=Effect.CreateEffect(c)
80+
e0:SetType(EFFECT_TYPE_SINGLE)
81+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
82+
e0:SetCode(EFFECT_EQUIP_LIMIT)
83+
e0:SetValue(function(e,c) return c==sc end)
84+
e0:SetReset(RESET_EVENT|RESETS_STANDARD)
85+
c:RegisterEffect(e0)
86+
--The equipped monster gains 1000 ATK
87+
local e1=Effect.CreateEffect(c)
88+
e1:SetType(EFFECT_TYPE_EQUIP)
89+
e1:SetCode(EFFECT_UPDATE_ATTACK)
90+
e1:SetValue(1000)
91+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
92+
c:RegisterEffect(e1)
93+
end
94+
end
95+
end

pre-release/c100442005.lua

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
--星辰竜ムルル
2+
--Dragontail Mulr
3+
--scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Fusion Summon 1 "Dragontail" 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_MZONE)
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:SetTarget(Fusion.SummonEffTG(aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGONTAIL)))
17+
e1:SetOperation(s.fusop)
18+
c:RegisterEffect(e1)
19+
--Set 1 "Dragontail" Spell/Trap from your Deck
20+
local e2=Effect.CreateEffect(c)
21+
e2:SetDescription(aux.Stringid(id,1))
22+
e2:SetCategory(CATEGORY_DISABLE)
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.fusop(e,tp,eg,ep,ev,re,r,rp)
34+
Fusion.SummonEffOP(aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGONTAIL))(e,tp,eg,ep,ev,re,r,rp)
35+
local c=e:GetHandler()
36+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except Fusion Monsters
37+
local e1=Effect.CreateEffect(c)
38+
e1:SetDescription(aux.Stringid(id,2))
39+
e1:SetType(EFFECT_TYPE_FIELD)
40+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
41+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
42+
e1:SetTargetRange(1,0)
43+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) end)
44+
e1:SetReset(RESET_PHASE|PHASE_END)
45+
Duel.RegisterEffect(e1,tp)
46+
--"Clock Lizard" check
47+
aux.addTempLizardCheck(c,tp,function(c) return not c:IsOriginalType(TYPE_FUSION) 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+
Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
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 or Duel.SSet(tp,g)==0 then return end
60+
local ng=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,nil)
61+
if #ng==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end
62+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
63+
local sc=ng:Select(tp,1,1,nil):GetFirst()
64+
if sc then
65+
Duel.HintSelection(sc)
66+
sc:NegateEffects(e:GetHandler())
67+
end
68+
end

0 commit comments

Comments
 (0)