mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Handle monster agressivness for VISIONS spell
This commit is contained in:
parent
b846b717a1
commit
b9bdc95a7e
@ -103,11 +103,33 @@ std::string CGCreature::getHoverText(const CGHeroInstance * hero) const
|
|||||||
{
|
{
|
||||||
std::string hoverName;
|
std::string hoverName;
|
||||||
if(hero->hasVisions(this, 0))
|
if(hero->hasVisions(this, 0))
|
||||||
{
|
{
|
||||||
MetaString ms;
|
MetaString ms;
|
||||||
ms << stacks.begin()->second->count;
|
ms << stacks.begin()->second->count;
|
||||||
ms << " " ;
|
ms << " " ;
|
||||||
ms.addTxt(MetaString::CRE_PL_NAMES,subID);
|
ms.addTxt(MetaString::CRE_PL_NAMES,subID);
|
||||||
|
|
||||||
|
ms << "\n";
|
||||||
|
|
||||||
|
int decision = takenAction(hero, true);
|
||||||
|
|
||||||
|
switch (decision)
|
||||||
|
{
|
||||||
|
case FIGHT:
|
||||||
|
ms.addTxt(MetaString::GENERAL_TXT,246);
|
||||||
|
break;
|
||||||
|
case FLEE:
|
||||||
|
ms.addTxt(MetaString::GENERAL_TXT,245);
|
||||||
|
break;
|
||||||
|
case JOIN_FOR_FREE:
|
||||||
|
ms.addTxt(MetaString::GENERAL_TXT,243);
|
||||||
|
break;
|
||||||
|
default: //decision = cost in gold
|
||||||
|
VLC->generaltexth->allTexts[244];
|
||||||
|
ms << boost::to_string(boost::format(VLC->generaltexth->allTexts[244]) % decision);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ms.toString(hoverName);
|
ms.toString(hoverName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user