Skip to content

Commit 8a296bf

Browse files
authored
Added new card scripts
1 parent abf9f3e commit 8a296bf

File tree

2 files changed

+150
-0
lines changed

2 files changed

+150
-0
lines changed

pre-release/c100200271.lua

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
--試号閃刀姫-アマツ
2+
--Prototype Sky Striker Ace - Amatsu
3+
--Scripted by ahtelel
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Link Summon procedure: 1 "Sky Striker Ace" monster
8+
Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SKY_STRIKER_ACE),1)
9+
--You can only Special Summon "Protoype Sky Striker Ace - Amatsu" once per turn
10+
c:SetSPSummonOnce(id)
11+
--Make the effect of a monster your opponent controls with 2000 or more ATK become "Destroy 1 "Sky Striker Ace" Link Monster your opponent controls"
12+
local e1=Effect.CreateEffect(c)
13+
e1:SetDescription(aux.Stringid(id,0))
14+
e1:SetType(EFFECT_TYPE_QUICK_O)
15+
e1:SetCode(EVENT_CHAINING)
16+
e1:SetRange(LOCATION_MZONE)
17+
e1:SetCountLimit(1,id)
18+
e1:SetCondition(s.chngcon)
19+
e1:SetTarget(s.chngtg)
20+
e1:SetOperation(s.chngop)
21+
c:RegisterEffect(e1)
22+
--Destroy 1 "Sky Striker Ace" monster you control and 1 card your opponent controls
23+
local e2=Effect.CreateEffect(c)
24+
e2:SetDescription(aux.Stringid(id,1))
25+
e2:SetCategory(CATEGORY_DESTROY)
26+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
27+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
28+
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
29+
e2:SetRange(LOCATION_MZONE)
30+
e2:SetCountLimit(1,{id,1})
31+
e2:SetCondition(s.descon)
32+
e2:SetTarget(s.destg)
33+
e2:SetOperation(s.desop)
34+
c:RegisterEffect(e2)
35+
end
36+
s.listed_names={id}
37+
s.listed_series={SET_SKY_STRIKER_ACE}
38+
function s.chngcon(e,tp,eg,ep,ev,re,r,rp)
39+
local loc,atk=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_ATTACK)
40+
return rp==1-tp and atk>=2000 and loc==LOCATION_MZONE
41+
end
42+
function s.chngfilter(c)
43+
return c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsLinkMonster()
44+
end
45+
function s.chngtg(e,tp,eg,ep,ev,re,r,rp,chk)
46+
if chk==0 then return Duel.IsExistingMatchingCard(s.chngfilter,rp,0,LOCATION_MZONE,1,nil) end
47+
end
48+
function s.chngop(e,tp,eg,ep,ev,re,r,rp)
49+
local g=Group.CreateGroup()
50+
Duel.ChangeTargetCard(ev,g)
51+
Duel.ChangeChainOperation(ev,s.repop)
52+
end
53+
function s.repop(e,tp,eg,ep,ev,re,r,rp)
54+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
55+
local g=Duel.SelectMatchingCard(tp,s.chngfilter,tp,0,LOCATION_MZONE,1,1,nil)
56+
if #g>0 then
57+
Duel.HintSelection(g)
58+
Duel.Destroy(g,REASON_EFFECT)
59+
end
60+
end
61+
function s.descon(e,tp,eg,ep,ev,re,r,rp)
62+
local bc1,bc2=Duel.GetBattleMonster(tp)
63+
return bc1==e:GetHandler() and bc2
64+
end
65+
function s.desfilter(c,e,tp)
66+
return c:IsCanBeEffectTarget(e) and (c:IsControler(1-tp) or (c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsFaceup()))
67+
end
68+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
69+
if chkc then return false end
70+
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,e,tp)
71+
if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) end
72+
local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_DESTROY)
73+
Duel.SetTargetCard(tg)
74+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,2,tp,0)
75+
end
76+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
77+
local tg=Duel.GetTargetCards(e)
78+
if #tg>0 then
79+
Duel.Destroy(tg,REASON_EFFECT)
80+
end
81+
end

pre-release/c101301064.lua

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
--灰滅の劫火
2+
--Inferno of the Ashened
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--When this card is activated: You can place 1 "Obsidim, the Ashened City" from your Deck face-up in either Field Zone
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_FREE_CHAIN)
11+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
12+
e1:SetOperation(s.activate)
13+
c:RegisterEffect(e1)
14+
--Send 1 face-up card your opponent controls to the GY and Special Summon 1 Level 8 or higher DARK Pyro monster from your GY to your opponent's field in Defense Position
15+
local e2=Effect.CreateEffect(c)
16+
e2:SetDescription(aux.Stringid(id,1))
17+
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
18+
e2:SetType(EFFECT_TYPE_IGNITION)
19+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
20+
e2:SetRange(LOCATION_SZONE)
21+
e2:SetCountLimit(1,{id,1})
22+
e2:SetTarget(s.tgsptg)
23+
e2:SetOperation(s.tgspop)
24+
c:RegisterEffect(e2)
25+
end
26+
s.listed_names={CARD_OBSIDIM_ASHENED_CITY}
27+
function s.plfilter(c)
28+
return c:IsCode(CARD_OBSIDIM_ASHENED_CITY) and not c:IsForbidden()
29+
end
30+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
31+
local g=Duel.GetMatchingGroup(s.plfilter,tp,LOCATION_DECK,0,nil,tp)
32+
if Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil)
33+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
34+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
35+
local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
36+
if sc then
37+
local op=Duel.SelectOption(tp,false,aux.Stringid(id,3),aux.Stringid(id,4))
38+
local target_player=op==0 and tp or 1-tp
39+
Duel.MoveToField(sc,tp,target_player,LOCATION_FZONE,POS_FACEUP,true)
40+
end
41+
end
42+
end
43+
function s.tgfilter(c,tp)
44+
return c:IsFaceup() and c:IsAbleToGrave() and Duel.GetMZoneCount(1-tp,c)>0
45+
end
46+
function s.spfilter(c,e,tp)
47+
return c:IsLevelAbove(8) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_PYRO)
48+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp)
49+
end
50+
function s.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
51+
if chkc then return false end
52+
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_ONFIELD,1,nil,tp)
53+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
54+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
55+
local g1=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil,tp)
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
57+
local g2=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
58+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,tp,0)
59+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,tp,0)
60+
end
61+
function s.tgspop(e,tp,eg,ep,ev,re,r,rp)
62+
local tg=Duel.GetTargetCards(e)
63+
if #tg==0 then return end
64+
local fg,gg=tg:Split(Card.IsLocation,nil,LOCATION_ONFIELD)
65+
if #fg>0 and Duel.SendtoGrave(fg,REASON_EFFECT)>0 and fg:GetFirst():IsLocation(LOCATION_GRAVE)
66+
and #gg>0 then
67+
Duel.SpecialSummon(gg,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
68+
end
69+
end

0 commit comments

Comments
 (0)