Commit e852a4bd authored by mercury233's avatar mercury233 Committed by GitHub

fix ヴァレルコード・ドラゴン

https://github.com/Fluorohydride/ygopro-scripts/pull/1821
parent db367a6e
...@@ -85,7 +85,7 @@ function c67288539.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,7 +85,7 @@ function c67288539.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c67288539.rmfilter(c,e,tp,check) function c67288539.rmfilter(c,e,tp,check)
return c:IsFaceup() and c:IsAttackAbove(3000) and c:IsAttribute(ATTRIBUTE_DARK) return c:IsFaceup() and c:IsAttackAbove(3000) and c:IsAttribute(ATTRIBUTE_DARK)
and (check or Duel.IsExistingMatchingCard(c67288539.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)) and (check or not c:IsImmuneToEffect(e) and Duel.IsExistingMatchingCard(c67288539.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c))
end end
function c67288539.spfilter(c,e,tp,tc) function c67288539.spfilter(c,e,tp,tc)
if not (c:IsSetCard(0x16e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end if not (c:IsSetCard(0x16e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end
...@@ -103,9 +103,16 @@ function c67288539.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -103,9 +103,16 @@ function c67288539.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c67288539.rmop(e,tp,eg,ep,ev,re,r,rp) function c67288539.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c67288539.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,true) local tg=Duel.SelectMatchingCard(tp,c67288539.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,false)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if not tc then return end if not tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg2=Duel.SelectMatchingCard(tp,c67288539.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,true)
if #tg2>0 then
Duel.Remove(tg2,POS_FACEUP,REASON_EFFECT)
end
return
end
Duel.HintSelection(tg) Duel.HintSelection(tg)
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment