[Freeciv-Dev] Re: (PR#8791) crash with civ1 ruleset
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8791 >
On Fri, 21 May 2004, Jason Short wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8791 >
>
> Gregory Berkolaiko wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=8791 >
> >
> >>[jdorje - Fri May 21 06:58:58 2004]:
> >>
> >>In civ1 there seem to be numerous units with a defense of 0.
> >>
> >>A defense of 0 should be allowed! So long as a unit with an attack of 0
> >>is never allowed to attack this unit.
> >
> >
> > It's just a stupid bug, fix attached.
> >
>
> However with your patch I still get a crash with this rc file.
First of all, the patch is stupid since this check is already performed a
few lines later.
Second, this is a normal unit, Militia, whose defense rating is calculated
at 0.
It's done like this:
attack * POWER_FACTOR * veteran_bonus * hp * firepower / POWER_DIVIDER
1 10 1.5 1 1 30
The reason is that all units have hp = 1 in civ1 ruleset (civ1 didn't have
the notion of HP).
I am not too sure what shall we do about it. multiplication by 10 is for
veteran bonuses not to get lost. Later division by 30 is to keep numbers
sane for larger units in default/civ2 rulesets.
We can set firepower 10 to all units in civ1 ruleset, it won't change the
behaviour (firepower is how many hp of the enemy is removed upon a
successful hit), but will be annoying in the help.
Or we can reduce the POWER_DIVIDER but you can never foresee all the
effects of this, as it might still be hardcoded in some places (I hope
not). It can definitely make "dangerous danger" messages more often than
one a year.
G.
|
|