This is the code I have right now for a class that should start with 1 on "armors" skill, and 1 on "shields" skill:
Code: Select all
defineTrait{
name = "knight",
uiName = "Knight",
icon = 97,
description = "As a knight you believe that good preparation is the key to triumph in combat. You are specialized in wielding armor and using the shield.",
gameEffect = [[
- Health 60 (+10 per level), Energy 30 (+3 per level)
- Weight of equipped armor is reduced by 50%.
- Add +1 to both your Armor and Shields skills at start.]],
onRecomputeStats = function(champion, level)
if level > 0 then
level = champion:getLevel()
champion:addStatModifier("max_health", 60 + (level-1) * 10)
champion:addStatModifier("max_energy", 30 + (level-1) * 3)
champion:trainSkill("armors",1)
champion:trainSkill("shields",1)
end
end,
}