Streamline missile hit chance messages
Don't print hit chance for nuclear warheads, it's always 100%. Instead, print "Arming nuclear warheads" there. That message is now printed after interception instead of before.
This commit is contained in:
parent
1ee0287595
commit
e2580b4005
1 changed files with 10 additions and 9 deletions
|
@ -73,7 +73,7 @@ msl_hit(struct plnstr *pp, int hardtarget, int type, int news_item,
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
int sublaunch = 0;
|
int sublaunch = 0;
|
||||||
struct plchrstr *pcp = plchr + pp->pln_type;
|
struct plchrstr *pcp = plchr + pp->pln_type;
|
||||||
int hitchance = pln_hitchance(pp, hardtarget, type);
|
int hitchance;
|
||||||
char *from;
|
char *from;
|
||||||
int dam, dummyi;
|
int dam, dummyi;
|
||||||
|
|
||||||
|
@ -130,11 +130,6 @@ msl_hit(struct plnstr *pp, int hardtarget, int type, int news_item,
|
||||||
putplane(pp->pln_uid, pp);
|
putplane(pp->pln_uid, pp);
|
||||||
mpr(pp->pln_own, "\tSHWOOOOOSH! Missile launched!\n");
|
mpr(pp->pln_own, "\tSHWOOOOOSH! Missile launched!\n");
|
||||||
|
|
||||||
if (nuk_on_plane(pp) >= 0) {
|
|
||||||
mpr(pp->pln_own, "\tArming nuclear warheads...\n");
|
|
||||||
hitchance = 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pcp->pl_flags & P_T)
|
if (pcp->pl_flags & P_T)
|
||||||
mpr(victim, "Incoming %s missile sighted at %s...\n",
|
mpr(victim, "Incoming %s missile sighted at %s...\n",
|
||||||
sublaunch ? "sub-launched" : cname(pp->pln_own),
|
sublaunch ? "sub-launched" : cname(pp->pln_own),
|
||||||
|
@ -152,10 +147,16 @@ msl_hit(struct plnstr *pp, int hardtarget, int type, int news_item,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mpr(pp->pln_own, "\t%d%% hitchance...", hitchance);
|
if (nuk_on_plane(pp) >= 0) {
|
||||||
|
mpr(pp->pln_own, "\tArming nuclear warheads...\n");
|
||||||
|
hit = 1;
|
||||||
|
} else {
|
||||||
|
hitchance = pln_hitchance(pp, hardtarget, type);
|
||||||
hit = (roll(100) <= hitchance);
|
hit = (roll(100) <= hitchance);
|
||||||
|
mpr(pp->pln_own, "\t%d%% hitchance...%s\n", hitchance,
|
||||||
|
hit ? "HIT!" : "miss");
|
||||||
|
}
|
||||||
|
|
||||||
mpr(pp->pln_own, hit ? "HIT!\n" : "miss\n");
|
|
||||||
if (pcp->pl_flags & P_T)
|
if (pcp->pl_flags & P_T)
|
||||||
mpr(victim, "...Incoming %s missile %s\n",
|
mpr(victim, "...Incoming %s missile %s\n",
|
||||||
sublaunch ? "" : cname(pp->pln_own),
|
sublaunch ? "" : cname(pp->pln_own),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue