From e1d7f9bf8e3a41ab4a4ab4118773512216e48a84 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 8 Jun 2008 11:06:40 +0200 Subject: [PATCH] Fix land unit return fire damage to ships inconsistency Land units firing at ships have their damage reduced based on their accuracy. This wasn't done when returning fire in quiet_bigdef(). Fix that. --- src/lib/commands/mfir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/commands/mfir.c b/src/lib/commands/mfir.c index 4bf6e520..787aee04 100644 --- a/src/lib/commands/mfir.c +++ b/src/lib/commands/mfir.c @@ -703,6 +703,10 @@ quiet_bigdef(int type, struct emp_qelem *list, natid own, natid aown, if (!fp) add_to_flist(list, (struct empobj *)&land, dam2, 0); nreport(land.lnd_own, N_FIRE_BACK, player->cnum, 1); + if (type == EF_SHIP) { + if (chance(lnd_acc(&land) / 100.0)) + dam2 = ldround(dam2 / 2.0, 1); + } dam += dam2; }