更改缠绕海草攻击范围
This commit is contained in:
parent
544560c49e
commit
9e01c018e4
@ -112,7 +112,8 @@ class Map():
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
elif (plant_name == c.PUMPKINHEAD) and (c.PUMPKINHEAD not in self.map[map_y][map_x][c.MAP_PLANT]): # 有花盆且没有南瓜头就能种南瓜头
|
||||
elif ((plant_name == c.PUMPKINHEAD)
|
||||
and (c.PUMPKINHEAD not in self.map[map_y][map_x][c.MAP_PLANT])): # 有花盆且没有南瓜头就能种南瓜头
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
@ -136,7 +137,8 @@ class Map():
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
elif (plant_name == c.PUMPKINHEAD) and (c.PUMPKINHEAD not in self.map[map_y][map_x][c.MAP_PLANT]): # 在睡莲上且没有南瓜头就能种南瓜头
|
||||
elif ((plant_name == c.PUMPKINHEAD)
|
||||
and (c.PUMPKINHEAD not in self.map[map_y][map_x][c.MAP_PLANT])): # 在睡莲上且没有南瓜头就能种南瓜头
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
@ -1474,7 +1474,7 @@ class TangleKlep(Plant):
|
||||
def canAttack(self, zombie):
|
||||
if zombie.state != c.DIE and (not zombie.losthead):
|
||||
# 这里碰撞应当比碰撞一般更容易,就设置成圆形或矩形模式,不宜采用mask
|
||||
if pg.sprite.collide_circle_ratio(0.7)(zombie, self):
|
||||
if pg.sprite.collide_rect_ratio(1)(zombie, self):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user