Skip to content

Commit 006fb63

Browse files
authored
Added new card scripts
1 parent 14e941e commit 006fb63

File tree

2 files changed

+176
-0
lines changed

2 files changed

+176
-0
lines changed

pre-release/c101301049.lua

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
--閃刀姫=ゼロ
2+
--Sky Striker Ace - Zero
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Link Summon procedure: 2 "Sky Striker Ace" monsters
8+
Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SKY_STRIKER_ACE),2)
9+
--You can only Special Summon "Sky Striker Ace - Zero(s)" once per turn
10+
c:SetSPSummonOnce(id)
11+
--Cannot be used as Link Material
12+
local e0=Effect.CreateEffect(c)
13+
e0:SetType(EFFECT_TYPE_SINGLE)
14+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
15+
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
16+
e0:SetValue(1)
17+
c:RegisterEffect(e0)
18+
--Add 1 "Sky Striker" Spell from your Deck or GY to your hand
19+
local e1=Effect.CreateEffect(c)
20+
e1:SetDescription(aux.Stringid(id,0))
21+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
22+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
23+
e1:SetProperty(EFFECT_FLAG_DELAY)
24+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
25+
e1:SetCountLimit(1,id)
26+
e1:SetTarget(s.thtg)
27+
e1:SetOperation(s.thop)
28+
c:RegisterEffect(e1)
29+
--Special Summon both 1 "Sky Striker Ace - Raye" and 1 "Sky Striker Ace - Roze" from your Deck and/or GY, then you can destroy 1 card on the field
30+
local e2=Effect.CreateEffect(c)
31+
e2:SetDescription(aux.Stringid(id,1))
32+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
33+
e2:SetType(EFFECT_TYPE_QUICK_O)
34+
e2:SetCode(EVENT_FREE_CHAIN)
35+
e2:SetRange(LOCATION_MZONE)
36+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
37+
e2:SetCountLimit(1,id)
38+
e2:SetCost(Cost.SelfTribute)
39+
e2:SetTarget(s.sptg)
40+
e2:SetOperation(s.spop)
41+
c:RegisterEffect(e2)
42+
end
43+
s.listed_series={SET_SKY_STRIKER_ACE,SET_SKY_STRIKER}
44+
s.listed_names={id,26077387,37351133} --"Sky Striker Ace - Raye", "Sky Striker Ace - Roze"
45+
function s.thfilter(c)
46+
return c:IsSetCard(SET_SKY_STRIKER) and c:IsSpell() and c:IsAbleToHand()
47+
end
48+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
49+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end
50+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE)
51+
end
52+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
53+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
54+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil)
55+
if #g>0 then
56+
Duel.SendtoHand(g,nil,REASON_EFFECT)
57+
Duel.ConfirmCards(1-tp,g)
58+
end
59+
end
60+
function s.spfilter(c,e,tp)
61+
return c:IsCode(26077387,37351133) 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
65+
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp)
66+
return Duel.GetMZoneCount(tp,e:GetHandler())>=2
67+
and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
68+
and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,0)
69+
end
70+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK|LOCATION_GRAVE)
71+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD)
72+
end
73+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
74+
if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
75+
or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
76+
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp)
77+
if #g<2 then return end
78+
local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_SPSUMMON)
79+
if #sg==2 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)==2
80+
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0
81+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
82+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
83+
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
84+
if #dg>0 then
85+
Duel.HintSelection(dg)
86+
Duel.BreakEffect()
87+
Duel.Destroy(dg,REASON_EFFECT)
88+
end
89+
end
90+
end

pre-release/c101301069.lua

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
--閃刀亜式-レムニスゲート
2+
--Sky Striker Alternative - Lemnis Gate
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetCode(EVENT_FREE_CHAIN)
13+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
14+
e1:SetCountLimit(1,id)
15+
e1:SetTarget(s.target)
16+
e1:SetOperation(s.activate)
17+
c:RegisterEffect(e1)
18+
--Immediately after this effect resolves, Link Summon 1 "Sky Striker Ace" Link Monster
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
22+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
23+
e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS)
24+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
25+
e2:SetRange(LOCATION_GRAVE)
26+
e2:SetCountLimit(1,{id,1})
27+
e2:SetCondition(s.spcon)
28+
e2:SetCost(Cost.SelfBanish)
29+
e2:SetTarget(s.sptg)
30+
e2:SetOperation(s.spop)
31+
c:RegisterEffect(e2)
32+
end
33+
s.listed_series={SET_SKY_STRIKER_ACE,SET_SKY_STRIKER}
34+
function s.tdfilter(c,e)
35+
return ((c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsMonster()) or (c:IsSetCard(SET_SKY_STRIKER) and c:IsSpell()))
36+
and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
37+
end
38+
function s.rescon(sg,e,tp,mg)
39+
return sg:FilterCount(Card.IsMonster,nil)==sg:FilterCount(Card.IsSpell,nil)
40+
end
41+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
42+
if chkc then return false end
43+
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e)
44+
local ct=#g
45+
if chk==0 then return ct>1 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end
46+
local tg=aux.SelectUnselectGroup(g,e,tp,2,ct,s.rescon,1,tp,HINTMSG_TODECK,s.rescon)
47+
Duel.SetTargetCard(tg)
48+
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,tp,0)
49+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
50+
end
51+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
52+
local tg=Duel.GetTargetCards(e)
53+
if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
54+
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
55+
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA)//3
56+
if ct>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
57+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
58+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
59+
if #g>0 then
60+
Duel.HintSelection(g)
61+
Duel.BreakEffect()
62+
Duel.SendtoHand(g,nil,REASON_EFFECT)
63+
end
64+
end
65+
end
66+
end
67+
function s.spconfilter(c,tp)
68+
return c:IsSetCard(SET_SKY_STRIKER) and c:IsControler(tp) and c:IsFaceup()
69+
end
70+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
71+
return eg:IsExists(s.spconfilter,1,nil,tp)
72+
end
73+
function s.spfilter(c)
74+
return c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsLinkSummonable()
75+
end
76+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
77+
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil) end
78+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
79+
end
80+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
81+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
82+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
83+
if sc then
84+
Duel.LinkSummon(tp,sc)
85+
end
86+
end

0 commit comments

Comments
 (0)