Skip to content

Commit 0da10d6

Browse files
authored
Update "Blackwing - Hillen the Tengu-wind (Anime)"
- Effects should be negated on Special Summon - Mild script modernization update
1 parent 60833ee commit 0da10d6

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

unofficial/c511247014.lua

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,48 @@
33
--fixed by MLD
44
local s,id=GetID()
55
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
77
local e1=Effect.CreateEffect(c)
88
e1:SetDescription(aux.Stringid(id,0))
99
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
1010
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
1111
e1:SetCode(EVENT_BATTLE_DAMAGE)
1212
e1:SetRange(LOCATION_GRAVE)
1313
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)
1515
e1:SetTarget(s.sptg)
1616
e1:SetOperation(s.spop)
1717
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
1819
local e2=e1:Clone()
1920
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)
2122
c:RegisterEffect(e2)
2223
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)
3127
end
3228
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
3329
local c=e:GetHandler()
3430
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)
3733
end
3834
function s.spop(e,tp,eg,ep,ev,re,r,rp)
3935
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
4239
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()
4849
end
4950
end

0 commit comments

Comments
 (0)