Skip to content

Commit 464ca0c

Browse files
authored
Added new card scripts
1 parent 0bb2a90 commit 464ca0c

12 files changed

Lines changed: 970 additions & 0 deletions

pre-release/c101305005.lua

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
--劫火の三幻魔-神炎皇ウリア
2+
--Uria, Lord of Searing Flames - Sacred Beast of Cataclysmic Fire
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Must be Special Summoned with a "Sacred Beast" card
8+
local e0=Effect.CreateEffect(c)
9+
e0:SetType(EFFECT_TYPE_SINGLE)
10+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
11+
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
12+
e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end)
13+
c:RegisterEffect(e0)
14+
--You can reveal this card in your hand; add 1 "Sacred Beast" Trap from your Deck to your hand, then discard 1 card
15+
local e1=Effect.CreateEffect(c)
16+
e1:SetDescription(aux.Stringid(id,0))
17+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
18+
e1:SetType(EFFECT_TYPE_IGNITION)
19+
e1:SetRange(LOCATION_HAND)
20+
e1:SetCountLimit(1,id)
21+
e1:SetCost(Cost.SelfReveal)
22+
e1:SetTarget(s.thtg)
23+
e1:SetOperation(s.thop)
24+
c:RegisterEffect(e1)
25+
--Gains 1000 ATK/DEF for each Trap in the GYs
26+
local e2a=Effect.CreateEffect(c)
27+
e2a:SetType(EFFECT_TYPE_SINGLE)
28+
e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
29+
e2a:SetCode(EFFECT_UPDATE_ATTACK)
30+
e2a:SetRange(LOCATION_MZONE)
31+
e2a:SetValue(function(e,c) return 1000*Duel.GetMatchingGroupCount(Card.IsTrap,0,LOCATION_GRAVE,LOCATION_GRAVE,nil) end)
32+
c:RegisterEffect(e2a)
33+
local e2b=e2a:Clone()
34+
e2b:SetCode(EFFECT_UPDATE_DEFENSE)
35+
c:RegisterEffect(e2b)
36+
--Once per turn (Quick Effect): You can target 1 Spell/Trap on the field; destroy it. Neither player can activate cards or effects in response to this effect's activation
37+
local e3=Effect.CreateEffect(c)
38+
e3:SetDescription(aux.Stringid(id,1))
39+
e3:SetCategory(CATEGORY_DESTROY)
40+
e3:SetType(EFFECT_TYPE_QUICK_O)
41+
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
42+
e3:SetCode(EVENT_FREE_CHAIN)
43+
e3:SetRange(LOCATION_MZONE)
44+
e3:SetCountLimit(1)
45+
e3:SetTarget(s.destg)
46+
e3:SetOperation(s.desop)
47+
e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_SSET)
48+
c:RegisterEffect(e3)
49+
end
50+
s.listed_series={SET_SACRED_BEAST}
51+
function s.thfilter(c)
52+
return c:IsSetCard(SET_SACRED_BEAST) and c:IsTrap() and c:IsAbleToHand()
53+
end
54+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
55+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
56+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
57+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
58+
end
59+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
60+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
61+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
62+
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
63+
Duel.ConfirmCards(1-tp,g)
64+
Duel.ShuffleHand(tp)
65+
Duel.BreakEffect()
66+
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil)
67+
end
68+
end
69+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
70+
if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end
71+
if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
72+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
73+
local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
74+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
75+
Duel.SetChainLimit(aux.FALSE)
76+
end
77+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
78+
local tc=Duel.GetFirstTarget()
79+
if tc:IsRelateToEffect(e) then
80+
Duel.Destroy(tc,REASON_EFFECT)
81+
end
82+
end

pre-release/c101305006.lua

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
--罪禍の三幻魔-降雷皇ハモン
2+
--Hamon, Lord of Striking Thunder - Sacred Beast of Sinful Catastrophe
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Must be Special Summoned with a "Sacred Beast" card
8+
local e0=Effect.CreateEffect(c)
9+
e0:SetType(EFFECT_TYPE_SINGLE)
10+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
11+
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
12+
e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end)
13+
c:RegisterEffect(e0)
14+
--You can reveal this card in your hand; add 1 "Sacred Beast" Spell from your Deck to your hand, then discard 1 card
15+
local e1=Effect.CreateEffect(c)
16+
e1:SetDescription(aux.Stringid(id,0))
17+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
18+
e1:SetType(EFFECT_TYPE_IGNITION)
19+
e1:SetRange(LOCATION_HAND)
20+
e1:SetCountLimit(1,id)
21+
e1:SetCost(Cost.SelfReveal)
22+
e1:SetTarget(s.thtg)
23+
e1:SetOperation(s.thop)
24+
c:RegisterEffect(e1)
25+
--Once per turn, if a monster(s) is sent to your opponent's GY: Inflict 1000 damage to your opponent
26+
local e2=Effect.CreateEffect(c)
27+
e2:SetDescription(aux.Stringid(id,1))
28+
e2:SetCategory(CATEGORY_DAMAGE)
29+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
30+
e2:SetCode(EVENT_TO_GRAVE)
31+
e2:SetRange(LOCATION_MZONE)
32+
e2:SetCountLimit(1)
33+
e2:SetCondition(s.damcon)
34+
e2:SetTarget(s.damtg)
35+
e2:SetOperation(s.damop)
36+
c:RegisterEffect(e2)
37+
--If this card is destroyed by battle or card effect: You can activate this effect; you take no damage this turn
38+
local e3=Effect.CreateEffect(c)
39+
e3:SetDescription(aux.Stringid(id,2))
40+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
41+
e3:SetProperty(EFFECT_FLAG_DELAY)
42+
e3:SetCode(EVENT_DESTROYED)
43+
e3:SetCondition(s.nodamcon)
44+
e3:SetTarget(s.nodamtg)
45+
e3:SetOperation(s.nodamop)
46+
c:RegisterEffect(e3)
47+
end
48+
s.listed_series={SET_SACRED_BEAST}
49+
function s.thfilter(c)
50+
return c:IsSetCard(SET_SACRED_BEAST) and c:IsSpell() and c:IsAbleToHand()
51+
end
52+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
53+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
54+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
55+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
56+
end
57+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
59+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
60+
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
61+
Duel.ConfirmCards(1-tp,g)
62+
Duel.ShuffleHand(tp)
63+
Duel.BreakEffect()
64+
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil)
65+
end
66+
end
67+
function s.damconfilter(c,opp)
68+
return c:IsMonster() and c:IsControler(opp)
69+
end
70+
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
71+
return eg:IsExists(s.damconfilter,1,nil,1-tp)
72+
end
73+
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
74+
if chk==0 then return true end
75+
Duel.SetTargetParam(1000)
76+
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,1,tp,1-tp,1000)
77+
end
78+
function s.damop(e,tp,eg,ep,ev,re,r,rp)
79+
local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
80+
Duel.Damage(1-tp,d,REASON_EFFECT)
81+
end
82+
function s.nodamcon(e,tp,eg,ep,ev,re,r,rp)
83+
return (r&(REASON_EFFECT|REASON_BATTLE))>0
84+
end
85+
function s.nodamtg(e,tp,eg,ep,ev,re,r,rp,chk)
86+
if chk==0 then return not Duel.HasFlagEffect(tp,id) end
87+
end
88+
function s.nodamop(e,tp,eg,ep,ev,re,r,rp)
89+
if Duel.HasFlagEffect(tp,id) then return end
90+
Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1)
91+
--You take no damage this turn
92+
local e1=Effect.CreateEffect(e:GetHandler())
93+
e1:SetDescription(aux.Stringid(id,3))
94+
e1:SetType(EFFECT_TYPE_FIELD)
95+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
96+
e1:SetCode(EFFECT_CHANGE_DAMAGE)
97+
e1:SetTargetRange(1,0)
98+
e1:SetValue(0)
99+
e1:SetReset(RESET_PHASE|PHASE_END)
100+
Duel.RegisterEffect(e1,tp)
101+
local e2=e1:Clone()
102+
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
103+
Duel.RegisterEffect(e2,tp)
104+
end

pre-release/c101305007.lua

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
--無窮の三幻魔-幻魔皇ラビエル
2+
--Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Must be Special Summoned with a "Sacred Beast" card
8+
local e0=Effect.CreateEffect(c)
9+
e0:SetType(EFFECT_TYPE_SINGLE)
10+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
11+
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
12+
e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end)
13+
c:RegisterEffect(e0)
14+
--You can reveal this card in your hand; add 1 "Sacred Beast" monster from your Deck to your hand, except "Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity", then discard 1 card
15+
local e1=Effect.CreateEffect(c)
16+
e1:SetDescription(aux.Stringid(id,0))
17+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
18+
e1:SetType(EFFECT_TYPE_IGNITION)
19+
e1:SetRange(LOCATION_HAND)
20+
e1:SetCountLimit(1,id)
21+
e1:SetCost(Cost.SelfReveal)
22+
e1:SetTarget(s.thtg)
23+
e1:SetOperation(s.thop)
24+
c:RegisterEffect(e1)
25+
--Once per turn (Quick Effect): You can Tribute 2 other "Sacred Beast" monsters; destroy as many monsters your opponent controls as possible, and if you do, this card gains 1000 ATK for each card destroyed by this effect
26+
local e2=Effect.CreateEffect(c)
27+
e2:SetDescription(aux.Stringid(id,1))
28+
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
29+
e2:SetType(EFFECT_TYPE_QUICK_O)
30+
e2:SetCode(EVENT_FREE_CHAIN)
31+
e2:SetRange(LOCATION_MZONE)
32+
e2:SetCountLimit(1)
33+
e2:SetCost(s.descost)
34+
e2:SetTarget(s.destg)
35+
e2:SetOperation(s.desop)
36+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
37+
c:RegisterEffect(e2)
38+
end
39+
s.listed_names={id}
40+
s.listed_series={SET_SACRED_BEAST}
41+
function s.thfilter(c)
42+
return c:IsSetCard(SET_SACRED_BEAST) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id)
43+
end
44+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
45+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
46+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
47+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
48+
end
49+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
50+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
51+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
52+
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
53+
Duel.ConfirmCards(1-tp,g)
54+
Duel.ShuffleHand(tp)
55+
Duel.BreakEffect()
56+
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil)
57+
end
58+
end
59+
function s.descostfilter(c)
60+
return c:IsSetCard(SET_SACRED_BEAST)
61+
end
62+
function s.descostchk(sg,tp,exg)
63+
return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,sg)
64+
end
65+
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
66+
local c=e:GetHandler()
67+
if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,2,false,s.descostchk,c) end
68+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
69+
local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,2,2,false,s.descostchk,c)
70+
Duel.Release(g,REASON_COST)
71+
end
72+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
73+
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
74+
if chk==0 then return #g>0 end
75+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0)
76+
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),0,tp,#g*1000)
77+
end
78+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
79+
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
80+
if #g==0 then return end
81+
local ct=Duel.Destroy(g,REASON_EFFECT)
82+
if ct==0 then return end
83+
local c=e:GetHandler()
84+
if c:IsRelateToEffect(e) and c:IsFaceup() then
85+
--This card gains 1000 ATK for each card destroyed by this effect
86+
local e1=Effect.CreateEffect(c)
87+
e1:SetType(EFFECT_TYPE_SINGLE)
88+
e1:SetCode(EFFECT_UPDATE_ATTACK)
89+
e1:SetValue(ct*1000)
90+
e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE)
91+
c:RegisterEffect(e1)
92+
end
93+
end

pre-release/c101305008.lua

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
--三幻魔の操世者
2+
--The Orchestrator of the Sacred Beasts
3+
--Scripted by Eerie Code
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--You can reveal this card in your hand; discard 1 card, and if you do, Special Summon 1 "Sacred Beast" monster from your hand in Defense Position, except a Level 8 monster
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,{id,0})
13+
e1:SetCost(Cost.SelfReveal)
14+
e1:SetTarget(s.sptg(LOCATION_HAND))
15+
e1:SetOperation(s.spop(LOCATION_HAND))
16+
c:RegisterEffect(e1)
17+
--You can discard 1 card; Special Summon 1 "Sacred Beast" monster from your hand or GY in Defense Position, except a Level 8 monster or the discarded card
18+
local e2=e1:Clone()
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
21+
e2:SetRange(LOCATION_MZONE)
22+
e2:SetCountLimit(1,{id,1})
23+
e2:SetCost(Cost.Discard(nil,false,1,1,function(e,tp,og) local oc=og:GetFirst() oc:CreateEffectRelation(e) e:SetLabelObject(oc) end))
24+
e2:SetTarget(s.sptg(LOCATION_HAND|LOCATION_GRAVE))
25+
e2:SetOperation(s.spop(LOCATION_HAND|LOCATION_GRAVE))
26+
c:RegisterEffect(e2)
27+
--You can banish this card from your GY; Special Summon 1 "Sacred Beast" monster from your GY in Defense Postion, except a Level 8 monster
28+
local e3=e2:Clone()
29+
e3:SetDescription(aux.Stringid(id,2))
30+
e3:SetRange(LOCATION_GRAVE)
31+
e3:SetCountLimit(1,{id,2})
32+
e3:SetCost(Cost.SelfBanish)
33+
e3:SetTarget(s.sptg(LOCATION_GRAVE))
34+
e3:SetOperation(s.spop(LOCATION_GRAVE))
35+
c:RegisterEffect(e3)
36+
end
37+
s.listed_series={SET_SACRED_BEAST}
38+
function s.discardfilter(c,e,tp)
39+
return c:IsDiscardable(REASON_EFFECT) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
40+
end
41+
function s.spfilter(c,e,tp)
42+
return c:IsSetCard(SET_SACRED_BEAST) and not c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE)
43+
end
44+
function s.sptg(summon_location)
45+
return function(e,tp,eg,ep,ev,re,r,rp,chk)
46+
if chk==0 then
47+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
48+
if summon_location==LOCATION_HAND then
49+
return Duel.IsExistingMatchingCard(s.discardfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
50+
else
51+
return Duel.IsExistingMatchingCard(s.spfilter,tp,summon_location,0,1,e:GetHandler(),e,tp)
52+
end
53+
end
54+
if summon_location==LOCATION_HAND then
55+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
56+
end
57+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,summon_location)
58+
end
59+
end
60+
function s.spop(summon_location)
61+
return function(e,tp,eg,ep,ev,re,r,rp)
62+
if summon_location==LOCATION_HAND and Duel.DiscardHand(tp,s.discardfilter,1,1,REASON_EFFECT,nil,e,tp)<0 then return end
63+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
64+
local exc=nil
65+
if summon_location==LOCATION_HAND|LOCATION_GRAVE then
66+
local cost_card=e:GetLabelObject()
67+
exc=cost_card:IsRelateToEffect(e) and cost_card or nil
68+
end
69+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
70+
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,summon_location,0,1,1,exc,e,tp):GetFirst()
71+
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP_DEFENSE)>0 then
72+
sc:CompleteProcedure()
73+
end
74+
end
75+
end

0 commit comments

Comments
 (0)