Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2003:
[freeciv-ai] Re: (PR#4026) Advanced rampage.
Home

[freeciv-ai] Re: (PR#4026) Advanced rampage.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#4026) Advanced rampage.
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Wed, 7 May 2003 13:52:23 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, 7 May 2003, jorneg@xxxxxxxxxxx wrote:

> En/na Gregory Berkolaiko ha escrit:
> 
> >+    {
> >+      /* See description of kill_desire() about these variables. */
> >+      int att_rating = unit_att_rating_now(punit);
> >+      int vuln = unit_vulnerability(punit, pdef);
> >+      int attack = reinforcements_value(punit, pdef->x, pdef->y) + 
> >att_rating;
> >+      int benefit = stack_cost(pdef);
> >+      int loss = unit_type(punit)->build_cost;
> >+      
> >+      attack *= attack;
> >+      
> >+      /* If the victim is in the city, we increase the benefit and correct
> >+       * it with our health because there may be more units in the city
> >+       * stacked, and we won't destroy them all at once, so in the next
> >+       * turn they may attack us. So we shouldn't send already injured
> >+       * units to useless suicide. */
> >+      if (map_get_city(x, y)) {
> >+        /* A WAG for the city value */
> >+        benefit += unit_value(get_role_unit(F_CITIES, 0));
> >+        benefit = (benefit * punit->hp) / unit_type(punit)->hp;
> >+      }
> >
>     Why not check here if there is a fortress?

We could.  Then we need to add 40 to benefit in some other place (cause 
fortress doesn't qualify for the bonus).  But honestly speaking, 
fortresses are so rare, I wouldn't bother.

G.




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