Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2003:
[Freeciv-Dev] Re: (PR#4145) Combat and move points.
Home

[Freeciv-Dev] Re: (PR#4145) Combat and move points.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory.Berkolaiko@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4145) Combat and move points.
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 4 May 2003 07:39:34 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, 4 May 2003, Gregory Berkolaiko wrote:
> Right now if a land unit is attacked and it's HP is decreased, it's MP are
> left unaffected. So we have a situation when a unit has more move-points
> than would be given to it by unit_move_rate (which does take into account
> HPs and such).
...
> I think we need to change the system. I feel what is now done for ships
> (unithand.c around line 720) is very just and suitable for land units too.

Yes. I think this is the right thing to do, and also what civ2 did.

728   if (is_sailing_unit(punit)) {
729     punit->moves_left = unit_move_rate(punit) - moves_used - SINGLE_MOVE;
730   } else {
731     punit->moves_left -= SINGLE_MOVE;
732   }
733   if (is_sailing_unit(pdefender)) {
734     pdefender->moves_left = unit_move_rate(pdefender) - def_moves_used;
735   }

should be replaced with

  punit->moves_left = unit_move_rate(punit) - moves_used - SINGLE_MOVE;
  pdefender->moves_left = unit_move_rate(pdefender) - moves_used
                          - SINGLE_MOVE;

  - Per




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