Skip to content

Commit

Permalink
Surprised targets don't penalize attacks against them (#762)
Browse files Browse the repository at this point in the history
Surprised targets don't penalize attacks
  • Loading branch information
jdevnull authored Jan 2, 2025
1 parent 6fb9a9a commit 8061d97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/newfight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ bool hit_with_multiweapon_toggle(struct char_data *attacker, struct char_data *v
}

// Setup: If your attacker is closing the distance (running), take a penalty per Core p112.
if (!def->is_paralyzed_or_insensate) {
// We can't avoid setting AFF_APPROACH in set_fighting for surprised targets since it also
// indicates not-in-melee-range, so make an exception since they're probably not moving yet.
if (!def->is_paralyzed_or_insensate && !def->is_surprised) {
if (AFF_FLAGGED(def->ch, AFF_APPROACH))
att->ranged->modifiers[COMBAT_MOD_DEFENDER_MOVING] += 2;
else if (!def->ranged_combat_mode && def->ch->in_room == att->ch->in_room && !IS_JACKED_IN(def->ch))
Expand Down

0 comments on commit 8061d97

Please sign in to comment.