[agent:claude-cli] feat(mobs): shark pursuit 15u + dégâts -20HP + knockback, fish school fuite boost, drops requin(dent)/méduse(gelée), recettes Amulette T2 + Lampe Portable

This commit is contained in:
2026-04-21 08:43:17 +00:00
parent 64b69fd181
commit 42101246d9
7 changed files with 84 additions and 8 deletions

View File

@@ -160,4 +160,21 @@ func _pick_wander_target() -> void:
func take_damage(dmg: float) -> void:
health -= dmg
if health <= 0.0:
_drop_loot()
queue_free()
func _drop_loot() -> void:
if not is_instance_valid(_player):
return
var dist: float = global_position.distance_to(_player.global_position)
if dist > 10.0:
return
var main: Node = get_tree().get_first_node_in_group("main")
if main == null or main.get("inventory") == null:
return
# Drop 1 gelée bioluminescente
main.inventory.add_item(108, 1)
var pp: Node = get_node_or_null("/root/PlayerProgress")
if pp != null:
pp.award(8, "méduse", global_position)