完善海蘑菇子弹

This commit is contained in:
星外之神 2022-05-05 09:17:08 +08:00
parent 110c5a47c4
commit 1d72fc05a2
9 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,7 @@
"PuffShroom":{"x":0, "y":28, "width":35, "height":38}, "PuffShroom":{"x":0, "y":28, "width":35, "height":38},
"PuffShroomSleep":{"x":1, "y":0, "width":39, "height":65}, "PuffShroomSleep":{"x":1, "y":0, "width":39, "height":65},
"BulletMushRoom":{"x":0, "y":1, "width":55, "height":21}, "BulletMushRoom":{"x":0, "y":1, "width":55, "height":21},
"BulletSeaShroom":{"x":0, "y":1, "width":55, "height":21},
"PotatoMine":{"x":0, "y":0, "width":75, "height":55}, "PotatoMine":{"x":0, "y":0, "width":75, "height":55},
"Squash":{"x":10, "y":140, "width":80, "height":86}, "Squash":{"x":10, "y":140, "width":80, "height":86},
"SquashAim":{"x":10, "y":140, "width":80, "height":86}, "SquashAim":{"x":10, "y":140, "width":80, "height":86},

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -78,6 +78,8 @@ class Bullet(pg.sprite.Sprite):
explode_name = 'BulletMushRoomExplode' explode_name = 'BulletMushRoomExplode'
elif self.name == c.BULLET_PEA_ICE: elif self.name == c.BULLET_PEA_ICE:
explode_name = 'PeaIceExplode' explode_name = 'PeaIceExplode'
elif self.name == c.BULLET_SEASHROOM:
explode_name = 'BulletSeaShroomExplode'
else: else:
explode_name = 'PeaNormalExplode' explode_name = 'PeaNormalExplode'
@ -1214,8 +1216,8 @@ class SeaShroom(Plant):
def attacking(self): def attacking(self):
if (self.current_time - self.shoot_timer) > 1400: if (self.current_time - self.shoot_timer) > 1400:
self.bullet_group.add(Bullet(self.rect.right, self.rect.y + 10, self.rect.y + 10, self.bullet_group.add(Bullet(self.rect.right, self.rect.y + 50, self.rect.y + 50,
c.BULLET_MUSHROOM, c.BULLET_DAMAGE_NORMAL, effect=False)) c.BULLET_SEASHROOM, c.BULLET_DAMAGE_NORMAL, effect=False))
self.shoot_timer = self.current_time self.shoot_timer = self.current_time
def canAttack(self, zombie): def canAttack(self, zombie):

View File

@ -256,6 +256,7 @@ BULLET_PEA = 'PeaNormal'
BULLET_PEA_ICE = 'PeaIce' BULLET_PEA_ICE = 'PeaIce'
BULLET_FIREBALL = 'Fireball' BULLET_FIREBALL = 'Fireball'
BULLET_MUSHROOM = 'BulletMushRoom' BULLET_MUSHROOM = 'BulletMushRoom'
BULLET_SEASHROOM = 'BulletSeaShroom'
# 子弹伤害 # 子弹伤害
BULLET_DAMAGE_NORMAL = 20 BULLET_DAMAGE_NORMAL = 20
BULLET_DAMAGE_FIREBALL_BODY = 27 # 这是火球本体的伤害注意不是40本体(27) + 溅射(13)才是40 BULLET_DAMAGE_FIREBALL_BODY = 27 # 这是火球本体的伤害注意不是40本体(27) + 溅射(13)才是40