Battle::Tower::Tower(const Castle & castle, int twr) : Unit(Troop(Monster::ARCHER, 0), -1, false), type(twr), color(castle.GetColor()), bonus(0), valid(true) { count += castle.CountBuildings(); count += castle.GetLevelMageGuild() - 1; if(count > 20) count = 20; if(TWR_CENTER != type) count /= 2; if(count == 0) count = 1; bonus = castle.GetLevelMageGuild(); SetModes(CAP_TOWER); }
bool DwellingsBar::ActionBarPressRight(const Point & cursor, DwellingItem & dwl, const Rect & pos) { Dialog::ArmyInfo(Troop(dwl.mons, castle.GetDwellingLivedCount(dwl.type)), 0); return true; }
void Troop::Set(const Monster & m, u32 c) { Set(Troop(m, c)); }