mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
cleanup
This commit is contained in:
parent
f39e619304
commit
f8767a6380
@ -38,7 +38,7 @@ BattleSpellCastParameters::BattleSpellCastParameters(const BattleInfo * cb, cons
|
||||
: spell(spell_), cb(cb), caster(caster), casterColor(caster->getOwner()), casterSide(cb->whatSide(casterColor)),
|
||||
casterHero(nullptr),
|
||||
mode(ECastingMode::HERO_CASTING), casterStack(nullptr),
|
||||
spellLvl(-1), effectLevel(-1), effectPower(0), enchantPower(0), effectValue(0)
|
||||
spellLvl(0), effectLevel(0), effectPower(0), enchantPower(0), effectValue(0)
|
||||
{
|
||||
casterStack = dynamic_cast<const CStack *>(caster);
|
||||
casterHero = dynamic_cast<const CGHeroInstance *>(caster);
|
||||
|
@ -4109,7 +4109,7 @@ bool CGameHandler::makeBattleAction( BattleAction &ba )
|
||||
|
||||
bsa.creID = summonedType;
|
||||
ui64 risedHp = summoner->count * summoner->valOfBonuses(Bonus::DAEMON_SUMMONING, bsa.creID.toEnum());
|
||||
ui64 targetHealth = destStack->getCreature()->MaxHealth() * destStack->baseAmount;//todo: ignore AGE effect
|
||||
ui64 targetHealth = destStack->getCreature()->MaxHealth() * destStack->baseAmount;
|
||||
|
||||
ui64 canRiseHp = std::min(targetHealth, risedHp);
|
||||
ui32 canRiseAmount = canRiseHp / VLC->creh->creatures.at(bsa.creID)->MaxHealth();
|
||||
|
Loading…
Reference in New Issue
Block a user