mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-16 17:42:31 +00:00
Always reduce weapon condition by the raw damage (bug #6559)
This commit is contained in:
parent
09b1aca9bd
commit
fdd9e6a793
@ -101,6 +101,7 @@
|
|||||||
Bug #6519: Effects tooltips for ingredients work incorrectly
|
Bug #6519: Effects tooltips for ingredients work incorrectly
|
||||||
Bug #6523: Disintegrate Weapon is resisted by Resist Magicka instead of Sanctuary
|
Bug #6523: Disintegrate Weapon is resisted by Resist Magicka instead of Sanctuary
|
||||||
Bug #6544: Far from world origin objects jitter when camera is still
|
Bug #6544: Far from world origin objects jitter when camera is still
|
||||||
|
Bug #6559: Weapon condition inconsistency between melee and ranged critical / sneak / KO attacks
|
||||||
Bug #6579: OpenMW compilation error when using OSG doubles for BoundingSphere
|
Bug #6579: OpenMW compilation error when using OSG doubles for BoundingSphere
|
||||||
Feature #890: OpenMW-CS: Column filtering
|
Feature #890: OpenMW-CS: Column filtering
|
||||||
Feature #1465: "Reset" argument for AI functions
|
Feature #1465: "Reset" argument for AI functions
|
||||||
|
@ -305,8 +305,8 @@ namespace MWClass
|
|||||||
{
|
{
|
||||||
damage = attack[0] + ((attack[1]-attack[0])*attackStrength);
|
damage = attack[0] + ((attack[1]-attack[0])*attackStrength);
|
||||||
MWMechanics::adjustWeaponDamage(damage, weapon, ptr);
|
MWMechanics::adjustWeaponDamage(damage, weapon, ptr);
|
||||||
MWMechanics::resistNormalWeapon(victim, ptr, weapon, damage);
|
|
||||||
MWMechanics::reduceWeaponCondition(damage, true, weapon, ptr);
|
MWMechanics::reduceWeaponCondition(damage, true, weapon, ptr);
|
||||||
|
MWMechanics::resistNormalWeapon(victim, ptr, weapon, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply "On hit" enchanted weapons
|
// Apply "On hit" enchanted weapons
|
||||||
|
@ -607,9 +607,9 @@ namespace MWClass
|
|||||||
damage = attack[0] + ((attack[1]-attack[0])*attackStrength);
|
damage = attack[0] + ((attack[1]-attack[0])*attackStrength);
|
||||||
}
|
}
|
||||||
MWMechanics::adjustWeaponDamage(damage, weapon, ptr);
|
MWMechanics::adjustWeaponDamage(damage, weapon, ptr);
|
||||||
|
MWMechanics::reduceWeaponCondition(damage, true, weapon, ptr);
|
||||||
MWMechanics::resistNormalWeapon(victim, ptr, weapon, damage);
|
MWMechanics::resistNormalWeapon(victim, ptr, weapon, damage);
|
||||||
MWMechanics::applyWerewolfDamageMult(victim, weapon, damage);
|
MWMechanics::applyWerewolfDamageMult(victim, weapon, damage);
|
||||||
MWMechanics::reduceWeaponCondition(damage, true, weapon, ptr);
|
|
||||||
healthdmg = true;
|
healthdmg = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -200,17 +200,17 @@ namespace MWMechanics
|
|||||||
|
|
||||||
bool validVictim = !victim.isEmpty() && victim.getClass().isActor();
|
bool validVictim = !victim.isEmpty() && victim.getClass().isActor();
|
||||||
|
|
||||||
|
int weaponSkill = ESM::Skill::Marksman;
|
||||||
|
if (!weapon.isEmpty())
|
||||||
|
weaponSkill = weapon.getClass().getEquipmentSkill(weapon);
|
||||||
|
|
||||||
float damage = 0.f;
|
float damage = 0.f;
|
||||||
if (validVictim)
|
if (validVictim)
|
||||||
{
|
{
|
||||||
if (attacker == getPlayer())
|
if (attacker == getPlayer())
|
||||||
MWBase::Environment::get().getWindowManager()->setEnemy(victim);
|
MWBase::Environment::get().getWindowManager()->setEnemy(victim);
|
||||||
|
|
||||||
int weaponSkill = ESM::Skill::Marksman;
|
int skillValue = attacker.getClass().getSkill(attacker, weaponSkill);
|
||||||
if (!weapon.isEmpty())
|
|
||||||
weaponSkill = weapon.getClass().getEquipmentSkill(weapon);
|
|
||||||
|
|
||||||
int skillValue = attacker.getClass().getSkill(attacker, weapon.getClass().getEquipmentSkill(weapon));
|
|
||||||
|
|
||||||
if (Misc::Rng::roll0to99() >= getHitChance(attacker, victim, skillValue))
|
if (Misc::Rng::roll0to99() >= getHitChance(attacker, victim, skillValue))
|
||||||
{
|
{
|
||||||
@ -228,6 +228,12 @@ namespace MWMechanics
|
|||||||
damage += attack[0] + ((attack[1] - attack[0]) * attackStrength);
|
damage += attack[0] + ((attack[1] - attack[0]) * attackStrength);
|
||||||
|
|
||||||
adjustWeaponDamage(damage, weapon, attacker);
|
adjustWeaponDamage(damage, weapon, attacker);
|
||||||
|
}
|
||||||
|
|
||||||
|
reduceWeaponCondition(damage, validVictim, weapon, attacker);
|
||||||
|
|
||||||
|
if (validVictim)
|
||||||
|
{
|
||||||
if (weapon == projectile || Settings::Manager::getBool("only appropriate ammunition bypasses resistance", "Game") || isNormalWeapon(weapon))
|
if (weapon == projectile || Settings::Manager::getBool("only appropriate ammunition bypasses resistance", "Game") || isNormalWeapon(weapon))
|
||||||
resistNormalWeapon(victim, attacker, projectile, damage);
|
resistNormalWeapon(victim, attacker, projectile, damage);
|
||||||
applyWerewolfDamageMult(victim, projectile, damage);
|
applyWerewolfDamageMult(victim, projectile, damage);
|
||||||
@ -247,8 +253,6 @@ namespace MWMechanics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
reduceWeaponCondition(damage, validVictim, weapon, attacker);
|
|
||||||
|
|
||||||
// Apply "On hit" effect of the projectile
|
// Apply "On hit" effect of the projectile
|
||||||
bool appliedEnchantment = applyOnStrikeEnchantment(attacker, victim, projectile, hitPosition, true);
|
bool appliedEnchantment = applyOnStrikeEnchantment(attacker, victim, projectile, hitPosition, true);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user