Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(balance): mech speed updates, exempt mechs from monster speed/resilience settings #4627

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading