[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user