mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
MoraleLuckBox: handle BLOCK_LUCK bonus. Fix issue 2130
This commit is contained in:
parent
6f5c52a229
commit
8eb4f14ff0
@ -380,7 +380,16 @@ void MoraleLuckBox::set(const IBonusBearer *node)
|
||||
if (morale && node && (node->hasBonusOfType(Bonus::UNDEAD)
|
||||
|| node->hasBonusOfType(Bonus::BLOCK_MORALE)
|
||||
|| node->hasBonusOfType(Bonus::NON_LIVING)))
|
||||
text += CGI->generaltexth->arraytxt[113]; //unaffected by morale
|
||||
{
|
||||
text += CGI->generaltexth->arraytxt[113]; //unaffected by morale
|
||||
bonusValue = 0;
|
||||
}
|
||||
else if(!morale && node && node->hasBonusOfType(Bonus::BLOCK_LUCK))
|
||||
{
|
||||
// TODO: there is no text like "Unaffected by luck" so probably we need own text
|
||||
text += CGI->generaltexth->arraytxt[noneTxtId];
|
||||
bonusValue = 0;
|
||||
}
|
||||
else if(modifierList->empty())
|
||||
text += CGI->generaltexth->arraytxt[noneTxtId];//no modifiers
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user