新增队伍系统,攻击不会打给同队,剩一队时游戏就结束(目前允许0~6,0号为自由队,每个人分别算一队)
添加/group命令来选择队伍
This commit is contained in:
@@ -188,12 +188,22 @@ end
|
||||
|
||||
-- Royale mode
|
||||
function randomTarget(P)-- Return a random opponent for P
|
||||
if #PLY_ALIVE>1 then
|
||||
local R
|
||||
repeat
|
||||
R=PLY_ALIVE[rnd(#PLY_ALIVE)]
|
||||
until R~=P
|
||||
return R
|
||||
local l=TABLE.shift(PLY_ALIVE,0)
|
||||
local count=0
|
||||
for i=1,#l do
|
||||
if P.group==0 and l[i]~=P or P.group~=l[i].group then
|
||||
count=count+1
|
||||
end
|
||||
end
|
||||
if count==0 then return end
|
||||
count=rnd(count)
|
||||
for i=1,#l do
|
||||
if P.group==0 and l[i]~=P or P.group~=l[i].group then
|
||||
count=count-1
|
||||
if count==0 then
|
||||
return l[i]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function freshMostDangerous()
|
||||
|
||||
Reference in New Issue
Block a user