From 123aabde71c44f400154f0393a4f4b46b4c133e5 Mon Sep 17 00:00:00 2001 From: necrashter Date: Mon, 11 Dec 2023 18:49:57 +0300 Subject: [PATCH] Rockstar Dev decreases the impact of tech debt --- src/simulation.rs | 2 ++ src/upgrade.rs | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/simulation.rs b/src/simulation.rs index 027674b..e3a3992 100644 --- a/src/simulation.rs +++ b/src/simulation.rs @@ -61,6 +61,7 @@ pub struct Simulation { pub lines: f64, pub entities: f64, pub tech_debt: f64, + pub tech_debt_multiplier: f64, /// Fun score, affects the submission's results. pub fun_score: f64, /// Presentation factor, affects the submissions' results. @@ -99,6 +100,7 @@ impl Default for Simulation { lines: 0.0, entities: 0.0, tech_debt: 0.0, + tech_debt_multiplier: 1.0, fun_score: 0.0, presentation_score: 0.0, diff --git a/src/upgrade.rs b/src/upgrade.rs index 3f9c53b..644ec78 100644 --- a/src/upgrade.rs +++ b/src/upgrade.rs @@ -172,7 +172,11 @@ impl Upgrade { } pub fn cost(&self, simulation: &Simulation) -> f64 { - (self.base_cost * self.cost_scale_factor.powf(simulation.tech_debt)).floor() + (self.base_cost + * self + .cost_scale_factor + .powf(simulation.tech_debt * simulation.tech_debt_multiplier)) + .floor() } pub fn description(&self) -> String { @@ -1363,7 +1367,10 @@ generate_upgrade_list!( Upgrade { name: NAMES[0].to_string(), - desc: "Spawns VALUE entities whenever a line of code is produced.".to_string(), + desc: "\ + Spawns VALUE entities whenever a line of code is produced. \ + Decreases the impact of technical debt.\ + ".to_string(), sound: Some(SoundEffectKind::Guitar), value: 4.0, no_count: true, @@ -1383,12 +1390,14 @@ generate_upgrade_list!( if this.remaining == 5 { // First time (remaining is decreased beforehand) simulation.entity_spawn_per_line += 4.0; + simulation.tech_debt_multiplier = 0.5; // Make subsequent copies of this upgrade available in the random pool. this.base_cost = 100.0; this.weight = 1.0; } else { // Level up simulation.entity_spawn_per_line *= 2.0; + simulation.tech_debt_multiplier *= 0.875; } // Special scaling this.base_cost *= 100.0;