Skip to content

Commit 3652ec7

Browse files
authored
Update "Traplin"
-Modified monster zone check to prevent being able to prompt player to Special Summon when all Main Monster Zones are full. -Slight script cleanup/polish
1 parent 4167ab5 commit 3652ec7

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

unofficial/c511005041.lua

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
--By Shad3
44
local s,id=GetID()
55
function s.initial_effect(c)
6-
--Special Summon itself from hand
6+
--Special Summon itself from your hand by Tributing 1 Continuous Trap you control
77
local e1=Effect.CreateEffect(c)
88
e1:SetType(EFFECT_TYPE_FIELD)
99
e1:SetCode(EFFECT_SPSUMMON_PROC)
@@ -14,16 +14,14 @@ function s.initial_effect(c)
1414
e1:SetOperation(s.spop)
1515
c:RegisterEffect(e1)
1616
end
17-
function s.spfilter(c,tp)
18-
return (c:IsTrap() and c:IsType(TYPE_CONTINUOUS)) and c:IsReleasable() and (not tp or Duel.GetMZoneCount(tp,c)>0)
19-
end
2017
function s.spcon(e,c)
2118
if c==nil then return true end
22-
local g=Duel.GetMatchingGroup(s.spfilter,c:GetControler(),LOCATION_ONFIELD,0,nil,tp)
23-
return not Duel.IsPlayerAffectedByEffect(c:GetControler(),EFFECT_CANNOT_RELEASE) and #g>0
19+
local g=Duel.GetMatchingGroup(aux.AND(Card.IsContinuousTrap,Card.IsReleasable),c:GetControler(),LOCATION_ONFIELD,0,nil)
20+
return not Duel.IsPlayerAffectedByEffect(c:GetControler(),EFFECT_CANNOT_RELEASE) and #g>0
21+
and Duel.GetMZoneCount(e:GetHandlerPlayer())>0
2422
end
2523
function s.sptg(e,tp,eg,ep,ev,re,r,rp,c)
26-
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_ONFIELD,0,nil)
24+
local g=Duel.GetMatchingGroup(aux.AND(Card.IsContinuousTrap,Card.IsReleasable),tp,LOCATION_ONFIELD,0,nil)
2725
local sg=aux.SelectUnselectGroup(g,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_RELEASE,nil,nil,true)
2826
local dg=sg:Filter(Card.IsFacedown,nil)
2927
if #dg>0 then
@@ -41,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
4139
if not g then return end
4240
Duel.Release(g,REASON_COST)
4341
g:DeleteGroup()
44-
end
42+
end

0 commit comments

Comments
 (0)