1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
This commit is contained in:
DjWarmonger 2012-06-09 19:24:04 +00:00
parent f378e5be31
commit cdb55500f3
2 changed files with 15 additions and 17 deletions

View File

@ -416,27 +416,19 @@ BattleHex BattleInfo::getClosestTile (bool attackerOwned, int initialPos, std::s
int BattleInfo::getAvaliableHex(TCreature creID, bool attackerOwned, int initialPos) const
{
/*
//FIXME: unused?
int pos;
if (initialPos > -1)
pos = initialPos;
else
{
if (attackerOwned)
pos = 0; //top left
else
pos = GameConstants::BFIELD_WIDTH; //top right
}
*/
bool ac[GameConstants::BFIELD_SIZE];
std::set<BattleHex> occupyable;
bool twoHex = VLC->creh->creatures[creID]->isDoubleWide();
bool flying = VLC->creh->creatures[creID]->isFlying();// vstd::contains(VLC->creh->creatures[creID]->bonuses, Bonus::FLYING);
getAccessibilityMap (ac, twoHex, attackerOwned, true, occupyable, flying);
bool flying = VLC->creh->creatures[creID]->isFlying();
std::set<BattleHex> occupyable;
getAccessibilityMap (ac, twoHex, attackerOwned, false, occupyable, flying);
for (int i = 0; i < GameConstants::BFIELD_SIZE; ++i)
{
if (ac[i])
occupyable.insert (i);
}
if (!occupyable.size())
return -1; //all tiles are covered

View File

@ -820,6 +820,12 @@ void CArtHandler::addBonuses()
{
makeItCommanderArt (i);
}
ART_PRIM_SKILL (146, 0, +6); //Axe of Smashing
giveArtBonus(147, Bonus::STACK_HEALTH, +12, -1, Bonus::PERCENT_TO_ALL); //Mithril Mail
giveArtBonus(148, Bonus::CREATURE_DAMAGE, +12, 0, Bonus::PERCENT_TO_ALL); //Sword of Sharpness
giveArtBonus(150, Bonus::CASTS, 1); //Pendant of Sorcery
giveArtBonus(151, Bonus::STACKS_SPEED, 1); //Boots of haste
ART_PRIM_SKILL (154, 0, +6); //Hardened Shield
}
}