mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-31 22:05:10 +02:00
hackfix for commander spells
This commit is contained in:
parent
4a9978c642
commit
5e0a9d7966
@ -731,7 +731,7 @@ ESpellCastProblem::ESpellCastProblem SpecialRisingSpellMechanics::canBeCast(cons
|
|||||||
{
|
{
|
||||||
const bool ownerMatches = !ctx.ti.smart || s->getOwner() == ctx.caster->getOwner();
|
const bool ownerMatches = !ctx.ti.smart || s->getOwner() == ctx.caster->getOwner();
|
||||||
|
|
||||||
return ownerMatches && s->isValidTarget(true) && s->coversPos(ctx.destination);
|
return ownerMatches && s->isValidTarget(!ctx.ti.onlyAlive) && s->coversPos(ctx.destination);
|
||||||
});
|
});
|
||||||
|
|
||||||
if(nullptr == stack)
|
if(nullptr == stack)
|
||||||
|
@ -664,7 +664,11 @@ std::vector<const CStack *> DefaultSpellMechanics::calculateAffectedStacks(const
|
|||||||
std::set<const CStack* > attackedCres;//std::set to exclude multiple occurrences of two hex creatures
|
std::set<const CStack* > attackedCres;//std::set to exclude multiple occurrences of two hex creatures
|
||||||
|
|
||||||
const ui8 attackerSide = cb->playerToSide(ctx.caster->getOwner()) == 1;
|
const ui8 attackerSide = cb->playerToSide(ctx.caster->getOwner()) == 1;
|
||||||
const auto attackedHexes = rangeInHexes(ctx.destination, ctx.schoolLvl, attackerSide);
|
auto attackedHexes = rangeInHexes(ctx.destination, ctx.schoolLvl, attackerSide);
|
||||||
|
|
||||||
|
//hackfix for banned creature massive spells
|
||||||
|
if(!ctx.ti.massive && owner->getLevelInfo(ctx.schoolLvl).range == "X")
|
||||||
|
attackedHexes.push_back(ctx.destination);
|
||||||
|
|
||||||
auto mainFilter = [=](const CStack * s)
|
auto mainFilter = [=](const CStack * s)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user