Fix Sharshooter bonus
This commit is contained in:
parent
5c8f7c4b00
commit
02e83a1989
|
@ -4230,6 +4230,11 @@ static int attackDetermineToHit(Object* attacker, int tile, Object* defender, in
|
|||
|
||||
int perception = critterGetStat(attacker, STAT_PERCEPTION);
|
||||
|
||||
// SFALL: Fix Sharpshooter.
|
||||
if (attacker == gDude) {
|
||||
perception += 2 * perkGetRank(gDude, PERK_SHARPSHOOTER);
|
||||
}
|
||||
|
||||
if (defender != NULL) {
|
||||
modifier = objectGetDistanceBetweenTiles(attacker, tile, defender, defender->tile);
|
||||
} else {
|
||||
|
@ -4250,10 +4255,6 @@ static int attackDetermineToHit(Object* attacker, int tile, Object* defender, in
|
|||
modifier = -2 * perception;
|
||||
}
|
||||
|
||||
if (attacker == gDude) {
|
||||
modifier -= 2 * perkGetRank(gDude, PERK_SHARPSHOOTER);
|
||||
}
|
||||
|
||||
if (modifier >= 0) {
|
||||
if ((attacker->data.critter.combat.results & DAM_BLIND) != 0) {
|
||||
modifier *= -12;
|
||||
|
|
Loading…
Reference in New Issue