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<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
shared_ptr<constCObstacleInstance>battleGetObstacleOnPos(BattleHextile,boolonlyBlocking=true)const;//blocking obstacles makes tile inaccessible, others cause special effects (like Land Mines, Moat, Quicksands)
constCStack*battleGetStackByPos(BattleHexpos,boolonlyAlive=true)const;//returns stack info by given pos
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]
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()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
ui32battleGetSpellCost(constCSpell*sp,constCGHeroInstance*caster)const;//returns cost of given spell
ESpellCastProblem::ESpellCastProblembattleCanCastSpell(PlayerColorplayer,ECastingMode::ECastingModemode)const;//returns true if there are no general issues preventing from casting a spell
ESpellCastProblem::ESpellCastProblembattleCanCastThisSpell(PlayerColorplayer,constCSpell*spell,ECastingMode::ECastingModemode)const;//checks if given player can cast given spell
ESpellCastProblem::ESpellCastProblembattleCanCastThisSpellHere(PlayerColorplayer,constCSpell*spell,ECastingMode::ECastingModemode,BattleHexdest)const;//checks if given player can cast given spell at given tile in given mode
ESpellCastProblem::ESpellCastProblembattleCanCreatureCastThisSpell(constCSpell*spell,BattleHexdestination)const;//determines if creature can cast a spell here
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
boolbattleCanFlee()const;//returns true if caller can flee from the battle
TStacksbattleGetStacks(EStackOwnershipwhose=MINE_AND_ENEMY,boolonlyAlive=true)const;//returns stacks on battlefield
ESpellCastProblem::ESpellCastProblembattleCanCastThisSpell(constCSpell*spell)const;//determines if given spell can be casted (and returns problem description)
ESpellCastProblem::ESpellCastProblembattleCanCastThisSpell(constCSpell*spell,BattleHexdestination)const;//if hero can cast spell here
ESpellCastProblem::ESpellCastProblembattleCanCreatureCastThisSpell(constCSpell*spell,BattleHexdestination)const;//determines if creature can cast a spell here
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.