Commit 3f04441f authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix Skull Conductor (#1627)

parent 6ba46dc5
...@@ -36,39 +36,30 @@ function c62782218.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,39 +36,30 @@ function c62782218.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c62782218.spfilter(c,e,tp,satk) function c62782218.spfilter(c,e,tp)
local atk=c:GetAttack() return c:IsAttackBelow(2000) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return atk>=0 and (not satk or atk==satk) and c:IsRace(RACE_ZOMBIE) end
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) function c62782218.fselect(g)
return g:GetSum(Card.GetAttack)==2000
end end
function c62782218.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c62782218.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
if ft<=0 then return false end if ft<=0 then return false end
if ft==1 or Duel.IsPlayerAffectedByEffect(tp,59822133) then if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
return Duel.IsExistingMatchingCard(c62782218.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp,2000)
else
local g=Duel.GetMatchingGroup(c62782218.spfilter,tp,LOCATION_HAND,0,e:GetHandler(),e,tp) local g=Duel.GetMatchingGroup(c62782218.spfilter,tp,LOCATION_HAND,0,e:GetHandler(),e,tp)
return g:CheckWithSumEqual(Card.GetAttack,2000,1,2) return g:CheckSubGroup(c62782218.fselect,1,ft)
end
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c62782218.spop(e,tp,eg,ep,ev,re,r,rp) function c62782218.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
if ft<=0 then return end if ft<=0 then return end
if ft==1 or Duel.IsPlayerAffectedByEffect(tp,59822133) then if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c62782218.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,2000)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
local g=Duel.GetMatchingGroup(c62782218.spfilter,tp,LOCATION_HAND,0,nil,e,tp) local g=Duel.GetMatchingGroup(c62782218.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g:CheckWithSumEqual(Card.GetAttack,2000,1,2) then if g:CheckSubGroup(c62782218.fselect,1,ft) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectWithSumEqual(tp,Card.GetAttack,2000,1,2) local sg=g:SelectSubGroup(tp,c62782218.fselect,false,1,ft)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end
end end
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