1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Implement psychic elementals vs mind immune units

This commit is contained in:
Vadim Markovtsev 2016-02-01 20:03:57 +03:00
parent 35c243c30a
commit eb10433535
2 changed files with 35 additions and 33 deletions

View File

@ -1013,9 +1013,14 @@ TDmgRange CBattleInfoCallback::calculateDmgRange(const BattleAttackInfo &info) c
multBonus *= 0.5;
}
// psychic elementals versus mind immune units 50%
if(attackerType->idNumber == CreatureID::PSYCHIC_ELEMENTAL
&& info.defenderBonuses->hasBonusOfType(Bonus::MIND_IMMUNITY))
{
multBonus *= 0.5;
}
// TODO attack on petrified unit 50%
// psychic elementals versus mind immune units 50%
// blinded unit retaliates
minDmg *= additiveBonus * multBonus;

View File

@ -968,6 +968,7 @@ public:
WATER_ELEMENTAL = 115,
GOLD_GOLEM = 116,
DIAMOND_GOLEM = 117,
PSYCHIC_ELEMENTAL = 120,
CATAPULT = 145,
BALLISTA = 146,
FIRST_AID_TENT = 147,
@ -1053,7 +1054,3 @@ typedef int TRmgTemplateZoneId;
#undef ID_LIKE_OPERATORS_INTERNAL
#undef INSTID_LIKE_CLASS_COMMON
#undef OP_DECL_INT