Skip to content
Snippets Groups Projects
Commit bb6a08b1 authored by dg's avatar dg
Browse files

sanity check

git-svn-id: http://svn.net-core.org/repos/t-engine4@3562 51575b47-30f0-44d4-a5cc-537603b46e54
parent f45acd8a
No related branches found
No related tags found
No related merge requests found
......@@ -186,7 +186,15 @@ function _M:init(t, no_default)
mod.class.interface.ActorInscriptions.init(self, t)
-- Default melee barehanded damage
self.combat = self.combat or { dam=1, atk=1, apr=0, physcrit=0, physspeed =1, dammod={str=1}, damrange=1.1 }
self.combat = self.combat or {
dam=1,
atk=1, apr=0,
physcrit=0,
physspeed =1,
dammod= { str=1 },
damrange=1.1,
talented = "unarmed",
}
self.talents[self.T_ATTACK] = self.talents[self.T_ATTACK] or 1
self:resetCanSeeCache()
......
......@@ -466,15 +466,16 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
end
local weapon_talents = {
sword = Talents.T_WEAPONS_MASTERY,
axe = Talents.T_WEAPONS_MASTERY,
mace = Talents.T_WEAPONS_MASTERY,
knife = Talents.T_KNIFE_MASTERY,
whip = Talents.T_EXOTIC_WEAPONS_MASTERY,
trident=Talents.T_EXOTIC_WEAPONS_MASTERY,
bow = Talents.T_BOW_MASTERY,
sling = Talents.T_SLING_MASTERY,
staff = Talents.T_STAFF_MASTERY,
sword = Talents.T_WEAPONS_MASTERY,
axe = Talents.T_WEAPONS_MASTERY,
mace = Talents.T_WEAPONS_MASTERY,
knife = Talents.T_KNIFE_MASTERY,
whip = Talents.T_EXOTIC_WEAPONS_MASTERY,
trident= Talents.T_EXOTIC_WEAPONS_MASTERY,
bow = Talents.T_BOW_MASTERY,
sling = Talents.T_SLING_MASTERY,
staff = Talents.T_STAFF_MASTERY,
unarmed = Talents.T_UNARMED_MASTERY,
}
--- Checks weapon training
......@@ -630,12 +631,7 @@ function _M:combatDamage(weapon)
add = add + t.getDamage(self, t)
end
if weapon == self.combat then
-- Handles unarmed mastery
talented_mod = math.sqrt((self:getTalentLevel(Talents.T_UNARMED_MASTERY) / 10) or 0) + 1
else
talented_mod = math.sqrt(self:combatCheckTraining(weapon) / 10) + 1
end
local talented_mod = math.sqrt(self:combatCheckTraining(weapon) / 10) + 1
local power = math.max(self.combat_dam + (weapon.dam or 1) + add, 1)
power = (math.sqrt(power / 10) - 1) * 0.8 + 1
......@@ -1000,7 +996,7 @@ function _M:buildCombo()
end
duration = 3 + t.getDuration(self, t)
end
if self:knowTalent(self.T_RELENTLESS_STRIKES) then
local t= self:getTalentFromId(self.T_RELENTLESS_STRIKES)
self:incStamina(t.getStamina(self, t))
......
......@@ -58,7 +58,7 @@ function _M:printRanking()
local i = 1
while(scores[i] and scores[i].name) do
p = scores[i]
tmp = stri:format(p.name:capitalize(), p.sex, p.race, p.class, p.score, p.perk, p.wave)
tmp = stri:format(p.name:capitalize(), p.sex or "unknown", p.race or "unknown", p.class or "unknown", p.score or "unknown", p.perk or "unknown", p.wave or -1)
if p.name == world.arena.lastScore.name and p.score == world.arena.lastScore.score and
p.wave == world.arena.lastScore.wave and p.perk == world.arena.lastScore.perk then
text = text..line(tmp, "#YELLOW#")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment