Actions
=======
An action is something a player can do to achieve something in the game.
It has properties like cost, chance of success and effects. Some of those
properties are configurable using effects and other rule set settings. To
learn how to change them read README.effects and the rule set files of
classic. An enabler allows a player to do an action.

Generalized enablers
====================
Some actions have generalized enablers. An action like that can have
zero, one or more enablers defined for it in the ruleset. The player can
do the action only when at least one generalized enabler says that the
action is enabled (and all its hard requirements are fulfilled). A ruleset
author can therefore disable an action by not defining any enablers for
it in their ruleset.

A generalized enabler lives in actions.ruleset. It consists of
the action it enables and two requirement vectors.
The first requirement vector, actor_reqs, applies to the entity doing
the action. The second, target_reqs, applies to its target. If both requirement
vectors are fulfilled the action is enabled as far as the enabler is
concerned. Note that an action's hard requirements still may make it impossible.

In some situations an action controlled by generalized enablers may be
impossible because of limitations in Freeciv it self. Those limitations are
called hard requirements. The hard requirements of each action are documented
below in the section called "Actions and their hard coded requirements".

If the player don't have the knowledge required to find out if an action is
enabled or not the action is shown to the player in case it is possible. The
client will indicate the uncertainty to the player.

Should the player order a unit to do an illegal action the server will
inform the player that their unit was unable to perform the action. The
actor unit may also lose a ruleset configurable amount of move fragments.

Some enablers guard things that user is not able to initiate,
but which will happen automatically. These are listed as
'internal' actions.


Example
=======
[enabler_veil_the_threat_of_terror]
action = "Incite City"
actor_reqs    =
    { "type",    "name",                 "range", "present"
      "DiplRel", "Has Casus Belli",      "Local", TRUE
      "DiplRel", "Provided Casus Belli", "Local", FALSE
      "DiplRel", "Foreign",              "Local", TRUE
    }

[enabler_go_bind_your_sons_to_exile]
action = "Incite City"
actor_reqs    =
    { "type",    "name",       "range",  "present"
      "Tech",    "Flight",     "Player", TRUE
      "DiplRel", "Foreign",    "Local",  TRUE
    }
target_reqs    =
    { "type",   "name",    "range",  "present"
      "Tech",   "Writing", "Player", False
    }

Above are two enablers. They both enable the action "Incite City". If
all the conditions of at least one of them are fulfilled it will be enabled.
No information is given to the player about what enabler enabled an
action.

The first enabler, enabler_veil_the_threat_of_terror, is
simple. It allows a player to incite a city if they have a reason to declare
war on its owner AND the city's owner don't have a reason to declare war on
them.

The second enabler, enabler_go_bind_your_sons_to_exile, is more
complex. It allows a player that has Flight to bribe the cities of
civilizations that don't have Writing. The complexity is caused by the
requirement that the target don't know Writing. If the civilization of the
target city knows Writing or not may be unknown to the acting player. To
avoid this complexity a requirement that the acting player has an embassy to
the target cities civilization (and therefore knowledge about its techs) can
be added.

Requirement vector rules
========================
An enabler has two requirement vectors that must be true at the same
time. This creates some corner cases you won't find with single requirement
vectors. The rules below tries to deal with them.

A "DiplRel" requirement with the range "Local" should always be put in the
actor requirements.
 * A local DiplRel requirement can always be expressed as an actor
   requirement.
 * Only having to care about local DiplRel requirements in the actor
   requirements allows the Freeciv code responsible for reasoning about
   enablers to be simpler and faster.
 * If player A having a diplomatic relationship to player B implies that
   player B has the same relationship to player A the relationship is
   symmetric. Examples: "Foreign" and "War"
 * Symmetric local DiplRel requirements can be moved directly from the
   target requirement vector to the actor requirement vector.
 * Asymmetric local DiplRel requirements must test for the same thing in
   the opposite direction. Example: "Hosts embassy" -> "Has embassy"
A "MaxDistanceSq" requirement with the range "Tile" should always be put in
the actor requirements, for the same reasons.

Actions and Lua
===============
Lua has some integration with enabler controlled actions. This integration
allows both to implement (parts of) an action in Lua and to perform an
action from Lua.

The action signals
==================
Right before an action is executed, but after it is known to be legal, a
signal is emitted to Lua. It has access to the same information as the
server. It doesn't have access to the result of the action since it
isn't done yet. Another signal is emitted to lua after action has been
executed, and the result is known. This latter signal often does not
have access to actor or target as they may have been destroyed
by the action.

First signal's name starts with action_started_, then the actor kind, then
another _ and in the end the target kind. The signal that is emitted when a
unit performs an action on a city is therefore action_started_unit_city.
The latter signal's name is constructed similarly, except that the first
part is action_finished_.

First signal has three parameters. The first parameter is the action that is
about to get started. The second is the actor. The third parameter is the
target. The parameters of action_started_unit_city is therefore action,
actor_unit and finally target city.
Latter signal has four parameters; action that was finished,
whether action was successful, actor, and target. Actor and/or target
might be nil if they got destroyed by the action.

To get the rule name of an action, that is the name used in enablers,
you can use the method rule_name(). To get a translated name that is nice to
show to players use name_translation().

Example 1
=========
The following Lua code will log all actions done by any unit to a city, to
another unit, to a unit stack, to a tile, to a tile's extras or to itself:

-- Returns a function that describes a tile target
function tile_desc_func_gen(kind, owner_getter)
  return function (target)
    local owner
    if owner_getter(target) == nil then
      owner = _("unowned")
    else
      owner = owner_getter(target).nation:name_translation()
    end
    return _("%s %s (%d, %d)"):format(owner, kind, target.x, target.y)
  end
end

-- Describe the target based on its kind
target_describer = {
  ["City"] = function (target)
    return _("%s city %s (id: %d)"):format(
        target.owner.nation:name_translation(), target.name, target.id)
  end,
  ["Unit"] = function (target)
    return _("%s %s (id: %d)"):format(
      target.owner.nation:name_translation(),
      target.utype:name_translation(), target.id)
  end,
  ["Stack"] = function (target)
    return _("unit stack at (%d, %d)"):format(target.x, target.y)
  end,
  ["Tile"] = tile_desc_func_gen("tile", function (target)
    return target.owner
  end),
  ["Extras"] = tile_desc_func_gen("tile extras", function (target)
    return target:extra_owner(Nil)
  end),
  ["Self"] = function (target) return "it self" end,
}

-- Log all performed actions
function action_started_callback(action, actor, target)
  log.normal(_("%d: %s (rule name: %s) performed by %s %s (id: %d) on %s"),
             game.current_turn(),
             action:name_translation(),
             action:rule_name(),
             actor.owner.nation:name_translation(),
             actor.utype:name_translation(),
             actor.id,
             target_describer[action:target_kind()](target))
end

signal.connect("action_started_unit_city", "action_started_callback")
signal.connect("action_started_unit_unit", "action_started_callback")
signal.connect("action_started_unit_stack", "action_started_callback")
signal.connect("action_started_unit_tile", "action_started_callback")
signal.connect("action_started_unit_extras", "action_started_callback")
signal.connect("action_started_unit_self", "action_started_callback")

Example 2
=========
The following Lua code will make a player that poisons the population of
cities risk civil war:

function action_started_callback(action, actor, target)
  if action:rule_name() == "Poison City" then
     edit.civil_war(actor.owner, 5);
  end
end

signal.connect("action_started_unit_city", "action_started_callback")

Forcing a unit to (try to) perform an action from Lua
=====================================================
A unit can be forced to try to perform an enabler controlled action from
Lua. The action is subject to the same rules as if the player ordered it
performed themself. This respects the ruleset rules about when an action is
enabled and what consequences performing the action has.

actor_unit:perform_action(action[, target[, sub_target]])
Units have a perform_action() method. This takes the action to perform as a
parameter. Depending on the action's target and sub target kind it may also
require a target parameter and a sub target parameter.

The action parameter is an action. You can use find.action(rule_name) to
get a reference to an action.

The target parameter is the target unit, city or - for unit stacks, tiles
and tile extras - tile the actor unit should perform the action to.

The sub_target parameter is the last part of the target "address" for
actions performed against a target and a sub target. It can be the name of
an extra, a Building_Type or a Tech_Type.

Examples:
=========
actor:perform_action(find.action("Disband Unit"))
actor:perform_action(find.action("Establish Embassy Stay"), target)
actor:perform_action(find.action("Targeted Sabotage City Escape"),
                     target, find.building_type("City Walls"))
actor:perform_action(find.action("Targeted Steal Tech Escape Expected"),
                     target, find.tech_type("Banking"))
actor:perform_action(find.action("Build Road"), target, "Road")

Actions and their hard requirements
===================================
Freeciv can only allow a player to perform an action when the action's hard
requirements are fulfilled. Some, but not all, hard requirements can be
expressed in an enabler. Putting them there makes it clearer what the
rule actually is. Parts of Freeciv reasons about enablers. Examples
are self contradicting rule detection and the help system. Including the
hard requirements rules in each enabler of its action is therefore
obligatory for some hard requirements. Those hard requirements are marked
with an exclamation mark (!).

Actions done by a unit against a city
=====================================
"Establish Embassy" - Establish a real embassy to the target player
 * actor must be aware that the target exists
 * actor can't have a real embassy to the target player (!)
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Establish Embassy Stay" - Establish a real embassy to the target player
 * spends the actor unit
 * actor must be aware that the target exists
 * actor can't have a real embassy to the target player (!)
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Investigate City" - Look at the city dialog of a foreign city
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Investigate City Spend Unit" - Look at the city dialog of a foreign city
 * spends the actor unit
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Sabotage City" - Destroy a building or the production in the target city.
 * spends the actor unit
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Sabotage City Escape" - Destroy a building or the production in the target city.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Targeted Sabotage City" - Destroy a building in the target city.
 * spends the actor unit
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Targeted Sabotage City Escape" - Destroy a building in the target city.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Sabotage City Production" - Sabotage the city's production.
 * spends the actor unit
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Sabotage City Production Escape" - Sabotage the city's production.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Poison City" - Kill a citizen in the target city.
 * spends the actor unit
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Poison City Escape" - Kill a citizen in the target city and escape.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Spread Plague" - Bio-terrorism. Infect the target city with an illness.
 * set if the actor unit is spent with spread_plague_actor_consuming_always
 * may infect trade route connected cities if illness.illness_on is TRUE
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Steal Tech" - Steal a random tech from the targets owner.
 * spends the actor unit
 * will always fail when the tech theft is expected. Tech theft is expected
   when the number of previous tech thefts from the target city is above the
   limit set by the "Stealings_Ignore" effect.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Steal Tech Escape Expected" - Escape version of the above.
 * more likely to fail when the tech theft is expected. Tech theft is
   expected when the number of previous tech thefts from the target city is
   above the limit set by the "Stealings_Ignore" effect.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Targeted Steal Tech" - Steal a specific tech from the targets owner.
 * spends the actor unit
 * will always fail when the tech theft is expected. Tech theft is expected
   when the number of previous tech thefts from the target city is above the
   limit set by the "Stealings_Ignore" effect.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * actor must know what techs target owns
 * target must be foreign. (!)

"Targeted Steal Tech Escape Expected" - Escape version of the above.
 * more likely to fail when the tech theft is expected. Tech theft is
   expected when the number of previous tech thefts from the target city is
   above the limit set by the "Stealings_Ignore" effect.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * actor must know what techs target owns
 * target must be foreign. (!)

"Incite City" - Pay the target city to join the actors owners side.
 * spends the actor unit
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Incite City Escape" - Pay the target city to join the actors owners side.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Steal Gold" - Steal some gold from the owner of the target city.
 * adjustable with the Max_Stolen_Gold_Pm effect and with the
   Thiefs_Share_Pm effect
 * spends the actor unit
 * actor must be aware that the target exists
 * the targets owner must have more than 0 gold.
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Steal Gold Escape" - Steal some gold from the owner of the target city.
 * adjustable with the Max_Stolen_Gold_Pm effect and with the
   Thiefs_Share_Pm effect
 * actor must be aware that the target exists
 * the targets owner must have more than 0 gold.
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Steal Maps" - Steal parts of the owner of the target city's map.
 * adjustable with the effect Maps_Stolen_Pct and the ruleset setting
   steal_maps_reveals_all_cities
 * spends the actor unit
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Steal Maps Escape" - Steal parts of the owner of the target city's map.
 * adjustable with the effect Maps_Stolen_Pct and the ruleset setting
   steal_maps_reveals_all_cities
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)

"Spy Escape" - Just escape without doing anything else first.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * the actor player must have a city to escape to.
 * target must be foreign. (!)

"Suitcase Nuke" - Cause a nuclear explosion in the target city.
 * spends the actor unit
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * Blast radius can be set with Nuke_Blast_Radius_1_Sq

"Suitcase Nuke Escape" - Cause a nuclear explosion in the target city.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * Blast radius can be set with Nuke_Blast_Radius_1_Sq

"Destroy City" - Destroys the target city.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.

"Establish Trade Route" - Establish a trade route to the target city.
 * actor must be aware that the target exists
 * actor must be on the same tile as the target or on the tile next to it.
 * actor must have a home city. (!)
 * target must be foreign or trademindist tiles away from that home city.
 * trade route type pct (see "Trade settings") can't be 0%.
 * it is possible to establish a trade route between the cities as far as
   the two cities them self are concerned. (Example: If one of the cities
   can't have any trade routes at all it is impossible to establish a new
   one.)

"Enter Marketplace" - Get a one time bonus without creating a trade route.
 * actor must be aware that the target exists
 * any action listed in enter_marketplace_blocked_by must be impossible
 * actor must be on the same tile as the target or on the tile next to it.
 * actor must have a home city. (!)
 * target must be foreign or trademindist tiles away from that home city.
 * trade route type (see Trade settings) can't be 0%.

"Help Wonder" - Add the shields used to build the actor to the target city.
 * adjustable with the Unit_Shield_Value_Pct effect
 * actor must be aware that the target exists
 * actor must be on the same tile as the target unless
   help_wonder_max_range allows it to be further away. (Default
   help_wonder_max_range is 1)
 * target city must need the extra shields to complete its production.

"Disband Unit Recover" - Add half the shields used to build the unit to target
 * adjustable with the Unit_Shield_Value_Pct effect
 * actor must be aware that the target exists
 * "Help Wonder" must be impossible
 * actor must be on the same tile as the target unless
   disband_unit_recover_max_range allows it to be further away. (Default
   disband_unit_recover_max_range is 1)
 * target city must need the extra shields to complete its production.

"Join City" - Add the actor to the target city's population.
 * actor must be aware that the target exists
 * actor must have population to add (set in pop_cost)
 * actor must be on the same tile as the target or on the tile next to it.
 * target city population must not become higher that the add_to_size_limit
   setting permits.
 * target must be able to grow to the size that adding the unit would
   result in.

"Home City" - Set target city as the actor unit's new home city
 * actor must be aware that the target exists
 * actor must be on the same tile as the target
 * can't set existing home city as new home city
 * target city has enough unused unit maintenance slots to support the actor
   unit. (No problem if the actor unit spends 0 city slots)

"Upgrade Unit" - Upgrade the actor unit using the target's facilities.
 * adjustable with the Unit_Shield_Value_Pct effect
 * actor must be aware that the target exists
 * actor must be on the same tile as the target.
 * actor player must have enough gold to pay for the upgrade.
 * actor unit must have a type to upgrade to (obsoleted_by).
 * actor unit's upgraded form must be able to exist at its current
   location.
 * actor unit's upgraded form must have room for its current cargo.
 * target player must be able to build the unit upgraded to
 * target city must be domestic. (!)

"Airlift Unit" - Airlift actor unit to target city.
 * max legal distance to the target can be set using airlift_max_range
 * actor must be aware that the target exists
 * the actor unit isn't transporting another unit (!)
 * the actor unit isn't inside the target city
 * the actor unit can exist in the target city (outside a transport)
 * the actor unit is in a city (!)
 * the city the actor unit is in
   - is domestic or, if airliftingstyle permits it, allied
   - has Airlift (see the Airlift effect and the airliftingstyle setting)
 * the target city is domestic or, if airliftingstyle permits it, allied
 * the target city has Airlift

"Conquer City Shrink" - Shrink target city by one and conquer it.
 * actor must be aware that the target exists
 * any action listed in conquer_city_shrink_blocked_by must be impossible
 * "Attack" must be impossible
 * the actor unit must be on a tile next to the target.
 * the actor player's nation can't be an animal barbarian. (!)
 * the actor unit's current transport, if the actor unit is transported,
   must be in a city or in a base native to the current transport if the
   current transport's unit class has the Unreachable unit class flag and
   the actor's unit type doesn't list the current transport's unit class in
   disembarks.
 * the actor unit doesn't have the "CoastStrict" unit type flag or the
   target city is on or adjacent to a tile that doesn't have the
   "UnsafeCoast" terrain flag.
 * the actor unit can't be diplomatically forbidden from entering the tile
   of the target city.
 * the actor unit has the "CanOccupyCity" unit class flag (!)
 * the actor can't have the "NonMil" unit type flag (!)
 * the actor unit has at least one move fragment left (!)
 * the actor's relationship to the target is War (!)
 * actor unit must be able to exist outside of a transport at the target's
   tile.
 * the target must be foreign (!)
 * the target city contains 0 units (!)

"Conquer City Shrink 2" - Shrink target city by one and conquer it.
* any action listed in conquer_city_shrink_2_blocked_by must be impossible
* A copy of "Conquer City Shrink".
* See "Conquer City Shrink" for everything else.

"Conquer City Shrink 3" - Shrink target city by one and conquer it.
* any action listed in conquer_city_shrink_3_blocked_by must be impossible
* A copy of "Conquer City Shrink".
* See "Conquer City Shrink" for everything else.

"Conquer City Shrink 4" - Shrink target city by one and conquer it.
* any action listed in conquer_city_shrink_4_blocked_by must be impossible
* A copy of "Conquer City Shrink".
* See "Conquer City Shrink" for everything else.

"Surgical Strike Building" - Destroy a specific building.
 * actor must be aware that the target exists
 * the actor unit must be on a tile next to the target.

"Surgical Strike Production" - Destroy the city production.
* actor must be aware that the target exists
* the actor unit must be on a tile next to the target.

Actions done by a unit against another unit
===========================================
"Sabotage Unit" - Halve the target unit's hit points.
 * spends the actor unit
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be visible for the actor.

"Sabotage Unit Escape" - Halve the target unit's hit points.
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be visible for the actor.

"Bribe Unit" - Make the target unit join the actors owners side.
 * forced actions after success can be set with
   bribe_unit_post_success_forced_actions
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)
 * target must be visible for the actor.

"Expel Unit" - Expel the target unit to its owner's capital.
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be visible for the actor.
 * target's owner must have a capital

"Heal Unit" - Restore the target unit's health.
 * actor must be on the same tile as the target or on the tile next to it.
 * the amount healed is set by the "Heal_Unit_Pct" effect.
 * the target unit can't be at full health
 * target must be visible for the actor.

"Heal Unit 2" - Restore the target unit's health.
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be visible for the actor.
 * A copy of "Heal Unit"

"Transport Deboard" - Exit target transport to same tile.
 * actor must be on the same tile as the target
 * actor must be transported (!)
 * actor must be on a livable tile (!)
 * target must be transporting (!)
 * target must be in a city or in a native base if the target's unit class
   has the Unreachable unit class flag and the actor's unit type doesn't
   list the target's unit class in disembarks.
 * target must be visible for the actor.

"Transport Unload" - Unload the target unit to same tile.
 * actor must be on the same tile as the target
 * actor must have a transport_cap greater than 0
 * actor must be transporting (!)
 * actor must be in a city or in a native base if the actor's unit class
   has the Unreachable unit class flag and the target's unit type doesn't
   list the actor's unit class in disembarks.
 * target must be transported (!)
 * target must be on a livable tile (!)
 * target must be visible for the actor.

"Transport Load" - Load the target unit into the actor unit.
 * actor must be on the same tile as the target
 * actor must have a transport_cap greater than 0
 * the actor unit must be domestic, allied or on the same team as the
   target unit is. (!)
 * actor must be in a city or in a base native to it if the actor's unit
   class has the Unreachable unit class flag and the target's unit type
   doesn't list the actor's unit class in the embarks field.
 * the actor must be transporting fewer units than its unit type's
   transport_cap field.
 * the target unit can't currently be transported by the actor unit.
 * the target unit's current transport, if the target unit is transported,
   must be in a city or in a base native to the current transport if the
   current transport's unit class has the Unreachable unit class flag and
   the target's unit type doesn't list the current transport's unit class in
   the disembarks field.
 * the target's unit class must appear in the target unit type's cargo field.
 * the target unit unit type must be different from the actor unit type
 * the target unit or its (recursive) cargo, if it has cargo, must be unable
   to transport itself, the actor unit or the actor unit's transporters.
   See unit_transport_check()
 * loading won't cause a situation with more than 5 recursive transports
 * target must be visible to the actor.

"Transport Load 2" - Load the target unit into the actor unit.
 * A copy of "Transport Load".
 * See "Transport Load" for everything else.

"Transport Load 3" - Load the target unit into the actor unit.
 * A copy of "Transport Load".
 * See "Transport Load" for everything else.

"Transport Board" - Enter target transport on the same tile.
 * the actor unit can't currently be transported by the target unit.
 * the actor unit's current transport, if the actor unit is transported,
   must be in a city or in a base native to the current transport if the
   current transport's unit class has the Unreachable unit class flag and
   the actor's unit type doesn't list the current transport's unit class in
   the disembarks field.
 * the actor's unit class must appear in the target unit type's cargo field.
 * the actor unit unit type must be different from the target unit type
 * the actor unit or its (recursive) cargo, if it has cargo, must be unable
   to transport itself, the target unit or the target unit's transporters.
   See unit_transport_check()
 * boarding won't cause a situation with more than 5 recursive transports
 * the target unit must be domestic, allied or on the same team as the
   actor unit is. (!)
 * target must be in a city or in a base native to it if the target's unit
   class has the Unreachable unit class flag and the actor's unit type
   doesn't list the target's unit class in the embarks field.
 * the target must be transporting fewer units than its unit type's
   transport_cap field.
 * target must be visible to the actor.

"Transport Board 2" - Enter target transport on the same tile.
 * A copy of "Transport Board".
 * See "Transport Board" for everything else.

"Transport Board 3" - Enter target transport on the same tile.
 * A copy of "Transport Board".
 * See "Transport Board" for everything else.

"Transport Embark" - Enter target transport on a different tile.
 * the actor unit must be on a tile next to the target.
 * the actor unit has at least one move fragment left (!)
 * the actor unit can't currently be transported by the target unit.
 * the actor unit's current transport, if the actor unit is transported,
   must be in a city or in a base native to the current transport if the
   current transport's unit class has the Unreachable unit class flag and
   the actor's unit type doesn't list the current transport's unit class in
   the disembarks field.
 * the actor unit's type must be the target tile's terrain animal if the
   player's nation is an animal barbarian.
 * the actor unit can't be diplomatically forbidden from entering the target
   tile.
 * the actor unit doesn't have the "CoastStrict" unit type flag or the
   target is on or adjacent to a tile that doesn't have the
   "UnsafeCoast" terrain flag.
 * actor unit must be able to move to the target tile.
 * the actor's unit class must appear in the target unit type's cargo field.
 * the actor unit unit type must be different from the target unit type
 * the actor unit or its (recursive) cargo, if it has cargo, must be unable
   to transport itself, the target unit or the target unit's transporters.
   See unit_transport_check()
 * boarding won't cause a situation with more than 5 recursive transports
 * the target unit must be domestic, allied or on the same team as the
   actor unit is. (!)
 * target must be in a city or in a base native to it if the target's unit
   class has the Unreachable unit class flag and the actor's unit type
   doesn't list the target's unit class in the embarks field.
 * the target must be transporting fewer units than its unit type's
   transport_cap field.
 * the target tile can't contain any city or units not allied to the actor
   unit and all its cargo.
 * target must be visible to the actor.

"Transport Embark 2" - Enter target transport on a different tile.
 * A copy of "Transport Embark".
 * See "Transport Embark" for everything else.

"Transport Embark 3" - Enter target transport on a different tile.
 * A copy of "Transport Embark".
 * See "Transport Embark" for everything else.

"Transport Embark 4" - Enter target transport on a different tile.
 * A copy of "Transport Embark".
 * See "Transport Embark" for everything else.

Actions done by a unit against all units at a tile
==================================================
"Bribe Stack" - Make the target units join the actors owners side.
 * forced actions after success can be set with
   bribe_stack_post_success_forced_actions
 * actor must be on the same tile as the target or on the tile next to it.
 * target must be foreign. (!)
 * target must be visible for the actor.

"Capture Units" - steal the target units.
 * actor must be on a tile next to the target.
 * target must be foreign. (!)
 * target cannot be transporting other units. (!)

"Bombard" - bombard the units (and city) at the tile.
 * can't kill target units
 * any action listed in bombard_blocked_by must be impossible
 * actor must have a bombard_rate > 0
 * actor must have an attack > 0
 * actor must be on a tile next to the target or, if bombard_max_range
   allows it, further away.
 * target owner must be at war with actor. (!)
 * if target tile is fully seen, it must have reachable units

"Bombard 2" - bombard the units (and city) at the tile.
 * can't kill target units
 * any action listed in bombard_2_blocked_by must be impossible
 * actor must be on a tile next to the target or, if bombard_2_max_range
   allows it, further away.
 * A copy of "Bombard".
 * See "Bombard" for everything else.

"Bombard 3" - bombard the units (and city) at the tile.
 * can't kill target units
 * any action listed in bombard_3_blocked_by must be impossible
 * actor must be on a tile next to the target or, if bombard_3_max_range
   allows it, further away.
 * A copy of "Bombard".
 * See "Bombard" for everything else.

"Bombard 4" - bombard the units (and city) at the tile.
 * can't kill target units
 * any action listed in bombard_4_blocked_by must be impossible
 * actor must be on a tile next to the target or, if bombard_4_max_range
   allows it, further away.
 * A copy of "Bombard".
 * See "Bombard" for everything else.

"Bombard Lethal" - bombard the units (and city) at the tile.
 * any action listed in bombard_lethal_blocked_by must be impossible
 * actor must be on a tile next to the target or, if
   bombard_lethal_max_range allows it, further away.
 * can kill target units
 * actor must have a bombard_rate > 0
 * actor must have an attack > 0
 * target owner must be at war with actor. (!)
 * if target tile is fully seen, it must have reachable units

"Bombard Lethal 2" - bombard the units (and city) at the tile.
 * any action listed in bombard_lethal_2_blocked_by must be impossible
 * actor must be on a tile next to the target or, if
   bombard_lethal_2_max_range allows it, further away.
 * See "Bombard Lethal" for everything else.

"Attack"
 * any action listed in attack_blocked_by must be impossible
 * forced actions after success can be set with
   attack_post_success_forced_actions
 * the actor must be on the tile next to the target.
 * the actor's attack must be above 0
 * the actor can't have the "NonMil" unit type flag (!)
 * the actor must be native to the target tile unless it has the
   "AttackNonNative" unit class flag and not the "Only_Native_Attack" unit
   type flag.
 * the target tile has no non enemy units, or actor is Flagless
 * the target tile has no non enemy city.
 * one or all (unreachableprotects) non transported units at the target
   tile must be reachable. A unit is reachable if any of the following is
   true:
   - it doesn't have the "Unreachable" unit class flag
   - it is listed in the actor unit's targets
   - it is in a city
   - it is on a tile with a native Extra

"Attack 2"
 * any action listed in attack_2_blocked_by must be impossible
 * forced actions after success can be set with
   attack_2_post_success_forced_actions
 * See "Attack" for everything else.

"Suicide Attack"
 * any action listed in suicide_attack_blocked_by must be impossible
 * spends the actor unit
 * the actor must be on the tile next to the target.
 * the actor's attack must be above 0
 * the actor can't have the "NonMil" unit type flag (!)
 * the actor must be native to the target tile unless it has the
   "AttackNonNative" unit class flag and not the "Only_Native_Attack" unit
   type flag.
 * the target tile has no non enemy units, or actor is Flagless
 * the target tile has no non enemy city.
 * one or all (unreachableprotects) non transported units at the target
   tile must be reachable. A unit is reachable if any of the following is
   true:
   - it doesn't have the "Unreachable" unit class flag
   - it is listed in the actor unit's targets
   - it is in a city
   - it is on a tile with a native Extra

"Suicide Attack 2"
 * any action listed in suicide_attack_2_blocked_by must be impossible
 * See "Suicide Attack" for everything else.

"Wipe Units"
 * any action listed in wipe_units_blocked_by must be impossible
 * forced actions after success can be set with
   wipe_units_post_success_forced_actions
 * the actor must be on the tile next to the target.
 * the actor's attack must be above 0
 * the actor can't have the "NonMil" unit type flag (!)
 * the actor must be native to the target tile unless it has the
   "AttackNonNative" unit class flag and not the "Only_Native_Attack" unit
   type flag.
 * the target tile has no non enemy units, or actor is Flagless
 * the target tile has no non enemy city.
 * the target tile has no units with positive defense strength
 * all units at the target tile must be reachable.
   A unit is reachable if any of the following is true:
   - it doesn't have the "Unreachable" unit class flag
   - it is listed in the actor unit's targets
   - it is in a city
   - it is on a tile with a native Extra

"Collect Ransom"
 * any action listed in collect_ransom_blocked_by must be impossible
 * forced actions after success can be set with
   collect_ransom_post_success_forced_actions
 * the actor must be on the tile next to the target.
 * the actor's attack must be above 0
 * the actor can't have the "NonMil" unit type flag (!)
 * the actor must be native to the target tile unless it has the
   "AttackNonNative" unit class flag and not the "Only_Native_Attack" unit
   type flag.
 * the target tile has no non enemy units. (!)
 * the target tile has no non enemy city.
 * the target must be barbarian
 * the actor must have "CollectRansom" unit class flag
 * one or all (unreachableprotects) non transported units at the target
   tile must be reachable. A unit is reachable if any of the following is
   true:
   - it doesn't have the "Unreachable" unit class flag
   - it is listed in the actor unit's targets
   - it is in a city
   - it is on a tile with a native Extra

"Nuke Units" - Detonate at the target unit stack. Cause a nuclear explosion.
 * set if the actor unit is spent with nuke_units_consuming_always
 * any action listed in nuke_units_blocked_by must be impossible
 * the range of legal distance between actor unit and target the actor units
   must be between nuke_units_min_range and nuke_units_max_range
 * the actor must be native to the target tile unless it has the
   "AttackNonNative" unit class flag and not the "Only_Native_Attack" unit
   type flag.
 * one or all (unreachableprotects) non transported units at the target
   tile must be reachable. A unit is reachable if any of the following is
   true:
   - it doesn't have the "Unreachable" unit class flag
   - it is listed in the actor unit's targets
   - it is in a city
   - it is on a tile with a native Extra
 * Blast radius can be set with Nuke_Blast_Radius_1_Sq

"Spy Attack" - trigger a diplomatic battle to eliminate tile defenders.
 * the actor must be on the tile next to the target.
 * the target tile must have at least 1 diplomatic defender.

Actions done by a unit against a tile
=====================================
"Found City" - Found a city at the target tile.
 * set if the actor unit is spent with found_city_consuming_always
 * city name must be legal
 * the scenario setting prevent_new_cities must be false.
 * actor must be on the same tile as the target.
 * target must not have the NoCities terrain flag. (!)
 * target must not be closer than citymindist to nearest city.

"Explode Nuclear" - Detonate at the target tile. Cause a nuclear explosion.
 * set if the actor unit is spent with explode_nuclear_consuming_always
 * target kind can be changed with explode_nuclear_target_kind
 * any action listed in explode_nuclear_blocked_by must be impossible
 * the range of legal distance between actor unit and target the actor units
   must be between explode_nuclear_min_range and explode_nuclear_max_range
 * Blast radius can be set with Nuke_Blast_Radius_1_Sq

"Nuke City" - Detonate at the target tile. Cause a nuclear explosion.
 * set if the actor unit is spent with nuke_city_consuming_always
 * target kind can be changed with nuke_city_target_kind
 * any action listed in nuke_city_blocked_by must be impossible
 * the range of legal distance between actor unit and target the actor units
   must be between nuke_city_min_range and nuke_city_max_range
 * Blast radius can be set with Nuke_Blast_Radius_1_Sq

"Paradrop Unit" - move the actor unit to the target tile.
 * kills the actor unit if the target tile has a terrain type the actor unit
   can't exist on and - if paradrop_to_transport is set - it couldn't load
   into a transport at the target tile.
 * kills the actor unit if the target tile has a non-allied unit
 * kills the actor unit if the target tile has a non-allied city
 * the distance between actor and target is from 1 to paratroopers_range
 * the actor unit hasn't paradropped this turn
 * the actor unit isn't transporting another unit (!)
 * the actor unit can't be diplomatically forbidden from entering the target
   tile. (!)
 * the target tile is known (doesn't have to be seen) by the actor
 * if the target tile is seen:
   - the actor unit must be able to exist outside a transport on the target
     tile if the target tile doesn't have a visible transport the actor unit
     is able to load into on landing
   - the target tile can't contain a city belonging to a player the actor
     has peace, cease-fire or armistice with.
   - the target tile can't contain any seen unit belonging to a player the
     actor player has peace, cease-fire or armistice with.

"Paradrop Unit Conquer" - move the actor unit to the target tile.
 * kills the actor unit if the target tile has a terrain type the actor unit
   can't exist on and - if paradrop_to_transport is set - it couldn't load
   into a transport at the target tile.
 * kills the actor unit if the target tile has a non-allied unit
 * can result in the conquest of the city at the target tile
   if the target tile has a city
 * can result in the conquest of the extras at the target tile if
   one of the extras at the target tile claims territory and is native to
   the actor unit.
 * the distance between actor and target is from 1 to paratroopers_range
 * the actor unit hasn't paradropped this turn
 * the actor unit isn't transporting another unit (!)
 * the actor unit can't be diplomatically forbidden from entering the target
   tile. (!)
 * the actor unit doesn't have the NonMil unit type flag unless the target
   tile doesn't have a city. (!)
 * the actor unit has the CanOccupyCity unit class flag unless the target
   tile doesn't have a city. (!)
 * the actor owner must be at war with the target owner unless the target
   tile doesn't have a city. (!)
 * the actor owner can't be an animal unless the target tile doesn't have a
   city. (!)
 * the target tile is foreign or unclaimed. (!)
 * the target tile is known (doesn't have to be seen) by the actor
 * if the target tile is seen:
   - the actor unit must be able to exist outside a transport on the target
     tile if the target tile doesn't have a visible transport the actor unit
     is able to load into on landing
   - the target tile can't contain a city belonging to a player the actor
     has peace, cease-fire or armistice with.
   - the target tile can't contain any seen unit belonging to a player the
     actor player has peace, cease-fire or armistice with.

"Paradrop Unit Frighten" - move the actor unit to the target tile.
 * kills the actor unit if the target tile has a terrain type the actor unit
   can't exist on and - if paradrop_to_transport is set - it couldn't load
   into a transport at the target tile.
 * kills the actor unit if the target tile has a non-allied unit
 * kills the actor unit if the target tile has a non-allied city
 * can result in hut frightening if
   - the target tile has an extra with "Enter" in its rmcauses (a Hut)
   - the target tile's Hut's rmreqs are fulfilled
 * the distance between actor and target is from 1 to paratroopers_range
 * the actor unit hasn't paradropped this turn
 * the actor unit isn't transporting another unit (!)
 * the actor unit can't be diplomatically forbidden from entering the target
   tile. (!)
 * the actor unit has the unit class flag "HutFrighten" (!)
 * the target tile is known (doesn't have to be seen) by the actor
 * if the target tile is seen:
   - the actor unit must be able to exist outside a transport on the target
     tile if the target tile doesn't have a visible transport the actor unit
     is able to load into on landing
   - the target tile can't contain a city belonging to a player the actor
     has peace, cease-fire or armistice with.
   - the target tile can't contain any seen unit belonging to a player the
     actor player has peace, cease-fire or armistice with.

"Paradrop Unit Frighten Conquer" - move the actor unit to the target tile.
 * kills the actor unit if the target tile has a terrain type the actor unit
   can't exist on and - if paradrop_to_transport is set - it couldn't load
   into a transport at the target tile.
 * kills the actor unit if the target tile has a non-allied unit
 * can result in the conquest of the city at the target tile
   if the target tile has a city
 * can result in the conquest of the extras at the target tile if
   one of the extras at the target tile claims territory and is native to
   the actor unit.
 * can result in hut frightening if
   - the target tile has an extra with "Enter" in its rmcauses (a Hut)
   - the target tile's Hut's rmreqs are fulfilled
 * the distance between actor and target is from 1 to paratroopers_range
 * the actor unit hasn't paradropped this turn
 * the actor unit isn't transporting another unit (!)
 * the actor unit can't be diplomatically forbidden from entering the target
   tile. (!)
 * the actor unit has the unit class flag "HutFrighten" (!)
 * the actor unit doesn't have the NonMil unit type flag unless the target
   tile doesn't have a city. (!)
 * the actor unit has the CanOccupyCity unit class flag unless the target
   tile doesn't have a city. (!)
 * the actor owner must be at war with the target owner unless the target
   tile doesn't have a city. (!)
 * the actor owner can't be an animal unless the target tile doesn't have a
   city. (!)
 * the target tile is foreign or unclaimed. (!)
 * the target tile is known (doesn't have to be seen) by the actor
 * if the target tile is seen:
   - the actor unit must be able to exist outside a transport on the target
     tile if the target tile doesn't have a visible transport the actor unit
     is able to load into on landing
   - the target tile can't contain a city belonging to a player the actor
     has peace, cease-fire or armistice with.
   - the target tile can't contain any seen unit belonging to a player the
     actor player has peace, cease-fire or armistice with.

"Paradrop Unit Enter" - move the actor unit to the target tile.
 * kills the actor unit if the target tile has a terrain type the actor unit
   can't exist on and - if paradrop_to_transport is set - it couldn't load
   into a transport at the target tile.
 * kills the actor unit if the target tile has a non-allied unit
 * kills the actor unit if the target tile has a non-allied city
 * can result in hut entry if
   - the target tile has an extra with "Enter" in its rmcauses (a Hut)
   - the target tile's Hut's rmreqs are fulfilled
 * the distance between actor and target is from 1 to paratroopers_range
 * the actor unit hasn't paradropped this turn
 * the actor unit isn't transporting another unit (!)
 * the actor unit can't be diplomatically forbidden from entering the target
   tile. (!)
 * the target tile is known (doesn't have to be seen) by the actor
 * if the target tile is seen:
   - the actor unit must be able to exist outside a transport on the target
     tile if the target tile doesn't have a visible transport the actor unit
     is able to load into on landing
   - the target tile can't contain a city belonging to a player the actor
     has peace, cease-fire or armistice with.
   - the target tile can't contain any seen unit belonging to a player the
     actor player has peace, cease-fire or armistice with.

"Paradrop Unit Enter Conquer" - move the actor unit to the target tile.
 * kills the actor unit if the target tile has a terrain type the actor unit
   can't exist on and - if paradrop_to_transport is set - it couldn't load
   into a transport at the target tile.
 * kills the actor unit if the target tile has a non-allied unit
 * can result in the conquest of the city at the target tile
   if the target tile has a city
 * can result in the conquest of the extras at the target tile if
   one of the extras at the target tile claims territory and is native to
   the actor unit.
 * can result in hut entry if
   - the target tile has an extra with "Enter" in its rmcauses (a Hut)
   - the target tile's Hut's rmreqs are fulfilled
 * the distance between actor and target is from 1 to paratroopers_range
 * the actor unit hasn't paradropped this turn
 * the actor unit isn't transporting another unit (!)
 * the actor unit can't be diplomatically forbidden from entering the target
   tile. (!)
 * the actor unit doesn't have the NonMil unit type flag unless the target
   tile doesn't have a city. (!)
 * the actor unit has the CanOccupyCity unit class flag unless the target
   tile doesn't have a city. (!)
 * the actor owner must be at war with the target owner unless the target
   tile doesn't have a city. (!)
 * the actor owner can't be an animal unless the target tile doesn't have a
   city. (!)
 * the target tile is foreign or unclaimed. (!)
 * the target tile is known (doesn't have to be seen) by the actor
 * if the target tile is seen:
   - the actor unit must be able to exist outside a transport on the target
     tile if the target tile doesn't have a visible transport the actor unit
     is able to load into on landing
   - the target tile can't contain a city belonging to a player the actor
     has peace, cease-fire or armistice with.
   - the target tile can't contain any seen unit belonging to a player the
     actor player has peace, cease-fire or armistice with.

"Transform Terrain" - Transform tile terrain type.
 * the actor unit has "Workers" flag (!)
 * terrain type must be one that can be transformed

"Transform Terrain 2" - Transform tile terrain type.
 * See "Transform Terrain" for everything else.

"Cultivate"         - Transform tile terrain type by cultivating
 * the actor unit has "Workers" flag (!)
 * terrain type must be one that can be cultivated

"Cultivate 2"       - Transform tile terrain type by cultivating
 * See "Cultivate" for everything else.

"Plant"             - Transform tile terrain type by planting
 * the actor unit has "Workers" flag (!)
 * terrain type must be one on which units can plant

"Plant 2"           - Transform tile terrain type by planting
 * See "Plant" for everything else.

"Pillage"           - Pillage extra from tile
 * target kind can be changed with pillage_target_kind
 * terrain type must be one where pillaging is possible
 * the target extra must be present at the target tile
 * the terrain of the target tile must have a non 0 pillage_time
 * no other unit can be pillaging the target extra
 * the target extra must have the Pillage removal cause
 * the target extra's rmreqs must be fulfilled
 * the target extra can't be a dependency of another extra present at the
   target tile
 * the target extra can't have the AlwaysOnCityCenter extra flag if the
   target tile has a city
 * the target extra can't have the AutoOnCityCenter extra flag if the
   target tile has a city and the city's owner can rebuild it
 * the target extra must be the rule chosen extra if the civstyle section's
   pillage_select is FALSE

"Pillage 2"         - Pillage extra from tile
 * target kind can be changed with pillage_2_target_kind
 ** See "Pillage" for everything else.

"Clean"             - Clean extra from the target tile.
 * actor must be on the same tile as the target.
 * the actor unit has the "Workers" unit type flag (!)
 * the target extra must be present at the target tile
 * the terrain of the target tile must have a non 0 clean_pollution_time
   or non 0 clean_fallout_time, depending on the removal cause
   of the extra
 * the target extra must have the Clean removal cause
 * the target extra's rmreqs must be fulfilled
 * the target extra can't have the AlwaysOnCityCenter extra flag if the
   target tile has a city
 * the target extra can't have the AutoOnCityCenter extra flag if the
   target tile has a city and the city's owner can rebuild it

"Clean 2"           - Clean extra from the target tile.
 * See "Clean" for everything else.

"Build Road"        - Build road at the target tile.
 * actor must be on the same tile as the target.
 * the actor unit has the "Workers" unit type flag (!)
 * the target tile can't have an extra that the target extra must bridge
   over (see extra type's bridged_over) unless the actor player knows a
   tech with the "Bridge" tech flag
 * the target extra (the extra to be built) is an road
 * the target tile doesn't already have the target extra
 * the target extra is buildable (see extra type's buildable)
 * the target tile's terrain's road_time is above 0 (!)
 * if the target extra is both a road and a base the target tile's terrain's
   base_time isn't 0
 * if the target extra is both a road and a base the target extra can't
   claim land (see base type's border_sq) if the target tile has a city
 * to begin a road the build requirements of the target road (see road
   type's first_reqs) must be fulfilled. Building a road when no (cardinal)
   adjacent tile has the target extra is considered beginning it.
 * the build requirements of the target extra (see extra type's reqs) must
   be fulfilled

"Build Road 2"        - Build road at the target tile.
 * See "Build Road" for everything else.

"Build Base"        - Build base at the target tile.
 * the actor unit has the "Workers" unit type flag (!)
 * the target tile can't have an extra that the target extra must bridge
   over (see extra type's bridged_over) unless the actor player knows a
   tech with the "Bridge" tech flag
 * the target extra (the extra to be built) is an base
 * the target tile doesn't already have the target extra
 * the target extra is buildable (see extra type's buildable)
 * the target tile's terrain's base_time is above 0 (!)
 * the target extra can't claim land (see base type's border_sq) if the
   target tile has a city
 * if the target extra is both a road and a base the target tile's terrain's
   road_time isn't 0
 * the build requirements of the target extra (see extra type's reqs) must
   be fulfilled

"Build Base 2"        - Build base at the target tile.
 * See "Build Base" for everything else.

"Build Mine"        - Build mine at the target tile.
 * actor must be on the same tile as the target.
 * the actor unit has the "Workers" unit type flag (!)
 * the target tile can't have an extra that the target extra must bridge
   over (see extra type's bridged_over) unless the actor player knows a
   tech with the "Bridge" tech flag
 * the target extra (the extra to be built) is a mine
 * the target tile doesn't already have the target extra
 * the target extra is buildable (see extra type's buildable)
 * the target tile's terrain's mining_time is above 0 (!)
 * if the target extra is both a mine and a base the target tile's terrain's
   base_time isn't 0
 * if the target extra is both a mine and a base the target extra can't
   claim land (see base type's border_sq) if the target tile has a city
 * if the target extra is both a mine and a road the target tile's terrain's
   road_time isn't 0
 * the build requirements of the target extra (see extra type's reqs) must
   be fulfilled

"Build Mine 2"        - Build mine at the target tile.
 * See "Build Mine" for everything else.

"Build Irrigation"  - Build irrigation at the target tile.
 * actor must be on the same tile as the target.
 * the actor unit has the "Workers" unit type flag (!)
 * the target tile can't have an extra that the target extra must bridge
   over (see extra type's bridged_over) unless the actor player knows a
   tech with the "Bridge" tech flag
 * the target extra (the extra to be built) is an irrigation
 * the target tile doesn't already have the target extra
 * the target extra is buildable (see extra type's buildable)
 * the target tile's terrain's irrigation_time is above 0 (!)
 * if the target extra is both an irrigation and a base the target tile's
   terrain's base_time isn't 0
 * if the target extra is both an irrigation and a base the target extra
   can't claim land (see base type's border_sq) if the target tile has a
   city
 * if the target extra is both an irrigation and a road the target tile's
   terrain's road_time isn't 0
 * the build requirements of the target extra (see extra type's reqs) must
   be fulfilled

"Build Irrigation 2"  - Build irrigation at the target tile.
 * See "Build Irrigation" for everything else.

"Transport Disembark" - Exit transport to target tile.
* the actor unit must be on a tile next to the target.
* the actor unit has at least one move fragment left (!)
* actor must be transported (!)
* the actor unit's transport must be in a city or in a native base if the
  transport's unit class has the Unreachable unit class flag and the
  actor's unit type doesn't list the target's unit class in disembarks.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* actor unit must be able to exist outside of a transport at the target
  tile.
* actor unit must be able to move to the target tile.
* the target tile isn't blocked for the actor unit by some other unit's
  zone of control (ZOC)
* the target tile can't contain any city or units not allied to the actor
  unit and all its cargo.

"Transport Disembark 2" - Exit transport to target tile.
* A copy of "Transport Disembark".
* See "Transport Disembark" for everything else.

"Transport Disembark 3" - Exit transport to target tile.
* A copy of "Transport Disembark".
* See "Transport Disembark" for everything else.

"Transport Disembark 4" - Exit transport to target tile.
* A copy of "Transport Disembark".
* See "Transport Disembark" for everything else.

"Enter Hut" - Enter a Hut, destroying it in the process.
* the actor unit must be on a tile next to the target.
* the actor unit has at least one move fragment left (!)
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to move to the target tile.
* the actor unit's current transport, if the actor unit is transported,
  must be in a city or in a base native to the current transport if the
  current transport's unit class has the Unreachable unit class flag and
  the actor's unit type doesn't list the current transport's unit class in
  disembarks.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the target tile has an extra with "Enter" in its rmcauses (a Hut)
* the target tile's Hut's rmreqs must be fulfilled
* the target tile can't contain any city or units not allied to the actor
  unit and all its cargo.
* the target tile isn't blocked for the actor unit by some other unit's
  zone of control (ZOC)

"Enter Hut 2" - Enter a Hut, destroying it in the process.
* A copy of "Enter Hut"
* See "Enter Hut" for everything else.

"Enter Hut 3" - Enter a Hut, destroying it in the process.
* A copy of "Enter Hut"
* See "Enter Hut" for everything else.

"Enter Hut 4" - Enter a Hut, destroying it in the process.
* A copy of "Enter Hut"
* See "Enter Hut" for everything else.

"Frighten Hut" - Frighten a Hut, destroying it in the process.
* the actor unit must be on a tile next to the target.
* the actor unit has the unit class flag "HutFrighten" (!)
* the actor unit has at least one move fragment left (!)
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to move to the target tile.
* the actor unit's current transport, if the actor unit is transported,
  must be in a city or in a base native to the current transport if the
  current transport's unit class has the Unreachable unit class flag and
  the actor's unit type doesn't list the current transport's unit class in
  disembarks.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the target tile has an extra with "Enter" in its rmcauses (a Hut)
* the target tile's Hut's rmreqs must be fulfilled
* the target tile can't contain any city or units not allied to the actor
  unit and all its cargo.
* the target tile isn't blocked for the actor unit by some other unit's
  zone of control (ZOC)

"Frighten Hut 2" - Frighten a Hut, destroying it in the process.
* A copy of "Frighten Hut"
* See "Frighten Hut" for everything else.

"Frighten Hut 3" - Frighten a Hut, destroying it in the process.
* A copy of "Frighten Hut"
* See "Frighten Hut" for everything else.

"Frighten Hut 4" - Frighten a Hut, destroying it in the process.
* A copy of "Frighten Hut"
* See "Frighten Hut" for everything else.

"Unit Move" - a regular move to the target tile.
* any action listed in move_blocked_by must be impossible
* the actor unit must be on a tile next to the target.
* the actor unit has at least one move fragment left (!)
* the actor unit may not be transported (!)
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the target tile can't contain any city or units not allied to the actor
  unit and all its cargo.
* the target tile isn't blocked for the actor unit by some other unit's
  zone of control (ZOC)

"Unit Move 2" - a regular move to the target tile.
* any action listed in move_2_blocked_by must be impossible
* A copy of "Unit Move"
* See "Unit Move" for everything else.

"Unit Move 3" - a regular move to the target tile.
* any action listed in move_3_blocked_by must be impossible
* A copy of "Unit Move"
* See "Unit Move" for everything else.

"Teleport" - teleport unit to the target tile.
* any action listed in teleport_blocked_by must be impossible
* the range of legal distance between actor unit and target tile
  must be between teleport_min_range and teleport_max_range
* the actor unit may not be transported (!)
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the target tile can't contain any city or units not allied to the actor
  unit and all its cargo.

"Teleport 2" - teleport unit to the target tile.
* any action listed in teleport_2_blocked_by must be impossible
* the range of legal distance between actor unit and target tile
  must be between teleport_2_min_range and teleport_2_max_range
* See "Teleport" for everything else.

"Teleport 3" - teleport unit to the target tile.
* any action listed in teleport_3_blocked_by must be impossible
* the range of legal distance between actor unit and target tile
  must be between teleport_3_min_range and teleport_3_max_range
* See "Teleport" for everything else.

"Teleport Conquer" - teleport unit to the target tile and conquer it
* any action listed in teleport_conquer_blocked_by must be impossible
* the range of legal distance between actor unit and target tile
  must be between teleport_conquer_min_range and teleport_conquer_max_range
* the actor unit may not be transported (!)
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the target tile can't contain any units not allied to the actor
  unit and all its cargo.

"Teleport Frighten" - teleport unit to the target tile.
* any action listed in teleport_frighten_blocked_by must be impossible
* the range of legal distance between actor unit and target tile
  must be between teleport_frighten_min_range and teleport_frighten_max_range
* the actor unit may not be transported (!)
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the target tile can't contain any city or units not allied to the actor
  unit and all its cargo.
* can result in hut frightening if
   - the target tile has an extra with "Enter" in its rmcauses (a Hut)
   - the target tile's Hut's rmreqs are fulfilled

"Teleport Frighten Conquer" - teleport unit to the target tile and conquer it
* any action listed in teleport_frighten_conquer_blocked_by must be impossible
* the range of legal distance between actor unit and target tile
  must be between teleport_frighten_conquer_min_range and
  teleport_frighten_conquer_max_range
* the actor unit may not be transported (!)
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the target tile can't contain any units not allied to the actor
  unit and all its cargo.
* can result in hut frightening if
   - the target tile has an extra with "Enter" in its rmcauses (a Hut)
   - the target tile's Hut's rmreqs are fulfilled

"Teleport Enter" - teleport unit to the target tile.
* any action listed in teleport_enter_blocked_by must be impossible
* the range of legal distance between actor unit and target tile
  must be between teleport_enter_min_range and teleport_enter_max_range
* the actor unit may not be transported (!)
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the target tile can't contain any city or units not allied to the actor
  unit and all its cargo.
* can result in hut entry if
   - the target tile has an extra with "Enter" in its rmcauses (a Hut)
   - the target tile's Hut's rmreqs are fulfilled

"Teleport Enter Conquer" - teleport unit to the target tile and conquer it
* any action listed in teleport_enter_conquer_blocked_by must be impossible
* the range of legal distance between actor unit and target tile
  must be between teleport_enter_conquer_min_range and
  teleport_enter_conquer_max_range
* the actor unit may not be transported (!)
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the target tile can't contain any units not allied to the actor
  unit and all its cargo.
* can result in hut entry if
   - the target tile has an extra with "Enter" in its rmcauses (a Hut)
   - the target tile's Hut's rmreqs are fulfilled

Actions done by a unit against all extras at a tile
===================================================
"Conquer Extras" - Claim ownership of an extra.
* the actor unit must be on a tile next to the target.
* the actor unit has at least one move fragment left (!)
* the actor unit's current transport, if the actor unit is transported,
  must be in a city or in a base native to the current transport if the
  current transport's unit class has the Unreachable unit class flag and
  the actor's unit type doesn't list the current transport's unit class in
  disembarks.
* the actor unit must be able to move to the target tile.
* the actor unit's type must be the target tile's terrain animal if the
  player's nation is an animal barbarian.
* the actor unit must be able to exist outside of a transport at the target
  tile.
* the actor unit can't be diplomatically forbidden from entering the target
  tile.
* the actor unit doesn't have the "CoastStrict" unit type flag or the
  target tile is on or adjacent to a tile that doesn't have the
  "UnsafeCoast" terrain flag.
* one of the target extras must claim territory and be native to the actor
  unit.
* the target tile can't contain any city or units not allied to the actor
  unit.
* the target tile isn't blocked for the actor unit by some other unit's
  zone of control (ZOC)

"Conquer Extras 2" - Claim ownership of an extra.
* A copy of "Conquer Extras"
* See "Conquer Extras" for everything else.

"Conquer Extras 3" - Claim ownership of an extra.
* A copy of "Conquer Extras"
* See "Conquer Extras" for everything else.

"Conquer Extras 4" - Claim ownership of an extra.
* A copy of "Conquer Extras"
* See "Conquer Extras" for everything else.

Actions done by a unit to it self
=================================
"Disband Unit" - Disband the unit.
 * spends the actor unit
   - gives nothing in return. No shields spent to build the unit is added
     to the shield stock of any city even if the unit is located inside it.
 * "Help Wonder" must be impossible
 * "Disband Unit Recover" must be impossible

"Fortify"           - Fortify at tile
 * the actor unit can't already be fortified (!)

"Fortify 2"         - Fortify at tile
 * See "Fortify" for everything else.

"Convert Unit" - Convert the unit to another unit type.
 * actor unit must have a type to convert to (convert_to).
 * actor unit's converted form must be able to exist at its current
   location.
 * actor unit's converted form must have room for its current cargo.

"Unit Make Homeless" - unhome the actor unit.
 * the actor unit must have a home city. (!)

Internal actions
================

"Gain Veterancy" - unit can get new veterancy levels
 * Unit's veterancy system must have veterancy levels for the unit
   to advance to.

"Finish Unit" - city can finish building a unit

"Finish Building" - city can finish building a building

Ruleset defined actions
=======================
User actions are "blank". The ruleset does everything they do. The following
ruleset variables allows user action number n to be further customized:
 * user_action_n_target_kind
   The kind of target the action is done to. See target_reqs.
   Legal values: "City", "Unit", "Stack", "Tile" or "Self"
 * user_action_n_min_range and user_action_n_max_range
   What distance from the actor to the target is permitted for the action.
 * user_action_n_actor_consuming_always
   TRUE if Freeciv should make sure that the actor is spent after the action
   is successfully done.

The current ruleset defined actions are "User Action 1", "User Action 2",
"User Action 3", and "User Action 4".
