diff --git a/resources/data/entity/plant.json b/resources/data/entity/plant.json index a790f7c..a88c34f 100644 --- a/resources/data/entity/plant.json +++ b/resources/data/entity/plant.json @@ -6,6 +6,7 @@ "PuffShroom":{"x":0, "y":28, "width":35, "height":38}, "PuffShroomSleep":{"x":1, "y":0, "width":39, "height":65}, "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}, "Squash":{"x":10, "y":140, "width":80, "height":86}, "SquashAim":{"x":10, "y":140, "width":80, "height":86}, diff --git a/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_0.png b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_0.png new file mode 100644 index 0000000..59be1da Binary files /dev/null and b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_0.png differ diff --git a/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_1.png b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_1.png new file mode 100644 index 0000000..3bafde3 Binary files /dev/null and b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_1.png differ diff --git a/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_2.png b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_2.png new file mode 100644 index 0000000..42f8902 Binary files /dev/null and b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_2.png differ diff --git a/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_3.png b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_3.png new file mode 100644 index 0000000..91843a0 Binary files /dev/null and b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_3.png differ diff --git a/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_4.png b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_4.png new file mode 100644 index 0000000..769bb62 Binary files /dev/null and b/resources/graphics/Bullets/BulletSeaShroom/BulletSeaShroom_4.png differ diff --git a/resources/graphics/Bullets/BulletSeaShroomExplode/BulletSeaShroomExplode_0.gif b/resources/graphics/Bullets/BulletSeaShroomExplode/BulletSeaShroomExplode_0.gif new file mode 100644 index 0000000..3b888cc Binary files /dev/null and b/resources/graphics/Bullets/BulletSeaShroomExplode/BulletSeaShroomExplode_0.gif differ diff --git a/source/component/plant.py b/source/component/plant.py index b0ae5f8..cc593e1 100755 --- a/source/component/plant.py +++ b/source/component/plant.py @@ -78,6 +78,8 @@ class Bullet(pg.sprite.Sprite): explode_name = 'BulletMushRoomExplode' elif self.name == c.BULLET_PEA_ICE: explode_name = 'PeaIceExplode' + elif self.name == c.BULLET_SEASHROOM: + explode_name = 'BulletSeaShroomExplode' else: explode_name = 'PeaNormalExplode' @@ -1214,8 +1216,8 @@ class SeaShroom(Plant): def attacking(self): if (self.current_time - self.shoot_timer) > 1400: - self.bullet_group.add(Bullet(self.rect.right, self.rect.y + 10, self.rect.y + 10, - c.BULLET_MUSHROOM, c.BULLET_DAMAGE_NORMAL, effect=False)) + self.bullet_group.add(Bullet(self.rect.right, self.rect.y + 50, self.rect.y + 50, + c.BULLET_SEASHROOM, c.BULLET_DAMAGE_NORMAL, effect=False)) self.shoot_timer = self.current_time def canAttack(self, zombie): diff --git a/source/constants.py b/source/constants.py index 96c8844..eb967c2 100755 --- a/source/constants.py +++ b/source/constants.py @@ -256,6 +256,7 @@ BULLET_PEA = 'PeaNormal' BULLET_PEA_ICE = 'PeaIce' BULLET_FIREBALL = 'Fireball' BULLET_MUSHROOM = 'BulletMushRoom' +BULLET_SEASHROOM = 'BulletSeaShroom' # 子弹伤害 BULLET_DAMAGE_NORMAL = 20 BULLET_DAMAGE_FIREBALL_BODY = 27 # 这是火球本体的伤害,注意不是40,本体(27) + 溅射(13)才是40