1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Merge branch 'develop' into SpellsRefactoring4

This commit is contained in:
AlexVinS
2014-11-28 22:44:33 +03:00
2 changed files with 3 additions and 1 deletions

View File

@@ -1949,7 +1949,7 @@ SpellID CBattleInfoCallback::getRandomBeneficialSpell(const CStack * subject) co
for(const CSpell *spell : VLC->spellh->objects) for(const CSpell *spell : VLC->spellh->objects)
{ {
if (spell->isPositive()) //only positive if (spell->isPositive() && !spell->isRisingSpell()) //only positive and not rising
{ {
if (subject->hasBonusFrom(Bonus::SPELL_EFFECT, spell->id) if (subject->hasBonusFrom(Bonus::SPELL_EFFECT, spell->id)
|| battleCanCastThisSpellHere(subject->owner, spell, ECastingMode::CREATURE_ACTIVE_CASTING, subject->position) != ESpellCastProblem::OK) || battleCanCastThisSpellHere(subject->owner, spell, ECastingMode::CREATURE_ACTIVE_CASTING, subject->position) != ESpellCastProblem::OK)
@@ -2020,6 +2020,7 @@ SpellID CBattleInfoCallback::getRandomBeneficialSpell(const CStack * subject) co
continue; continue;
} }
break; break;
case SpellID::TELEPORT: //issue 1928
case SpellID::CLONE: //not allowed case SpellID::CLONE: //not allowed
continue; continue;
break; break;

View File

@@ -1204,6 +1204,7 @@ void BattleResult::applyGs( CGameState *gs )
void BattleStackMoved::applyGs( CGameState *gs ) void BattleStackMoved::applyGs( CGameState *gs )
{ {
CStack *s = gs->curB->getStack(stack); CStack *s = gs->curB->getStack(stack);
assert(s);
BattleHex dest = tilesToMove.back(); BattleHex dest = tilesToMove.back();
//if unit ended movement on quicksands that were created by enemy, that quicksand patch becomes visible for owner //if unit ended movement on quicksands that were created by enemy, that quicksand patch becomes visible for owner