From 89bd7e273d757a9e1be368467d507f500f027f1b Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Sat, 8 Oct 2011 16:58:25 +0000 Subject: [PATCH] - fixed #808 - Implemented Json validator and schema for buildings.json - several fixes for Json writing - fixed several gcc warnings --- client/CBattleInterface.cpp | 8 +- client/GUIClasses.cpp | 228 ++--- client/GUIClasses.h | 36 +- config/buildings.json | 1704 ++++++++++++++++++----------------- lib/CGameState.cpp | 4 +- lib/JsonNode.cpp | 361 ++++++-- lib/JsonNode.h | 51 +- 7 files changed, 1330 insertions(+), 1062 deletions(-) diff --git a/client/CBattleInterface.cpp b/client/CBattleInterface.cpp index aa86ee4f9..24603d9a0 100644 --- a/client/CBattleInterface.cpp +++ b/client/CBattleInterface.cpp @@ -1184,8 +1184,8 @@ void CBattleInterface::addNewAnim(CBattleAnimation * anim) CBattleInterface::CBattleInterface(const CCreatureSet * army1, const CCreatureSet * army2, CGHeroInstance *hero1, CGHeroInstance *hero2, const SDL_Rect & myRect, CPlayerInterface * att, CPlayerInterface * defen) : queue(NULL), attackingHeroInstance(hero1), defendingHeroInstance(hero2), animCount(0), - activeStack(NULL), stackToActivate(NULL), mouseHoveredStack(-1), lastMouseHoveredStackAnimationTime(-1), previouslyHoveredHex(-1), spellSelMode(NO_LOCATION), - currentlyHoveredHex(-1), attackingHex(-1), tacticianInterface(NULL), stackCanCastSpell(false), spellDestSelectMode(false), spellToCast(NULL), + activeStack(NULL), stackToActivate(NULL), mouseHoveredStack(-1), lastMouseHoveredStackAnimationTime(-1), previouslyHoveredHex(-1), + currentlyHoveredHex(-1), attackingHex(-1), tacticianInterface(NULL), stackCanCastSpell(false), spellDestSelectMode(false), spellSelMode(NO_LOCATION), spellToCast(NULL), siegeH(NULL), attackerInt(att), defenderInt(defen), curInt(att), animIDhelper(0), givenCommand(NULL), myTurn(false), resWindow(NULL), moveStarted(false), moveSh(-1), bresult(NULL) @@ -2043,7 +2043,7 @@ void CBattleInterface::mouseMoved(const SDL_MouseMotionEvent &sEvent) const CSpell * spell = CGI->spellh->spells[creatureSpellToCast]; if (curInt->cb->battleCanCastThisSpell(spell, THex(myNumber)) == SpellCasting::OK) { - if (spell->positiveness > -1 && ourStack || spell->positiveness < 1 && !ourStack) + if ((spell->positiveness > -1 && ourStack) || (spell->positiveness < 1 && !ourStack)) { CCS->curh->changeGraphic(3, 0); stackCastsSpell = true; @@ -2869,7 +2869,7 @@ void CBattleInterface::hexLclicked(int whichOne) const CSpell * spell = CGI->spellh->spells[creatureSpellToCast]; if (curInt->cb->battleCanCastThisSpell(spell, THex(whichOne)) == SpellCasting::OK) { - if (spell->positiveness > -1 && ourStack || spell->positiveness < 1 && !ourStack) + if ((spell->positiveness > -1 && ourStack) || (spell->positiveness < 1 && !ourStack)) { giveCommand(BattleAction::MONSTER_SPELL, whichOne, actSt->ID, creatureSpellToCast); } diff --git a/client/GUIClasses.cpp b/client/GUIClasses.cpp index d71877fb4..d4c5902fb 100644 --- a/client/GUIClasses.cpp +++ b/client/GUIClasses.cpp @@ -2052,122 +2052,124 @@ void CSplitWindow::clickLeft(tribool down, bool previousState) } } - -void CCreInfoWindow::show(SDL_Surface * to) +void CCreInfoWindow::show(SDL_Surface *to) { - blitAt(*bitmap,pos.x,pos.y,to); - anim->show(to); - if(count.size()) - printTo(count.c_str(),pos.x+114,pos.y+174,FONT_TIMES,zwykly,to); - if(upgrade) - upgrade->showAll(to); - if(dismiss) - dismiss->showAll(to); - if(ok) - ok->showAll(to); + CIntObject::show(to); + creatureCount->showAll(to); } -CCreInfoWindow::CCreInfoWindow(const CStackInstance &st, int Type, boost::function Upg, boost::function Dsm, UpgradeInfo *ui) - : type(Type), dsm(Dsm), dismiss(0), upgrade(0), ok(0) +CCreInfoWindow::CCreInfoWindow(const CStackInstance &stack, bool LClicked, boost::function upgradeFunc, boost::function dismissFunc, UpgradeInfo *upgradeInfo) { OBJ_CONSTRUCTION_CAPTURING_ALL; - init(st.type, &st, dynamic_cast(st.armyObj), st.count); + init(stack.type, &stack, dynamic_cast(stack.armyObj), stack.count, LClicked); - //print abilities text - if r-click popup - if(type) + //additional buttons if opened with left click + if(LClicked) { - if(Upg && ui) + boost::function closeFunc = boost::bind(&CCreInfoWindow::close,this); + + if(upgradeFunc && upgradeInfo) { - TResources upgradeCost = ui->cost[0] * st.count; + TResources upgradeCost = upgradeInfo->cost[0] * stack.count; for(TResources::nziterator i(upgradeCost); i.valid(); i++) { BLOCK_CAPTURING; upgResCost.push_back(new SComponent(SComponent::resource, i->resType, i->resVal)); } - if(LOCPLINT->cb->getResourceAmount().canAfford(upgradeCost)) - { - CFunctionList fs; - fs += Upg; - fs += boost::bind(&CCreInfoWindow::close,this); - CFunctionList cfl; - cfl = boost::bind(&CPlayerInterface::showYesNoDialog, LOCPLINT, CGI->generaltexth->allTexts[207], boost::ref(upgResCost), fs, 0, true); - upgrade = new AdventureMapButton("",CGI->generaltexth->zelp[446].second,cfl,76,237,"IVIEWCR.DEF",SDLK_u); - } - else - { - upgrade = new AdventureMapButton("",CGI->generaltexth->zelp[446].second,boost::function(),76,237,"IVIEWCR.DEF"); - upgrade->callback.funcs.clear(); - upgrade->setOffset(2); - } + CFunctionList onUpgrade; + onUpgrade += upgradeFunc; + onUpgrade += closeFunc; + boost::function dialog = boost::bind(&CPlayerInterface::showYesNoDialog, + LOCPLINT, + CGI->generaltexth->allTexts[207], + boost::ref(upgResCost), + onUpgrade, 0, false); + + upgrade = new AdventureMapButton("", CGI->generaltexth->zelp[446].second, dialog, 76, 237, "IVIEWCR", SDLK_u); + upgrade->block(!LOCPLINT->cb->getResourceAmount().canAfford(upgradeCost)); } - if(Dsm) + + if(dismissFunc) { - CFunctionList fs[2]; - //on dismiss confirmed - fs[0] += Dsm; //dismiss - fs[0] += boost::bind(&CCreInfoWindow::close,this);//close this window - CFunctionList cfl; - cfl = boost::bind(&CPlayerInterface::showYesNoDialog,LOCPLINT,CGI->generaltexth->allTexts[12],std::vector(),fs[0],fs[1],true); - dismiss = new AdventureMapButton("",CGI->generaltexth->zelp[445].second,cfl,21,237,"IVIEWCR2.DEF",SDLK_d); + CFunctionList onDismiss; + onDismiss += dismissFunc; + onDismiss += closeFunc; + + boost::function dialog = boost::bind(&CPlayerInterface::showYesNoDialog, + LOCPLINT, + CGI->generaltexth->allTexts[12], + std::vector(), + onDismiss, 0, true); + + dismiss = new AdventureMapButton("", CGI->generaltexth->zelp[445].second, dialog, 21, 237, "IVIEWCR2",SDLK_d); } - ok = new AdventureMapButton("",CGI->generaltexth->zelp[445].second,boost::bind(&CCreInfoWindow::close,this),216,237,"IOKAY.DEF",SDLK_RETURN); + + ok = new AdventureMapButton("", CGI->generaltexth->zelp[445].second, + boost::bind(&CCreInfoWindow::close,this), 216, 237, "IOKAY.DEF", SDLK_RETURN); } } - - -CCreInfoWindow::CCreInfoWindow(int Cid, int Type, int creatureCount) - : type(Type), dismiss(0), upgrade(0), ok(0) +CCreInfoWindow::CCreInfoWindow(int creatureID, bool LClicked, int creatureCount) { OBJ_CONSTRUCTION_CAPTURING_ALL; - const CCreature *cre = CGI->creh->creatures[Cid]; - init(cre, NULL, NULL, creatureCount); + const CCreature *creature = CGI->creh->creatures[creatureID]; + init(creature, NULL, NULL, creatureCount, LClicked); } -CCreInfoWindow::CCreInfoWindow(const CStack &st, int Type /*= 0*/) - : type(Type), dismiss(0), upgrade(0), ok(0) +CCreInfoWindow::CCreInfoWindow(const CStack &stack, bool LClicked) { OBJ_CONSTRUCTION_CAPTURING_ALL; - init(st.getCreature(), &st, st.getMyHero(), st.count); + init(stack.getCreature(), &stack, stack.getMyHero(), stack.count, LClicked); } -void CCreInfoWindow::printLine(int nr, const std::string &text, int baseVal, int val/*=-1*/, bool range/*=false*/) +CCreInfoWindow::~CCreInfoWindow() { - printAt(text, 155, 48 + nr*19, FONT_SMALL, zwykly, *bitmap); + BOOST_FOREACH(SComponent* object, upgResCost) + delete object; +} + +void CCreInfoWindow::printLine(int position, const std::string &text, int baseVal, int val/*=-1*/, bool range/*=false*/) +{ + infoTexts[position].first = new CLabel(155, 48 + position*19, FONT_SMALL, TOPLEFT, zwykly, text); + std::string valueStr; - std::string hlp; if(range && baseVal != val) - hlp = boost::str(boost::format("%d - %d") % baseVal % val); - else if(baseVal != val && val>=0) - hlp = boost::str(boost::format("%d (%d)") % baseVal % val); - else - hlp = boost::lexical_cast(baseVal); + valueStr = boost::str(boost::format("%d - %d") % baseVal % val); - printTo(hlp, 276, 61 + nr*19, FONT_SMALL, zwykly, *bitmap); + else if(baseVal != val && val>=0) + valueStr = boost::str(boost::format("%d (%d)") % baseVal % val); + + else + valueStr = boost::lexical_cast(baseVal); + + infoTexts[position].second = new CLabel(276, 63 + position*19, FONT_SMALL, BOTTOMRIGHT, zwykly, valueStr); } -//void CCreInfoWindow::init(const CCreature *cre, const CStackInstance *stack, int creatureCount) -void CCreInfoWindow::init(const CCreature *cre, const CBonusSystemNode *stackNode, const CGHeroInstance *heroOwner, int creatureCount) +void CCreInfoWindow::init(const CCreature *creature, const CBonusSystemNode *stackNode, const CGHeroInstance *heroOwner, int count, bool LClicked) { - c = cre; - if(!stackNode) stackNode = c; + used = 0; + if (!LClicked) + used |= RCLICK; - bitmap = new CPicture("CRSTKPU.bmp"); - bitmap->colorizeAndConvert(LOCPLINT->playerID); - pos = bitmap->center(); + if(!stackNode) + stackNode = creature; - anim = new CCreaturePic(21, 48, c); + background = new CPicture("CRSTKPU"); + background->colorize(LOCPLINT->playerID); + pos = background->center(); - count = boost::lexical_cast(creatureCount); + animation = new CCreaturePic(21, 48, creature); - printAtMiddle(c->namePl,149,30,FONT_SMALL,tytulowy,*bitmap); //creature name + std::string countStr = boost::lexical_cast(count); + creatureCount = new CLabel(114, 174, FONT_TIMES, BOTTOMRIGHT, zwykly, countStr); + + creatureName = new CLabel(149, 30, FONT_SMALL, CENTER, tytulowy, creature->namePl); - printLine(0, CGI->generaltexth->primarySkillNames[0], cre->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK), stackNode->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK)); - printLine(1, CGI->generaltexth->primarySkillNames[1], cre->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE), stackNode->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE)); - //if(c->shots) - // printLine(2, CGI->generaltexth->allTexts[198], c->shots); + printLine(0, CGI->generaltexth->primarySkillNames[0], creature->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK), stackNode->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK)); + printLine(1, CGI->generaltexth->primarySkillNames[1], creature->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE), stackNode->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE)); + if(stackNode->valOfBonuses(Bonus::SHOTS)) printLine(2, CGI->generaltexth->allTexts[198], stackNode->valOfBonuses(Bonus::SHOTS)); @@ -2176,67 +2178,35 @@ void CCreInfoWindow::init(const CCreature *cre, const CBonusSystemNode *stackNod if(heroOwner && stackNode->hasBonusOfType(Bonus::SIEGE_WEAPON)) dmgMultiply += heroOwner->Attack(); - printLine(3, CGI->generaltexth->allTexts[199], stackNode->getMinDamage() * dmgMultiply, stackNode->getMaxDamage() * dmgMultiply, true); - printLine(4, CGI->generaltexth->allTexts[388], cre->valOfBonuses(Bonus::STACK_HEALTH), stackNode->valOfBonuses(Bonus::STACK_HEALTH)); - printLine(6, CGI->generaltexth->zelp[441].first, cre->valOfBonuses(Bonus::STACKS_SPEED), stackNode->valOfBonuses(Bonus::STACKS_SPEED)); + printLine(3, CGI->generaltexth->allTexts[199], stackNode->getMinDamage() * dmgMultiply, stackNode->getMaxDamage() * dmgMultiply, true); + printLine(4, CGI->generaltexth->allTexts[388], creature->valOfBonuses(Bonus::STACK_HEALTH), stackNode->valOfBonuses(Bonus::STACK_HEALTH)); + printLine(6, CGI->generaltexth->zelp[441].first, creature->valOfBonuses(Bonus::STACKS_SPEED), stackNode->valOfBonuses(Bonus::STACKS_SPEED)); //setting morale - morale = new MoraleLuckBox(true, genRect(42, 42, 24, 189)); + morale = new MoraleLuckBox(true, genRect(42, 42, 22, 186)); morale->set(stackNode); //setting luck - luck = new MoraleLuckBox(false, genRect(42, 42, 77, 189)); + luck = new MoraleLuckBox(false, genRect(42, 42, 75, 186)); luck->set(stackNode); - //luck and morale - int luck = 3, morale = 3; - if(stackNode) - { - //add modifiers - luck += stackNode->LuckVal(); - morale += stackNode->MoraleVal(); - } - - blitAt(graphics->morale42->ourImages[morale].bitmap, 24, 189, *bitmap); - blitAt(graphics->luck42->ourImages[luck].bitmap, 77, 189, *bitmap); - - - if(!type) - { - printAtWB(c->abilityText,17,231,FONT_SMALL,35,zwykly,*bitmap); - } + if(!LClicked) + abilityText = new CLabel(17, 231, FONT_SMALL, TOPLEFT, zwykly, creature->abilityText); + else + abilityText = NULL; //if we are displying window fo r stack in battle, there are several more things that we need to display if(const CStack *battleStack = dynamic_cast(stackNode)) { - //spell effects - int printed=0; //how many effect pics have been printed + //print at most 3 spell effects std::vector spells = battleStack->activeSpells(); - BOOST_FOREACH(si32 effect, spells) - { - blitAt(graphics->spellEffectsPics->ourImages[effect + 1].bitmap, 127 + 52 * printed, 186, *bitmap); - ++printed; - if(printed >= 3) //we can fit only 3 effects - break; - } + for (size_t i=0; i< std::min(spells.size(), size_t(3)); i++) + effects.push_back(new CAnimImage("SpellInt", spells[i]+1, 0, 127 + 52*i, 186)); + //print current health printLine(5, CGI->generaltexth->allTexts[200], battleStack->firstHPleft); } } - -CCreInfoWindow::~CCreInfoWindow() -{ - for(int i=0; i lines; + std::vector effects; CSlider *slider; //CTextBox( std::string Text, const Point &Pos, int w, int h, EFonts Font = FONT_SMALL, EAlignment Align = TOPLEFT, const SDL_Color &Color = zwykly); @@ -943,31 +944,30 @@ public: class CCreInfoWindow : public CIntObject { public: - //bool active; //TODO: comment me - int type;//0 - rclick popup; 1 - normal window - CPicture *bitmap; //background - std::string count; //creature count in text format + CPicture *background; + CLabel *creatureCount; + CLabel *creatureName; + CLabel *abilityText; - boost::function dsm; //dismiss button callback - CCreaturePic *anim; //related creature's animation - const CCreature *c; //related creature + CCreaturePic *animation; std::vector upgResCost; //cost of upgrade (if not possible then empty) + std::vector effects; + std::map > infoTexts; MoraleLuckBox *luck, *morale; AdventureMapButton *dismiss, *upgrade, *ok; - CCreInfoWindow(const CStackInstance &st, int Type = 0, boost::function Upg = 0, boost::function Dsm = 0, UpgradeInfo *ui = NULL); //c-tor - CCreInfoWindow(const CStack &st, int Type = 0); //c-tor - CCreInfoWindow(int Cid, int Type, int creatureCount); //c-tor - void init(const CCreature *cre, const CBonusSystemNode *stackNode, const CGHeroInstance *heroOwner, int creatureCount); + + CCreInfoWindow(const CStackInstance &st, bool LClicked, boost::function Upg = 0, boost::function Dsm = 0, UpgradeInfo *ui = NULL); + CCreInfoWindow(const CStack &st, bool LClicked = 0); + CCreInfoWindow(int Cid, bool LClicked, int creatureCount); + ~CCreInfoWindow(); + + void init(const CCreature *cre, const CBonusSystemNode *stackNode, const CGHeroInstance *heroOwner, int creatureCount, bool LClicked); void printLine(int nr, const std::string &text, int baseVal, int val=-1, bool range=false); - ~CCreInfoWindow(); //d-tor - void activate(); + + void clickRight(tribool down, bool previousState); void close(); - void clickRight(tribool down, bool previousState); //call-in - void dismissF(); - void keyPressed (const SDL_KeyboardEvent & key); //call-in - void deactivate(); void show(SDL_Surface * to); }; @@ -975,7 +975,7 @@ public: class CArtPlace: public LRClickableAreaWTextComp { public: - int slotID; //0 head 1 shoulders 2 neck 3 right hand 4 left hand 5 torso 6 right ring 7 left ring 8 feet 9 misc. slot 1 10 misc. slot 2 11 misc. slot 3 12 misc. slot 4 13 ballista (war machine 1) 14 ammo cart (war machine 2) 15 first aid tent (war machine 3) 16 catapult 17 spell book 18 misc. slot 5 19+ backpack slots + int slotID; //Arts::EPOS enum + backpack starting from Arts::BACKPACK_START bool picked; bool marked; diff --git a/config/buildings.json b/config/buildings.json index 4000cfbb6..ebd581c5b 100644 --- a/config/buildings.json +++ b/config/buildings.json @@ -11,863 +11,945 @@ // war_machine: type of war machine that this city can build { - "town_type": - [ + "schema" : + { + "town_type" : { - // Castle 0 - "defnames": [ - { "id": 16, "defname": "TBCSBLAK.def", "x": 213, "y": 251, "border": "TOCSBLAK.bmp", "area": "TZCSBLAK.bmp" }, - { "id": 8, "defname": "TBCSCAS2.def", "x": 478, "y": 66, "border": "TOCSCAS2.bmp", "area": "TZCSCAS2.bmp" }, - { "id": 9, "defname": "TBCSCAS3.def", "x": 478, "y": 37, "border": "TOCSCAS3.bmp", "area": "TZCSCAS3.bmp" }, - { "id": 7, "defname": "TBCSCSTL.def", "x": 595, "y": 66, "border": "TOCSCAS1.bmp", "area": "TZCSCAS1.bmp" }, - { "id": 6, "defname": "TBCSDOCK.def", "x": 478, "y": 134, "border": "TOCSDKMS.bmp", "area": "TZCSDKMS.bmp" }, - { "id": 30, "defname": "TBCSDW_0.def", "x": 304, "y": 92, "border": "TOCSPIK1.bmp", "area": "TZCSPIK1.bmp" }, - { "id": 31, "defname": "TBCSDW_1.def", "x": 360, "y": 130, "border": "TOCSCRS1.bmp", "area": "TZCSCRS1.bmp" }, - { "id": 32, "defname": "TBCSDW_2.def", "x": 76, "y": 57, "border": "TOCSGR1N.bmp", "area": "TZCSGR1N.bmp" }, - { "id": 33, "defname": "TBCSDW_3.def", "x": 176, "y": 101, "border": "TOCSSWD1.bmp", "area": "TZCSSWD1.bmp" }, - { "id": 34, "defname": "TBCSDW_4.def", "x": 563, "y": 211, "border": "TOCSMON1.bmp", "area": "TZCSMON1.bmp" }, - { "id": 35, "defname": "TBCSDW_5.def", "x": 174, "y": 190, "border": "TOCSC101.bmp", "area": "TZCSCAV1.bmp" }, - { "id": 36, "defname": "TBCSDW_6.def", "x": 303, "y": 0, "border": "TOCSANG1.bmp", "area": "TZCSANG1.bmp" }, - { "id": 21, "defname": "TBCSEXT0.def", "x": 384, "y": 193, "border": "TOCSCAVM.bmp", "area": "TZCSCAVM.bmp" }, - { "id": 22, "defname": "TBCSEXT1.def", "x": 0, "y": 198, "border": "TOCSTAV2.bmp", "area": "TZCSTAV2.bmp" }, - { "id": -1, "defname": "TBCSEXT2.def", "x": 46, "y": 119 }, - { "id": 11, "defname": "TBCSHAL2.def", "x": 0, "y": 176, "border": "TOCSH201.bmp", "area": "TZCSH201.bmp" }, - { "id": 12, "defname": "TBCSHAL3.def", "x": 0, "y": 164, "border": "TOCSH301.bmp", "area": "TZCSH301.bmp" }, - { "id": 13, "defname": "TBCSHAL4.def", "x": 0, "y": 154, "border": "TOCSH401.bmp", "area": "TZCSH401.bmp" }, - { "id": 10, "defname": "TBCSHALL.def", "x": 0, "y": 209, "border": "TOCSH101.bmp", "area": "TZCSH101.bmp" }, - { "id": 26, "defname": "TBCSHOLY.def", "x": 456, "y": 109, "border": "TOCSHOLY.bmp", "area": "TZCSHOLY.bmp" }, - { "id": 18, "defname": "TBCSHRD1.def", "x": 76, "y": 53, "border": "TOCSGR1H.bmp", "area": "TZCSGR1H.bmp" }, - { "id": 19, "defname": "TBCSHRD2.def", "x": 76, "y": 35, "border": "TOCSGR2H.bmp", "area": "TZCSGR2H.bmp" }, - { "id": 1, "defname": "TBCSMAG2.def", "x": 706, "y": 135, "border": "TOCSMAG2.bmp", "area": "TZCSMAG2.bmp" }, - { "id": 2, "defname": "TBCSMAG3.def", "x": 704, "y": 107, "border": "TOCSM301.bmp", "area": "TZCSM301.bmp" }, - { "id": 3, "defname": "TBCSMAG4.def", "x": 704, "y": 76, "border": "TOCSM401.bmp", "area": "TZCSM401.bmp" }, - { "id": 0, "defname": "TBCSMAGE.def", "x": 707, "y": 166, "border": "TOCSMAG1.bmp", "area": "TZCSMAG1.bmp" }, - { "id": 14, "defname": "TBCSMARK.def", "x": 413, "y": 264, "border": "TOCSMRK1.bmp", "area": "TZCSMRK1.bmp" }, - { "id": 15, "defname": "TBCSSILO.def", "x": 488, "y": 228, "border": "TOCSMRK2.bmp", "area": "TZCSMRK2.bmp" }, - { "id": 17, "defname": "TBCSSPEC.def", "x": 533, "y": 71, "border": "TOCSLT01.bmp", "area": "TZCSLT01.bmp" }, - { "id": 5, "defname": "TBCSTVRN.def", "x": 0, "y": 230, "border": "TOCSTAV1.bmp", "area": "TZCSTAV1.bmp" }, - { "id": 37, "defname": "TBCSUP_0.def", "x": 304, "y": 65, "border": "TOCSPIK2.bmp", "area": "TZCSPIK2.bmp" }, - { "id": 38, "defname": "TBCSUP_1.def", "x": 360, "y": 115, "border": "TOCSCRS2.bmp", "area": "TZCSCRS2.bmp" }, - { "id": 39, "defname": "TBCSUP_2.def", "x": 76, "y": 35, "border": "TOCSGR2N.bmp", "area": "TZCSGR2N.bmp" }, - { "id": 40, "defname": "TBCSUP_3.def", "x": 176, "y": 85, "border": "TOCSSWD2.bmp", "area": "TZCSSWD2.bmp" }, - { "id": 41, "defname": "TBCSUP_4.def", "x": 563, "y": 173, "border": "TOCSMON2.bmp", "area": "TZCSMON2.bmp" }, - { "id": 42, "defname": "TBCSUP_5.def", "x": 160, "y": 190, "border": "TOCSCAV2.bmp", "area": "TZCSCAV2.bmp" }, - { "id": 43, "defname": "TBCSUP_6.def", "x": 303, "y": 0, "border": "TOCSANG2.bmp", "area": "TZCSANG2.bmp" }, - { "id": 20, "defname": "TBCSBOAT.def", "x": 478, "y": 134, "border": "TOCSDKMN.bmp", "area": "TZCSDKMN.bmp" } + "type" : "array", + "items" : + { + "type" : "object", + "properties" : + { + "blit_order" : { "type" : "array", "items" : {"type":"number"}, "default" :[] }, + "creatures_basic" : { "type" : "array", "items" : {"type":"number"} }, + "creatures_upgraded" :{ "type" : "array", "items" : {"type":"number"} }, + "horde" : { "type" : "array", "items" : {"type":"number", "default" : -1} }, + "primary_resource" : { "type" : "number", "default" : 127}, + "mage_guild" : { "type" : "number", "default" : 5}, + "war_machine" : { "type" : "number"}, + "defnames" : + { + "type" : "array", + "items" : + { + "type" : "object", + "properties" : + { + "id" : { "type" : "number" }, + "x" : { "type" : "number" }, + "y" : { "type" : "number" }, + "defname" : { "type" : "string" }, + "border" : { "type" : "string", "default" : ""}, + "area" : { "type" : "string", "default" : ""} + } + } + }, + "building_requirements" : + { + "type" : "array", + "items" : + { + "type" : "object", + "properties" : + { + "id" : + { + "type" : "number" + }, + "requires" : + { + "type" : "array", + "items" : {"type":"number"} + } + } + } + } + } + } + }, + "town_groups" : + { + "type" : "array", + "items" : + { + "type" : "object", + "properties" : + { + "id" : { "type" : "number" }, + "groups" : + { + "type" : "array", + "items" : { "type" : "array", "items" : {"type":"number"}, } + } + } + } + } + }, + "town_type" : + [ + { + // 0 - Castle + "defnames" : + [ + { "id" : 16, "defname" : "TBCSBLAK.def", "x" : 213, "y" : 251, "border" : "TOCSBLAK.bmp", "area" : "TZCSBLAK.bmp" }, + { "id" : 8, "defname" : "TBCSCAS2.def", "x" : 478, "y" : 66, "border" : "TOCSCAS2.bmp", "area" : "TZCSCAS2.bmp" }, + { "id" : 9, "defname" : "TBCSCAS3.def", "x" : 478, "y" : 37, "border" : "TOCSCAS3.bmp", "area" : "TZCSCAS3.bmp" }, + { "id" : 7, "defname" : "TBCSCSTL.def", "x" : 595, "y" : 66, "border" : "TOCSCAS1.bmp", "area" : "TZCSCAS1.bmp" }, + { "id" : 6, "defname" : "TBCSDOCK.def", "x" : 478, "y" : 134, "border" : "TOCSDKMS.bmp", "area" : "TZCSDKMS.bmp" }, + { "id" : 30, "defname" : "TBCSDW_0.def", "x" : 304, "y" : 92, "border" : "TOCSPIK1.bmp", "area" : "TZCSPIK1.bmp" }, + { "id" : 31, "defname" : "TBCSDW_1.def", "x" : 360, "y" : 130, "border" : "TOCSCRS1.bmp", "area" : "TZCSCRS1.bmp" }, + { "id" : 32, "defname" : "TBCSDW_2.def", "x" : 76, "y" : 57, "border" : "TOCSGR1N.bmp", "area" : "TZCSGR1N.bmp" }, + { "id" : 33, "defname" : "TBCSDW_3.def", "x" : 176, "y" : 101, "border" : "TOCSSWD1.bmp", "area" : "TZCSSWD1.bmp" }, + { "id" : 34, "defname" : "TBCSDW_4.def", "x" : 563, "y" : 211, "border" : "TOCSMON1.bmp", "area" : "TZCSMON1.bmp" }, + { "id" : 35, "defname" : "TBCSDW_5.def", "x" : 174, "y" : 190, "border" : "TOCSC101.bmp", "area" : "TZCSCAV1.bmp" }, + { "id" : 36, "defname" : "TBCSDW_6.def", "x" : 303, "y" : 0, "border" : "TOCSANG1.bmp", "area" : "TZCSANG1.bmp" }, + { "id" : 21, "defname" : "TBCSEXT0.def", "x" : 384, "y" : 193, "border" : "TOCSCAVM.bmp", "area" : "TZCSCAVM.bmp" }, + { "id" : 22, "defname" : "TBCSEXT1.def", "x" : 0, "y" : 198, "border" : "TOCSTAV2.bmp", "area" : "TZCSTAV2.bmp" }, + { "id" : -1, "defname" : "TBCSEXT2.def", "x" : 46, "y" : 119 }, + { "id" : 11, "defname" : "TBCSHAL2.def", "x" : 0, "y" : 176, "border" : "TOCSH201.bmp", "area" : "TZCSH201.bmp" }, + { "id" : 12, "defname" : "TBCSHAL3.def", "x" : 0, "y" : 164, "border" : "TOCSH301.bmp", "area" : "TZCSH301.bmp" }, + { "id" : 13, "defname" : "TBCSHAL4.def", "x" : 0, "y" : 154, "border" : "TOCSH401.bmp", "area" : "TZCSH401.bmp" }, + { "id" : 10, "defname" : "TBCSHALL.def", "x" : 0, "y" : 209, "border" : "TOCSH101.bmp", "area" : "TZCSH101.bmp" }, + { "id" : 26, "defname" : "TBCSHOLY.def", "x" : 456, "y" : 109, "border" : "TOCSHOLY.bmp", "area" : "TZCSHOLY.bmp" }, + { "id" : 18, "defname" : "TBCSHRD1.def", "x" : 76, "y" : 53, "border" : "TOCSGR1H.bmp", "area" : "TZCSGR1H.bmp" }, + { "id" : 19, "defname" : "TBCSHRD2.def", "x" : 76, "y" : 35, "border" : "TOCSGR2H.bmp", "area" : "TZCSGR2H.bmp" }, + { "id" : 1, "defname" : "TBCSMAG2.def", "x" : 706, "y" : 135, "border" : "TOCSMAG2.bmp", "area" : "TZCSMAG2.bmp" }, + { "id" : 2, "defname" : "TBCSMAG3.def", "x" : 704, "y" : 107, "border" : "TOCSM301.bmp", "area" : "TZCSM301.bmp" }, + { "id" : 3, "defname" : "TBCSMAG4.def", "x" : 704, "y" : 76, "border" : "TOCSM401.bmp", "area" : "TZCSM401.bmp" }, + { "id" : 0, "defname" : "TBCSMAGE.def", "x" : 707, "y" : 166, "border" : "TOCSMAG1.bmp", "area" : "TZCSMAG1.bmp" }, + { "id" : 14, "defname" : "TBCSMARK.def", "x" : 413, "y" : 264, "border" : "TOCSMRK1.bmp", "area" : "TZCSMRK1.bmp" }, + { "id" : 15, "defname" : "TBCSSILO.def", "x" : 488, "y" : 228, "border" : "TOCSMRK2.bmp", "area" : "TZCSMRK2.bmp" }, + { "id" : 17, "defname" : "TBCSSPEC.def", "x" : 533, "y" : 71, "border" : "TOCSLT01.bmp", "area" : "TZCSLT01.bmp" }, + { "id" : 5, "defname" : "TBCSTVRN.def", "x" : 0, "y" : 230, "border" : "TOCSTAV1.bmp", "area" : "TZCSTAV1.bmp" }, + { "id" : 37, "defname" : "TBCSUP_0.def", "x" : 304, "y" : 65, "border" : "TOCSPIK2.bmp", "area" : "TZCSPIK2.bmp" }, + { "id" : 38, "defname" : "TBCSUP_1.def", "x" : 360, "y" : 115, "border" : "TOCSCRS2.bmp", "area" : "TZCSCRS2.bmp" }, + { "id" : 39, "defname" : "TBCSUP_2.def", "x" : 76, "y" : 35, "border" : "TOCSGR2N.bmp", "area" : "TZCSGR2N.bmp" }, + { "id" : 40, "defname" : "TBCSUP_3.def", "x" : 176, "y" : 85, "border" : "TOCSSWD2.bmp", "area" : "TZCSSWD2.bmp" }, + { "id" : 41, "defname" : "TBCSUP_4.def", "x" : 563, "y" : 173, "border" : "TOCSMON2.bmp", "area" : "TZCSMON2.bmp" }, + { "id" : 42, "defname" : "TBCSUP_5.def", "x" : 160, "y" : 190, "border" : "TOCSCAV2.bmp", "area" : "TZCSCAV2.bmp" }, + { "id" : 43, "defname" : "TBCSUP_6.def", "x" : 303, "y" : 0, "border" : "TOCSANG2.bmp", "area" : "TZCSANG2.bmp" }, + { "id" : 20, "defname" : "TBCSBOAT.def", "x" : 478, "y" : 134, "border" : "TOCSDKMN.bmp", "area" : "TZCSDKMN.bmp" } ], + "blit_order" : [ 1, 2, 3, 10, 11, 12, 13, 5, 22, 30, 37, 16, 6, 20, 18, 19, 34, 41 ], + "creatures_basic" : [ 0, 2, 4, 6, 8, 10, 12, 150 ], + "creatures_upgraded" : [ 1, 3, 5, 7, 9, 11, 13 ], + "horde" : [ 2, null ], + "mage_guild" : 4, + "war_machine" : 4, - "blit_order": [ 1, 2, 3, 10, 11, 12, 13, 5, 22, 30, 37, 16, 6, 20, 18, 19, 34, 41 ], - "creatures_basic": [ 0, 2, 4, 6, 8, 10, 12, 150 ], - "creatures_upgraded": [ 1, 3, 5, 7, 9, 11, 13 ], - "horde": [ 2, -1 ], - "mage_guild": 4, - "primary_ressource": 127, - "war_machine": 4, - - "building_requirements": - [ - { "id": 1, "requires": [ 0 ] }, - { "id": 2, "requires": [ 1 ] }, - { "id": 3, "requires": [ 2 ] }, - { "id": 4, "requires": [ 3 ] }, - { "id": 8, "requires": [ 7 ] }, - { "id": 9, "requires": [ 8 ] }, - { "id": 11, "requires": [ 10, 5 ] }, - { "id": 12, "requires": [ 11, 0, 14, 16 ] }, - { "id": 13, "requires": [ 12, 9 ] }, - { "id": 15, "requires": [ 14 ] }, - { "id": 17, "requires": [ 6 ] }, - { "id": 18, "requires": [ 32 ] }, - { "id": 19, "requires": [ 39 ] }, - { "id": 20, "requires": [ 6 ] }, - { "id": 21, "requires": [ 33 ] }, - { "id": 22, "requires": [ 5 ] }, - { "id": 30, "requires": [ 7 ] }, - { "id": 31, "requires": [ 30 ] }, - { "id": 32, "requires": [ 33 ] }, - { "id": 33, "requires": [ 16, 30 ] }, - { "id": 34, "requires": [ 0, 33 ] }, - { "id": 35, "requires": [ 21 ] }, - { "id": 36, "requires": [ 34 ] }, - { "id": 37, "requires": [ 30 ] }, - { "id": 38, "requires": [ 31 ] }, - { "id": 39, "requires": [ 32 ] }, - { "id": 40, "requires": [ 33 ] }, - { "id": 41, "requires": [ 34 ] }, - { "id": 42, "requires": [ 35 ] }, - { "id": 43, "requires": [ 36 ] } - ] + "building_requirements" : + [ + { "id" : 1, "requires" : [ 0 ] }, + { "id" : 2, "requires" : [ 1 ] }, + { "id" : 3, "requires" : [ 2 ] }, + { "id" : 4, "requires" : [ 3 ] }, + { "id" : 8, "requires" : [ 7 ] }, + { "id" : 9, "requires" : [ 8 ] }, + { "id" : 11, "requires" : [ 10, 5 ] }, + { "id" : 12, "requires" : [ 11, 0, 14, 16 ] }, + { "id" : 13, "requires" : [ 12, 9 ] }, + { "id" : 15, "requires" : [ 14 ] }, + { "id" : 17, "requires" : [ 6 ] }, + { "id" : 18, "requires" : [ 32 ] }, + { "id" : 19, "requires" : [ 39 ] }, + { "id" : 20, "requires" : [ 6 ] }, + { "id" : 21, "requires" : [ 33 ] }, + { "id" : 22, "requires" : [ 5 ] }, + { "id" : 30, "requires" : [ 7 ] }, + { "id" : 31, "requires" : [ 30 ] }, + { "id" : 32, "requires" : [ 33 ] }, + { "id" : 33, "requires" : [ 16, 30 ] }, + { "id" : 34, "requires" : [ 0, 33 ] }, + { "id" : 35, "requires" : [ 21 ] }, + { "id" : 36, "requires" : [ 34 ] }, + { "id" : 37, "requires" : [ 30 ] }, + { "id" : 38, "requires" : [ 31 ] }, + { "id" : 39, "requires" : [ 32 ] }, + { "id" : 40, "requires" : [ 33 ] }, + { "id" : 41, "requires" : [ 34 ] }, + { "id" : 42, "requires" : [ 35 ] }, + { "id" : 43, "requires" : [ 36 ] } + ] }, { - // Castle 1 - "defnames": [ - { "id": 16, "defname": "TBRMBLAK.def", "x": 558, "y": 105, "border": "TORAID.bmp", "area": "TZRAID.bmp" }, - { "id": 9, "defname": "TBRMCAS3.def", "x": 79, "y": 18, "border": "TORCAS2.bmp", "area": "TZRCAS2.bmp" }, - { "id": 8, "defname": "TBRMCAS2.def", "x": 79, "y": 18, "border": "TORCAS3.bmp", "area": "TZRCAS3.bmp" }, - { "id": 7, "defname": "TBRMCSTL.def", "x": 63, "y": 25, "border": "TORCAS1.bmp", "area": "TZRCAS1.bmp" }, - { "id": 30, "defname": "TBRMDW_0.def", "x": 0, "y": 236, "border": "TORCEN1A.bmp", "area": "TZRCEN1A.bmp" }, - { "id": 31, "defname": "TBRMDW_1.def", "x": 0, "y": 154, "border": "TORDWF1.bmp", "area": "TZRDWF1.bmp" }, - { "id": 32, "defname": "TBRMDW_2.def", "x": 668, "y": 101, "border": "TORELF1.bmp", "area": "TZRELF1.bmp" }, - { "id": 33, "defname": "TBRMDW_3.def", "x": 287, "y": 73, "border": "TORPEG1A.bmp", "area": "TZRPEG1A.bmp" }, - { "id": 34, "defname": "TBRMDW_4.def", "x": 68, "y": 146, "border": "TORTRE1.bmp", "area": "TZRTRE1.bmp" }, - { "id": 35, "defname": "TBRMDW_5.def", "x": 362, "y": 90, "border": "TORUNI1.bmp", "area": "TZRUNI1.bmp" }, - { "id": 36, "defname": "TBRMDW_6.def", "x": 502, "y": 27, "border": "TORDR1AA.bmp", "area": "TZRDR1AA.bmp" }, - { "id": 21, "defname": "TBRMEXT0.def", "x": 555, "y": 297, "border": "TORGAR2A.bmp", "area": "TZRGAR2A.bmp" }, - { "id": 22, "defname": "TBRMEXT1.def", "x": 0, "y": 181, "border": "TORDWFT.bmp", "area": "TZRDWFT.bmp" }, - { "id": -1, "defname": "TBRMEXT2.def", "x": 327, "y": 236 }, - { "id": 27, "defname": "TBRMEXT3.def", "x": 293, "y": 235 }, - { "id": 28, "defname": "TBRMEXT4.def", "x": 295, "y": 191 }, - { "id": 29, "defname": "TBRMEXT5.def", "x": 260, "y": 171 }, - { "id": 43, "defname": "TBRMUP_6.def", "x": 502, "y": 5, "border": "TORDR2AA.bmp", "area": "TZRDR2AA.bmp" }, - { "id": 42, "defname": "TBRMUP_5.def", "x": 362, "y": 90, "border": "TORUNI2.bmp", "area": "TZRUNI2.bmp" }, - { "id": 41, "defname": "TBRMUP_4.def", "x": 63, "y": 146, "border": "TORTRE2.bmp", "area": "TZRTRE2.bmp" }, - { "id": 40, "defname": "TBRMUP_3.def", "x": 287, "y": 28, "border": "TORPEG2A.bmp", "area": "TZRPEG2A.bmp" }, - { "id": 39, "defname": "TBRMUP_2.def", "x": 665, "y": 101, "border": "TORELF2.bmp", "area": "TZRELF2.bmp" }, - { "id": 38, "defname": "TBRMUP_1.def", "x": 0, "y": 143, "border": "TORDWF2.bmp", "area": "TZRDWF2.bmp" }, - { "id": 37, "defname": "TBRMUP_0.def", "x": 0, "y": 236, "border": "TORCEN2A.bmp", "area": "TZRCEN2A.bmp" }, - { "id": 5, "defname": "TBRMTVRN.def", "x": 181, "y": 229, "border": "TORTAV.bmp", "area": "TZRTAV.bmp" }, - { "id": 17, "defname": "TBRMSPEC.def", "x": 555, "y": 297, "border": "TORGAR1A.bmp", "area": "TZRGAR1A.bmp" }, - { "id": 15, "defname": "TBRMSILO.def", "x": 245, "y": 324, "border": "TORMRK2.bmp", "area": "TZRMRK2.bmp" }, - { "id": 14, "defname": "TBRMMARK.def", "x": 129, "y": 301, "border": "TORMRK1.bmp", "area": "TZRMRK1.bmp" }, - { "id": 0, "defname": "TBRMMAGE.def", "x": 454, "y": 200, "border": "TORMAG1.bmp", "area": "TZRMAG1.bmp" }, - { "id": 1, "defname": "TBRMMAG2.def", "x": 438, "y": 178, "border": "TORMAG2.bmp", "area": "TZRMAG2.bmp" }, - { "id": 2, "defname": "TBRMMAG3.def", "x": 418, "y": 153, "border": "TORMAG3.bmp", "area": "TZRMAG3.bmp" }, - { "id": 3, "defname": "TBRMMAG4.def", "x": 406, "y": 129, "border": "TORMAG4.bmp", "area": "TZRMAG4.bmp" }, - { "id": 4, "defname": "TBRMMAG5.def", "x": 384, "y": 104, "border": "TORMAG5.bmp", "area": "TZRMAG5.bmp" }, - { "id": 25, "defname": "TBRMHRD4.def", "x": 47, "y": 142, "border": "TORTRE2H.bmp", "area": "TZRTRE2H.bmp" }, - { "id": 24, "defname": "TBRMHRD3.def", "x": 47, "y": 142, "border": "TORTRE1H.bmp", "area": "TZRTRE1H.bmp" }, - { "id": 19, "defname": "TBRMHRD2.def", "x": 0, "y": 143, "border": "TORDWF2H.bmp", "area": "TZRDWF2H.bmp" }, - { "id": 18, "defname": "TBRMHRD1.def", "x": 0, "y": 154, "border": "TORDWF1H.bmp", "area": "TZRDWF1H.bmp" }, - { "id": 26, "defname": "TBRMHOLY.def", "x": 0, "y": 54, "border": "TORHOLY.bmp", "area": "TZRHOLY.bmp" }, - { "id": 10, "defname": "TBRMHALL.def", "x": 565, "y": 216, "border": "TORHAL1.bmp", "area": "TZRHAL1.bmp" }, - { "id": 13, "defname": "TBRMHAL4.def", "x": 534, "y": 187, "border": "TORHAL4.bmp", "area": "TZRHAL4.bmp" }, - { "id": 12, "defname": "TBRMHAL3.def", "x": 538, "y": 187, "border": "TORHAL3.bmp", "area": "TZRHAL3.bmp" }, - { "id": 11, "defname": "TBRMHAL2.def", "x": 538, "y": 187, "border": "TORHAL2.bmp", "area": "TZRHAL2.bmp" } - ], + // 1 - Rampart + "defnames" : + [ + { "id" : 16, "defname" : "TBRMBLAK.def", "x" : 558, "y" : 105, "border" : "TORAID.bmp", "area" : "TZRAID.bmp" }, + { "id" : 9, "defname" : "TBRMCAS3.def", "x" : 79, "y" : 18, "border" : "TORCAS2.bmp", "area" : "TZRCAS2.bmp" }, + { "id" : 8, "defname" : "TBRMCAS2.def", "x" : 79, "y" : 18, "border" : "TORCAS3.bmp", "area" : "TZRCAS3.bmp" }, + { "id" : 7, "defname" : "TBRMCSTL.def", "x" : 63, "y" : 25, "border" : "TORCAS1.bmp", "area" : "TZRCAS1.bmp" }, + { "id" : 30, "defname" : "TBRMDW_0.def", "x" : 0, "y" : 236, "border" : "TORCEN1A.bmp", "area" : "TZRCEN1A.bmp" }, + { "id" : 31, "defname" : "TBRMDW_1.def", "x" : 0, "y" : 154, "border" : "TORDWF1.bmp", "area" : "TZRDWF1.bmp" }, + { "id" : 32, "defname" : "TBRMDW_2.def", "x" : 668, "y" : 101, "border" : "TORELF1.bmp", "area" : "TZRELF1.bmp" }, + { "id" : 33, "defname" : "TBRMDW_3.def", "x" : 287, "y" : 73, "border" : "TORPEG1A.bmp", "area" : "TZRPEG1A.bmp" }, + { "id" : 34, "defname" : "TBRMDW_4.def", "x" : 68, "y" : 146, "border" : "TORTRE1.bmp", "area" : "TZRTRE1.bmp" }, + { "id" : 35, "defname" : "TBRMDW_5.def", "x" : 362, "y" : 90, "border" : "TORUNI1.bmp", "area" : "TZRUNI1.bmp" }, + { "id" : 36, "defname" : "TBRMDW_6.def", "x" : 502, "y" : 27, "border" : "TORDR1AA.bmp", "area" : "TZRDR1AA.bmp" }, + { "id" : 21, "defname" : "TBRMEXT0.def", "x" : 555, "y" : 297, "border" : "TORGAR2A.bmp", "area" : "TZRGAR2A.bmp" }, + { "id" : 22, "defname" : "TBRMEXT1.def", "x" : 0, "y" : 181, "border" : "TORDWFT.bmp", "area" : "TZRDWFT.bmp" }, + { "id" : -1, "defname" : "TBRMEXT2.def", "x" : 327, "y" : 236 }, + { "id" : 27, "defname" : "TBRMEXT3.def", "x" : 293, "y" : 235 }, + { "id" : 28, "defname" : "TBRMEXT4.def", "x" : 295, "y" : 191 }, + { "id" : 29, "defname" : "TBRMEXT5.def", "x" : 260, "y" : 171 }, + { "id" : 43, "defname" : "TBRMUP_6.def", "x" : 502, "y" : 5, "border" : "TORDR2AA.bmp", "area" : "TZRDR2AA.bmp" }, + { "id" : 42, "defname" : "TBRMUP_5.def", "x" : 362, "y" : 90, "border" : "TORUNI2.bmp", "area" : "TZRUNI2.bmp" }, + { "id" : 41, "defname" : "TBRMUP_4.def", "x" : 63, "y" : 146, "border" : "TORTRE2.bmp", "area" : "TZRTRE2.bmp" }, + { "id" : 40, "defname" : "TBRMUP_3.def", "x" : 287, "y" : 28, "border" : "TORPEG2A.bmp", "area" : "TZRPEG2A.bmp" }, + { "id" : 39, "defname" : "TBRMUP_2.def", "x" : 665, "y" : 101, "border" : "TORELF2.bmp", "area" : "TZRELF2.bmp" }, + { "id" : 38, "defname" : "TBRMUP_1.def", "x" : 0, "y" : 143, "border" : "TORDWF2.bmp", "area" : "TZRDWF2.bmp" }, + { "id" : 37, "defname" : "TBRMUP_0.def", "x" : 0, "y" : 236, "border" : "TORCEN2A.bmp", "area" : "TZRCEN2A.bmp" }, + { "id" : 5, "defname" : "TBRMTVRN.def", "x" : 181, "y" : 229, "border" : "TORTAV.bmp", "area" : "TZRTAV.bmp" }, + { "id" : 17, "defname" : "TBRMSPEC.def", "x" : 555, "y" : 297, "border" : "TORGAR1A.bmp", "area" : "TZRGAR1A.bmp" }, + { "id" : 15, "defname" : "TBRMSILO.def", "x" : 245, "y" : 324, "border" : "TORMRK2.bmp", "area" : "TZRMRK2.bmp" }, + { "id" : 14, "defname" : "TBRMMARK.def", "x" : 129, "y" : 301, "border" : "TORMRK1.bmp", "area" : "TZRMRK1.bmp" }, + { "id" : 0, "defname" : "TBRMMAGE.def", "x" : 454, "y" : 200, "border" : "TORMAG1.bmp", "area" : "TZRMAG1.bmp" }, + { "id" : 1, "defname" : "TBRMMAG2.def", "x" : 438, "y" : 178, "border" : "TORMAG2.bmp", "area" : "TZRMAG2.bmp" }, + { "id" : 2, "defname" : "TBRMMAG3.def", "x" : 418, "y" : 153, "border" : "TORMAG3.bmp", "area" : "TZRMAG3.bmp" }, + { "id" : 3, "defname" : "TBRMMAG4.def", "x" : 406, "y" : 129, "border" : "TORMAG4.bmp", "area" : "TZRMAG4.bmp" }, + { "id" : 4, "defname" : "TBRMMAG5.def", "x" : 384, "y" : 104, "border" : "TORMAG5.bmp", "area" : "TZRMAG5.bmp" }, + { "id" : 25, "defname" : "TBRMHRD4.def", "x" : 47, "y" : 142, "border" : "TORTRE2H.bmp", "area" : "TZRTRE2H.bmp" }, + { "id" : 24, "defname" : "TBRMHRD3.def", "x" : 47, "y" : 142, "border" : "TORTRE1H.bmp", "area" : "TZRTRE1H.bmp" }, + { "id" : 19, "defname" : "TBRMHRD2.def", "x" : 0, "y" : 143, "border" : "TORDWF2H.bmp", "area" : "TZRDWF2H.bmp" }, + { "id" : 18, "defname" : "TBRMHRD1.def", "x" : 0, "y" : 154, "border" : "TORDWF1H.bmp", "area" : "TZRDWF1H.bmp" }, + { "id" : 26, "defname" : "TBRMHOLY.def", "x" : 0, "y" : 54, "border" : "TORHOLY.bmp", "area" : "TZRHOLY.bmp" }, + { "id" : 10, "defname" : "TBRMHALL.def", "x" : 565, "y" : 216, "border" : "TORHAL1.bmp", "area" : "TZRHAL1.bmp" }, + { "id" : 13, "defname" : "TBRMHAL4.def", "x" : 534, "y" : 187, "border" : "TORHAL4.bmp", "area" : "TZRHAL4.bmp" }, + { "id" : 12, "defname" : "TBRMHAL3.def", "x" : 538, "y" : 187, "border" : "TORHAL3.bmp", "area" : "TZRHAL3.bmp" }, + { "id" : 11, "defname" : "TBRMHAL2.def", "x" : 538, "y" : 187, "border" : "TORHAL2.bmp", "area" : "TZRHAL2.bmp" } + ], + "blit_order" : [ 33, 40, 35, 42, 16, 32, 39, 0, 1, 2, 3, 4, 31, 18, 38, 19, 34, 24, 41, 25, 5, 30, 37, 14, 10, 11, 12, 13, 17, 21, 22, -1, 27, 28, 29, 15 ], + "creatures_basic" : [ 14, 16, 18, 20, 22, 24, 26, 151 ], + "creatures_upgraded" : [ 15, 17, 19, 21, 23, 25, 27 ], + "horde" : [ 1, 4 ], + "mage_guild" : 5, + "primary_resource" : 4, + "war_machine" : 6, - "blit_order": [ 33, 40, 35, 42, 16, 32, 39, 0, 1, 2, 3, 4, 31, 18, 38, 19, 34, 24, 41, 25, 5, 30, 37, 14, 10, 11, 12, 13, 17, 21, 22, -1, 27, 28, 29, 15 ], - "creatures_basic": [ 14, 16, 18, 20, 22, 24, 26, 151 ], - "creatures_upgraded": [ 15, 17, 19, 21, 23, 25, 27 ], - "horde": [ 1, 4 ], - "mage_guild": 5, - "primary_ressource": 4, - "war_machine": 6, - - "building_requirements": - [ - { "id": 1, "requires": [ 0 ] }, - { "id": 2, "requires": [ 1 ] }, - { "id": 3, "requires": [ 2 ] }, - { "id": 4, "requires": [ 3 ] }, - { "id": 8, "requires": [ 7 ] }, - { "id": 9, "requires": [ 8 ] }, - { "id": 11, "requires": [ 10, 5 ] }, - { "id": 12, "requires": [ 11, 0, 14, 16 ] }, - { "id": 13, "requires": [ 12, 9 ] }, - { "id": 15, "requires": [ 14 ] }, - { "id": 18, "requires": [ 31 ] }, - { "id": 19, "requires": [ 38 ] }, - { "id": 21, "requires": [ 17 ] }, - { "id": 22, "requires": [ 18 ] }, - { "id": 24, "requires": [ 34 ] }, - { "id": 25, "requires": [ 41 ] }, - { "id": 30, "requires": [ 7 ] }, - { "id": 31, "requires": [ 30 ] }, - { "id": 32, "requires": [ 30 ] }, - { "id": 33, "requires": [ 32 ] }, - { "id": 34, "requires": [ 32 ] }, - { "id": 35, "requires": [ 33, 34 ] }, - { "id": 36, "requires": [ 35, 1 ] }, - { "id": 37, "requires": [ 30 ] }, - { "id": 38, "requires": [ 31 ] }, - { "id": 39, "requires": [ 32 ] }, - { "id": 40, "requires": [ 33 ] }, - { "id": 41, "requires": [ 34 ] }, - { "id": 42, "requires": [ 35 ] }, - { "id": 43, "requires": [ 36, 2 ] } - ] + "building_requirements" : + [ + { "id" : 1, "requires" : [ 0 ] }, + { "id" : 2, "requires" : [ 1 ] }, + { "id" : 3, "requires" : [ 2 ] }, + { "id" : 4, "requires" : [ 3 ] }, + { "id" : 8, "requires" : [ 7 ] }, + { "id" : 9, "requires" : [ 8 ] }, + { "id" : 11, "requires" : [ 10, 5 ] }, + { "id" : 12, "requires" : [ 11, 0, 14, 16 ] }, + { "id" : 13, "requires" : [ 12, 9 ] }, + { "id" : 15, "requires" : [ 14 ] }, + { "id" : 18, "requires" : [ 31 ] }, + { "id" : 19, "requires" : [ 38 ] }, + { "id" : 21, "requires" : [ 17 ] }, + { "id" : 22, "requires" : [ 18 ] }, + { "id" : 24, "requires" : [ 34 ] }, + { "id" : 25, "requires" : [ 41 ] }, + { "id" : 30, "requires" : [ 7 ] }, + { "id" : 31, "requires" : [ 30 ] }, + { "id" : 32, "requires" : [ 30 ] }, + { "id" : 33, "requires" : [ 32 ] }, + { "id" : 34, "requires" : [ 32 ] }, + { "id" : 35, "requires" : [ 33, 34 ] }, + { "id" : 36, "requires" : [ 35, 1 ] }, + { "id" : 37, "requires" : [ 30 ] }, + { "id" : 38, "requires" : [ 31 ] }, + { "id" : 39, "requires" : [ 32 ] }, + { "id" : 40, "requires" : [ 33 ] }, + { "id" : 41, "requires" : [ 34 ] }, + { "id" : 42, "requires" : [ 35 ] }, + { "id" : 43, "requires" : [ 36, 2 ] } + ] }, { - // Castle 2 - "defnames": [ - { "id": 16, "defname": "TBTWBLAK.def", "x": 478, "y": 211, "border": "TOTBLKA.bmp", "area": "TZTBLKA.bmp" }, - { "id": 9, "defname": "TBTWCAS3.def", "x": 301, "y": 0, "border": "TOTCAS3.bmp", "area": "TZTCAS3.bmp" }, - { "id": 7, "defname": "TBTWCSTL.def", "x": 304, "y": 0, "border": "TOTCAS1.bmp", "area": "TZTCAS1.bmp" }, - { "id": 30, "defname": "TBTWDW_0.def", "x": 453, "y": 221, "border": "TOTGRM1A.bmp", "area": "TZTGRM1A.bmp" }, - { "id": 31, "defname": "TBTWDW_1.def", "x": 4, "y": 46, "border": "TOTGAR1.bmp", "area": "TZTGAR1.bmp" }, - { "id": 32, "defname": "TBTWDW_2.def", "x": 209, "y": 177, "border": "TOTGOL1A.bmp", "area": "TZTGOL1A.bmp" }, - { "id": 33, "defname": "TBTWDW_3.def", "x": 613, "y": 95, "border": "TOTMAG1.bmp", "area": "TZTMAG1.bmp" }, - { "id": 34, "defname": "TBTWDW_4.def", "x": 511, "y": 75, "border": "TOTGEN1.bmp", "area": "TZTGEN1.bmp" }, - { "id": 35, "defname": "TBTWDW_5.def", "x": 681, "y": 208, "border": "TOTNAG1.bmp", "area": "TZTNAG1.bmp" }, - { "id": 36, "defname": "TBTWDW_6.def", "x": 75, "y": 144, "border": "TOTTIT1.bmp", "area": "TZTTIT1.bmp" }, - { "id": 21, "defname": "TBTWEXT0.def", "x": 409, "y": 82, "border": "TOTCASW.bmp", "area": "TZTCASW.bmp" }, - { "id": 22, "defname": "TBTWEXT1.def", "x": 702, "y": 115, "border": "TOTGLDL.bmp", "area": "TZTGLDL.bmp" }, - { "id": 23, "defname": "TBTWEXT2.def", "x": 592, "y": 189, "border": "TOTGLDW.bmp", "area": "TZTGLDW.bmp" }, - { "id": 11, "defname": "TBTWHAL2.def", "x": 0, "y": 220, "border": "TOTHAL2.bmp", "area": "TZTHAL2.bmp" }, - { "id": 12, "defname": "TBTWHAL3.def", "x": 0, "y": 82, "border": "TOTHAL3.bmp", "area": "TZTHAL3.bmp" }, - { "id": 13, "defname": "TBTWHAL4.def", "x": 0, "y": 82, "border": "TOTHAL4.bmp", "area": "TZTHAL4.bmp" }, - { "id": 10, "defname": "TBTWHALL.def", "x": 0, "y": 259, "border": "TOTHAL1.bmp", "area": "TZTHAL1.bmp" }, - { "id": 26, "defname": "TBTWHOLY.def", "x": 237, "y": 14, "border": "TOTHOLYA.bmp", "area": "TZTHOLYA.bmp" }, - { "id": 18, "defname": "TBTWHRD1.def", "x": 0, "y": 47, "border": "TOTGAR1H.bmp", "area": "TZTGAR1H.bmp" }, - { "id": 19, "defname": "TBTWHRD2.def", "x": 0, "y": 28, "border": "TOTGAR2H.bmp", "area": "TZTGAR2H.bmp" }, - { "id": 1, "defname": "TBTWMAG2.def", "x": 593, "y": 65, "border": "TOTGLD2.bmp", "area": "TZTGLD2.bmp" }, - { "id": 2, "defname": "TBTWMAG3.def", "x": 593, "y": 48, "border": "TOTGLD3.bmp", "area": "TZTGLD3.bmp" }, - { "id": 3, "defname": "TBTWMAG4.def", "x": 593, "y": 31, "border": "TOTGLD4.bmp", "area": "TZTGLD4.bmp" }, - { "id": 4, "defname": "TBTWMAG5.def", "x": 593, "y": 14, "border": "TOTGLD5.bmp", "area": "TZTGLD5.bmp" }, - { "id": 0, "defname": "TBTWMAGE.def", "x": 597, "y": 82, "border": "TOTGLD1.bmp", "area": "TZTGLD1.bmp" }, - { "id": 14, "defname": "TBTWMARK.def", "x": 614, "y": 292, "border": "TOTMRK.bmp", "area": "TZTMRK.bmp" }, - { "id": 15, "defname": "TBTWSILO.def", "x": 763, "y": 214, "border": "TOTMRKS.bmp", "area": "TZTMRKS.bmp" }, - { "id": 17, "defname": "TBTWSPEC.def", "x": 674, "y": 276, "border": "TOTMRKA.bmp", "area": "TZTMRKA.bmp" }, - { "id": 5, "defname": "TBTWTVRN.def", "x": 375, "y": 278, "border": "TOTTAV.bmp", "area": "TZTTAV.bmp" }, - { "id": 37, "defname": "TBTWUP_0.def", "x": 446, "y": 221, "border": "TOTGRM2A.bmp", "area": "TZTGRM2A.bmp" }, - { "id": 38, "defname": "TBTWUP_1.def", "x": 4, "y": 28, "border": "TOTGAR2.bmp", "area": "TZTGAR2.bmp" }, - { "id": 39, "defname": "TBTWUP_2.def", "x": 209, "y": 177, "border": "TOTGOL2A.bmp", "area": "TZTGOL2A.bmp" }, - { "id": 40, "defname": "TBTWUP_3.def", "x": 613, "y": 74, "border": "TOTMAG2.bmp", "area": "TZTMAG2.bmp" }, - { "id": 41, "defname": "TBTWUP_4.def", "x": 511, "y": 8, "border": "TOTGEN2.bmp", "area": "TZTGEN2.bmp" }, - { "id": 42, "defname": "TBTWUP_5.def", "x": 681, "y": 157, "border": "TOTNAG2.bmp", "area": "TZTNAG2.bmp" }, - { "id": 43, "defname": "TBTWUP_6.def", "x": 75, "y": 91, "border": "TOTTIT2.bmp", "area": "TZTTIT2.bmp" }, - { "id": 8, "defname": "TBTWCAS2.def", "x": 301, "y": 0, "border": "TOTCAS2.bmp", "area": "TZTCAS2.bmp" } - ], - "blit_order": [ 36, 43, 32, 39, 10, 11, 12, 13, 32, 35, 42, 15, 5, 18, 19 ], - "creatures_basic": [ 28, 30, 32, 34, 36, 38, 40, 152 ], - "creatures_upgraded": [ 29, 31, 33, 35, 37, 39, 41 ], - "horde": [ 1, -1 ], - "mage_guild": 5, - "primary_ressource": 5, - "war_machine": 5, + // 2 - Tower + "defnames" : + [ + { "id" : 16, "defname" : "TBTWBLAK.def", "x" : 478, "y" : 211, "border" : "TOTBLKA.bmp", "area" : "TZTBLKA.bmp" }, + { "id" : 9, "defname" : "TBTWCAS3.def", "x" : 301, "y" : 0, "border" : "TOTCAS3.bmp", "area" : "TZTCAS3.bmp" }, + { "id" : 7, "defname" : "TBTWCSTL.def", "x" : 304, "y" : 0, "border" : "TOTCAS1.bmp", "area" : "TZTCAS1.bmp" }, + { "id" : 30, "defname" : "TBTWDW_0.def", "x" : 453, "y" : 221, "border" : "TOTGRM1A.bmp", "area" : "TZTGRM1A.bmp" }, + { "id" : 31, "defname" : "TBTWDW_1.def", "x" : 4, "y" : 46, "border" : "TOTGAR1.bmp", "area" : "TZTGAR1.bmp" }, + { "id" : 32, "defname" : "TBTWDW_2.def", "x" : 209, "y" : 177, "border" : "TOTGOL1A.bmp", "area" : "TZTGOL1A.bmp" }, + { "id" : 33, "defname" : "TBTWDW_3.def", "x" : 613, "y" : 95, "border" : "TOTMAG1.bmp", "area" : "TZTMAG1.bmp" }, + { "id" : 34, "defname" : "TBTWDW_4.def", "x" : 511, "y" : 75, "border" : "TOTGEN1.bmp", "area" : "TZTGEN1.bmp" }, + { "id" : 35, "defname" : "TBTWDW_5.def", "x" : 681, "y" : 208, "border" : "TOTNAG1.bmp", "area" : "TZTNAG1.bmp" }, + { "id" : 36, "defname" : "TBTWDW_6.def", "x" : 75, "y" : 144, "border" : "TOTTIT1.bmp", "area" : "TZTTIT1.bmp" }, + { "id" : 21, "defname" : "TBTWEXT0.def", "x" : 409, "y" : 82, "border" : "TOTCASW.bmp", "area" : "TZTCASW.bmp" }, + { "id" : 22, "defname" : "TBTWEXT1.def", "x" : 702, "y" : 115, "border" : "TOTGLDL.bmp", "area" : "TZTGLDL.bmp" }, + { "id" : 23, "defname" : "TBTWEXT2.def", "x" : 592, "y" : 189, "border" : "TOTGLDW.bmp", "area" : "TZTGLDW.bmp" }, + { "id" : 11, "defname" : "TBTWHAL2.def", "x" : 0, "y" : 220, "border" : "TOTHAL2.bmp", "area" : "TZTHAL2.bmp" }, + { "id" : 12, "defname" : "TBTWHAL3.def", "x" : 0, "y" : 82, "border" : "TOTHAL3.bmp", "area" : "TZTHAL3.bmp" }, + { "id" : 13, "defname" : "TBTWHAL4.def", "x" : 0, "y" : 82, "border" : "TOTHAL4.bmp", "area" : "TZTHAL4.bmp" }, + { "id" : 10, "defname" : "TBTWHALL.def", "x" : 0, "y" : 259, "border" : "TOTHAL1.bmp", "area" : "TZTHAL1.bmp" }, + { "id" : 26, "defname" : "TBTWHOLY.def", "x" : 237, "y" : 14, "border" : "TOTHOLYA.bmp", "area" : "TZTHOLYA.bmp" }, + { "id" : 18, "defname" : "TBTWHRD1.def", "x" : 0, "y" : 47, "border" : "TOTGAR1H.bmp", "area" : "TZTGAR1H.bmp" }, + { "id" : 19, "defname" : "TBTWHRD2.def", "x" : 0, "y" : 28, "border" : "TOTGAR2H.bmp", "area" : "TZTGAR2H.bmp" }, + { "id" : 1, "defname" : "TBTWMAG2.def", "x" : 593, "y" : 65, "border" : "TOTGLD2.bmp", "area" : "TZTGLD2.bmp" }, + { "id" : 2, "defname" : "TBTWMAG3.def", "x" : 593, "y" : 48, "border" : "TOTGLD3.bmp", "area" : "TZTGLD3.bmp" }, + { "id" : 3, "defname" : "TBTWMAG4.def", "x" : 593, "y" : 31, "border" : "TOTGLD4.bmp", "area" : "TZTGLD4.bmp" }, + { "id" : 4, "defname" : "TBTWMAG5.def", "x" : 593, "y" : 14, "border" : "TOTGLD5.bmp", "area" : "TZTGLD5.bmp" }, + { "id" : 0, "defname" : "TBTWMAGE.def", "x" : 597, "y" : 82, "border" : "TOTGLD1.bmp", "area" : "TZTGLD1.bmp" }, + { "id" : 14, "defname" : "TBTWMARK.def", "x" : 614, "y" : 292, "border" : "TOTMRK.bmp", "area" : "TZTMRK.bmp" }, + { "id" : 15, "defname" : "TBTWSILO.def", "x" : 763, "y" : 214, "border" : "TOTMRKS.bmp", "area" : "TZTMRKS.bmp" }, + { "id" : 17, "defname" : "TBTWSPEC.def", "x" : 674, "y" : 276, "border" : "TOTMRKA.bmp", "area" : "TZTMRKA.bmp" }, + { "id" : 5, "defname" : "TBTWTVRN.def", "x" : 375, "y" : 278, "border" : "TOTTAV.bmp", "area" : "TZTTAV.bmp" }, + { "id" : 37, "defname" : "TBTWUP_0.def", "x" : 446, "y" : 221, "border" : "TOTGRM2A.bmp", "area" : "TZTGRM2A.bmp" }, + { "id" : 38, "defname" : "TBTWUP_1.def", "x" : 4, "y" : 28, "border" : "TOTGAR2.bmp", "area" : "TZTGAR2.bmp" }, + { "id" : 39, "defname" : "TBTWUP_2.def", "x" : 209, "y" : 177, "border" : "TOTGOL2A.bmp", "area" : "TZTGOL2A.bmp" }, + { "id" : 40, "defname" : "TBTWUP_3.def", "x" : 613, "y" : 74, "border" : "TOTMAG2.bmp", "area" : "TZTMAG2.bmp" }, + { "id" : 41, "defname" : "TBTWUP_4.def", "x" : 511, "y" : 8, "border" : "TOTGEN2.bmp", "area" : "TZTGEN2.bmp" }, + { "id" : 42, "defname" : "TBTWUP_5.def", "x" : 681, "y" : 157, "border" : "TOTNAG2.bmp", "area" : "TZTNAG2.bmp" }, + { "id" : 43, "defname" : "TBTWUP_6.def", "x" : 75, "y" : 91, "border" : "TOTTIT2.bmp", "area" : "TZTTIT2.bmp" }, + { "id" : 8, "defname" : "TBTWCAS2.def", "x" : 301, "y" : 0, "border" : "TOTCAS2.bmp", "area" : "TZTCAS2.bmp" } + ], + "blit_order" : [ 36, 43, 32, 39, 10, 11, 12, 13, 32, 35, 42, 15, 5, 18, 19 ], + "creatures_basic" : [ 28, 30, 32, 34, 36, 38, 40, 152 ], + "creatures_upgraded" : [ 29, 31, 33, 35, 37, 39, 41 ], + "horde" : [ 1, null ], + "primary_resource" : 5, + "war_machine" : 5, - "building_requirements": - [ - { "id": 1, "requires": [ 0 ] }, - { "id": 2, "requires": [ 1 ] }, - { "id": 3, "requires": [ 2 ] }, - { "id": 4, "requires": [ 3 ] }, - { "id": 8, "requires": [ 7 ] }, - { "id": 9, "requires": [ 8 ] }, - { "id": 11, "requires": [ 10, 5 ] }, - { "id": 12, "requires": [ 11, 0, 14, 16 ] }, - { "id": 13, "requires": [ 12, 9 ] }, - { "id": 15, "requires": [ 14 ] }, - { "id": 17, "requires": [ 14 ] }, - { "id": 18, "requires": [ 31 ] }, - { "id": 19, "requires": [ 38 ] }, - { "id": 21, "requires": [ 7 ] }, - { "id": 22, "requires": [ 0 ] }, - { "id": 23, "requires": [ 0 ] }, - { "id": 30, "requires": [ 7 ] }, - { "id": 31, "requires": [ 30 ] }, - { "id": 32, "requires": [ 30 ] }, - { "id": 33, "requires": [ 0, 31, 32 ] }, - { "id": 34, "requires": [ 33 ] }, - { "id": 35, "requires": [ 33 ] }, - { "id": 36, "requires": [ 34, 35 ] }, - { "id": 37, "requires": [ 30 ] }, - { "id": 38, "requires": [ 31 ] }, - { "id": 39, "requires": [ 32 ] }, - { "id": 40, "requires": [ 33, 22 ] }, - { "id": 41, "requires": [ 34 ] }, - { "id": 42, "requires": [ 35 ] }, - { "id": 43, "requires": [ 36 ] } - ] + "building_requirements" : + [ + { "id" : 1, "requires" : [ 0 ] }, + { "id" : 2, "requires" : [ 1 ] }, + { "id" : 3, "requires" : [ 2 ] }, + { "id" : 4, "requires" : [ 3 ] }, + { "id" : 8, "requires" : [ 7 ] }, + { "id" : 9, "requires" : [ 8 ] }, + { "id" : 11, "requires" : [ 10, 5 ] }, + { "id" : 12, "requires" : [ 11, 0, 14, 16 ] }, + { "id" : 13, "requires" : [ 12, 9 ] }, + { "id" : 15, "requires" : [ 14 ] }, + { "id" : 17, "requires" : [ 14 ] }, + { "id" : 18, "requires" : [ 31 ] }, + { "id" : 19, "requires" : [ 38 ] }, + { "id" : 21, "requires" : [ 7 ] }, + { "id" : 22, "requires" : [ 0 ] }, + { "id" : 23, "requires" : [ 0 ] }, + { "id" : 30, "requires" : [ 7 ] }, + { "id" : 31, "requires" : [ 30 ] }, + { "id" : 32, "requires" : [ 30 ] }, + { "id" : 33, "requires" : [ 0, 31, 32 ] }, + { "id" : 34, "requires" : [ 33 ] }, + { "id" : 35, "requires" : [ 33 ] }, + { "id" : 36, "requires" : [ 34, 35 ] }, + { "id" : 37, "requires" : [ 30 ] }, + { "id" : 38, "requires" : [ 31 ] }, + { "id" : 39, "requires" : [ 32 ] }, + { "id" : 40, "requires" : [ 33, 22 ] }, + { "id" : 41, "requires" : [ 34 ] }, + { "id" : 42, "requires" : [ 35 ] }, + { "id" : 43, "requires" : [ 36 ] } + ] }, { - // Castle 3 - "defnames": [ - { "id": 16, "defname": "TBINBLAK.def", "x": 684, "y": 253, "border": "TOIBLKA.bmp", "area": "TZIBLKA.bmp" }, - { "id": 9, "defname": "TBINCAS3.def", "x": 222, "y": 18, "border": "TOICAS3A.bmp", "area": "TZICAS3A.bmp" }, - { "id": 7, "defname": "TBINCSTL.def", "x": 222, "y": 44, "border": "TOICAS2A.bmp", "area": "TZICAS2A.bmp" }, - { "id": 30, "defname": "TBINDW_0.def", "x": 614, "y": 256, "border": "TOIMP1A.bmp", "area": "TZIMP1A.bmp" }, - { "id": 31, "defname": "TBINDW_1.def", "x": 187, "y": 248, "border": "TOIGOG1A.bmp", "area": "TZIGOG1A.bmp" }, - { "id": 32, "defname": "TBINDW_2.def", "x": 9, "y": 325, "border": "TOIHND1.bmp", "area": "TZIHND1.bmp" }, - { "id": 33, "defname": "TBINDW_3.def", "x": 414, "y": 204, "border": "TOIDMN1.bmp", "area": "TZIDMN1.bmp" }, - { "id": 34, "defname": "TBINDW_4.def", "x": 359, "y": 296, "border": "TOIPIT1.bmp", "area": "TZIPIT1.bmp" }, - { "id": 35, "defname": "TBINDW_5.def", "x": 220, "y": 350, "border": "TOIEFR1.bmp", "area": "TZIEFR1.bmp" }, - { "id": 36, "defname": "TBINDW_6.def", "x": 420, "y": 153, "border": "TOIDVL1.bmp", "area": "TZIDVL1.bmp" }, - { "id": 21, "defname": "TBINEXT0.def", "x": 297, "y": 0, "border": "TOICAB1A.bmp", "area": "TZICAB1A.bmp" }, - { "id": 22, "defname": "TBINEXT1.def", "x": 227, "y": 174, "border": "TOICASGA.bmp", "area": "TZICASGA.bmp" }, - { "id": 23, "defname": "TBINEXT2.def", "x": 593, "y": 104, "border": "TOIPAIN.bmp", "area": "TZIPAIN.bmp" }, - { "id": 11, "defname": "TBINHAL2.def", "x": 0, "y": 174, "border": "TOIHAL2.bmp", "area": "TZIHAL2.bmp" }, - { "id": 12, "defname": "TBINHAL3.def", "x": 0, "y": 174, "border": "TOIHAL3.bmp", "area": "TZIHAL3.bmp" }, - { "id": 13, "defname": "TBINHAL4.def", "x": 0, "y": 131, "border": "TOIHAL4.bmp", "area": "TZIHAL4.bmp" }, - { "id": 10, "defname": "TBINHALL.def", "x": 0, "y": 174, "border": "TOIHAL1.bmp", "area": "TZIHAL1.bmp" }, - { "id": 26, "defname": "TBINHOLY.def", "x": 24, "y": 10, "border": "TOIHOLY.bmp", "area": "TZIHOLY.bmp" }, - { "id": 18, "defname": "TBINHRD1.def", "x": 614, "y": 256, "border": "TOIMP1HA.bmp", "area": "TZIMP1HA.bmp" }, - { "id": 19, "defname": "TBINHRD2.def", "x": 614, "y": 221, "border": "TOIMP2HA.bmp", "area": "TZIMP2HA.bmp" }, - { "id": 24, "defname": "TBINHRD3.def", "x": 10, "y": 301, "border": "TOIHND1H.bmp", "area": "TZIHND1H.bmp" }, - { "id": 25, "defname": "TBINHRD4.def", "x": 9, "y": 273, "border": "TOIHND2H.bmp", "area": "TZIHND2H.bmp" }, - { "id": 1, "defname": "TBINMAG2.def", "x": 667, "y": 101, "border": "TOIMAG2A.bmp", "area": "TZIMAG2A.bmp" }, - { "id": 2, "defname": "TBINMAG3.def", "x": 667, "y": 83, "border": "TOIMAG3A.bmp", "area": "TZIMAG3A.bmp" }, - { "id": 3, "defname": "TBINMAG4.def", "x": 667, "y": 56, "border": "TOIMAG4A.bmp", "area": "TZIMAG4A.bmp" }, - { "id": 4, "defname": "TBINMAG5.def", "x": 667, "y": 35, "border": "TOIMAG5A.bmp", "area": "TZIMAG5A.bmp" }, - { "id": 0, "defname": "TBINMAGE.def", "x": 667, "y": 127, "border": "TOIMAG1A.bmp", "area": "TZIMAG1A.bmp" }, - { "id": 14, "defname": "TBINMARK.def", "x": 511, "y": 301, "border": "TOIMAR1.bmp", "area": "TZIMAR1.bmp" }, - { "id": 15, "defname": "TBINSILO.def", "x": 497, "y": 337, "border": "TOIMAR2.bmp", "area": "TZIMAR2.bmp" }, - { "id": 5, "defname": "TBINTVRN.def", "x": 105, "y": 219, "border": "TOITAV.bmp", "area": "TZITAV.bmp" }, - { "id": 37, "defname": "TBINUP_0.def", "x": 614, "y": 221, "border": "TOIMP2A.bmp", "area": "TZIMP2A.bmp" }, - { "id": 38, "defname": "TBINUP_1.def", "x": 187, "y": 212, "border": "TOIGOG2A.bmp", "area": "TZIGOG2A.bmp" }, - { "id": 39, "defname": "TBINUP_2.def", "x": 9, "y": 273, "border": "TOIHND2.bmp", "area": "TZIHND2.bmp" }, - { "id": 40, "defname": "TBINUP_3.def", "x": 412, "y": 197, "border": "TOIDMN2.bmp", "area": "TZIDMN2.bmp" }, - { "id": 41, "defname": "TBINUP_4.def", "x": 359, "y": 244, "border": "TOIPIT2.bmp", "area": "TZIPIT2.bmp" }, - { "id": 42, "defname": "TBINUP_5.def", "x": 220, "y": 282, "border": "TOIEFR2.bmp", "area": "TZIEFR2.bmp" }, - { "id": 43, "defname": "TBINUP_6.def", "x": 420, "y": 105, "border": "TOIDVL2.bmp", "area": "TZIDVL2.bmp" }, - { "id": 8, "defname": "TBINCAS2.def", "x": 222, "y": 44, "border": "TOICAS1A.bmp", "area": "TZICAS1A.bmp" } - ], - "blit_order": [ 26, 21, 7, 8, 9, 22, 31, 38, 36, 43, 10, 11, 12, 13, 5, 32, 39, 24, 25, 33, 40, 34, 41, 30, 37, 18, 19, 14, 15, 16, 35, 42 ], - "creatures_basic": [ 42, 44, 46, 48, 50, 52, 54, 153 ], - "creatures_upgraded": [ 43, 45, 47, 49, 51, 53, 55 ], - "horde": [ 0, 2 ], - "mage_guild": 5, - "primary_ressource": 1, - "war_machine": 5, + // 3 - Inferno + "defnames" : + [ + { "id" : 16, "defname" : "TBINBLAK.def", "x" : 684, "y" : 253, "border" : "TOIBLKA.bmp", "area" : "TZIBLKA.bmp" }, + { "id" : 9, "defname" : "TBINCAS3.def", "x" : 222, "y" : 18, "border" : "TOICAS3A.bmp", "area" : "TZICAS3A.bmp" }, + { "id" : 7, "defname" : "TBINCSTL.def", "x" : 222, "y" : 44, "border" : "TOICAS2A.bmp", "area" : "TZICAS2A.bmp" }, + { "id" : 30, "defname" : "TBINDW_0.def", "x" : 614, "y" : 256, "border" : "TOIMP1A.bmp", "area" : "TZIMP1A.bmp" }, + { "id" : 31, "defname" : "TBINDW_1.def", "x" : 187, "y" : 248, "border" : "TOIGOG1A.bmp", "area" : "TZIGOG1A.bmp" }, + { "id" : 32, "defname" : "TBINDW_2.def", "x" : 9, "y" : 325, "border" : "TOIHND1.bmp", "area" : "TZIHND1.bmp" }, + { "id" : 33, "defname" : "TBINDW_3.def", "x" : 414, "y" : 204, "border" : "TOIDMN1.bmp", "area" : "TZIDMN1.bmp" }, + { "id" : 34, "defname" : "TBINDW_4.def", "x" : 359, "y" : 296, "border" : "TOIPIT1.bmp", "area" : "TZIPIT1.bmp" }, + { "id" : 35, "defname" : "TBINDW_5.def", "x" : 220, "y" : 350, "border" : "TOIEFR1.bmp", "area" : "TZIEFR1.bmp" }, + { "id" : 36, "defname" : "TBINDW_6.def", "x" : 420, "y" : 153, "border" : "TOIDVL1.bmp", "area" : "TZIDVL1.bmp" }, + { "id" : 21, "defname" : "TBINEXT0.def", "x" : 297, "y" : 0, "border" : "TOICAB1A.bmp", "area" : "TZICAB1A.bmp" }, + { "id" : 22, "defname" : "TBINEXT1.def", "x" : 227, "y" : 174, "border" : "TOICASGA.bmp", "area" : "TZICASGA.bmp" }, + { "id" : 23, "defname" : "TBINEXT2.def", "x" : 593, "y" : 104, "border" : "TOIPAIN.bmp", "area" : "TZIPAIN.bmp" }, + { "id" : 11, "defname" : "TBINHAL2.def", "x" : 0, "y" : 174, "border" : "TOIHAL2.bmp", "area" : "TZIHAL2.bmp" }, + { "id" : 12, "defname" : "TBINHAL3.def", "x" : 0, "y" : 174, "border" : "TOIHAL3.bmp", "area" : "TZIHAL3.bmp" }, + { "id" : 13, "defname" : "TBINHAL4.def", "x" : 0, "y" : 131, "border" : "TOIHAL4.bmp", "area" : "TZIHAL4.bmp" }, + { "id" : 10, "defname" : "TBINHALL.def", "x" : 0, "y" : 174, "border" : "TOIHAL1.bmp", "area" : "TZIHAL1.bmp" }, + { "id" : 26, "defname" : "TBINHOLY.def", "x" : 24, "y" : 10, "border" : "TOIHOLY.bmp", "area" : "TZIHOLY.bmp" }, + { "id" : 18, "defname" : "TBINHRD1.def", "x" : 614, "y" : 256, "border" : "TOIMP1HA.bmp", "area" : "TZIMP1HA.bmp" }, + { "id" : 19, "defname" : "TBINHRD2.def", "x" : 614, "y" : 221, "border" : "TOIMP2HA.bmp", "area" : "TZIMP2HA.bmp" }, + { "id" : 24, "defname" : "TBINHRD3.def", "x" : 10, "y" : 301, "border" : "TOIHND1H.bmp", "area" : "TZIHND1H.bmp" }, + { "id" : 25, "defname" : "TBINHRD4.def", "x" : 9, "y" : 273, "border" : "TOIHND2H.bmp", "area" : "TZIHND2H.bmp" }, + { "id" : 1, "defname" : "TBINMAG2.def", "x" : 667, "y" : 101, "border" : "TOIMAG2A.bmp", "area" : "TZIMAG2A.bmp" }, + { "id" : 2, "defname" : "TBINMAG3.def", "x" : 667, "y" : 83, "border" : "TOIMAG3A.bmp", "area" : "TZIMAG3A.bmp" }, + { "id" : 3, "defname" : "TBINMAG4.def", "x" : 667, "y" : 56, "border" : "TOIMAG4A.bmp", "area" : "TZIMAG4A.bmp" }, + { "id" : 4, "defname" : "TBINMAG5.def", "x" : 667, "y" : 35, "border" : "TOIMAG5A.bmp", "area" : "TZIMAG5A.bmp" }, + { "id" : 0, "defname" : "TBINMAGE.def", "x" : 667, "y" : 127, "border" : "TOIMAG1A.bmp", "area" : "TZIMAG1A.bmp" }, + { "id" : 14, "defname" : "TBINMARK.def", "x" : 511, "y" : 301, "border" : "TOIMAR1.bmp", "area" : "TZIMAR1.bmp" }, + { "id" : 15, "defname" : "TBINSILO.def", "x" : 497, "y" : 337, "border" : "TOIMAR2.bmp", "area" : "TZIMAR2.bmp" }, + { "id" : 5, "defname" : "TBINTVRN.def", "x" : 105, "y" : 219, "border" : "TOITAV.bmp", "area" : "TZITAV.bmp" }, + { "id" : 37, "defname" : "TBINUP_0.def", "x" : 614, "y" : 221, "border" : "TOIMP2A.bmp", "area" : "TZIMP2A.bmp" }, + { "id" : 38, "defname" : "TBINUP_1.def", "x" : 187, "y" : 212, "border" : "TOIGOG2A.bmp", "area" : "TZIGOG2A.bmp" }, + { "id" : 39, "defname" : "TBINUP_2.def", "x" : 9, "y" : 273, "border" : "TOIHND2.bmp", "area" : "TZIHND2.bmp" }, + { "id" : 40, "defname" : "TBINUP_3.def", "x" : 412, "y" : 197, "border" : "TOIDMN2.bmp", "area" : "TZIDMN2.bmp" }, + { "id" : 41, "defname" : "TBINUP_4.def", "x" : 359, "y" : 244, "border" : "TOIPIT2.bmp", "area" : "TZIPIT2.bmp" }, + { "id" : 42, "defname" : "TBINUP_5.def", "x" : 220, "y" : 282, "border" : "TOIEFR2.bmp", "area" : "TZIEFR2.bmp" }, + { "id" : 43, "defname" : "TBINUP_6.def", "x" : 420, "y" : 105, "border" : "TOIDVL2.bmp", "area" : "TZIDVL2.bmp" }, + { "id" : 8, "defname" : "TBINCAS2.def", "x" : 222, "y" : 44, "border" : "TOICAS1A.bmp", "area" : "TZICAS1A.bmp" } + ], + "blit_order" : [ 26, 21, 7, 8, 9, 22, 31, 38, 36, 43, 10, 11, 12, 13, 5, 32, 39, 24, 25, 33, 40, 34, 41, 30, 37, 18, 19, 14, 15, 16, 35, 42 ], + "creatures_basic" : [ 42, 44, 46, 48, 50, 52, 54, 153 ], + "creatures_upgraded" : [ 43, 45, 47, 49, 51, 53, 55 ], + "horde" : [ 0, 2 ], + "primary_resource" : 1, + "war_machine" : 5, - "building_requirements": - [ - { "id": 1, "requires": [ 0 ] }, - { "id": 2, "requires": [ 1 ] }, - { "id": 3, "requires": [ 2 ] }, - { "id": 4, "requires": [ 3 ] }, - { "id": 8, "requires": [ 7 ] }, - { "id": 9, "requires": [ 8 ] }, - { "id": 11, "requires": [ 10, 5 ] }, - { "id": 12, "requires": [ 11, 0, 14, 16 ] }, - { "id": 13, "requires": [ 12, 9 ] }, - { "id": 15, "requires": [ 14 ] }, - { "id": 18, "requires": [ 30 ] }, - { "id": 19, "requires": [ 37 ] }, - { "id": 21, "requires": [ 7 ] }, - { "id": 22, "requires": [ 8 ] }, - { "id": 23, "requires": [ 0 ] }, - { "id": 24, "requires": [ 32 ] }, - { "id": 25, "requires": [ 39 ] }, - { "id": 30, "requires": [ 7 ] }, - { "id": 31, "requires": [ 30 ] }, - { "id": 32, "requires": [ 30 ] }, - { "id": 33, "requires": [ 31 ] }, - { "id": 34, "requires": [ 33 ] }, - { "id": 35, "requires": [ 0, 33 ] }, - { "id": 36, "requires": [ 34, 35 ] }, - { "id": 37, "requires": [ 30 ] }, - { "id": 38, "requires": [ 31 ] }, - { "id": 39, "requires": [ 32 ] }, - { "id": 40, "requires": [ 33 ] }, - { "id": 41, "requires": [ 34, 1 ] }, - { "id": 42, "requires": [ 35 ] }, - { "id": 43, "requires": [ 36 ] } - ] + "building_requirements" : + [ + { "id" : 1, "requires" : [ 0 ] }, + { "id" : 2, "requires" : [ 1 ] }, + { "id" : 3, "requires" : [ 2 ] }, + { "id" : 4, "requires" : [ 3 ] }, + { "id" : 8, "requires" : [ 7 ] }, + { "id" : 9, "requires" : [ 8 ] }, + { "id" : 11, "requires" : [ 10, 5 ] }, + { "id" : 12, "requires" : [ 11, 0, 14, 16 ] }, + { "id" : 13, "requires" : [ 12, 9 ] }, + { "id" : 15, "requires" : [ 14 ] }, + { "id" : 18, "requires" : [ 30 ] }, + { "id" : 19, "requires" : [ 37 ] }, + { "id" : 21, "requires" : [ 7 ] }, + { "id" : 22, "requires" : [ 8 ] }, + { "id" : 23, "requires" : [ 0 ] }, + { "id" : 24, "requires" : [ 32 ] }, + { "id" : 25, "requires" : [ 39 ] }, + { "id" : 30, "requires" : [ 7 ] }, + { "id" : 31, "requires" : [ 30 ] }, + { "id" : 32, "requires" : [ 30 ] }, + { "id" : 33, "requires" : [ 31 ] }, + { "id" : 34, "requires" : [ 33 ] }, + { "id" : 35, "requires" : [ 0, 33 ] }, + { "id" : 36, "requires" : [ 34, 35 ] }, + { "id" : 37, "requires" : [ 30 ] }, + { "id" : 38, "requires" : [ 31 ] }, + { "id" : 39, "requires" : [ 32 ] }, + { "id" : 40, "requires" : [ 33 ] }, + { "id" : 41, "requires" : [ 34, 1 ] }, + { "id" : 42, "requires" : [ 35 ] }, + { "id" : 43, "requires" : [ 36 ] } + ] }, { - // Castle 4 - "defnames": [ - { "id": 16, "defname": "TBNCBLAK.def", "x": 382, "y": 252, "border": "TONSMITA.bmp", "area": "TZNSMITA.bmp" }, - { "id": 8, "defname": "TBNCCAS2.def", "x": 139, "y": 66, "border": "TONCAS2.bmp", "area": "TZNCAS2.bmp" }, - { "id": 9, "defname": "TBNCCAS3.def", "x": 34, "y": 18, "border": "TONCAS3.bmp", "area": "TZNCAS3.bmp" }, - { "id": 7, "defname": "TBNCCSTL.def", "x": 138, "y": 66, "border": "TONCAS1.bmp", "area": "TZNCAS1.bmp" }, - { "id": 6, "defname": "TBNCDOCK.def", "x": 617, "y": 265, "border": "TONSHPBA.bmp", "area": "TZNSHPBA.bmp" }, - { "id": 30, "defname": "TBNCDW_0.def", "x": 80, "y": 222, "border": "TONSKEL1.bmp", "area": "TZNSKEL1.bmp" }, - { "id": 31, "defname": "TBNCDW_1.def", "x": 502, "y": 223, "border": "TONZOMB1.bmp", "area": "TZNZOMB1.bmp" }, - { "id": 32, "defname": "TBNCDW_2.def", "x": 0, "y": 187, "border": "TONWIGH1.bmp", "area": "TZNWIGH1.bmp" }, - { "id": 33, "defname": "TBNCDW_3.def", "x": 607, "y": 212, "border": "TONVAM1.bmp", "area": "TZNVAM1.bmp" }, - { "id": 34, "defname": "TBNCDW_4.def", "x": 206, "y": 207, "border": "TONLICH1.bmp", "area": "TZNLICH1.bmp" }, - { "id": 35, "defname": "TBNCDW_5.def", "x": 0, "y": 31, "border": "TONBKN1.bmp", "area": "TZNBKN1.bmp" }, - { "id": 36, "defname": "TBNCDW_6.def", "x": 663, "y": 25, "border": "TONBON1.bmp", "area": "TZNBON1.bmp" }, - { "id": 21, "defname": "TBNCEXT0.def", "x": 307, "y": 61, "border": "TONNECRA.bmp", "area": "TZNNECRA.bmp" }, - { "id": 22, "defname": "TBNCEXT1.def", "x": 247, "y": 275, "border": "TONSKELT.bmp", "area": "TZNSKELT.bmp" }, - { "id": -1, "defname": "TBNCEXT2.def", "x": 25, "y": 279 }, - { "id": 27, "defname": "TBNCEXT3.def", "x": 0, "y": 241 }, - { "id": 28, "defname": "TBNCEXT4.def", "x": 321, "y": 255 }, - { "id": 29, "defname": "TBNCEXT5.def", "x": 475, "y": 257 }, - { "id": 11, "defname": "TBNCHAL2.def", "x": 482, "y": 56, "border": "TONHAL2.bmp", "area": "TZNHAL2.bmp" }, - { "id": 12, "defname": "TBNCHAL3.def", "x": 478, "y": 26, "border": "TONHAL3.bmp", "area": "TZNHAL3.bmp" }, - { "id": 13, "defname": "TBNCHAL4.def", "x": 481, "y": 26, "border": "TONHAL4.bmp", "area": "TZNHAL4.bmp" }, - { "id": 10, "defname": "TBNCHALL.def", "x": 468, "y": 76, "border": "TONHAL1.bmp", "area": "TZNHAL1.bmp" }, - { "id": 26, "defname": "TBNCHOLY.def", "x": 410, "y": 88, "border": "TONHOLYA.bmp", "area": "TZNHOLYA.bmp" }, - { "id": 18, "defname": "TBNCHRD1.def", "x": 80, "y": 222, "border": "TONSKE1H.bmp", "area": "TZNSKE1H.bmp" }, - { "id": 19, "defname": "TBNCHRD2.def", "x": 64, "y": 222, "border": "TONSKE2H.bmp", "area": "TZNSKE2H.bmp" }, - { "id": 1, "defname": "TBNCMAG2.def", "x": 341, "y": 97, "border": "TONMAG2.bmp", "area": "TZNMAG2.bmp" }, - { "id": 2, "defname": "TBNCMAG3.def", "x": 341, "y": 78, "border": "TONMAG3.bmp", "area": "TZNMAG3.bmp" }, - { "id": 3, "defname": "TBNCMAG4.def", "x": 340, "y": 62, "border": "TONMAG4.bmp", "area": "TZNMAG4.bmp" }, - { "id": 4, "defname": "TBNCMAG5.def", "x": 343, "y": 35, "border": "TONMAG5.bmp", "area": "TZNMAG5.bmp" }, - { "id": 0, "defname": "TBNCMAGE.def", "x": 341, "y": 116, "border": "TONMAG1.bmp", "area": "TZNMAG1.bmp" }, - { "id": 14, "defname": "TBNCMARK.def", "x": 347, "y": 215, "border": "TONMRK1.bmp", "area": "TZNMRK1.bmp" }, - { "id": 15, "defname": "TBNCSILO.def", "x": 276, "y": 185, "border": "TONMRK2.bmp", "area": "TZNMRK2.bmp" }, - { "id": 17, "defname": "TBNCSPEC.def", "x": 18, "y": 0, "border": "TONSHRDA.bmp", "area": "TZNSHRDA.bmp" }, - { "id": 5, "defname": "TBNCTVRN.def", "x": 508, "y": 189, "border": "TONTAV.bmp", "area": "TZNTAV.bmp" }, - { "id": 37, "defname": "TBNCUP_0.def", "x": 64, "y": 222, "border": "TONSKEL2.bmp", "area": "TZNSKEL2.bmp" }, - { "id": 38, "defname": "TBNCUP_1.def", "x": 498, "y": 224, "border": "TONZOMB2.bmp", "area": "TZNZOMB2.bmp" }, - { "id": 39, "defname": "TBNCUP_2.def", "x": 0, "y": 179, "border": "TONWIGH2.bmp", "area": "TZNWIGH2.bmp" }, - { "id": 40, "defname": "TBNCUP_3.def", "x": 615, "y": 193, "border": "TONVAM2.bmp", "area": "TZNVAM2.bmp" }, - { "id": 41, "defname": "TBNCUP_4.def", "x": 222, "y": 171, "border": "TONLICH2.bmp", "area": "TZNLICH2.bmp" }, - { "id": 42, "defname": "TBNCUP_5.def", "x": 0, "y": 30, "border": "TONBKN2.bmp", "area": "TZNBKN2.bmp" }, - { "id": 43, "defname": "TBNCUP_6.def", "x": 662, "y": 23, "border": "TONBON2.bmp", "area": "TZNBON2.bmp" }, - { "id": 20, "defname": "TBNCBOAT.def", "x": 617, "y": 265, "border": "TONSHPNA.bmp", "area": "TZNSHPNA.bmp" } - ], - "blit_order": [ 17, 0, 1, 2, 3, 4, 7, 8, 9, 32, 39, 26, 15, 14, 34, 41, 16, 5, 33, 40, 31, 38, 6, 30, 18, 37, 19, 22, 20 ], - "creatures_basic": [ 56, 58, 60, 62, 64, 66, 68, 154 ], - "creatures_upgraded": [ 57, 59, 61, 63, 65, 67, 69 ], - "horde": [ 0, -1 ], - "mage_guild": 5, - "primary_ressource": 127, - "war_machine": 6, + // 4 - Necropolis + "defnames" : + [ + { "id" : 16, "defname" : "TBNCBLAK.def", "x" : 382, "y" : 252, "border" : "TONSMITA.bmp", "area" : "TZNSMITA.bmp" }, + { "id" : 8, "defname" : "TBNCCAS2.def", "x" : 139, "y" : 66, "border" : "TONCAS2.bmp", "area" : "TZNCAS2.bmp" }, + { "id" : 9, "defname" : "TBNCCAS3.def", "x" : 34, "y" : 18, "border" : "TONCAS3.bmp", "area" : "TZNCAS3.bmp" }, + { "id" : 7, "defname" : "TBNCCSTL.def", "x" : 138, "y" : 66, "border" : "TONCAS1.bmp", "area" : "TZNCAS1.bmp" }, + { "id" : 6, "defname" : "TBNCDOCK.def", "x" : 617, "y" : 265, "border" : "TONSHPBA.bmp", "area" : "TZNSHPBA.bmp" }, + { "id" : 30, "defname" : "TBNCDW_0.def", "x" : 80, "y" : 222, "border" : "TONSKEL1.bmp", "area" : "TZNSKEL1.bmp" }, + { "id" : 31, "defname" : "TBNCDW_1.def", "x" : 502, "y" : 223, "border" : "TONZOMB1.bmp", "area" : "TZNZOMB1.bmp" }, + { "id" : 32, "defname" : "TBNCDW_2.def", "x" : 0, "y" : 187, "border" : "TONWIGH1.bmp", "area" : "TZNWIGH1.bmp" }, + { "id" : 33, "defname" : "TBNCDW_3.def", "x" : 607, "y" : 212, "border" : "TONVAM1.bmp", "area" : "TZNVAM1.bmp" }, + { "id" : 34, "defname" : "TBNCDW_4.def", "x" : 206, "y" : 207, "border" : "TONLICH1.bmp", "area" : "TZNLICH1.bmp" }, + { "id" : 35, "defname" : "TBNCDW_5.def", "x" : 0, "y" : 31, "border" : "TONBKN1.bmp", "area" : "TZNBKN1.bmp" }, + { "id" : 36, "defname" : "TBNCDW_6.def", "x" : 663, "y" : 25, "border" : "TONBON1.bmp", "area" : "TZNBON1.bmp" }, + { "id" : 21, "defname" : "TBNCEXT0.def", "x" : 307, "y" : 61, "border" : "TONNECRA.bmp", "area" : "TZNNECRA.bmp" }, + { "id" : 22, "defname" : "TBNCEXT1.def", "x" : 247, "y" : 275, "border" : "TONSKELT.bmp", "area" : "TZNSKELT.bmp" }, + { "id" : -1, "defname" : "TBNCEXT2.def", "x" : 25, "y" : 279 }, + { "id" : 27, "defname" : "TBNCEXT3.def", "x" : 0, "y" : 241 }, + { "id" : 28, "defname" : "TBNCEXT4.def", "x" : 321, "y" : 255 }, + { "id" : 29, "defname" : "TBNCEXT5.def", "x" : 475, "y" : 257 }, + { "id" : 11, "defname" : "TBNCHAL2.def", "x" : 482, "y" : 56, "border" : "TONHAL2.bmp", "area" : "TZNHAL2.bmp" }, + { "id" : 12, "defname" : "TBNCHAL3.def", "x" : 478, "y" : 26, "border" : "TONHAL3.bmp", "area" : "TZNHAL3.bmp" }, + { "id" : 13, "defname" : "TBNCHAL4.def", "x" : 481, "y" : 26, "border" : "TONHAL4.bmp", "area" : "TZNHAL4.bmp" }, + { "id" : 10, "defname" : "TBNCHALL.def", "x" : 468, "y" : 76, "border" : "TONHAL1.bmp", "area" : "TZNHAL1.bmp" }, + { "id" : 26, "defname" : "TBNCHOLY.def", "x" : 410, "y" : 88, "border" : "TONHOLYA.bmp", "area" : "TZNHOLYA.bmp" }, + { "id" : 18, "defname" : "TBNCHRD1.def", "x" : 80, "y" : 222, "border" : "TONSKE1H.bmp", "area" : "TZNSKE1H.bmp" }, + { "id" : 19, "defname" : "TBNCHRD2.def", "x" : 64, "y" : 222, "border" : "TONSKE2H.bmp", "area" : "TZNSKE2H.bmp" }, + { "id" : 1, "defname" : "TBNCMAG2.def", "x" : 341, "y" : 97, "border" : "TONMAG2.bmp", "area" : "TZNMAG2.bmp" }, + { "id" : 2, "defname" : "TBNCMAG3.def", "x" : 341, "y" : 78, "border" : "TONMAG3.bmp", "area" : "TZNMAG3.bmp" }, + { "id" : 3, "defname" : "TBNCMAG4.def", "x" : 340, "y" : 62, "border" : "TONMAG4.bmp", "area" : "TZNMAG4.bmp" }, + { "id" : 4, "defname" : "TBNCMAG5.def", "x" : 343, "y" : 35, "border" : "TONMAG5.bmp", "area" : "TZNMAG5.bmp" }, + { "id" : 0, "defname" : "TBNCMAGE.def", "x" : 341, "y" : 116, "border" : "TONMAG1.bmp", "area" : "TZNMAG1.bmp" }, + { "id" : 14, "defname" : "TBNCMARK.def", "x" : 347, "y" : 215, "border" : "TONMRK1.bmp", "area" : "TZNMRK1.bmp" }, + { "id" : 15, "defname" : "TBNCSILO.def", "x" : 276, "y" : 185, "border" : "TONMRK2.bmp", "area" : "TZNMRK2.bmp" }, + { "id" : 17, "defname" : "TBNCSPEC.def", "x" : 18, "y" : 0, "border" : "TONSHRDA.bmp", "area" : "TZNSHRDA.bmp" }, + { "id" : 5, "defname" : "TBNCTVRN.def", "x" : 508, "y" : 189, "border" : "TONTAV.bmp", "area" : "TZNTAV.bmp" }, + { "id" : 37, "defname" : "TBNCUP_0.def", "x" : 64, "y" : 222, "border" : "TONSKEL2.bmp", "area" : "TZNSKEL2.bmp" }, + { "id" : 38, "defname" : "TBNCUP_1.def", "x" : 498, "y" : 224, "border" : "TONZOMB2.bmp", "area" : "TZNZOMB2.bmp" }, + { "id" : 39, "defname" : "TBNCUP_2.def", "x" : 0, "y" : 179, "border" : "TONWIGH2.bmp", "area" : "TZNWIGH2.bmp" }, + { "id" : 40, "defname" : "TBNCUP_3.def", "x" : 615, "y" : 193, "border" : "TONVAM2.bmp", "area" : "TZNVAM2.bmp" }, + { "id" : 41, "defname" : "TBNCUP_4.def", "x" : 222, "y" : 171, "border" : "TONLICH2.bmp", "area" : "TZNLICH2.bmp" }, + { "id" : 42, "defname" : "TBNCUP_5.def", "x" : 0, "y" : 30, "border" : "TONBKN2.bmp", "area" : "TZNBKN2.bmp" }, + { "id" : 43, "defname" : "TBNCUP_6.def", "x" : 662, "y" : 23, "border" : "TONBON2.bmp", "area" : "TZNBON2.bmp" }, + { "id" : 20, "defname" : "TBNCBOAT.def", "x" : 617, "y" : 265, "border" : "TONSHPNA.bmp", "area" : "TZNSHPNA.bmp" } + ], + "blit_order" : [ 17, 0, 1, 2, 3, 4, 7, 8, 9, 32, 39, 26, 15, 14, 34, 41, 16, 5, 33, 40, 31, 38, 6, 30, 18, 37, 19, 22, 20 ], + "creatures_basic" : [ 56, 58, 60, 62, 64, 66, 68, 154 ], + "creatures_upgraded" : [ 57, 59, 61, 63, 65, 67, 69 ], + "horde" : [ 0, null ], + "war_machine" : 6, - "building_requirements": - [ - { "id": 1, "requires": [ 0 ] }, - { "id": 2, "requires": [ 1 ] }, - { "id": 3, "requires": [ 2 ] }, - { "id": 4, "requires": [ 3 ] }, - { "id": 8, "requires": [ 7 ] }, - { "id": 9, "requires": [ 8 ] }, - { "id": 11, "requires": [ 10, 5 ] }, - { "id": 12, "requires": [ 11, 0, 14, 16 ] }, - { "id": 13, "requires": [ 12, 9 ] }, - { "id": 15, "requires": [ 14 ] }, - { "id": 17, "requires": [ 7 ] }, - { "id": 18, "requires": [ 22, 30 ] }, - { "id": 19, "requires": [ 22, 37 ] }, - { "id": 20, "requires": [ 6 ] }, - { "id": 21, "requires": [ 0 ] }, - { "id": 22, "requires": [ 30 ] }, - { "id": 30, "requires": [ 7 ] }, - { "id": 31, "requires": [ 30 ] }, - { "id": 32, "requires": [ 30 ] }, - { "id": 33, "requires": [ 31 ] }, - { "id": 34, "requires": [ 0, 31 ] }, - { "id": 35, "requires": [ 33, 34 ] }, - { "id": 36, "requires": [ 35 ] }, - { "id": 37, "requires": [ 30 ] }, - { "id": 38, "requires": [ 31 ] }, - { "id": 39, "requires": [ 32 ] }, - { "id": 40, "requires": [ 33, 21 ] }, - { "id": 41, "requires": [ 34 ] }, - { "id": 42, "requires": [ 35 ] }, - { "id": 43, "requires": [ 36 ] } - ] + "building_requirements" : + [ + { "id" : 1, "requires" : [ 0 ] }, + { "id" : 2, "requires" : [ 1 ] }, + { "id" : 3, "requires" : [ 2 ] }, + { "id" : 4, "requires" : [ 3 ] }, + { "id" : 8, "requires" : [ 7 ] }, + { "id" : 9, "requires" : [ 8 ] }, + { "id" : 11, "requires" : [ 10, 5 ] }, + { "id" : 12, "requires" : [ 11, 0, 14, 16 ] }, + { "id" : 13, "requires" : [ 12, 9 ] }, + { "id" : 15, "requires" : [ 14 ] }, + { "id" : 17, "requires" : [ 7 ] }, + { "id" : 18, "requires" : [ 22, 30 ] }, + { "id" : 19, "requires" : [ 22, 37 ] }, + { "id" : 20, "requires" : [ 6 ] }, + { "id" : 21, "requires" : [ 0 ] }, + { "id" : 22, "requires" : [ 30 ] }, + { "id" : 30, "requires" : [ 7 ] }, + { "id" : 31, "requires" : [ 30 ] }, + { "id" : 32, "requires" : [ 30 ] }, + { "id" : 33, "requires" : [ 31 ] }, + { "id" : 34, "requires" : [ 0, 31 ] }, + { "id" : 35, "requires" : [ 33, 34 ] }, + { "id" : 36, "requires" : [ 35 ] }, + { "id" : 37, "requires" : [ 30 ] }, + { "id" : 38, "requires" : [ 31 ] }, + { "id" : 39, "requires" : [ 32 ] }, + { "id" : 40, "requires" : [ 33, 21 ] }, + { "id" : 41, "requires" : [ 34 ] }, + { "id" : 42, "requires" : [ 35 ] }, + { "id" : 43, "requires" : [ 36 ] } + ] }, { - // Castle 5 - "defnames": [ - { "id": 16, "defname": "TBDNBLAK.def", "x": 544, "y": 248, "border": "TODSMITH.bmp", "area": "TZDSMITH.bmp" }, - { "id": 9, "defname": "TBDNCAS3.def", "x": 363, "y": 87, "border": "TODCAS3.bmp", "area": "TZDCAS3.bmp" }, - { "id": 7, "defname": "TBDNCSTL.def", "x": 363, "y": 87, "border": "TODCAS1.bmp", "area": "TZDCAS1.bmp" }, - { "id": 30, "defname": "TBDNDW_0.def", "x": 0, "y": 326, "border": "TODTRG1A.bmp", "area": "TZDTRG1A.bmp" }, - { "id": 31, "defname": "TBDNDW_1.def", "x": 0, "y": 26, "border": "TODHAR1.bmp", "area": "TZDHAR1.bmp" }, - { "id": 32, "defname": "TBDNDW_2.def", "x": 118, "y": 308, "border": "TODBEH1A.bmp", "area": "TZDBEH1A.bmp" }, - { "id": 33, "defname": "TBDNDW_3.def", "x": 300, "y": 29, "border": "TODMED1.bmp", "area": "TZDMED1.bmp" }, - { "id": 34, "defname": "TBDNDW_4.def", "x": 551, "y": 186, "border": "TODMIN1.bmp", "area": "TZDMIN1.bmp" }, - { "id": 35, "defname": "TBDNDW_5.def", "x": 270, "y": 253, "border": "TODMAN1.bmp", "area": "TZDMAN1.bmp" }, - { "id": 36, "defname": "TBDNDW_6.def", "x": 550, "y": 0, "border": "TODDRA1A.bmp", "area": "TZDDRA1A.bmp" }, - { "id": 21, "defname": "TBDNEXT0.def", "x": 131, "y": 26, "border": "TODVOR1A.bmp", "area": "TZDVOR1A.bmp" }, - { "id": 22, "defname": "TBDNEXT1.def", "x": 687, "y": 177, "border": "TODPORTA.bmp", "area": "TZDPORTA.bmp" }, - { "id": 23, "defname": "TBDNEXT2.def", "x": 313, "y": 298, "border": "TODACAD.bmp", "area": "TZDACAD.bmp" }, - { "id": 11, "defname": "TBDNHAL2.def", "x": 0, "y": 223, "border": "TODHALL2.bmp", "area": "TZDHALL2.bmp" }, - { "id": 12, "defname": "TBDNHAL3.def", "x": 0, "y": 223, "border": "TODHALL3.bmp", "area": "TZDHALL3.bmp" }, - { "id": 13, "defname": "TBDNHAL4.def", "x": 0, "y": 203, "border": "TODHALL4.bmp", "area": "TZDHALL4.bmp" }, - { "id": 10, "defname": "TBDNHALL.def", "x": 0, "y": 234, "border": "TODHALL1.bmp", "area": "TZDHALL1.bmp" }, - { "id": 26, "defname": "TBDNHOLY.def", "x": 562, "y": 24, "border": "TODHOLY.bmp", "area": "TZDHOLY.bmp" }, - { "id": 18, "defname": "TBDNHRD1.def", "x": 0, "y": 326, "border": "TODTR1HA.bmp", "area": "TZDTR1HA.bmp" }, - { "id": 19, "defname": "TBDNHRD2.def", "x": 0, "y": 300, "border": "TODTR2HA.bmp", "area": "TZDTR2HA.bmp" }, - { "id": 1, "defname": "TBDNMAG2.def", "x": 164, "y": 97, "border": "TODMAG2.bmp", "area": "TZDMAG2.bmp" }, - { "id": 2, "defname": "TBDNMAG3.def", "x": 164, "y": 77, "border": "TODMAG3.bmp", "area": "TZDMAG3.bmp" }, - { "id": 3, "defname": "TBDNMAG4.def", "x": 164, "y": 61, "border": "TODMAG4.bmp", "area": "TZDMAG4.bmp" }, - { "id": 4, "defname": "TBDNMAG5.def", "x": 164, "y": 15, "border": "TODMAG5.bmp", "area": "TZDMAG5.bmp" }, - { "id": 0, "defname": "TBDNMAGE.def", "x": 164, "y": 119, "border": "TODMAG1.bmp", "area": "TZDMAG1.bmp" }, - { "id": 14, "defname": "TBDNMARK.def", "x": 590, "y": 318, "border": "TODMARK.bmp", "area": "TZDMARK.bmp" }, - { "id": 15, "defname": "TBDNSILO.def", "x": 624, "y": 335, "border": "TODSILO.bmp", "area": "TZDSILO.bmp" }, - { "id": 17, "defname": "TBDNSPEC.def", "x": 746, "y": 294, "border": "TODART.bmp", "area": "TZDART.bmp" }, - { "id": 5, "defname": "TBDNTVRN.def", "x": 211, "y": 297, "border": "TODTAV.bmp", "area": "TZDTAV.bmp" }, - { "id": 37, "defname": "TBDNUP_0.def", "x": 0, "y": 300, "border": "TODTRG2A.bmp", "area": "TZDTRG2A.bmp" }, - { "id": 38, "defname": "TBDNUP_1.def", "x": 0, "y": 26, "border": "TODHAR2.bmp", "area": "TZDHAR2.bmp" }, - { "id": 39, "defname": "TBDNUP_2.def", "x": 118, "y": 256, "border": "TODBEH2A.bmp", "area": "TZDBEH2A.bmp" }, - { "id": 40, "defname": "TBDNUP_3.def", "x": 300, "y": 29, "border": "TODMED2.bmp", "area": "TZDMED2.bmp" }, - { "id": 41, "defname": "TBDNUP_4.def", "x": 519, "y": 172, "border": "TODMIN2.bmp", "area": "TZDMIN2.bmp" }, - { "id": 42, "defname": "TBDNUP_5.def", "x": 270, "y": 253, "border": "TODMAN2.bmp", "area": "TZDMAN2.bmp" }, - { "id": 43, "defname": "TBDNUP_6.def", "x": 550, "y": 0, "border": "TODDRA2A.bmp", "area": "TZDDRA2A.bmp" }, - { "id": 8, "defname": "TBDNCAS2.def", "x": 363, "y": 87, "border": "TODCAS2.bmp", "area": "TZDCAS2.bmp" } - ], - "blit_order": [ 0, 1, 2, 3, 4, 21, 35, 42, 5, 30, 18, 37, 19, 32, 39, 26, 7, 8, 9, 23 ], - "creatures_basic": [ 70, 72, 74, 76, 78, 80, 82, 155 ], - "creatures_upgraded": [ 71, 73, 75, 77, 79, 81, 83 ], - "horde": [ 0, -1 ], - "mage_guild": 5, - "primary_ressource": 3, - "war_machine": 4, + // 5 - Dungeon + "defnames" : + [ + { "id" : 16, "defname" : "TBDNBLAK.def", "x" : 544, "y" : 248, "border" : "TODSMITH.bmp", "area" : "TZDSMITH.bmp" }, + { "id" : 9, "defname" : "TBDNCAS3.def", "x" : 363, "y" : 87, "border" : "TODCAS3.bmp", "area" : "TZDCAS3.bmp" }, + { "id" : 7, "defname" : "TBDNCSTL.def", "x" : 363, "y" : 87, "border" : "TODCAS1.bmp", "area" : "TZDCAS1.bmp" }, + { "id" : 30, "defname" : "TBDNDW_0.def", "x" : 0, "y" : 326, "border" : "TODTRG1A.bmp", "area" : "TZDTRG1A.bmp" }, + { "id" : 31, "defname" : "TBDNDW_1.def", "x" : 0, "y" : 26, "border" : "TODHAR1.bmp", "area" : "TZDHAR1.bmp" }, + { "id" : 32, "defname" : "TBDNDW_2.def", "x" : 118, "y" : 308, "border" : "TODBEH1A.bmp", "area" : "TZDBEH1A.bmp" }, + { "id" : 33, "defname" : "TBDNDW_3.def", "x" : 300, "y" : 29, "border" : "TODMED1.bmp", "area" : "TZDMED1.bmp" }, + { "id" : 34, "defname" : "TBDNDW_4.def", "x" : 551, "y" : 186, "border" : "TODMIN1.bmp", "area" : "TZDMIN1.bmp" }, + { "id" : 35, "defname" : "TBDNDW_5.def", "x" : 270, "y" : 253, "border" : "TODMAN1.bmp", "area" : "TZDMAN1.bmp" }, + { "id" : 36, "defname" : "TBDNDW_6.def", "x" : 550, "y" : 0, "border" : "TODDRA1A.bmp", "area" : "TZDDRA1A.bmp" }, + { "id" : 21, "defname" : "TBDNEXT0.def", "x" : 131, "y" : 26 , "border" : "TODVOR1A.bmp", "area" : "TZDVOR1A.bmp" }, + { "id" : 22, "defname" : "TBDNEXT1.def", "x" : 687, "y" : 177, "border" : "TODPORTA.bmp", "area" : "TZDPORTA.bmp" }, + { "id" : 23, "defname" : "TBDNEXT2.def", "x" : 313, "y" : 298, "border" : "TODACAD.bmp", "area" : "TZDACAD.bmp" }, + { "id" : 11, "defname" : "TBDNHAL2.def", "x" : 0, "y" : 223, "border" : "TODHALL2.bmp", "area" : "TZDHALL2.bmp" }, + { "id" : 12, "defname" : "TBDNHAL3.def", "x" : 0, "y" : 223, "border" : "TODHALL3.bmp", "area" : "TZDHALL3.bmp" }, + { "id" : 13, "defname" : "TBDNHAL4.def", "x" : 0, "y" : 203, "border" : "TODHALL4.bmp", "area" : "TZDHALL4.bmp" }, + { "id" : 10, "defname" : "TBDNHALL.def", "x" : 0, "y" : 234, "border" : "TODHALL1.bmp", "area" : "TZDHALL1.bmp" }, + { "id" : 26, "defname" : "TBDNHOLY.def", "x" : 562, "y" : 24, "border" : "TODHOLY.bmp", "area" : "TZDHOLY.bmp" }, + { "id" : 18, "defname" : "TBDNHRD1.def", "x" : 0, "y" : 326, "border" : "TODTR1HA.bmp", "area" : "TZDTR1HA.bmp" }, + { "id" : 19, "defname" : "TBDNHRD2.def", "x" : 0, "y" : 300, "border" : "TODTR2HA.bmp", "area" : "TZDTR2HA.bmp" }, + { "id" : 1, "defname" : "TBDNMAG2.def", "x" : 164, "y" : 97, "border" : "TODMAG2.bmp", "area" : "TZDMAG2.bmp" }, + { "id" : 2, "defname" : "TBDNMAG3.def", "x" : 164, "y" : 77, "border" : "TODMAG3.bmp", "area" : "TZDMAG3.bmp" }, + { "id" : 3, "defname" : "TBDNMAG4.def", "x" : 164, "y" : 61, "border" : "TODMAG4.bmp", "area" : "TZDMAG4.bmp" }, + { "id" : 4, "defname" : "TBDNMAG5.def", "x" : 164, "y" : 15, "border" : "TODMAG5.bmp", "area" : "TZDMAG5.bmp" }, + { "id" : 0, "defname" : "TBDNMAGE.def", "x" : 164, "y" : 119, "border" : "TODMAG1.bmp", "area" : "TZDMAG1.bmp" }, + { "id" : 14, "defname" : "TBDNMARK.def", "x" : 590, "y" : 318, "border" : "TODMARK.bmp", "area" : "TZDMARK.bmp" }, + { "id" : 15, "defname" : "TBDNSILO.def", "x" : 624, "y" : 335, "border" : "TODSILO.bmp", "area" : "TZDSILO.bmp" }, + { "id" : 17, "defname" : "TBDNSPEC.def", "x" : 746, "y" : 294, "border" : "TODART.bmp", "area" : "TZDART.bmp" }, + { "id" : 5, "defname" : "TBDNTVRN.def", "x" : 211, "y" : 297, "border" : "TODTAV.bmp", "area" : "TZDTAV.bmp" }, + { "id" : 37, "defname" : "TBDNUP_0.def", "x" : 0, "y" : 300, "border" : "TODTRG2A.bmp", "area" : "TZDTRG2A.bmp" }, + { "id" : 38, "defname" : "TBDNUP_1.def", "x" : 0, "y" : 26, "border" : "TODHAR2.bmp", "area" : "TZDHAR2.bmp" }, + { "id" : 39, "defname" : "TBDNUP_2.def", "x" : 118, "y" : 256, "border" : "TODBEH2A.bmp", "area" : "TZDBEH2A.bmp" }, + { "id" : 40, "defname" : "TBDNUP_3.def", "x" : 300, "y" : 29, "border" : "TODMED2.bmp", "area" : "TZDMED2.bmp" }, + { "id" : 41, "defname" : "TBDNUP_4.def", "x" : 519, "y" : 172, "border" : "TODMIN2.bmp", "area" : "TZDMIN2.bmp" }, + { "id" : 42, "defname" : "TBDNUP_5.def", "x" : 270, "y" : 253, "border" : "TODMAN2.bmp", "area" : "TZDMAN2.bmp" }, + { "id" : 43, "defname" : "TBDNUP_6.def", "x" : 550, "y" : 0, "border" : "TODDRA2A.bmp", "area" : "TZDDRA2A.bmp" }, + { "id" : 8, "defname" : "TBDNCAS2.def", "x" : 363, "y" : 87, "border" : "TODCAS2.bmp", "area" : "TZDCAS2.bmp" } + ], + "blit_order" : [ 0, 1, 2, 3, 4, 21, 35, 42, 5, 30, 18, 37, 19, 32, 39, 26, 7, 8, 9, 23 ], + "creatures_basic" : [ 70, 72, 74, 76, 78, 80, 82, 155 ], + "creatures_upgraded" : [ 71, 73, 75, 77, 79, 81, 83 ], + "horde" : [ 0, null ], + "primary_resource" : 3, + "war_machine" : 4, - "building_requirements": - [ - { "id": 1, "requires": [ 0 ] }, - { "id": 2, "requires": [ 1 ] }, - { "id": 3, "requires": [ 2 ] }, - { "id": 4, "requires": [ 3 ] }, - { "id": 8, "requires": [ 7 ] }, - { "id": 9, "requires": [ 8 ] }, - { "id": 11, "requires": [ 10, 5 ] }, - { "id": 12, "requires": [ 11, 0, 14, 16 ] }, - { "id": 13, "requires": [ 12, 9 ] }, - { "id": 15, "requires": [ 14 ] }, - { "id": 17, "requires": [ 14 ] }, - { "id": 18, "requires": [ 30 ] }, - { "id": 19, "requires": [ 37 ] }, - { "id": 21, "requires": [ 0 ] }, - { "id": 30, "requires": [ 7 ] }, - { "id": 31, "requires": [ 30 ] }, - { "id": 32, "requires": [ 30 ] }, - { "id": 33, "requires": [ 31, 32 ] }, - { "id": 34, "requires": [ 33 ] }, - { "id": 35, "requires": [ 33 ] }, - { "id": 36, "requires": [ 1, 34, 35 ] }, - { "id": 37, "requires": [ 30 ] }, - { "id": 38, "requires": [ 31 ] }, - { "id": 39, "requires": [ 32 ] }, - { "id": 40, "requires": [ 33 ] }, - { "id": 41, "requires": [ 34 ] }, - { "id": 42, "requires": [ 35 ] }, - { "id": 43, "requires": [ 36, 2 ] } - ] + "building_requirements" : + [ + { "id" : 1, "requires" : [ 0 ] }, + { "id" : 2, "requires" : [ 1 ] }, + { "id" : 3, "requires" : [ 2 ] }, + { "id" : 4, "requires" : [ 3 ] }, + { "id" : 8, "requires" : [ 7 ] }, + { "id" : 9, "requires" : [ 8 ] }, + { "id" : 11, "requires" : [ 10, 5 ] }, + { "id" : 12, "requires" : [ 11, 0, 14, 16 ] }, + { "id" : 13, "requires" : [ 12, 9 ] }, + { "id" : 15, "requires" : [ 14 ] }, + { "id" : 17, "requires" : [ 14 ] }, + { "id" : 18, "requires" : [ 30 ] }, + { "id" : 19, "requires" : [ 37 ] }, + { "id" : 21, "requires" : [ 0 ] }, + { "id" : 30, "requires" : [ 7 ] }, + { "id" : 31, "requires" : [ 30 ] }, + { "id" : 32, "requires" : [ 30 ] }, + { "id" : 33, "requires" : [ 31, 32 ] }, + { "id" : 34, "requires" : [ 33 ] }, + { "id" : 35, "requires" : [ 33 ] }, + { "id" : 36, "requires" : [ 1, 34, 35 ] }, + { "id" : 37, "requires" : [ 30 ] }, + { "id" : 38, "requires" : [ 31 ] }, + { "id" : 39, "requires" : [ 32 ] }, + { "id" : 40, "requires" : [ 33 ] }, + { "id" : 41, "requires" : [ 34 ] }, + { "id" : 42, "requires" : [ 35 ] }, + { "id" : 43, "requires" : [ 36, 2 ] } + ] }, { - // Castle 6 - "defnames": [ - { "id": 31, "defname": "TBSTDW_1.def", "x": 266, "y": 246, "border": "TOSWOL1.bmp", "area": "TZSWOL1.bmp" }, - { "id": 43, "defname": "TBSTUP_6.def", "x": 604, "y": 0, "border": "TOSBEH2A.bmp", "area": "TZSBEH2A.bmp" }, - { "id": 8, "defname": "TBSTCAS2.def", "x": 402, "y": 114, "border": "TOSCA2.bmp", "area": "TZSCA2.bmp" }, - { "id": 9, "defname": "TBSTCAS3.def", "x": 402, "y": 114, "border": "TOSCA3.bmp", "area": "TZSCA3.bmp" }, - { "id": 7, "defname": "TBSTCSTL.def", "x": 402, "y": 148, "border": "TOSCA1.bmp", "area": "TZSCA1.bmp" }, - { "id": 30, "defname": "TBSTDW_0.def", "x": 373, "y": 239, "border": "TOSGOB1.bmp", "area": "TZSGOB1.bmp" }, - { "id": 32, "defname": "TBSTDW_2.def", "x": 566, "y": 232, "border": "TOSORC1.bmp", "area": "TZSORC1.bmp" }, - { "id": 33, "defname": "TBSTDW_3.def", "x": 197, "y": 204, "border": "TOSOGR1.bmp", "area": "TZSOGR1.bmp" }, - { "id": 34, "defname": "TBSTDW_4.def", "x": 137, "y": 30, "border": "TOSROC1.bmp", "area": "TZSROC1.bmp" }, - { "id": 35, "defname": "TBSTDW_5.def", "x": 622, "y": 160, "border": "TOSCYC1.bmp", "area": "TZSCYC1.bmp" }, - { "id": 36, "defname": "TBSTDW_6.def", "x": 604, "y": 0, "border": "TOSBEH1A.bmp", "area": "TZSBEH1A.bmp" }, - { "id": 21, "defname": "TBSTEXT0.def", "x": 473, "y": 282, "border": "TOSMRK1C.bmp", "area": "TZSMRK1C.bmp" }, - { "id": 22, "defname": "TBSTEXT1.def", "x": 617, "y": 286, "border": "TOSBLK2.bmp", "area": "TZSBLK2.bmp" }, - { "id": 23, "defname": "TBSTEXT2.def", "x": 313, "y": 13, "border": "TOSVAH.bmp", "area": "TZSVAH.bmp" }, - { "id": -1, "defname": "TBSTEXT3.def", "x": 23, "y": 20 }, - { "id": 11, "defname": "TBSTHAL2.def", "x": 0, "y": 225, "border": "TOSHAL2A.bmp", "area": "TZSHAL2A.bmp" }, - { "id": 12, "defname": "TBSTHAL3.def", "x": 0, "y": 201, "border": "TOSHAL3A.bmp", "area": "TZSHAL3A.bmp" }, - { "id": 13, "defname": "TBSTHAL4.def", "x": 0, "y": 148, "border": "TOSHAL4A.bmp", "area": "TZSHAL4A.bmp" }, - { "id": 10, "defname": "TBSTHALL.def", "x": 0, "y": 259, "border": "TOSHAL1A.bmp", "area": "TZSHAL1A.bmp" }, - { "id": 26, "defname": "TBSTHOLY.def", "x": 321, "y": 105, "border": "TOSHOLYA.bmp", "area": "TZSHOLYA.bmp" }, - { "id": 18, "defname": "TBSTHRD1.def", "x": 373, "y": 239, "border": "TOSGOB1H.bmp", "area": "TZSGOB1H.bmp" }, - { "id": 19, "defname": "TBSTHRD2.def", "x": 373, "y": 220, "border": "TOSGOB2H.bmp", "area": "TZSGOB2H.bmp" }, - { "id": 1, "defname": "TBSTMAG2.def", "x": 473, "y": 37, "border": "TOSMAG2.bmp", "area": "TZSMAG2.bmp" }, - { "id": 2, "defname": "TBSTMAG3.def", "x": 473, "y": 1, "border": "TOSMAG3.bmp", "area": "TZSMAG3.bmp" }, - { "id": 0, "defname": "TBSTMAGE.def", "x": 473, "y": 67, "border": "TOSMAG1.bmp", "area": "TZSMAG1.bmp" }, - { "id": 14, "defname": "TBSTMARK.def", "x": 397, "y": 308, "border": "TOSMRK1.bmp", "area": "TZSMRK1.bmp" }, - { "id": 15, "defname": "TBSTSILO.def", "x": 458, "y": 248, "border": "TOSMRK2.bmp", "area": "TZSMRK2.bmp" }, - { "id": 17, "defname": "TBSTSPEC.def", "x": 550, "y": 229, "border": "TOSCA1EA.bmp", "area": "TZSCA1EA.bmp" }, - { "id": 5, "defname": "TBSTTVRN.def", "x": 170, "y": 280, "border": "TOSTAV.bmp", "area": "TZSTAV.bmp" }, - { "id": 37, "defname": "TBSTUP_0.def", "x": 373, "y": 220, "border": "TOSGOB2.bmp", "area": "TZSGOB2.bmp" }, - { "id": 38, "defname": "TBSTUP_1.def", "x": 266, "y": 225, "border": "TOSWOL2.bmp", "area": "TZSWOL2.bmp" }, - { "id": 39, "defname": "TBSTUP_2.def", "x": 566, "y": 158, "border": "TOSORC2.bmp", "area": "TZSORC2.bmp" }, - { "id": 40, "defname": "TBSTUP_3.def", "x": 197, "y": 137, "border": "TOSOGR2.bmp", "area": "TZSOGR2.bmp" }, - { "id": 41, "defname": "TBSTUP_4.def", "x": 129, "y": 15, "border": "TOSROC2.bmp", "area": "TZSROC2.bmp" }, - { "id": 42, "defname": "TBSTUP_5.def", "x": 616, "y": 93, "border": "TOSCYC2A.bmp", "area": "TZSCYC2A.bmp" }, - { "id": 16, "defname": "TBSTBLAK.def", "x": 660, "y": 286, "border": "TOSBLK1.bmp", "area": "TZSBLK1.bmp" } - ], - "blit_order": [ 33, 40, 30, 18, 37, 19, 31, 38, 23, 26, 5, 32, 39, 15, 14, 21, 16, 22 ], - "creatures_basic": [ 84, 86, 88, 90, 92, 94, 96, 156 ], - "creatures_upgraded": [ 85, 87, 89, 91, 93, 95, 97 ], - "horde": [ 0, -1 ], - "mage_guild": 3, - "primary_ressource": 127, - "war_machine": 5, + // 6 - Stronghold + "defnames" : + [ + { "id" : 31, "defname" : "TBSTDW_1.def", "x" : 266, "y" : 246, "border" : "TOSWOL1.bmp", "area" : "TZSWOL1.bmp" }, + { "id" : 43, "defname" : "TBSTUP_6.def", "x" : 604, "y" : 0, "border" : "TOSBEH2A.bmp", "area" : "TZSBEH2A.bmp" }, + { "id" : 8, "defname" : "TBSTCAS2.def", "x" : 402, "y" : 114, "border" : "TOSCA2.bmp", "area" : "TZSCA2.bmp" }, + { "id" : 9, "defname" : "TBSTCAS3.def", "x" : 402, "y" : 114, "border" : "TOSCA3.bmp", "area" : "TZSCA3.bmp" }, + { "id" : 7, "defname" : "TBSTCSTL.def", "x" : 402, "y" : 148, "border" : "TOSCA1.bmp", "area" : "TZSCA1.bmp" }, + { "id" : 30, "defname" : "TBSTDW_0.def", "x" : 373, "y" : 239, "border" : "TOSGOB1.bmp", "area" : "TZSGOB1.bmp" }, + { "id" : 32, "defname" : "TBSTDW_2.def", "x" : 566, "y" : 232, "border" : "TOSORC1.bmp", "area" : "TZSORC1.bmp" }, + { "id" : 33, "defname" : "TBSTDW_3.def", "x" : 197, "y" : 204, "border" : "TOSOGR1.bmp", "area" : "TZSOGR1.bmp" }, + { "id" : 34, "defname" : "TBSTDW_4.def", "x" : 137, "y" : 30, "border" : "TOSROC1.bmp", "area" : "TZSROC1.bmp" }, + { "id" : 35, "defname" : "TBSTDW_5.def", "x" : 622, "y" : 160, "border" : "TOSCYC1.bmp", "area" : "TZSCYC1.bmp" }, + { "id" : 36, "defname" : "TBSTDW_6.def", "x" : 604, "y" : 0, "border" : "TOSBEH1A.bmp", "area" : "TZSBEH1A.bmp" }, + { "id" : 21, "defname" : "TBSTEXT0.def", "x" : 473, "y" : 282, "border" : "TOSMRK1C.bmp", "area" : "TZSMRK1C.bmp" }, + { "id" : 22, "defname" : "TBSTEXT1.def", "x" : 617, "y" : 286, "border" : "TOSBLK2.bmp", "area" : "TZSBLK2.bmp" }, + { "id" : 23, "defname" : "TBSTEXT2.def", "x" : 313, "y" : 13, "border" : "TOSVAH.bmp", "area" : "TZSVAH.bmp" }, + { "id" : -1, "defname" : "TBSTEXT3.def", "x" : 23, "y" : 20 }, + { "id" : 11, "defname" : "TBSTHAL2.def", "x" : 0, "y" : 225, "border" : "TOSHAL2A.bmp", "area" : "TZSHAL2A.bmp" }, + { "id" : 12, "defname" : "TBSTHAL3.def", "x" : 0, "y" : 201, "border" : "TOSHAL3A.bmp", "area" : "TZSHAL3A.bmp" }, + { "id" : 13, "defname" : "TBSTHAL4.def", "x" : 0, "y" : 148, "border" : "TOSHAL4A.bmp", "area" : "TZSHAL4A.bmp" }, + { "id" : 10, "defname" : "TBSTHALL.def", "x" : 0, "y" : 259, "border" : "TOSHAL1A.bmp", "area" : "TZSHAL1A.bmp" }, + { "id" : 26, "defname" : "TBSTHOLY.def", "x" : 321, "y" : 105, "border" : "TOSHOLYA.bmp", "area" : "TZSHOLYA.bmp" }, + { "id" : 18, "defname" : "TBSTHRD1.def", "x" : 373, "y" : 239, "border" : "TOSGOB1H.bmp", "area" : "TZSGOB1H.bmp" }, + { "id" : 19, "defname" : "TBSTHRD2.def", "x" : 373, "y" : 220, "border" : "TOSGOB2H.bmp", "area" : "TZSGOB2H.bmp" }, + { "id" : 1, "defname" : "TBSTMAG2.def", "x" : 473, "y" : 37, "border" : "TOSMAG2.bmp", "area" : "TZSMAG2.bmp" }, + { "id" : 2, "defname" : "TBSTMAG3.def", "x" : 473, "y" : 1, "border" : "TOSMAG3.bmp", "area" : "TZSMAG3.bmp" }, + { "id" : 0, "defname" : "TBSTMAGE.def", "x" : 473, "y" : 67, "border" : "TOSMAG1.bmp", "area" : "TZSMAG1.bmp" }, + { "id" : 14, "defname" : "TBSTMARK.def", "x" : 397, "y" : 308, "border" : "TOSMRK1.bmp", "area" : "TZSMRK1.bmp" }, + { "id" : 15, "defname" : "TBSTSILO.def", "x" : 458, "y" : 248, "border" : "TOSMRK2.bmp", "area" : "TZSMRK2.bmp" }, + { "id" : 17, "defname" : "TBSTSPEC.def", "x" : 550, "y" : 229, "border" : "TOSCA1EA.bmp", "area" : "TZSCA1EA.bmp" }, + { "id" : 5, "defname" : "TBSTTVRN.def", "x" : 170, "y" : 280, "border" : "TOSTAV.bmp", "area" : "TZSTAV.bmp" }, + { "id" : 37, "defname" : "TBSTUP_0.def", "x" : 373, "y" : 220, "border" : "TOSGOB2.bmp", "area" : "TZSGOB2.bmp" }, + { "id" : 38, "defname" : "TBSTUP_1.def", "x" : 266, "y" : 225, "border" : "TOSWOL2.bmp", "area" : "TZSWOL2.bmp" }, + { "id" : 39, "defname" : "TBSTUP_2.def", "x" : 566, "y" : 158, "border" : "TOSORC2.bmp", "area" : "TZSORC2.bmp" }, + { "id" : 40, "defname" : "TBSTUP_3.def", "x" : 197, "y" : 137, "border" : "TOSOGR2.bmp", "area" : "TZSOGR2.bmp" }, + { "id" : 41, "defname" : "TBSTUP_4.def", "x" : 129, "y" : 15, "border" : "TOSROC2.bmp", "area" : "TZSROC2.bmp" }, + { "id" : 42, "defname" : "TBSTUP_5.def", "x" : 616, "y" : 93, "border" : "TOSCYC2A.bmp", "area" : "TZSCYC2A.bmp" }, + { "id" : 16, "defname" : "TBSTBLAK.def", "x" : 660, "y" : 286, "border" : "TOSBLK1.bmp", "area" : "TZSBLK1.bmp" } + ], + "blit_order" : [ 33, 40, 30, 18, 37, 19, 31, 38, 23, 26, 5, 32, 39, 15, 14, 21, 16, 22 ], + "creatures_basic" : [ 84, 86, 88, 90, 92, 94, 96, 156 ], + "creatures_upgraded" : [ 85, 87, 89, 91, 93, 95, 97 ], + "horde" : [ 0, null ], + "mage_guild" : 3, + "war_machine" : 5, - "building_requirements": - [ - { "id": 1, "requires": [ 0 ] }, - { "id": 2, "requires": [ 1 ] }, - { "id": 3, "requires": [ 2 ] }, - { "id": 4, "requires": [ 3 ] }, - { "id": 8, "requires": [ 7 ] }, - { "id": 9, "requires": [ 8 ] }, - { "id": 11, "requires": [ 10, 5 ] }, - { "id": 12, "requires": [ 11, 0, 14, 16 ] }, - { "id": 13, "requires": [ 12, 9 ] }, - { "id": 15, "requires": [ 14 ] }, - { "id": 17, "requires": [ 7 ] }, - { "id": 18, "requires": [ 30 ] }, - { "id": 19, "requires": [ 37 ] }, - { "id": 21, "requires": [ 14 ] }, - { "id": 22, "requires": [ 16 ] }, - { "id": 23, "requires": [ 7 ] }, - { "id": 30, "requires": [ 7 ] }, - { "id": 31, "requires": [ 30 ] }, - { "id": 32, "requires": [ 30 ] }, - { "id": 33, "requires": [ 32 ] }, - { "id": 34, "requires": [ 31 ] }, - { "id": 35, "requires": [ 33 ] }, - { "id": 36, "requires": [ 34 ] }, - { "id": 37, "requires": [ 30 ] }, - { "id": 38, "requires": [ 31, 37 ] }, - { "id": 39, "requires": [ 32, 16 ] }, - { "id": 40, "requires": [ 33, 0 ] }, - { "id": 41, "requires": [ 34 ] }, - { "id": 42, "requires": [ 35 ] }, - { "id": 43, "requires": [ 36 ] } - ] + "building_requirements" : + [ + { "id" : 1, "requires" : [ 0 ] }, + { "id" : 2, "requires" : [ 1 ] }, + { "id" : 3, "requires" : [ 2 ] }, + { "id" : 4, "requires" : [ 3 ] }, + { "id" : 8, "requires" : [ 7 ] }, + { "id" : 9, "requires" : [ 8 ] }, + { "id" : 11, "requires" : [ 10, 5 ] }, + { "id" : 12, "requires" : [ 11, 0, 14, 16 ] }, + { "id" : 13, "requires" : [ 12, 9 ] }, + { "id" : 15, "requires" : [ 14 ] }, + { "id" : 17, "requires" : [ 7 ] }, + { "id" : 18, "requires" : [ 30 ] }, + { "id" : 19, "requires" : [ 37 ] }, + { "id" : 21, "requires" : [ 14 ] }, + { "id" : 22, "requires" : [ 16 ] }, + { "id" : 23, "requires" : [ 7 ] }, + { "id" : 30, "requires" : [ 7 ] }, + { "id" : 31, "requires" : [ 30 ] }, + { "id" : 32, "requires" : [ 30 ] }, + { "id" : 33, "requires" : [ 32 ] }, + { "id" : 34, "requires" : [ 31 ] }, + { "id" : 35, "requires" : [ 33 ] }, + { "id" : 36, "requires" : [ 34 ] }, + { "id" : 37, "requires" : [ 30 ] }, + { "id" : 38, "requires" : [ 31, 37 ] }, + { "id" : 39, "requires" : [ 32, 16 ] }, + { "id" : 40, "requires" : [ 33, 0 ] }, + { "id" : 41, "requires" : [ 34 ] }, + { "id" : 42, "requires" : [ 35 ] }, + { "id" : 43, "requires" : [ 36 ] } + ] }, { - // Castle 7 - "defnames": [ - { "id": 16, "defname": "TBFRBLAK.def", "x": 360, "y": 160, "border": "TOFAIDA.bmp", "area": "TZFAIDA.bmp" }, - { "id": 8, "defname": "TBFRCAS2.def", "x": 368, "y": 98, "border": "TOFCAS2.bmp", "area": "TZFCAS2.bmp" }, - { "id": 9, "defname": "TBFRCAS3.def", "x": 368, "y": 55, "border": "TOFCAS3.bmp", "area": "TZFCAS3.bmp" }, - { "id": 7, "defname": "TBFRCSTL.def", "x": 368, "y": 118, "border": "TOFCAS1.bmp", "area": "TZFCAS1.bmp" }, - { "id": 6, "defname": "TBFRDOCK.def", "x": 197, "y": 294, "border": "TOFDCK2.bmp", "area": "TZFDCK2.bmp" }, - { "id": 30, "defname": "TBFRDW_0.def", "x": 641, "y": 168, "border": "TOFGNL1.bmp", "area": "TZFGNL1.bmp" }, - { "id": 31, "defname": "TBFRDW_1.def", "x": 141, "y": 178, "border": "TOFLIZ1.bmp", "area": "TZFLIZ1.bmp" }, - { "id": 34, "defname": "TBFRDW_2.def", "x": 15, "y": 127, "border": "TOFGOR1.bmp", "area": "TZFGOR1.bmp" }, - { "id": 32, "defname": "TBFRDW_3.def", "x": 192, "y": 85, "border": "TOFFLY1A.bmp", "area": "TZFFLY1A.bmp" }, - { "id": 33, "defname": "TBFRDW_4.def", "x": 0, "y": 292, "border": "TOFBAS1.bmp", "area": "TZFBAS1.bmp" }, - { "id": 35, "defname": "TBFRDW_5.def", "x": 0, "y": 4, "border": "TOFWYV1.bmp", "area": "TZFWYV1.bmp" }, - { "id": 36, "defname": "TBFRDW_6.def", "x": 612, "y": 291, "border": "TOFHYD1A.bmp", "area": "TZFHYD1A.bmp" }, - { "id": 21, "defname": "TBFREXT0.def", "x": 341, "y": 174, "border": "TOFCASD.bmp", "area": "TZFCASD.bmp" }, - { "id": 22, "defname": "TBFREXT1.def", "x": 349, "y": 79, "border": "TOFCASA.bmp", "area": "TZFCASA.bmp" }, - { "id": -1, "defname": "TBFREXT2.def", "x": 372, "y": 227 }, - { "id": 11, "defname": "TBFRHAL2.def", "x": 166, "y": 97, "border": "TOFHAL2.bmp", "area": "TZFHAL2.bmp" }, - { "id": 12, "defname": "TBFRHAL3.def", "x": 166, "y": 51, "border": "TOFHAL3.bmp", "area": "TZFHAL3.bmp" }, - { "id": 13, "defname": "TBFRHAL4.def", "x": 166, "y": 2, "border": "TOFHAL4.bmp", "area": "TZFHAL4.bmp" }, - { "id": 10, "defname": "TBFRHALL.def", "x": 166, "y": 128, "border": "TOFHAL1.bmp", "area": "TZFHAL1.bmp" }, - { "id": 26, "defname": "TBFRHOLY.def", "x": 468, "y": 260, "border": "TOFHLYAA.bmp", "area": "TZFHLYAA.bmp" }, - { "id": 18, "defname": "TBFRHRD1.def", "x": 641, "y": 121, "border": "TOFGNL1H.bmp", "area": "TZFGNL1H.bmp" }, - { "id": 19, "defname": "TBFRHRD2.def", "x": 641, "y": 68, "border": "TOFGNL2H.bmp", "area": "TZFGNL2H.bmp" }, - { "id": 1, "defname": "TBFRMAG2.def", "x": 0, "y": 177, "border": "TOFMAG2A.bmp", "area": "TZFMAG2A.bmp" }, - { "id": 2, "defname": "TBFRMAG3.def", "x": 0, "y": 135, "border": "TOFMAG3A.bmp", "area": "TZFMAG3A.bmp" }, - { "id": 0, "defname": "TBFRMAGE.def", "x": 0, "y": 200, "border": "TOFMAG1A.bmp", "area": "TZFMAG1A.bmp" }, - { "id": 14, "defname": "TBFRMARK.def", "x": 382, "y": 219, "border": "TOFMRKAA.bmp", "area": "TZFMRKAA.bmp" }, - { "id": 15, "defname": "TBFRSILO.def", "x": 448, "y": 210, "border": "TOFMRK2A.bmp", "area": "TZFMRK2A.bmp" }, - { "id": 17, "defname": "TBFRSPEC.def", "x": 703, "y": 36, "border": "TOFCAGE.bmp", "area": "TZFCAGE.bmp" }, - { "id": 5, "defname": "TBFRTVRN.def", "x": 634, "y": 219, "border": "TOFTAVA.bmp", "area": "TZFTAVA.bmp" }, - { "id": 37, "defname": "TBFRUP_0.def", "x": 641, "y": 107, "border": "TOFGNL2.bmp", "area": "TZFGNL2.bmp" }, - { "id": 38, "defname": "TBFRUP_1.def", "x": 125, "y": 163, "border": "TOFLIZ2.bmp", "area": "TZFLIZ2.bmp" }, - { "id": 41, "defname": "TBFRUP_2.def", "x": 15, "y": 69, "border": "TOFGOR2.bmp", "area": "TZFGOR2.bmp" }, - { "id": 39, "defname": "TBFRUP_3.def", "x": 159, "y": 19, "border": "TOFFLY2A.bmp", "area": "TZFFLY2A.bmp" }, - { "id": 40, "defname": "TBFRUP_4.def", "x": 0, "y": 257, "border": "TOFBAS2.bmp", "area": "TZFBAS2.bmp" }, - { "id": 42, "defname": "TBFRUP_5.def", "x": 0, "y": 4, "border": "TOFWYV2.bmp", "area": "TZFWYV2.bmp" }, - { "id": 43, "defname": "TBFRUP_6.def", "x": 587, "y": 263, "border": "TOFHYD2A.bmp", "area": "TZFHYD2A.bmp" }, - { "id": 29, "defname": "TBFRWTRW.def", "x": 320, "y": 141 }, - { "id": 20, "defname": "TBFRBOAT.def", "x": 197, "y": 294, "border": "TOFDCK1.bmp", "area": "TZFDCK1.bmp" } - ], - "blit_order": [ 16, 15, 14, 34, 41, 31, 38, 10, 11, 12, 13, 29, 0, 1, 2, 33, 40, 30, 18, 37, 19, 5, 36, 43, 26 ], - "creatures_basic": [ 98, 100, 104, 106, 102, 108, 110, 157 ], - "creatures_upgraded": [ 99, 101, 105, 107, 103, 109, 111 ], - "horde": [ 0, -1 ], - "mage_guild": 3, - "primary_ressource": 127, - "war_machine": 6, + // 7 - Fortress + "defnames" : + [ + { "id" : 16, "defname" : "TBFRBLAK.def", "x" : 360, "y" : 160, "border" : "TOFAIDA.bmp", "area" : "TZFAIDA.bmp" }, + { "id" : 8, "defname" : "TBFRCAS2.def", "x" : 368, "y" : 98, "border" : "TOFCAS2.bmp", "area" : "TZFCAS2.bmp" }, + { "id" : 9, "defname" : "TBFRCAS3.def", "x" : 368, "y" : 55, "border" : "TOFCAS3.bmp", "area" : "TZFCAS3.bmp" }, + { "id" : 7, "defname" : "TBFRCSTL.def", "x" : 368, "y" : 118, "border" : "TOFCAS1.bmp", "area" : "TZFCAS1.bmp" }, + { "id" : 6, "defname" : "TBFRDOCK.def", "x" : 197, "y" : 294, "border" : "TOFDCK2.bmp", "area" : "TZFDCK2.bmp" }, + { "id" : 30, "defname" : "TBFRDW_0.def", "x" : 641, "y" : 168, "border" : "TOFGNL1.bmp", "area" : "TZFGNL1.bmp" }, + { "id" : 31, "defname" : "TBFRDW_1.def", "x" : 141, "y" : 178, "border" : "TOFLIZ1.bmp", "area" : "TZFLIZ1.bmp" }, + { "id" : 34, "defname" : "TBFRDW_2.def", "x" : 15, "y" : 127, "border" : "TOFGOR1.bmp", "area" : "TZFGOR1.bmp" }, + { "id" : 32, "defname" : "TBFRDW_3.def", "x" : 192, "y" : 85, "border" : "TOFFLY1A.bmp", "area" : "TZFFLY1A.bmp" }, + { "id" : 33, "defname" : "TBFRDW_4.def", "x" : 0, "y" : 292, "border" : "TOFBAS1.bmp", "area" : "TZFBAS1.bmp" }, + { "id" : 35, "defname" : "TBFRDW_5.def", "x" : 0, "y" : 4, "border" : "TOFWYV1.bmp", "area" : "TZFWYV1.bmp" }, + { "id" : 36, "defname" : "TBFRDW_6.def", "x" : 612, "y" : 291, "border" : "TOFHYD1A.bmp", "area" : "TZFHYD1A.bmp" }, + { "id" : 21, "defname" : "TBFREXT0.def", "x" : 341, "y" : 174, "border" : "TOFCASD.bmp", "area" : "TZFCASD.bmp" }, + { "id" : 22, "defname" : "TBFREXT1.def", "x" : 349, "y" : 79, "border" : "TOFCASA.bmp", "area" : "TZFCASA.bmp" }, + { "id" : -1, "defname" : "TBFREXT2.def", "x" : 372, "y" : 227 }, + { "id" : 11, "defname" : "TBFRHAL2.def", "x" : 166, "y" : 97, "border" : "TOFHAL2.bmp", "area" : "TZFHAL2.bmp" }, + { "id" : 12, "defname" : "TBFRHAL3.def", "x" : 166, "y" : 51, "border" : "TOFHAL3.bmp", "area" : "TZFHAL3.bmp" }, + { "id" : 13, "defname" : "TBFRHAL4.def", "x" : 166, "y" : 2, "border" : "TOFHAL4.bmp", "area" : "TZFHAL4.bmp" }, + { "id" : 10, "defname" : "TBFRHALL.def", "x" : 166, "y" : 128, "border" : "TOFHAL1.bmp", "area" : "TZFHAL1.bmp" }, + { "id" : 26, "defname" : "TBFRHOLY.def", "x" : 468, "y" : 260, "border" : "TOFHLYAA.bmp", "area" : "TZFHLYAA.bmp" }, + { "id" : 18, "defname" : "TBFRHRD1.def", "x" : 641, "y" : 121, "border" : "TOFGNL1H.bmp", "area" : "TZFGNL1H.bmp" }, + { "id" : 19, "defname" : "TBFRHRD2.def", "x" : 641, "y" : 68, "border" : "TOFGNL2H.bmp", "area" : "TZFGNL2H.bmp" }, + { "id" : 1, "defname" : "TBFRMAG2.def", "x" : 0, "y" : 177, "border" : "TOFMAG2A.bmp", "area" : "TZFMAG2A.bmp" }, + { "id" : 2, "defname" : "TBFRMAG3.def", "x" : 0, "y" : 135, "border" : "TOFMAG3A.bmp", "area" : "TZFMAG3A.bmp" }, + { "id" : 0, "defname" : "TBFRMAGE.def", "x" : 0, "y" : 200, "border" : "TOFMAG1A.bmp", "area" : "TZFMAG1A.bmp" }, + { "id" : 14, "defname" : "TBFRMARK.def", "x" : 382, "y" : 219, "border" : "TOFMRKAA.bmp", "area" : "TZFMRKAA.bmp" }, + { "id" : 15, "defname" : "TBFRSILO.def", "x" : 448, "y" : 210, "border" : "TOFMRK2A.bmp", "area" : "TZFMRK2A.bmp" }, + { "id" : 17, "defname" : "TBFRSPEC.def", "x" : 703, "y" : 36, "border" : "TOFCAGE.bmp", "area" : "TZFCAGE.bmp" }, + { "id" : 5, "defname" : "TBFRTVRN.def", "x" : 634, "y" : 219, "border" : "TOFTAVA.bmp", "area" : "TZFTAVA.bmp" }, + { "id" : 37, "defname" : "TBFRUP_0.def", "x" : 641, "y" : 107, "border" : "TOFGNL2.bmp", "area" : "TZFGNL2.bmp" }, + { "id" : 38, "defname" : "TBFRUP_1.def", "x" : 125, "y" : 163, "border" : "TOFLIZ2.bmp", "area" : "TZFLIZ2.bmp" }, + { "id" : 41, "defname" : "TBFRUP_2.def", "x" : 15, "y" : 69, "border" : "TOFGOR2.bmp", "area" : "TZFGOR2.bmp" }, + { "id" : 39, "defname" : "TBFRUP_3.def", "x" : 159, "y" : 19, "border" : "TOFFLY2A.bmp", "area" : "TZFFLY2A.bmp" }, + { "id" : 40, "defname" : "TBFRUP_4.def", "x" : 0, "y" : 257, "border" : "TOFBAS2.bmp", "area" : "TZFBAS2.bmp" }, + { "id" : 42, "defname" : "TBFRUP_5.def", "x" : 0, "y" : 4, "border" : "TOFWYV2.bmp", "area" : "TZFWYV2.bmp" }, + { "id" : 43, "defname" : "TBFRUP_6.def", "x" : 587, "y" : 263, "border" : "TOFHYD2A.bmp", "area" : "TZFHYD2A.bmp" }, + { "id" : 29, "defname" : "TBFRWTRW.def", "x" : 320, "y" : 141 }, + { "id" : 20, "defname" : "TBFRBOAT.def", "x" : 197, "y" : 294, "border" : "TOFDCK1.bmp", "area" : "TZFDCK1.bmp" } + ], + "blit_order" : [ 16, 15, 14, 34, 41, 31, 38, 10, 11, 12, 13, 29, 0, 1, 2, 33, 40, 30, 18, 37, 19, 5, 36, 43, 26 ], + "creatures_basic" : [ 98, 100, 104, 106, 102, 108, 110, 157 ], + "creatures_upgraded" : [ 99, 101, 105, 107, 103, 109, 111 ], + "horde" : [ 0, null ], + "mage_guild" : 3, + "war_machine" : 6, - "building_requirements": - [ - { "id": 1, "requires": [ 0 ] }, - { "id": 2, "requires": [ 1 ] }, - { "id": 3, "requires": [ 2 ] }, - { "id": 4, "requires": [ 3 ] }, - { "id": 8, "requires": [ 7 ] }, - { "id": 9, "requires": [ 8 ] }, - { "id": 11, "requires": [ 10, 5 ] }, - { "id": 12, "requires": [ 11, 0, 14, 16 ] }, - { "id": 13, "requires": [ 12, 9 ] }, - { "id": 15, "requires": [ 14 ] }, - { "id": 17, "requires": [ 11, 21 ] }, - { "id": 18, "requires": [ 30 ] }, - { "id": 19, "requires": [ 37 ] }, - { "id": 21, "requires": [ 7 ] }, - { "id": 22, "requires": [ 21 ] }, - { "id": 30, "requires": [ 7 ] }, - { "id": 31, "requires": [ 30 ] }, - { "id": 32, "requires": [ 30 ] }, - { "id": 33, "requires": [ 32 ] }, - { "id": 34, "requires": [ 31, 32 ] }, - { "id": 35, "requires": [ 31 ] }, - { "id": 36, "requires": [ 33, 35 ] }, - { "id": 37, "requires": [ 30, 5 ] }, - { "id": 38, "requires": [ 31 ] }, - { "id": 39, "requires": [ 32 ] }, - { "id": 40, "requires": [ 33 ] }, - { "id": 41, "requires": [ 34, 15 ] }, - { "id": 42, "requires": [ 35 ] }, - { "id": 43, "requires": [ 36 ] } - ] + "building_requirements" : + [ + { "id" : 1, "requires" : [ 0 ] }, + { "id" : 2, "requires" : [ 1 ] }, + { "id" : 3, "requires" : [ 2 ] }, + { "id" : 4, "requires" : [ 3 ] }, + { "id" : 8, "requires" : [ 7 ] }, + { "id" : 9, "requires" : [ 8 ] }, + { "id" : 11, "requires" : [ 10, 5 ] }, + { "id" : 12, "requires" : [ 11, 0, 14, 16 ] }, + { "id" : 13, "requires" : [ 12, 9 ] }, + { "id" : 15, "requires" : [ 14 ] }, + { "id" : 17, "requires" : [ 11, 21 ] }, + { "id" : 18, "requires" : [ 30 ] }, + { "id" : 19, "requires" : [ 37 ] }, + { "id" : 21, "requires" : [ 7 ] }, + { "id" : 22, "requires" : [ 21 ] }, + { "id" : 30, "requires" : [ 7 ] }, + { "id" : 31, "requires" : [ 30 ] }, + { "id" : 32, "requires" : [ 30 ] }, + { "id" : 33, "requires" : [ 32 ] }, + { "id" : 34, "requires" : [ 31, 32 ] }, + { "id" : 35, "requires" : [ 31 ] }, + { "id" : 36, "requires" : [ 33, 35 ] }, + { "id" : 37, "requires" : [ 30, 5 ] }, + { "id" : 38, "requires" : [ 31 ] }, + { "id" : 39, "requires" : [ 32 ] }, + { "id" : 40, "requires" : [ 33 ] }, + { "id" : 41, "requires" : [ 34, 15 ] }, + { "id" : 42, "requires" : [ 35 ] }, + { "id" : 43, "requires" : [ 36 ] } + ] }, { - // Castle 8 - "defnames": [ - { "id": 16, "defname": "TBELBLAK.def", "x": 449, "y": 151, "border": "TOELBLAK.bmp", "area": "TZELBLAK.bmp" }, - { "id": 8, "defname": "TBELCAS2.def", "x": 349, "y": 101, "border": "TOELCAS2.bmp", "area": "TZELCAS2.bmp" }, - { "id": 9, "defname": "TBELCAS3.def", "x": 349, "y": 101, "border": "TOELCAS3.bmp", "area": "TZELCAS3.bmp" }, - { "id": 7, "defname": "TBELCSTL.def", "x": 349, "y": 101, "border": "TOELCSTL.bmp", "area": "TZELCSTL.bmp" }, - { "id": 6, "defname": "TBELDOCK.def", "x": 239, "y": 215, "border": "TOELDOCK.bmp", "area": "TZELDOCK.bmp" }, - { "id": 30, "defname": "TBELDW_0.def", "x": 689, "y": 250, "border": "TOELDW_0.bmp", "area": "TZELDW_0.bmp" }, - { "id": 31, "defname": "TBELDW_1.def", "x": 630, "y": 50, "border": "TOELDW_1.bmp", "area": "TZELDW_1.bmp" }, - { "id": 32, "defname": "TBELDW_2.def", "x": 709, "y": 210, "border": "TOELDW_2.bmp", "area": "TZELDW_2.bmp" }, - { "id": 33, "defname": "TBELDW_3.def", "x": 108, "y": 131, "border": "TOELDW_3.bmp", "area": "TZELDW_3.bmp" }, - { "id": 34, "defname": "TBELDW_4.def", "x": 264, "y": 168, "border": "TOELDW_4.bmp", "area": "TZELDW_4.bmp" }, - { "id": 35, "defname": "TBELDW_5.def", "x": 394, "y": 283, "border": "TOELDW_5.bmp", "area": "TZELDW_5.bmp" }, - { "id": 36, "defname": "TBELDW_6.def", "x": 43, "y": 16, "border": "TOELDW_6.bmp", "area": "TZELDW_6.bmp" }, - { "id": -1, "defname": "TBELEXT1.def", "x": 23, "y": 218 }, - { "id": 27, "defname": "TBELEXT2.def", "x": 232, "y": 205 }, - { "id": 28, "defname": "TBELEXT3.def", "x": 516, "y": 223 }, - { "id": 29, "defname": "TBELEXT4.def", "x": 0, "y": 252 }, - { "id": -2, "defname": "TBELEXT5.def", "x": 682, "y": 183 }, - { "id": 21, "defname": "TBELEXT6.def", "x": 104, "y": 170, "border": "TOELEXT6.bmp", "area": "TZELEXT6.bmp" }, - { "id": 11, "defname": "TBELHAL2.def", "x": 0, "y": 165, "border": "TOELHAL2.bmp", "area": "TZELHAL2.bmp" }, - { "id": 12, "defname": "TBELHAL3.def", "x": 0, "y": 165, "border": "TOELHAL3.bmp", "area": "TZELHAL3.bmp" }, - { "id": 13, "defname": "TBELHAL4.def", "x": 0, "y": 164, "border": "TOELHAL4.bmp", "area": "TZELHAL4.bmp" }, - { "id": 10, "defname": "TBELHALL.def", "x": -1, "y": 164, "border": "TOELHALL.bmp", "area": "TZELHALL.bmp" }, - { "id": 26, "defname": "TBELHOLY.def", "x": 307, "y": 2, "border": "TOELHOLY.bmp", "area": "TZELHOLY.bmp" }, - { "id": 18, "defname": "TBELHRD1.def", "x": 689, "y": 250, "border": "TOELHRD1.bmp", "area": "TZELHRD1.bmp" }, - { "id": 19, "defname": "TBELHRD2.def", "x": 689, "y": 250, "border": "TOELHRD2.bmp", "area": "TZELHRD2.bmp" }, - { "id": 1, "defname": "TBELMAG2.def", "x": 206, "y": 58, "border": "TOELMAG2.bmp", "area": "TZELMAG2.bmp" }, - { "id": 2, "defname": "TBELMAG3.def", "x": 206, "y": 58, "border": "TOELMAG3.bmp", "area": "TZELMAG3.bmp" }, - { "id": 3, "defname": "TBELMAG4.def", "x": 206, "y": 58, "border": "TOELMAG4.bmp", "area": "TZELMAG4.bmp" }, - { "id": 4, "defname": "TBELMAG5.def", "x": 206, "y": 58, "border": "TOELMAG5.bmp", "area": "TZELMAG5.bmp" }, - { "id": 0, "defname": "TBELMAGE.def", "x": 206, "y": 58, "border": "TOELMAGE.bmp", "area": "TZELMAGE.bmp" }, - { "id": 14, "defname": "TBELMARK.def", "x": 347, "y": 216, "border": "TOELMARK.bmp", "area": "TZELMARK.bmp" }, - { "id": 15, "defname": "TBELSILO.def", "x": 372, "y": 171, "border": "TOELSILO.bmp", "area": "TZELSILO.bmp" }, - { "id": 17, "defname": "TBELSPEC.def", "x": 284, "y": 246, "border": "TOELSPEC.bmp", "area": "TZELSPEC.bmp" }, - { "id": 5, "defname": "TBELTVRN.def", "x": 553, "y": 203, "border": "TOELTVRN.bmp", "area": "TZELTVRN.bmp" }, - { "id": 37, "defname": "TBELUP_0.def", "x": 689, "y": 250, "border": "TOELUP_0.bmp", "area": "TZELUP_0.bmp" }, - { "id": 38, "defname": "TBELUP_1.def", "x": 630, "y": 50, "border": "TOELUP_1.bmp", "area": "TZELUP_1.bmp" }, - { "id": 39, "defname": "TBELUP_2.def", "x": 709, "y": 210, "border": "TOELUP_2.bmp", "area": "TZELUP_2.bmp" }, - { "id": 40, "defname": "TBELUP_3.def", "x": 108, "y": 131, "border": "TOELUP_3.bmp", "area": "TZELUP_3.bmp" }, - { "id": 41, "defname": "TBELUP_4.def", "x": 264, "y": 168, "border": "TOELUP_4.bmp", "area": "TZELUP_4.bmp" }, - { "id": 42, "defname": "TBELUP_5.def", "x": 394, "y": 283, "border": "TOELUP_5.bmp", "area": "TZELUP_5.bmp" }, - { "id": 43, "defname": "TBELUP_6.def", "x": 43, "y": 0, "border": "TOELUP_6.bmp", "area": "TZELUP_6.bmp" }, - { "id": 20, "defname": "TBELBOAT.def", "x": 239, "y": 215, "border": "TOELBOAT.bmp", "area": "TZELBOAT.bmp" } - ], - "blit_order": [ -1, 27, 28, 16, 34, 41, 6, 20, 33, 40, 36, 43, 21, 0, 1, 2, 3, 4, 5, 15, 14, 17, 35, 42, 30, 18, 37, 19, 10, 11, 12, 13, 29 ], - "creatures_basic": [ 118, 112, 115, 114, 113, 120, 130, 158 ], - "creatures_upgraded": [ 119, 127, 123, 129, 125, 121, 131 ], - "horde": [ 0, -1 ], - "mage_guild": 5, - "primary_ressource": 1, - "war_machine": 4, + // 8 - Conflux + "defnames" : + [ + { "id" : 16, "defname" : "TBELBLAK.def", "x" : 449, "y" : 151, "border" : "TOELBLAK.bmp", "area" : "TZELBLAK.bmp" }, + { "id" : 8, "defname" : "TBELCAS2.def", "x" : 349, "y" : 101, "border" : "TOELCAS2.bmp", "area" : "TZELCAS2.bmp" }, + { "id" : 9, "defname" : "TBELCAS3.def", "x" : 349, "y" : 101, "border" : "TOELCAS3.bmp", "area" : "TZELCAS3.bmp" }, + { "id" : 7, "defname" : "TBELCSTL.def", "x" : 349, "y" : 101, "border" : "TOELCSTL.bmp", "area" : "TZELCSTL.bmp" }, + { "id" : 6, "defname" : "TBELDOCK.def", "x" : 239, "y" : 215, "border" : "TOELDOCK.bmp", "area" : "TZELDOCK.bmp" }, + { "id" : 30, "defname" : "TBELDW_0.def", "x" : 689, "y" : 250, "border" : "TOELDW_0.bmp", "area" : "TZELDW_0.bmp" }, + { "id" : 31, "defname" : "TBELDW_1.def", "x" : 630, "y" : 50, "border" : "TOELDW_1.bmp", "area" : "TZELDW_1.bmp" }, + { "id" : 32, "defname" : "TBELDW_2.def", "x" : 709, "y" : 210, "border" : "TOELDW_2.bmp", "area" : "TZELDW_2.bmp" }, + { "id" : 33, "defname" : "TBELDW_3.def", "x" : 108, "y" : 131, "border" : "TOELDW_3.bmp", "area" : "TZELDW_3.bmp" }, + { "id" : 34, "defname" : "TBELDW_4.def", "x" : 264, "y" : 168, "border" : "TOELDW_4.bmp", "area" : "TZELDW_4.bmp" }, + { "id" : 35, "defname" : "TBELDW_5.def", "x" : 394, "y" : 283, "border" : "TOELDW_5.bmp", "area" : "TZELDW_5.bmp" }, + { "id" : 36, "defname" : "TBELDW_6.def", "x" : 43, "y" : 16, "border" : "TOELDW_6.bmp", "area" : "TZELDW_6.bmp" }, + { "id" : -1, "defname" : "TBELEXT1.def", "x" : 23, "y" : 218 }, + { "id" : 27, "defname" : "TBELEXT2.def", "x" : 232, "y" : 205 }, + { "id" : 28, "defname" : "TBELEXT3.def", "x" : 516, "y" : 223 }, + { "id" : 29, "defname" : "TBELEXT4.def", "x" : 0, "y" : 252 }, + { "id" : -2, "defname" : "TBELEXT5.def", "x" : 682, "y" : 183 }, + { "id" : 21, "defname" : "TBELEXT6.def", "x" : 104, "y" : 170, "border" : "TOELEXT6.bmp", "area" : "TZELEXT6.bmp" }, + { "id" : 11, "defname" : "TBELHAL2.def", "x" : 0, "y" : 165, "border" : "TOELHAL2.bmp", "area" : "TZELHAL2.bmp" }, + { "id" : 12, "defname" : "TBELHAL3.def", "x" : 0, "y" : 165, "border" : "TOELHAL3.bmp", "area" : "TZELHAL3.bmp" }, + { "id" : 13, "defname" : "TBELHAL4.def", "x" : 0, "y" : 164, "border" : "TOELHAL4.bmp", "area" : "TZELHAL4.bmp" }, + { "id" : 10, "defname" : "TBELHALL.def", "x" : -1, "y" : 164, "border" : "TOELHALL.bmp", "area" : "TZELHALL.bmp" }, + { "id" : 26, "defname" : "TBELHOLY.def", "x" : 307, "y" : 2, "border" : "TOELHOLY.bmp", "area" : "TZELHOLY.bmp" }, + { "id" : 18, "defname" : "TBELHRD1.def", "x" : 689, "y" : 250, "border" : "TOELHRD1.bmp", "area" : "TZELHRD1.bmp" }, + { "id" : 19, "defname" : "TBELHRD2.def", "x" : 689, "y" : 250, "border" : "TOELHRD2.bmp", "area" : "TZELHRD2.bmp" }, + { "id" : 1, "defname" : "TBELMAG2.def", "x" : 206, "y" : 58, "border" : "TOELMAG2.bmp", "area" : "TZELMAG2.bmp" }, + { "id" : 2, "defname" : "TBELMAG3.def", "x" : 206, "y" : 58, "border" : "TOELMAG3.bmp", "area" : "TZELMAG3.bmp" }, + { "id" : 3, "defname" : "TBELMAG4.def", "x" : 206, "y" : 58, "border" : "TOELMAG4.bmp", "area" : "TZELMAG4.bmp" }, + { "id" : 4, "defname" : "TBELMAG5.def", "x" : 206, "y" : 58, "border" : "TOELMAG5.bmp", "area" : "TZELMAG5.bmp" }, + { "id" : 0, "defname" : "TBELMAGE.def", "x" : 206, "y" : 58, "border" : "TOELMAGE.bmp", "area" : "TZELMAGE.bmp" }, + { "id" : 14, "defname" : "TBELMARK.def", "x" : 347, "y" : 216, "border" : "TOELMARK.bmp", "area" : "TZELMARK.bmp" }, + { "id" : 15, "defname" : "TBELSILO.def", "x" : 372, "y" : 171, "border" : "TOELSILO.bmp", "area" : "TZELSILO.bmp" }, + { "id" : 17, "defname" : "TBELSPEC.def", "x" : 284, "y" : 246, "border" : "TOELSPEC.bmp", "area" : "TZELSPEC.bmp" }, + { "id" : 5, "defname" : "TBELTVRN.def", "x" : 553, "y" : 203, "border" : "TOELTVRN.bmp", "area" : "TZELTVRN.bmp" }, + { "id" : 37, "defname" : "TBELUP_0.def", "x" : 689, "y" : 250, "border" : "TOELUP_0.bmp", "area" : "TZELUP_0.bmp" }, + { "id" : 38, "defname" : "TBELUP_1.def", "x" : 630, "y" : 50, "border" : "TOELUP_1.bmp", "area" : "TZELUP_1.bmp" }, + { "id" : 39, "defname" : "TBELUP_2.def", "x" : 709, "y" : 210, "border" : "TOELUP_2.bmp", "area" : "TZELUP_2.bmp" }, + { "id" : 40, "defname" : "TBELUP_3.def", "x" : 108, "y" : 131, "border" : "TOELUP_3.bmp", "area" : "TZELUP_3.bmp" }, + { "id" : 41, "defname" : "TBELUP_4.def", "x" : 264, "y" : 168, "border" : "TOELUP_4.bmp", "area" : "TZELUP_4.bmp" }, + { "id" : 42, "defname" : "TBELUP_5.def", "x" : 394, "y" : 283, "border" : "TOELUP_5.bmp", "area" : "TZELUP_5.bmp" }, + { "id" : 43, "defname" : "TBELUP_6.def", "x" : 43, "y" : 0, "border" : "TOELUP_6.bmp", "area" : "TZELUP_6.bmp" }, + { "id" : 20, "defname" : "TBELBOAT.def", "x" : 239, "y" : 215, "border" : "TOELBOAT.bmp", "area" : "TZELBOAT.bmp" } + ], + "blit_order" : [ -1, 27, 28, 16, 34, 41, 6, 20, 33, 40, 36, 43, 21, 0, 1, 2, 3, 4, 5, 15, 14, 17, 35, 42, 30, 18, 37, 19, 10, 11, 12, 13, 29 ], + "creatures_basic" : [ 118, 112, 115, 114, 113, 120, 130, 158 ], + "creatures_upgraded" : [ 119, 127, 123, 129, 125, 121, 131 ], + "horde" : [ 0, null ], + "primary_resource" : 1, + "war_machine" : 4, - "building_requirements": - [ - { "id": 1, "requires": [ 0 ] }, - { "id": 2, "requires": [ 1 ] }, - { "id": 3, "requires": [ 2 ] }, - { "id": 4, "requires": [ 3 ] }, - { "id": 8, "requires": [ 7 ] }, - { "id": 9, "requires": [ 8 ] }, - { "id": 11, "requires": [ 10, 5 ] }, - { "id": 12, "requires": [ 11, 0, 14, 16 ] }, - { "id": 13, "requires": [ 12, 9 ] }, - { "id": 15, "requires": [ 14 ] }, - { "id": 17, "requires": [ 14 ] }, - { "id": 18, "requires": [ 30 ] }, - { "id": 19, "requires": [ 37 ] }, - { "id": 21, "requires": [ 0 ] }, - { "id": 30, "requires": [ 7 ] }, - { "id": 31, "requires": [ 30, 0 ] }, - { "id": 32, "requires": [ 30, 0 ] }, - { "id": 33, "requires": [ 31 ] }, - { "id": 34, "requires": [ 32 ] }, - { "id": 35, "requires": [ 33, 34 ] }, - { "id": 36, "requires": [ 35 ] }, - { "id": 37, "requires": [ 30 ] }, - { "id": 38, "requires": [ 31 ] }, - { "id": 39, "requires": [ 32 ] }, - { "id": 40, "requires": [ 33, 31 ] }, - { "id": 41, "requires": [ 34 ] }, - { "id": 42, "requires": [ 35, 1 ] }, - { "id": 43, "requires": [ 36 ] } - ] + "building_requirements" : + [ + { "id" : 1, "requires" : [ 0 ] }, + { "id" : 2, "requires" : [ 1 ] }, + { "id" : 3, "requires" : [ 2 ] }, + { "id" : 4, "requires" : [ 3 ] }, + { "id" : 8, "requires" : [ 7 ] }, + { "id" : 9, "requires" : [ 8 ] }, + { "id" : 11, "requires" : [ 10, 5 ] }, + { "id" : 12, "requires" : [ 11, 0, 14, 16 ] }, + { "id" : 13, "requires" : [ 12, 9 ] }, + { "id" : 15, "requires" : [ 14 ] }, + { "id" : 17, "requires" : [ 14 ] }, + { "id" : 18, "requires" : [ 30 ] }, + { "id" : 19, "requires" : [ 37 ] }, + { "id" : 21, "requires" : [ 0 ] }, + { "id" : 30, "requires" : [ 7 ] }, + { "id" : 31, "requires" : [ 30, 0 ] }, + { "id" : 32, "requires" : [ 30, 0 ] }, + { "id" : 33, "requires" : [ 31 ] }, + { "id" : 34, "requires" : [ 32 ] }, + { "id" : 35, "requires" : [ 33, 34 ] }, + { "id" : 36, "requires" : [ 35 ] }, + { "id" : 37, "requires" : [ 30 ] }, + { "id" : 38, "requires" : [ 31 ] }, + { "id" : 39, "requires" : [ 32 ] }, + { "id" : 40, "requires" : [ 33, 31 ] }, + { "id" : 41, "requires" : [ 34 ] }, + { "id" : 42, "requires" : [ 35, 1 ] }, + { "id" : 43, "requires" : [ 36 ] } + ] } ], //A group contains a vector of building IDs //In the town screen only the last built structure from the group is displayed //Eg. when there is Mage Guild Level 3, then we don't display Mage Guild Level 1 and 2 - "town_groups": - [ - { - // Applies to all castles - "id": -1, - "groups" : [ - [ 0, 1, 2, 3, 4 ], - [ 6, 20 ], - [ 7, 8, 9 ], - [ 10, 11, 12, 13 ], - [ 30, 37 ], - [ 31, 38 ], - [ 32, 39 ], - [ 33, 40 ], - [ 34, 41 ], - [ 35, 42 ], - [ 36, 43 ], - [ 24, 25 ], - [ 18, 19 ] - ] - }, + "town_groups" : + [ + { + // Applies to all castles + "id" : -1, + "groups" : + [ + [ 0, 1, 2, 3, 4 ], + [ 6, 20 ], + [ 7, 8, 9 ], + [ 10, 11, 12, 13 ], + [ 30, 37 ], + [ 31, 38 ], + [ 32, 39 ], + [ 33, 40 ], + [ 34, 41 ], + [ 35, 42 ], + [ 36, 43 ], + [ 24, 25 ], + [ 18, 19 ] + ] + }, - { - "id": 1, - "groups" : [ - [ 24, 25, 34, 41 ], - [ 17, 21 ], - [ 31, 18, 38, 19 ] - ] - }, + { + "id" : 1, + "groups" : + [ + [ 24, 25, 34, 41 ], + [ 17, 21 ], + [ 31, 18, 38, 19 ] + ] + }, - { - "id": 2, - "groups" : [ - [ 18, 19, 31, 38 ] - ] - }, + { + "id" : 2, + "groups" : + [ + [ 18, 19, 31, 38 ] + ] + }, - { - "id": 3, - "groups" : [ - [ 18, 19, 30, 37 ], - [ 32, 39, 24, 25 ] - ] - }, + { + "id" : 3, + "groups" : + [ + [ 18, 19, 30, 37 ], + [ 32, 39, 24, 25 ] + ] + }, - { - "id": 4, - "groups" : [ - [ 30, 37, 18, 19 ] - ] - }, + { + "id" : 4, + "groups" : + [ + [ 30, 37, 18, 19 ] + ] + }, - { - "id": 5, - "groups" : [ - [ 30, 37, 18, 19 ] - ] - }, + { + "id" : 5, + "groups" : + [ + [ 30, 37, 18, 19 ] + ] + }, - { - "id": 6, - "groups" : [ - [ 21 ], - [ 30, 37, 18, 19 ] - ] - }, + { + "id" : 6, + "groups" : + [ + [ 21 ], + [ 30, 37, 18, 19 ] + ] + }, - { - "id": 7, - "groups" : [ - [ 30, 37, 18, 19 ] - ] - }, + { + "id" : 7, + "groups" : + [ + [ 30, 37, 18, 19 ] + ] + }, - { - "id": 8, - "groups" : [ - [ 30, 37, 18, 19 ] - ] - } - ] -} + { + "id" : 8, + "groups" : + [ + [ 30, 37, 18, 19 ] + ] + } + ] +} diff --git a/lib/CGameState.cpp b/lib/CGameState.cpp index be2d32320..56975ad35 100644 --- a/lib/CGameState.cpp +++ b/lib/CGameState.cpp @@ -2856,7 +2856,7 @@ void CPathfinder::calculatePaths(int3 src /*= int3(-1,-1,-1)*/, int movement /*= && dp->accessible == CGPathNode::BLOCKVIS; if (dp->accessible == CGPathNode::ACCESSIBLE - || useEmbarkCost && allowEmbarkAndDisembark + || (useEmbarkCost && allowEmbarkAndDisembark) || destTopVisObjID == SUBTERRANEAN_GATE_TYPE || (guardedDst && !guardedSource)) // Can step into a hostile tile once. { @@ -2959,7 +2959,7 @@ bool CPathfinder::goodForLandSeaTransition() return true; } -CPathfinder::CPathfinder(CPathsInfo &_out, CGameState *_gs, const CGHeroInstance *_hero) : out(_out), CGameInfoCallback(_gs, -1), hero(_hero), FoW(getPlayerTeam(hero->tempOwner)->fogOfWarMap) +CPathfinder::CPathfinder(CPathsInfo &_out, CGameState *_gs, const CGHeroInstance *_hero) : CGameInfoCallback(_gs, -1), out(_out), hero(_hero), FoW(getPlayerTeam(hero->tempOwner)->fogOfWarMap) { useSubterraneanGates = true; allowEmbarkAndDisembark = true; diff --git a/lib/JsonNode.cpp b/lib/JsonNode.cpp index 5815fa6e6..359b46550 100644 --- a/lib/JsonNode.cpp +++ b/lib/JsonNode.cpp @@ -1,6 +1,9 @@ #define VCMI_DLL #include "JsonNode.h" +#include +#include + #include #include #include @@ -18,6 +21,7 @@ JsonNode::JsonNode(const char *data, size_t datasize): type(DATA_NULL) { JsonParser parser(data, datasize, *this); + JsonValidator validator(*this); } JsonNode::JsonNode(std::string filename): @@ -27,18 +31,29 @@ JsonNode::JsonNode(std::string filename): fseek(file, 0, SEEK_END); size_t datasize = ftell(file); fseek(file, 0, SEEK_SET); - + char *input = new char[datasize]; - fread((void*)input, 1, datasize, file); - + datasize = fread((void*)input, 1, datasize, file); + fclose(file); + JsonParser parser(input, datasize, *this); + JsonValidator validator(*this); delete [] input; } JsonNode::JsonNode(const JsonNode ©): type(DATA_NULL) { - *this = copy; + setType(copy.getType()); + switch(type) + { + break; case DATA_NULL: + break; case DATA_BOOL: Bool() = copy.Bool(); + break; case DATA_FLOAT: Float() = copy.Float(); + break; case DATA_STRING: String() = copy.String(); + break; case DATA_VECTOR: Vector() = copy.Vector(); + break; case DATA_STRUCT: Struct() = copy.Struct(); + } } JsonNode::~JsonNode() @@ -46,18 +61,16 @@ JsonNode::~JsonNode() setType(DATA_NULL); } -JsonNode & JsonNode::operator =(const JsonNode &node) +void JsonNode::swap(JsonNode &b) { - setType(node.getType()); - switch(type) - { - break; case DATA_NULL: - break; case DATA_BOOL: Bool() = node.Bool(); - break; case DATA_FLOAT: Float() = node.Float(); - break; case DATA_STRING: String() = node.String(); - break; case DATA_VECTOR: Vector() = node.Vector(); - break; case DATA_STRUCT: Struct() = node.Struct(); - } + using std::swap; + swap(data, b.data); + swap(type, b.type); +} + +JsonNode & JsonNode::operator =(JsonNode node) +{ + swap(node); return *this; } @@ -191,71 +204,100 @@ const JsonNode & JsonNode::operator[](std::string child) const //////////////////////////////////////////////////////////////////////////////// -//Helper to write content of map/vector -template -void writeContainer(const iterator &begin, const iterator &end, std::ostream &out, std::string prefix) +template +void JsonWriter::writeContainer(Iterator begin, Iterator end) { if (begin == end) return; - - iterator last = end; - last--; - - for (iterator it=begin; it != last; ++it) + + prefix += '\t'; + end--; + while (begin != end) { - writeNode(it, out, prefix); + writeEntry(begin++); out<<",\n"; } - writeNode(last, out, prefix); + + writeEntry(begin); out<<"\n"; + prefix.resize(prefix.size()-1); } -void writeNode(JsonVector::const_iterator it, std::ostream &out, std::string prefix) +void JsonWriter::writeEntry(JsonMap::const_iterator entry) { out << prefix; - it->write(out, prefix); + writeString(entry->first); + out << " : "; + writeNode(entry->second); } -void writeNode(JsonMap::const_iterator it, std::ostream &out, std::string prefix) +void JsonWriter::writeEntry(JsonVector::const_iterator entry) { - out << prefix << '\"' << it->first << '\"' << " : "; - it->second.write(out, prefix); + out << prefix; + writeNode(*entry); } -void JsonNode::write(std::ostream &out, std::string prefix) const +void JsonWriter::writeString(const std::string &string) { - switch(type) + static const std::string escaped = "\"\\/\b\f\n\r\t"; + + out <<'\"'; + size_t pos=0, start=0; + for (; pos= '0' && input[pos] <= '9')); @@ -572,6 +609,7 @@ bool JsonParser::extractFloat(JsonNode &node) if (input[pos] < '0' || input[pos] > '9') return error("Number expected!"); + //Extract integer part while (input[pos] >= '0' && input[pos] <= '9') { @@ -614,3 +652,164 @@ bool JsonParser::error(const std::string &message, bool warning) return warning; } + +static const std::map stringToType = + boost::assign::map_list_of + ("null", JsonNode::DATA_NULL) ("bool", JsonNode::DATA_BOOL) + ("number", JsonNode::DATA_FLOAT) ("string", JsonNode::DATA_STRING) + ("array", JsonNode::DATA_VECTOR) ("object", JsonNode::DATA_STRUCT); + +//Check current schema entry for validness and converts "type" string to JsonType +bool JsonValidator::validateSchema(JsonNode::JsonType &type, const JsonNode &schema) +{ + if (schema.isNull()) + return addMessage("Missing schema for current entry!"); + + const JsonNode &nodeType = schema["type"]; + if (nodeType.isNull()) + return addMessage("Entry type is not defined in schema!"); + + if (nodeType.getType() != JsonNode::DATA_STRING) + return addMessage("Entry type must be string!"); + + std::map::const_iterator iter = stringToType.find(nodeType.String()); + + if (iter == stringToType.end()) + return addMessage("Unknown entry type found!"); + + type = iter->second; + return true; +} + +//Replaces node with default value if needed and calls type-specific validators +bool JsonValidator::validateType(JsonNode &node, const JsonNode &schema, JsonNode::JsonType type) +{ + if (node.isNull()) + { + const JsonNode & defaultValue = schema["default"]; + if (defaultValue.isNull()) + return addMessage("Null entry without default entry!"); + else + node = defaultValue; + } + + if (type != node.getType()) + { + node.setType(JsonNode::DATA_NULL); + return addMessage("Type mismatch!"); + } + + if (type == JsonNode::DATA_VECTOR) + return validateItems(node, schema["items"]); + + if (type == JsonNode::DATA_STRUCT) + return validateProperties(node, schema["properties"]); + + return true; +} + +// Basic checks common for any nodes +bool JsonValidator::validateNode(JsonNode &node, const JsonNode &schema, const std::string &name) +{ + currentPath.push_back(name); + + JsonNode::JsonType type = JsonNode::DATA_NULL; + if (!validateSchema(type, schema)) + { + currentPath.pop_back(); + return false; + } + + if (!validateType(node, schema, type)) + { + currentPath.pop_back(); + return false; + } + + currentPath.pop_back(); + return true; +} + +//Checks "items" entry from schema (type-specific check for Vector) +bool JsonValidator::validateItems(JsonNode &node, const JsonNode &schema) +{ + JsonNode::JsonType type = JsonNode::DATA_NULL; + if (!validateSchema(type, schema)) + return false; + + BOOST_FOREACH(JsonNode &entry, node.Vector()) + { + if (!validateType(entry, schema, type)) + return false; + } + return true; +} + +//Checks "propertries" entry from schema (type-specific check for Struct) +//Function is similar to merging of two sorted lists - check every entry that present in one of the input nodes +bool JsonValidator::validateProperties(JsonNode &node, const JsonNode &schema) +{ + if (schema.isNull()) + return addMessage("Properties entry is missing for struct in schema"); + + JsonMap::iterator nodeIter = node.Struct().begin(); + JsonMap::const_iterator schemaIter = schema.Struct().begin(); + + while (nodeIter != node.Struct().end() && schemaIter != schema.Struct().end()) + { + std::string current = std::min(nodeIter->first, schemaIter->first); + validateNode(node[current], schema[current], current); + + if (nodeIter->first < schemaIter->first) + nodeIter++; + else + if (schemaIter->first < nodeIter->first) + schemaIter++; + else + { + nodeIter++; + schemaIter++; + } + } + while (nodeIter != node.Struct().end()) + { + validateNode(nodeIter->second, JsonNode(), nodeIter->first); + nodeIter++; + } + + while (schemaIter != schema.Struct().end()) + { + validateNode(node[schemaIter->first], schemaIter->second, schemaIter->first); + schemaIter++; + } + return true; +} + +bool JsonValidator::addMessage(const std::string &message) +{ + std::ostringstream stream; + + stream << "At "; + BOOST_FOREACH(const std::string &path, currentPath) + stream << path<<"/"; + stream << "\t Error: " << message <<"\n"; + errors += stream.str(); + return false; +} + +JsonValidator::JsonValidator(JsonNode &root) +{ + const JsonNode schema = root["schema"]; + + if (!schema.isNull()) + { + root.Struct().erase("schema"); + validateProperties(root, schema); + } + //This message is quite annoying now - most files do not have schemas. May be re-enabled later + //else + // addMessage("Schema not found!", true); + + //TODO: better way to show errors (like printing file name as well) + std::cout< +#include #include #include #include @@ -49,8 +50,8 @@ public: ~JsonNode(); - // Deep copy of this node - JsonNode& operator =(const JsonNode &node); + void swap(JsonNode &b); + JsonNode& operator =(JsonNode node); //Convert node to another type. Converting to NULL will clear all data void setType(JsonType Type); @@ -72,9 +73,6 @@ public: const JsonVector & Vector() const; const JsonMap & Struct() const; - //formatted output of this node in JSON format - void write(std::ostream &out, std::string prefix="") const; - //operator [], for structs only - get child node by name JsonNode & operator[](std::string child); const JsonNode & operator[](std::string child) const; @@ -83,9 +81,25 @@ public: static const JsonNode nullNode; }; +class JsonWriter +{ + //prefix for each line (tabulation) + std::string prefix; + std::ostream &out; +public: + template + void writeContainer(Iterator begin, Iterator end); + void writeEntry(JsonMap::const_iterator entry); + void writeEntry(JsonVector::const_iterator entry); + void writeString(const std::string &string); + void writeNode(const JsonNode &node); + JsonWriter(std::ostream &output, const JsonNode &node); +}; + std::ostream & operator<<(std::ostream &out, const JsonNode &node); -//Tiny string class that use const char* as data for speed, members are private for ease of debugging +//Tiny string class that uses const char* as data for speed, members are private +//for ease of debugging and some compatibility with std::string class constString { const char *data; @@ -110,10 +124,9 @@ public: } }; -//Internal class for std::string -> JsonNode conversion +//Internal class for string -> JsonNode conversion class JsonParser { - std::string errors; // Contains description of all encountered errors constString input; // Input data unsigned int lineCount; // Currently parsed line, starting from 1 @@ -126,6 +139,7 @@ class JsonParser bool extractString(std::string &string); bool extractWhitespace(bool verbose = true); bool extractSeparator(); + bool extractElement(JsonNode &node, char terminator); //Methods for extracting JSON data bool extractArray(JsonNode &node); @@ -143,3 +157,24 @@ class JsonParser public: JsonParser(const char * inputString, size_t stringSize, JsonNode &root); }; + +//Internal class for Json validation, used automaticaly in JsonNode constructor. Behaviour: +// - "schema" entry from root node is used for validation and will be removed +// - any missing entries will be replaced with default value from schema (if present) +// - if entry uses different type than defined in schema it will be removed +// - entries nod described in schema will be kept unchanged +class JsonValidator +{ + std::string errors; // Contains description of all encountered errors + std::list currentPath; // path from root node to current one + + bool validateType(JsonNode &node, const JsonNode &schema, JsonNode::JsonType type); + bool validateSchema(JsonNode::JsonType &type, const JsonNode &schema); + bool validateNode(JsonNode &node, const JsonNode &schema, const std::string &name); + bool validateItems(JsonNode &node, const JsonNode &schema); + bool validateProperties(JsonNode &node, const JsonNode &schema); + + bool addMessage(const std::string &message); +public: + JsonValidator(JsonNode &root); +};