forked from teamnwah/openmw-tes3coop
Merge pull request #225 from OpenMW/master
Add OpenMW commits up to 4 Jun 2017
This commit is contained in:
commit
89f6c6df96
9 changed files with 69 additions and 26 deletions
|
@ -108,6 +108,7 @@ Programmers
|
||||||
Narmo
|
Narmo
|
||||||
Nathan Jeffords (blunted2night)
|
Nathan Jeffords (blunted2night)
|
||||||
NeveHanter
|
NeveHanter
|
||||||
|
Nialsy
|
||||||
Nikolay Kasyanov (corristo)
|
Nikolay Kasyanov (corristo)
|
||||||
nobrakal
|
nobrakal
|
||||||
Nolan Poe (nopoe)
|
Nolan Poe (nopoe)
|
||||||
|
|
|
@ -181,7 +181,7 @@ namespace MWGui
|
||||||
|
|
||||||
mBuyButton->setCaptionWithReplacing("#{sCreate}");
|
mBuyButton->setCaptionWithReplacing("#{sCreate}");
|
||||||
|
|
||||||
bool enabled = Settings::Manager::getBool("show enchant chance","GUI");
|
bool enabled = Settings::Manager::getBool("show enchant chance","Game");
|
||||||
|
|
||||||
mChanceLayout->setVisible(enabled);
|
mChanceLayout->setVisible(enabled);
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ float suggestCombatRange(int rangeTypes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int numEffectsToCure (const MWWorld::Ptr& actor, int effectFilter=-1)
|
int numEffectsToDispel (const MWWorld::Ptr& actor, int effectFilter=-1, bool negative = true)
|
||||||
{
|
{
|
||||||
int toCure=0;
|
int toCure=0;
|
||||||
const MWMechanics::ActiveSpells& activeSpells = actor.getClass().getCreatureStats(actor).getActiveSpells();
|
const MWMechanics::ActiveSpells& activeSpells = actor.getClass().getCreatureStats(actor).getActiveSpells();
|
||||||
|
@ -75,9 +75,14 @@ int numEffectsToCure (const MWWorld::Ptr& actor, int effectFilter=-1)
|
||||||
if (effectFilter != -1 && effectId != effectFilter)
|
if (effectFilter != -1 && effectId != effectFilter)
|
||||||
continue;
|
continue;
|
||||||
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectId);
|
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectId);
|
||||||
if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful
|
|
||||||
&& effectIt->mDuration > 3 // Don't attempt to cure if effect runs out shortly anyway
|
if (effectIt->mDuration <= 3) // Don't attempt to dispel if effect runs out shortly anyway
|
||||||
)
|
continue;
|
||||||
|
|
||||||
|
if (negative && magicEffect->mData.mFlags & ESM::MagicEffect::Harmful)
|
||||||
|
++toCure;
|
||||||
|
|
||||||
|
if (!negative && !(magicEffect->mData.mFlags & ESM::MagicEffect::Harmful))
|
||||||
++toCure;
|
++toCure;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -400,14 +405,47 @@ namespace MWMechanics
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Prefer Cure effects over Dispel, because Dispel also removes positive effects
|
|
||||||
case ESM::MagicEffect::Dispel:
|
case ESM::MagicEffect::Dispel:
|
||||||
return 1000.f * numEffectsToCure(actor);
|
{
|
||||||
case ESM::MagicEffect::CureParalyzation:
|
int numPositive = 0;
|
||||||
return 1001.f * numEffectsToCure(actor, ESM::MagicEffect::Paralyze);
|
int numNegative = 0;
|
||||||
case ESM::MagicEffect::CurePoison:
|
int diff = 0;
|
||||||
return 1001.f * numEffectsToCure(actor, ESM::MagicEffect::Poison);
|
|
||||||
|
|
||||||
|
if (effect.mRange == ESM::RT_Self)
|
||||||
|
{
|
||||||
|
numPositive = numEffectsToDispel(actor, -1, false);
|
||||||
|
numNegative = numEffectsToDispel(actor);
|
||||||
|
|
||||||
|
diff = numNegative - numPositive;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (enemy.isEmpty())
|
||||||
|
return 0.f;
|
||||||
|
|
||||||
|
numPositive = numEffectsToDispel(enemy, -1, false);
|
||||||
|
numNegative = numEffectsToDispel(enemy);
|
||||||
|
|
||||||
|
diff = numPositive - numNegative;
|
||||||
|
|
||||||
|
// if rating < 0 here, the spell will be considered as negative later
|
||||||
|
rating *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (diff <= 0)
|
||||||
|
return 0.f;
|
||||||
|
|
||||||
|
rating *= (diff) / 5.f;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prefer Cure effects over Dispel, because Dispel also removes positive effects
|
||||||
|
case ESM::MagicEffect::CureParalyzation:
|
||||||
|
return 1001.f * numEffectsToDispel(actor, ESM::MagicEffect::Paralyze);
|
||||||
|
|
||||||
|
case ESM::MagicEffect::CurePoison:
|
||||||
|
return 1001.f * numEffectsToDispel(actor, ESM::MagicEffect::Poison);
|
||||||
case ESM::MagicEffect::DisintegrateArmor:
|
case ESM::MagicEffect::DisintegrateArmor:
|
||||||
{
|
{
|
||||||
if (enemy.isEmpty())
|
if (enemy.isEmpty())
|
||||||
|
@ -555,6 +593,7 @@ namespace MWMechanics
|
||||||
// Combat AI is egoistic, so doesn't consider applying positive effects to friendly actors.
|
// Combat AI is egoistic, so doesn't consider applying positive effects to friendly actors.
|
||||||
if (effect.mRange != ESM::RT_Self)
|
if (effect.mRange != ESM::RT_Self)
|
||||||
rating *= -1.f;
|
rating *= -1.f;
|
||||||
|
|
||||||
return rating;
|
return rating;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,6 +342,7 @@ namespace MWWorld
|
||||||
|
|
||||||
mDoorStates.clear();
|
mDoorStates.clear();
|
||||||
|
|
||||||
|
mGoToJail = false;
|
||||||
mTeleportEnabled = true;
|
mTeleportEnabled = true;
|
||||||
mLevitationEnabled = true;
|
mLevitationEnabled = true;
|
||||||
|
|
||||||
|
|
|
@ -127,14 +127,3 @@ The default value is "1.0 0.15 0.15 1.0" which is a bright red color.
|
||||||
This setting can only be configured by editing the settings configuration file.
|
This setting can only be configured by editing the settings configuration file.
|
||||||
This setting has no effect if the crosshair setting in the HUD Settings Section is false.
|
This setting has no effect if the crosshair setting in the HUD Settings Section is false.
|
||||||
This setting has no effect if the show owned setting in the Game Settings Section is false.
|
This setting has no effect if the show owned setting in the Game Settings Section is false.
|
||||||
|
|
||||||
show enchant chance
|
|
||||||
----------------
|
|
||||||
|
|
||||||
:Type: boolean
|
|
||||||
:Range: True/False
|
|
||||||
:Default: False
|
|
||||||
|
|
||||||
Whether or not the chance of success will be displayed in the enchanting menu.
|
|
||||||
|
|
||||||
The default value is false. This setting can only be configured by editing the settings configuration file.
|
|
||||||
|
|
|
@ -40,6 +40,17 @@ If this setting is true, melee weapons reach and speed will be showed on item to
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
show enchant chance
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
:Type: boolean
|
||||||
|
:Range: True/False
|
||||||
|
:Default: False
|
||||||
|
|
||||||
|
Whether or not the chance of success will be displayed in the enchanting menu.
|
||||||
|
|
||||||
|
The default value is false. This setting can only be configured by editing the settings configuration file.
|
||||||
|
|
||||||
best attack
|
best attack
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
|
2
extern/oics/ICSInputControlSystem.cpp
vendored
2
extern/oics/ICSInputControlSystem.cpp
vendored
|
@ -28,6 +28,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
namespace ICS
|
namespace ICS
|
||||||
{
|
{
|
||||||
|
const float ICS_MAX = std::numeric_limits<float>::max();
|
||||||
|
|
||||||
InputControlSystem::InputControlSystem(std::string file, bool active
|
InputControlSystem::InputControlSystem(std::string file, bool active
|
||||||
, DetectingBindingListener* detectingBindingListener
|
, DetectingBindingListener* detectingBindingListener
|
||||||
, InputControlSystemLog* log, size_t channelCount)
|
, InputControlSystemLog* log, size_t channelCount)
|
||||||
|
|
2
extern/oics/ICSInputControlSystem.h
vendored
2
extern/oics/ICSInputControlSystem.h
vendored
|
@ -236,7 +236,7 @@ namespace ICS
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const float ICS_MAX = std::numeric_limits<float>::max();
|
extern const float ICS_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -141,9 +141,6 @@ werewolf overlay = true
|
||||||
color background owned = 0.15 0.0 0.0 1.0
|
color background owned = 0.15 0.0 0.0 1.0
|
||||||
color crosshair owned = 1.0 0.15 0.15 1.0
|
color crosshair owned = 1.0 0.15 0.15 1.0
|
||||||
|
|
||||||
# Show success probability in self-enchant dialog
|
|
||||||
show enchant chance = false
|
|
||||||
|
|
||||||
[HUD]
|
[HUD]
|
||||||
|
|
||||||
# Displays the crosshair or reticle when not in GUI mode.
|
# Displays the crosshair or reticle when not in GUI mode.
|
||||||
|
@ -161,6 +158,9 @@ show projectile damage = false
|
||||||
# Show additional melee weapon info: reach and attack speed
|
# Show additional melee weapon info: reach and attack speed
|
||||||
show melee info = false
|
show melee info = false
|
||||||
|
|
||||||
|
# Show success probability in self-enchant dialog
|
||||||
|
show enchant chance = false
|
||||||
|
|
||||||
# Always use the best mode of attack: e.g. chop, slash or thrust.
|
# Always use the best mode of attack: e.g. chop, slash or thrust.
|
||||||
best attack = false
|
best attack = false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue