2026-07-02 22:27:14 +01:00
|
|
|
extends BasicEnemy
|
|
|
|
|
class_name BossLobster
|
2026-07-02 22:48:24 +01:00
|
|
|
## The Snippest itself: the basic lobster, scaled up in size and stats.
|
2026-07-02 22:27:14 +01:00
|
|
|
## Spawned by the EnemySpawner on boss milestone waves.
|
|
|
|
|
|
2026-07-02 22:48:24 +01:00
|
|
|
const BOSS_MULTIPLIER := 2.0
|
2026-07-02 22:27:14 +01:00
|
|
|
|
|
|
|
|
func _ready():
|
2026-07-02 22:48:24 +01:00
|
|
|
# Scaled combat stats - applied BEFORE super._ready() so the hitbox
|
2026-07-02 22:27:14 +01:00
|
|
|
# picks them up via set_stats(attack_damage, attack_knockback)
|
|
|
|
|
max_health *= BOSS_MULTIPLIER
|
|
|
|
|
attack_damage *= BOSS_MULTIPLIER
|
|
|
|
|
attack_knockback *= BOSS_MULTIPLIER
|
2026-07-02 22:48:24 +01:00
|
|
|
attack_range *= BOSS_MULTIPLIER # A bigger lobster has longer reach
|
2026-07-02 22:27:14 +01:00
|
|
|
|
2026-07-02 22:48:24 +01:00
|
|
|
# Movement deliberately stays near normal - big things lumber
|
2026-07-02 22:27:14 +01:00
|
|
|
move_speed *= 1.2
|
|
|
|
|
|
|
|
|
|
# Boss rewards: jackpot gold, guaranteed health orb
|
|
|
|
|
gold_reward = 250
|
|
|
|
|
health_orb_drop_chance = 1.0
|
|
|
|
|
|
|
|
|
|
super._ready()
|
|
|
|
|
|
|
|
|
|
_apply_boss_scale()
|
|
|
|
|
|
2026-07-02 22:48:24 +01:00
|
|
|
## Uniformly scale the visual and collision children around the root.
|
2026-07-02 22:27:14 +01:00
|
|
|
## Child-node scaling (not root CharacterBody3D scale, not shared shape
|
|
|
|
|
## resources) keeps physics sane and other lobsters unaffected.
|
|
|
|
|
func _apply_boss_scale():
|
|
|
|
|
for child_name in ["Mesh", "CollisionShape3D", "HurtBox", "HitBox"]:
|
|
|
|
|
var child = get_node_or_null(child_name)
|
|
|
|
|
if child:
|
|
|
|
|
child.transform = child.transform.scaled(Vector3.ONE * BOSS_MULTIPLIER)
|