mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
@ -1108,7 +1108,13 @@ CBattleInterface::CBattleInterface(const CCreatureSet * army1, const CCreatureSe
|
|||||||
pos = myRect;
|
pos = myRect;
|
||||||
strongInterest = true;
|
strongInterest = true;
|
||||||
givenCommand = new CondSh<BattleAction *>(NULL);
|
givenCommand = new CondSh<BattleAction *>(NULL);
|
||||||
tacticsMode = curInt->cb->battleGetTacticDist();
|
|
||||||
|
if(attackerInt && attackerInt->cb->battleGetTacticDist()) //hotseat -> check tactics for both players (defender may be local human)
|
||||||
|
tacticianInterface = attackerInt;
|
||||||
|
else if(defenderInt && defenderInt->cb->battleGetTacticDist())
|
||||||
|
tacticianInterface = defenderInt;
|
||||||
|
|
||||||
|
tacticsMode = tacticianInterface; //if we found interface of player with tactics, then enter tactics mode
|
||||||
|
|
||||||
//create stack queue
|
//create stack queue
|
||||||
bool embedQueue = screen->h < 700;
|
bool embedQueue = screen->h < 700;
|
||||||
@ -3748,7 +3754,7 @@ static bool immobile(const CStack *s)
|
|||||||
|
|
||||||
void CBattleInterface::bTacticNextStack()
|
void CBattleInterface::bTacticNextStack()
|
||||||
{
|
{
|
||||||
TStacks stacksOfMine = curInt->cb->battleGetStacks(CBattleCallback::ONLY_MINE);
|
TStacks stacksOfMine = tacticianInterface->cb->battleGetStacks(CBattleCallback::ONLY_MINE);
|
||||||
stacksOfMine.erase(std::remove_if(stacksOfMine.begin(), stacksOfMine.end(), &immobile), stacksOfMine.end());
|
stacksOfMine.erase(std::remove_if(stacksOfMine.begin(), stacksOfMine.end(), &immobile), stacksOfMine.end());
|
||||||
TStacks::iterator it = vstd::find(stacksOfMine, activeStack);
|
TStacks::iterator it = vstd::find(stacksOfMine, activeStack);
|
||||||
if(it != stacksOfMine.end() && ++it != stacksOfMine.end())
|
if(it != stacksOfMine.end() && ++it != stacksOfMine.end())
|
||||||
|
@ -422,6 +422,7 @@ private:
|
|||||||
float getAnimSpeedMultiplier() const; //returns multiplier for number of frames in a group
|
float getAnimSpeedMultiplier() const; //returns multiplier for number of frames in a group
|
||||||
std::map<int, int> standingFrame; //number of frame in standing animation by stack ID, helps in showing 'random moves'
|
std::map<int, int> standingFrame; //number of frame in standing animation by stack ID, helps in showing 'random moves'
|
||||||
|
|
||||||
|
CPlayerInterface *tacticianInterface; //used during tactics mode, points to the interface of player with higher tactics (can be either attacker or defender in hot-seat), valid onloy for human players
|
||||||
bool tacticsMode;
|
bool tacticsMode;
|
||||||
bool spellDestSelectMode; //if true, player is choosing destination for his spell
|
bool spellDestSelectMode; //if true, player is choosing destination for his spell
|
||||||
int spellSelMode; //0 - any location, 1 - any friendly creature, 2 - any hostile creature, 3 - any creature,
|
int spellSelMode; //0 - any location, 1 - any friendly creature, 2 - any hostile creature, 3 - any creature,
|
||||||
|
@ -1494,7 +1494,7 @@ void CGHeroInstance::deserializationFix()
|
|||||||
if(i->second.artifact && !i->second.locked)
|
if(i->second.artifact && !i->second.locked)
|
||||||
attachTo(i->second.artifact);
|
attachTo(i->second.artifact);
|
||||||
|
|
||||||
attachTo(&speciality);
|
//attachTo(&speciality);
|
||||||
}
|
}
|
||||||
|
|
||||||
CBonusSystemNode * CGHeroInstance::whereShouldBeAttached(CGameState *gs)
|
CBonusSystemNode * CGHeroInstance::whereShouldBeAttached(CGameState *gs)
|
||||||
|
@ -2254,7 +2254,8 @@ std::string IexpValStr::getName() const
|
|||||||
{
|
{
|
||||||
return "Literal " + boost::lexical_cast<std::string>(getInt());
|
return "Literal " + boost::lexical_cast<std::string>(getInt());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return "Unknown variable";
|
||||||
}
|
}
|
||||||
|
|
||||||
void ERMInterpreter::init()
|
void ERMInterpreter::init()
|
||||||
|
@ -1175,6 +1175,8 @@ const CGHeroInstance* CGameInfoCallback::getHeroWithSubid( int subid ) const
|
|||||||
BOOST_FOREACH(const CGHeroInstance *h, gs->map->heroes)
|
BOOST_FOREACH(const CGHeroInstance *h, gs->map->heroes)
|
||||||
if(h->subID == subid)
|
if(h->subID == subid)
|
||||||
return h;
|
return h;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user