std::vector<BattleHex>knownAccessible;//hexes that will be treated as accessible, even if they're occupied by stack (by default - tiles occupied by stack we do reachability for, so it doesn't block itself)
std::vector<std::shared_ptr<constCObstacleInstance>>battleGetAllObstacles(boost::optional<BattlePerspective::BattlePerspective>perspective=boost::none)const;//returns all obstacles on the battlefield
//ESpellCastProblem::ESpellCastProblem battleCanCastSpell(int player, ECastingMode::ECastingMode mode) const; //Checks if player is able to cast spells (at all) at the moment
std::shared_ptr<constCObstacleInstance>battleGetObstacleOnPos(BattleHextile,boolonlyBlocking=true)const;//blocking obstacles makes tile inaccessible, others cause special effects (like Land Mines, Moat, Quicksands)
std::vector<BattleHex>battleGetAvailableHexes(constCStack*stack,booladdOccupiable,std::vector<BattleHex>*attackable=nullptr)const;//returns hexes reachable by creature with id ID (valid movement destinations), DOES contain stack current position
ReachabilityInfo::TDistancesbattleGetDistances(constCStack*stack,BattleHexhex=BattleHex::INVALID,BattleHex*predecessors=nullptr)const;//returns vector of distances to [dest hex number]
boolbattleCanAttack(constCStack*stack,constCStack*target,BattleHexdest)const;//determines if stack with given ID can attack target at the selected destination
TDmgRangecalculateDmgRange(constBattleAttackInfo&info)const;//charge - number of hexes travelled before attack (for champion's jousting); returns pair <min dmg, max dmg>
TDmgRangecalculateDmgRange(constCStack*attacker,constCStack*defender,TQuantityattackerCount,boolshooting,ui8charge,boollucky,boolunlucky,booldeathBlow,boolballistaDoubleDmg)const;//charge - number of hexes travelled before attack (for champion's jousting); returns pair <min dmg, max dmg>
TDmgRangecalculateDmgRange(constCStack*attacker,constCStack*defender,boolshooting,ui8charge,boollucky,boolunlucky,booldeathBlow,boolballistaDoubleDmg)const;//charge - number of hexes travelled before attack (for champion's jousting); returns pair <min dmg, max dmg>
std::pair<ui32,ui32>battleEstimateDamage(constBattleAttackInfo&bai,std::pair<ui32,ui32>*retaliationDmg=nullptr)const;//estimates damage dealt by attacker to defender; it may be not precise especially when stack has randomly working bonuses; returns pair <min dmg, max dmg>
std::pair<ui32,ui32>battleEstimateDamage(constCStack*attacker,constCStack*defender,std::pair<ui32,ui32>*retaliationDmg=nullptr)const;//estimates damage dealt by attacker to defender; it may be not precise especially when stack has randomly working bonuses; returns pair <min dmg, max dmg>
EWallPart::EWallPartbattleHexToWallPart(BattleHexhex)const;//returns part of destructible wall / gate / keep under given hex or -1 if not found
boolisWallPartPotentiallyAttackable(EWallPart::EWallPartwallPart)const;// returns true if the wall part is potentially attackable (independent of wall state), false if not
si8battleMaxSpellLevel(ui8side)const;//calculates minimum spell level possible to be cast on battlefield - takes into account artifacts of both heroes; if no effects are set, 0 is returned
ESpellCastProblem::ESpellCastProblembattleCanCastSpell(PlayerColorplayer,ECastingMode::ECastingModemode)const;//returns true if there are no general issues preventing from casting a spell
ESpellCastProblem::ESpellCastProblembattleCanCastThisSpell(constISpellCaster*caster,constCSpell*spell,ECastingMode::ECastingModemode)const;//checks if given player can cast given spell
ESpellCastProblem::ESpellCastProblembattleCanCastThisSpellHere(constISpellCaster*caster,constCSpell*spell,ECastingMode::ECastingModemode,BattleHexdest)const;//checks if given player can cast given spell at given tile in given mode
si8battleCanTeleportTo(constCStack*stack,BattleHexdestHex,inttelportLevel)const;//checks if teleportation of given stack to given position can take place
//convenience methods using the ones above
boolisInTacticRange(BattleHexdest)const;
si8battleGetTacticDist()const;//returns tactic distance for calling player or 0 if this player is not in tactic phase (for ALL_KNOWING actual distance for tactic side)
std::set<constCStack*>getAttackedCreatures(constCStack*attacker,BattleHexdestinationTile,BattleHexattackerPos=BattleHex::INVALID)const;//calculates range of multi-hex attacks
boolisToReverse(BattleHexhexFrom,BattleHexhexTo,boolcurDir/*if true, creature is in attacker's direction*/,booltoDoubleWide,booltoDir)const;//determines if creature should be reversed (it stands on hexFrom and should 'see' hexTo)
boolisToReverseHlp(BattleHexhexFrom,BattleHexhexTo,boolcurDir)const;//helper for isToReverse
ESpellCastProblem::ESpellCastProblembattleCanCastThisSpell(constCSpell*spell)const;//determines if given spell can be cast (and returns problem description)
intbattleGetSurrenderCost()const;//returns cost of surrendering battle, -1 if surrendering is not possible
boolbattleCanCastSpell(ESpellCastProblem::ESpellCastProblem*outProblem=nullptr)const;//returns true, if caller can cast a spell. If not, if pointer is given via arg, the reason will be written.