This is the mail archive of the
xconq7@sourceware.cygnus.com
mailing list for the Xconq project.
Some issues
- To: xconq7@cygnus.com
- Subject: Some issues
- From: Sami Perttu <perttu@kruuna.helsinki.fi>
- Date: Wed, 21 May 1997 23:54:10 +0300
While writing my new game module for xconq (more on that later),
I stumbled upon some things that I think need fixing/improvement:
The current acp-min and action debt system is broken. It's kinda
silly that the user can't select a unit with zero acps, while
several functions in the kernel continue executing plans right down
to acp-min. Here's my proposal for a new system:
acp-min no action may cause a unit4s acp to drop below acp-min.
acp-threshold minimum acp required for any action.
1 minimum acp required for selection by owner.
Blocking ZOCs weren't fully implemented in 7.1.91 so I wrote some
stuff to cover zoc-from-terrain-effect and mp-to-traverse-zoc. It
would be nice if each unit had two ZOCs (or a separate block-entry
table), so e.g. one could define a panzer to have a ZOC of range 1
restricting nearby movement and another ZOC of range 0 blocking
entry into the same cell. What do you think Stan? Anyway, diffs
for move.c follow:
--
Sami Perttu
perttu@kruuna.helsinki.fi
*** oldmove.c Wed Apr 9 08:52:57 1997
--- move.c Wed May 21 23:38:28 1997
***************
*** 556,566 ****
for_all_directions(dir) {
if (point_in_dir(x, y, dir, &x1, &y1)) {
! for_all_stack(x, y, unit2) {
u2 = unit2->type;
range = zoc_range(unit2, u);
if (range >= 1
! && unit_blockable_by(unit, unit2)
! && ut_zoc_into(u2, t))
! return TRUE;
}
}
--- 556,571 ----
for_all_directions(dir) {
if (point_in_dir(x, y, dir, &x1, &y1)) {
! for_all_stack(x1, y1, unit2) {
u2 = unit2->type;
range = zoc_range(unit2, u);
if (range >= 1
! && ut_zoc_from_terrain(u2, terrain_at(x1,y1))
! && ut_zoc_into(u2, t)) {
! if(unit_blockable_by(unit, unit2)) return TRUE;
! if(!trusted_side(unit->side, unit2->side)
! && world_distance(unit2->x,unit2->y,unit->x,unit->y) <= zoc_range(unit2, u)
! && world_distance(unit2->x,unit2->y,x,y) <= zoc_range(unit2, u)
! && uu_mp_to_traverse_zoc(u, u2) < 0) return TRUE;
! }
}
}