Skip to content

Commit 0541a7d

Browse files
authored
Added new card scripts
1 parent cd7c017 commit 0541a7d

File tree

3 files changed

+256
-0
lines changed

3 files changed

+256
-0
lines changed

pre-release/c100295101.lua

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
--戦刀匠サイバ
2+
--Saiba the Fighting Swordsmith
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+
--Special Summon 1 Level 6 or lower Warrior monster from your GY
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
13+
e1:SetType(EFFECT_TYPE_IGNITION)
14+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
15+
e1:SetRange(LOCATION_MZONE)
16+
e1:SetCountLimit(1,id)
17+
e1:SetTarget(s.sptg)
18+
e1:SetOperation(s.spop)
19+
c:RegisterEffect(e1)
20+
--Immediately after this effect resolves, Synchro Summon 1 Synchro Monster, using monsters you control as material, including a Warrior monster
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,1))
23+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
24+
e2:SetType(EFFECT_TYPE_QUICK_O)
25+
e2:SetCode(EVENT_FREE_CHAIN)
26+
e2:SetRange(LOCATION_MZONE)
27+
e2:SetCountLimit(1,{id,1})
28+
e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
29+
e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end)
30+
e2:SetTarget(s.synchtg)
31+
e2:SetOperation(s.synchop)
32+
c:RegisterEffect(e2)
33+
end
34+
function s.spfilter(c,e,tp)
35+
return c:IsLevelBelow(6) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
36+
end
37+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
38+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
39+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
40+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
42+
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
43+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
44+
end
45+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
46+
local c=e:GetHandler()
47+
local tc=Duel.GetFirstTarget()
48+
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
49+
--Negate its effects
50+
tc:NegateEffects(c)
51+
end
52+
Duel.SpecialSummonComplete()
53+
if c:IsRelateToEffect(e) then
54+
--This card cannot be used as Synchro Material for the rest of this turn
55+
local e1=Effect.CreateEffect(c)
56+
e1:SetDescription(3310)
57+
e1:SetType(EFFECT_TYPE_SINGLE)
58+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT)
59+
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
60+
e1:SetValue(1)
61+
e1:SetReset(RESETS_STANDARD_PHASE_END)
62+
c:RegisterEffect(e1)
63+
end
64+
end
65+
function s.synchrocheck(tp,sg,sc)
66+
return sg:IsExists(Card.IsRace,1,nil,RACE_WARRIOR)
67+
end
68+
function s.synchtg(e,tp,eg,ep,ev,re,r,rp,chk)
69+
if chk==0 then
70+
Synchro.CheckAdditional=s.synchrocheck
71+
local res=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil)
72+
Synchro.CheckAdditional=nil
73+
return res
74+
end
75+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
76+
end
77+
function s.synchop(e,tp,eg,ep,ev,re,r,rp)
78+
Synchro.CheckAdditional=s.synchrocheck
79+
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil)
80+
if #g>0 then
81+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
82+
local sc=g:Select(tp,1,1,nil):GetFirst()
83+
Duel.SynchroSummon(tp,sc)
84+
else
85+
Synchro.CheckAdditional=nil
86+
end
87+
end

pre-release/c100409001.lua

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
--魂宿りし暗黒騎士ガイア
2+
--Soul of Gaia the Fierce Knight
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If a Level 5 or higher Monster Card is on the field, you can Normal Summon this card without Tributing
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SUMMON)
10+
e1:SetType(EFFECT_TYPE_SINGLE)
11+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
12+
e1:SetCode(EFFECT_SUMMON_PROC)
13+
e1:SetRange(LOCATION_HAND)
14+
e1:SetCondition(s.nscon)
15+
c:RegisterEffect(e1)
16+
--If your opponent Normal or Special Summons a monster(s) in Attack Position, increase its Level by 7
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetCategory(CATEGORY_LVCHANGE)
19+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
20+
e2:SetCode(EVENT_SUMMON_SUCCESS)
21+
e2:SetRange(LOCATION_MZONE)
22+
e2:SetOperation(s.lvop)
23+
c:RegisterEffect(e2)
24+
local e3=e2:Clone()
25+
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
26+
c:RegisterEffect(e3)
27+
--Negate the activation of an opponent's monster effect, and if you do, destroy that card
28+
local e4=Effect.CreateEffect(c)
29+
e4:SetDescription(aux.Stringid(id,1))
30+
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
31+
e4:SetType(EFFECT_TYPE_QUICK_O)
32+
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
33+
e4:SetCode(EVENT_CHAINING)
34+
e4:SetRange(LOCATION_MZONE)
35+
e4:SetCountLimit(1,id)
36+
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end)
37+
e4:SetCost(s.negcost)
38+
e4:SetTarget(s.negtg)
39+
e4:SetOperation(s.negop)
40+
c:RegisterEffect(e4)
41+
end
42+
s.listed_series={SET_MILLENNIUM}
43+
function s.lv5plusmonfilter(c)
44+
return c:IsLevelAbove(5) and c:IsMonsterCard() and c:IsFaceup()
45+
end
46+
function s.nscon(e,c)
47+
if c==nil then return true end
48+
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
49+
and Duel.IsExistingMatchingCard(s.lv5plusmonfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
50+
end
51+
function s.lvfilter(c,tp)
52+
return c:IsSummonPlayer(1-tp) and c:IsAttackPos() and c:IsFaceup() and c:HasLevel()
53+
end
54+
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
55+
local g=eg:Filter(s.lvfilter,nil,tp)
56+
if #g==0 then return end
57+
local c=e:GetHandler()
58+
for tc in g:Iter() do
59+
--Increase its Level by 7
60+
local e1=Effect.CreateEffect(c)
61+
e1:SetType(EFFECT_TYPE_SINGLE)
62+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
63+
e1:SetCode(EFFECT_UPDATE_LEVEL)
64+
e1:SetValue(7)
65+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
66+
tc:RegisterEffect(e1)
67+
end
68+
end
69+
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
70+
local c=e:GetHandler()
71+
if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(s.lv5plusmonfilter,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,c) end
72+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
73+
local g=Duel.SelectMatchingCard(tp,aux.AND(s.lv5plusmonfilter,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,1,c)
74+
Duel.SendtoGrave(g,REASON_COST)
75+
end
76+
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
77+
if chk==0 then return true end
78+
local rc=re:GetHandler()
79+
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0)
80+
if rc:IsDestructable() and rc:IsRelateToEffect(re) then
81+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0)
82+
end
83+
end
84+
function s.negop(e,tp,eg,ep,ev,re,r,rp)
85+
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
86+
Duel.Destroy(eg,REASON_EFFECT)
87+
end
88+
end

pre-release/c100409002.lua

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
--バイス・シャーク
2+
--Veiss Shark
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon 1 Fish "Shark" monster from your Deck
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
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:SetCost(s.spcost)
15+
e1:SetTarget(s.sptg)
16+
e1:SetOperation(s.spop)
17+
c:RegisterEffect(e1)
18+
local e2=e1:Clone()
19+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
20+
c:RegisterEffect(e2)
21+
--A "Shark Drake" Xyz Monster that has this card as material gains this effect: Negate a Spell/Trap effect, and if you do, destroy that card
22+
local e3=Effect.CreateEffect(c)
23+
e3:SetDescription(aux.Stringid(id,1))
24+
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
25+
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
26+
e3:SetCode(EVENT_CHAINING)
27+
e3:SetRange(LOCATION_MZONE)
28+
e3:SetCountLimit(1)
29+
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSetCard(SET_SHARK_DRAKE) and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) end)
30+
e3:SetCost(aux.dxmcostgen(2,2,nil))
31+
e3:SetTarget(s.distg)
32+
e3:SetOperation(s.disop)
33+
c:RegisterEffect(e3)
34+
end
35+
s.listed_series={SET_SHARK,SET_SHARK_DRAKE}
36+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
37+
if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,1,false,nil,nil,RACE_FISH) end
38+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
39+
local g=Duel.SelectReleaseGroupCost(tp,Card.IsRace,1,1,false,nil,nil,RACE_FISH)
40+
Duel.Release(g,REASON_COST)
41+
end
42+
function s.spfilter(c,e,tp)
43+
return c:IsRace(RACE_FISH) and c:IsSetCard(SET_SHARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
44+
end
45+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
46+
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
47+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
48+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
49+
end
50+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
51+
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
52+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
53+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
54+
if #g>0 then
55+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
56+
end
57+
end
58+
--You cannot Special Summon for the rest of this turn, except WATER monsters
59+
local e1=Effect.CreateEffect(e:GetHandler())
60+
e1:SetDescription(aux.Stringid(id,2))
61+
e1:SetType(EFFECT_TYPE_FIELD)
62+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
63+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
64+
e1:SetTargetRange(1,0)
65+
e1:SetTarget(function(e,c) return not c:IsAttribute(ATTRIBUTE_WATER) end)
66+
e1:SetReset(RESET_PHASE|PHASE_END)
67+
Duel.RegisterEffect(e1,tp)
68+
end
69+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
70+
if chk==0 then return true end
71+
local rc=re:GetHandler()
72+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0)
73+
if rc:IsDestructable() and rc:IsRelateToEffect(re) then
74+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0)
75+
end
76+
end
77+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
78+
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
79+
Duel.Destroy(eg,REASON_EFFECT)
80+
end
81+
end

0 commit comments

Comments
 (0)