Skip to content

Commit 8a32e4f

Browse files
committed
"Alien Shocktrooper M-Frame" update
- place the counters automatically when there is only 1 valid monster - added a description to be shown when the player is prompted to select a monster to place counters on
1 parent a2a7925 commit 8a32e4f

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

official/c74974229.lua

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
--エーリアン・ソルジャー M/フレーム
22
--Alien Shocktrooper M-Frame
33
--scripted by Logical Nonsense
4-
--Substitute ID
54
local s,id=GetID()
65
function s.initial_effect(c)
76
c:EnableReviveLimit()
87
Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_REPTILE),2,2)
9-
--Discard to place A-counters, quick-play effect
8+
--Place A-Counters equal to the original Level of a discarded monster on face-up monster(s) on the field
109
local e1=Effect.CreateEffect(c)
1110
e1:SetDescription(aux.Stringid(id,0))
1211
e1:SetCategory(CATEGORY_COUNTER)
@@ -19,7 +18,7 @@ function s.initial_effect(c)
1918
e1:SetTarget(s.target)
2019
e1:SetOperation(s.operation)
2120
c:RegisterEffect(e1)
22-
--If destroyed, reptile Soul Charge, trigger effect
21+
--Special Summon non-Link Reptile monsters with different names from your GY, up to the number of monsters your opponent controls with A-Counters
2322
local e2=Effect.CreateEffect(c)
2423
e2:SetDescription(aux.Stringid(id,1))
2524
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
@@ -33,52 +32,48 @@ function s.initial_effect(c)
3332
c:RegisterEffect(e2)
3433
end
3534
s.counter_place_list={COUNTER_A}
36-
--Defining cost
3735
function s.costfilter(c)
3836
return c:IsMonster() and c:IsDiscardable() and c:GetOriginalLevel()>0
3937
end
40-
--Cost of discarding a monster card with a level
4138
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
4239
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end
4340
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
4441
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil)
4542
e:SetLabel(g:GetFirst():GetOriginalLevel())
4643
Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD)
4744
end
48-
--Activation legality
4945
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
5046
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
5147
end
52-
--Performing the effect of placing counters
5348
function s.operation(e,tp,eg,ep,ev,re,r,rp)
5449
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
5550
if #g==0 then return end
56-
for i=1,e:GetLabel() do
57-
local sg=g:Select(tp,1,1,nil)
58-
sg:GetFirst():AddCounter(COUNTER_A,1)
51+
if #g==1 then
52+
g:GetFirst():AddCounter(COUNTER_A,1)
53+
else
54+
for i=1,e:GetLabel() do
55+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
56+
local tc=g:Select(tp,1,1,nil):GetFirst()
57+
tc:AddCounter(COUNTER_A,1)
58+
end
5959
end
6060
end
61-
--Check if this card was destroyed
6261
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
6362
local c=e:GetHandler()
6463
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT)
6564
end
66-
--Check for opponent's monsters with A-Counters
6765
function s.acfilter(c)
6866
return c:GetCounter(COUNTER_A)>0
6967
end
70-
--Check for non-link reptile monsters that can be special summoned
7168
function s.spfilter(c,e,tp)
7269
return c:IsRace(RACE_REPTILE) and not c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
7370
end
74-
--Activation legality
7571
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
7672
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
7773
and Duel.IsExistingMatchingCard(s.acfilter,tp,0,LOCATION_MZONE,1,nil)
7874
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
7975
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
8076
end
81-
--Special summon reptile monsters from the GY
8277
function s.spop(e,tp,eg,ep,ev,re,r,rp)
8378
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
8479
local ct=Duel.GetMatchingGroupCount(s.acfilter,tp,0,LOCATION_MZONE,nil)

0 commit comments

Comments
 (0)