Skip to content

Commit 71fe314

Browse files
authored
Added new card scripts
1 parent 21ad080 commit 71fe314

File tree

10 files changed

+884
-0
lines changed

10 files changed

+884
-0
lines changed

pre-release/c100442016.lua

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
--カプシー☆ヤミー
2+
--Cupsie☆Yummy
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control a Link-1 monster or a Level 2 Synchro Monster, you can Special Summon this card (from your hand)
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetCondition(s.spcon)
15+
c:RegisterEffect(e1)
16+
--Add 1 "Yummy" card from your Deck to your hand, except "Cupsie☆Yummy", or, if this card was Special Summoned by a Synchro Monster's effect, you can draw 1 card instead
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
20+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e2:SetProperty(EFFECT_FLAG_DELAY)
22+
e2:SetCode(EVENT_SUMMON_SUCCESS)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetTarget(s.thtg)
25+
e2:SetOperation(s.thop)
26+
c:RegisterEffect(e2)
27+
local e3=e2:Clone()
28+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
29+
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
30+
c:RegisterEffect(e3)
31+
end
32+
s.listed_series={SET_YUMMY}
33+
s.listed_names={id}
34+
function s.spconfilter(c)
35+
return (c:IsLink(1) or (c:IsType(TYPE_SYNCHRO) and c:IsLevel(2))) and c:IsFaceup()
36+
end
37+
function s.spcon(e,c)
38+
if c==nil then return true end
39+
local tp=e:GetHandlerPlayer()
40+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil)
41+
end
42+
function s.thfilter(c)
43+
return c:IsSetCard(SET_YUMMY) and not c:IsCode(id) and c:IsAbleToHand()
44+
end
45+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
46+
local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO)
47+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
48+
or (sp_chk and Duel.IsPlayerCanDraw(tp,1)) end
49+
e:SetLabel(sp_chk and 1 or 0)
50+
if sp_chk then
51+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
52+
Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
53+
else
54+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
55+
end
56+
end
57+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
58+
local sp_chk=e:GetLabel()==1
59+
local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
60+
local b2=sp_chk and Duel.IsPlayerCanDraw(tp,1)
61+
if not (b1 or b2) then return end
62+
local op=nil
63+
if sp_chk then
64+
op=Duel.SelectEffect(tp,
65+
{b1,aux.Stringid(id,2)},
66+
{b2,aux.Stringid(id,3)})
67+
else
68+
op=1
69+
end
70+
if op==1 then
71+
--Add 1 "Yummy" card from your Deck to your hand, except "Cupsie☆Yummy"
72+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
73+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
74+
if #g>0 then
75+
Duel.SendtoHand(g,nil,REASON_EFFECT)
76+
Duel.ConfirmCards(1-tp,g)
77+
end
78+
elseif op==2 then
79+
--Draw 1 card
80+
Duel.Draw(tp,1,REASON_EFFECT)
81+
end
82+
end

pre-release/c100442017.lua

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
--クッキィ☆ヤミー
2+
--Cooky☆Yummy
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control a Link-1 monster or a Level 2 Synchro Monster, you can Special Summon this card (from your hand)
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetCondition(s.spcon)
15+
c:RegisterEffect(e1)
16+
--Make 1 opponent's face-up monster lose 1000 ATK, or, if this card was Special Summoned by a Synchro Monster's effect, you can destroy that monster instead
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_ATKCHANGE)
20+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
22+
e2:SetCode(EVENT_SUMMON_SUCCESS)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetTarget(s.atktg)
25+
e2:SetOperation(s.atkop)
26+
c:RegisterEffect(e2)
27+
local e3=e2:Clone()
28+
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
29+
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
30+
c:RegisterEffect(e3)
31+
end
32+
s.listed_series={SET_YUMMY}
33+
function s.spconfilter(c)
34+
return (c:IsLink(1) or (c:IsType(TYPE_SYNCHRO) and c:IsLevel(2))) and c:IsFaceup()
35+
end
36+
function s.spcon(e,c)
37+
if c==nil then return true end
38+
local tp=e:GetHandlerPlayer()
39+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil)
40+
end
41+
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
42+
local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO)
43+
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
44+
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
45+
e:SetLabel(sp_chk and 1 or 0)
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
47+
local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
48+
if sp_chk then
49+
Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000)
50+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0)
51+
else
52+
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,-1000)
53+
end
54+
end
55+
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
56+
local tc=Duel.GetFirstTarget()
57+
if not tc:IsRelateToEffect(e) then return end
58+
local sp_chk=e:GetLabel()==1
59+
local b1=tc:IsFaceup()
60+
local b2=sp_chk
61+
if not (b1 or b2) then return end
62+
local op=nil
63+
if sp_chk then
64+
op=Duel.SelectEffect(tp,
65+
{b1,aux.Stringid(id,2)},
66+
{b2,aux.Stringid(id,3)})
67+
else
68+
op=1
69+
end
70+
if op==1 then
71+
--It loses 1000 ATK
72+
tc:UpdateAttack(-1000,nil,e:GetHandler())
73+
elseif op==2 then
74+
--Destroy it
75+
Duel.Destroy(tc,REASON_EFFECT)
76+
end
77+
end

pre-release/c100442018.lua

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
--ロリポー☆ヤミー
2+
--Lollipo☆Yummy
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control a Link-1 monster or a Level 2 Synchro Monster, you can Special Summon this card (from your hand)
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
14+
e1:SetCondition(s.spcon)
15+
c:RegisterEffect(e1)
16+
--Shuffle 1 card from your opponent's GY into the Deck, or, if this card was Special Summoned by a Synchro Monster's effect, you can banish that card instead
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_TODECK)
20+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
22+
e2:SetCode(EVENT_SUMMON_SUCCESS)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetTarget(s.tdtg)
25+
e2:SetOperation(s.tdop)
26+
c:RegisterEffect(e2)
27+
local e3=e2:Clone()
28+
e3:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE)
29+
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
30+
c:RegisterEffect(e3)
31+
end
32+
s.listed_series={SET_YUMMY}
33+
function s.spconfilter(c)
34+
return (c:IsLink(1) or (c:IsType(TYPE_SYNCHRO) and c:IsLevel(2))) and c:IsFaceup()
35+
end
36+
function s.spcon(e,c)
37+
if c==nil then return true end
38+
local tp=e:GetHandlerPlayer()
39+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil)
40+
end
41+
function s.tgfilter(c,sp_chk)
42+
return c:IsAbleToDeck() or (sp_chk and c:IsAbleToRemove())
43+
end
44+
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
45+
local sp_chk=re and e:GetHandler():IsSpecialSummoned() and re:IsMonsterEffect() and re:GetHandler():IsOriginalType(TYPE_SYNCHRO)
46+
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tgfilter(chkc,e:GetLabel()==1) end
47+
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_GRAVE,1,nil,sp_chk) end
48+
e:SetLabel(sp_chk and 1 or 0)
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
50+
local g=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_GRAVE,1,1,nil,sp_chk)
51+
if sp_chk then
52+
Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,g,1,tp,0)
53+
Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0)
54+
else
55+
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0)
56+
end
57+
end
58+
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
59+
local tc=Duel.GetFirstTarget()
60+
if not tc:IsRelateToEffect(e) then return end
61+
local sp_chk=e:GetLabel()==1
62+
local b1=tc:IsAbleToDeck()
63+
local b2=sp_chk and tc:IsAbleToRemove()
64+
if not (b1 or b2) then return end
65+
local op=nil
66+
if sp_chk then
67+
op=Duel.SelectEffect(tp,
68+
{b1,aux.Stringid(id,2)},
69+
{b2,aux.Stringid(id,3)})
70+
else
71+
op=1
72+
end
73+
if op==1 then
74+
--Shuffle it into the Deck
75+
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
76+
elseif op==2 then
77+
--Banish it
78+
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
79+
end
80+
end

pre-release/c100442019.lua

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
--カプシー★ヤミーウェイ
2+
--Cupsie★Yummy Way
3+
--scripted by Zedja
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: 1 Tuner + 1 non-Tuner monster
8+
Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(aux.NOT(Card.IsLinkMonster)),1,1,aux.FilterBoolFunction(Card.IsLink,1))
9+
--For this card's Synchro Summon, you can treat 1 Link-1 monster you control as a Level 1 Tuner
10+
local e0=Effect.CreateEffect(c)
11+
e0:SetType(EFFECT_TYPE_FIELD)
12+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
13+
e0:SetCode(EFFECT_SYNCHRO_LEVEL)
14+
e0:SetRange(LOCATION_EXTRA)
15+
e0:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
16+
e0:SetTarget(function(e,c) return c:IsLink(1) end)
17+
e0:SetValue(function(e,sc) return sc:IsSetCard(SET_YUMMY) and 1 or 0 end)
18+
c:RegisterEffect(e0)
19+
--Add 2 "Yummy" monsters from your Deck to your hand, then discard 1 card
20+
local e1=Effect.CreateEffect(c)
21+
e1:SetDescription(aux.Stringid(id,0))
22+
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES)
23+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
24+
e1:SetProperty(EFFECT_FLAG_DELAY)
25+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
26+
e1:SetCountLimit(1,id)
27+
e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end)
28+
e1:SetTarget(s.thtg)
29+
e1:SetOperation(s.thop)
30+
c:RegisterEffect(e1)
31+
--Special Summon up to 2 "Yummy" monsters from your GY
32+
local e2=Effect.CreateEffect(c)
33+
e2:SetDescription(aux.Stringid(id,1))
34+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
35+
e2:SetType(EFFECT_TYPE_QUICK_O)
36+
e2:SetCode(EVENT_CHAINING)
37+
e2:SetRange(LOCATION_MZONE)
38+
e2:SetCountLimit(1,{id,1})
39+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end)
40+
e2:SetCost(aux.SelfToExtraCost)
41+
e2:SetTarget(s.gysptg)
42+
e2:SetOperation(s.gyspop)
43+
c:RegisterEffect(e2)
44+
end
45+
s.listed_series={SET_YUMMY}
46+
function s.thfilter(c)
47+
return c:IsSetCard(SET_YUMMY) and c:IsMonster() and c:IsAbleToHand()
48+
end
49+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
50+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) end
51+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
52+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
53+
end
54+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
55+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
56+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil)
57+
if #g==2 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
58+
Duel.ConfirmCards(1-tp,g)
59+
Duel.ShuffleHand(tp)
60+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
61+
local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_EFFECT)
62+
if #dg>0 then
63+
Duel.BreakEffect()
64+
Duel.SendtoGrave(dg,REASON_DISCARD|REASON_EFFECT)
65+
end
66+
end
67+
end
68+
function s.spfilter(c,e,tp)
69+
return c:IsSetCard(SET_YUMMY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
70+
end
71+
function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk)
72+
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
73+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
74+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
75+
end
76+
function s.gyspop(e,tp,eg,ep,ev,re,r,rp)
77+
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
78+
if ft<=0 then return end
79+
ft=math.min(ft,2)
80+
if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end
81+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
82+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
83+
if #g>0 then
84+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
85+
end
86+
end

0 commit comments

Comments
 (0)