[freeciv-ai] Re: (PR#4026) Advanced rampage.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
[freeciv-ai] Re: (PR#4026) Advanced rampage.,
Gregory Berkolaiko <=
[freeciv-ai] Re: (PR#4026) Advanced rampage., Per I. Mathisen, 2003/05/10
[freeciv-ai] Re: (PR#4026) Advanced rampage., Gregory Berkolaiko, 2003/05/12
[freeciv-ai] Re: (PR#4026) Advanced rampage., Per I. Mathisen, 2003/05/12
|
|