Skip to content

Commit 82b2b40

Browse files
authored
Added new card scripts
1 parent 829991a commit 82b2b40

14 files changed

+1067
-0
lines changed

pre-release/c101207081.lua

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
--Japanese name
2+
--Dark Necromancer
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Send 1 Fiend or Zombie Ritual Monster from your hand or Deck to the GY, then you can add 1 Ritual Spell from your Deck to your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1:SetCountLimit(1,id)
14+
e1:SetTarget(s.tgtg)
15+
e1:SetOperation(s.tgop)
16+
c:RegisterEffect(e1)
17+
local e2=e1:Clone()
18+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e2)
20+
--Special Summon 1 of your banished Level 4 or lower Fiend or Zombie monsters
21+
local e3=Effect.CreateEffect(c)
22+
e3:SetDescription(aux.Stringid(id,1))
23+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
24+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
25+
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
26+
e3:SetCode(EVENT_REMOVE)
27+
e3:SetCountLimit(1,{id,1})
28+
e3:SetTarget(s.sptg)
29+
e3:SetOperation(s.spop)
30+
c:RegisterEffect(e3)
31+
end
32+
function s.tgfilter(c)
33+
return c:IsRace(RACE_FIEND|RACE_ZOMBIE) and c:IsRitualMonster() and c:IsAbleToGrave()
34+
end
35+
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
36+
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
37+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
38+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
39+
end
40+
function s.thfilter(c)
41+
return c:IsRitualSpell() and c:IsAbleToHand()
42+
end
43+
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
44+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
45+
local tg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
46+
if #tg>0 and Duel.SendtoGrave(tg,REASON_EFFECT)>0 and tg:GetFirst():IsLocation(LOCATION_GRAVE)
47+
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
48+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
50+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
51+
if #g==0 then return end
52+
Duel.BreakEffect()
53+
Duel.SendtoHand(g,tp,REASON_EFFECT)
54+
Duel.ConfirmCards(1-tp,g)
55+
end
56+
end
57+
function s.spfilter(c,e,tp)
58+
return c:IsRace(RACE_FIEND|RACE_ZOMBIE) and c:IsLevelBelow(4) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
59+
end
60+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
61+
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
62+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
63+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
64+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
65+
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
66+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
67+
end
68+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
69+
local tc=Duel.GetFirstTarget()
70+
if tc:IsRelateToEffect(e) then
71+
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
72+
end
73+
end

pre-release/c101207083.lua

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
--Japanese name
2+
--Curse of the Ancient Turtle
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Send 1 Zombie monster from your Deck to the GY
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:SetCost(s.tgcost)
14+
e1:SetTarget(s.tgtg)
15+
e1:SetOperation(s.tgop)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 Zombie monster with 2000 or less DEF 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_FIELD+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetCode(EVENT_BATTLE_DESTROYED)
23+
e2:SetRange(LOCATION_GRAVE)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetCondition(s.spcon)
26+
e2:SetCost(aux.SelfBanishCost)
27+
e2:SetTarget(s.sptg)
28+
e2:SetOperation(s.spop)
29+
c:RegisterEffect(e2)
30+
end
31+
function s.tgcostfilter(c)
32+
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
33+
end
34+
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
35+
if chk==0 then return Duel.IsExistingMatchingCard(s.tgcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end
36+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
37+
local g=Duel.SelectMatchingCard(tp,s.tgcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil)
38+
Duel.Remove(g,POS_FACEUP,REASON_COST)
39+
end
40+
function s.tgfilter(c)
41+
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave()
42+
end
43+
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
44+
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
45+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
46+
end
47+
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
48+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
49+
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
50+
if #g>0 then
51+
Duel.SendtoGrave(g,REASON_EFFECT)
52+
end
53+
end
54+
function s.spconfilter(c,tp)
55+
return c:IsPreviousRaceOnField(RACE_ZOMBIE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
56+
end
57+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
58+
return eg:IsExists(s.spconfilter,1,nil,tp)
59+
end
60+
function s.spfilter(c,e,tp)
61+
return c:IsRace(RACE_ZOMBIE) and c:IsDefenseBelow(2000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
62+
end
63+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
64+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
65+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
66+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
67+
end
68+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
69+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
70+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
71+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
72+
if #g>0 then
73+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
74+
end
75+
end

pre-release/c101208005.lua

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
--E-HERO ヴィシャス・クローズ
2+
--Evil HERO Vicious Claws
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from the hand and increase the targeted monster's ATK by 300
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCountLimit(1,id)
14+
e1:SetTarget(s.handsptg)
15+
e1:SetOperation(s.handspop)
16+
c:RegisterEffect(e1)
17+
--Special Summon this card from the GY
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
21+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
23+
e2:SetRange(LOCATION_GRAVE)
24+
e2:SetCode(EVENT_DESTROYED)
25+
e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL)
26+
e2:SetCondition(s.gyspcon)
27+
e2:SetTarget(s.gysptg)
28+
e2:SetOperation(s.gyspop)
29+
c:RegisterEffect(e2)
30+
end
31+
s.listed_series={SET_HERO}
32+
s.listes_names={CARD_DARK_FUSION}
33+
function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
34+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and c:IsSetCard(SET_HERO) end
35+
local c=e:GetHandler()
36+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
37+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
38+
and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_HERO),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF)
40+
local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_HERO),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
41+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
42+
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,300)
43+
end
44+
function s.handspop(e,tp,eg,ep,ev,re,r,rp)
45+
local c=e:GetHandler()
46+
local tc=Duel.GetFirstTarget()
47+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0
48+
and tc:IsFaceup() and tc:IsRelateToEffect(e) then
49+
--That monster gains 300 ATK
50+
local e1=Effect.CreateEffect(c)
51+
e1:SetType(EFFECT_TYPE_SINGLE)
52+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
53+
e1:SetCode(EFFECT_UPDATE_ATTACK)
54+
e1:SetValue(300)
55+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
56+
tc:RegisterEffect(e1)
57+
end
58+
end
59+
function s.gyspconfilter(c,tp)
60+
return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
61+
end
62+
function s.gyspcon(e,tp,eg,ep,ev,re,r,rp)
63+
return eg:IsExists(s.gyspconfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
64+
end
65+
function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk)
66+
local c=e:GetHandler()
67+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
68+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
69+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
70+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD)
71+
end
72+
function s.darkfusfilter(c)
73+
return c:IsMonster() and c:ListsCode(CARD_DARK_FUSION)
74+
end
75+
function s.gyspop(e,tp,eg,ep,ev,re,r,rp)
76+
local c=e:GetHandler()
77+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
78+
and Duel.IsExistingMatchingCard(s.darkfusfilter,tp,LOCATION_GRAVE,0,1,nil) then
79+
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
80+
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
81+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
82+
local sg=g:Select(tp,1,1,nil)
83+
Duel.HintSelection(sg)
84+
Duel.BreakEffect()
85+
Duel.Destroy(sg,REASON_EFFECT)
86+
end
87+
end
88+
end

pre-release/c101208020.lua

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
--ARG☆S-熱闘のパルテ
2+
--Argostars - Fierce Parthe
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Gains 700 ATK/DEF for each other "Argostars" monster you control with different names
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_SINGLE)
9+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
10+
e1:SetRange(LOCATION_MZONE)
11+
e1:SetCode(EFFECT_UPDATE_ATTACK)
12+
e1:SetValue(s.atkdefval)
13+
c:RegisterEffect(e1)
14+
local e2=e1:Clone()
15+
e2:SetCode(EFFECT_UPDATE_DEFENSE)
16+
c:RegisterEffect(e2)
17+
--Return 1 face-up "Argostars" Continuous Trap you control to the hand, and if you do, Special Summon this card
18+
local e3=Effect.CreateEffect(c)
19+
e3:SetDescription(aux.Stringid(id,0))
20+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
21+
e3:SetType(EFFECT_TYPE_QUICK_O)
22+
e3:SetCode(EVENT_FREE_CHAIN)
23+
e3:SetRange(LOCATION_HAND)
24+
e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
25+
e3:SetCountLimit(1,id)
26+
e3:SetCost(aux.SelfRevealCost)
27+
e3:SetTarget(s.thtg)
28+
e3:SetOperation(s.thop)
29+
c:RegisterEffect(e3)
30+
--Set 1 Continuous Trap from your hand
31+
local e4=Effect.CreateEffect(c)
32+
e4:SetDescription(aux.Stringid(id,1))
33+
e4:SetType(EFFECT_TYPE_IGNITION)
34+
e4:SetRange(LOCATION_MZONE)
35+
e4:SetCountLimit(1,{id,1})
36+
e4:SetCost(aux.SelfBanishCost)
37+
e4:SetTarget(s.settg)
38+
e4:SetOperation(s.setop)
39+
c:RegisterEffect(e4)
40+
end
41+
s.listed_series={SET_ARGOSTARS}
42+
function s.atkdefval(e,c)
43+
local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ARGOSTARS),e:GetHandlerPlayer(),LOCATION_MZONE,0,e:GetHandler())
44+
return g:GetClassCount(Card.GetCode)*700
45+
end
46+
function s.thfilter(c,tp)
47+
return c:IsSetCard(SET_ARGOSTARS) and c:IsContinuousTrap() and c:IsFaceup() and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0
48+
end
49+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
50+
local c=e:GetHandler()
51+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
52+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
53+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
54+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
55+
end
56+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
57+
local c=e:GetHandler()
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
59+
local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp):GetFirst()
60+
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then
61+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
62+
end
63+
end
64+
function s.setfilter(c)
65+
return c:IsContinuousTrap() and c:IsSSetable()
66+
end
67+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
68+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND,0,1,nil) end
69+
end
70+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
71+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
72+
local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
73+
if sc and Duel.SSet(tp,sc)>0 then
74+
--It can be activated this turn
75+
local e1=Effect.CreateEffect(e:GetHandler())
76+
e1:SetDescription(aux.Stringid(id,2))
77+
e1:SetType(EFFECT_TYPE_SINGLE)
78+
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
79+
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
80+
e1:SetReset(RESETS_STANDARD_PHASE_END)
81+
sc:RegisterEffect(e1)
82+
end
83+
end

0 commit comments

Comments
 (0)