mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
not hardcore armageddon
This commit is contained in:
parent
3c0d424958
commit
4676817c3b
@ -23,6 +23,7 @@
|
|||||||
#include "../../lib/mapObjects/CGTownInstance.h"
|
#include "../../lib/mapObjects/CGTownInstance.h"
|
||||||
#include "../../lib/networkPacks/PacksForClientBattle.h"
|
#include "../../lib/networkPacks/PacksForClientBattle.h"
|
||||||
#include "../../lib/spells/BonusCaster.h"
|
#include "../../lib/spells/BonusCaster.h"
|
||||||
|
#include "../../lib/spells/CSpellHandler.h"
|
||||||
#include "../../lib/spells/ISpellMechanics.h"
|
#include "../../lib/spells/ISpellMechanics.h"
|
||||||
#include "../../lib/spells/ObstacleCasterProxy.h"
|
#include "../../lib/spells/ObstacleCasterProxy.h"
|
||||||
|
|
||||||
@ -128,7 +129,7 @@ void BattleFlowProcessor::tryPlaceMoats(const CBattleInfoCallback & battle)
|
|||||||
void BattleFlowProcessor::onBattleStarted(const CBattleInfoCallback & battle)
|
void BattleFlowProcessor::onBattleStarted(const CBattleInfoCallback & battle)
|
||||||
{
|
{
|
||||||
tryPlaceMoats(battle);
|
tryPlaceMoats(battle);
|
||||||
|
|
||||||
gameHandler->turnTimerHandler->onBattleStart(battle.getBattle()->getBattleID());
|
gameHandler->turnTimerHandler->onBattleStart(battle.getBattle()->getBattleID());
|
||||||
|
|
||||||
if (battle.battleGetTacticDist() == 0)
|
if (battle.battleGetTacticDist() == 0)
|
||||||
@ -321,7 +322,7 @@ void BattleFlowProcessor::activateNextStack(const CBattleInfoCallback & battle)
|
|||||||
|
|
||||||
if(!removeGhosts.changedStacks.empty())
|
if(!removeGhosts.changedStacks.empty())
|
||||||
gameHandler->sendAndApply(&removeGhosts);
|
gameHandler->sendAndApply(&removeGhosts);
|
||||||
|
|
||||||
gameHandler->turnTimerHandler->onBattleNextStack(battle.getBattle()->getBattleID(), *next);
|
gameHandler->turnTimerHandler->onBattleNextStack(battle.getBattle()->getBattleID(), *next);
|
||||||
|
|
||||||
if (!tryMakeAutomaticAction(battle, next))
|
if (!tryMakeAutomaticAction(battle, next))
|
||||||
@ -759,8 +760,11 @@ void BattleFlowProcessor::stackTurnTrigger(const CBattleInfoCallback & battle, c
|
|||||||
});
|
});
|
||||||
spells::BattleCast parameters(&battle, st, spells::Mode::ENCHANTER, spell);
|
spells::BattleCast parameters(&battle, st, spells::Mode::ENCHANTER, spell);
|
||||||
parameters.setSpellLevel(bonus->val);
|
parameters.setSpellLevel(bonus->val);
|
||||||
//todo: not hardcode
|
|
||||||
if (spellID != SpellID::ARMAGEDDON) {
|
auto &levelInfo = spell->getLevelInfo(bonus->val);
|
||||||
|
bool isDamageSpell = spell->isDamage() || spell->isOffensive();
|
||||||
|
if (!isDamageSpell || levelInfo.smartTarget || levelInfo.range != "X")
|
||||||
|
{
|
||||||
parameters.massive = true;
|
parameters.massive = true;
|
||||||
parameters.smart = true;
|
parameters.smart = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user