Commit graph

2164 commits

Author SHA1 Message Date
2d99971a7f (SCT_MAXDEF): Make it equal the maximum sector type, not the maximum
plus one.  Users changed.  This indirectly fixes off-by-one loop
bounds in budg(), show_sect_build(), show_sect_stats() and
show_sect_capab().  The show bugs were harmless: the loops ran into
the sentinel, which they ignore.  The budg bug was serious: the loop
ran into the entries for SCT_EFFIC.  This lead to a bogus line in the
budget, printing of a null pointer, and doubled sector build cost.
Budget priorities masked this bug until rev. 1.25.
2006-06-22 17:10:26 +00:00
f9588063ff Bump version to 4.3.7. 2006-06-22 05:51:16 +00:00
Ron Koenderink
516cbd5ca1 Correct pmap to show that it takes a plane identifier.
Correct lmap to show that it takes a land unit identifier.
2006-06-22 00:55:48 +00:00
7d528c73db Clarify prerequisites. 2006-06-20 19:48:22 +00:00
59fcdc9261 4.3.6 last minute changes. 2006-06-20 18:48:15 +00:00
4bf8e1af01 _exit() fails to terminate all threads on at least some versions of
LinuxThreads, use exit() where possible:
(shutdwn): No longer a signal handler, can safely call exit().
(main, loc_NTInit): No obvious reason for not using exit().
2006-06-20 18:36:20 +00:00
69b92a5bce (player_coms): Charge no BTUs for break. 2006-06-20 06:05:35 +00:00
7100bf90e7 Use environment variable GROFF_NO_SGR instead of option -P-c, because
older versions of groff choke on the latter.
2006-06-20 06:02:24 +00:00
f21b62e121 Doc fix. 2006-06-19 04:28:57 +00:00
aeff93394e Fix the previous revision again. 2006-06-18 20:45:01 +00:00
3d0f7dd383 Fix the previous revision. 2006-06-18 20:31:41 +00:00
4cea32767d Doc fix. 2006-06-18 20:22:25 +00:00
0738af1296 More 4.3.6 changes. 2006-06-18 19:12:37 +00:00
1c7cdbaad9 (install): Create a clean econfig.new when the one found at the
destination doesn't work.
2006-06-18 19:11:49 +00:00
51ce3c8dfb Update for recently changed land unit mobility requirements. 2006-06-18 18:55:51 +00:00
5fbd7cdede Update for recent mobility cost changes. Document minimum costs and
land unit penalty in newly taken sectors.  Spelling fixes.
2006-06-18 18:49:00 +00:00
cfb6e844d8 Spelling fixes. 2006-06-18 18:25:52 +00:00
f0724ad29b Reference Flak and mission. Don't reference subject Missions, as this
is the only reference to it.  Spelling fixes.
2006-06-18 18:23:26 +00:00
053248a2f5 Update for recent code changes. Make pseudo-code match the real code.
Used to mention interception, but got it mostly wrong, removed.
2006-06-18 18:11:52 +00:00
36fbf37bb8 (arm): Fix trading block message.
(disarm): Recipient must be allied.
2006-06-18 17:47:26 +00:00
9837bf0a40 (arm): Permit arming allied planes. 2006-06-18 17:28:28 +00:00
f68ee899e1 (disarm): Give disarmed nuke to sector owner. This was forgotten in
rev. 1.15.
(gift): Extend to nukes.
2006-06-18 17:15:38 +00:00
Ron Koenderink
fe5edc3ef0 (map): Fix misleading prompt to reflect the real choices for the player. 2006-06-18 17:08:03 +00:00
94bc512581 (gift): All callers transfer ownership after calling gift(). Move
that code into gift().  Callers changed.
2006-06-18 17:03:19 +00:00
019ab0e7cf (bestownedpath): Back out rev. 1.22's path termination with 'h' for
now.  Consistency with BestLandPath() is nice, but it makes navigate
behave differently, and that wasn't intended.
2006-06-18 09:13:35 +00:00
3eef93d97b (bestownedpath): Fix for impassable end sector. Broken in rev. 1.23. 2006-06-18 09:00:58 +00:00
bd51dea51a (navi, march): Simplify convoluted logic. Old code tried path finding
whenever the next direction in the path string is bad.  It then passed
the whole path string to shp_path(), which makes no sense unless we're
at the beginning of it, but luckily failed in that case.  Change to
try path finding right after prompting for new input.
2006-06-18 08:53:06 +00:00
b63c69ef20 (disabled_commands): New econfig key.
(disable_coms): New, implements disabled_commands.
(init_player_commands): Call it.
2006-06-17 20:27:36 +00:00
db1ac2edf4 (sctstr): New member sct_dterr.
(terr): Let the deity set it, and default the field argument to it.
(sect_ca): New selector dterr.
2006-06-17 19:27:22 +00:00
602b2a07cb (lnd_fortify): The previous revision could break under conditions that
currently don't occur.  Fix anyway.
2006-06-17 14:58:09 +00:00
2673a258fe (ask_olist): Let land units attack as long as they have positive
mobility, except for high-mobility terrain (mountains), where the
rules remain as they were: land units need to have all the mobility
charged for the attack, not counting combat and moving in to occupy.
Rationale: Making sure your land units reach attack positions with
enough mobility left is a pain in the neck.  Requiring only positive
mobility is friendlier, but allows rushing of mountains.
2006-06-17 14:28:59 +00:00
df6f365a71 (dchrstr): Replace int members d_mcst and d_emcst (mobility cost * 5)
by float d_mob0 and d_mob1 (straight costs).  Impassable terrain now
encoded as negative d_mob0 instead of zero d_mcst.  Users changed.
sect.config updated.
(dchr_ca): Replace selectors mcst and emcst by mob0 and mob1.
(show_sect_stats): Show real mobility costs.
2006-06-17 14:08:20 +00:00
d16fc6afdd Fix the previous revision. 2006-06-17 13:52:13 +00:00
b9017dbde9 (chance, roundavg): Simplify. No functional change. 2006-06-17 12:40:25 +00:00
ca6c16357f (lnd_fortify): Round mobility fractions up always, not just to 1.
Simplify.

(fort): Don't claim land unit can't be fortified when amount argument
is zero.
2006-06-17 08:42:23 +00:00
07de857b88 (sector_mcost, bp_neighbors, lnd_mar_one_sector): Deal with disabled
road/rail infrastructure.
2006-06-16 21:11:25 +00:00
9067d7a453 (info.ps): New. Adapt TROFF.MAC. Result isn't exactly a readable
book.
2006-06-16 20:51:40 +00:00
8861333689 (mission): Nicer diagnostics. 2006-06-16 20:44:23 +00:00
27d37f35a9 Che cannot target #0:
(guerrilla): Oops on it.
(doland, takeover): Clear them when che_target becomes 0.

(doland): Fix bogus message.

(guerrilla): Remove silly sanity check.
2006-06-16 20:01:30 +00:00
4d1dd6fa6a (sctintrins): New member in_enable. Update infra.config. Use it
instead of opt_DEFENSE_INFRA.
(improve): Test for it.
(show_sect_build): Show only enabled infrastructure.
(opt_DEFENSE_INFRA): Remove.  Deities can edit infra.config instead.

(improve): Dumb down prompt.
2006-06-16 18:39:35 +00:00
2c2b3f7b1d Fix the previous revision. 2006-06-16 17:16:42 +00:00
78d36b8a3e Update copyright. Add `Preface to the Wolfpack Edition'. Spelling
fixes.  Change is authorized by Geoff Cashman.
2006-06-16 17:15:13 +00:00
490b4fa5ff Revert the previous revision, it doesn't make sense. 2006-06-16 05:42:52 +00:00
9ae594153f (show_sect_stats): Display mobility cost of inaccessible sectors as
`no way' instead of obscure magic numbers.
2006-06-15 21:27:45 +00:00
b3fc6413e0 (sector_strength): Back out rev. 1.53's oopses, because their
conditions can happen.
2006-06-15 21:19:03 +00:00
eff3f89cc6 (map): Fix crash on empty argument introduced in rev. 1.18. 2006-06-15 21:17:37 +00:00
083003ad82 (sector_mcost): New, simpler sector mobility cost formula. The cost
is a linear function of sector efficiency, with cost at 0% given by
dchstr member d_mcst and cost at 100% given by d_emcst.  The latter
used to be d_mcst - 1.  Mountain cost is no longer a special case.
Road infrastructure now reduces cost up to 90%, linear in road
efficiency (used to be close to that, but non-linear).  Same for rail
infrastructure, but 99%.  Double land unit minimum cost to 0.02.
Change land unit cost penalty in newly taken land to an extra 0.2
instead of a minimum of 0.2.
(dchrstr): New member d_emcst.  sector.config updated, with some
changes: cost of mountain now ranges from 2.4 to 1.2 instead of 2.174
to 1.304, wildernes 0.4 instead of 0.6 to 0.4, highway, bridge head,
bridge span and tower from 0.4 to 0.001 instead of 0.2 to 0.001.
While I'm at it, make bridge head match highway stats (dstr and value
reduced).
(show_sect_stats): Show d_emcst.
(dchr_ca): New selector emcst for d_emcst.
2006-06-15 21:12:53 +00:00
89022fbc42 (prmobcost): New.
(sinfra): Use it to display inaccessible sectors sensibly.
Inaccessible occurs for rail since src/lib/common/move.c rev. 1.12.
2006-06-15 19:46:27 +00:00
2ecc85b541 (attack_val, defense_val): These functions overestimate unit strength,
because they ignore three facts.  Firstly, mil casualties decrease
strength linearly, while unit casualties decrease it quadratically
(unit strength scales with mil * eff).  Secondly, casualties decrease
strength proportional to the combat multiplier, hence twice as much
mil are more powerful than double multiplier.  Thirdly, units break
and retreat.  Change the estimate from mil * mult to mil * sqrt(mult).
Improves things in simulations, hope it works out in practice as well.
Closes #682571.
2006-06-15 19:05:17 +00:00
ded3ca41ef (lnd_hit_mine): Remove silly use of double. Rounds fractional damage
to engineers down instead of up.

(retreat_land1): Failed to reduce mine damage to engineers.
2006-06-15 18:58:47 +00:00