/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
#include <config.h>
#include <ctype.h>
-#include <string.h>
-#include "misc.h"
-#include "player.h"
-#include "sect.h"
-#include "ship.h"
-#include "land.h"
+#include "commands.h"
+#include "damage.h"
#include "item.h"
-#include "plane.h"
-#include "retreat.h"
-#include "xy.h"
-#include "nsc.h"
+#include "land.h"
#include "news.h"
-#include "file.h"
-#include "nat.h"
-#include "path.h"
#include "optlist.h"
-#include "damage.h"
-#include "commands.h"
+#include "path.h"
+#include "plane.h"
+#include "retreat.h"
+#include "ship.h"
static void pin_bomb(struct emp_qelem *list, struct sctstr *target);
static void strat_bomb(struct emp_qelem *list, struct sctstr *target);
"%s bombing raid did %d%% damage in %s\n",
cname(player->cnum), oldeff - target->sct_effic,
xyas(target->sct_x, target->sct_y, target->sct_own));
- if (target->sct_effic < SCT_MINEFF) {
- if (target->sct_type == SCT_BSPAN)
- knockdown(target, list);
- else if (target->sct_type == SCT_BTOWER) {
- knockdown(target, list);
- bridgefall(target, list);
- }
- }
+ bridge_damaged(target, list);
putsect(§);
collateral_damage(target->sct_x, target->sct_y, dam, list);
}
natid plane_owner;
int dam;
- flak -= pp->pln_def;
- if ((pcp->pl_flags & P_T) == 0)
- flak--;
- if (pcp->pl_flags & P_X)
- flak -= 2;
- if (pcp->pl_flags & P_H)
- flak -= 1;
- dam = ac_flak_dam(flak);
+ dam = ac_flak_dam(flak, pp->pln_def, pcp->pl_flags);
disp = 0;
plane_owner = pp->pln_own;
eff = pp->pln_effic;
sprintf(dmess, " -- shot down");
disp = 1;
} else if (chance((100 - eff) / 100.0)) {
- sprintf(dmess, " -- aborted with %d%%%% damage", 100 - eff);
+ sprintf(dmess, " -- aborted with %d%% damage", 100 - eff);
disp = 2;
}
PR(plane_owner, " Flak! %s %s takes %d%s.\n",