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

Max fighters #3148

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Max fighters #3148

wants to merge 5 commits into from

Conversation

PieterVdc
Copy link
Member

No description provided.

@PieterVdc PieterVdc marked this pull request as ready for review April 15, 2024 19:24
@PieterVdc PieterVdc marked this pull request as draft April 15, 2024 19:24
@@ -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},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo and case

@PieterVdc PieterVdc marked this pull request as ready for review April 15, 2024 19:43
@PieterVdc PieterVdc marked this pull request as draft April 15, 2024 19:47
@@ -1490,7 +1490,7 @@ CrAttackType check_for_possible_melee_combat_with_attacker_within_distance(struc
struct CreatureControl* figctrl = creature_control_get_from_thing(fightng);
Copy link
Contributor

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? 🤔

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants