[Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Feb 26, 2002 at 01:01:26PM +0000, Gregory Berkolaiko wrote:
> > Everything is fine with the patch but I think you should do the renaming
> > suggested by you in email to Mike. Don't leave until tomorrow... (what
> you
> > can do day after tomorrow).
>
> I'm not cleaning up the AI. I don't want to define the interface of an
> AI file.
You are not cleaning the AI??? What is it you are doing then?
> > Possibly you should consider changing belligerence to attack_rating (in
> > analogy to defence_rating used in combat.c). "Belligerence" isn't one of
> the
> > commonest words...
> >
> > Two comments below.
>
> > > + a = base_unit_belligerence_primitive(i, FALSE, SINGLE_MOVE,
> > > + unit_types[i].hp);
> >
> > why don't you feed
> > (m == LAND_MOVING || player_knows_improvement_tech(pplayer, B_PORT)
> > as a parameter to base_unit_belligerence_primitive??
>
> It looks like do_make_unit_veteran is the right thing.
no it isn't
> > > @@ -1057,9 +1060,9 @@
> > > d_val = stack_attack_value(dest_x, dest_y) * 30;
> > > if ((dcity = map_get_city(dest_x, dest_y))) {
> > > d_type = ai_choose_defender_versus(dcity, punit->type);
> > > - j = unit_types[d_type].hp * (do_make_unit_veteran(dcity, d_type)
> ? 15
> > > : 10) *
> > > - unit_types[d_type].attack_strength;
> > > - d_val += j;
> > > + d_val += base_get_attack_power(d_type,
> > > + do_make_unit_veteran(dcity, d_type),
> > > + SINGLE_MOVE) * unit_types[d_type].hp;
> >
> > Here (as everywhere else) there should be belligerence instead of just
> > attack*hp (compare to stack_attack_value above). I suspect it's a
> historical
> > thing: firepower wasn't in Civ I. Firepower is completely missing in
> > gotohand.c, for example.
>
> Not in the scope of this patch.
Look, if you try to do a job, might as well do it properly. Do you want 5
patches changing the same lines back and forth? I thought this is what you
dreaded.
If you are not prepared to do it properly, then commit the patch, it's an
improvement anyway. Others will finish what you left hanging.
G.
P.S. I remember you saying, I quote, "strong indication for me to fix the
things if you notice them (even if there aren't part of the original authors
intentions)". It seems you forget what you say...
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, (continued)
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raimar Falke, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raimar Falke, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raimar Falke, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raimar Falke, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Gregory Berkolaiko, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raimar Falke, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations,
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raimar Falke, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Gregory Berkolaiko, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Raimar Falke, 2002/02/26
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, Petr Baudis, 2002/02/26
|
|