Skip to content

Commit 8fc7fbb

Browse files
authored
Added new card scripts
1 parent 4d93952 commit 8fc7fbb

File tree

9 files changed

+715
-0
lines changed

9 files changed

+715
-0
lines changed

pre-release/c101302081.lua

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
--JP name
2+
--Disguise, the Copycat Hero
3+
--Scripted by the Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from 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:SetCondition(s.spcon)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--Add 1 "Cursed Copycat Noble Arms" from your Deck to your hand
18+
local e2a=Effect.CreateEffect(c)
19+
e2a:SetDescription(aux.Stringid(id,1))
20+
e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
21+
e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2a:SetProperty(EFFECT_FLAG_DELAY)
23+
e2a:SetCode(EVENT_SUMMON_SUCCESS)
24+
e2a:SetCountLimit(1,{id,1})
25+
e2a:SetTarget(s.thtg)
26+
e2a:SetOperation(s.thop)
27+
c:RegisterEffect(e2a)
28+
local e2b=e2a:Clone()
29+
e2b:SetCode(EVENT_SPSUMMON_SUCCESS)
30+
c:RegisterEffect(e2b)
31+
--Change this card's Level and name
32+
local e3=Effect.CreateEffect(c)
33+
e3:SetDescription(aux.Stringid(id,2))
34+
e3:SetCategory(CATEGORY_LVCHANGE)
35+
e3:SetType(EFFECT_TYPE_IGNITION)
36+
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
37+
e3:SetRange(LOCATION_MZONE)
38+
e3:SetCountLimit(1,{id,2})
39+
e3:SetCondition(function(e) return e:GetHandler():HasEquipCard() end)
40+
e3:SetTarget(s.lvnametg)
41+
e3:SetOperation(s.lvnameop)
42+
c:RegisterEffect(e3)
43+
end
44+
s.listed_names={101302082} --"Cursed Copycat Noble Arms"
45+
function s.spconfilter(c)
46+
return c:IsEquipSpell() and (c:IsFaceup() or c:GetEquipTarget())
47+
end
48+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
49+
return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil)
50+
end
51+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
52+
local c=e:GetHandler()
53+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
54+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
55+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
56+
end
57+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
58+
local c=e:GetHandler()
59+
if c:IsRelateToEffect(e) then
60+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
61+
end
62+
end
63+
function s.thfilter(c)
64+
return c:IsCode(101302082) and c:IsAbleToHand()
65+
end
66+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
67+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
68+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
69+
end
70+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
71+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
72+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
73+
if #g>0 then
74+
Duel.SendtoHand(g,nil,REASON_EFFECT)
75+
Duel.ConfirmCards(1-tp,g)
76+
end
77+
end
78+
function s.lvnamefilter(c,lv,code)
79+
return not c:IsType(TYPE_TUNER) and c:IsRace(RACE_WARRIOR) and c:HasLevel() and c:IsFaceup() and not (c:IsLevel(lv) and c:IsCode(code))
80+
end
81+
function s.lvnametg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
82+
local c=e:GetHandler()
83+
local lv=c:GetLevel()
84+
local code=c:GetCode()
85+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc~=c and s.lvnamefilter(chkc,lv,code) end
86+
if chk==0 then return Duel.IsExistingTarget(s.lvnamefilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,lv,code) end
87+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
88+
Duel.SelectTarget(tp,s.lvnamefilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,lv,code)
89+
end
90+
function s.lvnameop(e,tp,eg,ep,ev,re,r,rp)
91+
local c=e:GetHandler()
92+
local tc=Duel.GetFirstTarget()
93+
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then
94+
--This card's Level, also its name, become the same as that monster's until the End Phase
95+
local e1=Effect.CreateEffect(c)
96+
e1:SetType(EFFECT_TYPE_SINGLE)
97+
e1:SetCode(EFFECT_CHANGE_LEVEL)
98+
e1:SetValue(tc:GetLevel())
99+
e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END)
100+
c:RegisterEffect(e1)
101+
local e2=e1:Clone()
102+
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
103+
e2:SetCode(EFFECT_CHANGE_CODE)
104+
e2:SetValue(tc:GetCode())
105+
e2:SetReset(RESETS_STANDARD_PHASE_END)
106+
c:RegisterEffect(e2)
107+
end
108+
end

pre-release/c101302082.lua

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
--JP name
2+
--Cursed Copycat Noble Arms
3+
--Scripted by the Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
aux.AddEquipProcedure(c)
7+
--Equipped monster gains 200 ATK/DEF for each Equip Spell in your field and GY
8+
local e1a=Effect.CreateEffect(c)
9+
e1a:SetType(EFFECT_TYPE_EQUIP)
10+
e1a:SetCode(EFFECT_UPDATE_ATTACK)
11+
e1a:SetValue(s.atkdefval)
12+
c:RegisterEffect(e1a)
13+
local e1b=e1a:Clone()
14+
e1b:SetCode(EFFECT_UPDATE_DEFENSE)
15+
c:RegisterEffect(e1b)
16+
--Special Summon 1 Warrior monster with the same Attribute and Level as the equipped monster but a different name from your Deck, and if you do, equip it with this card, then destroy the monster this card was equipped to
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,0))
19+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP+CATEGORY_DESTROY)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetRange(LOCATION_SZONE)
22+
e2:SetCountLimit(1,id)
23+
e2:SetCondition(function(e) local ec=e:GetHandler():GetEquipTarget() return ec and ec:IsRace(RACE_WARRIOR) end)
24+
e2:SetTarget(s.sptg)
25+
e2:SetOperation(s.spop)
26+
c:RegisterEffect(e2)
27+
end
28+
function s.atkdefvalfilter(c)
29+
return c:IsEquipSpell() and (c:IsFaceup() or c:GetEquipTarget())
30+
end
31+
function s.atkdefval(e,c)
32+
return 200*Duel.GetMatchingGroupCount(s.atkdefvalfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,0,nil)
33+
end
34+
function s.spfilter(c,e,tp,attr,lv,code,hc)
35+
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(attr) and c:IsLevel(lv) and not c:IsCode(code)
36+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and hc:CheckEquipTarget(c)
37+
end
38+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
local c=e:GetHandler()
40+
local ec=c:GetEquipTarget()
41+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
42+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,ec:GetAttribute(),ec:GetLevel(),ec:GetCode(),c) end
43+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
44+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0)
45+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,ec,1,tp,0)
46+
end
47+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
48+
local c=e:GetHandler()
49+
--You cannot Special Summon for the rest of this turn, except Warrior monsters
50+
local e1=Effect.CreateEffect(c)
51+
e1:SetDescription(aux.Stringid(id,1))
52+
e1:SetType(EFFECT_TYPE_FIELD)
53+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
54+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
55+
e1:SetTargetRange(1,0)
56+
e1:SetTarget(function(e,c) return not c:IsRace(RACE_WARRIOR) end)
57+
e1:SetReset(RESET_PHASE|PHASE_END)
58+
Duel.RegisterEffect(e1,tp)
59+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
60+
local ec=c:GetEquipTarget()
61+
if not ec then return end
62+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
63+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ec:GetAttribute(),ec:GetLevel(),ec:GetCode(),c):GetFirst()
64+
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0
65+
and Duel.Equip(tp,c,sc) and ec:IsLocation(LOCATION_MZONE) then
66+
Duel.BreakEffect()
67+
Duel.Destroy(ec,REASON_EFFECT)
68+
end
69+
end

pre-release/c101302083.lua

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
--JP name
2+
--Chanbar, the Flashy Sportsknight
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters
8+
Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99)
9+
--Monsters your opponent controls lose 400 ATK for each Equip Spell you control
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetType(EFFECT_TYPE_FIELD)
12+
e1:SetCode(EFFECT_UPDATE_ATTACK)
13+
e1:SetRange(LOCATION_MZONE)
14+
e1:SetTargetRange(0,LOCATION_MZONE)
15+
e1:SetValue(s.atkval)
16+
c:RegisterEffect(e1)
17+
--Send 1 Equip Spell from your hand or Deck to the GY, and if you do, destroy that target
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,0))
20+
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY)
21+
e2:SetType(EFFECT_TYPE_IGNITION)
22+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
23+
e2:SetRange(LOCATION_MZONE)
24+
e2:SetCountLimit(1,id)
25+
e2:SetTarget(s.tgdestg)
26+
e2:SetOperation(s.tgdesop)
27+
c:RegisterEffect(e2)
28+
--Destroy 2 face-up cards in your Spell & Trap Zone, and if you do, Special Summon this card
29+
local e3=Effect.CreateEffect(c)
30+
e3:SetDescription(aux.Stringid(id,1))
31+
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
32+
e3:SetType(EFFECT_TYPE_IGNITION)
33+
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
34+
e3:SetRange(LOCATION_GRAVE)
35+
e3:SetCountLimit(1,{id,1})
36+
e3:SetTarget(s.sptg)
37+
e3:SetOperation(s.spop)
38+
c:RegisterEffect(e3)
39+
end
40+
function s.atkdvalfilter(c)
41+
return c:IsEquipSpell() and (c:IsFaceup() or c:GetEquipTarget())
42+
end
43+
function s.atkval(e,c)
44+
return -400*Duel.GetMatchingGroupCount(s.atkdvalfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)
45+
end
46+
function s.tgdestg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
47+
local c=e:GetHandler()
48+
if chkc then return chkc:IsOnField() and chkc~=c end
49+
if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsEquipSpell,Card.IsAbleToGrave),tp,LOCATION_HAND|LOCATION_DECK,0,1,nil)
50+
and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
51+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
52+
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
53+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
54+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
55+
end
56+
function s.tgdesop(e,tp,eg,ep,ev,re,r,rp)
57+
local tc=Duel.GetFirstTarget()
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
59+
local sc=Duel.SelectMatchingCard(tp,aux.AND(Card.IsEquipSpell,Card.IsAbleToGrave),tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst()
60+
if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE)
61+
and tc:IsRelateToEffect(e) then
62+
Duel.Destroy(tc,REASON_EFFECT)
63+
end
64+
end
65+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
66+
if chkc then return false end
67+
local c=e:GetHandler()
68+
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_STZONE,0,2,nil)
69+
and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
70+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
71+
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_STZONE,0,2,2,nil)
72+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0)
73+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
74+
end
75+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
76+
local c=e:GetHandler()
77+
local tg=Duel.GetTargetCards(e)
78+
if #tg>0 and Duel.Destroy(tg,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
79+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
80+
end
81+
end

pre-release/c101302084.lua

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
--JP name
2+
--Faisan, Hunting Scout of the Deep Forest
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: 2 EARTH Warrior monsters
8+
Fusion.AddProcMixN(c,true,true,s.matfilter,2)
9+
--Unaffected by your opponent's activated effects, during the Main Phase only
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetType(EFFECT_TYPE_SINGLE)
12+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
13+
e1:SetCode(EFFECT_IMMUNE_EFFECT)
14+
e1:SetRange(LOCATION_MZONE)
15+
e1:SetCondition(function() return Duel.IsMainPhase() end)
16+
e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end)
17+
c:RegisterEffect(e1)
18+
--Special Summon 2 EARTH Warrior monsters from your GY, except "Faisan, Hunting Scout of the Deep Forest", and if you do, your EARTH Warrior monsters cannot be destroyed by battle for the rest of this turn
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,0))
21+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
22+
e2:SetType(EFFECT_TYPE_QUICK_O)
23+
e2:SetCode(EVENT_FREE_CHAIN)
24+
e2:SetRange(LOCATION_MZONE)
25+
e2:SetCountLimit(1,id)
26+
e2:SetCondition(function(e) return Duel.IsBattlePhase() and e:GetHandler():IsFusionSummoned() end)
27+
e2:SetCost(Cost.SelfTribute)
28+
e2:SetTarget(s.sptg)
29+
e2:SetOperation(s.spop)
30+
e2:SetHintTiming(TIMING_BATTLE_PHASE|TIMING_BATTLE_END,TIMING_BATTLE_START|TIMING_BATTLE_PHASE|TIMING_BATTLE_STEP_END|TIMING_BATTLE_END)
31+
c:RegisterEffect(e2)
32+
end
33+
s.listed_names={id}
34+
function s.matfilter(c,fc,sumtype,tp)
35+
return c:IsAttribute(ATTRIBUTE_EARTH,fc,sumtype,tp) and c:IsRace(RACE_WARRIOR,fc,sumtype,tp)
36+
end
37+
function s.spfilter(c,e,tp)
38+
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and not c:IsCode(id)
39+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
40+
end
41+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
42+
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>=2
43+
and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
44+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end
45+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE)
46+
end
47+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
48+
if Duel.GetMZoneCount(tp)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
50+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp)
51+
if #g==2 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==2 then
52+
local c=e:GetHandler()
53+
aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,1))
54+
--Your EARTH Warrior monsters cannot be destroyed by battle for the rest of this turn
55+
local e1=Effect.CreateEffect(c)
56+
e1:SetType(EFFECT_TYPE_FIELD)
57+
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
58+
e1:SetTarget(function(e,c) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) end)
59+
e1:SetTargetRange(LOCATION_MZONE,0)
60+
e1:SetValue(1)
61+
e1:SetReset(RESET_PHASE|PHASE_END)
62+
Duel.RegisterEffect(e1,tp)
63+
end
64+
end

0 commit comments

Comments
 (0)