mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
- Fixed Remove Obstacle spell
- Fixed freeze at Chain Lightning
This commit is contained in:
@@ -697,7 +697,7 @@ void CBattleInterface::show(SDL_Surface * to)
|
|||||||
activate();
|
activate();
|
||||||
|
|
||||||
//activation of next stack
|
//activation of next stack
|
||||||
if(pendingAnims.size() == 0 && stackToActivate != NULL)
|
if(pendingAnims.size() == 0 && stackToActivate != NULL) //FIXME: Faerie Dragon's Chain Lightning doesn't have animation ATM
|
||||||
{
|
{
|
||||||
activateStack();
|
activateStack();
|
||||||
}
|
}
|
||||||
@@ -1601,6 +1601,8 @@ void CBattleInterface::spellCast( const BattleSpellCast * sc )
|
|||||||
case Spells::SUMMON_WATER_ELEMENTAL:
|
case Spells::SUMMON_WATER_ELEMENTAL:
|
||||||
case Spells::SUMMON_AIR_ELEMENTAL:
|
case Spells::SUMMON_AIR_ELEMENTAL:
|
||||||
case Spells::CLONE: //TODO: make it smarter?
|
case Spells::CLONE: //TODO: make it smarter?
|
||||||
|
case Spells::REMOVE_OBSTACLE:
|
||||||
|
case Spells::CHAIN_LIGHTNING:
|
||||||
addNewAnim(new CDummyAnimation(this, 2));
|
addNewAnim(new CDummyAnimation(this, 2));
|
||||||
break;
|
break;
|
||||||
} //switch(sc->id)
|
} //switch(sc->id)
|
||||||
@@ -1836,8 +1838,8 @@ void CBattleInterface::castThisSpell(int spellID)
|
|||||||
if(sp->getTargetType() == CSpell::OBSTACLE)
|
if(sp->getTargetType() == CSpell::OBSTACLE)
|
||||||
{
|
{
|
||||||
spellSelMode = OBSTACLE;
|
spellSelMode = OBSTACLE;
|
||||||
}
|
} //FIXME: Remove Obstacle has range X, unfortunatelly :(
|
||||||
if(sp->range[ castingHero->getSpellSchoolLevel(sp) ] == "X") //spell has no range
|
else if(sp->range[ castingHero->getSpellSchoolLevel(sp) ] == "X") //spell has no range
|
||||||
{
|
{
|
||||||
spellSelMode = NO_LOCATION;
|
spellSelMode = NO_LOCATION;
|
||||||
}
|
}
|
||||||
@@ -2756,7 +2758,8 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OBSTACLE:
|
case OBSTACLE:
|
||||||
legalAction = false; //TODO
|
if (isCastingPossibleHere (sactive, shere, myNumber))
|
||||||
|
legalAction = true; //TODO
|
||||||
break;
|
break;
|
||||||
case TELEPORT:
|
case TELEPORT:
|
||||||
{
|
{
|
||||||
@@ -2913,7 +2916,7 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
|
|||||||
case OBSTACLE:
|
case OBSTACLE:
|
||||||
consoleMsg = CGI->generaltexth->allTexts[550];
|
consoleMsg = CGI->generaltexth->allTexts[550];
|
||||||
isCastingPossible = true;
|
isCastingPossible = true;
|
||||||
break;;
|
break;
|
||||||
case HEAL:
|
case HEAL:
|
||||||
cursorFrame = ECursor::COMBAT_HEAL;
|
cursorFrame = ECursor::COMBAT_HEAL;
|
||||||
consoleMsg = (boost::format(CGI->generaltexth->allTexts[419]) % shere->getName()).str(); //Apply first aid to the %s
|
consoleMsg = (boost::format(CGI->generaltexth->allTexts[419]) % shere->getName()).str(); //Apply first aid to the %s
|
||||||
|
@@ -190,7 +190,7 @@ std::set<ui16> CSpell::rangeInHexes(unsigned int centralHex, ui8 schoolLvl ) con
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
CSpell::ETargetType CSpell::getTargetType() const
|
CSpell::ETargetType CSpell::getTargetType() const //TODO: parse these at game launch
|
||||||
{
|
{
|
||||||
if(attributes.find("CREATURE_TARGET_1") != std::string::npos
|
if(attributes.find("CREATURE_TARGET_1") != std::string::npos
|
||||||
|| attributes.find("CREATURE_TARGET_2") != std::string::npos)
|
|| attributes.find("CREATURE_TARGET_2") != std::string::npos)
|
||||||
|
Reference in New Issue
Block a user