I encountered a bug. I am making a Summoning-Spell and there for I was toying with the Stats. All the resistance-maxima will not change the maximum of the resistance.
I gave the Summoned thing maximum of 32 to all attributes and all resistances. Then set all Attributes to 32 and the resistance is 100.
To spare the hacking of the code:
SpoilerShow
Code: Select all
function smnGolem(caster,skill,golemtyp) --golemtyp not used yet
local freeSpot = getFreeSpot()
if(freeSpot) then
local golem = party:getChampion(1)
--setChampionToBuild(freeSpot,skill,golemtyp)
golem:setName("Stone Golem")
golem:setRace("Human")
golem:setSex("male")
golem:setClass("Fighter")
golem:setStatMax("health", 180)
golem:setStatMax("energy", 90)
golem:setStatMax("strength", 32)
golem:setStatMax("dexterity", 32)
golem:setStatMax("vitality", 32)
golem:setStatMax("willpower", 32)
golem:setStatMax("protection", 32)
golem:setStatMax("evasion", 32)
golem:setStatMax("resist_fire", 32)
golem:setStatMax("resist_cold", 32)
golem:setStatMax("resist_poison", 32)
golem:setStatMax("resist_shock", 32)
golem:setStat("health", 180)
golem:setStat("energy", 90)
golem:setStat("strength", 32)
golem:setStat("dexterity", 32)
golem:setStat("vitality", 32)
golem:setStat("willpower", 32)
party:getChampion(freeSpot):setEnabled(true)
else
hudPrint("Your party is full, there is no way.")
end
end