Skip to content

Commit c8ff611

Browse files
authored
Added new card script
1 parent 332a89a commit c8ff611

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

pre-release/c101301045.lua

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
--ARG☆S-勇駿のアリオン
2+
--Argostars - Courageous Arion
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Xyz Summon procedure: 2 Level 4 monsters, OR 1 "Argostars" monster you control
8+
Xyz.AddProcedure(c,nil,4,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
9+
--Add 1 "Argostars" Spell from your Deck to your hand
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,1))
12+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_DELAY)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetCountLimit(1,id)
17+
e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end)
18+
e1:SetTarget(s.thtg)
19+
e1:SetOperation(s.thop)
20+
c:RegisterEffect(e1)
21+
--Place up to 3 "Argostars" Continuous Traps from your GY, face-up in your Spell & Trap Zone
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,2))
24+
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
25+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
26+
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
27+
e2:SetRange(LOCATION_MZONE)
28+
e2:SetCountLimit(1,{id,1})
29+
e2:SetCost(Cost.Detach(2))
30+
e2:SetTarget(s.pltg)
31+
e2:SetOperation(s.plop)
32+
c:RegisterEffect(e2)
33+
end
34+
s.listed_names={id}
35+
s.listed_series={SET_ARGOSTARS}
36+
function s.ovfilter(c,tp,lc)
37+
return c:IsSetCard(SET_ARGOSTARS,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup()
38+
end
39+
function s.xyzop(e,tp,chk)
40+
if chk==0 then return not Duel.HasFlagEffect(tp,id) end
41+
return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1)
42+
end
43+
function s.thfilter(c)
44+
return c:IsSetCard(SET_ARGOSTARS) and c:IsSpell() and c:IsAbleToHand()
45+
end
46+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
47+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
48+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
49+
end
50+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
51+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
52+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
53+
if #g>0 then
54+
Duel.SendtoHand(g,nil,REASON_EFFECT)
55+
Duel.ConfirmCards(1-tp,g)
56+
end
57+
end
58+
function s.plfilter(c)
59+
return c:IsSetCard(SET_ARGOSTARS) and c:IsContinuousTrap() and not c:IsForbidden()
60+
end
61+
function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
62+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
63+
and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_GRAVE,0,1,nil) end
64+
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
65+
end
66+
function s.plop(e,tp,eg,ep,ev,re,r,rp)
67+
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
68+
if ft<=0 then return end
69+
ft=math.min(ft,3)
70+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
71+
local g=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_GRAVE,0,1,ft,nil)
72+
if #g>0 then
73+
for sc in g:Iter() do
74+
Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
75+
end
76+
end
77+
end

0 commit comments

Comments
 (0)