Skip to content

Commit b1ad8d5

Browse files
committed
"Alien Dog" update
- make it automatically place the counters with the mandatory effect if the opponent controls exactly 1 face-up monster
1 parent d18defb commit b1ad8d5

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

official/c15475415.lua

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--Alien Dog
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--summon success
5+
--Special Summon this card from your hand
66
local e1=Effect.CreateEffect(c)
77
e1:SetDescription(aux.Stringid(id,0))
88
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
@@ -13,7 +13,7 @@ function s.initial_effect(c)
1313
e1:SetTarget(s.sptg)
1414
e1:SetOperation(s.spop)
1515
c:RegisterEffect(e1)
16-
--counter
16+
--Place 2 counters on face-up monster(s) your opponent controls
1717
local e2=Effect.CreateEffect(c)
1818
e2:SetDescription(aux.Stringid(id,1))
1919
e2:SetCategory(CATEGORY_COUNTER)
@@ -29,9 +29,10 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
2929
return ep==tp and eg:GetFirst():IsSetCard(SET_ALIEN)
3030
end
3131
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
32+
local c=e:GetHandler()
3233
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
33-
and e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false) end
34-
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
34+
and c:IsCanBeSpecialSummoned(e,1,tp,false,false) end
35+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
3536
end
3637
function s.spop(e,tp,eg,ep,ev,re,r,rp)
3738
local c=e:GetHandler()
@@ -44,9 +45,13 @@ end
4445
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
4546
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
4647
if #g==0 then return end
47-
for i=1,2 do
48-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
49-
local sg=g:Select(tp,1,1,nil)
50-
sg:GetFirst():AddCounter(COUNTER_A,1)
48+
if #g==1 then
49+
g:GetFirst():AddCounter(COUNTER_A,2)
50+
else
51+
for i=1,2 do
52+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
53+
local sg=g:Select(tp,1,1,nil)
54+
sg:GetFirst():AddCounter(COUNTER_A,1)
55+
end
5156
end
5257
end

0 commit comments

Comments
 (0)