Weird energy interaction..
Posted: Sun Jun 08, 2014 12:24 am
I'm in the middle of trying to rework anomalies and I've come across a hangup.
The issue is that I want to interrupt the anomaly code with a getTarget call. When getTarget is called an extra turn is used.
If I comment out that second line everything runs fine and uses the appropriate amount of energy (talents fail to run, anomalies go, self:useEnergy() is called in the anomaly code).
These talents are forceUse and {ignore_energy=true}. The only thing I can think is that the talent coroutine is getting interrupted by the getTarget call somehow. All of this is getting called from preUseTalent similar to how it is in head. I've tried setting it to game:onTickEnd and it doesn't seem to help.
Does anyone have any ideas on what the problem is?
The issue is that I want to interrupt the anomaly code with a getTarget call. When getTarget is called an extra turn is used.
Code: Select all
if self:knowTalent(self.T_PULL_SKEIN) and rng.percent(self:callTalent(self.T_PULL_SKEIN, "getTargetChance")) then
x, y = self:getTarget(tg)
end
These talents are forceUse and {ignore_energy=true}. The only thing I can think is that the talent coroutine is getting interrupted by the getTarget call somehow. All of this is getting called from preUseTalent similar to how it is in head. I've tried setting it to game:onTickEnd and it doesn't seem to help.
Does anyone have any ideas on what the problem is?