mirror of
https://github.com/vcmi/vcmi.git
synced 2025-10-08 23:22:25 +02:00
Make any hex shooting possibility configurable
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "BattleInfo.h"
|
||||
#include "CObstacleInstance.h"
|
||||
#include "DamageCalculator.h"
|
||||
#include "IGameSettings.h"
|
||||
#include "PossiblePlayerBattleAction.h"
|
||||
#include "../entities/building/TownFortifications.h"
|
||||
#include "../spells/ObstacleCasterProxy.h"
|
||||
@@ -729,6 +730,9 @@ bool CBattleInfoCallback::battleCanTargetEmptyHex(const battle::Unit * attacker)
|
||||
{
|
||||
RETURN_IF_NOT_BATTLE(false);
|
||||
|
||||
if(!VLC->engineSettings()->getBoolean(EGameSettings::COMBAT_AREA_SHOT_CAN_TARGET_EMPTY_HEX))
|
||||
return false;
|
||||
|
||||
if(attacker->hasBonusOfType(BonusType::SPELL_LIKE_ATTACK))
|
||||
{
|
||||
auto bonus = attacker->getBonus(Selector::type()(BonusType::SPELL_LIKE_ATTACK));
|
||||
|
Reference in New Issue
Block a user