Skip to content

Commit e56aacc

Browse files
authored
Update "Powersink Stone"
End Phase effect should be OPT/general script polish.
1 parent 14ba15e commit e56aacc

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

official/c67234805.lua

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function s.initial_effect(c)
99
e1:SetType(EFFECT_TYPE_ACTIVATE)
1010
e1:SetCode(EVENT_FREE_CHAIN)
1111
c:RegisterEffect(e1)
12-
--Add counter
12+
--Place 1 Spellstone Counter each time a monster effect is activated
1313
local e2=Effect.CreateEffect(c)
1414
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
1515
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
@@ -24,28 +24,30 @@ function s.initial_effect(c)
2424
e2:SetRange(LOCATION_SZONE)
2525
e2:SetOperation(s.ctop)
2626
c:RegisterEffect(e2)
27-
--negate
27+
--Monsters on the field cannot activate their effects
2828
local e3=Effect.CreateEffect(c)
2929
e3:SetType(EFFECT_TYPE_FIELD)
3030
e3:SetCode(EFFECT_CANNOT_TRIGGER)
3131
e3:SetRange(LOCATION_SZONE)
3232
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
33-
e3:SetCondition(s.discon)
33+
e3:SetCondition(function(e) return e:GetHandler():GetCounter(0x16)==2 end)
3434
c:RegisterEffect(e3)
35+
--Negate the effects of all monsters on the field
3536
local e4=Effect.CreateEffect(c)
3637
e4:SetType(EFFECT_TYPE_FIELD)
3738
e4:SetCode(EFFECT_DISABLE)
3839
e4:SetRange(LOCATION_SZONE)
3940
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
40-
e4:SetCondition(s.discon)
41-
e4:SetTarget(s.distg)
41+
e4:SetCondition(function(e) return e:GetHandler():GetCounter(0x16)==2 end)
42+
e4:SetTarget(function(e,c) return c:IsType(TYPE_EFFECT) end)
4243
c:RegisterEffect(e4)
43-
--remove counter
44+
--Remove all Spellstone Counters from this card during the End Phase
4445
local e5=Effect.CreateEffect(c)
4546
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
4647
e5:SetCode(EVENT_PHASE+PHASE_END)
4748
e5:SetRange(LOCATION_SZONE)
48-
e5:SetCondition(s.rmcon)
49+
e5:SetCountLimit(1)
50+
e5:SetCondition(function(e) return e:GetHandler():GetCounter(0x16)>0 end)
4951
e5:SetOperation(s.rmop)
5052
c:RegisterEffect(e5)
5153
end
@@ -55,15 +57,6 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp)
5557
e:GetHandler():AddCounter(0x16,1)
5658
end
5759
end
58-
function s.discon(e)
59-
return e:GetHandler():GetCounter(0x16)==2
60-
end
61-
function s.distg(e,c)
62-
return c:IsType(TYPE_EFFECT)
63-
end
64-
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
65-
return e:GetHandler():GetCounter(0x16)>0
66-
end
6760
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
6861
e:GetHandler():RemoveCounter(tp,0x16,e:GetHandler():GetCounter(0x16),REASON_EFFECT)
6962
end

0 commit comments

Comments
 (0)