|
3 | 3 | --fixed by MLD |
4 | 4 | local s,id=GetID() |
5 | 5 | function s.initial_effect(c) |
6 | | - --special summon |
| 6 | + --Special Summon this card and 1 Level 3 or lower "Blackwing" monster from your GY when you take 2000 or more battle damage |
7 | 7 | local e1=Effect.CreateEffect(c) |
8 | 8 | e1:SetDescription(aux.Stringid(id,0)) |
9 | 9 | e1:SetCategory(CATEGORY_SPECIAL_SUMMON) |
10 | 10 | e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) |
11 | 11 | e1:SetCode(EVENT_BATTLE_DAMAGE) |
12 | 12 | e1:SetRange(LOCATION_GRAVE) |
13 | 13 | e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) |
14 | | - e1:SetCondition(s.spcon1) |
| 14 | + e1:SetCondition(function(_,tp,_,ep,ev) return ep==tp and ev>=2000 end) |
15 | 15 | e1:SetTarget(s.sptg) |
16 | 16 | e1:SetOperation(s.spop) |
17 | 17 | c:RegisterEffect(e1) |
| 18 | + --Special Summon this card and 1 Level 3 or lower "Blackwing" monster from your GY when your opponent declares a direct attack |
18 | 19 | local e2=e1:Clone() |
19 | 20 | e2:SetCode(EVENT_ATTACK_ANNOUNCE) |
20 | | - e2:SetCondition(s.spcon2) |
| 21 | + e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end) |
21 | 22 | c:RegisterEffect(e2) |
22 | 23 | end |
23 | | -function s.spcon1(e,tp,eg,ep,ev,re,r,rp) |
24 | | - return ep==tp and ev>=2000 |
25 | | -end |
26 | | -function s.spcon2(e,tp,eg,ep,ev,re,r,rp) |
27 | | - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil |
28 | | -end |
29 | | -function s.filter(c,e,tp) |
30 | | - return c:IsLevelBelow(3) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) |
| 24 | +s.listed_series={SET_BLACKWING} |
| 25 | +function s.spfilter(c,e,tp) |
| 26 | + return c:IsLevelBelow(3) and c:IsSetCard(SET_BLACKWING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) |
31 | 27 | end |
32 | 28 | function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) |
33 | 29 | local c=e:GetHandler() |
34 | 30 | if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 |
35 | | - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,c,e,tp) end |
36 | | - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_GRAVE) |
| 31 | + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end |
| 32 | + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE) |
37 | 33 | end |
38 | 34 | function s.spop(e,tp,eg,ep,ev,re,r,rp) |
39 | 35 | local c=e:GetHandler() |
40 | | - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 |
41 | | - or not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end |
| 36 | + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 |
| 37 | + or not c:IsRelateToEffect(e) or not Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) |
| 38 | + or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end |
42 | 39 | Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) |
43 | | - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) |
44 | | - if #g>0 then |
45 | | - Duel.HintSelection(g) |
46 | | - g:AddCard(c) |
47 | | - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) |
| 40 | + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) |
| 41 | + g:AddCard(c) |
| 42 | + Duel.HintSelection(g,true) |
| 43 | + if #g==2 then |
| 44 | + for tc in g:Iter() do |
| 45 | + Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) |
| 46 | + tc:NegateEffects(c) |
| 47 | + end |
| 48 | + Duel.SpecialSummonComplete() |
48 | 49 | end |
49 | 50 | end |
0 commit comments