Add e keybinding to see your cdurrent weapon. Hopefully item tracking works correctly now.

This commit is contained in:
Storm Dragon
2025-02-06 20:12:28 -05:00
parent ffbb9da992
commit 162ebbd5e2
3 changed files with 7 additions and 2 deletions

View File

@@ -37,8 +37,8 @@ class Enemy(Object):
# Enemy type specific adjustments
if enemyType == "zombie":
self.movementSpeed *= 0.6 # Zombies are slower
self.damage = 10 # Zombies do massive damage
self.health = 3 # Easier to kill than goblins
self.damage = level.player.get_max_health() # Instant death
self.health = 1 # Easy to kill
self.attackCooldown = 1500 # Slower attack rate
@property

View File

@@ -55,3 +55,6 @@ class PowerUp(Object):
if self.channel:
self.channel.stop()
self.channel = None
# Item tracking
player.stats.update_stat('Items collected', 1)

View File

@@ -91,6 +91,8 @@ class WickedQuest:
if currentTime - self.lastThrowTime >= self.throwDelay:
self.currentLevel.throw_projectile()
self.lastThrowTime = currentTime
if keys[pygame.K_e]:
speak(f"Wielding {self.currentLevel.player.currentWeapon.name.replace('_', ' ')}")
# Handle attack with either CTRL key
if (keys[pygame.K_LCTRL] or keys[pygame.K_RCTRL]) and player.start_attack(currentTime):