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
Max fighters #3148
base: master
Are you sure you want to change the base?
Max fighters #3148
Conversation
src/config_rules.c
Outdated
@@ -117,6 +117,8 @@ const struct NamedField rules_creatures_named_fields[] = { | |||
{"GAMETURNSUNCONSCIOUS", &game.conf.rules.creature.game_turns_unconscious,var_type(game.conf.rules.creature.game_turns_unconscious), 0,USHRT_MAX}, | |||
{"STUNEVILENEMYCHANCE", &game.conf.rules.creature.stun_enemy_chance_evil,var_type(game.conf.rules.creature.stun_enemy_chance_evil), 0, 100}, | |||
{"STUNGOODENEMYCHANCE", &game.conf.rules.creature.stun_enemy_chance_good,var_type(game.conf.rules.creature.stun_enemy_chance_good), 0, 100}, | |||
{"MaxMeeleOpponents", &game.conf.rules.creature.stun_enemy_chance_good,var_type(game.conf.rules.creature.stun_enemy_chance_good), 0, COMBAT_MELEE_OPPONENTS_LIMIT}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo and case
@@ -1490,7 +1490,7 @@ CrAttackType check_for_possible_melee_combat_with_attacker_within_distance(struc | |||
struct CreatureControl* figctrl = creature_control_get_from_thing(fightng); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% certain but check those lines 1455 / 1460 / 1464 / 1471 / 1476 / 1480.
I think the magic number 4 refer to the limit that is hardcoded, so maybe it should no longer be 4 but the actual limit set in config now?
score_base = 258 * (4 - enmctrl->opponents_ranged_count) + score_extra;
would become:
score_base = 258 * (COMBAT_RANGED_OPPONENTS_LIMIT - enmctrl->opponents_ranged_count) + score_extra;
if that makes senses to you? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aight makes sense, I'll try and figure out all of the magic numbers in the function, but those 4's being the max opponents makes sense
No description provided.