Added rpg system for combat

added lots of loot to find
added level up system
This commit is contained in:
2026-01-11 23:12:09 +01:00
parent ab16194c39
commit 3a7fb29d58
32 changed files with 5076 additions and 96 deletions

View File

@@ -55,10 +55,11 @@ var time_since_last_frame = 0.0
func _ready():
super._ready()
max_health = 20.0
max_health = 12.0 # Reduced from 20.0 for better balance
current_health = max_health
move_speed = 20.0 # Very slow (reduced from 35)
damage = 6.0
exp_reward = 8.0 # Slimes give moderate EXP
state_timer = idle_duration
@@ -70,6 +71,23 @@ func _ready():
if collision_shape and collision_shape.shape:
collision_shape.shape.radius = 6.0 # 12x12 effective size
# Override to set weak stats for slimes
func _initialize_character_stats():
super._initialize_character_stats()
# Slimes are weak enemies - very low END for low DEF
character_stats.baseStats.end = 5 # END=5 gives DEF=1.0 (5 * 0.2)
character_stats.baseStats.str = 6 # Low STR = low damage
character_stats.baseStats.dex = 5 # Low DEX
character_stats.baseStats.int = 5
character_stats.baseStats.wis = 5
character_stats.baseStats.lck = 5
# Re-initialize hp and mp with new stats
character_stats.hp = character_stats.maxhp
character_stats.mp = character_stats.maxmp
# Sync max_health from character_stats
max_health = character_stats.maxhp
current_health = max_health
func _physics_process(delta):
# Always update animation (even when dead, and on clients)
_update_animation(delta)