Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#8399) Re: Re: (PR#9570) battle or win chance corrupted
Home

[Freeciv-Dev] (PR#8399) Re: Re: (PR#9570) battle or win chance corrupted

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#8399) Re: Re: (PR#9570) battle or win chance corrupted
From: "Christian Knoke" <chrisk@xxxxxxxxx>
Date: Sun, 1 Aug 2004 23:26:35 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8399 >

On Sun, Aug 01, 2004 at 07:40:20PM -0700, Jason Short wrote:

> Changing the randseed doesn't do it; that's just the game's initial 
> seed.  The up-to-date seed is saved in some esotericly-named variables. 

Ah. And the names are?

>   If you want to change the seed just run a battle somewhere else.

Well, more work, and a bit unsure that the randseed is really different when
I do several tests.

But I tried. Indeed in some tests I did win. But not with a result as good
as I would expect.

> However there's no reason you need to reproduce this.  It's the same as 
> PR#8399.  The cause is obvious (the chance-to-win is the chance against 
> the "visible" unit, not the minimum chance against all units).

No, it's not. The unit is fighting alone, there is no stack.

We are talking of the following units:

430,11,74,0,0,30,168,26,"Howitzer",15,0,0,0,0,0,0,1,14,59,0,0,1,1,0,-1,0,0,0,0,"-","-"
495,14,71,1,0,30,351,14,"Mech. 
Inf.",5,0,0,0,0,9,0,0,0,0,0,7,3,0,0,-1,0,0,0,0,"-","-"


Mech. Inf.:  A: 6   D: 6  FP: 1  HP: 30  vetstate: 150 (veteran)
             MP at time of attack: 2

Howitzer:    A: 12  D: 2  FP: 2  HP: 30  vetstate: 100 (green)   
             Def.Bonus: 1.5 (river, not fortified)

resulting in:

Mech. Inf. modified attack strength:  9  Hitpoints: 30
Howitzer modified defense strength:   3  Hitpoints: 30

This should return my unit with roundabout 20 HP still out of that fight. But
it doesn't.

> Fixing it should be that hard but I haven't gotten around to it.
> 
> A design question; what should the "defend" chance say?  Obviously there 
> the same bug here too.  But here the desired behavior isn't entirely 
> obvious.  Should it show the chance of the current unit defending 
> against the best attacker?  Or the chance of the best defender on the 
> current tile defending against the best attacker?

The popup is tile-related. Attackers there are many, they can be bombers
several tiles away.

I think is should say A-chance for active unit against best defender, and
D-chance for active unit against best attacker on that tile.

Christian

-- 
Christian Knoke            * * *            http://cknoke.de
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.




[Prev in Thread] Current Thread [Next in Thread]