/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* ---
*
* mslsub.c: Missile subroutine stuff
- *
+ *
* Known contributors to this file:
* Ken Stevens, 1995
* Steve McClure, 1996-2000
#include "nat.h"
#include "news.h"
#include "nsc.h"
+#include "nuke.h"
#include "optlist.h"
#include "path.h"
#include "plane.h"
putplane(pp->pln_uid, pp);
mpr(pp->pln_own, "\tSHWOOOOOSH! Missile launched!\n");
- if (pp->pln_nuketype != -1)
+ if (nuk_on_plane(pp) >= 0) {
mpr(pp->pln_own, "\tArming nuclear warheads...\n");
+ hitchance = 100;
+ }
if (pcp->pl_flags & P_T)
mpr(victim, "Incoming %s missile sighted at %s...\n",
}
}
- if (pp->pln_nuketype != -1)
- hitchance = 100;
-
mpr(pp->pln_own, "\t%d%% hitchance...", hitchance);
hit = (roll(100) <= hitchance);