Commit a4228fd2 authored by VanillaSalt's avatar VanillaSalt

fix

parent e5260f24
...@@ -41,34 +41,32 @@ function c1686814.initial_effect(c) ...@@ -41,34 +41,32 @@ function c1686814.initial_effect(c)
e5:SetValue(1) e5:SetValue(1)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c1686814.sprfilter(c,ft) function c1686814.sprfilter(c)
return c:IsFaceup() and c:GetLevel()>4 and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:GetLevel()>4 and c:IsAbleToGraveAsCost()
end end
function c1686814.sprfilter1(c,ft,g) function c1686814.sprfilter1(c,ft,tp,g)
local lv=c:GetLevel() local lv=c:GetLevel()
local chk=false if c:CheckMZoneFromEx(tp) then ft=ft+1 end
if ft>0 or c:CheckMZoneFromEX() then chk=true end return c:IsType(TYPE_TUNER) and g:IsExists(c1686814.sprfilter2,1,c,lv,ft,tp)
return c:IsType(TYPE_TUNER) and g:IsExists(c1686814.sprfilter2,1,c,lv,ft,chk)
end end
function c1686814.sprfilter2(c,lv,ft,chk) function c1686814.sprfilter2(c,lv,ft,tp)
return (chk or ft>0 or c:CheckMZoneFromEX()) and c:GetLevel()==lv and not c:IsType(TYPE_TUNER) return (ft>0 or c:CheckMZoneFromEx(tp)) and c:GetLevel()==lv and not c:IsType(TYPE_TUNER)
end end
function c1686814.sprcon(e,c) function c1686814.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp,PLAYER_NONE)
local g=Duel.GetMatchingGroup(c1686814.sprfilter,tp,LOCATION_MZONE,0,nil,ft) local g=Duel.GetMatchingGroup(c1686814.sprfilter,tp,LOCATION_MZONE,0,nil)
return ft>-2 and g:IsExists(c1686814.sprfilter1,1,nil,ft,g) return Duel.GetLocationCountFromEx(tp)>-2 and g:IsExists(c1686814.sprfilter1,1,nil,ft,tp,g)
end end
function c1686814.sprop(e,tp,eg,ep,ev,re,r,rp,c) function c1686814.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp,PLAYER_NONE)
local g=Duel.GetMatchingGroup(c1686814.sprfilter,tp,LOCATION_MZONE,0,nil,ft) local g=Duel.GetMatchingGroup(c1686814.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,c1686814.sprfilter1,1,1,nil,ft,g) local g1=g:FilterSelect(tp,c1686814.sprfilter1,1,1,nil,ft,tp,g)
local chk=false if g1:GetFirst():CheckMZoneFromEx(tp) then ft=ft+1 end
if ft>0 or g1:GetFirst():CheckMZoneFromEX() then chk=true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,c1686814.sprfilter2,1,1,g1:GetFirst(),g1:GetFirst():GetLevel(),ft,chk) local g2=g:FilterSelect(tp,c1686814.sprfilter2,1,1,g1:GetFirst(),g1:GetFirst():GetLevel(),ft,tp)
g1:Merge(g2) g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST) Duel.SendtoGrave(g1,REASON_COST)
end end
......
...@@ -46,34 +46,32 @@ function c90884403.initial_effect(c) ...@@ -46,34 +46,32 @@ function c90884403.initial_effect(c)
e5:SetOperation(c90884403.spop) e5:SetOperation(c90884403.spop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c90884403.sprfilter(c,ft) function c90884403.sprfilter(c)
return c:IsFaceup() and c:GetLevel()>7 and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:GetLevel()>7 and c:IsAbleToGraveAsCost()
end end
function c90884403.sprfilter1(c,ft,g) function c90884403.sprfilter1(c,ft,tp,g)
local lv=c:GetLevel() local lv=c:GetLevel()
local chk=false if c:CheckMZoneFromEx(tp) then ft=ft+1 end
if ft>0 or c:CheckMZoneFromEX() then chk=true end return c:IsType(TYPE_TUNER) and g:IsExists(c90884403.sprfilter2,1,c,lv,ft,tp)
return c:IsType(TYPE_TUNER) and g:IsExists(c90884403.sprfilter2,1,c,lv,ft,chk)
end end
function c90884403.sprfilter2(c,lv,ft,chk) function c90884403.sprfilter2(c,lv,ft,tp)
return (chk or ft>0 or c:CheckMZoneFromEX()) and c:GetLevel()==lv and not c:IsType(TYPE_TUNER) return (ft>0 or c:CheckMZoneFromEx(tp)) and c:GetLevel()==lv and not c:IsType(TYPE_TUNER)
end end
function c90884403.sprcon(e,c) function c90884403.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp,PLAYER_NONE)
local g=Duel.GetMatchingGroup(c90884403.sprfilter,tp,LOCATION_MZONE,0,nil,ft) local g=Duel.GetMatchingGroup(c90884403.sprfilter,tp,LOCATION_MZONE,0,nil)
return ft>-2 and g:IsExists(c90884403.sprfilter1,1,nil,ft,g) return Duel.GetLocationCountFromEx(tp)>-2 and g:IsExists(c90884403.sprfilter1,1,nil,ft,tp,g)
end end
function c90884403.sprop(e,tp,eg,ep,ev,re,r,rp,c) function c90884403.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp,PLAYER_NONE)
local g=Duel.GetMatchingGroup(c90884403.sprfilter,tp,LOCATION_MZONE,0,nil,ft) local g=Duel.GetMatchingGroup(c90884403.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,c90884403.sprfilter1,1,1,nil,ft,g) local g1=g:FilterSelect(tp,c90884403.sprfilter1,1,1,nil,ft,tp,g)
local chk=false if g1:GetFirst():CheckMZoneFromEx(tp) then ft=ft+1 end
if ft>0 or g1:GetFirst():CheckMZoneFromEX() then chk=true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,c90884403.sprfilter2,1,1,g1:GetFirst(),g1:GetFirst():GetLevel(),ft,chk) local g2=g:FilterSelect(tp,c90884403.sprfilter2,1,1,g1:GetFirst(),g1:GetFirst():GetLevel(),ft,tp)
g1:Merge(g2) g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST) Duel.SendtoGrave(g1,REASON_COST)
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