The Alien Ray is now a held beam instead of a copy of the potato shot. While fire is held it ticks every alien_ray_tick_interval (0.15 s). Each tick traces a path from the scarecrow's center through the muzzle and on alien_ray_range (20 m) past it, cut short at the first wall (AlienBeam.trace on the world layer). It damages every enemy within alien_ray_width / 2 (0.25 m) plus its hit radius of that path, flyers included as with shots, nearest first, up to alien_ray_pierce (4), for alien_ray_damage (1). That is about 6.7 damage a second per enemy on the beam. Hits stay inside combat.step, so enemies.attacker credits kills. - EnemySystem.path_hits: every enemy along a polyline, ordered along it, with flat ends (nothing behind the scarecrow or past the wall). sweep_hit is unchanged. - AlienBeam: a WeaponModels held effect (hold 1.5 ticks, no fade). It is an unshaded HDR green core and glow, a muzzle light, and a flare where a wall stops it. Each frame it lays itself out from the muzzle along the model's -Z, with the same trace, so the partner's machine recomputes the wall clip locally. No protocol change. - Counters: a beam_ticks counter joins attacks(), and ray ticks no longer count as shots_fired. - Config: alien_ray_speed, alien_ray_lifetime and alien_ray_cooldown are removed. alien_ray_range, _width, _tick_interval and _pierce are added. The shop text says what it does now. Cost and hidden/reveal are unchanged. - Sound: a zapped signal and a "zap" cue (synth alien_beam.wav, its own seed). The other synth files regenerate byte-identical. Tests (test_weapons) replace the projectile-travel ray check and keep buy/equip: - a far target is hit on the same step; - nothing beside, behind or past the end is hit; - two in line and a crow are all hit; - a line is capped at pierce; - a wall stops it, including a barrel poking through one; - held ticks repeat and stop on release; - the beam is lit only while held, ends at the wall clip, follows the model's yaw, and the replica and attack-event paths work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
217 lines
3.6 KiB
Text
217 lines
3.6 KiB
Text
[gd_resource type="Resource" script_class="GameConfig" format=3 uid="uid://cqvl4hhgydj86"]
|
|
|
|
[ext_resource type="Script" uid="uid://bow5a4dimtdto" path="res://game/scripts/game_config.gd" id="1_cfg"]
|
|
|
|
[resource]
|
|
script = ExtResource("1_cfg")
|
|
costs = {
|
|
"alien_ray": {
|
|
"alien_goop": 6,
|
|
"scrap": 10
|
|
},
|
|
"automated_defense": {
|
|
"scrap": 6,
|
|
"straw": 2,
|
|
"wood": 2
|
|
},
|
|
"corn_shooter": {
|
|
"scrap": 10,
|
|
"wood": 4
|
|
},
|
|
"fence": {
|
|
"wood": 2
|
|
},
|
|
"gate": {
|
|
"scrap": 1,
|
|
"wood": 4
|
|
},
|
|
"heavy_seeds": {
|
|
"scrap": 14,
|
|
"straw": 10
|
|
},
|
|
"long_range": {
|
|
"scrap": 14,
|
|
"wood": 10
|
|
},
|
|
"patch": {
|
|
"straw": 2
|
|
},
|
|
"potato_cannon": {
|
|
"scrap": 14,
|
|
"wood": 8
|
|
},
|
|
"pouch_upgrade": {
|
|
"straw": 8,
|
|
"wood": 10
|
|
},
|
|
"propane_torch": {
|
|
"scrap": 12,
|
|
"straw": 4,
|
|
"wood": 6
|
|
},
|
|
"pumpkin_bomb": {
|
|
"scrap": 6,
|
|
"straw": 12
|
|
},
|
|
"quick_fear": {
|
|
"scrap": 6,
|
|
"straw": 16
|
|
},
|
|
"radar": {
|
|
"scrap": 8,
|
|
"wood": 6
|
|
},
|
|
"rapid_fire": {
|
|
"scrap": 12,
|
|
"straw": 12,
|
|
"wood": 8
|
|
},
|
|
"reinforced_fences": {
|
|
"scrap": 6,
|
|
"wood": 20
|
|
},
|
|
"shurikens": {
|
|
"scrap": 6,
|
|
"straw": 4
|
|
},
|
|
"slowing_trap": {
|
|
"scrap": 3,
|
|
"wood": 1
|
|
},
|
|
"sprint": {
|
|
"straw": 6,
|
|
"wood": 8
|
|
},
|
|
"sticky_tar": {
|
|
"scrap": 6,
|
|
"straw": 14
|
|
},
|
|
"straw_stuffing": {
|
|
"straw": 12,
|
|
"wood": 4
|
|
},
|
|
"wide_fear": {
|
|
"straw": 20,
|
|
"wood": 4
|
|
},
|
|
"workbench": {
|
|
"scrap": 4,
|
|
"wood": 6
|
|
}
|
|
}
|
|
upgrades = {
|
|
"alien_ray": {
|
|
"hidden": true,
|
|
"name": "Alien ray",
|
|
"shop": "shed",
|
|
"text": "A salvaged alien weapon: a long beam that pierces everything in its line while held",
|
|
"track": "Weapon"
|
|
},
|
|
"corn_shooter": {
|
|
"name": "Corn shooter",
|
|
"shop": "shed",
|
|
"text": "A gun that fires corn kernels, from afar",
|
|
"track": "Weapon"
|
|
},
|
|
"heavy_seeds": {
|
|
"add": 1,
|
|
"name": "Heavy seeds",
|
|
"requires": "corn_shooter",
|
|
"stat": "shot_damage",
|
|
"text": "Each kernel does 2 damage",
|
|
"track": "Weapon"
|
|
},
|
|
"long_range": {
|
|
"mult": 1.3,
|
|
"name": "Long-range defenses",
|
|
"stat": "turret_range",
|
|
"text": "Turrets reach 30% farther",
|
|
"track": "Defenses"
|
|
},
|
|
"potato_cannon": {
|
|
"name": "Potato cannon",
|
|
"shop": "shed",
|
|
"text": "A slow heavy potato shot that hits hard from afar",
|
|
"track": "Weapon"
|
|
},
|
|
"pouch_upgrade": {
|
|
"add": 8,
|
|
"name": "Bigger pouch",
|
|
"stat": "pouch_capacity",
|
|
"text": "+8 pouch capacity (16 total)",
|
|
"track": "Scarecrow"
|
|
},
|
|
"propane_torch": {
|
|
"name": "Propane torch",
|
|
"shop": "shed",
|
|
"text": "A jet of flame that burns everything in a band ahead of you while held",
|
|
"track": "Weapon"
|
|
},
|
|
"pumpkin_bomb": {
|
|
"name": "Pumpkin bombs",
|
|
"shop": "shed",
|
|
"text": "Throw a pumpkin that bursts, hurting everything within 3 m (one every 4 s)",
|
|
"track": "Weapon"
|
|
},
|
|
"quick_fear": {
|
|
"mult": 0.8,
|
|
"name": "Quick fear",
|
|
"stat": "fear_cooldown",
|
|
"text": "Fear recharges 20% faster",
|
|
"track": "Fear"
|
|
},
|
|
"radar": {
|
|
"hidden": true,
|
|
"name": "Radar",
|
|
"shop": "shed",
|
|
"text": "A minimap showing nearby enemy positions",
|
|
"track": "Item"
|
|
},
|
|
"rapid_fire": {
|
|
"mult": 3.0,
|
|
"name": "Rapid fire",
|
|
"requires": "corn_shooter",
|
|
"stat": "fire_rate",
|
|
"text": "The corn shooter fires 3x faster!!!!!",
|
|
"track": "Weapon"
|
|
},
|
|
"reinforced_fences": {
|
|
"mult": 1.5,
|
|
"name": "Reinforced fences",
|
|
"stat": "barrier_hp",
|
|
"text": "Fences and gates +50% health",
|
|
"track": "Defenses"
|
|
},
|
|
"shurikens": {
|
|
"name": "Shurikens",
|
|
"shop": "shed",
|
|
"text": "Fast, cheap throws for a quick hit",
|
|
"track": "Weapon"
|
|
},
|
|
"sprint": {
|
|
"name": "Sprint",
|
|
"text": "Sprint 80% faster for 4 s at a time, every 10 s",
|
|
"track": "Scarecrow"
|
|
},
|
|
"sticky_tar": {
|
|
"mult": 1.5,
|
|
"name": "Sticky tar",
|
|
"stat": "trap_slow_time",
|
|
"text": "Tar patches hold 50% longer",
|
|
"track": "Defenses"
|
|
},
|
|
"straw_stuffing": {
|
|
"add": 2,
|
|
"name": "Straw stuffing",
|
|
"stat": "scarecrow_max_hp",
|
|
"text": "+2 max health",
|
|
"track": "Scarecrow"
|
|
},
|
|
"wide_fear": {
|
|
"mult": 1.3,
|
|
"name": "Wide fear",
|
|
"stat": "fear_radius",
|
|
"text": "Fear reaches 30% farther",
|
|
"track": "Fear"
|
|
}
|
|
}
|