Skip to content

Commit

Permalink
Merge pull request schombert#1132 from Nivaturimika/patch-5
Browse files Browse the repository at this point in the history
Update defines.hpp
  • Loading branch information
schombert authored Feb 24, 2024
2 parents 11df2ba + 0490b6e commit 8c6716c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nations/nations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ void update_military_scores(sys::state& state) {
And then we add one point either per leader or per regiment, whichever is greater.
*/
float lp_factor = state.defines.alice_military_score_leadership_factor;
state.world.execute_serial_over_nation([&, disarm = state.defines.disarmament_army_hit](auto n) {
auto recruitable = ve::to_float(state.world.nation_get_recruitable_regiments(n));
auto active_regs = ve::to_float(state.world.nation_get_active_regiments(n));
Expand All @@ -382,7 +383,7 @@ void update_military_scores(sys::state& state) {
auto num_leaders = ve::apply(
[&](dcon::nation_id i) {
auto gen_range = state.world.nation_get_leader_loyalty(i);
return float((gen_range.end() - gen_range.begin()));
return float((gen_range.end() - gen_range.begin())) * lp_factor;
},
n);
state.world.nation_set_military_score(n,
Expand Down
1 change: 1 addition & 0 deletions src/parsing/defines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@
LUA_DEFINES_LIST_ELEMENT(alice_ai_attack_target_radius, -0.996000) \
LUA_DEFINES_LIST_ELEMENT(alice_full_reinforce, 1.000000) \
LUA_DEFINES_LIST_ELEMENT(alice_ai_offensive_strength_overestimate, 1.000000) \
LUA_DEFINES_LIST_ELEMENT(alice_military_score_leadership_factor, 1.000000) \

namespace parsing {
struct defines {
Expand Down

0 comments on commit 8c6716c

Please sign in to comment.