New weapon, witch's broom, added. New enemy type, witch, added.
This commit is contained in:
@@ -10,6 +10,19 @@ class Weapon:
|
||||
self.lastAttackTime = 0
|
||||
self.hitEnemies = set()
|
||||
|
||||
@classmethod
|
||||
def create_witch_broom(cls):
|
||||
"""Create the witch's broom weapon"""
|
||||
return cls(
|
||||
name="witch_broom",
|
||||
damage=3,
|
||||
range=2.5,
|
||||
attackSound="player_broom_attack",
|
||||
hitSound="player_broom_hit",
|
||||
cooldown=500,
|
||||
attackDuration=200
|
||||
)
|
||||
|
||||
def can_attack(self, currentTime):
|
||||
"""Check if enough time has passed since last attack"""
|
||||
return currentTime - self.lastAttackTime >= self.cooldown
|
||||
|
Reference in New Issue
Block a user