Commit graph

382 commits

Author SHA1 Message Date
ed5ca70cb2 Disable recursive supply of land units
Its implementation in s_commod() increases lnd_seqno even when
!actually_doit, which can cause spurious seqno oopses in callers of
lnd_could_be_supplied().  I can't be bothered to clean up this mess
right now, because recursive resupply is too dumb to be really useful
anyway: each step uses the first source it finds, without
consideration of mobility cost.
2009-02-17 19:30:35 +01:00
d58b306780 Don't suggest only supply ships can tend in info tend and ltend 2009-02-17 19:30:35 +01:00
c42c96f976 Don't lie about shell supply in info fire
It claimed ships and land units don't need shells if they can draw
them from a supply source.  That was never true for ships, I believe,
and became wrong for land units in commit f6c87d21.
2009-02-17 19:30:35 +01:00
9dd9679377 Clean up info lmine a bit 2009-02-17 19:30:34 +01:00
7da69c92e0 Don't use automatic supply to avoid starvation at the update
Food supply during update adds complexity to the update.  How much
good it does to players is highly doubtful; certainly nobody can rely
on it.  It isn't covered by the starvation command.  Starving ships or
land units can steal enough food from their sector to make it starve,
too.  Finally, the supply code is notoriously hard to use correctly.
We don't know of issues with the update's use, but we haven't
convinced ourselves that there aren't any either.
2009-02-15 12:51:05 +01:00
c0b300d875 Sectors and ships no longer need shells to fire flak
4.0.9 changed flak not to use up shells, but they still had to be
present.  Drop that, because it doesn't really provide any value.
Moreover, this gets rid of the buggy flak shell supply code (seqno
mismatch oopses, lost supplies).
2009-02-14 14:17:44 +01:00
00b5cb2b8a Update info Interception for air defense integration
Was missed in commit 6564ff22.  While there, delete details on fuel
use that became wrong in Empire 3.
2009-02-11 20:10:01 +01:00
8b6540eecb Fix info turn not to suggest that turn off just disables login
Basically a rewrite.
2009-02-08 20:49:42 +01:00
35ef345ecb Update copyright notice 2009-02-08 09:33:18 +01:00
6564ff2240 Integrate air defense missions into interception
The ancients designed interception dead simple: when you overfly a
sector, you get intercepted by the sector owner.  Fine print
interception rules govern which planes intercept.

Then complexity got piled on top of it.

Chainsaw 2 added an extra interception by surface ship owners, in the
target sector only.

Chainsaw 3 added an extra interception by land unit owners, in the
target sector only (Empire 4 later merged this extra land unit
interception with the extra surface ship interception).

Chainsaw 3 added an entirely separate kind of interception: air
defense missions.  When you enter a sector in some air defense op
area, you get intercepted.  Fine print air defense rules govern which
planes intercept.  These rules differ significantly from the
interception fine print.

Additional complexity comes from these facts:

* Air defense mission interception happens in addition to non-mission
  interception.  You can boost your total interception by setting up
  air defense.  Which means you must set it up, or forgo an advantage.

* Air defense planes are not available for non-mission interception
  duty.  You need to decide on a split.

* In contrast to non-mission interception, interceptors flying air
  defense get intercepted.

Moreover, the air defense code breaks one of the plane code's design
assumptions, namely that just one plane sortie is active at a time.
The air defense sortie runs while the sortie it intercepts is in
progress.  This leads to two interceptions being active at the same
time: the one intercepting the original sortie, and the one
intercepting the air defense sortie.  The same plane can fly in both
interceptions, and damage received in the interception of the air
defense sortie is wiped out, triggering a seqno mismatch oops.

The previous commit already simplified non-mission interception: you
get intercepted by anyone who owns the sector, or a surface ship or a
land unit there, whether it's the target sector or not.

Now simplify mission interception, by merging air defense back into
ordinary interception: when you overfly a sector, you get intercepted
by anyone who owns the sector, or a surface ship or land unit there,
or has an air defense mission covering the sector.  That's all.  No
multiple interceptions, no separate air defense rules.

Remove air_defense().  Simplify ac_encounter() and sam_intercept()
accordingly; both lose their last parameter.

Change sam_intercept() and ac_intercept() to intercept in mission op
areas.  New parameter only_mission to suppress non-mission
interception.  Pass zero when the intercepting country owns the sector
or a surface ship or land unit in the sector.

ac_encounter() can't efficiently predict whether a country intercepts,
so it needs to call ac_intercept() unconditionally.  This kills the
optimization to collect interceptors only when needed; simplify
accordingly, replacing getilist() by getilists().
2009-02-01 17:14:39 +01:00
d1490b9ba5 Intercept the same all along the flight path
In each sector, any country owning the sector, a surface ship or a
land unit gets to intercept.

Before, only the sector owner got to intercept, except for the target
sector.  There, any country owning surface ships or land units got to
intercept in addition to the sector owner.  Thus, a sector owner with
surface ships or land units there got to intercept twice.

Info Intercept claimed you get to intercept once for ships and once
again for land units, which was wrong since 4.0.9.

Info bomb suggested that flak fires only in the target sector, which
was wrong since 4.2.8.  Drop that.
2009-02-01 17:14:39 +01:00
Ron Koenderink
d0f3847d1d Prevent distribution from abandoning the distribution center
If there are no civilians in the distribution center, distribution
could abandon the sector by distributing out all the military.
2009-01-07 07:57:37 -06:00
c1b76a1a2f All missions now have op areas, simplify mission() 2008-12-25 11:47:32 +01:00
a9b2d9c7f3 Make escort mission obey op-area
Before, the escort mission didn't support an op-area, and planes on
escort mission escorted anywhere.  Change mission() to define the
op-area for escort missions as well.  Show it in mission() and
show_mission().  Check it in find_escorts().
2008-12-25 11:47:32 +01:00
bf89453f8a Remove non-mission land unit reaction
Land unit reactions are overly complex because we have two different
concepts controlling them: reaction radius (set with lrange) and
reserve mission (set with mission).  You need to deal with both to set
up or query reactions.

Commit 8d0e1af5 "fixed" this by making reserve missions meaningless.

The previous commit made reserve missions meaningful again: they
support an op-area now.  This brought back the problem of having to
deal with two separate commands to accomplish one thing.

Fix this for good by removing non-mission land unit reaction
alltogether.  The only feature we lose by that is the ability to order
land units to react until the order is explicitely cancelled.  That's
because missions are implicitely cleared by many commands and events,
while non-mission reaction wasn't.  Closes #858121 and #858122.

Remove the non-mission reaction case from att_reacting_units().

Don't limit reserve missions to the land unit's reaction radius: make
lnd_reaction_range() return the type's maximum radius instead of
lnd_rad_max.

The reaction radius is now useless.  Remove the lrange command, and
struct lndstr member lnd_rad_max along with its selector react.
Remove land command's column rd.  Make ldump show column react as
zero.  Deprecate edit key 'P' in dounit(), and don't show it in
pr_land().
2008-12-25 11:47:05 +01:00
8e527b6cff Make land units on reserve mission react within op-area
Before, they always reacted to their maximum range, and the op-area
was unused.  Change mission() to define the op-area for reserve
missions as well.  Remove the special-case for showing reserve
missions from mission() and show_mission().  New lnd_reaction_range()
factored out of att_reacting_units().  Use it in oprange() to cover
reserve missions.  Pass the mission as separate parameter to oprange()
for now, because miss() doesn't set it in the object until later.
2008-12-17 12:30:43 -05:00
8d0e1af5b7 Remove reserve mission's reaction radius bonus
Reserve missions are now useless.  They'll become useful again in a
later commit.
2008-12-14 10:45:35 -05:00
5b01c4764d Clean up removal of reserve mission mobility bonus
Land units on reserve missions used to pay only half the usual
mobility for combat.  This bonus was commented out in the code in
4.0.0, but not in info.  Remove it from both.
2008-12-14 10:45:35 -05:00
5113bc0bb5 Update change log again for 4.3.19 2008-12-07 18:16:19 -05:00
204caeb243 Update change log for 4.3.19 2008-12-06 20:12:18 -05:00
b27298d4c5 New option RAILWAYS
With RAILWAYS, highway-like sectors double as rail.  They need to be
at least 5% efficient to be operational, and then they additionally
extend rail into adjacent sectors that are at least 60% efficient.

New opt_RAILWAYS, SCT_HAS_RAIL(), sct_rail_track().  Update
sector_mcost(), bp_neighbors(), lnd_mar_one_sector() for RAILWAYS
mobility rules.  Update sinfra(), spyline(), satdisp_sect() to show
rail track instead of rail infrastructure for RAILWAYS.

New virtual sector selector track, implemented by nsc_sct_track().
2008-11-01 11:40:15 -04:00
5572686e32 Update change log for 4.3.18 2008-10-18 14:40:27 -04:00
a32a5cd050 Update change log again for 4.3.17 2008-09-20 12:08:41 -04:00
e0f7751f6b Update change log for 4.3.17 2008-09-17 21:38:42 -04:00
b2f75427bd Update example to current output 2008-09-17 21:31:46 -04:00
d702068457 Fix trailing whitespace 2008-09-17 21:31:40 -04:00
a9653c475b Fix whitespace: space before tab 2008-09-17 19:29:42 -04:00
5820e12504 Belatedly remove DEMANDUPDATE from info Options
Option gone since commit 6ca5e47f, v4.3.10.
2008-09-16 19:14:41 -04:00
3e15a8e226 Make trade show exactly what's on sale, remove option SHOW_PLANE
Planes and land units on ships are sold along with the ship, but trade
showed them only when SHOWPLANE was enabled.  Show them always.

Planes on land units are not sold along with the land unit, but trade
showed them when SHOWPLANE was enabled.  Don't.
2008-09-16 19:11:18 -04:00
574e20f6f5 Stop ships, planes, land units and nukes on violent takeover
This is for consistency with sectors, and for the same reason: pause
before spending money on stuff taken in the heat of battle.
2008-09-15 19:40:44 -04:00
3318e4e4e5 Require friendly relations for trade ship to pay off 2008-09-15 19:04:17 -04:00
221324cc10 Clean up rules on where you can scrap stuff
You can now scrap ships in own or friendly, efficient harbors, planes
in own or allied, efficient airfields, and land units in any own or
allied sector.

When something can't be scrapped because of these rules, print a
suitable message.

Before, you could scrap ships regardless of relations to sector owner
(info claimed friendly was required), land units regardless of
relations, but not while on ships, and planes even in friendly
airfields (info claimed allied was required).

When scrapping in a deity sector, scrap claimed it gave the cargo to
POGO, which is somewhat bogus, as POGO can't own such stuff.
2008-09-15 07:49:24 -04:00
fac3049bc2 Update change log again for 4.3.16 2008-08-09 12:10:06 -04:00
4ac09a3cd9 Update change log for 4.3.16 2008-08-02 21:29:48 -04:00
3a9545fe99 Remove redundant and misleading stuff from info bomb 2008-08-02 17:17:08 -04:00
def5ef11ff Make launch command require only 40% plane efficiency
This is to make it consistent with automatic missile launch.
2008-08-02 15:03:44 -04:00
e58be3179a Remove product information from show sect c
New show product made this redundant.
2008-07-28 07:52:32 -04:00
71bbd642df New show product
This is the human-readable buddy of xdump product, which dumps pchr[].
It duplicates much of the information in show sect c, but in more
accessible form.  It's in show_product().

Remove product information from info Quick-ref.  show reflects the
actual game, is more complete, and should be just as readable.
2008-07-28 07:51:49 -04:00
ae8c4620b0 Show sector navigability in show se s
This is the human-readable buddy of xdump sect-chr column nav, which
dumps ichr[].d_nav.
2008-07-27 21:04:44 -04:00
4be4a37a96 Show packing type instead of selected bonuses in show se s
show_sect_stats() used to show packing bonuses for military,
uncompensated workers, civilians, bars and lcms.  The bonus for lcms
was labelled "other", which was okay only as long as all other
commodities receive the same packing bonuses.

Show packing bonus type instead.  The actual bonus for each commodity
and packing type is already shown by show item.  But change its header
for the NPKG column from "rg" to "no", because packing type NPKG is
shown by show se s as "normal".
2008-07-27 21:04:44 -04:00
7d37e41527 Add a a line for the usual values to show se b
show_sect_build() showed only sectors with unusual build
characteristics.  Which begged the question what the usual build
characteristics are.  Add a line to show them.
2008-07-27 21:04:26 -04:00
c7426e1b45 Swap zdone's deity arguments
This puts the additional deity argument last.

Deity syntax wasn't documented before.
2008-07-25 08:16:38 -04:00
89d168cd65 Make selector terr do the right thing for deities
Commit db1ac2ed (v4.3.6) introduced a separate territory for deities,
and made the territory command use it by default for deities.  Deities
can still access the old default territory as territory number 0.

Selectors terr, terr0 (alias for terr), terr1, terr2, terr3 remained
unchanged, and a new selector dterr was created to let deities access
the deity territory.

Make selector terr virtual, so that it can do "the right thing", just
like the territory command: select territory 0 for mortals, and the
deity territory for deities.

Unfortunately, this requires us to switch xdump to use terr0 instead
of terr, because otherwise the deity xdump would contain the deity
territory twice, and territory 0 not at all.
2008-07-12 10:43:03 -04:00
dc41544a8f Document retreat condition help in info retreat
While there, layout the table more nicely.
2008-07-12 10:43:03 -04:00
85bb88c26c Limit BTU production to 1000 civilians instead of 999
This makes the limit again equal maximum population of a capital
sector, which changed in commit 6bbd7ffd, v4.3.6.
2008-06-15 08:49:26 +02:00
4a67080656 Update info BTU on Empire clock and work percentage
Work percentage should have been documented in commit 233fce87,
v4.3.0.

Empire clock should have been documented in commit d3e0597f, v4.3.10.
2008-06-15 08:49:26 +02:00
860369ec7e Update info Citizens on census showing old owner
This was forgotten in commit 6b434ee3, v4.3.0.
2008-06-15 08:49:25 +02:00
984ffce95e Improve info mission
Remove confusing columns Op-sect and Radius from table of available
missions.  Add their code letters.

Fix efficiency required for artillery units to fire.
2008-06-06 21:31:55 +02:00
1f7d8879ca Document delivery of civilians and military
People can be delivered since v4.0.0 (the check that disabled that was
commented out), and cutoff shows these deliveries since v4.0.2.  The
change was documented in info Empire4, but info pages weren't updated.
Do that, and remove the commented out code.
2008-06-02 07:02:26 +02:00
c7ac4ced21 Improve info on anti, bomb, lookout, starvation and sweep
Add command anti to subject Occupation, bomb to Combat, lookout to
Detection, and starvation to Updates.

Cross-reference recon from sweep.
2008-05-18 11:41:53 +02:00