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

Fix lots of monsters that did not deal damage

git-svn-id: http://svn.net-core.org/repos/t-engine4@873 51575b47-30f0-44d4-a5cc-537603b46e54
parent 52377e4f
No related branches found
No related tags found
No related merge requests found
......@@ -455,11 +455,10 @@ function _M:combatDamage(weapon)
if weapon.talented and weapon.talented == "knife" and self:knowTalent(Talents.T_LETHALITY) then sub_con_to_str = true end
local totstat = 0
if weapon.dammod then
for stat, mod in pairs(weapon.dammod) do
if sub_con_to_str and stat == "str" then stat = "cun" end
totstat = totstat + self:getStat(stat) * mod
end
local dammod = weapon.dammod or {str=0.6}
for stat, mod in pairs(dammod) do
if sub_con_to_str and stat == "str" then stat = "cun" end
totstat = totstat + self:getStat(stat) * mod
end
local add = 0
......@@ -470,6 +469,7 @@ function _M:combatDamage(weapon)
local talented_mod = math.sqrt(self:combatCheckTraining(weapon) / 10) + 1
local power = self.combat_dam + (weapon.dam or 1) + add
power = (math.sqrt(power / 10) - 1) * 0.8 + 1
print(("[COMBAT DAMAGE] power(%f) totstat(%f) talent_mod(%f)"):format(power, totstat, talented_mod))
return totstat / 1.5 * power * talented_mod
end
......
......@@ -110,7 +110,7 @@ newBirthDescriptor{
copy = {
max_life = 90,
resolvers.equip{ id=true,
{type="weapon", subtype="stagg", name="elm staff", autoreq=true},
{type="weapon", subtype="staff", name="elm staff", autoreq=true},
{type="armor", subtype="cloth", name="robe", autoreq=true},
},
},
......
......@@ -38,7 +38,7 @@ newEntity{
size_category = 4,
combat_armor = 1, combat_def = 1,
combat = { dam=resolvers.rngavg(12,25), atk=10, apr=3, physspeed=2 },
combat = { dam=resolvers.rngavg(12,25), atk=10, apr=3, physspeed=2, dammod={str=0.8} },
life_rating = 12,
resolvers.tmasteries{ ["technique/other"]=0.25 },
......@@ -49,7 +49,7 @@ newEntity{ base = "BASE_NPC_BEAR",
name = "brown bear", color=colors.UMBER,
desc = [[The weakest of bears, covered in brown shaggy fur.]],
level_range = {5, nil}, exp_worth = 1,
rarity = 7,
rarity = 1,
max_life = resolvers.rngavg(80,90),
combat_armor = 7, combat_def = 3,
resolvers.talents{ [Talents.T_STUN]=1 },
......
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