From b853df76ba1874ac1c4a9d4791d8bbfe71e17b8a Mon Sep 17 00:00:00 2001 From: Frank Zago Date: Sat, 20 Aug 2011 21:53:03 +0000 Subject: [PATCH] Consolidated crerefnam.txt, monsters.txt, cr_factions.txt, cr_upgrade_list.txt, CREDEFS.TXT, cr_shots.txt and cr_to_turret.txt into creatures.json --- config/CREDEFS.TXT | 198 ----- config/cr_factions.txt | 197 ----- config/cr_shots.txt | 40 - config/cr_to_turret.txt | 11 - config/cr_upgrade_list.txt | 64 -- config/creatures.json | 1712 ++++++++++++++++++++++++++++++++++++ config/crerefnam.txt | 224 ----- config/monsters.txt | 197 ----- lib/CCreatureHandler.cpp | 173 +--- 9 files changed, 1753 insertions(+), 1063 deletions(-) delete mode 100644 config/CREDEFS.TXT delete mode 100644 config/cr_factions.txt delete mode 100644 config/cr_shots.txt delete mode 100644 config/cr_to_turret.txt delete mode 100644 config/cr_upgrade_list.txt create mode 100644 config/creatures.json delete mode 100644 config/crerefnam.txt delete mode 100644 config/monsters.txt diff --git a/config/CREDEFS.TXT b/config/CREDEFS.TXT deleted file mode 100644 index 234581978..000000000 --- a/config/CREDEFS.TXT +++ /dev/null @@ -1,198 +0,0 @@ -Names_of_Units_DEFS_in_order_of_ID -0 CPKMAN.DEF -1 CHALBD.DEF -2 CLCBOW.DEF -3 CHCBOW.DEF -4 CGRIFF.DEF -5 CRGRIF.DEF -6 CSWORD.DEF -7 CCRUSD.DEF -8 CMONKK.DEF -9 CZEALT.DEF -10 CCAVLR.DEF -11 CCHAMP.DEF -12 CANGEL.DEF -13 CRANGL.DEF -14 CCENTR.DEF -15 CECENT.DEF -16 CDWARF.DEF -17 CBDWAR.DEF -18 CELF.DEF -19 CGRELF.DEF -20 CPEGAS.DEF -21 CAPEGS.DEF -22 CTREE.DEF -23 CBTREE.DEF -24 CUNICO.DEF -25 CWUNIC.DEF -26 CGDRAG.DEF -27 CDDRAG.DEF -28 CGREMA.DEF -29 CGREMM.DEF -30 CGARGO.DEF -31 COGARG.DEF -32 CSGOLE.DEF -33 CIGOLE.DEF -34 CMAGE.DEF -35 CAMAGE.DEF -36 CGENIE.DEF -37 CSULTA.DEF -38 CNAGA.DEF -39 CNAGAG.DEF -40 CLTITA.DEF -41 CGTITA.DEF -42 CIMP.DEF -43 CFAMIL.DEF -44 CGOG.DEF -45 CMAGOG.DEF -46 CHHOUN.DEF -47 CCERBU.DEF -48 COHDEM.DEF -49 CTHDEM.DEF -50 CPFIEN.DEF -51 CPFOE.DEF -52 CEFREE.DEF -53 CEFRES.DEF -54 CDEVIL.DEF -55 CADEVL.DEF -56 CSKELE.DEF -57 CWSKEL.DEF -58 CZOMBI.DEF -59 CZOMLO.DEF -60 CWIGHT.DEF -61 CWRAIT.DEF -62 CVAMP.DEF -63 CNOSFE.DEF -64 CLICH.DEF -65 CPLICH.DEF -66 CBKNIG.DEF -67 CBLORD.DEF -68 CNDRGN.DEF -69 CHDRGN.DEF -70 CTROGL.DEF -71 CITROG.DEF -72 CHARPY.DEF -73 CHARPH.DEF -74 CBEHOL.DEF -75 CEVEYE.DEF -76 CMEDUS.DEF -77 CMEDUQ.DEF -78 CMINOT.DEF -79 CMINOK.DEF -80 CMCORE.DEF -81 CCMCOR.DEF -82 CRDRGN.DEF -83 CBDRGN.DEF -84 CGOBLI.DEF -85 CHGOBL.DEF -86 CBWLFR.DEF -87 CUWLFR.DEF -88 CORC.DEF -89 CORCCH.DEF -90 COGRE.DEF -91 COGMAG.DEF -92 CROC.DEF -93 CTBIRD.DEF -94 CCYCLR.DEF -95 CCYCLLOR.DEF -96 CYBEHE.DEF -97 CABEHE.DEF -98 CGNOLL.DEF -99 CGNOLM.DEF -100 CPLIZA.DEF -101 CALIZA.DEF -102 CCGORG.DEF -103 CBGOG.DEF -104 CDRFLY.DEF -105 CDRFIR.DEF -106 CBASIL.DEF -107 CGBASI.DEF -108 CWYVER.DEF -109 CWYVMN.DEF -110 CHYDRA.DEF -111 CCHYDR.DEF -112 CAELEM.DEF -113 CEELEM.DEF -114 CFELEM.DEF -115 CWELEM.DEF -116 CGGOLE.DEF -117 CDGOLE.DEF -118 CPIXIE.DEF -119 CSPRITE.DEF -120 CPSYEL.DEF -121 CMAGEL.DEF -122 x -123 CICEE.DEF -124 x -125 CSTONE.DEF -126 x -127 CSTORM.DEF -128 x -129 CNRG.DEF -130 CFBIRD.DEF -131 CPHX.DEF -132 CADRGN.DEF -133 CCDRGN.DEF -134 CFDRGN.DEF -135 CRSDGN.DEF -136 CENCH.DEF -137 CSHARP.DEF -138 CHALF.DEF -139 CPEAS.DEF -140 CBOAR.DEF -141 CMUMMY.DEF -142 CNOMAD.DEF -143 CROGUE.DEF -144 CTROLL.DEF -145 SMCATA.DEF -146 SMBAL.DEF -147 SMTENT.DEF -148 SMCART.DEF -149 x -150 ZM150Z.DEF -151 ZM151Z.DEF -152 ZM152Z.DEF -153 ZM153Z.DEF -154 ZM154Z.DEF -155 ZM155Z.DEF -156 ZM156Z.DEF -157 ZM157Z.DEF -158 ZM158Z.DEF -159 ZM159G.DEF -160 ZM160G.DEF -161 ZM161G.DEF -162 ZM162G.DEF -163 ZM163G.DEF -164 ZM164GD.DEF -165 ZM165GD.DEF -166 ZM166GD.DEF -167 ZM167GD.DEF -168 ZM168DG.DEF -169 ZM169ZL.DEF -170 ZM170SW.DEF -171 ZM171SR.DEF -172 ZM172N.DEF -173 ZM173M.DEF -174 ZM174NPC.DEF -175 ZM175NPC.DEF -176 ZM176NPC.DEF -177 ZM177NPC.DEF -178 ZM178NPC.DEF -179 ZM179NPC.DEF -180 ZM180NPC.DEF -181 ZM181NPC.DEF -182 ZM182NPC.DEF -183 ZM174NPC.DEF -184 ZM175NPC.DEF -185 ZM176NPC.DEF -186 ZM177NPC.DEF -187 ZM178NPC.DEF -188 ZM179NPC.DEF -189 ZM180NPC.DEF -190 ZM181NPC.DEF -191 ZM182NPC.DEF -192 ZM192Z.DEF -193 ZM193Z.DEF -194 ZM194Z.DEF -195 ZM195Z.DEF -196 ZM196Z.DEF \ No newline at end of file diff --git a/config/cr_factions.txt b/config/cr_factions.txt deleted file mode 100644 index c068909a0..000000000 --- a/config/cr_factions.txt +++ /dev/null @@ -1,197 +0,0 @@ -0 0 -1 0 -2 0 -3 0 -4 0 -5 0 -6 0 -7 0 -8 0 -9 0 -10 0 -11 0 -12 0 -13 0 -14 1 -15 1 -16 1 -17 1 -18 1 -19 1 -20 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 2 -29 2 -30 2 -31 2 -32 2 -33 2 -34 2 -35 2 -36 2 -37 2 -38 2 -39 2 -40 2 -41 2 -42 3 -43 3 -44 3 -45 3 -46 3 -47 3 -48 3 -49 3 -50 3 -51 3 -52 3 -53 3 -54 3 -55 3 -56 4 -57 4 -58 4 -59 4 -60 4 -61 4 -62 4 -63 4 -64 4 -65 4 -66 4 -67 4 -68 4 -69 4 -70 5 -71 5 -72 5 -73 5 -74 5 -75 5 -76 5 -77 5 -78 5 -79 5 -80 5 -81 5 -82 5 -83 5 -84 6 -85 6 -86 6 -87 6 -88 6 -89 6 -90 6 -91 6 -92 6 -93 6 -94 6 -95 6 -96 6 -97 6 -98 7 -99 7 -100 7 -101 7 -102 7 -103 7 -104 7 -105 7 -106 7 -107 7 -108 7 -109 7 -110 7 -111 7 -112 8 -113 8 -114 8 -115 8 -116 -1 -117 -1 -118 8 -119 8 -120 8 -121 8 -122 -1 -123 8 -124 -1 -125 8 -126 -1 -127 8 -128 -1 -129 8 -130 8 -131 8 -132 -1 -133 -1 -134 -1 -135 -1 -136 -1 -137 -1 -138 -1 -139 -1 -140 -1 -141 -1 -142 -1 -143 -1 -144 -1 -145 -1 -146 -1 -147 -1 -148 -1 -149 -1 -150 0 -151 1 -152 2 -153 3 -154 4 -155 5 -156 6 -157 7 -158 8 -159 -1 -160 -1 -161 -1 -162 -1 -163 -1 -164 -1 -165 -1 -166 -1 -167 -1 -168 -1 -169 -1 -170 -1 -171 -1 -172 -1 -173 -1 -174 -1 -175 -1 -176 -1 -177 -1 -178 -1 -179 -1 -180 -1 -181 -1 -182 -1 -183 -1 -184 -1 -185 -1 -186 -1 -187 -1 -188 -1 -189 -1 -190 -1 -191 -1 -192 -1 -193 -1 -194 -1 -195 -1 -196 -1 diff --git a/config/cr_shots.txt b/config/cr_shots.txt deleted file mode 100644 index b6a3f55f9..000000000 --- a/config/cr_shots.txt +++ /dev/null @@ -1,40 +0,0 @@ -//here are defs with things shot by different units - don't delete this line; format: unit_ID def_name spin_projectile -2 PLCBOWX.DEF 0 -3 PLCBOWX.DEF 0 -8 CPRZEAX.DEF 1 -9 CPRZEAX.DEF 1 -18 PELFX.DEF 0 -19 PELFX.DEF 0 -29 CPRGRE.DEF 1 -34 PMAGEX.DEF 1 -35 PMAGEX.DEF 1 -41 CPRGTIX.DEF 0 -44 CPRGOGX.DEF 1 -45 CPRGOGX.DEF 1 -64 PLICH.DEF 0 -65 PLICH.DEF 0 -74 SMBALX.DEF 0 -75 SMBALX.DEF 0 -76 PMEDUSX.DEF 0 -77 PMEDUSX.DEF 0 -88 PORCHX.DEF 1 -89 PORCHX.DEF 1 -94 PCYCLBX.DEF 1 -95 PCYCLBX.DEF 1 -100 PPLIZAX.DEF 0 -101 PPLIZAX.DEF 0 -123 PICEE.DEF 0 -127 CPRGTIX.DEF 0 -136 SMBALX.DEF 0 -137 PELFX.DEF 0 -138 PHALF.DEF 1 -145 SMCATX.DEF 1 -146 SMBALX.DEF 0 -152 CPRGTIX.DEF 0 -169 CPRZEAX.DEF 0 -170 PLCBOWX.DEF 0 -171 PLCBOWX.DEF 0 -173 CPRGRE.DEF 1 -193 SMBALX.DEF 0 -196 SMBALX.DEF 0 --1 diff --git a/config/cr_to_turret.txt b/config/cr_to_turret.txt deleted file mode 100644 index eb0ac4eee..000000000 --- a/config/cr_to_turret.txt +++ /dev/null @@ -1,11 +0,0 @@ -//describes_which_creature's_animation_should_be_used_to_dispaly_creature_in_turret_while_siege -//i-th_line_-_i-th_faction -2 -18 -34 -44 -64 -76 -88 -100 -127 \ No newline at end of file diff --git a/config/cr_upgrade_list.txt b/config/cr_upgrade_list.txt deleted file mode 100644 index 601a14b4a..000000000 --- a/config/cr_upgrade_list.txt +++ /dev/null @@ -1,64 +0,0 @@ -0 1 -2 3 -4 5 -6 7 -8 9 -10 11 -12 13 -14 15 -16 17 -18 19 -20 21 -22 23 -24 25 -26 27 -28 29 -30 31 -32 33 -34 35 -36 37 -38 39 -40 41 -42 43 -44 45 -46 47 -48 49 -50 51 -52 53 -54 55 -56 57 -58 59 -60 61 -62 63 -64 65 -66 67 -68 69 -70 71 -72 73 -74 75 -76 77 -78 79 -80 81 -82 83 -84 85 -86 87 -88 89 -90 91 -92 93 -94 95 -96 97 -98 99 -100 101 -102 103 -104 105 -106 107 -108 109 -110 111 -118 119 -120 121 -112 127 -113 125 -114 129 -115 123 -130 131 -131 15 \ No newline at end of file diff --git a/config/creatures.json b/config/creatures.json new file mode 100644 index 000000000..dadc402d8 --- /dev/null +++ b/config/creatures.json @@ -0,0 +1,1712 @@ +// Defines creatures. + +// The following properties are mandatory: +// id: number of the creature +// name: array of names for the creature +// defname: graphics for the creature +// level: its level (1 to 7) +// faction: its faction (0 to 8) + +// The following properties are optional: +// upgrade: number of the creature to upgrade to +// projectile_defname: if the creature is a shooter, graphics for the projectile +// projectile_spin: if the creature is a shooter, indicate whether the projectile spins +// turret_shooter: indicates whether the shooter appears in the castle turrets + +{ + "creatures": + [ + { + "id": 0, + "level": 1, + "name": [ "Pikeman" ], + "faction": 0, + "upgrade": 1, + "defname": "CPKMAN.DEF" + }, + + { + "id": 1, + "level": 1, + "name": [ "Halberdier" ], + "faction": 0, + "defname": "CHALBD.DEF" + }, + + { + "id": 2, + "level": 2, + "name": [ "Archer", "LightCrossbowman" ], + "faction": 0, + "upgrade": 3, + "defname": "CLCBOW.DEF", + "projectile_defname": "PLCBOWX.DEF", + "projectile_spin": false, + "turret_shooter": true + }, + + { + "id": 3, + "level": 2, + "name": [ "HeavyCrossbowman" ], + "faction": 0, + "defname": "CHCBOW.DEF", + "projectile_defname": "PLCBOWX.DEF", + "projectile_spin": false + }, + + { + "id": 4, + "level": 3, + "name": [ "Griffin" ], + "faction": 0, + "upgrade": 5, + "defname": "CGRIFF.DEF" + }, + + { + "id": 5, + "level": 3, + "name": [ "RoyalGriffin" ], + "faction": 0, + "defname": "CRGRIF.DEF" + }, + + { + "id": 6, + "level": 4, + "name": [ "Swordsman" ], + "faction": 0, + "upgrade": 7, + "defname": "CSWORD.DEF" + }, + + { + "id": 7, + "level": 4, + "name": [ "Crusader" ], + "faction": 0, + "defname": "CCRUSD.DEF" + }, + + { + "id": 8, + "level": 5, + "name": [ "Monk" ], + "faction": 0, + "upgrade": 9, + "defname": "CMONKK.DEF", + "projectile_defname": "CPRZEAX.DEF", + "projectile_spin": true + }, + + { + "id": 9, + "level": 5, + "name": [ "Zealot" ], + "faction": 0, + "defname": "CZEALT.DEF", + "projectile_defname": "CPRZEAX.DEF", + "projectile_spin": true + }, + + { + "id": 10, + "level": 6, + "name": [ "Cavalier" ], + "faction": 0, + "upgrade": 11, + "defname": "CCAVLR.DEF" + }, + + { + "id": 11, + "level": 6, + "name": [ "Champion" ], + "faction": 0, + "defname": "CCHAMP.DEF" + }, + + { + "id": 12, + "level": 7, + "name": [ "Angel" ], + "faction": 0, + "upgrade": 13, + "defname": "CANGEL.DEF" + }, + + { + "id": 13, + "level": 7, + "name": [ "Archangel" ], + "faction": 0, + "defname": "CRANGL.DEF" + }, + + { + "id": 14, + "level": 1, + "name": [ "Centaur" ], + "faction": 1, + "upgrade": 15, + "defname": "CCENTR.DEF" + }, + + { + "id": 15, + "level": 1, + "name": [ "EliteCentaur" ], + "faction": 1, + "defname": "CECENT.DEF" + }, + + { + "id": 16, + "level": 2, + "name": [ "Dwarf" ], + "faction": 1, + "upgrade": 17, + "defname": "CDWARF.DEF" + }, + + { + "id": 17, + "level": 2, + "name": [ "BattleDwarf" ], + "faction": 1, + "defname": "CBDWAR.DEF" + }, + + { + "id": 18, + "level": 3, + "name": [ "WoodElf" ], + "faction": 1, + "upgrade": 19, + "defname": "CELF.DEF", + "projectile_defname": "PELFX.DEF", + "projectile_spin": false, + "turret_shooter": true + }, + + { + "id": 19, + "level": 3, + "name": [ "GrandElf" ], + "faction": 1, + "defname": "CGRELF.DEF", + "projectile_defname": "PELFX.DEF", + "projectile_spin": false + }, + + { + "id": 20, + "level": 4, + "name": [ "Pegasus" ], + "faction": 1, + "upgrade": 21, + "defname": "CPEGAS.DEF" + }, + + { + "id": 21, + "level": 4, + "name": [ "SilverPegasus" ], + "faction": 1, + "defname": "CAPEGS.DEF" + }, + + { + "id": 22, + "level": 5, + "name": [ "Treefolk" ], + "faction": 1, + "upgrade": 23, + "defname": "CTREE.DEF" + }, + + { + "id": 23, + "level": 5, + "name": [ "BriarTreefolk" ], + "faction": 1, + "defname": "CBTREE.DEF" + }, + + { + "id": 24, + "level": 6, + "name": [ "Unicorn" ], + "faction": 1, + "upgrade": 25, + "defname": "CUNICO.DEF" + }, + + { + "id": 25, + "level": 6, + "name": [ "WarUnicorn" ], + "faction": 1, + "defname": "CWUNIC.DEF" + }, + + { + "id": 26, + "level": 7, + "name": [ "GreenDragon" ], + "faction": 1, + "upgrade": 27, + "defname": "CGDRAG.DEF" + }, + + { + "id": 27, + "level": 7, + "name": [ "GoldDragon" ], + "faction": 1, + "defname": "CDDRAG.DEF" + }, + + { + "id": 28, + "level": 1, + "name": [ "ApprenticeGremlin" ], + "faction": 2, + "upgrade": 29, + "defname": "CGREMA.DEF" + }, + + { + "id": 29, + "level": 1, + "name": [ "MasterGremlin" ], + "faction": 2, + "defname": "CGREMM.DEF", + "projectile_defname": "CPRGRE.DEF", + "projectile_spin": true + }, + + { + "id": 30, + "level": 2, + "name": [ "StoneGargoyle" ], + "faction": 2, + "upgrade": 31, + "defname": "CGARGO.DEF" + }, + + { + "id": 31, + "level": 2, + "name": [ "ObsidianGargoyle" ], + "faction": 2, + "defname": "COGARG.DEF" + }, + + { + "id": 32, + "level": 3, + "name": [ "IronGolem" ], + "faction": 2, + "upgrade": 33, + "defname": "CSGOLE.DEF" + }, + + { + "id": 33, + "level": 3, + "name": [ "StoneGolem" ], + "faction": 2, + "defname": "CIGOLE.DEF" + }, + + { + "id": 34, + "level": 4, + "name": [ "Mage" ], + "faction": 2, + "upgrade": 35, + "defname": "CMAGE.DEF", + "projectile_defname": "PMAGEX.DEF", + "projectile_spin": true, + "turret_shooter": true + }, + + { + "id": 35, + "level": 4, + "name": [ "ArchMage" ], + "faction": 2, + "defname": "CAMAGE.DEF", + "projectile_defname": "PMAGEX.DEF", + "projectile_spin": true + }, + + { + "id": 36, + "level": 5, + "name": [ "Genie" ], + "faction": 2, + "upgrade": 37, + "defname": "CGENIE.DEF" + }, + + { + "id": 37, + "level": 5, + "name": [ "Caliph" ], + "faction": 2, + "defname": "CSULTA.DEF" + }, + + { + "id": 38, + "level": 6, + "name": [ "NagaSentinel" ], + "faction": 2, + "upgrade": 39, + "defname": "CNAGA.DEF" + }, + + { + "id": 39, + "level": 6, + "name": [ "NagaGuardian" ], + "faction": 2, + "defname": "CNAGAG.DEF" + }, + + { + "id": 40, + "level": 7, + "name": [ "LesserTitan" ], + "faction": 2, + "upgrade": 41, + "defname": "CLTITA.DEF" + }, + + { + "id": 41, + "level": 7, + "name": [ "GreaterTitan" ], + "faction": 2, + "defname": "CGTITA.DEF", + "projectile_defname": "CPRGTIX.DEF", + "projectile_spin": false + }, + + { + "id": 42, + "level": 1, + "name": [ "Imp" ], + "faction": 3, + "upgrade": 43, + "defname": "CIMP.DEF" + }, + + { + "id": 43, + "level": 1, + "name": [ "Familiar" ], + "faction": 3, + "defname": "CFAMIL.DEF" + }, + + { + "id": 44, + "level": 2, + "name": [ "Gog" ], + "faction": 3, + "upgrade": 45, + "defname": "CGOG.DEF", + "projectile_defname": "CPRGOGX.DEF", + "projectile_spin": true, + "turret_shooter": true + }, + + { + "id": 45, + "level": 2, + "name": [ "Magog" ], + "faction": 3, + "defname": "CMAGOG.DEF", + "projectile_defname": "CPRGOGX.DEF", + "projectile_spin": true + }, + + { + "id": 46, + "level": 3, + "name": [ "HellHound" ], + "faction": 3, + "upgrade": 47, + "defname": "CHHOUN.DEF" + }, + + { + "id": 47, + "level": 3, + "name": [ "Cerberus" ], + "faction": 3, + "defname": "CCERBU.DEF" + }, + + { + "id": 48, + "level": 4, + "name": [ "Single-HornedDemon" ], + "faction": 3, + "upgrade": 49, + "defname": "COHDEM.DEF" + }, + + { + "id": 49, + "level": 4, + "name": [ "Dual-HornedDemon" ], + "faction": 3, + "defname": "CTHDEM.DEF" + }, + + { + "id": 50, + "level": 5, + "name": [ "PitFiend" ], + "faction": 3, + "upgrade": 51, + "defname": "CPFIEN.DEF" + }, + + { + "id": 51, + "level": 5, + "name": [ "PitFoe" ], + "faction": 3, + "defname": "CPFOE.DEF" + }, + + { + "id": 52, + "level": 6, + "name": [ "Efreet" ], + "faction": 3, + "upgrade": 53, + "defname": "CEFREE.DEF" + }, + + { + "id": 53, + "level": 6, + "name": [ "EfreetSultan" ], + "faction": 3, + "defname": "CEFRES.DEF" + }, + + { + "id": 54, + "level": 7, + "name": [ "Devil" ], + "faction": 3, + "upgrade": 55, + "defname": "CDEVIL.DEF" + }, + + { + "id": 55, + "level": 7, + "name": [ "ArchDevil" ], + "faction": 3, + "defname": "CADEVL.DEF" + }, + + { + "id": 56, + "level": 1, + "name": [ "Skeleton" ], + "faction": 4, + "upgrade": 57, + "defname": "CSKELE.DEF" + }, + + { + "id": 57, + "level": 1, + "name": [ "SkeletonWarrior" ], + "faction": 4, + "defname": "CWSKEL.DEF" + }, + + { + "id": 58, + "level": 2, + "name": [ "Zombie" ], + "faction": 4, + "upgrade": 59, + "defname": "CZOMBI.DEF" + }, + + { + "id": 59, + "level": 2, + "name": [ "ZombieLord" ], + "faction": 4, + "defname": "CZOMLO.DEF" + }, + + { + "id": 60, + "level": 3, + "name": [ "Wight" ], + "faction": 4, + "upgrade": 61, + "defname": "CWIGHT.DEF" + }, + + { + "id": 61, + "level": 3, + "name": [ "Wraith" ], + "faction": 4, + "defname": "CWRAIT.DEF" + }, + + { + "id": 62, + "level": 4, + "name": [ "Vampire" ], + "faction": 4, + "upgrade": 63, + "defname": "CVAMP.DEF" + }, + + { + "id": 63, + "level": 4, + "name": [ "Nosferatu" ], + "faction": 4, + "defname": "CNOSFE.DEF" + }, + + { + "id": 64, + "level": 5, + "name": [ "Lich" ], + "faction": 4, + "upgrade": 65, + "defname": "CLICH.DEF", + "projectile_defname": "PLICH.DEF", + "projectile_spin": false, + "turret_shooter": true + }, + + { + "id": 65, + "level": 5, + "name": [ "PowerLich" ], + "faction": 4, + "defname": "CPLICH.DEF", + "projectile_defname": "PLICH.DEF", + "projectile_spin": false + }, + + { + "id": 66, + "level": 6, + "name": [ "BlackKnight" ], + "faction": 4, + "upgrade": 67, + "defname": "CBKNIG.DEF" + }, + + { + "id": 67, + "level": 6, + "name": [ "BlackLord" ], + "faction": 4, + "defname": "CBLORD.DEF" + }, + + { + "id": 68, + "level": 7, + "name": [ "BoneDragon" ], + "faction": 4, + "upgrade": 69, + "defname": "CNDRGN.DEF" + }, + + { + "id": 69, + "level": 7, + "name": [ "GhostDragon" ], + "faction": 4, + "defname": "CHDRGN.DEF" + }, + + { + "id": 70, + "level": 1, + "name": [ "Troglodyte" ], + "faction": 5, + "upgrade": 71, + "defname": "CTROGL.DEF" + }, + + { + "id": 71, + "level": 1, + "name": [ "InfernalTroglodyte" ], + "faction": 5, + "defname": "CITROG.DEF" + }, + + { + "id": 72, + "level": 2, + "name": [ "Harpy" ], + "faction": 5, + "upgrade": 73, + "defname": "CHARPY.DEF" + }, + + { + "id": 73, + "level": 2, + "name": [ "HarpyHag", "M73" ], + "faction": 5, + "defname": "CHARPH.DEF" + }, + + { + "id": 74, + "level": 3, + "name": [ "Beholder" ], + "faction": 5, + "upgrade": 75, + "defname": "CBEHOL.DEF", + "projectile_defname": "SMBALX.DEF", + "projectile_spin": false + }, + + { + "id": 75, + "level": 3, + "name": [ "EvilEye", "M75" ], + "faction": 5, + "defname": "CEVEYE.DEF", + "projectile_defname": "SMBALX.DEF", + "projectile_spin": false + }, + + { + "id": 76, + "level": 4, + "name": [ "Medusa", "Medusae" ], + "faction": 5, + "upgrade": 77, + "defname": "CMEDUS.DEF", + "projectile_defname": "PMEDUSX.DEF", + "projectile_spin": false, + "turret_shooter": true + }, + + { + "id": 77, + "level": 4, + "name": [ "MedusaQueen" ], + "faction": 5, + "defname": "CMEDUQ.DEF", + "projectile_defname": "PMEDUSX.DEF", + "projectile_spin": false + }, + + { + "id": 78, + "level": 5, + "name": [ "Minotaur" ], + "faction": 5, + "upgrade": 79, + "defname": "CMINOT.DEF" + }, + + { + "id": 79, + "level": 5, + "name": [ "MinotaurKing" ], + "faction": 5, + "defname": "CMINOK.DEF" + }, + + { + "id": 80, + "level": 6, + "name": [ "Manticore" ], + "faction": 5, + "upgrade": 81, + "defname": "CMCORE.DEF" + }, + + { + "id": 81, + "level": 6, + "name": [ "Scorpicore" ], + "faction": 5, + "defname": "CCMCOR.DEF" + }, + + { + "id": 82, + "level": 7, + "name": [ "RedDragon" ], + "faction": 5, + "upgrade": 83, + "defname": "CRDRGN.DEF" + }, + + { + "id": 83, + "level": 7, + "name": [ "BlackDragon" ], + "faction": 5, + "defname": "CBDRGN.DEF" + }, + + { + "id": 84, + "level": 1, + "name": [ "Goblin" ], + "faction": 6, + "upgrade": 85, + "defname": "CGOBLI.DEF" + }, + + { + "id": 85, + "level": 1, + "name": [ "Hobgoblin" ], + "faction": 6, + "defname": "CHGOBL.DEF" + }, + + { + "id": 86, + "level": 2, + "name": [ "GoblinWolfRider" ], + "faction": 6, + "upgrade": 87, + "defname": "CBWLFR.DEF" + }, + + { + "id": 87, + "level": 2, + "name": [ "HobgoblinWolfRider" ], + "faction": 6, + "defname": "CUWLFR.DEF" + }, + + { + "id": 88, + "level": 3, + "name": [ "Orc" ], + "faction": 6, + "upgrade": 89, + "defname": "CORC.DEF", + "projectile_defname": "PORCHX.DEF", + "projectile_spin": true, + "turret_shooter": true + }, + + { + "id": 89, + "level": 3, + "name": [ "OrcChieftain" ], + "faction": 6, + "defname": "CORCCH.DEF", + "projectile_defname": "PORCHX.DEF", + "projectile_spin": true + }, + + { + "id": 90, + "level": 4, + "name": [ "Ogre" ], + "faction": 6, + "upgrade": 91, + "defname": "COGRE.DEF" + }, + + { + "id": 91, + "level": 4, + "name": [ "OgreMage" ], + "faction": 6, + "defname": "COGMAG.DEF" + }, + + { + "id": 92, + "level": 5, + "name": [ "Roc" ], + "faction": 6, + "upgrade": 93, + "defname": "CROC.DEF" + }, + + { + "id": 93, + "level": 5, + "name": [ "Thunderbird" ], + "faction": 6, + "defname": "CTBIRD.DEF" + }, + + { + "id": 94, + "level": 6, + "name": [ "Cyclops" ], + "faction": 6, + "upgrade": 95, + "defname": "CCYCLR.DEF", + "projectile_defname": "PCYCLBX.DEF", + "projectile_spin": true + }, + + { + "id": 95, + "level": 6, + "name": [ "CyclopsLord" ], + "faction": 6, + "defname": "CCYCLLOR.DEF", + "projectile_defname": "PCYCLBX.DEF", + "projectile_spin": true + }, + + { + "id": 96, + "level": 7, + "name": [ "YoungBehemoth" ], + "faction": 6, + "upgrade": 97, + "defname": "CYBEHE.DEF" + }, + + { + "id": 97, + "level": 7, + "name": [ "AncientBehemoth" ], + "faction": 6, + "defname": "CABEHE.DEF" + }, + + { + "id": 98, + "level": 1, + "name": [ "Gnoll" ], + "faction": 7, + "upgrade": 99, + "defname": "CGNOLL.DEF" + }, + + { + "id": 99, + "level": 1, + "name": [ "GnollMarauder" ], + "faction": 7, + "defname": "CGNOLM.DEF" + }, + + { + "id": 100, + "level": 2, + "name": [ "PrimitiveLizardman" ], + "faction": 7, + "upgrade": 101, + "defname": "CPLIZA.DEF", + "projectile_defname": "PPLIZAX.DEF", + "projectile_spin": false, + "turret_shooter": true + }, + + { + "id": 101, + "level": 2, + "name": [ "AdvancedLizardman" ], + "faction": 7, + "defname": "CALIZA.DEF", + "projectile_defname": "PPLIZAX.DEF", + "projectile_spin": false + }, + + { + "id": 102, + "level": 5, + "name": [ "CopperGorgon" ], + "faction": 7, + "upgrade": 103, + "defname": "CCGORG.DEF" + }, + + { + "id": 103, + "level": 5, + "name": [ "BronzeGorgon" ], + "faction": 7, + "defname": "CBGOG.DEF" + }, + + { + "id": 104, + "level": 3, + "name": [ "Dragonflies", "DragonFly", "SerpentFly" ], + "faction": 7, + "upgrade": 105, + "defname": "CDRFLY.DEF" + }, + + { + "id": 105, + "level": 3, + "name": [ "FireDragonFly" ], + "faction": 7, + "defname": "CDRFIR.DEF" + }, + + { + "id": 106, + "level": 4, + "name": [ "Basilisk" ], + "faction": 7, + "upgrade": 107, + "defname": "CBASIL.DEF" + }, + + { + "id": 107, + "level": 4, + "name": [ "GreaterBasilisk" ], + "faction": 7, + "defname": "CGBASI.DEF" + }, + + { + "id": 108, + "level": 6, + "name": [ "Wyvern" ], + "faction": 7, + "upgrade": 109, + "defname": "CWYVER.DEF" + }, + + { + "id": 109, + "level": 6, + "name": [ "WyvernMonarch" ], + "faction": 7, + "defname": "CWYVMN.DEF" + }, + + { + "id": 110, + "level": 7, + "name": [ "Hydra" ], + "faction": 7, + "upgrade": 111, + "defname": "CHYDRA.DEF" + }, + + { + "id": 111, + "level": 7, + "name": [ "ChaosHydra" ], + "faction": 7, + "defname": "CCHYDR.DEF" + }, + + { + "id": 112, + "level": 2, + "name": [ "AirElemental", "AirElementals" ], + "faction": 8, + "upgrade": 127, + "defname": "CAELEM.DEF" + }, + + { + "id": 113, + "level": 5, + "name": [ "EarthElemental", "EarthElementals" ], + "faction": 8, + "upgrade": 125, + "defname": "CEELEM.DEF" + }, + + { + "id": 114, + "level": 4, + "name": [ "FireElemental", "FireElementals" ], + "faction": 8, + "upgrade": 129, + "defname": "CFELEM.DEF" + }, + + { + "id": 115, + "level": 3, + "name": [ "WaterElemental", "WaterElementals" ], + "faction": 8, + "upgrade": 123, + "defname": "CWELEM.DEF" + }, + + { + "id": 116, + "level": 4, + "name": [ "GoldGolem" ], + "faction": -1, + "defname": "CGGOLE.DEF" + }, + + { + "id": 117, + "level": 5, + "name": [ "DiamondGolem" ], + "faction": -1, + "defname": "CDGOLE.DEF" + }, + + { + "id": 118, + "level": 1, + "name": [ "Pixie", "Pixies" ], + "faction": 8, + "upgrade": 119, + "defname": "CPIXIE.DEF" + }, + + { + "id": 119, + "level": 1, + "name": [ "Sprite" ], + "faction": 8, + "defname": "CSPRITE.DEF" + }, + + { + "id": 120, + "level": 6, + "name": [ "PsiElemental" ], + "faction": 8, + "upgrade": 121, + "defname": "CPSYEL.DEF" + }, + + { + "id": 121, + "level": 6, + "name": [ "MagicElemental" ], + "faction": 8, + "defname": "CMAGEL.DEF" + }, + + { + "id": 123, + "level": 3, + "name": [ "IceElemental" ], + "faction": 8, + "defname": "CICEE.DEF", + "projectile_defname": "PICEE.DEF", + "projectile_spin": false + }, + + { + "id": 125, + "level": 5, + "name": [ "StoneElemental" ], + "faction": 8, + "defname": "CSTONE.DEF" + }, + + { + "id": 127, + "level": 2, + "name": [ "StormElemental" ], + "faction": 8, + "defname": "CSTORM.DEF", + "projectile_defname": "CPRGTIX.DEF", + "projectile_spin": false, + "turret_shooter": true + }, + + { + "id": 129, + "level": 4, + "name": [ "ElectricityElemental" ], + "faction": 8, + "defname": "CNRG.DEF" + }, + + { + "id": 130, + "level": 7, + "name": [ "Firebird" ], + "faction": 8, + "upgrade": 131, + "defname": "CFBIRD.DEF" + }, + + { + "id": 131, + "level": 7, + "name": [ "Pheonix" ], + "faction": 8, + "upgrade": 15, + "defname": "CPHX.DEF" + }, + + { + "id": 132, + "level": 10, + "name": [ "AzureDragon" ], + "faction": -1, + "defname": "CADRGN.DEF" + }, + + { + "id": 133, + "level": 10, + "name": [ "CrystalDragon" ], + "faction": -1, + "defname": "CCDRGN.DEF" + }, + + { + "id": 134, + "level": 8, + "name": [ "FairieDragon" ], + "faction": -1, + "defname": "CFDRGN.DEF" + }, + + { + "id": 135, + "level": 10, + "name": [ "RustDragon" ], + "faction": -1, + "defname": "CRSDGN.DEF" + }, + + { + "id": 136, + "level": 6, + "name": [ "Enchanter" ], + "faction": -1, + "defname": "CENCH.DEF", + "projectile_defname": "SMBALX.DEF", + "projectile_spin": false + }, + + { + "id": 137, + "level": 4, + "name": [ "Sharpshooter" ], + "faction": -1, + "defname": "CSHARP.DEF", + "projectile_defname": "PELFX.DEF", + "projectile_spin": false + }, + + { + "id": 138, + "level": 1, + "name": [ "Halfling" ], + "faction": -1, + "defname": "CHALF.DEF", + "projectile_defname": "PHALF.DEF", + "projectile_spin": true + }, + + { + "id": 139, + "level": 1, + "name": [ "Peasant" ], + "faction": -1, + "defname": "CPEAS.DEF" + }, + + { + "id": 140, + "level": 2, + "name": [ "Boar" ], + "faction": -1, + "defname": "CBOAR.DEF" + }, + + { + "id": 141, + "level": 3, + "name": [ "Mummy" ], + "faction": -1, + "defname": "CMUMMY.DEF" + }, + + { + "id": 142, + "level": 3, + "name": [ "warrior" ], + "faction": -1, + "defname": "CNOMAD.DEF" + }, + + { + "id": 143, + "level": 2, + "name": [ "Rogue" ], + "faction": -1, + "defname": "CROGUE.DEF" + }, + + { + "id": 144, + "level": 5, + "name": [ "OgreShaman" ], + "faction": -1, + "defname": "CTROLL.DEF" + }, + + { + "id": 145, + "level": 0, + "name": [ "Catapult" ], + "faction": -1, + "defname": "SMCATA.DEF", + "projectile_defname": "SMCATX.DEF", + "projectile_spin": true + }, + + { + "id": 146, + "level": 0, + "name": [ "Ballista" ], + "faction": -1, + "defname": "SMBAL.DEF", + "projectile_defname": "SMBALX.DEF", + "projectile_spin": false + }, + + { + "id": 147, + "level": 0, + "name": [ "FirstAidTent" ], + "faction": -1, + "defname": "SMTENT.DEF" + }, + + { + "id": 148, + "level": 0, + "name": [ "AmmoCart" ], + "faction": -1, + "defname": "SMCART.DEF" + }, + + { + "id": 149, + "level": 0, + "name": [ "ArrowTower" ], + "faction": -1, + "defname": "x" + }, + + { + "id": 150, + "level": 0, + "name": [ "SupremeArchangel" ], + "faction": 0, + "defname": "ZM150Z.DEF" + }, + + { + "id": 151, + "level": 8, + "name": [ "DiamondDragon" ], + "faction": 1, + "defname": "ZM151Z.DEF" + }, + + { + "id": 152, + "level": 8, + "name": [ "LordofThunder" ], + "faction": 2, + "defname": "ZM152Z.DEF", + "projectile_defname": "CPRGTIX.DEF", + "projectile_spin": false + }, + + { + "id": 153, + "level": 8, + "name": [ "HellBaron" ], + "faction": 3, + "defname": "ZM153Z.DEF" + }, + + { + "id": 154, + "level": 8, + "name": [ "BloodDragon" ], + "faction": 4, + "defname": "ZM154Z.DEF" + }, + + { + "id": 155, + "level": 8, + "name": [ "DarknessDragon" ], + "faction": 5, + "defname": "ZM155Z.DEF" + }, + + { + "id": 156, + "level": 8, + "name": [ "GhostBehemoth" ], + "faction": 6, + "defname": "ZM156Z.DEF" + }, + + { + "id": 157, + "level": 8, + "name": [ "HellHydra" ], + "faction": 7, + "defname": "ZM157Z.DEF" + }, + + { + "id": 158, + "level": 8, + "name": [ "SacredPhoenix" ], + "faction": 8, + "defname": "ZM158Z.DEF" + }, + + { + "id": 159, + "level": 0, + "name": [ "Ghost" ], + "faction": -1, + "defname": "ZM159G.DEF" + }, + + { + "id": 160, + "level": 0, + "name": [ "God1War" ], + "faction": -1, + "defname": "ZM160G.DEF" + }, + + { + "id": 161, + "level": 0, + "name": [ "God2Peace" ], + "faction": -1, + "defname": "ZM161G.DEF" + }, + + { + "id": 162, + "level": 0, + "name": [ "God3Mana" ], + "faction": -1, + "defname": "ZM162G.DEF" + }, + + { + "id": 163, + "level": 0, + "name": [ "God4Lore" ], + "faction": -1, + "defname": "ZM163G.DEF" + }, + + { + "id": 164, + "level": 0, + "name": [ "MinotaurKing" ], + "faction": -1, + "defname": "ZM164GD.DEF" + }, + + { + "id": 165, + "level": 0, + "name": [ "MineralElemental" ], + "faction": -1, + "defname": "ZM165GD.DEF" + }, + + { + "id": 166, + "level": 0, + "name": [ "ElectricityElemental" ], + "faction": -1, + "defname": "ZM166GD.DEF" + }, + + { + "id": 167, + "level": 0, + "name": [ "AncientBasilisk" ], + "faction": -1, + "defname": "ZM167GD.DEF" + }, + + { + "id": 168, + "level": 0, + "name": [ "Gorynych" ], + "faction": -1, + "defname": "ZM168DG.DEF" + }, + + { + "id": 169, + "level": 0, + "name": [ "WarZealot" ], + "faction": -1, + "defname": "ZM169ZL.DEF", + "projectile_defname": "CPRZEAX.DEF", + "projectile_spin": false + }, + + { + "id": 170, + "level": 0, + "name": [ "Myriad" ], + "faction": -1, + "defname": "ZM170SW.DEF", + "projectile_defname": "PLCBOWX.DEF", + "projectile_spin": false + }, + + { + "id": 171, + "level": 0, + "name": [ "MedusaMatriarch" ], + "faction": -1, + "defname": "ZM171SR.DEF", + "projectile_defname": "PLCBOWX.DEF", + "projectile_spin": false + }, + + { + "id": 172, + "level": 0, + "name": [ "Nightmare" ], + "faction": -1, + "defname": "ZM172N.DEF" + }, + + { + "id": 173, + "level": 0, + "name": [ "SantaGremlin" ], + "faction": -1, + "defname": "ZM173M.DEF", + "projectile_defname": "CPRGRE.DEF", + "projectile_spin": true + }, + + { + "id": 174, + "level": 0, + "name": [ "Paladin1" ], + "faction": -1, + "defname": "ZM174NPC.DEF" + }, + + { + "id": 175, + "level": 0, + "name": [ "Hierophant1" ], + "faction": -1, + "defname": "ZM175NPC.DEF" + }, + + { + "id": 176, + "level": 0, + "name": [ "TempleGuardian1" ], + "faction": -1, + "defname": "ZM176NPC.DEF" + }, + + { + "id": 177, + "level": 0, + "name": [ "Succubus1" ], + "faction": -1, + "defname": "ZM177NPC.DEF" + }, + + { + "id": 178, + "level": 0, + "name": [ "SoulEater1" ], + "faction": -1, + "defname": "ZM178NPC.DEF" + }, + + { + "id": 179, + "level": 0, + "name": [ "Brute1" ], + "faction": -1, + "defname": "ZM179NPC.DEF" + }, + + { + "id": 180, + "level": 0, + "name": [ "OgreLeader1" ], + "faction": -1, + "defname": "ZM180NPC.DEF" + }, + + { + "id": 181, + "level": 0, + "name": [ "Shaman1" ], + "faction": -1, + "defname": "ZM181NPC.DEF" + }, + + { + "id": 182, + "level": 0, + "name": [ "AstralSpirit1" ], + "faction": -1, + "defname": "ZM182NPC.DEF" + }, + + { + "id": 183, + "level": 0, + "name": [ "Paladin2" ], + "faction": -1, + "defname": "ZM174NPC.DEF" + }, + + { + "id": 184, + "level": 0, + "name": [ "Hierophant2" ], + "faction": -1, + "defname": "ZM175NPC.DEF" + }, + + { + "id": 185, + "level": 0, + "name": [ "TempleGuardian2" ], + "faction": -1, + "defname": "ZM176NPC.DEF" + }, + + { + "id": 186, + "level": 0, + "name": [ "Succubus2" ], + "faction": -1, + "defname": "ZM177NPC.DEF" + }, + + { + "id": 187, + "level": 0, + "name": [ "SoulEater2" ], + "faction": -1, + "defname": "ZM178NPC.DEF" + }, + + { + "id": 188, + "level": 0, + "name": [ "Brute2" ], + "faction": -1, + "defname": "ZM179NPC.DEF" + }, + + { + "id": 189, + "level": 0, + "name": [ "OgreLeader2" ], + "faction": -1, + "defname": "ZM180NPC.DEF" + }, + + { + "id": 190, + "level": 0, + "name": [ "Shaman2" ], + "faction": -1, + "defname": "ZM181NPC.DEF" + }, + + { + "id": 191, + "level": 0, + "name": [ "AstralSpirit2" ], + "faction": -1, + "defname": "ZM182NPC.DEF" + }, + + { + "id": 192, + "level": 0, + "name": [ "SylvanCentaur" ], + "faction": -1, + "defname": "ZM192Z.DEF" + }, + + { + "id": 193, + "level": 0, + "name": [ "Sorceress" ], + "faction": -1, + "defname": "ZM193Z.DEF", + "projectile_defname": "SMBALX.DEF", + "projectile_spin": false + }, + + { + "id": 194, + "level": 0, + "name": [ "Werewolf" ], + "faction": -1, + "defname": "ZM194Z.DEF" + }, + + { + "id": 195, + "level": 0, + "name": [ "HellSteed" ], + "faction": -1, + "defname": "ZM195Z.DEF" + }, + + { + "id": 196, + "level": 0, + "name": [ "Dracolich" ], + "faction": -1, + "defname": "ZM196Z.DEF", + "projectile_defname": "SMBALX.DEF", + "projectile_spin": false + } + ] +} diff --git a/config/crerefnam.txt b/config/crerefnam.txt deleted file mode 100644 index d8fa5330e..000000000 --- a/config/crerefnam.txt +++ /dev/null @@ -1,224 +0,0 @@ -0 Pikeman -1 Halberdier -2 LightCrossbowman -2 Archer -3 HeavyCrossbowman -4 Griffin -5 RoyalGriffin -6 Swordsman -7 Crusader -8 Monk -9 Zealot -10 Cavalier -11 Champion -12 Angel -13 Archangel -14 Centaur -15 EliteCentaur -16 Dwarf -17 BattleDwarf -18 WoodElf -19 GrandElf -20 Pegasus -21 SilverPegasus -22 Treefolk -23 BriarTreefolk -24 Unicorn -25 WarUnicorn -26 GreenDragon -27 GoldDragon -28 ApprenticeGremlin -29 MasterGremlin -30 StoneGargoyle -31 ObsidianGargoyle -32 IronGolem -33 StoneGolem -34 Mage -35 ArchMage -36 Genie -37 Caliph -38 NagaSentinel -39 NagaGuardian -40 LesserTitan -41 GreaterTitan -42 Imp -43 Familiar -44 Gog -45 Magog -46 HellHound -47 Cerberus -48 Single-HornedDemon -49 Dual-HornedDemon -50 PitFiend -51 PitFoe -52 Efreet -53 EfreetSultan -54 Devil -55 ArchDevil -56 Skeleton -57 SkeletonWarrior -58 Zombie -59 ZombieLord -60 Wight -61 Wraith -62 Vampire -63 Nosferatu -64 Lich -65 PowerLich -66 BlackKnight -67 BlackLord -68 BoneDragon -69 GhostDragon -70 Troglodyte -71 InfernalTroglodyte -72 Harpy -73 HarpyHag -73 M73 -74 Beholder -75 EvilEye -75 M75 -76 Medusa -76 Medusae -77 MedusaQueen -78 Minotaur -79 MinotaurKing -80 Manticore -81 Scorpicore -82 RedDragon -83 BlackDragon -84 Goblin -85 Hobgoblin -86 GoblinWolfRider -87 HobgoblinWolfRider -88 Orc -89 OrcChieftain -90 Ogre -91 OgreMage -92 Roc -93 Thunderbird -94 Cyclops -95 CyclopsLord -96 YoungBehemoth -97 AncientBehemoth -98 Gnoll -99 GnollMarauder -100 PrimitiveLizardman -101 AdvancedLizardman -102 CopperGorgon -103 BronzeGorgon -104 DragonFly -104 SerpentFly -104 Dragonflies -105 FireDragonFly -106 Basilisk -107 GreaterBasilisk -108 Wyvern -109 WyvernMonarch -110 Hydra -111 ChaosHydra -112 AirElemental -112 AirElementals -113 EarthElemental -113 EarthElementals -114 FireElemental -114 FireElementals -115 WaterElemental -115 WaterElementals -116 GoldGolem -117 DiamondGolem -118 Pixie -118 Pixies -119 Sprite -120 PsiElemental -121 MagicElemental -122 NOTUSED -123 IceElemental -124 NOTUSED -125 StoneElemental -127 StormElemental -129 ElectricityElemental -130 Firebird -131 Pheonix -132 AzureDragon -133 CrystalDragon -134 FairieDragon -135 RustDragon -136 Enchanter -137 Sharpshooter -138 Halfling -139 Peasant -140 Boar -141 Mummy -142 warrior -143 Rogue -144 OgreShaman -145 Catapult -146 Ballista -147 FirstAidTent -148 AmmoCart -149 ArrowTower -150 SupremeArchangel -151 DiamondDragon -152 LordofThunder -153 HellBaron -154 BloodDragon -155 DarknessDragon -156 GhostBehemoth -157 HellHydra -158 SacredPhoenix -159 Ghost -160 God1War -161 God2Peace -162 God3Mana -163 God4Lore -164 MinotaurKing -165 MineralElemental -166 ElectricityElemental -167 AncientBasilisk -168 Gorynych -169 WarZealot -170 Myriad -171 MedusaMatriarch -172 Nightmare -173 SantaGremlin -174 Paladin1 -175 Hierophant1 -176 TempleGuardian1 -177 Succubus1 -178 SoulEater1 -179 Brute1 -180 OgreLeader1 -181 Shaman1 -182 AstralSpirit1 -183 Paladin2 -184 Hierophant2 -185 TempleGuardian2 -186 Succubus2 -187 SoulEater2 -188 Brute2 -189 OgreLeader2 -190 Shaman2 -191 AstralSpirit2 -192 SylvanCentaur -193 Sorceress -194 Werewolf -195 HellSteed -196 Dracolich -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -999 999 999 999 - -FORMAT: -ID Reference_name \ No newline at end of file diff --git a/config/monsters.txt b/config/monsters.txt deleted file mode 100644 index dac7ac06b..000000000 --- a/config/monsters.txt +++ /dev/null @@ -1,197 +0,0 @@ -0 1 -1 1 -2 2 -3 2 -4 3 -5 3 -6 4 -7 4 -8 5 -9 5 -10 6 -11 6 -12 7 -13 7 -14 1 -15 1 -16 2 -17 2 -18 3 -19 3 -20 4 -21 4 -22 5 -23 5 -24 6 -25 6 -26 7 -27 7 -28 1 -29 1 -30 2 -31 2 -32 3 -33 3 -34 4 -35 4 -36 5 -37 5 -38 6 -39 6 -40 7 -41 7 -42 1 -43 1 -44 2 -45 2 -46 3 -47 3 -48 4 -49 4 -50 5 -51 5 -52 6 -53 6 -54 7 -55 7 -56 1 -57 1 -58 2 -59 2 -60 3 -61 3 -62 4 -63 4 -64 5 -65 5 -66 6 -67 6 -68 7 -69 7 -70 1 -71 1 -72 2 -73 2 -74 3 -75 3 -76 4 -77 4 -78 5 -79 5 -80 6 -81 6 -82 7 -83 7 -84 1 -85 1 -86 2 -87 2 -88 3 -89 3 -90 4 -91 4 -92 5 -93 5 -94 6 -95 6 -96 7 -97 7 -98 1 -99 1 -100 2 -101 2 -102 5 -103 5 -104 3 -105 3 -106 4 -107 4 -108 6 -109 6 -110 7 -111 7 -112 2 -113 5 -114 4 -115 3 -116 4 -117 5 -118 1 -119 1 -120 6 -121 6 -122 000000 -123 3 -124 000000 -125 5 -126 000000 -127 2 -128 000000 -129 4 -130 7 -131 7 -132 10 -133 10 -134 8 -135 10 -136 6 -137 4 -138 1 -139 1 -140 2 -141 3 -142 3 -143 2 -144 5 -145 000000 -146 000000 -147 000000 -148 000000 -149 000000 -150 000000 -151 8 -152 8 -153 8 -154 8 -155 8 -156 8 -157 8 -158 8 -159 000000 -160 000000 -161 000000 -162 000000 -163 000000 -164 000000 -165 000000 -166 000000 -167 000000 -168 000000 -169 000000 -170 000000 -171 000000 -172 000000 -173 000000 -174 000000 -175 000000 -176 000000 -177 000000 -178 000000 -179 000000 -180 000000 -181 000000 -182 000000 -183 000000 -184 000000 -185 000000 -186 000000 -187 000000 -188 000000 -189 000000 -190 000000 -191 000000 -192 000000 -193 000000 -194 000000 -195 000000 -196 000000 diff --git a/lib/CCreatureHandler.cpp b/lib/CCreatureHandler.cpp index 4203e3bfb..905da7aec 100644 --- a/lib/CCreatureHandler.cpp +++ b/lib/CCreatureHandler.cpp @@ -14,6 +14,7 @@ #include "../lib/CGameState.h" #include #include +#include "../lib/JsonNode.h" using namespace boost::assign; extern CLodHandler * bitmaph; @@ -462,145 +463,53 @@ void CCreatureHandler::loadCreatures() abils.close(); - tlog5 << "\t\tReading config/crerefnam.txt" << std::endl; - //loading reference names - std::ifstream ifs(DATA_DIR "/config/crerefnam.txt"); - int tempi; - std::string temps; - for (;;) - { - ifs >> tempi >> temps; - if (tempi>=creatures.size()) - break; - boost::assign::insert(nameToID)(temps,tempi); - creatures[tempi]->nameRef=temps; - } - ifs.close(); - ifs.clear(); + // loading creatures properties + tlog5 << "\t\tReading config/creatures.json" << std::endl; + const JsonNode config(DATA_DIR "/config/creatures.json"); + const JsonVector &creatures_vec = config["creatures"].Vector(); - tlog5 << "\t\tReading config/monsters.txt" << std::endl; - ifs.open(DATA_DIR "/config/monsters.txt"); - { - while(!ifs.eof()) - { - int id, lvl; - ifs >> id >> lvl; - if(!ifs.good()) - break; - CCreature *c = creatures[id]; - c->level = lvl; + for (JsonVector::const_iterator it = creatures_vec.begin(); it!=creatures_vec.end(); ++it) { + const JsonNode &creature = *it; + int creatureID = creature["id"].Float(); + const JsonNode *value; + + /* A creature can have several names. */ + const JsonVector &names_vec = creature["name"].Vector(); + for (JsonVector::const_iterator it = names_vec.begin(); it!=names_vec.end(); ++it) { + const std::string name = (*it).String(); + + boost::assign::insert(nameToID)(name, creatureID); } + + // Set various creature properties + CCreature *c = creatures[creatureID]; + c->level = creature["level"].Float(); + c->faction = creature["faction"].Float(); + c->animDefName = creature["defname"].String(); + + value = &creature["upgrade"]; + if (!value->isNull()) + c->upgrades.insert(value->Float()); + + value = &creature["projectile_defname"]; + if (!value->isNull()) { + idToProjectile[creatureID] = value->String(); + + value = &creature["projectile_spin"]; + idToProjectileSpin[creatureID] = value->Bool(); + } + + value = &creature["turret_shooter"]; + if (!value->isNull() && value->Bool()) + factionToTurretCreature[c->faction] = creatureID; } + std::ifstream ifs; + std::string dump2; + buildBonusTreeForTiers(); - - - ifs.close(); - ifs.clear(); - - tlog5 << "\t\tReading config/cr_factions.txt" << std::endl; - ifs.open(DATA_DIR "/config/cr_factions.txt"); - while(!ifs.eof()) - { - int id, fact; - ifs >> id >> fact; - creatures[id]->faction = fact; - } - ifs.close(); - ifs.clear(); - - tlog5 << "\t\tReading config/cr_upgrade_list.txt" << std::endl; - ifs.open(DATA_DIR "/config/cr_upgrade_list.txt"); - while(!ifs.eof()) - { - int id, up; - ifs >> id >> up; - creatures[id]->upgrades.insert(up); - } - ifs.close(); - ifs.clear(); - - //loading unit animation def names - tlog5 << "\t\tReading config/CREDEFS.TXT" << std::endl; - std::ifstream inp(DATA_DIR "/config/CREDEFS.TXT", std::ios::in | std::ios::binary); //this file is not in lod - inp.seekg(0,std::ios::end); // na koniec - int andame2 = inp.tellg(); // read length - inp.seekg(0,std::ios::beg); // wracamy na poczatek - char * bufor = new char[andame2+1]; // allocate memory - inp.read((char*)bufor, andame2); // read map file to buffer - inp.close(); - bufor[andame2] = 0; - buf = std::string(bufor); - delete [] bufor; - - i = 0; //buf iterator - hmcr = 0; - for(; ianimDefName = defName; - } - tlog5 << "\t\tReading CRANIM.TXT.txt" << std::endl; loadAnimationInfo(); - //loading id to projectile mapping - - tlog5 << "\t\tReading config/cr_shots.txt" << std::endl; - std::ifstream inp2(DATA_DIR "/config/cr_shots.txt", std::ios::in | std::ios::binary); //this file is not in lod - char dump [200]; - inp2.getline(dump, 200); - while(true) - { - int id; - std::string name; - bool spin; - - inp2>>id; - if(id == -1) - break; - inp2>>name; - idToProjectile[id] = name; - inp2>>spin; - idToProjectileSpin[id] = spin; - } - inp2.close(); - - //reading factionToTurretCreature - - tlog5 << "\t\tReading config/cr_to_turret.txt" << std::endl; - std::ifstream inp3(DATA_DIR "/config/cr_to_turret.txt", std::ios::in | std::ios::binary); //this file is not in lod - std::string dump2; - inp3 >> dump2 >> dump2; - for(int g=0; g> factionToTurretCreature[g]; - } - inp3.close(); - //reading creature ability names ifs.open(DATA_DIR "/config/bonusnames.txt"); {