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.
Holding 2-Handed Weapons with both hands
Holding 2-Handed Weapons with both hands
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.

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.
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Holding 2-Handed Weapons with both hands
In a trait definition you can use:
onComputeCritChance
onComputeCooldown
onComputeAccuracy
I made this trait for example :
or you have this but it applies at all times :
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,
},
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
Badass. I think I can work with that. Thanks!
Re: Holding 2-Handed Weapons with both hands
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
^^This can easily be done automatically through the skill defSlava 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,
SpoilerShow
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" },
}Technically I guess there should be a damage penalty too...
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)