mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Renamed getMovementRange to ObtainMovementRange as per request
This commit is contained in:
parent
e348193f7e
commit
1bb5077231
@ -546,7 +546,7 @@ void CBattleInfoCallback::battleGetTurnOrder(std::vector<battle::Units> & turns,
|
||||
battleGetTurnOrder(turns, maxUnits, maxTurns, actualTurn + 1, sideThatLastMoved);
|
||||
}
|
||||
|
||||
std::vector<BattleHex> CBattleInfoCallback::battleGetAvailableHexes(const battle::Unit * unit, bool getMovementRange) const
|
||||
std::vector<BattleHex> CBattleInfoCallback::battleGetAvailableHexes(const battle::Unit * unit, bool obtainMovementRange) const
|
||||
{
|
||||
|
||||
RETURN_IF_NOT_BATTLE(std::vector<BattleHex>());
|
||||
@ -555,10 +555,10 @@ std::vector<BattleHex> CBattleInfoCallback::battleGetAvailableHexes(const battle
|
||||
|
||||
auto reachability = getReachability(unit);
|
||||
|
||||
return battleGetAvailableHexes(reachability, unit, getMovementRange);
|
||||
return battleGetAvailableHexes(reachability, unit, obtainMovementRange);
|
||||
}
|
||||
|
||||
std::vector<BattleHex> CBattleInfoCallback::battleGetAvailableHexes(const ReachabilityInfo & cache, const battle::Unit * unit, bool getMovementRange) const
|
||||
std::vector<BattleHex> CBattleInfoCallback::battleGetAvailableHexes(const ReachabilityInfo & cache, const battle::Unit * unit, bool obtainMovementRange) const
|
||||
{
|
||||
std::vector<BattleHex> ret;
|
||||
|
||||
@ -576,7 +576,7 @@ std::vector<BattleHex> CBattleInfoCallback::battleGetAvailableHexes(const Reacha
|
||||
if(!cache.isReachable(i))
|
||||
continue;
|
||||
|
||||
if(tacticsPhase && !getMovementRange) // if getMovementRange requested do not return tactics range
|
||||
if(tacticsPhase && !obtainMovementRange) // if obtainMovementRange requested do not return tactics range
|
||||
{
|
||||
// Stack has to perform tactic-phase movement -> can enter any reachable tile within given range
|
||||
if(!isInTacticRange(i))
|
||||
@ -595,9 +595,9 @@ std::vector<BattleHex> CBattleInfoCallback::battleGetAvailableHexes(const Reacha
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<BattleHex> CBattleInfoCallback::battleGetAvailableHexes(const battle::Unit * unit, bool getMovementRange, bool addOccupiable, std::vector<BattleHex> * attackable) const
|
||||
std::vector<BattleHex> CBattleInfoCallback::battleGetAvailableHexes(const battle::Unit * unit, bool obtainMovementRange, bool addOccupiable, std::vector<BattleHex> * attackable) const
|
||||
{
|
||||
std::vector<BattleHex> ret = battleGetAvailableHexes(unit, getMovementRange);
|
||||
std::vector<BattleHex> ret = battleGetAvailableHexes(unit, obtainMovementRange);
|
||||
|
||||
if(ret.empty())
|
||||
return ret;
|
||||
|
@ -77,12 +77,12 @@ public:
|
||||
void battleGetTurnOrder(std::vector<battle::Units> & out, const size_t maxUnits, const int maxTurns, const int turn = 0, int8_t lastMoved = -1) const;
|
||||
|
||||
///returns reachable hexes (valid movement destinations), DOES contain stack current position
|
||||
std::vector<BattleHex> battleGetAvailableHexes(const battle::Unit * unit, bool getMovementRange, bool addOccupiable, std::vector<BattleHex> * attackable) const;
|
||||
std::vector<BattleHex> battleGetAvailableHexes(const battle::Unit * unit, bool obtainMovementRange, bool addOccupiable, std::vector<BattleHex> * attackable) const;
|
||||
|
||||
///returns reachable hexes (valid movement destinations), DOES contain stack current position (lite version)
|
||||
std::vector<BattleHex> battleGetAvailableHexes(const battle::Unit * unit, bool getMovementRange) const;
|
||||
std::vector<BattleHex> battleGetAvailableHexes(const battle::Unit * unit, bool obtainMovementRange) const;
|
||||
|
||||
std::vector<BattleHex> battleGetAvailableHexes(const ReachabilityInfo & cache, const battle::Unit * unit, bool getMovementRange) const;
|
||||
std::vector<BattleHex> battleGetAvailableHexes(const ReachabilityInfo & cache, const battle::Unit * unit, bool obtainMovementRange) const;
|
||||
|
||||
int battleGetSurrenderCost(const PlayerColor & Player) const; //returns cost of surrendering battle, -1 if surrendering is not possible
|
||||
ReachabilityInfo::TDistances battleGetDistances(const battle::Unit * unit, BattleHex assumedPosition) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user