Bug #1353

Increase Damage Restrictrion Brick Parameters are never checked in Combat Phrase application.

Added by sfb over 7 years ago.

Status:New Start date:08/26/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Services: General
Target version:Version 0.10.0

Description

The INC_DMG brick parameter uses a CDamageFactor. In combat_phrase.cpp it reads this in (using CSBrickParamIncreaseDamage) and populates the PowerValue, MinFactor and MaxFactor of the CDamageFactor (which inherits its factoring functionality from CDynFactor). The other brick parameters are read in and apply to additional variables on CDamageFactor:

Brick Parameter Brick Parameter Class CDamageFactor Variable
INC_DMG_TYPE_RSTR CSBrickParamIncDmgTypeRestriction Classification
INC_DMG_RACE_RSTR CSBrickParamIncDmgRaceRestriction Race
INC_DMG_ECOS_RSTR CSBrickParamIncDmgEcosystemRestriction Ecosystem
INC_DMG_SEASON_RSTR CSBrickParamIncDmgSeasonRestriction Season

These parameters are read in and applied to the CDamageFactor which is actually the class member _DamageFactorOnSuccess. It is used in CCombatPhrase::launchAttackOnTarget to apply a damage factor but the restrictions are ignored:

1                // brick damage modifiers (only on right hand attack)
2                if (rightHand)
3                        factor += _DamageFactorOnSuccess.applyValue(_WeaponSabrinaValue) - 1.0f;

I think it should have an additional check like:

1if (rightHand)
2    // Verify that the damage modifier restrictions are met by the defender.
3    if(_DamageFactorOnSuccess.entityMatchRequirements(defender))
4        factor += _DamageFactorOnSuccess.applyValue(_WeaponSabrinaValue) - 1.0f;

Also available in: Atom PDF