It's automatic in the engine so I dont need to think about it

Moderator: Moderator
Code: Select all
if self:checkHit(atk, def) then
local dam = dam - math.max(0, armor - apr)
local damrange = self:combatDamageRange(weapon)
dam = rng.range(dam, dam * damrange)
print("[ATTACK] after range", dam)
local crit
dam = dam * mult
dam, crit = self:physicalCrit(dam, weapon)
print("[ATTACK] after crit", dam)
if crit then game.logSeen(self, "%s performs a critical stike!", self.name:capitalize()) end
DamageType:get(damtype).projector(self, target.x, target.y, damtype, math.max(0, dam))
hitted = true
Code: Select all
[ATTACK] with nil to haxorz :: 1 1 9 :: 1
checkHit 4 35.5
=> chance to hit 5
[ATTACK] after range 2229810165
[ATTACK] after crit 2229810165
[LOG] Skeleton mage hits haxorz for #aaaaaa#2229810165.00 physical damage#ffffff#.
[LOG] Skeleton mage killed haxorz!
Lua Error: /mod/class/interface/Combat.lua:83: attempt to perform arithmetic on field 'energy_to_act' (a nil value)
At [C]:-1
At /mod/class/interface/Combat.lua:83
At (tail call):-1
At /mod/class/Actor.lua:223 attack
At /engine/interface/ActorLife.lua:21
At (tail call):-1
At /engine/Map.lua:318 checkAllEntities
At /engine/Actor.lua:49 move
At /mod/class/Actor.lua:104
At (tail call):-1
At (tail call):-1
At (tail call):-1
At /engine/ai//talented.lua:30
At (tail call):-1
At (tail call):-1
At /mod/class/NPC.lua:18 act
At /engine/GameEnergyBased.lua:44 tick
At /engine/GameTurnBased.lua:24 tick
At /mod/class/Game.lua:164
327 frames in 10.001 seconds = 32.6967 FPS
Cool... I did wonder!darkgod wrote:No they do, when I mean talent level, I really mean: talent_level * talent_mastery
It's automatic in the engine so I dont need to think about it
Warrior
Max out all skills: Level 47.
Includes the Knife Mastery requirement of Dexterity = 40
Includes the Health Requirement of Constitution = 40
Does not cater for equipment handling requirements
Rogue
Max out all Skill: Level 45
Includes Mace Mastery requirement of Strength = 44
Includes the Health Requirement of Constitution = 39
Does not cater for equipment handling requirements
It makes for interesting reading, the Mage has the most to learn, and is balanced by only really needing to up his Magic stat.Mage
Max out all Skill: Level 55
Includes School Mastery requirement of Magic = 40
Does not cater for equipment handling requirements
Code: Select all
[ATTACK] with nil to me not lame :: 1 1 16 :: 1
checkHit 4 16.7
=> chance to hit 14.397414280688
[ATTACK] damrange 1.3
[ATTACK] before range -14
[ATTACK] after range 259826925
[ATTACK] after crit 259826925
[LOG] Skeleton mage hits me not lame for #aaaaaa#259826925.00 physical damage#ffffff#.
[LOG] Skeleton mage killed me not lame!
Code: Select all
local dam = math.max(0, dam - math.max(0, armor - apr))
Code: Select all
local dam = dam - math.max(0, armor - apr)
Code: Select all
[ATTACK] with nil to skeleton warrior :: 81.375 2 5 :: 1
checkHit 16.5 2.4
=> chance to hit 88.201704257487
[LOG] Xandor Tik'Roth hits skeleton warrior for #aaaaaa#96.00 physical damage#ffffff#.
[ATTACK] with nil to Xandor Tik'Roth :: 1 1 9 :: 1
checkHit 7 5.05
=> chance to hit 57.736790528416
[LOG] Skeleton warrior hits Xandor Tik'Roth for #aaaaaa#2181456443.00 physical damage#ffffff#.
[LOG] Skeleton warrior killed Xandor Tik'Roth!
Lua Error: /mod/class/interface/Combat.lua:83: attempt to perform arithmetic on field 'energy_to_act' (a nil value)
At [C]:-1
At /mod/class/interface/Combat.lua:83
At (tail call):-1
At /mod/class/Actor.lua:223 attack
At /engine/interface/ActorLife.lua:21
At (tail call):-1
At /engine/Map.lua:318 checkAllEntities
At /engine/Actor.lua:49 move
At /mod/class/Actor.lua:104
At (tail call):-1
At (tail call):-1
At (tail call):-1
At /engine/ai//talented.lua:30
At (tail call):-1
At (tail call):-1
At /mod/class/NPC.lua:18 act
At /engine/GameEnergyBased.lua:44 tick
At /engine/GameTurnBased.lua:24 tick
At /mod/class/Game.lua:164
331 frames in 10.028 seconds = 33.0076 FPS
1915760 ticks in 10 seconds = 191576 TPS
334 frames in 10.02 seconds = 33.3333 FPS