[Freeciv-Dev] Re: patch: port attacks!
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<snip>
You are a coding machine. There is no real Per. You must be an auto code
generator ;-).
> The attached patch fixes this. Now subs can do port attacks! Lots of fun!
> It is tested and it works as expected. Please take it for a ride and tell
> the list if it works, so that it can go in, please :)
>
> Yours,
> Per
>
> "My mother never saw the irony in calling me a son-of-a-bitch."
> -- Jack Nicholson
> > --- freeciv-phased/common/combat.c.old Tue Mar 12 11:55:03 2002
> +++ freeciv-phased/common/combat.c Tue Mar 12 13:20:43 2002
> @@ -446,8 +446,9 @@
> have anything to do with the value of a unit.
> It would be nice if the function was a bit more fuzzy about prioritizing,
> making it able to fx choose a 1a/9d unit over a 10a/10d unit. It should
> -also be able to spare units without full hp's to some extend, as these
> +also be able to spare units without full hp's to some extent, as these
> could be more valuable later.
> +A seaborne unit must attempt to defend a city against submarine attacks.
> **************************************************************************/
> struct unit *get_defender(struct unit *attacker, int x, int y)
> {
> @@ -466,6 +467,13 @@
>
> /* This will make units roughly evenly good defenders look alike. */
> int unit_def = (int) (100000 * (1 - unit_win_chance(attacker,
> defender)));
> + /* Ensure that seaborne units that can only attack other seaborne
> + units can actually attack enemy seaborne units in a stack if
> + they are present, and not fail because the enemy chose to
> + defend with a ground unit. Go, subs, go! {:-) - Per */
> + if (unit_flag(attacker, F_NO_LAND_ATTACK)
> + && is_sailing_unit(defender))
> + unit_def += 100000;
I'd like to know why you are adding this number to unit_def. In short, how
does it work, O Great Guru?
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
- [Freeciv-Dev] documentation patch to units.ruleset, Per I. Mathisen, 2002/03/10
- [Freeciv-Dev] Re: documentation patch to units.ruleset, Raahul Kumar, 2002/03/12
- [Freeciv-Dev] Re: patch: port attacks!, Jason Short, 2002/03/12
- [Freeciv-Dev] Re: patch: port attacks!, Raahul Kumar, 2002/03/12
- [Freeciv-Dev] Re: patch: port attacks!, Per I. Mathisen, 2002/03/12
- [Freeciv-Dev] Re: patch: port attacks!, Raahul Kumar, 2002/03/12
- [Freeciv-Dev] Re: patch: port attacks!, Gregory Berkolaiko, 2002/03/12
[Freeciv-Dev] Re: documentation patch to units.ruleset, Raimar Falke, 2002/03/12
|
|