Skip to content

Commit 94c0824

Browse files
authored
Added new card scripts
1 parent 8dd58a6 commit 94c0824

24 files changed

+2157
-0
lines changed

pre-release/c100445057.lua

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
--御巫奉サナキ
2+
--Sanaki the Mikanko Devotee
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Return 1 "Mikanko" card you control to the hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetRange(LOCATION_MZONE)
13+
e1:SetCountLimit(1,id)
14+
e1:SetTarget(s.thtg)
15+
e1:SetOperation(s.thop)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 non-Illusion "Mikanko" monster from your Deck
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
21+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetProperty(EFFECT_FLAG_DELAY)
23+
e2:SetCode(EVENT_EQUIP)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetTarget(s.sptg)
26+
e2:SetOperation(s.spop)
27+
c:RegisterEffect(e2)
28+
--Equip this card to 1 face-up monster on the field as an Equip Spell
29+
local e3=Effect.CreateEffect(c)
30+
e3:SetDescription(aux.Stringid(id,2))
31+
e3:SetCategory(CATEGORY_EQUIP)
32+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
33+
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
34+
e3:SetCode(EVENT_TO_GRAVE)
35+
e3:SetCountLimit(1,{id,2})
36+
e3:SetTarget(s.eqtg)
37+
e3:SetOperation(s.eqop)
38+
c:RegisterEffect(e3)
39+
end
40+
s.listed_series={SET_MIKANKO}
41+
function s.thfilter(c)
42+
return c:IsSetCard(SET_MIKANKO) and c:IsFaceup() and c:IsAbleToHand()
43+
end
44+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
45+
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.thfilter(chkc) end
46+
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
47+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
48+
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
49+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
50+
end
51+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
52+
local tc=Duel.GetFirstTarget()
53+
if tc:IsRelateToEffect(e) then
54+
Duel.SendtoHand(tc,nil,REASON_EFFECT)
55+
end
56+
end
57+
function s.spfilter(c,e,tp)
58+
return not c:IsRace(RACE_ILLUSION) and c:IsSetCard(SET_MIKANKO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
59+
end
60+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
61+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
62+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
63+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
64+
end
65+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
66+
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
67+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
68+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
69+
if #g>0 then
70+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
71+
end
72+
end
73+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except "Mikanko" monsters
74+
local e1=Effect.CreateEffect(e:GetHandler())
75+
e1:SetDescription(aux.Stringid(id,3))
76+
e1:SetType(EFFECT_TYPE_FIELD)
77+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
78+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
79+
e1:SetTargetRange(1,0)
80+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MIKANKO) end)
81+
e1:SetReset(RESET_PHASE|PHASE_END)
82+
Duel.RegisterEffect(e1,tp)
83+
end
84+
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
85+
local c=e:GetHandler()
86+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
87+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
88+
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
89+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
90+
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
91+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,0)
92+
end
93+
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
94+
local c=e:GetHandler()
95+
local tc=Duel.GetFirstTarget()
96+
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Equip(tp,c,tc) then
97+
--Equip limit
98+
local e1=Effect.CreateEffect(c)
99+
e1:SetType(EFFECT_TYPE_SINGLE)
100+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
101+
e1:SetCode(EFFECT_EQUIP_LIMIT)
102+
e1:SetValue(function(e,c) return c==tc end)
103+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
104+
c:RegisterEffect(e1)
105+
end
106+
end

pre-release/c100445058.lua

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
--ウズヒメの御巫
2+
--Uzuhime the Manifested Mikanko
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Xyz Summon procedure: 2 Level 3 "Mikanko" monsters
8+
Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MIKANKO),3,2)
9+
--Add 1 Equip Spell from your Deck or GY to your hand
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
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)
17+
e1:SetTarget(s.thtg)
18+
e1:SetOperation(s.thop)
19+
c:RegisterEffect(e1)
20+
--Cannot be destroyed by battle, also your opponent takes any battle damage you would have taken from battles involving this card
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetType(EFFECT_TYPE_SINGLE)
23+
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
24+
e2:SetValue(1)
25+
c:RegisterEffect(e2)
26+
local e3=e2:Clone()
27+
e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
28+
c:RegisterEffect(e3)
29+
--Make another attack in a row
30+
local e4=Effect.CreateEffect(c)
31+
e4:SetDescription(aux.Stringid(id,1))
32+
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
33+
e4:SetCode(EVENT_DAMAGE_STEP_END)
34+
e4:SetCondition(s.atcon)
35+
e4:SetCost(Cost.Detach(1))
36+
e4:SetOperation(s.atop)
37+
c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT)
38+
end
39+
s.listed_series={SET_MIKANKO}
40+
function s.thfilter(c)
41+
return c:IsEquipSpell() and c:IsAbleToHand()
42+
end
43+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
44+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end
45+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE)
46+
end
47+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
48+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
49+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil)
50+
if #g>0 then
51+
Duel.SendtoHand(g,nil,REASON_EFFECT)
52+
Duel.ConfirmCards(1-tp,g)
53+
end
54+
end
55+
function s.atcon(e,tp,eg,ep,ev,re,r,rp)
56+
local c=e:GetHandler()
57+
return Duel.GetAttacker()==c and c:CanChainAttack(0)
58+
end
59+
function s.atop(e,tp,eg,ep,ev,re,r,rp)
60+
if e:GetHandler():IsRelateToBattle() then
61+
Duel.ChainAttack()
62+
end
63+
end

pre-release/c100445059.lua

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
--御巫神舞-二貴子
2+
--Mikanko Divine Dance - Futahashira no Uzu no Miko
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Send 1 "Mikanko" card from your Deck to the GY, except "Mikanko Divine Dance - Futahashira no Uzu no Miko", then you can Set 1 "Mikanko" Spell/Trap from your Deck, except "Mikanko Divine Dance - Futahashira no Uzu no Miko"
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOGRAVE)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetCountLimit(1,id)
13+
e1:SetTarget(s.tgtg)
14+
e1:SetOperation(s.tgop)
15+
c:RegisterEffect(e1)
16+
--Special Summon 1 "Mikanko" Ritual Monster from your hand or Deck
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetRange(LOCATION_GRAVE)
22+
e2:SetCountLimit(1,id)
23+
e2:SetCost(Cost.AND(Cost.SelfBanish,s.spcost))
24+
e2:SetTarget(s.sptg)
25+
e2:SetOperation(s.spop)
26+
c:RegisterEffect(e2)
27+
end
28+
s.listed_names={id}
29+
s.listed_series={SET_MIKANKO}
30+
function s.tgfilter(c)
31+
return c:IsSetCard(SET_MIKANKO) and c:IsAbleToGrave() and not c:IsCode(id)
32+
end
33+
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
34+
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
35+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
36+
end
37+
function s.setfilter(c)
38+
return c:IsSetCard(SET_MIKANKO) and c:IsSpellTrap() and c:IsSSetable() and not c:IsCode(id)
39+
end
40+
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
42+
local dg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
43+
if #dg>0 and Duel.SendtoGrave(dg,REASON_EFFECT)>0 and dg:GetFirst():IsLocation(LOCATION_GRAVE) then
44+
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
45+
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
47+
local sg=g:Select(tp,1,1,nil)
48+
if #sg>0 then
49+
Duel.BreakEffect()
50+
Duel.SSet(tp,sg)
51+
end
52+
end
53+
end
54+
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
55+
--You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves, except "Mikanko" monsters
56+
local e1=Effect.CreateEffect(e:GetHandler())
57+
e1:SetDescription(aux.Stringid(id,3))
58+
e1:SetType(EFFECT_TYPE_FIELD)
59+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
60+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
61+
e1:SetTargetRange(1,0)
62+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MIKANKO) end)
63+
e1:SetReset(RESET_PHASE|PHASE_END)
64+
Duel.RegisterEffect(e1,tp)
65+
end
66+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
67+
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
68+
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
69+
end
70+
function s.spfilter(c,e,tp)
71+
return c:IsSetCard(SET_MIKANKO) and c:IsRitualMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
72+
end
73+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
74+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
75+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end
76+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
77+
end
78+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
79+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
80+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
81+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp)
82+
if #g>0 then
83+
Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP)
84+
end
85+
end

pre-release/c101302006.lua

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
--剛鬼マシン・スープレックス
2+
--Gouki Mashin Suprex
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon both this card and 1 "Gouki" monster in your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
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 "Gouki" card from your Deck to your hand, except "Gouki Mashin Suprex"
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(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end)
26+
e2:SetTarget(s.thtg)
27+
e2:SetOperation(s.thop)
28+
c:RegisterEffect(e2)
29+
end
30+
s.listed_series={SET_GOUKI}
31+
s.listed_names={id}
32+
function s.spcostfilter(c,e,tp)
33+
return c:IsSetCard(SET_GOUKI) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
34+
end
35+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
36+
local c=e:GetHandler()
37+
if chk==0 then return not c:IsPublic()
38+
and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
40+
local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst()
41+
e:SetLabelObject(rc)
42+
rc:CreateEffectRelation(e)
43+
Duel.ConfirmCards(1-tp,Group.FromCards(c,rc))
44+
Duel.ShuffleHand(tp)
45+
end
46+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
47+
local c=e:GetHandler()
48+
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
49+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
50+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
51+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,e:GetLabelObject()),2,tp,0)
52+
end
53+
function s.spfilter(c,e,tp)
54+
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
55+
end
56+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
57+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end
58+
local c=e:GetHandler()
59+
local sg=Group.FromCards(c,e:GetLabelObject())
60+
if sg:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
61+
for sc in sg:Iter() do
62+
sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
63+
--You cannot Special Summon, except "Gouki" monsters, while you control either of those face-up monsters
64+
local e1=Effect.CreateEffect(e:GetHandler())
65+
e1:SetType(EFFECT_TYPE_FIELD)
66+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
67+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
68+
e1:SetRange(LOCATION_MZONE)
69+
e1:SetAbsoluteRange(tp,1,0)
70+
e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end)
71+
e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end)
72+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
73+
sc:RegisterEffect(e1,true)
74+
end
75+
end
76+
end
77+
function s.thfilter(c)
78+
return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand()
79+
end
80+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
81+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
82+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
83+
end
84+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
85+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
86+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
87+
if #g>0 then
88+
Duel.SendtoHand(g,nil,REASON_EFFECT)
89+
Duel.ConfirmCards(1-tp,g)
90+
end
91+
end

0 commit comments

Comments
 (0)