Skip to content

Commit 4af87c6

Browse files
authored
Added new card scripts
1 parent 5cb4464 commit 4af87c6

7 files changed

Lines changed: 556 additions & 0 deletions

File tree

pre-release/c100200291.lua

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
--カプセル・モンスター・チェス
2+
--Capsule Monster Chess
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_ACTIVATE)
9+
e0:SetCode(EVENT_FREE_CHAIN)
10+
c:RegisterEffect(e0)
11+
--During the Main Phase: The turn player can target 1 monster in their GY; they place it face-up in their Spell & Trap Zone as a Continuous Spell
12+
local e1=Effect.CreateEffect(c)
13+
e1:SetDescription(aux.Stringid(id,0))
14+
e1:SetCategory(CATEGORY_LEAVE_GRAVE)
15+
e1:SetType(EFFECT_TYPE_IGNITION)
16+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_BOTH_SIDE)
17+
e1:SetRange(LOCATION_FZONE)
18+
e1:SetCountLimit(1,{id,0})
19+
e1:SetTarget(s.pltg)
20+
e1:SetOperation(s.plop)
21+
c:RegisterEffect(e1)
22+
--During the End Phase: The turn player can send 1 face-up Monster Card they control to the GY; they Special Summon 1 monster from their Deck with the same original Type and Attribute, but 1, 2, or 3 original Levels higher
23+
local e2=Effect.CreateEffect(c)
24+
e2:SetDescription(aux.Stringid(id,1))
25+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
26+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
27+
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
28+
e2:SetCode(EVENT_PHASE+PHASE_END)
29+
e2:SetRange(LOCATION_FZONE)
30+
e2:SetCountLimit(1,{id,1})
31+
e2:SetCondition(function(e,tp)
32+
return Duel.IsTurnPlayer(tp)
33+
end)
34+
e2:SetCost(s.spcost)
35+
e2:SetTarget(s.sptg)
36+
e2:SetOperation(s.spop)
37+
c:RegisterEffect(e2)
38+
end
39+
function s.plfilter(c,tp)
40+
return c:IsMonster() and not c:IsForbidden() and c:CheckUniqueOnField(tp)
41+
end
42+
function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
43+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.plfilter(chkc,tp) end
44+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
45+
and Duel.IsExistingTarget(s.plfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
47+
local g=Duel.SelectTarget(tp,s.plfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
48+
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0)
49+
end
50+
function s.plop(e,tp,eg,ep,ev,re,r,rp)
51+
local tc=Duel.GetFirstTarget()
52+
if tc:IsRelateToEffect(e) and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
53+
--Treated as a Continuous Spell
54+
local e1=Effect.CreateEffect(e:GetHandler())
55+
e1:SetType(EFFECT_TYPE_SINGLE)
56+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
57+
e1:SetCode(EFFECT_CHANGE_TYPE)
58+
e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS)
59+
e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET))
60+
tc:RegisterEffect(e1)
61+
end
62+
end
63+
function s.spcostfilter(c,e,tp)
64+
return c:IsMonsterCard() and c:IsFaceup() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
65+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalRace(),c:GetOriginalAttribute(),c:GetOriginalLevel())
66+
end
67+
function s.spfilter(c,e,tp,original_race,original_attr,original_lv)
68+
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsOriginalRace(original_race) and c:IsOriginalAttribute(original_attr)
69+
and c:IsLevelBetween(original_lv+1,original_lv+3)
70+
end
71+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
72+
if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
73+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
74+
local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp):GetFirst()
75+
Duel.SendtoGrave(sc,REASON_COST)
76+
local cd=e:GetChainData()
77+
cd.original_race=sc:GetOriginalRace()
78+
cd.original_attr=sc:GetOriginalAttribute()
79+
cd.original_lv=sc:GetOriginalLevel()
80+
end
81+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
82+
if chk==0 then return true end
83+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
84+
end
85+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
86+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
87+
local cd=e:GetChainData()
88+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
89+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,cd.original_race,cd.original_attr,cd.original_lv)
90+
if #g>0 then
91+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
92+
end
93+
end

pre-release/c101402024.lua

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
--魔救の調律者
2+
--Adamancipator Conductor
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If this card is in your hand: You can place 1 other "Adamancipator" card from your hand on top of the Deck; Special Summon this card
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,0})
13+
e1:SetCost(s.spcost)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--During your Main Phase: You can excavate the top 5 cards of your Deck, and if you do, you can Special Summon 1 excavated Level 4 or lower Rock monster, also place the rest on the bottom of the Deck in any order
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
21+
e2:SetType(EFFECT_TYPE_IGNITION)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetTarget(s.excavtg)
25+
e2:SetOperation(s.excavop)
26+
c:RegisterEffect(e2)
27+
end
28+
s.listed_series={SET_ADAMANCIPATOR}
29+
function s.spcostfilter(c)
30+
return c:IsSetCard(SET_ADAMANCIPATOR) and c:IsAbleToDeckAsCost()
31+
end
32+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
33+
local c=e:GetHandler()
34+
if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c) end
35+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
36+
local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c)
37+
Duel.ConfirmCards(1-tp,g)
38+
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST)
39+
Duel.ConfirmDecktop(tp,1)
40+
end
41+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
42+
local c=e:GetHandler()
43+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
44+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
45+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
46+
end
47+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
48+
local c=e:GetHandler()
49+
if c:IsRelateToEffect(e) then
50+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
51+
end
52+
end
53+
function s.excavtg(e,tp,eg,ep,ev,re,r,rp,chk)
54+
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
55+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
56+
end
57+
function s.excavspfilter(c,e,tp)
58+
return c:IsLevelBelow(4) and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
59+
end
60+
function s.excavop(e,tp,eg,ep,ev,re,r,rp)
61+
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
62+
Duel.ConfirmDecktop(tp,5)
63+
local excavg=Duel.GetDecktopGroup(tp,5)
64+
local remaining_count=#excavg
65+
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
66+
local g=excavg:Match(s.excavspfilter,nil,e,tp)
67+
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
68+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
69+
local sg=g:Select(tp,1,1,nil)
70+
if #sg>0 then
71+
Duel.DisableShuffleCheck()
72+
remaining_count=remaining_count-1
73+
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
74+
end
75+
end
76+
end
77+
if remaining_count>0 then
78+
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>remaining_count then
79+
Duel.MoveToDeckBottom(remaining_count,tp)
80+
end
81+
Duel.SortDeckbottom(tp,tp,remaining_count)
82+
end
83+
end

pre-release/c101402025.lua

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
--魔救の奇石-ティアマイト
2+
--Adamancipator Crystal - Tiamite
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If this card is Special Summoned by an "Adamancipator" card's effect: You can add 1 "Adamancipator" card from your Deck to your hand, except "Adamancipator Crystal - Tiamite", then you can Special Summon 1 Rock monster from your hand
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_SPSUMMON_SUCCESS)
13+
e1:SetCountLimit(1,{id,0})
14+
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
15+
return re and re:IsCardSetcode(SET_ADAMANCIPATOR) and re:IsHasType(EFFECT_TYPE_ACTIONS)
16+
end)
17+
e1:SetTarget(s.thtg)
18+
e1:SetOperation(s.thop)
19+
c:RegisterEffect(e1)
20+
--If this card is in your GY: You can target 1 Rock Synchro Monster in your field or GY; return it to the Extra Deck, and if you do, place this card on top of the Deck
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,1))
23+
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TODECK)
24+
e2:SetType(EFFECT_TYPE_IGNITION)
25+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
26+
e2:SetRange(LOCATION_GRAVE)
27+
e2:SetCountLimit(1,{id,1})
28+
e2:SetTarget(s.tdtg)
29+
e2:SetOperation(s.tdop)
30+
c:RegisterEffect(e2)
31+
end
32+
s.listed_names={id}
33+
s.listed_series={SET_ADAMANCIPATOR}
34+
function s.thfilter(c)
35+
return c:IsSetCard(SET_ADAMANCIPATOR) and not c:IsCode(id) and c:IsAbleToHand()
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+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
41+
end
42+
function s.spfilter(c,e,tp)
43+
return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
44+
end
45+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
47+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
48+
if #g==0 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_HAND) then return end
49+
Duel.ConfirmCards(1-tp,g)
50+
Duel.ShuffleHand(tp)
51+
Duel.ShuffleDeck(tp)
52+
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
53+
local hg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
54+
if #hg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end
55+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
56+
local hsg=hg:Select(tp,1,1,nil)
57+
if #hsg>0 then
58+
Duel.BreakEffect()
59+
Duel.SpecialSummon(hsg,0,tp,tp,false,false,POS_FACEUP)
60+
end
61+
end
62+
function s.tdfilter(c)
63+
return c:IsRace(RACE_ROCK) and c:IsSynchroMonster() and c:IsFaceup() and c:IsAbleToExtra()
64+
end
65+
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
66+
if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
67+
local c=e:GetHandler()
68+
if chk==0 then return c:IsAbleToDeck()
69+
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end
70+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
71+
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil)
72+
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,tp,0)
73+
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0)
74+
end
75+
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
76+
local c=e:GetHandler()
77+
local tc=Duel.GetFirstTarget()
78+
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_EXTRA)
79+
and c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then
80+
Duel.ConfirmDecktop(tp,1)
81+
end
82+
end

pre-release/c101402041.lua

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
--魔救の奇跡-ティアマイト
2+
--Adamancipator Risen - Tiamite
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: 1 Tuner + 1+ non-Tuners
8+
Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99)
9+
--If you have a DARK monster in your GY: You can add 1 "Adamancipator" Spell/Trap from your Deck 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_IGNITION)
14+
e1:SetRange(LOCATION_MZONE)
15+
e1:SetCountLimit(1,{id,0})
16+
e1:SetCondition(function(e,tp)
17+
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK)
18+
end)
19+
e1:SetTarget(s.thtg)
20+
e1:SetOperation(s.thop)
21+
c:RegisterEffect(e1)
22+
--When your opponent activates a monster effect on the field (Quick Effect): You can excavate the top 5 cards of your Deck, and if you do, you can return cards your opponent controls to the hand, up to the number of excavated Rock monsters, also place the excavated cards on the bottom of the Deck in any order
23+
local e2=Effect.CreateEffect(c)
24+
e2:SetDescription(aux.Stringid(id,1))
25+
e2:SetCategory(CATEGORY_TOHAND)
26+
e2:SetType(EFFECT_TYPE_QUICK_O)
27+
e2:SetCode(EVENT_CHAINING)
28+
e2:SetRange(LOCATION_MZONE)
29+
e2:SetCountLimit(1,{id,1})
30+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
31+
return ep==1-tp and Chain.IsTriggeringLocation(ev,LOCATION_MZONE)
32+
end)
33+
e2:SetTarget(s.excavtg)
34+
e2:SetOperation(s.excavop)
35+
c:RegisterEffect(e2)
36+
end
37+
s.listed_series={SET_ADAMANCIPATOR}
38+
function s.thfilter(c,e,tp)
39+
return c:IsSetCard(SET_ADAMANCIPATOR) and c:IsSpellTrap() and c:IsAbleToHand()
40+
end
41+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
42+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
43+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
44+
end
45+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
47+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
48+
if #g>0 then
49+
Duel.SendtoHand(g,nil,REASON_EFFECT)
50+
Duel.ConfirmCards(1-tp,g)
51+
end
52+
end
53+
function s.excavtg(e,tp,eg,ep,ev,re,r,rp,chk)
54+
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
55+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD)
56+
end
57+
function s.excavop(e,tp,eg,ep,ev,re,r,rp)
58+
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
59+
Duel.ConfirmDecktop(tp,5)
60+
local excavg=Duel.GetDecktopGroup(tp,5)
61+
local excav_count=#excavg
62+
local excav_rock_count=excavg:FilterCount(Card.IsRace,nil,RACE_ROCK)
63+
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
64+
if excav_rock_count>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
65+
local return_count=math.min(#g,excav_rock_count)
66+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
67+
local sg=g:Select(tp,1,return_count,nil)
68+
if #sg>0 then
69+
Duel.HintSelection(sg)
70+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
71+
local og=Duel.GetOperatedGroup():Match(Card.IsLocation,nil,LOCATION_HAND)
72+
if #og>0 then
73+
if og:IsExists(Card.IsControler,1,nil,tp) then
74+
Duel.ShuffleHand(tp)
75+
end
76+
if og:IsExists(Card.IsControler,1,nil,1-tp) then
77+
Duel.ShuffleHand(1-tp)
78+
end
79+
end
80+
end
81+
end
82+
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>excav_count then
83+
Duel.MoveToDeckBottom(excav_count,tp)
84+
end
85+
Duel.SortDeckbottom(tp,tp,excav_count)
86+
end

0 commit comments

Comments
 (0)