First, I tried to turn T_ASSUME_FORM into an instant action. "no_energy = true" didn't seem to work, neither did cribbing "no_energy = true" + energy reset from T_QUICK_SHOT, nor did setting the speedtype to special_combat (used elsewhere). So how can a skill be defined as an instant action?
Second, I tried to change the range of T_POSSESS from a fixed value to a talent level driven value (cribbing the method from other skills). Changes to the range value appear to be being ignored/overwritten and I do not know why. Even setting the value to a different number doesn't affect the range in-game.
New range setting:
Code: Select all
TD.T_POSSESS.Range = function(self, t) return 3 + math.floor(self:getTalentLevel(t) * 0.5 - 0.5) end
Original code:
Code: Select all
info = function(self, t)
local fake = {rank=2}
local rt0, rc0 = self.TextRank(fake)
fake.rank = 3; local rt3, rc3 = self.TextRank(fake)
fake.rank = 3.5; local rt5, rc5 = self.TextRank(fake)
fake.rank = 4; local rt7, rc7 = self.TextRank(fake)
return ([[You cast a psionic web at a target that lasts for %d turns. Each turn it deals %0.2f mind damage.
If the target dies with the web in place you will capture its body and store it in a hidden psionic reserve.
At any further time you can use the Assume Form talent to temporarily shed your own body and assume your new form, strengths and weaknesses both.
You may only use this power if you have room for a new body in your storage.
You may only steal the body of creatures of the following rank %s%s#LAST# or lower.
At level 3 up to rank %s%s#LAST#.
At level 5 up to rank %s%s#LAST#.
At level 7 up to rank %s%s#LAST#.
You may only steal the body of creatures of the following types: #LIGHT_BLUE#%s#LAST#
When you try to possess a creature of a different type you may learn this type permanently, you can do that %d more times.]]):
format(
t.getDur(self, t), damDesc(self, DamageType.MIND, t.getDamage(self, t)),
rc0, rt0, rc3, rt3, rc5, rt5, rc7, rt7,
table.concat(table.append({"humanoid", "animal"}, table.keys(self.possess_allowed_extra_types or {})), ", "), t.allowedTypesExtraNb(self, t)
)
end,
New Code:
Code: Select all
TD.T_POSSESS.info = function(self, t)
local fake = {rank=2}
local rt0, rc0 = self.TextRank(fake)
fake.rank = 3; local rt3, rc3 = self.TextRank(fake)
fake.rank = 3.5; local rt5, rc5 = self.TextRank(fake)
fake.rank = 4; local rt7, rc7 = self.TextRank(fake)
return ([[You cast a psionic web at a target that lasts for %d turns. Each turn it deals %0.2f mind damage.
If the target dies with the web in place you will capture its body and store it in a hidden psionic reserve.
At any further time you can use the Assume Form talent to temporarily shed your own body and assume your new form, strengths and weaknesses both.
You may only use this power if you have room for a new body in your storage.
You may only steal the body of creatures of the following rank %s%s#LAST# or lower.
At level 3 up to rank %s%s#LAST#.
At level 5 up to rank %s%s#LAST#.
At level 7 up to rank %s%s#LAST#.]]):
format(
t.getDur(self, t), damDesc(self, DamageType.MIND, t.getDamage(self, t)),
rc0, rt0, rc3, rt3, rc5, rt5, rc7, rt7
)
end