1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

Implemented configurable FEAR ability

This commit is contained in:
Ivan Savenko
2025-06-08 19:22:06 +03:00
parent f71db8af07
commit ae22de3ccf
10 changed files with 43 additions and 40 deletions

View File

@ -1191,7 +1191,7 @@ void GameStatePackVisitor::visitBattleTriggerEffect(BattleTriggerEffect & pack)
{
CStack * st = gs.getBattle(pack.battleID)->getStack(pack.stackID);
assert(st);
switch(static_cast<BonusType>(pack.effect))
switch(pack.effect)
{
case BonusType::HP_REGENERATION:
{
@ -1218,11 +1218,11 @@ void GameStatePackVisitor::visitBattleTriggerEffect(BattleTriggerEffect & pack)
case BonusType::ENCHANTER:
case BonusType::MORALE:
break;
case BonusType::FEAR:
case BonusType::FEARFUL:
st->fear = true;
break;
default:
logNetwork->error("Unrecognized trigger effect type %d", pack.effect);
logNetwork->error("Unrecognized trigger effect type %d", static_cast<int>(pack.effect));
}
}