Yes you can use the generic formula:
power = base * (1 + 0.2*skill)
You can use the skill parameter in your spell instead of champion:getSkillLevel("fire_magic") because you already declared skill = "fire_magic" in the spell definition.
To call a function in an if statement is the same thing as anywhere else:
Code: Select all
if myScriptId.script.myTest() then ...
Now just to make things a little harder; what about special items like "shaman_staff" with gameEffect = "Earthbound (Poison spells deal 20% more damage)" or "zhandul_orb" with gameEffect = "Intense Fire (Fireball and Fireburst spells deal more damage)",?
So far I did not include such items in my mod, but it is also something to consider if you ever want to use them
Edit: also note that the skill parameter may be given by the power of a CastSpell component instead of the caster skill if cast from an item!