Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2002:
[Freeciv-Dev] port attacks again (or right defender)
Home

[Freeciv-Dev] port attacks again (or right defender)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] port attacks again (or right defender)
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 8 Sep 2002 15:35:50 +0000 (GMT)

This is the patch Raahul probably would call "right defender patch". It
does a lot more than just adding port attacks.

Implements:
 - F_NO_LAND_ATTACK units will attack get to attack only ships in a stack
   unless protected by a coastal. If no such units, the attack is not
   valid
 - airborne F_FIGHTER units attack other airborne units if any, otherwise
   they attack other units
 - non-airborne F_FIGHTER units attack strongest defender as normal
 - ground units will attack any non-air units on target tile; in other
   words, hoovering aircraft no longer give invulnerability to ground
   units below it
 - when a unit is killed, all other units that are viable targets for the
   attacker are killed with it (unless in city or fortress)

Notes:
 - AI is capable of using subs, however it does not build them, and I
   notice that it uses them just as poorly as its other naval units
 - subs are now nasty, and that is a good thing
 - you can now retaliate with a fighter against a bomber (attacking its
   landing point); this makes a lot of sense if you think about it
 - coastal is now a lot more important. this is good.
 - several places in the code I've fixed "what if get_defender() returns
   NULL on a tile with enemies on it" cases (which is a possible scenario
   even now)
 - get_defender() is the answer to "is there a viable target at x,y?",
   is_enemy_unit_tile() is the answer to "is x,y empty of enemies?".

Yours
Per

"I don't see why people are so upset about cloning sheep. American
television networks have been doing that to their audiences for years."
-- Jello Biafra

Attachment: portattacks4.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] port attacks again (or right defender), Per I. Mathisen <=