Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unit Attack: fixed issues arising from displayed items potentially no…
…t equally available items Since there were weapons included that weren't shown, it was possible for the best weapon selection to be a hidden one (in which case, the initial selection would be wrong, and it was possible for the returned index to point to a hidden, disabled weapon. This resolves both issues by excluding these disabled attacks from the weapon choices list altogether. They aren't considered when calculating the best attack either. mouse_handler::fill_weapon_choices is also used in mouse_handler::attack_enemy_, but I don't foresee this change should cause any issues there, since you aren't supposed to be able to actually attack with disabled weapons anyway.
- Loading branch information
Showing
3 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters