修复僵尸贴图显示异常的bug
This commit is contained in:
parent
32e57c4136
commit
3792870cf3
@ -99,6 +99,8 @@ nuitka --mingw --standalone --onefile --show-progress --show-memory --output-dir
|
||||
* 目前的设想与原版不同,在完成两轮冒险模式(初始冒险模式 + 戴夫选关的冒险模式)后可以自主选关~~(当然现在只是画饼)~~
|
||||
* 更改僵尸生成方式
|
||||
* 使僵尸生成更随机化,由JSON记录改为随机数生成
|
||||
* 使用原版设定,每面旗帜出10波僵尸,9个小波,1个大波
|
||||
* 采用手机版设定,无尽模式没有红眼计数和变速设定,每波红眼权重为1000,平均分布
|
||||
* 增加僵尸死亡后有概率掉落奖励的机制
|
||||
* 增加更多植物、僵尸类型与游戏功能、模式,尽量符合原版基本设计
|
||||
* 细分伤害种类
|
||||
|
||||
@ -53,7 +53,6 @@ class Zombie(pg.sprite.Sprite):
|
||||
if name in tool.ZOMBIE_RECT:
|
||||
data = tool.ZOMBIE_RECT[name]
|
||||
x, width = data['x'], data['width']
|
||||
width -= x
|
||||
else:
|
||||
x = 0
|
||||
for frame in frame_list:
|
||||
|
||||
@ -357,6 +357,7 @@ class Level(tool.State):
|
||||
pg.mixer.music.play(-1, 0)
|
||||
return
|
||||
|
||||
# 旧僵尸生成方式
|
||||
if self.zombie_start_time == 0:
|
||||
self.zombie_start_time = self.current_time
|
||||
elif len(self.zombie_list) > 0:
|
||||
@ -474,19 +475,16 @@ class Level(tool.State):
|
||||
zombieList += newZombie
|
||||
volume -= self.createZombieInfo[newZombie][0]
|
||||
if volume < 0:
|
||||
volume = 0 # 避免手动指定的最后一个僵尸被while循环的else删除
|
||||
print('警告:第{}波中手动设置的僵尸级别总数超过上限!'.format(wave))
|
||||
|
||||
while (volume >= 0) and (len(zombieList) <= 50):
|
||||
while (volume > 0) and (len(zombieList) < 50):
|
||||
newZombie = choices(useableZombies, weights) # 注意这个的输出是列表
|
||||
if self.createZombieInfo[newZombie][0] <= volume:
|
||||
zombieList += newZombie
|
||||
volume -= self.createZombieInfo[newZombie][0]
|
||||
else:
|
||||
zombieList.pop()
|
||||
waves.append(zombieList)
|
||||
|
||||
return waves # 输出为分波列出的本关所有波的僵尸
|
||||
|
||||
self.waves = waves
|
||||
|
||||
|
||||
def createZombie(self, name, map_y=None):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user