Skip to content

Commit 07eceeb

Browse files
authored
Added new card scripts
1 parent a988b90 commit 07eceeb

14 files changed

+1007
-0
lines changed

pre-release/c100456001.lua

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
--ダークティラノ
2+
--Dark Tyranno
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Can attack directly if all monsters your opponent controls are in Defense Position
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_SINGLE)
9+
e1:SetCode(EFFECT_DIRECT_ATTACK)
10+
e1:SetCondition(s.directattackcond)
11+
c:RegisterEffect(e1)
12+
--During your Main Phase, if a Spell Card or effect was activated this turn: You can Special Summon this card from your hand
13+
local e2=Effect.CreateEffect(c)
14+
e2:SetDescription(aux.Stringid(id,0))
15+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
16+
e2:SetType(EFFECT_TYPE_IGNITION)
17+
e2:SetRange(LOCATION_HAND)
18+
e2:SetCountLimit(1,{id,0})
19+
e2:SetCondition(function() return Duel.GetCustomActivityCount(id,0,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1,ACTIVITY_CHAIN)>0 end)
20+
e2:SetTarget(s.sptg)
21+
e2:SetOperation(s.spop)
22+
c:RegisterEffect(e2)
23+
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end)
24+
--If this card is sent to the GY: You can add 1 Level 8 or higher Dinosaur monster from your Deck to your hand, then you can Special Summon it if your opponent controls a monster
25+
local e3=Effect.CreateEffect(c)
26+
e3:SetDescription(aux.Stringid(id,1))
27+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
28+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
29+
e3:SetProperty(EFFECT_FLAG_DELAY)
30+
e3:SetCode(EVENT_TO_GRAVE)
31+
e3:SetCountLimit(1,{id,1})
32+
e3:SetTarget(s.thtg)
33+
e3:SetOperation(s.thop)
34+
c:RegisterEffect(e3)
35+
end
36+
function s.directattackcond(e)
37+
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),0,LOCATION_MZONE)
38+
return #g==g:FilterCount(Card.IsDefensePos,nil)
39+
end
40+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
41+
local c=e:GetHandler()
42+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
43+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
44+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
45+
end
46+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
47+
local c=e:GetHandler()
48+
if c:IsRelateToEffect(e) then
49+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
50+
end
51+
end
52+
function s.thfilter(c)
53+
return c:IsLevelAbove(8) and c:IsRace(RACE_DINOSAUR) and c:IsAbleToHand()
54+
end
55+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
56+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
57+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
58+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
59+
end
60+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
61+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
62+
local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
63+
if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then
64+
Duel.ConfirmCards(1-tp,sc)
65+
Duel.ShuffleHand(tp)
66+
if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
67+
and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
68+
Duel.BreakEffect()
69+
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
70+
end
71+
end
72+
end

pre-release/c100456002.lua

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
--アルカナフォースⅩⅡ-THE HANGED MAN
2+
--Arcana Force XII - The Hangman
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--When a card or effect is activated (Quick Effect): You can reveal this card in your hand; Special Summon 1 "Arcana Force" monster from your hand in Defense Position. You can only use this effect of "Arcana Force XII - The Hangman" once per turn
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_QUICK_O)
11+
e1:SetCode(EVENT_CHAINING)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id)
14+
e1:SetCost(Cost.SelfReveal)
15+
e1:SetTarget(s.sptg)
16+
e1:SetOperation(s.spop)
17+
c:RegisterEffect(e1)
18+
--If this card is Summoned: Toss a coin
19+
local e2a=Effect.CreateEffect(c)
20+
e2a:SetDescription(aux.Stringid(id,1))
21+
e2a:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY+CATEGORY_DAMAGE)
22+
e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
23+
e2a:SetCode(EVENT_SUMMON_SUCCESS)
24+
e2a:SetTarget(s.cointg)
25+
e2a:SetOperation(s.coinop)
26+
c:RegisterEffect(e2a)
27+
local e2b=e2a:Clone()
28+
e2b:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
29+
c:RegisterEffect(e2b)
30+
local e2c=e2b:Clone()
31+
e2c:SetCode(EVENT_SPSUMMON_SUCCESS)
32+
c:RegisterEffect(e2c)
33+
end
34+
s.listed_series={SET_ARCANA_FORCE}
35+
s.toss_coin=true
36+
function s.spfilter(c,e,tp)
37+
return c:IsSetCard(SET_ARCANA_FORCE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
38+
end
39+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
40+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
41+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
42+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
43+
end
44+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
45+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
47+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
48+
if #g>0 then
49+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
50+
end
51+
end
52+
function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
53+
if chk==0 then return true end
54+
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
55+
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
56+
if g:GetClassCount(Card.GetControler)==2 or Duel.IsPlayerAffectedByEffect(tp,CARD_LIGHT_BARRIER) then
57+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
58+
end
59+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE)
60+
Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_EITHER,0)
61+
end
62+
function s.coinop(e,tp,eg,ep,ev,re,r,rp)
63+
local coin=nil
64+
if Duel.IsPlayerAffectedByEffect(tp,CARD_LIGHT_BARRIER) then
65+
local b1=Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil)
66+
local b2=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil)
67+
local op=Duel.SelectEffect(tp,
68+
{b1,aux.GetCoinEffectHintString(COIN_HEADS)},
69+
{b2,aux.GetCoinEffectHintString(COIN_TAILS)})
70+
if not op then return end
71+
coin=op==1 and COIN_HEADS or COIN_TAILS
72+
else
73+
coin=Duel.TossCoin(tp,1)
74+
end
75+
if coin==COIN_HEADS then
76+
--● Heads: Destroy 1 monster you control, and if you do, take damage equal to its original ATK
77+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
78+
local sc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
79+
if not sc then return end
80+
Duel.HintSelection(sc)
81+
if Duel.Destroy(sc,REASON_EFFECT)>0 then
82+
Duel.Damage(tp,sc:GetTextAttack(),REASON_EFFECT)
83+
end
84+
elseif coin==COIN_TAILS then
85+
--● Tails: Destroy 1 monster your opponent controls, and if you do, inflict damage to your opponent equal to its original ATK
86+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
87+
local sc=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
88+
if not sc then return end
89+
Duel.HintSelection(sc)
90+
if Duel.Destroy(sc,REASON_EFFECT)>0 then
91+
Duel.Damage(1-tp,sc:GetTextAttack(),REASON_EFFECT)
92+
end
93+
end
94+
end

pre-release/c100456003.lua

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
--光幻獣 カンデラード
2+
--Candelato, the Beast of Light
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Gains 1000 ATK/DEF for each card in your hand
7+
local e1a=Effect.CreateEffect(c)
8+
e1a:SetType(EFFECT_TYPE_SINGLE)
9+
e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
10+
e1a:SetCode(EFFECT_UPDATE_ATTACK)
11+
e1a:SetRange(LOCATION_MZONE)
12+
e1a:SetValue(function(e,c) return 1000*Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0) end)
13+
c:RegisterEffect(e1a)
14+
local e1b=e1a:Clone()
15+
e1b:SetCode(EFFECT_UPDATE_DEFENSE)
16+
c:RegisterEffect(e1b)
17+
--You can discard 2 other cards; Special Summon this card from your hand, then you can add 1 card from your Deck to your hand that has a coin tossing effect
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,0))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
21+
e2:SetType(EFFECT_TYPE_IGNITION)
22+
e2:SetRange(LOCATION_HAND)
23+
e2:SetCountLimit(1,{id,0})
24+
e2:SetCost(Cost.Discard(nil,true,2))
25+
e2:SetTarget(s.sptg)
26+
e2:SetOperation(s.spop)
27+
c:RegisterEffect(e2)
28+
--When a card or effect is activated that includes an effect that adds a card(s) from the Deck to the hand (Quick Effect): You can negate that effect
29+
local e3=Effect.CreateEffect(c)
30+
e3:SetDescription(aux.Stringid(id,1))
31+
e3:SetCategory(CATEGORY_DISABLE)
32+
e3:SetType(EFFECT_TYPE_QUICK_O)
33+
e3:SetCode(EVENT_CHAINING)
34+
e3:SetRange(LOCATION_MZONE)
35+
e3:SetCountLimit(1,{id,1})
36+
e3:SetCondition(s.discon)
37+
e3:SetTarget(s.distg)
38+
e3:SetOperation(s.disop)
39+
c:RegisterEffect(e3)
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+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
47+
end
48+
function s.thfilter(c)
49+
return c.toss_coin and c:IsAbleToHand()
50+
end
51+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
52+
local c=e:GetHandler()
53+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
54+
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
55+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
57+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
58+
if #g>0 then
59+
Duel.BreakEffect()
60+
Duel.SendtoHand(g,nil,REASON_EFFECT)
61+
Duel.ConfirmCards(1-tp,g)
62+
end
63+
end
64+
end
65+
function s.discon(e,tp,eg,ep,ev,re,r,rp)
66+
if not Duel.IsChainDisablable(ev) then return false end
67+
if re:IsHasCategory(CATEGORY_SEARCH) or re:IsHasCategory(CATEGORY_DRAW) then return true end
68+
local found_opinfo,group_opinfo,_,_,locations_opinfo=Duel.GetOperationInfo(ev,CATEGORY_TOHAND)
69+
local found_popinfo,group_popinfo,_,_,locations_popinfo=Duel.GetPossibleOperationInfo(ev,CATEGORY_TOHAND)
70+
if not (found_opinfo or found_popinfo) then return false end
71+
local g=Group.CreateGroup()
72+
if group_opinfo then g:Merge(group_opinfo) end
73+
if group_popinfo then g:Merge(group_popinfo) end
74+
return (((locations_opinfo or 0)|(locations_popinfo or 0))&LOCATION_DECK)>0 or (#g>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK))
75+
end
76+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
77+
if chk==0 then return true end
78+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0)
79+
end
80+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
81+
Duel.NegateEffect(ev)
82+
end

pre-release/c100456004.lua

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
--プラズマ戦士エイトム
2+
--Plasma Warrior Eitom
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
c:AddMustBeSpecialSummoned()
8+
--Must be Special Summoned (from your hand or GY) by Tributing 1 Level 7 or higher monster. You can only Special Summon "Plasma Warrior Eitom" once per turn this way
9+
local e0=Effect.CreateEffect(c)
10+
e0:SetDescription(aux.Stringid(id,0))
11+
e0:SetType(EFFECT_TYPE_FIELD)
12+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
13+
e0:SetCode(EFFECT_SPSUMMON_PROC)
14+
e0:SetRange(LOCATION_HAND|LOCATION_GRAVE)
15+
e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
16+
e0:SetCondition(s.spcon)
17+
e0:SetTarget(s.sptg)
18+
e0:SetOperation(s.spop)
19+
c:RegisterEffect(e0)
20+
--Once per turn: You can send 1 "Magnet Warrior" or "Magna Warrior" monster from your Deck to the GY, except "Plasma Warrior Eitom"; for the rest of this turn, this card's original ATK becomes 1500, also it can attack directly
21+
local e1=Effect.CreateEffect(c)
22+
e1:SetDescription(aux.Stringid(id,1))
23+
e1:SetCategory(CATEGORY_ATKCHANGE)
24+
e1:SetType(EFFECT_TYPE_IGNITION)
25+
e1:SetRange(LOCATION_MZONE)
26+
e1:SetCountLimit(1)
27+
e1:SetCondition(function(e) local c=e:GetHandler() return not (c:IsBaseAttack(1500) and c:IsHasEffect(EFFECT_DIRECT_ATTACK)) end)
28+
e1:SetCost(s.atkcost)
29+
e1:SetOperation(s.atkop)
30+
c:RegisterEffect(e1)
31+
end
32+
s.listed_series={SET_MAGNET_WARRIOR,SET_MAGNA_WARRIOR}
33+
s.listed_names={id}
34+
function s.spcon(e,c)
35+
if c==nil then return true end
36+
local tp=c:GetControler()
37+
return Duel.CheckReleaseGroup(tp,Card.IsLevelAbove,1,false,1,true,c,tp,nil,false,nil,7)
38+
end
39+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
40+
local g=Duel.SelectReleaseGroup(tp,Card.IsLevelAbove,1,1,false,true,true,c,nil,nil,false,nil,7)
41+
if g and #g>0 then
42+
e:SetLabelObject(g)
43+
return true
44+
end
45+
return false
46+
end
47+
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
48+
local g=e:GetLabelObject()
49+
if g then
50+
Duel.Release(g,REASON_COST)
51+
end
52+
end
53+
function s.atkcostfilter(c)
54+
return c:IsSetCard({SET_MAGNET_WARRIOR,SET_MAGNA_WARRIOR}) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGraveAsCost()
55+
end
56+
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
57+
if chk==0 then return Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_DECK,0,1,1,nil) end
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
59+
local g=Duel.SelectMatchingCard(tp,s.atkcostfilter,tp,LOCATION_DECK,0,1,1,nil)
60+
Duel.SendtoGrave(g,REASON_COST)
61+
end
62+
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
63+
local c=e:GetHandler()
64+
if c:IsRelateToEffect(e) then
65+
if c:IsFaceup() then
66+
--For the rest of this turn, this card's original ATK becomes 1500
67+
local e1=Effect.CreateEffect(c)
68+
e1:SetType(EFFECT_TYPE_SINGLE)
69+
e1:SetCode(EFFECT_SET_BASE_ATTACK)
70+
e1:SetValue(1500)
71+
e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END)
72+
c:RegisterEffect(e1)
73+
end
74+
--Also it can attack directly
75+
local e2=Effect.CreateEffect(c)
76+
e2:SetDescription(3205)
77+
e2:SetType(EFFECT_TYPE_SINGLE)
78+
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
79+
e2:SetCode(EFFECT_DIRECT_ATTACK)
80+
e2:SetReset(RESETS_STANDARD_PHASE_END)
81+
c:RegisterEffect(e2)
82+
end
83+
end

0 commit comments

Comments
 (0)