Page 1 of 1
Holding 2-Handed Weapons with both hands
Posted: Sat Sep 19, 2015 5:57 am
by Azel
Okay so Heavy Weapons require the Heavy Weapons skill, and the higher your Strength the greater the damage added. If you level up your Heavy Weapons skill high enough, you can hold a 2-Handed Weapon in one hand. That's great, however, there should be a benefit to continuing to hold a 2-Handed weapon with both hands (eg, a higher base damage). Has anyone considered this?
Basically, I'm thinking if the player gets the Heavy Weapons skill to max level (lvl 5) then I want to give a higher damage bonus if they continue to use a 2-Handed weapon with both hands. I'm 2 weeks away from releasing the final version of my Mod so I probably don't have much time to experiment on my own. Thus I figured I would ask here in case anyone has accomplished something similar.

Re: Holding 2-Handed Weapons with both hands
Posted: Sat Sep 19, 2015 10:42 am
by AndakRainor
In a trait definition you can use:
onComputeCritChance
onComputeCooldown
onComputeAccuracy
I made this trait for example :
Code: Select all
defineTrait{
name = "accurate_throw",
uiName = "Accurate Throw",
icon = 1,
description = "Throw attacks gain Accuracy +10.",
onComputeAccuracy = function(champion, weapon, attack, attackType, level)
if level > 0 and attackType == "throw" then return 10 end
end,
},
or you have this but it applies at all times :
Code: Select all
defineTrait{
name = "parry",
uiName = "Parry",
icon = 1,
description = "You gain Evasion +20 when equipped with heavy weapons.",
onRecomputeStats = function(champion, level)
if level > 0 then
local item1 = champion:getItem(ItemSlot.Weapon)
local item2 = champion:getItem(ItemSlot.OffHand)
if (item1 and item1:hasTrait("heavy_weapon")) or (item2 and item2:hasTrait("heavy_weapon")) then
champion:addStatModifier("evasion", 20)
end
end
end,
},
Re: Holding 2-Handed Weapons with both hands
Posted: Sat Sep 19, 2015 9:14 pm
by Azel
Badass. I think I can work with that. Thanks!
Re: Holding 2-Handed Weapons with both hands
Posted: Tue Sep 22, 2015 3:18 pm
by Slava
Code: Select all
onUnequipItem = function(self, champion, action, slot, skillLevel)
if
champion:getSkillLevel("heavy_weapons") == 5 then
champion:addTrait("two_handed_mastery") end
end,
Code: Select all
onRecomputeStats = function(self, champion, action, slot)
champion:removeTrait("two_handed_mastery")
end,
Re: Holding 2-Handed Weapons with both hands
Posted: Tue Oct 06, 2015 9:19 am
by akroma222
Slava wrote:Code: Select all
onUnequipItem = function(self, champion, action, slot, skillLevel)
if
champion:getSkillLevel("heavy_weapons") == 5 then
champion:addTrait("two_handed_mastery") end
end,
Code: Select all
onRecomputeStats = function(self, champion, action, slot)
champion:removeTrait("two_handed_mastery")
end,
^^This can easily be done automatically through the skill def
Code: Select all
defineSkill{
name = "heavy_weapons",
uiName = "Heavy Weapons",
priority = 130,
iconAtlas = "mod_assets/textures/customSkills1.tga",
icon = 0,
--icon = 105,
description = "Heavy Weapons affects how well you wield weapons such as axes, maces and some Swords and Polearms. Each skill level increases the Damage of your Heavy Weapon attacks by 20%.\n\n[Level 3]: 15% Chance to Stun enemies.\n[Level 4]: Wield 2-Handed Weapons with 1 hand.",
traits = { [3] = "stun_strike_HV", [4] = "two_handed_mastery" },
}
For the record... I have given a penalty to energy regen and cooldown times if wielding two handed weapons in both hands
Technically I guess there should be a damage penalty too...