Skip to content

Commit 7cac197

Browse files
authored
Added new card scripts
1 parent 12027ef commit 7cac197

File tree

2 files changed

+161
-0
lines changed

2 files changed

+161
-0
lines changed

pre-release/c101303023.lua

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
--R-ACEクイック・アタッカー
2+
--Rescue-ACE Quick Attacker
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCost(s.spcost)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--Add 1 "Rescue-ACE" monster from your Deck to your hand, then you can Special Summon it if only your opponent controls a monster
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
21+
e2:SetType(EFFECT_TYPE_IGNITION)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetCost(Cost.SelfTribute)
25+
e2:SetTarget(s.thtg)
26+
e2:SetOperation(s.thop)
27+
c:RegisterEffect(e2)
28+
end
29+
s.listed_series={SET_RESCUE_ACE}
30+
function s.spcostfilter(c,tp)
31+
return c:IsSetCard(SET_RESCUE_ACE) and c:IsAbleToDeckAsCost() and Duel.GetMZoneCount(tp,c)>0
32+
and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
33+
end
34+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
35+
local c=e:GetHandler()
36+
if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,tp) end
37+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
38+
local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,tp):GetFirst()
39+
if sc:IsLocation(LOCATION_HAND) then
40+
Duel.ConfirmCards(1-tp,sc)
41+
else
42+
Duel.HintSelection(sc)
43+
end
44+
Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_COST)
45+
end
46+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
47+
local c=e:GetHandler()
48+
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
49+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
50+
end
51+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
52+
local c=e:GetHandler()
53+
if c:IsRelateToEffect(e) then
54+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
55+
end
56+
end
57+
function s.thfilter(c)
58+
return c:IsSetCard(SET_RESCUE_ACE) and c:IsMonster() and c:IsAbleToHand()
59+
end
60+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
61+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
62+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
63+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
64+
end
65+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
66+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
67+
local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
68+
if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then
69+
Duel.ConfirmCards(1-tp,sc)
70+
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false)
71+
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
72+
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
73+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
74+
Duel.BreakEffect()
75+
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
76+
end
77+
end
78+
local c=e:GetHandler()
79+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except FIRE monsters
80+
local e1=Effect.CreateEffect(c)
81+
e1:SetDescription(aux.Stringid(id,3))
82+
e1:SetType(EFFECT_TYPE_FIELD)
83+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
84+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
85+
e1:SetTargetRange(1,0)
86+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsAttribute(ATTRIBUTE_FIRE) end)
87+
e1:SetReset(RESET_PHASE|PHASE_END)
88+
Duel.RegisterEffect(e1,tp)
89+
--"Clock Lizard" check
90+
aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalAttribute(ATTRIBUTE_FIRE) end)
91+
end

pre-release/c101303051.lua

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
--R-ACEアビトレイター
2+
--Rescue-ACE Arbitrator
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Link Summon procedure: 2+ FIRE monsters
8+
Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_FIRE),2)
9+
--You can only Special Summon "Rescue-ACE Arbitrator(s)" once per turn
10+
c:SetSPSummonOnce(id)
11+
--Add 1 "Rescue-ACE Hydrant" or "Rescue-ACE HQ" from your Deck or GY to your hand
12+
local e1=Effect.CreateEffect(c)
13+
e1:SetDescription(aux.Stringid(id,0))
14+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
15+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
16+
e1:SetProperty(EFFECT_FLAG_DELAY)
17+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
18+
e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end)
19+
e1:SetTarget(s.thtg)
20+
e1:SetOperation(s.thop)
21+
c:RegisterEffect(e1)
22+
--Destroy 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_DELAY+EFFECT_FLAG_CARD_TARGET)
28+
e2:SetCode(EVENT_CHAINING)
29+
e2:SetRange(LOCATION_MZONE)
30+
e2:SetCountLimit(2,id)
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,CARD_R_ACE_HYDRANT,63899465} --"Rescue-ACE HQ"
37+
s.listed_series={SET_RESCUE_ACE}
38+
function s.thfilter(c)
39+
return c:IsCode(CARD_R_ACE_HYDRANT,63899465) and c:IsAbleToHand()
40+
end
41+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
42+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end
43+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE)
44+
end
45+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
47+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil)
48+
if #g>0 then
49+
Duel.SendtoHand(g,nil,REASON_EFFECT)
50+
Duel.ConfirmCards(1-tp,g)
51+
end
52+
end
53+
function s.descon(e,tp,eg,ep,ev,re,r,rp)
54+
local rc=re:GetHandler()
55+
return rp==tp and re:IsSpellTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsSetCard(SET_RESCUE_ACE)
56+
and (rc:IsQuickPlaySpell() or rc:IsNormalTrap())
57+
end
58+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
59+
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
60+
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
61+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
62+
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
63+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
64+
end
65+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
66+
local tc=Duel.GetFirstTarget()
67+
if tc:IsRelateToEffect(e) then
68+
Duel.Destroy(tc,REASON_EFFECT)
69+
end
70+
end

0 commit comments

Comments
 (0)