[Freeciv-Dev] Re: [Patch]Defence Power
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Mar 06, 2002 at 12:22:19AM -0800, Raahul Kumar wrote:
> It looks good. It should go into CVS immediately. I have a few questions
>
> How is this used?
>
> d = m;
Removed.
> If use_alternative_hp is TRUE the given alternative_hp value is used.
>
> Is this to deal with injured units, and we use max hps to see how tough the
> unit would be if it recovered?
No. We either do to calculate the vulnerability
- for a unit type (use_alternative_hp==FALSE) for example if we plan
the build one or
- for an existing unit (use_alternative_hp==TRUE, provide
the actual hps as another argument).
> It seemed obvious to me that the AI should use the unit's current
> hps. Obviously you see a need in the future for alternative_hps.
> I see a few lines like this
>
> power = (power * db) / 10;
>
> I was wondering if the 10 is a new number or good old POWER_FACTOR, it shows
> up
> fairly often.
POWER_FACTOR is only used with attack_strength and
defense_strength. From data/default/terrain.ruleset:
; defense_bonus = 10 times actual; typically 10 to 30 (1.0 to 3.0)
This is another 10. But an external visible one. May this should be
converted to percents.
> And, why does the patch seem so small? In spite of the size
> increase, it seems simpler. It is, finally, pretty code.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
What's nice about GUI is that you see what you manipulate.
What's bad about GUI is that you can only manipulate what you see.
defense_power3.diff
Description: Text document
|
|