Tíquete #41730

Lua API: allow setting move side effects

: 2021-03-11 08:43 Última Atualização: 2021-03-12 21:33

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Accepted
Arquivo:
1

Details

The Lua API allows moving a unit without considering what the move rules are via edit.unit_move() and edit.unit_teleport(). This can be used to create custom move actions, teleporting items on the map etc. They have side effects that used to be a part of regular moves but that now live in separate actions.

Add parameters to control what side effects not a part of enabler controlled moves the move should have. This allows the ability to specify a unit to embark to, to determine if a unit is allowed to unload from its current transport to perform the move, if any city at the target tile is conquered, if any extra at the target tile is conquered, if huts at the target tile are entered or frightened.

The old versions of edit.unit_move() and edit.unit_teleport() that infers side effects based on game rules and state can be deprecated as soon as enough of their old rules can be expressed in Lua.

Ticket History (3/4 Histories)

2021-03-11 08:43 Updated by: kvilhaugsvik
  • New Ticket "Lua API: allow setting move side effects" created
2021-03-11 08:45 Updated by: kvilhaugsvik
  • Resolução Update from Nenhum to Accepted
2021-03-12 21:33 Updated by: kvilhaugsvik
  • Estado Update from Aberto to Fechado

Editar

Please login to add comment to this ticket » Login