spaceship/MothershipEnemyDefinition.tres
Loïc Wisniewski 1de66c6fb2 Gate enemies behind a detection range instead of instant omniscient pursuit (#69)
Chasers (EnemyPursuitComponent) and snipers (EnemyStandoffComponent)
used to beeline/close in from anywhere on the map the instant they
spawned - no matter how far the fleet was, which read as omniscient
rather than alert. Both now sit idle until the fleet is within their
own detection_range. Artillery's slow drift is gated the same way, but
reuses its own existing fire_range rather than a new tunable - outside
its firing envelope it has nothing to be drifting toward yet.

The enemy mothership deliberately keeps the opposite behaviour: it is
meant to read as a persistent, unavoidable stalking threat, not a
local sentry, so it gets its own EnemyPursuitComponentMothership.tscn
variant with an effectively unlimited detection_range - the same
scene-variant pattern EnemySpawnerComponentChaser/Artillery already
use for per-definition property overrides on a shared component script.
2026-08-17 19:47:37 +02:00

19 lines
910 B
Text

[gd_resource type="Resource" script_class="EnemyDefinition" load_steps=6 format=3]
[ext_resource type="Script" path="res://EnemyDefinition.gd" id="1"]
[ext_resource type="PackedScene" path="res://EnemyPursuitComponentMothership.tscn" id="2"]
[ext_resource type="PackedScene" path="res://EnemySpawnerComponentChaser.tscn" id="3"]
[ext_resource type="PackedScene" path="res://EnemySpawnerComponentArtillery.tscn" id="4"]
[ext_resource type="PackedScene" path="res://EnemyBigLaserComponent.tscn" id="5"]
[resource]
script = ExtResource("1")
enemy_id = "enemy_mothership"
display_name = "Mothership"
max_hp = 60
speed = 35.0
acceleration = 45.0
rotation_speed = 1.5
hull_points = PackedVector2Array(0, -50, 35, -25, 48, 10, 20, 48, -20, 48, -48, 10, -35, -25)
glow_color = Color(0.55, 0.05, 0.85, 1)
component_scenes = Array[PackedScene]([ExtResource("2"), ExtResource("3"), ExtResource("4"), ExtResource("5")])