Commit 81694ff8 authored by wind2009's avatar wind2009

Fix

parent 5b5720e9
...@@ -48,8 +48,8 @@ end ...@@ -48,8 +48,8 @@ end
function s.rcheck(g,tp,lv) function s.rcheck(g,tp,lv)
return g:GetSum(Card.GetLevel)==lv and Duel.GetMZoneCount(tp,g)>0 return g:GetSum(Card.GetLevel)==lv and Duel.GetMZoneCount(tp,g)>0
end end
function s.cfilter2(c) function s.cfilter2(c,tp)
return c:IsRace(RACE_FAIRY) and c:IsReleasable() and c:IsLevelAbove(1) return c:IsRace(RACE_FAIRY) and c:IsReleasable() and c:IsLevelAbove(1) and (c:IsControler(tp) or c:IsFaceup())
end end
function s.filter(c,e,tp,lvt) function s.filter(c,e,tp,lvt)
local lv=c:GetLevel() local lv=c:GetLevel()
...@@ -74,7 +74,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,7 +74,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsReleasable() or not c:IsRace(RACE_FAIRY) then return false end if not c:IsReleasable() or not c:IsRace(RACE_FAIRY) then return false end
local clv=c:GetLevel() local clv=c:GetLevel()
local rg=Duel.GetReleaseGroup(tp):Filter(s.cfilter2,c) local rg=Duel.GetReleaseGroup(tp):Filter(s.cfilter2,c,tp)
local lvt={} local lvt={}
for lv=clv,12 do for lv=clv,12 do
if lv==clv and Duel.GetMZoneCount(tp,c)>0 or rg:CheckSubGroup(s.rcheck,1,99,tp,lv-clv) then if lv==clv and Duel.GetMZoneCount(tp,c)>0 or rg:CheckSubGroup(s.rcheck,1,99,tp,lv-clv) then
......
...@@ -24,12 +24,18 @@ function s.initial_effect(c) ...@@ -24,12 +24,18 @@ function s.initial_effect(c)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.filter(c) function s.filter(c,tp)
return c:IsReleasable() and c:IsRace(RACE_FAIRY) return c:IsReleasable() and c:IsRace(RACE_FAIRY) and (c:IsControler(tp) or c:IsFaceup())
end
function s.rcheck(g,tp)
return Duel.GetSZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(tp,Auxiliary.IsInGroup,#g,REASON_COST,false,nil,g)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.filter,3,nil) end local rg=Duel.GetReleaseGroup(tp,true,REASON_COST):Filter(s.filter,nil,tp)
local g=Duel.SelectReleaseGroup(tp,s.filter,3,3,nil) if chk==0 then return rg:CheckSubGroup(s.rcheck,3,3,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=rg:SelectSubGroup(tp,s.rcheck,false,3,3,tp)
aux.UseExtraReleaseCount(g,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.stfilter(c) function s.stfilter(c)
......
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