Commit 8890497e authored by DailyShana's avatar DailyShana

validate Duel.CheckTribute

parent dd4eb563
......@@ -68,7 +68,7 @@ function c10000080.initial_effect(c)
end
function c10000080.ttcon1(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and Duel.GetTributeCount(c)>=3
return Duel.CheckTribute(c,3)
end
function c10000080.ttop1(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
......@@ -78,8 +78,7 @@ end
function c10000080.ttcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-3 and Duel.GetTributeCount(c,mg,true)>=3
return Duel.CheckTribute(c,3,3,nil,1-tp)
end
function c10000080.ttop2(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
......
......@@ -43,17 +43,11 @@ function c96570609.otfilter(c)
end
function c96570609.otcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c96570609.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then mg=mg:Filter(Card.IsControler,nil,tp) end
return c:GetLevel()>6 and ft>-1 and Duel.GetTributeCount(c,mg)>0
return c:GetLevel()>6 and Duel.CheckTribute(c,1,1,mg)
end
function c96570609.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c96570609.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
mg=mg:Filter(Card.IsControler,nil,tp)
end
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
......
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