[Freeciv-Dev] Re: [Patch] Fortress with enhanced vision (watchtower-like
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Aug 25, 2001 at 04:26:11PM +0200, Bert Buchholz wrote:
> Hi,
>
> Patch against cvs from Fri, Aug-24, somewhen in the evening :-)
> This is now the watchtower "included" in a fortress, because most people
> liked it better this way. First, the features:
>
> Features:
> - The fortress provides a larger visionrange (2), as soon as
> "invention" is invented (can be changed in rulesets)
> - tech_flag_id: TF_WATCHTOWER
> - *flag_names[]: Watchtower
> - Still, fortresses have no owner, just like now, so everybody, who
> steps into a fortress, gets enhanced vision (as long as he stays
> there & he has made the necessary invetion), no matter who built it.
> - If a fortress is empty, no enhanced vision will be granted.
> - Units, that have a visionrange == 2 will get no enhanced sight. This
> means, that they will keep their visionrange of 2.
Very nice.
>
> IMPORTANT: Currently, if there are units with visionrange > 2, their
> visionrange is reduced. This is not logical, so maybe the visionrange
> shouldn't be set to 2 but enhanced by 1 (vision_range+1), but this would
> mean that spies inside a fortress would get a visionrange of 3, which
> seems to be very much. In fact, every visionrange > 2 seems to be too
> much, but maybe you think diffrently. Also, the value 2 is hardcoded,
> maybe that is not desired, even though I don't see too many reasons to
> play around with this one, but you never know :-)
For maximum flexibility it may be nice to have two variables:
watchtower_vision and watchtower_extra_vision. Your current code
implements watchtower_vision=2. Could you replace the hardcoded 2 with
a call to get_watchtower_vision() which is something like:
{
int base_vision=get_unit_type(punit->type)->vision_range;
return max(base_vision,
max(watchtower_vision, base_vision+watchtower_extra_vision));
}
Could you also make these two variables changeable by server command
or ruleset?
Another issue to have a more fine grained control over vision
range. The vision range is currently a square with the dimensions
(vision*2+1)X(vision*2+1). Maybe this could be changed to somelike
like:
vision=1:
x
xux
x
vision=2:
xxx
xux
xxx
vision=3:
x
xxx
xxuxx
xxx
x
vision=4:
xxx
xxxxx
xxuxx
xxxxx
xxx
and so on.
> Up to now, following events regarding watchtowers are handled (there may
> be more to handle which I didn't see):
> - A fortress is pillaged (vr reduced)
> - A town is built upon a fortress (vr reduced)
> - A unit steps into a fortress (vr enhanced)
> - A unit steps out of a watchtower (vr reduced)
> - The necessary invention is made (all units inside fortresses get
> enhanced vr)
> - A fortress is built (all units on that tile get enhanced vr)
I have currently no clue about fog handling.
> So, if anything's missing, or other failures (which are of course
> intentional ;-), please tell me and I'll try to kick them out, or you do
> that or the devil knows who... :-P
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Using only the operating-system that came with your computer is just
like only playing the demo-disc that came with your CD-player."
[Freeciv-Dev] Re: [Patch] Fortress with enhanced vision (watchtower-like), Ross W. Wetmore, 2001/08/25
[Freeciv-Dev] Re: [Patch] Fortress with enhanced vision (watchtower-like), Gregory Berkolaiko, 2001/08/26
|
|