1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-28 23:06:24 +02:00

- split heroes.json in manner similar to creatures\factions

- string ID's for H3 heroes
- data in vcmi configs for heroes will replace data in h3 txt's
This commit is contained in:
Ivan Savenko 2013-03-03 18:00:37 +00:00
parent dbec99ffc7
commit b4e54f76ea
19 changed files with 2615 additions and 2379 deletions

View File

@ -259,6 +259,12 @@ namespace vstd
return c.find(i)!=c.end();
}
template <typename V, typename Item, typename Item2>
bool contains(const boost::unordered_map<Item,V> & c, const Item2 &i)
{
return c.find(i)!=c.end();
}
//returns position of first element in vector c equal to s, if there is no such element, -1 is returned
template <typename Container, typename T2>
int find_pos(const Container & c, const T2 &s)

View File

@ -42,6 +42,7 @@
},
"azureDragon" :
{
"special" : true,
"id": 132,
"level": 10,
"faction": "neutral",
@ -65,8 +66,9 @@
},
"crystalDragon" :
{
"special" : true,
"id": 133,
"level": 10,
"level": 9,
"faction": "neutral",
"abilities": [ [ "DRAGON_NATURE", 0, 0, 0 ] ], //crystal dragon is a dragon
"ability_remove": [ "FLYING" ], //Crystal Dragons do not fly
@ -85,6 +87,7 @@
},
"fairieDragon" :
{
"special" : true,
"id": 134,
"level": 8,
"faction": "neutral",
@ -115,8 +118,9 @@
},
"rustDragon" :
{
"special" : true,
"id": 135,
"level": 10,
"level": 9,
"faction": "neutral",
"abilities": [ [ "SPELL_AFTER_ATTACK", 100, 80, 0 ], //always reduce defense
[ "ACID_BREATH", 25, 0, 20 ], //20% chance to do 25 damage
@ -136,6 +140,7 @@
},
"enchanter" :
{
"special" : true,
"id": 136,
"level": 6,
"extraNames": [ "enchanters" ],
@ -169,6 +174,7 @@
},
"sharpshooter" :
{
"special" : true,
"id": 137,
"level": 4,
"extraNames": [ "sharpshooters" ],

View File

@ -30,5 +30,19 @@
"config/creatures/neutral.json",
"config/creatures/special.json",
"config/creatures/wog.json"
]
],
"heroes" :
[
"config/heroes/castle.json",
"config/heroes/rampart.json",
"config/heroes/tower.json",
"config/heroes/necropolis.json",
"config/heroes/inferno.json",
"config/heroes/dungeon.json",
"config/heroes/stronghold.json",
"config/heroes/fortress.json",
"config/heroes/conflux.json",
"config/heroes/special.json"
],
}

File diff suppressed because it is too large Load Diff

250
config/heroes/castle.json Normal file
View File

@ -0,0 +1,250 @@
{
"orrin":
{
"id": 0,
"class" : "knight",
"female": false,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "archery", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 1, "info": 0 }
]
},
"valeska":
{
"id": 1,
"class" : "knight",
"female": true,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "archery", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 2 }
]
},
"edric":
{
"id": 2,
"class" : "knight",
"female": false,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "armorer", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 4 }
]
},
"sylvia":
{
"id": 3,
"class" : "knight",
"female": true,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "navigation", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 2, "subtype": 5, "info": 1 }
]
},
"lordHaart":
{
"id": 4,
"class" : "knight",
"female": false,
"special" : true, // Lord Haart in his living form. Disabled in H3 expansions
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "estates", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 13, "info": 0 }
]
},
"sorsha":
{
"id": 5,
"class" : "knight",
"female": true,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 6 }
]
},
"christian":
{
"id": 6,
"class" : "knight",
"female": false,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "artillery", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 146 }
]
},
"tyris":
{
"id": 7,
"class" : "knight",
"female": true,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 10 }
]
},
"rion":
{
"id": 8,
"class" : "cleric",
"female": false,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "firstAid", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 27, "info": 0 }
]
},
"adela":
{
"id": 9,
"class" : "cleric",
"female": true,
"spellbook": [ "bless" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "diplomacy", "level": "basic" }
],
"specialties":
[
{ "type":6, "val": 3, "subtype": 41, "info": 0 }
]
},
"cuthbert":
{
"id": 10,
"class" : "cleric",
"female": false,
"spellbook": [ "weakness" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "estates", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 45, "info": 0 }
]
},
"adelaide":
{
"id": 11,
"class" : "cleric",
"female": true,
"spellbook": [ "frostRing" ],
"skills":
[
{ "skill" : "wisdom", "level": "advanced" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 20, "info": 0 }
]
},
"ingham":
{
"id": 12,
"class" : "cleric",
"female": false,
"spellbook": [ "curse" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "mysticism", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 8 }
]
},
"sanya":
{
"id": 13,
"class" : "cleric",
"female": true,
"spellbook": [ "dispel" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "eagleEye", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 11, "info": 0 }
]
},
"loynis":
{
"id": 14,
"class" : "cleric",
"spellbook": [ "prayer" ],
"female": false,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "learning", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 48, "info": 0 }
]
},
"caitlin":
{
"id": 15,
"class" : "cleric",
"female": true,
"spellbook": [ "cure" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "intelligence", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 350, "subtype": 6, "info": 0 }
]
}
}

258
config/heroes/conflux.json Normal file
View File

@ -0,0 +1,258 @@
{
"pasis":
{
"id": 128,
"class" : "planeswalker",
"female": true,
"skills":
[
{ "skill" : "artillery", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":4, "val": 3, "subtype": 1, "info": 120 },
{ "type":4, "val": 3, "subtype": 2, "info": 120 }
]
},
"thunar":
{
"id": 129,
"class" : "planeswalker",
"female": true,
"skills":
[
{ "skill" : "estates", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":4, "val": 2, "subtype": 1, "info": 113 },
{ "type":4, "val": 1, "subtype": 2, "info": 113 },
{ "type":4, "val": 5, "subtype": 4, "info": 113 }
]
},
"ignissa":
{
"id": 130,
"class" : "planeswalker",
"female": true,
"skills":
[
{ "skill" : "artillery", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":4, "val": 1, "subtype": 1, "info": 114 },
{ "type":4, "val": 2, "subtype": 1, "info": 114 },
{ "type":4, "val": 2, "subtype": 3, "info": 114 }
]
},
"lacus":
{
"id": 131,
"class" : "planeswalker",
"female": true,
"skills":
[
{ "skill" : "tactics", "level": "advanced" }
],
"specialties":
[
{ "type":4, "val": 2, "subtype": 1, "info": 115 }
]
},
"monere":
{
"id": 132,
"class" : "planeswalker",
"female": false,
"skills":
[
{ "skill" : "logistics", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":4, "val": 3, "subtype": 1, "info": 120 },
{ "type":4, "val": 3, "subtype": 2, "info": 120 }
]
},
"erdamon":
{
"id": 133,
"class" : "planeswalker",
"female": false,
"skills":
[
{ "skill" : "estates", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":4, "val": 2, "subtype": 1, "info": 113 },
{ "type":4, "val": 1, "subtype": 2, "info": 113 },
{ "type":4, "val": 5, "subtype": 4, "info": 113 }
]
},
"fiur":
{
"id": 134,
"class" : "planeswalker",
"female": false,
"skills":
[
{ "skill" : "offence", "level": "advanced" }
],
"specialties":
[
{ "type":4, "val": 1, "subtype": 1, "info": 114 },
{ "type":4, "val": 2, "subtype": 1, "info": 114 },
{ "type":4, "val": 2, "subtype": 3, "info": 114 }
]
},
"kalt":
{
"id": 135,
"class" : "planeswalker",
"female": false,
"skills":
[
{ "skill" : "tactics", "level": "basic" },
{ "skill" : "learning", "level": "basic" }
],
"specialties":
[
{ "type":4, "val": 2, "subtype": 1, "info": 115 }
]
},
"luna":
{
"id": 136,
"class" : "elementalist",
"spellbook": [ "fireWall" ],
"female": true,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "fireMagic", "level": "basic" }
],
"specialties":
[
{ "type":5, "val": 100, "subtype": 13, "info": 0 }
]
},
"brissa":
{
"id": 137,
"class" : "elementalist",
"female": true,
"spellbook": [ "haste" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "airMagic", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 53, "info": 0 }
]
},
"ciele":
{
"id": 138,
"class" : "elementalist",
"female": true,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "waterMagic", "level": "basic" }
],
"specialties":
[
{ "type":5, "val": 50, "subtype": 15, "info": 0 }
]
},
"labetha":
{
"id": 139,
"class" : "elementalist",
"female": true,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "earthMagic", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 46, "info": 0 }
]
},
"inteus":
{
"id": 140,
"class" : "elementalist",
"female": false,
"spellbook": [ "bloodlust" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "fireMagic", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 43, "info": 0 }
]
},
"aenain":
{
"id": 141,
"class" : "elementalist",
"female": false,
"spellbook": [ "disruptingRay" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "airMagic", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 47, "info": 0 }
]
},
"gelare":
{
"id": 142,
"class" : "elementalist",
"female": false,
"spellbook": [ "dispel" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "waterMagic", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 350, "subtype": 6, "info": 0 }
]
},
"grindan":
{
"id": 143,
"class" : "elementalist",
"female": false,
"spellbook": [ "slow" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "earthMagic", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 350, "subtype": 6, "info": 0 }
]
}
}

248
config/heroes/dungeon.json Normal file
View File

@ -0,0 +1,248 @@
{
"lorelei":
{
"id": 80,
"class" : "warlock",
"female": true,
"skills":
[
{ "skill" : "scouting", "level": "basic" },
{ "skill" : "leadership", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 72 }
]
},
"arlach":
{
"id": 81,
"class" : "warlock",
"female": false,
"skills":
[
{ "skill" : "artillery", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 146 }
]
},
"dace":
{
"id": 82,
"class" : "warlock",
"female": false,
"skills":
[
{ "skill" : "tactics", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 78 }
]
},
"ajit":
{
"id": 83,
"class" : "warlock",
"female": false,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "resistance", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 74 }
]
},
"damacon":
{
"id": 84,
"class" : "warlock",
"female": false,
"skills":
[
{ "skill" : "offence", "level": "advanced" }
],
"specialties":
[
{ "type":10, "val": 350, "subtype": 6, "info": 0 }
]
},
"gunnar":
{
"id": 85,
"class" : "warlock",
"female": false,
"skills":
[
{ "skill" : "logistics", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 2, "info": 0 }
]
},
"synca":
{
"id": 86,
"class" : "warlock",
"female": true,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "scholar", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 80 }
]
},
"shakti":
{
"id": 87,
"class" : "warlock",
"female": false,
"skills":
[
{ "skill" : "tactics", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 70 }
]
},
"alamar":
{
"id": 88,
"class" : "overlord",
"spellbook": [ "resurrection" ],
"female": false,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "scholar", "level": "basic" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 38, "info": 0 }
]
},
"jaegar":
{
"id": 89,
"class" : "overlord",
"female": false,
"spellbook": [ "shield" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "mysticism", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 8, "info": 1 }
]
},
"malekith":
{
"id": 90,
"class" : "overlord",
"female": false,
"spellbook": [ "bloodlust" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "sorcery", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 25, "info": 0 }
]
},
"jeddite":
{
"id": 91,
"class" : "overlord",
"female": true,
"spellbook": [ "resurrection" ],
"skills":
[
{ "skill" : "wisdom", "level": "advanced" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 38, "info": 0 }
]
},
"geon":
{
"id": 92,
"class" : "overlord",
"female": false,
"spellbook": [ "slow" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "eagleEye", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 11, "info": 1 }
]
},
"deemer":
{
"id": 93,
"class" : "overlord",
"female": false,
"spellbook": [ "meteorShower" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "scouting", "level": "advanced" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 23, "info": 0 }
]
},
"sephinroth":
{
"id": 94,
"class" : "overlord",
"female": true,
"spellbook": [ "protectAir" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "intelligence", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 1, "subtype": 4, "info": 0 }
]
},
"darkstorn":
{
"id": 95,
"class" : "overlord",
"female": false,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "learning", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 46, "info": 0 }
]
}
}

248
config/heroes/fortress.json Normal file
View File

@ -0,0 +1,248 @@
{
"bron":
{
"id": 112,
"class" : "beastmaster",
"female": false,
"skills":
[
{ "skill" : "armorer", "level": "basic" },
{ "skill" : "resistance", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 1, "subtype": 5, "info": 0 }
]
},
"drakon":
{
"id": 113,
"class" : "beastmaster",
"female": false,
"skills":
[
{ "skill" : "armorer", "level": "basic" },
{ "skill" : "leadership", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 106 }
]
},
"wystan":
{
"id": 114,
"class" : "beastmaster",
"female": false,
"skills":
[
{ "skill" : "armorer", "level": "basic" },
{ "skill" : "archery", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 98 }
]
},
"tazar":
{
"id": 115,
"class" : "beastmaster",
"female": false,
"skills":
[
{ "skill" : "armorer", "level": "advanced" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 100 }
]
},
"alkin":
{
"id": 116,
"class" : "beastmaster",
"female": false,
"skills":
[
{ "skill" : "armorer", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 23, "info": 0 }
]
},
"korbac":
{
"id": 117,
"class" : "beastmaster",
"female": false,
"skills":
[
{ "skill" : "armorer", "level": "basic" },
{ "skill" : "pathfinding", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 102 }
]
},
"gerwulf":
{
"id": 118,
"class" : "beastmaster",
"female": false,
"skills":
[
{ "skill" : "armorer", "level": "basic" },
{ "skill" : "artillery", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 104 }
]
},
"broghild":
{
"id": 119,
"class" : "beastmaster",
"female": false,
"skills":
[
{ "skill" : "armorer", "level": "basic" },
{ "skill" : "scouting", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 146 }
]
},
"mirlanda":
{
"id": 120,
"class" : "witch",
"spellbook": [ "weakness" ],
"female": true,
"skills":
[
{ "skill" : "wisdom", "level": "advanced" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 108 }
]
},
"rosic":
{
"id": 121,
"class" : "witch",
"female": true,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "mysticism", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 8, "info": 1 }
]
},
"voy":
{
"id": 122,
"class" : "witch",
"female": true,
"spellbook": [ "slow" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "navigation", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 2, "subtype": 5, "info": 1 }
]
},
"verdish":
{
"id": 123,
"class" : "witch",
"female": true,
"spellbook": [ "protectFire" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "firstAid", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 27, "info": 1 }
]
},
"merist":
{
"id": 124,
"class" : "witch",
"female": true,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "learning", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 46, "info": 0 }
]
},
"styg":
{
"id": 125,
"class" : "witch",
"female": true,
"spellbook": [ "shield" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "sorcery", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 25, "info": 0 }
]
},
"andra":
{
"id": 126,
"class" : "witch",
"female": true,
"spellbook": [ "dispel" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "intelligence", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 24, "info": 0 }
]
},
"tiva":
{
"id": 127,
"class" : "witch",
"female": true,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "eagleEye", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 11, "info": 1 }
]
}
}

247
config/heroes/inferno.json Normal file
View File

@ -0,0 +1,247 @@
{
"fiona":
{
"id": 48,
"class" : "demoniac",
"female": true,
"skills":
[
{ "skill" : "scouting", "level": "advanced" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 46 }
]
},
"rashka":
{
"id": 49,
"class" : "demoniac",
"female": false,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "scholar", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 52 }
]
},
"marius":
{
"id": 50,
"class" : "demoniac",
"female": true,
"skills":
[
{ "skill" : "armorer", "level": "advanced" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 48 }
]
},
"ignatius":
{
"id": 51,
"class" : "demoniac",
"female": false,
"skills":
[
{ "skill" : "tactics", "level": "basic" },
{ "skill" : "resistance", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 42 }
]
},
"octavia":
{
"id": 52,
"class" : "demoniac",
"female": true,
"skills":
[
{ "skill" : "scholar", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 350, "subtype": 6, "info": 0 }
]
},
"calh":
{
"id": 53,
"class" : "demoniac",
"female": false,
"skills":
[
{ "skill" : "archery", "level": "basic" },
{ "skill" : "scouting", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 42 }
]
},
"pyre":
{
"id": 54,
"class" : "demoniac",
"female": true,
"skills":
[
{ "skill" : "artillery", "level": "basic" },
{ "skill" : "logistics", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 146 }
]
},
"nymus":
{
"id": 55,
"class" : "demoniac",
"female": true,
"skills":
[
{ "skill" : "offence", "level": "advanced" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 50 }
]
},
"ayden":
{
"id": 56,
"class" : "heretic",
"spellbook": [ "viewEarth" ],
"female": false,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "intelligence", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 24, "info": 0 }
]
},
"xyron":
{
"id": 57,
"class" : "heretic",
"female": false,
"spellbook": [ "inferno" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "scholar", "level": "basic" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 22, "info": 0 }
]
},
"axsis":
{
"id": 58,
"class" : "heretic",
"female": false,
"spellbook": [ "protectAir" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "mysticism", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 8, "info": 1 }
]
},
"olema":
{
"id": 59,
"class" : "heretic",
"female": true,
"spellbook": [ "weakness" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "ballistics", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 45, "info": 0 }
]
},
"calid":
{
"id": 60,
"class" : "heretic",
"female": false,
"spellbook": [ "haste" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "learning", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 1, "subtype": 3, "info": 0 }
]
},
"ash":
{
"id": 61,
"class" : "heretic",
"female": true,
"spellbook": [ "bloodlust" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "eagleEye", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 43, "info": 0 }
]
},
"zydar":
{
"id": 62,
"class" : "heretic",
"female": false,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "sorcery", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 25, "info": 0 }
]
},
"xarfax":
{
"id": 63,
"class" : "heretic",
"female": false,
"spellbook": [ "fireball" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "leadership", "level": "basic" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 21, "info": 0 }
]
}
}

View File

@ -0,0 +1,256 @@
{
"straker":
{
"id": 64,
"class" : "deathknight",
"female": false,
"spellbook": [ "haste" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "resistance", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 58 }
]
},
"vokial":
{
"id": 65,
"class" : "deathknight",
"female": false,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "artillery", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 62 }
]
},
"moandor":
{
"id": 66,
"class" : "deathknight",
"female": false,
"spellbook": [ "slow" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "learning", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 64 }
]
},
"charna":
{
"id": 67,
"class" : "deathknight",
"female": true,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 60 }
]
},
"tamika":
{
"id": 68,
"class" : "deathknight",
"female": true,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 66 }
]
},
"isra":
{
"id": 69,
"class" : "deathknight",
"female": true,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "necromancy", "level": "advanced" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 12, "info": 0 }
]
},
"clavius":
{
"id": 70,
"class" : "deathknight",
"female": false,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 350, "subtype": 6, "info": 0 }
]
},
"galthran":
{
"id": 71,
"class" : "deathknight",
"female": false,
"spellbook": [ "shield" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "armorer", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 56 }
]
},
"septienna":
{
"id": 72,
"class" : "necromancer",
"female": true,
"spellbook": [ "deathRipple" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "scholar", "level": "basic" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 24, "info": 0 }
]
},
"aislinn":
{
"id": 73,
"class" : "necromancer",
"female": true,
"spellbook": [ "meteorShower" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "wisdom", "level": "basic" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 23, "info": 0 }
]
},
"sandro":
{
"id": 74,
"class" : "necromancer",
"female": false,
"spellbook": [ "slow" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "sorcery", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 25, "info": 0 }
]
},
"nimbus":
{
"id": 75,
"class" : "necromancer",
"female": false,
"spellbook": [ "shield" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "eagleEye", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 11, "info": 1 }
]
},
"thant":
{
"id": 76,
"class" : "necromancer",
"female": false,
"spellbook": [ "animateDead" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "mysticism", "level": "basic" }
],
"specialties":
[
{ "type":3, "val": 39, "subtype": 0, "info": 3 }
]
},
"xsi":
{
"id": 77,
"class" : "necromancer",
"female": true,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "learning", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 46, "info": 0 }
]
},
"vidomina":
{
"id": 78,
"class" : "necromancer",
"female": true,
"spellbook": [ "curse" ],
"skills":
[
{ "skill" : "necromancy", "level": "advanced" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 12, "info": 0 }
]
},
"nagash":
{
"id": 79,
"class" : "necromancer",
"female": false,
"spellbook": [ "protectAir" ],
"skills":
[
{ "skill" : "necromancy", "level": "basic" },
{ "skill" : "intelligence", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 350, "subtype": 6, "info": 0 }
]
}
}

248
config/heroes/rampart.json Normal file
View File

@ -0,0 +1,248 @@
{
"mephala":
{
"id": 16,
"class" : "ranger",
"female": true,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "armorer", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 23, "info": 0 }
]
},
"ufretin":
{
"id": 17,
"class" : "ranger",
"female": false,
"skills":
[
{ "skill" : "luck", "level": "basic" },
{ "skill" : "resistance", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 16 }
]
},
"jenova":
{
"id": 18,
"class" : "ranger",
"female": true,
"skills":
[
{ "skill" : "archery", "level": "advanced" }
],
"specialties":
[
{ "type":10, "val": 350, "subtype": 6, "info": 0 }
]
},
"ryland":
{
"id": 19,
"class" : "ranger",
"female": false,
"skills":
[
{ "skill" : "diplomacy", "level": "basic" },
{ "skill" : "leadership", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 22 }
]
},
"thorgrim":
{
"id": 20,
"class" : "ranger",
"female": false,
"skills":
[
{ "skill" : "resistance", "level": "advanced" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 26, "info": 0 }
]
},
"ivor":
{
"id": 21,
"class" : "ranger",
"female": false,
"skills":
[
{ "skill" : "archery", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 18 }
]
},
"clancy":
{
"id": 22,
"class" : "ranger",
"female": false,
"skills":
[
{ "skill" : "pathfinding", "level": "basic" },
{ "skill" : "resistance", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 24 }
]
},
"kyrre":
{
"id": 23,
"class" : "ranger",
"female": true,
"skills":
[
{ "skill" : "archery", "level": "basic" },
{ "skill" : "logistics", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 2, "info": 0 }
]
},
"coronius":
{
"id": 24,
"class" : "druid",
"spellbook": [ "slayer" ],
"female": false,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "scholar", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 55, "info": 1 }
]
},
"uland":
{
"id": 25,
"class" : "druid",
"female": false,
"spellbook": [ "cure" ],
"skills":
[
{ "skill" : "wisdom", "level": "advanced" },
{ "skill" : "ballistics", "level": "basic" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 37, "info": 0 }
]
},
"elleshar":
{
"id": 26,
"class" : "druid",
"female": false,
"spellbook": [ "curse" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "intelligence", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 24, "info": 0 }
]
},
"gem":
{
"id": 27,
"class" : "druid",
"female": true,
"spellbook": [ "summonBoat" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "firstAid", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 27, "info": 0 }
]
},
"malcom":
{
"id": 28,
"class" : "druid",
"female": false,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "eagleEye", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 11, "info": 0 }
]
},
"melodia":
{
"id": 29,
"class" : "druid",
"spellbook": [ "fortune" ],
"female": true,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "luck", "level": "basic" }
],
"specialties":
[
{ "type":7, "val": 0, "subtype": 51, "info": 0 }
]
},
"alagar":
{
"id": 30,
"class" : "druid",
"female": false,
"spellbook": [ "iceBolt" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "sorcery", "level": "basic" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 16, "info": 0 }
]
},
"aeris":
{
"id": 31,
"class" : "druid",
"female": false,
"spellbook": [ "protectAir" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "scouting", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 20 }
]
}
}

241
config/heroes/special.json Normal file
View File

@ -0,0 +1,241 @@
{
// "special" heroes for campaigns
"sirMullich":
{
"id": 144,
"class" : "knight",
"female": false,
"special" : true,
"skills":
[
{ "skill" : "leadership", "level": "advanced" }
],
"specialties":
[
{ "type":12, "val": 2, "subtype": 0, "info": 0 }
]
},
"adrienne":
{
"id": 145,
"class" : "witch",
"female": true,
"special" : true,
"spellbook": [ "inferno" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "fireMagic", "level": "expert" } ],
"specialties":
[
{ "type":11, "val": 14, "subtype": 0, "info": 0 }
]
},
"catherine":
{
"id": 146,
"class" : "knight",
"female": true,
"special" : true,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 4 }
]
},
"dracon":
{
"id": 147,
"class" : "wizard",
"female": false,
"special" : true,
"spellbook": [ "haste" ],
"skills":
[
{ "skill" : "wisdom", "level": "advanced" }
],
"specialties":
[
{ "type":9, "val": 0, "subtype": 8, "info": 136 },
{ "type":9, "val": 0, "subtype": 34, "info": 136 }
]
},
"gelu":
{
"id": 148,
"class" : "ranger",
"female": false,
"special" : true,
"skills":
[
{ "skill" : "archery", "level": "basic" },
{ "skill" : "leadership", "level": "basic" }
],
"specialties":
[
{ "type":9, "val": 0, "subtype": 2, "info": 137 },
{ "type":9, "val": 0, "subtype": 18, "info": 137 }
]
},
"kilgor":
{
"id": 149,
"class" : "barbarian",
"female": false,
"special" : true,
"skills":
[
{ "skill" : "offence", "level": "advanced" }
],
"specialties":
[
{ "type":4, "val": 5, "subtype": 1, "info": 96 },
{ "type":4, "val": 5, "subtype": 2, "info": 96 },
{ "type":4, "val": 10, "subtype": 3, "info": 96 }
]
},
"undeadHaart": // undead version of Lord Haart
{
"id": 150,
"class" : "deathknight",
"female": false,
"special" : true,
"spellbook": [ "slow" ],
"skills":
[
{ "skill" : "necromancy", "level": "advanced" }
],
"specialties":
[
{ "type":4, "val": 5, "subtype": 1, "info": 66 },
{ "type":4, "val": 5, "subtype": 2, "info": 66 },
{ "type":4, "val": 10, "subtype": 3, "info": 66 }
]
},
"mutare":
{
"id": 151,
"class" : "warlock",
"female": true,
"special" : true,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "estates", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":13, "val": 5, "subtype": 1, "info": 0 },
{ "type":13, "val": 5, "subtype": 2, "info": 0 }
]
},
"roland":
{
"id": 152,
"class" : "knight",
"female": false,
"special" : true,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "armorer", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 4 }
]
},
"mutareDrake":
{
"id": 153,
"class" : "warlock",
"female": true,
"special" : true,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "estates", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":13, "val": 1, "subtype": 1, "info": 5 },
{ "type":13, "val": 1, "subtype": 1, "info": 5 }
],
"army" :
[
{
"creature" : "troglodyte"
},
{
"creature" : "harpy"
},
{
"creature" : "evilEye"
}
]
},
"boragus":
{
"id": 154,
"class" : "barbarian",
"female": false,
"special" : true,
"skills":
[
{ "skill" : "tactics", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 90 }
],
"army" :
[
{
"creature" : "goblin"
},
{
"creature" : "goblinWolfRider"
},
{
"creature" : "orc"
}
]
},
"xeron":
{
"id": 155,
"class" : "demoniac",
"female": false,
"special" : true,
"skills":
[
{ "skill" : "leadership", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":4, "val": 4, "subtype": 1, "info": 54 },
{ "type":4, "val": 2, "subtype": 2, "info": 54 },
{ "type":4, "val": 1, "subtype": 5, "info": 54 }
],
"army" :
[
{
"creature" : "imp"
},
{
"creature" : "hellHound"
},
{
"creature" : "hellHound"
}
]
}
}

View File

@ -0,0 +1,245 @@
{
"yog":
{
"id": 96,
"class" : "barbarian",
"female": false,
"skills":
[
{ "skill" : "offence", "level": "basic" },
{ "skill" : "ballistics", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 94 }
]
},
"gurnisson":
{
"id": 97,
"class" : "barbarian",
"female": false,
"skills":
[
{ "skill" : "offence", "level": "basic" },
{ "skill" : "artillery", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 146 }
]
},
"jabarkas":
{
"id": 98,
"class" : "barbarian",
"female": false,
"skills":
[
{ "skill" : "offence", "level": "basic" },
{ "skill" : "archery", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 88 }
]
},
"shiva":
{
"id": 99,
"class" : "barbarian",
"female": true,
"skills":
[
{ "skill" : "offence", "level": "basic" },
{ "skill" : "scouting", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 92 }
]
},
"gretchin":
{
"id": 100,
"class" : "barbarian",
"female": true,
"skills":
[
{ "skill" : "offence", "level": "basic" },
{ "skill" : "pathfinding", "level": "basic" }
]
},
"krellion":
{
"id": 101,
"class" : "barbarian",
"female": false,
"skills":
[
{ "skill" : "offence", "level": "basic" },
{ "skill" : "resistance", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 84 }
]
},
"cragHack":
{
"id": 102,
"class" : "barbarian",
"female": false,
"skills":
[
{ "skill" : "offence", "level": "advanced" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 90 }
]
},
"tyraxor":
{
"id": 103,
"class" : "barbarian",
"female": false,
"skills":
[
{ "skill" : "offence", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 22, "info": 0 }
]
},
"gird":
{
"id": 104,
"class" : "battlemage",
"spellbook": [ "bloodlust" ],
"female": true,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "sorcery", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 86 }
]
},
"vey":
{
"id": 105,
"class" : "battlemage",
"female": false,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "leadership", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 25, "info": 0 }
]
},
"dessa":
{
"id": 106,
"class" : "battlemage",
"female": true,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "logistics", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 90 }
]
},
"terek":
{
"id": 107,
"class" : "battlemage",
"female": false,
"spellbook": [ "haste" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 2, "info": 0 }
]
},
"zubin":
{
"id": 108,
"class" : "battlemage",
"female": false,
"spellbook": [ "precision" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "artillery", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 53, "info": 0 }
]
},
"gundula":
{
"id": 109,
"class" : "battlemage",
"spellbook": [ "slow" ],
"female": true,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 44, "info": 0 }
]
},
"oris":
{
"id": 110,
"class" : "battlemage",
"female": true,
"spellbook": [ "protectAir" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "eagleEye", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 25, "info": 0 }
]
},
"saurug":
{
"id": 111,
"class" : "battlemage",
"female": false,
"spellbook": [ "bloodlust" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "resistance", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 11, "info": 1 }
]
}
}

256
config/heroes/tower.json Normal file
View File

@ -0,0 +1,256 @@
{
"piquedram":
{
"id": 32,
"class" : "alchemist",
"female": false,
"spellbook": [ "shield" ],
"skills":
[
{ "skill" : "scouting", "level": "basic" },
{ "skill" : "mysticism", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 30 }
]
},
"thane":
{
"id": 33,
"class" : "alchemist",
"female": false,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "scholar", "level": "advanced" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 36 }
]
},
"josephine":
{
"id": 34,
"class" : "alchemist",
"spellbook": [ "haste" ],
"female": true,
"skills":
[
{ "skill" : "mysticism", "level": "basic" },
{ "skill" : "sorcery", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 32 }
]
},
"neela":
{
"id": 35,
"class" : "alchemist",
"female": true,
"spellbook": [ "shield" ],
"skills":
[
{ "skill" : "scholar", "level": "basic" },
{ "skill" : "armorer", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 23, "info": 0 }
]
},
"torosar ":
{
"id": 36,
"class" : "alchemist",
"female": false,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "mysticism", "level": "basic" },
{ "skill" : "tactics", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 146 }
]
},
"fafner":
{
"id": 37,
"class" : "alchemist",
"female": false,
"spellbook": [ "haste" ],
"skills":
[
{ "skill" : "scholar", "level": "basic" },
{ "skill" : "resistance", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 38 }
]
},
"rissa":
{
"id": 38,
"class" : "alchemist",
"female": true,
"spellbook": [ "magicArrow" ],
"skills":
[
{ "skill" : "mysticism", "level": "basic" },
{ "skill" : "offence", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 1, "subtype": 1, "info": 0 }
]
},
"iona":
{
"id": 39,
"class" : "alchemist",
"spellbook": [ "magicArrow" ],
"female": true,
"skills":
[
{ "skill" : "scholar", "level": "basic" },
{ "skill" : "intelligence", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 36 }
]
},
"astral":
{
"id": 40,
"class" : "wizard",
"female": false,
"spellbook": [ "hypnotize" ],
"skills":
[
{ "skill" : "wisdom", "level": "advanced" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 60, "info": 0 }
]
},
"halon":
{
"id": 41,
"class" : "wizard",
"female": false,
"spellbook": [ "stoneSkin" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "mysticism", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 8, "info": 1 }
]
},
"serena":
{
"id": 42,
"class" : "wizard",
"female": true,
"spellbook": [ "dispel" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "eagleEye", "level": "basic" }
],
"specialties":
[
{ "type":2, "val": 5, "subtype": 11, "info": 0 }
]
},
"daremyth":
{
"id": 43,
"class" : "wizard",
"female": true,
"spellbook": [ "fortune" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "intelligence", "level": "basic" }
],
"specialties":
[
{ "type":7, "val": 0, "subtype": 51, "info": 0 }
]
},
"theodorus":
{
"id": 44,
"class" : "wizard",
"spellbook": [ "shield" ],
"female": false,
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "ballistics", "level": "basic" }
],
"specialties":
[
{ "type":1, "val": 0, "subtype": 0, "info": 34 }
]
},
"solmyr":
{
"id": 45,
"class" : "wizard",
"female": false,
"spellbook": [ "chainLightning" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "sorcery", "level": "basic" }
],
"specialties":
[
{ "type":3, "val": 3, "subtype": 19, "info": 0 }
]
},
"cyra":
{
"id": 46,
"class" : "wizard",
"female": true,
"spellbook": [ "haste" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "diplomacy", "level": "basic" }
],
"specialties":
[
{ "type":8, "val": 0, "subtype": 53, "info": 0 }
]
},
"aine":
{
"id": 47,
"class" : "wizard",
"female": true,
"spellbook": [ "curse" ],
"skills":
[
{ "skill" : "wisdom", "level": "basic" },
{ "skill" : "scholar", "level": "basic" }
],
"specialties":
[
{ "type":10, "val": 350, "subtype": 6, "info": 0 }
]
}
}

View File

@ -709,7 +709,7 @@ void CCreatureHandler::loadStackExperience(CCreature * creature, const JsonNode
{
BOOST_FOREACH (const JsonNode &exp, input.Vector())
{
auto bonus = JsonUtils::parseBonus (exp["bonus"]);
auto bonus = JsonUtils::parseBonus (exp["bonus"]); // FIXME: memory leak? Only copies of bonus is added to creature
bonus->source = Bonus::STACK_EXPERIENCE;
bonus->duration = Bonus::PERMANENT;
const JsonVector &values = exp["values"].Vector();

View File

@ -536,7 +536,7 @@ std::pair<Obj,int> CGameState::pickObject (CGObjectInstance *obj)
case Obj::RANDOM_TOWN:
{
PlayerColor align = PlayerColor((static_cast<CGTownInstance*>(obj))->alignment);
ui32 f;
si32 f; // can be negative (for random)
if(align >= PlayerColor::PLAYER_LIMIT)//same as owner / random
{
if(obj->tempOwner >= PlayerColor::PLAYER_LIMIT)

View File

@ -217,6 +217,9 @@ CHero * CHeroHandler::loadHero(const JsonNode & node)
{
CHero * hero = new CHero;
hero->sex = node["female"].Bool();
hero->special = node["special"].Bool();
hero->name = node["texts"]["name"].String();
hero->biography = node["texts"]["biography"].String();
hero->specName = node["texts"]["specialty"]["name"].String();
@ -229,7 +232,23 @@ CHero * CHeroHandler::loadHero(const JsonNode & node)
hero->portraitSmall = node["images"]["small"].String();
hero->portraitLarge = node["images"]["large"].String();
loadHeroArmy(hero, node);
loadHeroSkills(hero, node);
loadHeroSpecialty(hero, node);
VLC->modh->identifiers.requestIdentifier("heroClass." + node["class"].String(),
[=](si32 classID)
{
hero->heroClass = classes.heroClasses[classID];
});
return hero;
}
void CHeroHandler::loadHeroArmy(CHero * hero, const JsonNode & node)
{
assert(node["army"].Vector().size() <= 3); // anything bigger is useless - army initialization uses up to 3 slots
hero->initialArmy.resize(node["army"].Vector().size());
for (size_t i=0; i< hero->initialArmy.size(); i++)
@ -241,22 +260,15 @@ CHero * CHeroHandler::loadHero(const JsonNode & node)
assert(hero->initialArmy[i].minAmount <= hero->initialArmy[i].maxAmount);
VLC->modh->identifiers.requestIdentifier(std::string("creature.") + source["creature"].String(), [=](si32 creature)
VLC->modh->identifiers.requestIdentifier("creature." + source["creature"].String(), [=](si32 creature)
{
hero->initialArmy[i].creature = CreatureID(creature);
});
}
loadHeroJson(hero, node);
return hero;
}
void CHeroHandler::loadHeroJson(CHero * hero, const JsonNode & node)
void CHeroHandler::loadHeroSkills(CHero * hero, const JsonNode & node)
{
// sex: 0=male, 1=female
hero->sex = node["female"].Bool();
hero->special = node["special"].Bool();
BOOST_FOREACH(const JsonNode &set, node["skills"].Vector())
{
SecondarySkill skillID = SecondarySkill(
@ -267,7 +279,7 @@ void CHeroHandler::loadHeroJson(CHero * hero, const JsonNode & node)
}
// spellbook is considered present if hero have "spellbook" entry even when this is an empty set (0 spells)
hero->haveSpellBook = node["spellbook"].isNull();
hero->haveSpellBook = !node["spellbook"].isNull();
BOOST_FOREACH(const JsonNode & spell, node["spellbook"].Vector())
{
@ -284,7 +296,10 @@ void CHeroHandler::loadHeroJson(CHero * hero, const JsonNode & node)
});
}
}
}
void CHeroHandler::loadHeroSpecialty(CHero * hero, const JsonNode & node)
{
//deprecated, used only for original spciealties
BOOST_FOREACH(const JsonNode &specialty, node["specialties"].Vector())
{
@ -309,12 +324,6 @@ void CHeroHandler::loadHeroJson(CHero * hero, const JsonNode & node)
}
hero->specialty.push_back (hs); //now, how to get CGHeroInstance from it?
}
VLC->modh->identifiers.requestIdentifier("heroClass." + node["class"].String(),
[=](si32 classID)
{
hero->heroClass = classes.heroClasses[classID];
});
}
void CHeroHandler::load()
@ -383,6 +392,14 @@ void CHeroHandler::loadObstacles()
//loadObstacles(config["moats"], true, moats);
}
/// convert h3-style ID (e.g. Gobin Wolf Rider) to vcmi (e.g. goblinWolfRider)
static std::string genRefName(std::string input)
{
boost::algorithm::replace_all(input, " ", ""); //remove spaces
input[0] = std::tolower(input[0]); // to camelCase
return input;
}
void CHeroHandler::loadHeroes()
{
CLegacyConfigParser specParser("DATA/HEROSPEC.TXT");
@ -395,44 +412,57 @@ void CHeroHandler::loadHeroes()
specParser.endLine(); //ignore header
specParser.endLine();
std::vector<JsonNode> h3Data;
for (int i=0; i<GameConstants::HEROES_QUANTITY; i++)
{
CHero * hero = new CHero;
hero->name = parser.readString();
JsonNode heroData;
hero->specName = specParser.readString();
hero->specTooltip = specParser.readString();
hero->specDescr = specParser.readString();
hero->biography = bioParser.readString();
heroData["texts"]["name"].String() = parser.readString();
heroData["texts"]["biography"].String() = bioParser.readString();
heroData["texts"]["specialty"]["name"].String() = specParser.readString();
heroData["texts"]["specialty"]["tooltip"].String() = specParser.readString();
heroData["texts"]["specialty"]["description"].String() = specParser.readString();
heroData["images"]["index"].Float() = i;
hero->initialArmy.resize(3);
for(int x=0;x<3;x++)
{
hero->initialArmy[x].minAmount = parser.readNumber();
hero->initialArmy[x].maxAmount = parser.readNumber();
JsonNode armySlot;
armySlot["min"].Float() = parser.readNumber();
armySlot["max"].Float() = parser.readNumber();
armySlot["creature"].String() = genRefName(parser.readString());
std::string refName = parser.readString();
boost::algorithm::replace_all(refName, " ", ""); //remove spaces
refName[0] = std::tolower(refName[0]); // to camelCase
VLC->modh->identifiers.requestIdentifier(std::string("creature.") + refName, [=](si32 creature)
{
hero->initialArmy[x].creature = CreatureID(creature);
});
heroData["army"].Vector().push_back(armySlot);
}
parser.endLine();
specParser.endLine();
bioParser.endLine();
hero->ID = heroes.size();
hero->imageIndex = hero->ID;
heroes.push_back(hero);
h3Data.push_back(heroData);
}
// Load heroes information
const JsonNode config(ResourceID("config/heroes.json"));
BOOST_FOREACH(const JsonNode &hero, config["heroes"].Vector())
heroes.resize(GameConstants::HEROES_QUANTITY);
const JsonNode gameConf(ResourceID("config/gameConfig.json"));
JsonNode config(JsonUtils::assembleFromFiles(gameConf["heroes"].convertTo<std::vector<std::string> >()));
BOOST_FOREACH(auto &entry, config.Struct())
{
loadHeroJson(heroes[hero["id"].Float()], hero);
ui32 identifier = entry.second["id"].Float();
JsonUtils::merge(h3Data[identifier], entry.second);
CHero * hero = loadHero(h3Data[identifier]);
hero->ID = identifier;
heroes[identifier] = hero;
VLC->modh->identifiers.registerObject("hero." + entry.first, identifier);
}
for (size_t i=0; i < heroes.size(); i++)
{
if (heroes[i] == nullptr)
tlog0 << "Warning: hero with id " << i << " is missing!\n";
}
}

View File

@ -177,8 +177,10 @@ class DLL_LINKAGE CHeroHandler
/// consists of 201 values. Any higher levels require experience larger that ui64 can hold
std::vector<ui64> expPerLevel;
/// common function for loading heroes from mods and from H3
void loadHeroJson(CHero * hero, const JsonNode & node);
/// helpers for loading to avoid huge load functions
void loadHeroArmy(CHero * hero, const JsonNode & node);
void loadHeroSkills(CHero * hero, const JsonNode & node);
void loadHeroSpecialty(CHero * hero, const JsonNode & node);
public:
CHeroClassHandler classes;

View File

@ -252,14 +252,15 @@ void JsonWriter::writeContainer(Iterator begin, Iterator end)
return;
prefix += '\t';
end--;
writeEntry(begin++);
while (begin != end)
{
writeEntry(begin++);
out<<",\n";
writeEntry(begin++);
}
writeEntry(begin);
out<<"\n";
prefix.resize(prefix.size()-1);
}
@ -792,52 +793,26 @@ bool JsonValidator::validateItems(JsonNode &node, const JsonNode &schema)
}
//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())
BOOST_FOREACH(auto & schemaEntry, schema.Struct())
{
if (nodeIter->first < schemaIter->first) //No schema for entry
{
validateNode(nodeIter->second, nullNode, nodeIter->first);
if (!validateNode(node[schemaEntry.first], schemaEntry.second, schemaEntry.first))
node.Struct().erase(schemaEntry.first);
}
JsonMap::iterator toRemove = nodeIter++;
node.Struct().erase(toRemove);
for (auto iter = node.Struct().begin(); iter!= node.Struct().end();)
{
if (!vstd::contains(schema.Struct(), iter->first))
{
addMessage("Missing schema for entry " + iter->first + "!");
iter = node.Struct().erase(iter);
}
else
if (schemaIter->first < nodeIter->first) //No entry
{
if (!validateNode(node[schemaIter->first], schemaIter->second, schemaIter->first))
node.Struct().erase(schemaIter->first);
schemaIter++;
}
else //both entry and schema are present
{
JsonMap::iterator current = nodeIter++;
if (!validateNode(current->second, schemaIter->second, current->first))
node.Struct().erase(current);
schemaIter++;
}
}
while (nodeIter != node.Struct().end())
{
validateNode(nodeIter->second, nullNode, nodeIter->first);
JsonMap::iterator toRemove = nodeIter++;
node.Struct().erase(toRemove);
}
while (schemaIter != schema.Struct().end())
{
if (!validateNode(node[schemaIter->first], schemaIter->second, schemaIter->first))
node.Struct().erase(schemaIter->first);
schemaIter++;
iter++;
}
return true;
}