[Freeciv-Dev] [Patch] Cleanup of defense power calculations
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
base_get_defense_power, get_defense_power and get_total_defense_power
multiply defense_strength with POWER_FACTOR. get_virtual_defense_power
doesn't.
You may have a better name for unit_vulnerability_virtual2.
From the belligerence functions only unit_belligerence returns a
squared value. From the vulnerability functions only
unit_vulnerability_basic returns a _non_-squared value.
get_simple_defense_power has been removed.
The patch is on top of attack_power2.diff.
Nothing should be changed except this one (which I consider a bug):
- if (unit_on_fortress(defender) &&
- !map_get_city(defender->x, defender->y))
- defensepower*=2;
+ if (map_has_special(x, y, S_FORTRESS) && !pcity) {
+ defensepower +=
+ (defensepower * terrain_control.fortress_defense_bonus) / 100;
+ }
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Real Users find the one combination of bizarre
input values that shuts down the system for days."
defense_power1.diff
Description: Text document
- [Freeciv-Dev] [Patch] Cleanup of defense power calculations,
Raimar Falke <=
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Raahul Kumar, 2002/02/27
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Raimar Falke, 2002/02/28
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Raahul Kumar, 2002/02/28
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Ben Webb, 2002/02/28
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Raahul Kumar, 2002/02/28
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Ben Webb, 2002/02/28
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Raimar Falke, 2002/02/28
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Raahul Kumar, 2002/02/28
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Raimar Falke, 2002/02/28
- [Freeciv-Dev] Re: [Patch] Cleanup of defense power calculations, Raahul Kumar, 2002/02/28
|
|