mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 19:09:43 +00:00
Made the werewolf check optional
This commit is contained in:
parent
18e51e0e98
commit
7e9ce99062
4 changed files with 65 additions and 7 deletions
|
@ -77,6 +77,9 @@ bool Launcher::AdvancedPage::loadSettings()
|
|||
loadSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||
loadSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||
loadSettingBool(strengthInfluencesHandToHand, "strength influences hand to hand", "Game");
|
||||
int unarmedFactorsStrengthIndex = mEngineSettings.getInt("strength influences hand to hand", "Game");
|
||||
if (unarmedFactorsStrengthIndex >= 0 && unarmedFactorsStrengthIndex <= 2)
|
||||
unarmedFactorsStrengthComboBox->setCurrentIndex(unarmedFactorsStrengthIndex);
|
||||
|
||||
// Input Settings
|
||||
loadSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input");
|
||||
|
@ -133,6 +136,9 @@ void Launcher::AdvancedPage::saveSettings()
|
|||
saveSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||
saveSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||
saveSettingBool(strengthInfluencesHandToHand, "strength influences hand to hand", "Game");
|
||||
int unarmedFactorsStrengthIndex = unarmedFactorsStrengthComboBox->currentIndex();
|
||||
if (unarmedFactorsStrengthIndex != mEngineSettings.getInt("strength influences hand to hand", "Game"))
|
||||
mEngineSettings.setInt("strength influences hand to hand", "Game", unarmedFactorsStrengthIndex);
|
||||
|
||||
// Input Settings
|
||||
saveSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input");
|
||||
|
|
|
@ -399,7 +399,12 @@ namespace MWMechanics
|
|||
|| otherstats.getKnockedDown();
|
||||
bool isWerewolf = (attacker.getClass().isNpc() && attacker.getClass().getNpcStats(attacker).isWerewolf());
|
||||
|
||||
if (Settings::Manager::getBool("strength influences hand to hand", "Game") && !isWerewolf) {
|
||||
// Options in the launcher's combo box: unarmedFactorsStrengthComboBox
|
||||
// 0 = Do not factor strength into hand-to-hand combat.
|
||||
// 1 = Factor into werewolf hand-to-hand combat.
|
||||
// 2 = Ignore werewolves.
|
||||
int factorStrength = Settings::Manager::getInt("strength influences hand to hand", "Game");
|
||||
if (factorStrength == 1 || (factorStrength == 2 && !isWerewolf)) {
|
||||
damage *= attacker.getClass().getCreatureStats(attacker).getAttribute(ESM::Attribute::Strength).getModified() / 40.0f;
|
||||
}
|
||||
|
||||
|
|
|
@ -225,8 +225,10 @@ 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
|
||||
# Uses the MCP formula (damage * (strength / 40)) to factor Strength into hand-to-hand combat.
|
||||
# (0 means it does not factor it in, 1 means it factors into werewolves damage calculation and
|
||||
# 2 means werewolves are ignored)
|
||||
strength influences hand to hand = 0
|
||||
|
||||
[General]
|
||||
|
||||
|
|
|
@ -100,14 +100,59 @@
|
|||
<property name="text">
|
||||
<string>Barter disposition change is permanent</string>
|
||||
<widget class="QCheckBox" name="strengthInfluencesHandToHand">
|
||||
<item alignment="Qt::AlignLeft">
|
||||
<widget class="QWidget" name="unarmedFactorsStrengthGroup" native="true">
|
||||
<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>
|
||||
<string><html><head/><body><p>Factor strength into hand-to-hand damage calculations, as the MCP formula: damage * (strength / 40).</p><p>The default value is Off.</p></body></html></string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalUnarmedStrengthLayout">
|
||||
<property name="spacing">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="unarmedFactorsStrengthLabel">
|
||||
<property name="text">
|
||||
<string>Factor strength into hand-to-hand combat</string>
|
||||
<string>Factor strength into hand-to-hand combat:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="unarmedFactorsStrengthComboBox">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Affect werewolves</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Do not affect werewolves</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue