Skip to content
Snippets Groups Projects
Commit 90197598 authored by DarkGod's avatar DarkGod
Browse files

Brawler rares now use the same base unarmed damage as a player, instead of the...

Brawler rares now use the same base unarmed damage as a player, instead of the one from the base NPC type; to prevent problems arising on some npcs taht have very strong base melee
parent 65579cc6
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -2040,6 +2040,24 @@ function _M:applyRandomClass(b, data, instant)
end
if not mclass then return end
-- THE MOTHER OF ALL HACKS!
-- Make sure brawlers rares dont get absurdly powerful
if class.npc_class_use_default_combat_table then
b.combat_old = table.clone(b.combat or {}, true)
b.combat = {
dam=1,
atk=1, apr=0,
physcrit=0,
physspeed =1,
dammod = { str=1 },
damrange=1.1,
talented = "unarmed",
npc_brawler_combat_hack_enabled = true,
}
if b.combat_old.sound then b.combat.sound = b.combat_old.sound end
if b.combat_old.sound_miss then b.combat.sound_miss = b.combat_old.sound_miss end
end
print("[applyRandomClass]", b.uid, b.name, "Adding class", class.name, mclass.name)
-- add class to list and build inherent power sources
b.descriptor = b.descriptor or {}
......@@ -2482,6 +2500,24 @@ function _M:applyRandomClassNew(b, data, instant)
return
end
-- THE MOTHER OF ALL HACKS!
-- Make sure brawlers rares dont get absurdly powerful
if class.npc_class_use_default_combat_table then
b.combat_old = table.clone(b.combat or {}, true)
b.combat = {
dam=1,
atk=1, apr=0,
physcrit=0,
physspeed =1,
dammod = { str=1 },
damrange=1.1,
talented = "unarmed",
npc_brawler_combat_hack_enabled = true,
}
if b.combat_old.sound then b.combat.sound = b.combat_old.sound end
if b.combat_old.sound_miss then b.combat.sound_miss = b.combat_old.sound_miss end
end
print("[applyRandomClassNew]", b.uid, b.name, "Adding class", class.name, mclass.name, "level_rate", level_rate)
-- Add starting equipment and update filters as needed
......
......@@ -374,6 +374,7 @@ newBirthDescriptor{
[ActorTalents.T_ARMOUR_TRAINING] = 1,
[ActorTalents.T_UNARMED_MASTERY] = 1,
},
npc_class_use_default_combat_table = true,
copy = {
resolvers.auto_equip_filters{-- will not try to equip weapons
MAINHAND = {type="none"}, OFFHAND = {type="none"}
......
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