Code: Select all
newTalent{
shortname = 'MOUNTAINTROLLSKIN',
name = "Mountain Troll Skin",
type = {"race/mountaintroll", 3},
require = racial_req3,
mode = "passive",
points = 5,
no_energy = true,
getArmour = function(self, t) return self:getTalentLevelRaw(t) * 12 end,
tactical = { DEFEND = 2 },
action = function(self, t)
self:addTemporaryValue("combat_armour", t.getArmour(self, t))
self:addTemporaryValue("combat_armour_hardiness", t.getArmour(self, t))
return true
end,
on_learn = function(self, t)
if self:getTalentLevelRaw(t) >= 5 then
self.size_category = self.size_category + 2
else
if self:getTalentLevelRaw(t) >= 3 then
self.size_category = self.size_category + 1
end
end
end,
on_unlearn = function(self, t)
if self:getTalentLevelRaw(t) == 4 then
self.size_category = self.size_category - 1
end
if self:getTalentLevelRaw(t) == 2 then
self.size_category = self.size_category - 1
end
end,
info = function(self, t)
local armour = t.getArmour(self, t);
return ([[Mountain Troll-skin is extremely hard and resistant to physical effects (+%d%% armour and %d%% armour hardiness). On talent level 3 and 5, your size will increase by 1.]]):format(armour, armour)
end,
}
It must be something simple? Any hints?
Thanks!