mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Factored strength into hand-to-hand combat
This commit is contained in:
parent
c0e50b2c02
commit
d19cbdb652
4 changed files with 14 additions and 3 deletions
|
@ -76,6 +76,7 @@ bool Launcher::AdvancedPage::loadSettings()
|
|||
loadSettingBool(chargeForEveryFollowerCheckBox, "charge for every follower travelling", "Game");
|
||||
loadSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||
loadSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||
loadSettingBool(strengthInfluencesHandToHand, "strength influences hand to hand", "Game");
|
||||
|
||||
// Input Settings
|
||||
loadSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input");
|
||||
|
@ -131,6 +132,7 @@ void Launcher::AdvancedPage::saveSettings()
|
|||
saveSettingBool(chargeForEveryFollowerCheckBox, "charge for every follower travelling", "Game");
|
||||
saveSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||
saveSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||
saveSettingBool(strengthInfluencesHandToHand, "strength influences hand to hand", "Game");
|
||||
|
||||
// Input Settings
|
||||
saveSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input");
|
||||
|
|
|
@ -388,14 +388,14 @@ namespace MWMechanics
|
|||
|
||||
void getHandToHandDamage(const MWWorld::Ptr &attacker, const MWWorld::Ptr &victim, float &damage, bool &healthdmg, float attackStrength)
|
||||
{
|
||||
// Note: MCP contains an option to include Strength in hand-to-hand damage
|
||||
// calculations. Some mods recommend using it, so we may want to include an
|
||||
// option for it.
|
||||
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
||||
float minstrike = store.get<ESM::GameSetting>().find("fMinHandToHandMult")->getFloat();
|
||||
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()
|
||||
|
|
|
@ -225,6 +225,9 @@ use additional anim sources = false
|
|||
# Make the disposition change of merchants caused by barter dealings permanent
|
||||
barter disposition change is permanent = false
|
||||
|
||||
# Factors Strength into hand-to-hand combat. Uses the MCP formula (damage * (strength / 40)).
|
||||
strength influences hand to hand = false
|
||||
|
||||
[General]
|
||||
|
||||
# Anisotropy reduces distortion in textures at low angles (e.g. 0 to 16).
|
||||
|
|
|
@ -99,6 +99,12 @@
|
|||
</property>
|
||||
<property name="text">
|
||||
<string>Barter disposition change is permanent</string>
|
||||
<widget class="QCheckBox" name="strengthInfluencesHandToHand">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Uses the MCP formula (damage * (strength / 40)) to factor the Strength attribute into hand-to-hand combat.</p><p>The default value is false.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Factor strength into hand-to-hand combat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue