Skip to content

Commit fad6cf7

Browse files
authored
Update "Spirit Shield (Anime)"
Script polish/denotations of anime card
1 parent f381272 commit fad6cf7

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

unofficial/c511000116.lua

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,36 @@
1-
--死霊の盾
2-
--Spirit Shield
1+
--死霊の盾 (Anime)
2+
--Spirit Shield (Anime)
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--activate
5+
--Activate
66
local e1=Effect.CreateEffect(c)
77
e1:SetType(EFFECT_TYPE_ACTIVATE)
88
e1:SetCode(EVENT_FREE_CHAIN)
99
e1:SetHintTiming(0,TIMING_ATTACK)
1010
c:RegisterEffect(e1)
11-
--negate
11+
--Negate attacks from opponent's monsters
1212
local e2=Effect.CreateEffect(c)
1313
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
1414
e2:SetRange(LOCATION_SZONE)
1515
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
16-
e2:SetCondition(s.atkcon)
16+
e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end)
1717
e2:SetCost(s.atkcost)
1818
e2:SetOperation(s.atkop)
1919
c:RegisterEffect(e2)
20-
--self destroy
20+
--Destroy this card if you have no Zombie or Fiend monsters in your GY
2121
local e3=Effect.CreateEffect(c)
2222
e3:SetType(EFFECT_TYPE_SINGLE)
2323
e3:SetCode(EFFECT_SELF_DESTROY)
24-
e3:SetCondition(s.descon)
24+
e3:SetCondition(function(e) return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FIEND|RACE_ZOMBIE),e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) end)
2525
c:RegisterEffect(e3)
2626
end
27-
function s.descon(e)
28-
return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FIEND+RACE_ZOMBIE),e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
29-
end
30-
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
31-
return Duel.GetAttacker():IsControler(1-tp)
32-
end
3327
function s.cfilter(c)
34-
return c:IsRace(RACE_FIEND+RACE_ZOMBIE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true)
28+
return c:IsRace(RACE_FIEND|RACE_ZOMBIE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true)
3529
end
3630
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
37-
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
31+
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end
3832
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
39-
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
33+
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil)
4034
Duel.Remove(g,POS_FACEUP,REASON_COST)
4135
end
4236
function s.atkop(e,tp,eg,ep,ev,re,r,rp)

0 commit comments

Comments
 (0)