Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations
Home

[Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 26 Feb 2002 16:25:26 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Tue, Feb 26, 2002 at 07:00:07AM -0800, Raahul Kumar wrote:
> 
> --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> <snip>
> 
> 
> 
> <snip>
> > -  ptype = unit_type(punit);
> > 
> > -/* get_attack_power will be wrong if moves_left == 1 || == 2 */
> > 
> > This means for me: we can't use get_attack_power here because the
> > result will be wrong if moves_left<SINGLE_MOVE.
> > 
> 
> I do not see why. If you attack that turn with that unit, it's attack power
> is indeed lower if it has fractional move points.

I give up. I don't know what you want.

> > base_get_attack_power is called by base_unit_belligerence_primitive is
> > called by unit_belligerence_basic with moves_left=SINGLE_MOVE. This
> > means that in base_get_attack_power the reduction isn't made.
> >
> 
> That is exactly why I hate wrapper functions.

Better than the current mess.

> > > Petr has renamed a lot of variables. Any comments?
> > 
> > In kill_something_with?
> 
> He's hit a lot more functions than that. Most of the alphabet soup has the
> same meaning except for m which normally means move_type. I'm going to sleep.
> It's 1 am here.

Is there a patch somewhere?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  (On the statement print "42 monkeys"+"1 snake"): BTW, both perl and Python
  get this wrong. Perl gives 43 and Python gives "42 monkeys1 snake", when 
  the answer is clearly "41 monkeys and 1 fat snake".  
    -- Jim Fulton, 10 Aug 1999


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