1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Support for Fear & Fearless ability.

Ogre Magi can now cast too.
This commit is contained in:
DjWarmonger
2011-10-08 17:10:43 +00:00
parent 89bd7e273d
commit d607d90a91
5 changed files with 51 additions and 16 deletions

View File

@@ -3512,12 +3512,7 @@ void CBattleInterface::battleTriggerEffect(const BattleTriggerEffect & bte)
switch (bte.effect)
{
case Bonus::HP_REGENERATION:
if( stack->hasBonusOfType(Bonus::HP_REGENERATION) || stack->hasBonusOfType(Bonus::FULL_HP_REGENERATION, 1))
{
displayEffect(74, stack->position);
CCS->soundh->playSound(soundBase::REGENER);
}
if( stack->hasBonusOfType(Bonus::FULL_HP_REGENERATION, 0))
if( stack->hasBonusOfType(Bonus::HP_REGENERATION) || stack->hasBonusOfType(Bonus::FULL_HP_REGENERATION))
{
displayEffect(74, stack->position);
CCS->soundh->playSound(soundBase::REGENER);
@@ -3531,6 +3526,10 @@ void CBattleInterface::battleTriggerEffect(const BattleTriggerEffect & bte)
displayEffect(67, stack->position);
CCS->soundh->playSound(soundBase::POISON);
break;
case Bonus::FEAR:
displayEffect(15, stack->position);
CCS->soundh->playSound(soundBase::FEAR);
break;
default:
return;
}