aboutsummaryrefslogtreecommitdiffstats
path: root/src/game/build_graph.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/build_graph.hpp')
-rw-r--r--src/game/build_graph.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/build_graph.hpp b/src/game/build_graph.hpp
index bf83a18..4452139 100644
--- a/src/game/build_graph.hpp
+++ b/src/game/build_graph.hpp
@@ -34,6 +34,8 @@ struct MaterialDef {
bool blocks_projectiles; // stops cannon shells (wood yes; bg-brace/rope no)
bool blocks_beam; // stops laser beams (all yes in Forts)
float half_width; // visual thickness
+ float cost_metal; // metal spent placing one strut of this material
+ float cost_energy; // energy spent placing one strut of this material
float r, g, b, a; // visual colour (also tints the texture)
std::string name;
std::string texture; // CC0 placeholder path ("" = flat colour)
@@ -104,6 +106,13 @@ public:
// not block splash (pure radius falloff, like Forts AoE).
void apply_splash(float x, float y, float radius, float damage, float knockback);
+ // Directional velocity kick to free nodes within `radius` of (x,y), along the
+ // unit vector (dx,dy), with linear falloff. Weapon recoil uses this to shove
+ // the FIRING structure back (Forts' Recoil), unlike apply_splash's radial
+ // knockback on the target. No damage: recoil only moves the fort.
+ void apply_recoil(float x, float y, float radius,
+ float dx, float dy, float strength);
+
// Trace a laser beam from (ox,oy) along (dx,dy) up to `range`: damage +
// optionally ignite EVERY strut it crosses, passing through beam-transparent
// materials (bg-brace, ropes) and STOPPING at the first blocking one (wood).