From a3a219650439acb8f84ce0a955993dad89da3710 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 19 Jun 2017 23:21:01 -0400 Subject: [PATCH] Use WFL for teleport ability to avoid requiring delayed variable substitution --- data/core/macros/abilities.cfg | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/data/core/macros/abilities.cfg b/data/core/macros/abilities.cfg index b0bbd4041a8a..115daf311531 100644 --- a/data/core/macros/abilities.cfg +++ b/data/core/macros/abilities.cfg @@ -203,23 +203,16 @@ Any units adjacent to this unit will fight as if it were dusk when it is night, id=village_teleport [source] terrain=*^V* - owner_side=$teleport_unit.side - [not] - [filter] - [not] - id=$teleport_unit.id - [/not] - [/filter] - [/not] + formula=" + owner = teleport_unit.side and (unit = teleport_unit or not unit) + where + unit = unit_at(x, y) + " [/source] [target] terrain=*^V* - owner_side=$teleport_unit.side - [not] - [filter] - [/filter] - [/not] + formula="owner = teleport_unit.side and not unit_at(x, y)" [/target] [filter]