New weapon, witch's broom, added. New enemy type, witch, added.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from libstormgames import *
|
||||
from src.object import Object
|
||||
from src.weapon import Weapon
|
||||
|
||||
class PowerUp(Object):
|
||||
def __init__(self, x, y, item_type, sounds, direction):
|
||||
@@ -44,12 +45,18 @@ class PowerUp(Object):
|
||||
"""Apply the item's effect when collected"""
|
||||
if self.item_type == 'hand_of_glory':
|
||||
player.start_invincibility()
|
||||
elif self.item_type == 'cauldron':
|
||||
player.restore_health()
|
||||
elif self.item_type == 'guts':
|
||||
player.add_guts()
|
||||
elif self.item_type == 'jack_o_lantern':
|
||||
player.add_jack_o_lantern()
|
||||
elif self.item_type == 'extra_life':
|
||||
player.extra_life()
|
||||
elif self.item_type == 'witch_broom':
|
||||
broomWeapon = Weapon.create_witch_broom()
|
||||
player.add_weapon(broomWeapon)
|
||||
player.equip_weapon(broomWeapon)
|
||||
|
||||
# Stop movement sound when collected
|
||||
if self.channel:
|
||||
|
Reference in New Issue
Block a user