Skip to content

Commit

Permalink
feat(balance): mech speed updates, exempt mechs from monster speed/re…
Browse files Browse the repository at this point in the history
…silience settings (#4627)

feat(balance): mech speed updates, exempt from monster speed/resilience settings
  • Loading branch information
chaosvolt committed May 13, 2024
1 parent 38c171f commit a02f303
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions data/json/monsters/mechsuits.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"volume": "700388 ml",
"weight": "700388 g",
"hp": 320,
"speed": 120,
"speed": 150,
"material": [ "superalloy" ],
"symbol": "M",
"color": "blue",
Expand Down Expand Up @@ -59,7 +59,7 @@
"volume": "1480388 ml",
"weight": "1480388 g",
"hp": 550,
"speed": 65,
"speed": 125,
"material": [ "superalloy" ],
"symbol": "M",
"color": "red",
Expand Down Expand Up @@ -109,7 +109,7 @@
"volume": "1280388 ml",
"weight": "1280388 g",
"hp": 400,
"speed": 50,
"speed": 100,
"material": [ "superalloy" ],
"symbol": "M",
"color": "yellow",
Expand Down
8 changes: 5 additions & 3 deletions src/monstergenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,11 @@ void MonsterGenerator::finalize_mtypes()
set_species_ids( mon );
mon.size = volume_to_size( mon.volume );

// adjust for worldgen difficulty parameters
mon.speed *= get_option<int>( "MONSTER_SPEED" ) / 100.0;
mon.hp *= get_option<int>( "MONSTER_RESILIENCE" ) / 100.0;
if( !mon.has_flag( MF_RIDEABLE_MECH ) ) {
// adjust for worldgen difficulty parameters
mon.speed *= get_option<int>( "MONSTER_SPEED" ) / 100.0;
mon.hp *= get_option<int>( "MONSTER_RESILIENCE" ) / 100.0;
}

for( monster_adjustment adj : adjustments ) {
adj.apply( mon );
Expand Down

0 comments on commit a02f303

Please sign in to comment.