mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Add vanilla enchanted weaponry behavior option, on by default (fixes #4136)
This commit is contained in:
parent
9b8c56761b
commit
baaf65bc2c
3 changed files with 21 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include "combat.hpp"
|
#include "combat.hpp"
|
||||||
|
|
||||||
#include <components/misc/rng.hpp>
|
#include <components/misc/rng.hpp>
|
||||||
|
#include <components/settings/settings.hpp>
|
||||||
|
|
||||||
#include <components/sceneutil/positionattitudetransform.hpp>
|
#include <components/sceneutil/positionattitudetransform.hpp>
|
||||||
|
|
||||||
|
@ -155,7 +156,11 @@ namespace MWMechanics
|
||||||
|
|
||||||
if (!(weapon.get<ESM::Weapon>()->mBase->mData.mFlags & ESM::Weapon::Silver
|
if (!(weapon.get<ESM::Weapon>()->mBase->mData.mFlags & ESM::Weapon::Silver
|
||||||
|| weapon.get<ESM::Weapon>()->mBase->mData.mFlags & ESM::Weapon::Magical))
|
|| weapon.get<ESM::Weapon>()->mBase->mData.mFlags & ESM::Weapon::Magical))
|
||||||
|
{
|
||||||
|
if (weapon.getClass().getEnchantment(weapon).empty()
|
||||||
|
|| !Settings::Manager::getBool("enchanted weapons are magical", "Game"))
|
||||||
damage *= multiplier;
|
damage *= multiplier;
|
||||||
|
}
|
||||||
|
|
||||||
if ((weapon.get<ESM::Weapon>()->mBase->mData.mFlags & ESM::Weapon::Silver)
|
if ((weapon.get<ESM::Weapon>()->mBase->mData.mFlags & ESM::Weapon::Silver)
|
||||||
&& actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
&& actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||||
|
|
|
@ -109,6 +109,18 @@ The remaining duration is displayed in the tooltip by hovering over the magical
|
||||||
|
|
||||||
The default value is false. This setting can only be configured by editing the settings configuration file.
|
The default value is false. This setting can only be configured by editing the settings configuration file.
|
||||||
|
|
||||||
|
enchanted weapons are magical
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
:Type: boolean
|
||||||
|
:Range: True/False
|
||||||
|
:Default: True
|
||||||
|
|
||||||
|
Makes enchanted weapons without Magical flag bypass normal weapons resistance (and weakness) certain creatures have.
|
||||||
|
This is how original Morrowind behaves.
|
||||||
|
|
||||||
|
This setting can only be configured by editing the settings configuration file.
|
||||||
|
|
||||||
prevent merchant equipping
|
prevent merchant equipping
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
|
|
|
@ -179,6 +179,9 @@ show effect duration = false
|
||||||
# Prevents merchants from equipping items that are sold to them.
|
# Prevents merchants from equipping items that are sold to them.
|
||||||
prevent merchant equipping = false
|
prevent merchant equipping = false
|
||||||
|
|
||||||
|
# Make enchanted weaponry without Magical flag bypass normal weapons resistance
|
||||||
|
enchanted weapons are magical = true
|
||||||
|
|
||||||
# Makes player followers and escorters start combat with enemies who have started combat with them
|
# Makes player followers and escorters start combat with enemies who have started combat with them
|
||||||
# or the player. Otherwise they wait for the enemies or the player to do an attack first.
|
# or the player. Otherwise they wait for the enemies or the player to do an attack first.
|
||||||
followers attack on sight = false
|
followers attack on sight = false
|
||||||
|
|
Loading…
Reference in a new issue