Commit ac5b6a76 authored by Uytrewq's avatar Uytrewq Committed by GitHub

limit value Duel.AnnounceNumber (#2405)

* update for Duel.AnnounceNumber

* Revert "update for Duel.AnnounceNumber"

This reverts commit 2fdf3fb28bc96348e2bae15b38aee52d9f5aa3f5.

* fix Skull Lair

cannot destroy level 13 or more monster

* limit value Duel.AnnounceNumber
parent d83060cb
......@@ -22,7 +22,7 @@ function c17078030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local t={}
local f=math.floor((lp)/1000)
local l=1
while l<=f and l<=20 do
while l<=f and l<=255 do
t[l]=l*1000
l=l+1
end
......
......@@ -14,7 +14,7 @@ function c67196946.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lp=Duel.GetLP(tp)
local g=Duel.GetMatchingGroup(Card.IsLevelAbove,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,2)
local tg=g:GetMaxGroup(Card.GetLevel)
local maxlv=tg:GetFirst():GetLevel()
local maxlv=math.min(tg:GetFirst():GetLevel(),255)
local t={}
local l=1
while l<maxlv and l*500<=lp do
......
......@@ -42,7 +42,9 @@ function c6733059.cost(e,tp,eg,ep,ev,re,r,rp,chk)
tc=tg:GetNext()
end
local pc=1
for i=1,12 do
local _,lvmax=tg:GetMaxGroup(Card.GetLevel)
local max=math.min(lvmax,255)
for i=1,max do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end
lvt[pc]=nil
......
......@@ -39,7 +39,7 @@ function c68299524.cost(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local tg,atk=g:GetMaxGroup(Card.GetAttack)
local maxc=math.min(Duel.GetLP(tp),atk)
local maxc=math.min(Duel.GetLP(tp),atk,25500)
local ct=math.floor(maxc/100)
local t={}
for i=1,ct do
......
......@@ -36,7 +36,7 @@ function c84389640.cost(e,tp,eg,ep,ev,re,r,rp,chk)
and e:GetLabelObject():IsAttackAbove(100) end
local lp=Duel.GetLP(tp)
local atk=e:GetLabelObject():GetAttack()
local maxc=lp>atk and atk or lp
local maxc=math.min(atk,lp,25500)
maxc=math.floor(maxc/100)*100
local t={}
for i=1,maxc/100 do
......
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