[Freeciv-Dev] Re: Patch correcting win_cnace
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Friday 20 July 2001 20:24, Thue wrote:
> On Friday 20 July 2001 22:09, Erik Sigra wrote:
> > fredagen den 20 juli 2001 19:42 skrev Thue:
> > > On Sunday 15 July 2001 18:15, Gregory Berkolaiko wrote:
> > > > Err, should we also check for afp == 0 and dfp == 0 ?
> > > >
> > > > Best,
> > > > G.
> > > >
> > > > On Sun, 15 Jul 2001, Gregory Berkolaiko wrote:
> > > > > 2. There is a dormant mistake in win_chance. Line 39 of
> > > > > combat.c should be
> > > > > int def_N_lose = (dhp+afp-1)/afp;
> > > > > As it is now, it will work if no unit has got firepower > 2.
> > > > > But, for example, the number of hits a musketeer (20HP) will
> > > > > survive from a 3FP unit is 7, not
> > > > > 20/3 + 20%3 = 8
> > > > > as it is now. Same thing on line 38.
> > >
> > > Actually I was aware of the possibility when I wrote it, but I
> > > didn't find it neccesary to check since a unit with fp 0 doesn't
> > > make sense anyway.
> > > (And if someone did create a unit with fp 0 it would be extremely
> > > easy for them to use the core backtrace to find out why it
> > > crashed.)
> >
> > I think not everyone who may want to design custom rulesets thiks
> > core backtraces are extremely easy.
>
> Ok, maybe I should have said "extremely" :P.
> I will just add a check with a nice user-friendly warning to the
> ruleset loading.
> (Slightly nicer than adding the check to win_chance, as there are
> probably other places that assume fp > 0)
>
> -Thue
Is this ok?
-Thue
diff
Description: Text Data
- [Freeciv-Dev] Re: chance of winning a battle, (continued)
- [Freeciv-Dev] Re: chance of winning a battle, Trent Piepho, 2001/07/11
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/12
- [Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/12
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/12
- [Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/15
- [Freeciv-Dev] Patch correcting win_cnace, Gregory Berkolaiko, 2001/07/15
- [Freeciv-Dev] Re: Patch correcting win_cnace, Gaute B Strokkenes, 2001/07/15
- [Freeciv-Dev] Re: Patch correcting win_cnace, Thue, 2001/07/20
- [Freeciv-Dev] Re: Patch correcting win_cnace, Erik Sigra, 2001/07/20
- [Freeciv-Dev] Re: Patch correcting win_cnace, Thue, 2001/07/20
- [Freeciv-Dev] Re: Patch correcting win_cnace,
Thue <=
- [Freeciv-Dev] Re: Patch correcting win_cnace, Gregory Berkolaiko, 2001/07/20
- [Freeciv-Dev] Re: Patch correcting win_cnace, Gaute B Strokkenes, 2001/07/22
- [Freeciv-Dev] Re: Patch correcting win_cnace, Gaute B Strokkenes, 2001/07/22
- [Freeciv-Dev] Re: Patch correcting win_cnace, Thue, 2001/07/22
- [Freeciv-Dev] Re: Patch correcting win_cnace, Gregory Berkolaiko, 2001/07/20
- [Freeciv-Dev] Re: Patch correcting win_cnace, Thue, 2001/07/20
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/15
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/15
- [Freeciv-Dev] Re: chance of winning a battle, Gaute B Strokkenes, 2001/07/15
- [Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/21
|
|