Make anti-sat launch consistent with interception
When a manually launched anti-sat hits, it now always destroys the satellite. This matches what it does when it intercepts automatically. Before, it only damaged the satellite.
This commit is contained in:
parent
3e5df7530d
commit
cf960a573c
Notes:
Markus Armbruster
2015-03-02 08:05:40 +01:00
Closes FRE#27.
2 changed files with 7 additions and 14 deletions
|
@ -106,8 +106,8 @@ For all other flights, the flight cost is:
|
||||||
20 / (plane efficiency)
|
20 / (plane efficiency)
|
||||||
For planes flying on an air defense mission, this cost is cut in half.
|
For planes flying on an air defense mission, this cost is cut in half.
|
||||||
|
|
||||||
4. Land mine, pin-bombing, a-sat, and nuclear damage
|
4. Land mine, pin-bombing, and nuclear damage
|
||||||
A land mine, pinpoint bomb, anti-sat missile or nuclear detonation
|
A land mine, pinpoint bomb or nuclear detonation
|
||||||
will damage the mobility of the plane in exactly the same way that the
|
will damage the mobility of the plane in exactly the same way that the
|
||||||
efficiency of the plane is damaged (see "info Damage").
|
efficiency of the plane is damaged (see "info Damage").
|
||||||
|
|
||||||
|
|
|
@ -138,8 +138,6 @@ launch_as(struct plnstr *pp)
|
||||||
{
|
{
|
||||||
char *cp, buf[1024];
|
char *cp, buf[1024];
|
||||||
struct plnstr plane;
|
struct plnstr plane;
|
||||||
int dam, nukedam;
|
|
||||||
natid oldown;
|
|
||||||
|
|
||||||
cp = getstarg(player->argp[2], "Target satellite? ", buf);
|
cp = getstarg(player->argp[2], "Target satellite? ", buf);
|
||||||
if (!check_plane_ok(pp))
|
if (!check_plane_ok(pp))
|
||||||
|
@ -158,23 +156,18 @@ launch_as(struct plnstr *pp)
|
||||||
pr("Range too great!\n");
|
pr("Range too great!\n");
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
if (msl_equip(pp, 'p') < 0) {
|
if (msl_equip(pp, 'i') < 0) {
|
||||||
pr("%s not enough petrol or shells!\n", prplane(pp));
|
pr("%s not enough petrol or shells!\n", prplane(pp));
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
if (msl_hit(pp, pln_def(&plane), EF_PLANE, N_SAT_KILL, N_SAT_KILL,
|
if (msl_hit(pp, pln_def(&plane), EF_PLANE, N_SAT_KILL, N_SAT_KILL,
|
||||||
prplane(&plane), plane.pln_x, plane.pln_y, plane.pln_own)) {
|
prplane(&plane), plane.pln_x, plane.pln_y, plane.pln_own)) {
|
||||||
dam = pln_damage(pp, plane.pln_x, plane.pln_y, 'p', &nukedam, 1);
|
pr("Satellite shot down\n");
|
||||||
CANT_HAPPEN(nukedam);
|
mpr(plane.pln_own, "%s anti-sat destroyed %s over %s\n",
|
||||||
oldown = plane.pln_own;
|
cname(player->cnum), prplane(&plane),
|
||||||
planedamage(&plane, dam);
|
|
||||||
pr("Hit satellite for %d%% damage!\n", dam);
|
|
||||||
mpr(oldown, "%s anti-sat did %d%% damage to %s over %s\n",
|
|
||||||
cname(player->cnum), dam, prplane(&plane),
|
|
||||||
xyas(plane.pln_x, plane.pln_y, plane.pln_own));
|
xyas(plane.pln_x, plane.pln_y, plane.pln_own));
|
||||||
|
plane.pln_effic = 0;
|
||||||
putplane(plane.pln_uid, &plane);
|
putplane(plane.pln_uid, &plane);
|
||||||
if (!plane.pln_own)
|
|
||||||
mpr(oldown, "Satellite shot down\n");
|
|
||||||
}
|
}
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue