mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Actually use ANY_CREATURE possible action
* this fixes mantiss 0002140
This commit is contained in:
parent
cc8c1aea36
commit
e1deff089d
@ -2177,6 +2177,10 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
|
||||
legalAction = true;
|
||||
}
|
||||
break;
|
||||
case ANY_CREATURE:
|
||||
if (shere && shere->alive() && isCastingPossibleHere (sactive, shere, myNumber))
|
||||
legalAction = true;
|
||||
break;
|
||||
case HOSTILE_CREATURE_SPELL:
|
||||
if (shere && shere->alive() && !ourStack && isCastingPossibleHere (sactive, shere, myNumber))
|
||||
legalAction = true;
|
||||
@ -2372,6 +2376,7 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
|
||||
break;
|
||||
case HOSTILE_CREATURE_SPELL:
|
||||
case FRIENDLY_CREATURE_SPELL:
|
||||
case ANY_CREATURE:
|
||||
sp = CGI->spellh->objects[creatureCasting ? creatureSpellToCast : spellToCast->additionalInfo]; //necessary if creature has random Genie spell at same time
|
||||
consoleMsg = boost::str(boost::format(CGI->generaltexth->allTexts[27]) % sp->name % shere->getName()); //Cast %s on %s
|
||||
switch (sp->id)
|
||||
@ -2442,6 +2447,7 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
|
||||
{
|
||||
switch (illegalAction)
|
||||
{
|
||||
case ANY_CREATURE:
|
||||
case HOSTILE_CREATURE_SPELL:
|
||||
case FRIENDLY_CREATURE_SPELL:
|
||||
case RANDOM_GENIE_SPELL:
|
||||
|
Loading…
Reference in New Issue
Block a user