|
1 | | ---死霊の盾 |
2 | | ---Spirit Shield |
| 1 | +--死霊の盾 (Anime) |
| 2 | +--Spirit Shield (Anime) |
3 | 3 | local s,id=GetID() |
4 | 4 | function s.initial_effect(c) |
5 | | - --activate |
| 5 | + --Activate |
6 | 6 | local e1=Effect.CreateEffect(c) |
7 | 7 | e1:SetType(EFFECT_TYPE_ACTIVATE) |
8 | 8 | e1:SetCode(EVENT_FREE_CHAIN) |
9 | 9 | e1:SetHintTiming(0,TIMING_ATTACK) |
10 | 10 | c:RegisterEffect(e1) |
11 | | - --negate |
| 11 | + --Negate attacks from opponent's monsters |
12 | 12 | local e2=Effect.CreateEffect(c) |
13 | 13 | e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) |
14 | 14 | e2:SetRange(LOCATION_SZONE) |
15 | 15 | e2:SetCode(EVENT_ATTACK_ANNOUNCE) |
16 | | - e2:SetCondition(s.atkcon) |
| 16 | + e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) |
17 | 17 | e2:SetCost(s.atkcost) |
18 | 18 | e2:SetOperation(s.atkop) |
19 | 19 | c:RegisterEffect(e2) |
20 | | - --self destroy |
| 20 | + --Destroy this card if you have no Zombie or Fiend monsters in your GY |
21 | 21 | local e3=Effect.CreateEffect(c) |
22 | 22 | e3:SetType(EFFECT_TYPE_SINGLE) |
23 | 23 | 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) |
25 | 25 | c:RegisterEffect(e3) |
26 | 26 | 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 |
33 | 27 | 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) |
35 | 29 | end |
36 | 30 | 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 |
38 | 32 | 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) |
40 | 34 | Duel.Remove(g,POS_FACEUP,REASON_COST) |
41 | 35 | end |
42 | 36 | function s.atkop(e,tp,eg,ep,ev,re,r,rp) |
|
0 commit comments