Option DEFENSE_INFRA was replaced in commit 4d1dd6fa6, v4.3.6. Point
to the replacement instead.
Options SHIPCHOPPERS and XLIGHT were made non-optional in Empire 2.
Don't mention them.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Solaris 10's nroff can't deal with the lengthy .NF ... .FI: it
complains, writes truncated output, and terminates
successfully (*boggle*). Split the .NF ... .FI in two.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This reverts commit b1a0ff2fbd.
Land units with capability heavy can't be loaded on anything, and land
units carrying land units can't be loaded regardless of capabilities.
Commit b1a0ff2fbd additionally outlawed loading of trains on land
units, but not on ships. Bad idea, because it complicates matters for
no good reason. Revert it.
Doesn't affect the stock game, because its only train is heavy.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Text after the first space is missing in the formatted output. That's
because .L takes just one argument, but we pass several. Broken in
commit 4e0d02b, v4.3.33. Fix by quoting the argument text.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Sectors, ships, planes and land units are always visited in the same
order, but it doesn't hurt to be explicit.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
"info Empire4" has become unwieldy: more than 4000 lines, almost a
quarter of a Megabyte. Split it up.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
The .NA header promises information on "Clients which communicate well
with the Empire4 Server". The page doesn't really deliver. It talks
about client support for asynchronous notifications. It stopped
listing separate client projects in 4.0.7 (1997). Not mentioning such
clients isn't just outdated, it's actively misleading.
Perhaps an up-to-date info page on clients would be useful, but I
can't write one right now. Delete.
Loses a bit of information for client developers that was tacked on in
4.0.7: pointers to dump commands, and an explanation of timestamps. I
trust client writers can find "info xdump" without this.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Looks like an attempt was made to have .SA point to info pages for
significantly changed things. It wasn't done consistently, though,
and it's impractical for Empire 4. Drop these references, and keep
only "Server".
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
The .NA show up in "info Server", like this:
Chainsaw ! Changes from KSU Empire to Chainsaw code
Empire2 ! Changes from the Chainsaw server to the Empire2 Server
Empire3 Changes from the Empire2 server to the Empire3 Server
Empire4 ! Changes from the Empire3 server to the Empire4 Server
[...]
Merc Changes from KSU code to Merc code
Old-empire ! Differences from 1.2 to UCB Empire
Tweak them to look like this:
Chainsaw ! Changes from KSU Empire to Chainsaw (1992-93)
Empire2 ! Changes from Chainsaw to Empire 2 (1995)
Empire3 Changes in Empire 3 (1995-96)
Empire4 ! Changes in Empire 4 (1996-present)
[...]
Merc Changes from KSU code to Merc code (1992)
Old-empire ! Differences from 1.2 to UCB Empire
The first paragraph of Empire2.t refers to "the new Empire 2" server.
Drop "new", because it clearly ain't anymore. Same for Empire3.t.
The first paragraph of Empire4.t claims "several changes/fixes" have
been made. Umm, that's only tenuously connected to reality by now.
Rewrite the paragraph.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
The .TH and .NA header promise information about "Wolfpack Code" and
"The Wolfpack Project", but the body doesn't really deliver. It's
basically the first paragraph of Empire4.t plus pointers to Options.t
and Empire.t. Has been that way since it was added in 4.0.2.
History.t covers the Wolfpack project more usefully, so delete this
one.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Ken Stevens stopped maintaining Empire many years ago, but "info
Empire2" and "info Empire3" still direct users to him. Drop that.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
check_trade() sets plane and land unit mobility to zero on trade.
Even when it's negative. Fix to leave it alone then.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Forgotten in commit 6157b6c. While there, fix the references to "show
ship stats" headings, and say "to paradrop" instead of "to paratroop".
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Grant land units with security capability the same bonus as in convert
and shoot: multiply by (1 + eff/100).
military_control()'s code to count military is now functionally
equivalent to security_strength(), except it has no use for its second
parameter. Change security_strength() to permit a null argument, and
reuse it in military_control().
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Both ordinary ground combat and guerrilla combat basically kill
combatants one by one randomly until one side is eliminated. The odds
of each side taking a hit are computed from combat strengths.
Ordinary combat factors bonuses into the odds. It doesn't mess with
the number of men.
Guerrilla combat does the same for the bonus due to relative
happiness. It doesn't for land units with security capability: these
fight as if they had twice as many military. Changes both odds and
number of men. This inflates the body count reported to the sector
owner. Visible in tests/update/journal.log, where rebels kill 110 out
of 70 military. It also complicates take_casualties(). Has been that
way since security land units were added in Chainsaw 3.
To fix the body count and simplify take_casualties(), make capability
security affect only the odds, not the number of men. Without further
adjustments, this would reduce guerrilla losses: fewer men mean fewer
combat rounds mean fewer chances for rebels to die. To compensate,
increase the multiplier from two to four. This should make security
units a bit tougher. Document the bonus in "info Guerrilla".
More body count bugs remain.
Reusing ordinary combat rules and code for guerrilla combat would be
nice, but isn't feasible for me right now.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
The server doesn't let you send land units without offensive strength
into combat: ask_olist() simply doesn't offer them. Good.
However, it needs to offer spies for assault, because assault is how
they sneak ashore. To make it offer spies, which have no offensive
strength, attack_val() artificially sets their offensive strength to
one for assault. Dirt effect: spies fight (and die) in assaults, even
though they can't otherwise attack. Lame. Has been that way since
spies were added in 4.0.0.
Make ask_olist() offer spies regardless of offensive strength when
assaulting, and drop the special case from attack_val(). They get
offered exactly as before. However, since their offensive strength is
now zero, they won't enter actual combat (see the previous commit).
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Spies assaulting a foreign sector have only a 10% chance to evade
detection, regardless of efficiency. With odds like that, players
basically don't bother.
All the other spy detection checks use LND_SPY_DETECT_CHANCE(eff),
which gives 100% spies a 90% chance to evade detection. That's
perhaps a bit to good here, so let's try LND_SPY_DETECT_CHANCE(eff/2).
A 100% spy now has a 40% chance to sneak ashore undetected.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
mksubj.pl neglects to terminate info/toc's last line with a newline.
info-test doesn't care. Tidy up anyway.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Deliver fails to abandon sectors when it ships out all civilians and
military. The sector remains owned until the next non-update sector
update abandons it. Has always been broken.
Distribution had the same bug until commit d0f3847 (v4.3.20) fixed it.
Fix it the same way for delivery: adjust the amount moved to avoid
moving out the last civilian, or the last military if there are no
civilians.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
People in sectors get plagued, then taxed or paid, then fed. People
on ships and land units get paid, then fed, then plagued. Sectors
were messed up when Empire 3 made the update code work for budget.
Change sectors back to how they worked before Empire 3: move do_feed()
from produce_sect() to prepare_sects(), and delay do_plague() until
after do_feed(). People in sectors now get taxed, paid and fed even
when they die of the plague, just like they do on ships and land
units.
Because do_plague() now runs after populace(), the latter's handling
of people dying off doesn't cover plague anymore. Delay it to the
very end of prepare_sects().
Additionally, move feeding and plaguing from upd_ship(), upd_land() to
prep_ship(), prep_land(), for consistency with sectors.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Ship, plane and land unit repairs depend on and change the state of
the sector. To predict repairs, we need to predict the state of the
sector before repairs. The obvious way to do that is to simulate the
sector update and all ship, plane and land unit updates there in the
correct order.
Until recently, we simulated only own sectors, ships, planes and land
units. Wrong when foreign sectors, ships, planes or land units are
involved. The fix (commit 70f6964) makes budget simulate all
countries. Correct, but does much more work than necessary. With a
little effort, we can track what needs to be simulated.
Use the bp map for tracking. We need to mark the player's sectors and
all sectors where he has ships, planes or land units. Do the former
in bp_alloc(), and the latter in prep_ships(), prep_planes(),
prep_lands().
Skip sectors not so marked. This requires delaying prepare_sects()
until after prep_ships(), prep_planes(), prep_lands(). Their order
doesn't actually matter: prep_ships() & friends only spend money, and
nothing in preparation depends on whether the country is still
solvent.
Skip ships, planes and land units in sectors not so marked.
This speeds up budget by around a third in my testing, more for small
countries. Roughly 15% slower than before the fix for repairs abroad.
The update has to do a bit more work than before, but the performance
difference is lost in the noise.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>