healing_flames.xml
<abilities>
<ability>
<name>Healing Flames</name>
<key>healing_flames</key>
<skill>pyromancy</skill>
<icon>healing_flames</icon>
<description>
Standing next to fire heals you.
[p]Each adjacent tile on fire grants +0.2 HP per turn.
</description>
<type>Passive</type>
<passiveInfo>
<triggers>
<triggers>
KEY healing_flames_1;
WHEN PlayerTurnStart;
THEN ModifyGlobalFlag -> global_flag:adjacent_fire_count, operation:set,
amount:{{Q:CountAdjacentFeature -> key:fire, target:player}};
</triggers>
<triggers>
KEY healing_flames_2;
WHEN PlayerTurnStart;
AND NumberCompare -> key:{{G:adjacent_fire_count}}, greater_than:0;
THEN ModifyGlobalFlag -> global_flag:adjacent_fire_count, operation:multiply, amount:0.2;
THEN GiveHealth -> amount:{{G:adjacent_fire_count}}, target:player;
THEN write_log -> text:{{adjacent_fire_count}} HP restored (Healing Flames)., type:combat;
</triggers>
</triggers>
</passiveInfo>
<unlockInfo>
<autoDiscover>0</autoDiscover>
<unlockRequirements>
<requiredPoints>2</requiredPoints>
<requires>focused_attunement</requires>
</unlockRequirements>
</unlockInfo>
</ability>
</abilities>