1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 22:45:33 +00:00

Added check for werewolves

This commit is contained in:
Yohaulticetl 2018-07-28 10:10:01 -03:00 committed by Bret Curtis
parent d19cbdb652
commit 18e51e0e98

View file

@ -393,14 +393,16 @@ namespace MWMechanics
float maxstrike = store.get<ESM::GameSetting>().find("fMaxHandToHandMult")->getFloat();
damage = static_cast<float>(attacker.getClass().getSkill(attacker, ESM::Skill::HandToHand));
damage *= minstrike + ((maxstrike-minstrike)*attackStrength);
if (Settings::Manager::getBool("strength influences hand to hand", "Game")){
damage *= attacker.getClass().getCreatureStats(attacker).getAttribute(ESM::Attribute::Strength).getModified() / 40.0f;
}
MWMechanics::CreatureStats& otherstats = victim.getClass().getCreatureStats(victim);
healthdmg = otherstats.isParalyzed()
|| otherstats.getKnockedDown();
bool isWerewolf = (attacker.getClass().isNpc() && attacker.getClass().getNpcStats(attacker).isWerewolf());
if (Settings::Manager::getBool("strength influences hand to hand", "Game") && !isWerewolf) {
damage *= attacker.getClass().getCreatureStats(attacker).getAttribute(ESM::Attribute::Strength).getModified() / 40.0f;
}
if(isWerewolf)
{
healthdmg = true;