KazuKrawfish / Line_Of_Command

Tactical turn-based strategy game
2 stars 0 forks source link

Compie AA Attack #36

Closed KazuKrawfish closed 2 years ago

KazuKrawfish commented 2 years ago

It appears the compie doesn't attack air with AA. Also appears it will not attack infantry with armor. Should fix with a 2x bonus if necessary.

KazuKrawfish commented 2 years ago

Fixed infantry issue. For AA (And hybrid in general) the following edits required: checkSingleTileForCombatValue() - For hybrid attack type, do not check status, but instead use a rangedFireUsed bool which is passed by reference, and indicates whether the hybrid would intend to attack ranged. findBestValuedEnemyWithinLocalArea() - Similarly, treats hybrid case to determine search range, and then tracks whether the proposed tile to attack will be via range or not. This determines if the hybrid minion would stand and attack, or move and attack.

KazuKrawfish commented 2 years ago

Fixed with: https://github.com/KazuKrawfish/Line_Of_Command/commit/fcff96e7b579ef5f5ccffa434ee0e00d4b7ee70b