[Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
> 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.
> > @@ -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.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Microsoft DNS service terminates abnormally when it recieves a response
to a DNS query that was never made.
Fix Information: Run your DNS service on a different platform."
-- MS service information on bugtraq
- [Freeciv-Dev] Re: [Patch] Cleanup of attack power calculations, (continued)
- [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, 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 <=
- [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, 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
|
|