瀏覽代碼

Remove CCreatureHandler::loadBonuses

krs 1 年之前
父節點
當前提交
54f8f2c636

+ 25 - 15
config/creatures/castle.json

@@ -59,7 +59,7 @@
 		"upgrades": ["marksman"],
 		"abilities" :
 		{
-			"SHOOTING_ARMY" : {
+			"shooter" : {
 				"type" : "SHOOTER"
 			}
 		},
@@ -88,7 +88,7 @@
 		"faction": "castle",
 		"abilities":
 		{
-			"SHOOTING_ARMY" : {
+			"shooter" : {
 				"type" : "SHOOTER"
 			},
 			"extraAttack" :
@@ -121,9 +121,10 @@
 		"index": 4,
 		"level": 3,
 		"faction": "castle",
+		"doubleWide": true,
 		"abilities":
 		{
-			"FLYING_ARMY" : {
+			"canFly" : {
 				"type" : "FLYING"
 			},
 			"extraRetaliation" :
@@ -152,9 +153,10 @@
 		"index": 5,
 		"level": 3,
 		"faction": "castle",
+		"doubleWide": true,
 		"abilities":
 		{
-			"FLYING_ARMY" : {
+			"canFly" : {
 				"type" : "FLYING"
 			},
 			"unlimitedRetaliation" :
@@ -228,7 +230,7 @@
 		"upgrades": ["zealot"],
 		"abilities" :
 		{
-			"SHOOTING_ARMY" : {
+			"shooter" : {
 				"type" : "SHOOTER"
 			}
 		},
@@ -257,10 +259,10 @@
 		"faction": "castle",
 		"abilities" :
 		{
-			"SHOOTING_ARMY" : {
+			"shooter" : {
 				"type" : "SHOOTER"
 			},
-			"const_no_melee_penalty" : {
+			"noMeleePenalty" : {
 				"type" : "NO_MELEE_PENALTY"
 			}
 		},
@@ -287,11 +289,14 @@
 		"index": 10,
 		"level": 6,
 		"faction": "castle",
+		"doubleWide": true,
 		"upgrades": ["champion"],
 		"abilities" :
 		{
-			"const_jousting" : {
-				"type" : "JOUSTING"
+			"jousting":
+			{
+				"type": "JOUSTING",
+				"val": 5
 			}
 		},
 		"graphics" :
@@ -312,10 +317,13 @@
 		"index": 11,
 		"level": 6,
 		"faction": "castle",
+		"doubleWide": true,
 		"abilities" :
 		{
-			"const_jousting" : {
-				"type" : "JOUSTING"
+			"jousting":
+			{
+				"type": "JOUSTING",
+				"val": 5
 			}
 		},
 		"graphics" :
@@ -336,6 +344,7 @@
 		"index": 12,
 		"level": 7,
 		"faction": "castle",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_2" : // Will be affected by Advanced Slayer or better
@@ -343,11 +352,11 @@
 				"type" : "KING",
 				"val" : 2
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
-			"const_raises_morale" :
+			"raisesMorale" :
 			{
 				"type" : "MORALE",
 				"val" : 1,
@@ -386,6 +395,7 @@
 		"index": 13,
 		"level": 7,
 		"faction": "castle",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_2" : // Will be affected by Advanced Slayer or better
@@ -393,7 +403,7 @@
 				"type" : "KING",
 				"val" : 2
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -414,7 +424,7 @@
 				"type" : "CASTS",
 				"val" : 1
 			},
-			"const_raises_morale" : {
+			"raisesMorale" : {
 				"type" : "MORALE",
 				"val" : 1,
 				"propagator" : "HERO",

+ 22 - 17
config/creatures/conflux.json

@@ -8,7 +8,8 @@
 		"upgrades": ["sprite"],
 		"abilities" :
 		{
-			"FLYING_ARMY" : {
+			"canFly" :
+			{
 				"type" : "FLYING"
 			}
 		},
@@ -32,10 +33,12 @@
 		"faction": "conflux",
 		"abilities" :
 		{
-			"FLYING_ARMY" : {
+			"canFly" :
+			{
 				"type" : "FLYING"
 			},
-			"const_free_attack" : {
+			"noRetaliation" :
+			{
 				"type" : "BLOCKS_RETALIATION"
 			}
 		},
@@ -130,7 +133,7 @@
 			{
 				"type" : "NON_LIVING"
 			},
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
@@ -214,6 +217,7 @@
 		"level": 3,
 		"extraNames": [ "waterElementals" ],
 		"faction": "conflux",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"nonLiving" : 
@@ -277,7 +281,6 @@
 				"val" : 100
 			}
 		},
-		"doubleWide" : true,
 		"upgrades": ["iceElemental"],
 		"graphics" :
 		{
@@ -297,13 +300,14 @@
 		"index": 123,
 		"level": 3,
 		"faction": "conflux",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"nonLiving" : 
 			{
 				"type" : "NON_LIVING"
 			},
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
@@ -380,7 +384,6 @@
 				"val" : 100
 			}
 		},
-		"doubleWide" : true,
 		"graphics" :
 		{
 			"animation": "CICEE.DEF",
@@ -469,7 +472,7 @@
 			{
 				"type" : "NON_LIVING"
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -688,15 +691,15 @@
 			{
 				"type" : "NON_LIVING"
 			},
-			"MULTI_HEADED" :
+			"attackAllAdjacent" :
 			{
 				"type" : "ATTACKS_ALL_ADJACENT"
 			},
-			"const_free_attack" :
+			"noRetaliation" :
 			{
 				"type" : "BLOCKS_RETALIATION"
 			},
-			"IMMUNE_TO_MIND_SPELLS" :
+			"immuneToMind" :
 			{
 				"type" : "MIND_IMMUNITY"
 			}
@@ -727,11 +730,11 @@
 			{
 				"type" : "NON_LIVING"
 			},
-			"MULTI_HEADED" :
+			"attackAllAdjacent" :
 			{
 				"type" : "ATTACKS_ALL_ADJACENT"
 			},
-			"const_free_attack" :
+			"noRetaliation" :
 			{
 				"type" : "BLOCKS_RETALIATION"
 			},
@@ -761,6 +764,7 @@
 		"level": 7,
 		"faction": "conflux",
 		"upgrades": ["phoenix"],
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -768,11 +772,11 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
-			"HAS_EXTENDED_ATTACK" :
+			"twoHexAttackBreath" :
 			{
 				"type" : "TWO_HEX_ATTACK_BREATH"
 			},
@@ -800,6 +804,7 @@
 		"index": 131,
 		"level": 7,
 		"faction": "conflux",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -807,11 +812,11 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
-			"HAS_EXTENDED_ATTACK" :
+			"twoHexAttackBreath" :
 			{
 				"type" : "TWO_HEX_ATTACK_BREATH"
 			},

+ 22 - 16
config/creatures/dungeon.json

@@ -74,7 +74,7 @@
 		"faction": "dungeon",
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -105,7 +105,7 @@
 		"faction": "dungeon",
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -140,11 +140,11 @@
 		"upgrades": ["evilEye"],
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"const_no_melee_penalty" :
+			"noMeleePenalty" :
 			{
 				"type" : "NO_MELEE_PENALTY"
 			}
@@ -181,11 +181,11 @@
 		"faction": "dungeon",
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"const_no_melee_penalty" :
+			"noMeleePenalty" :
 			{
 				"type" : "NO_MELEE_PENALTY"
 			}
@@ -220,13 +220,14 @@
 		"index": 76,
 		"level": 4,
 		"faction": "dungeon",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"const_no_melee_penalty" :
+			"noMeleePenalty" :
 			{
 				"type" : "NO_MELEE_PENALTY"
 			},
@@ -262,13 +263,14 @@
 		"index": 77,
 		"level": 4,
 		"faction": "dungeon",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"const_no_melee_penalty" :
+			"noMeleePenalty" :
 			{
 				"type" : "NO_MELEE_PENALTY"
 			},
@@ -360,9 +362,10 @@
 		"level": 6,
 		"faction": "dungeon",
 		"upgrades": ["scorpicore"],
+		"doubleWide" : true,
 		"abilities" :
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			}
@@ -386,9 +389,10 @@
 		"index": 81,
 		"level": 6,
 		"faction": "dungeon",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -418,6 +422,7 @@
 		"index": 82,
 		"level": 7,
 		"faction": "dungeon",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -425,7 +430,7 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -433,7 +438,7 @@
 			{
 				"type" : "DRAGON_NATURE"
 			},
-			"fireBreath" :
+			"twoHexAttackBreath" :
 			{
 				"type" : "TWO_HEX_ATTACK_BREATH"
 			},
@@ -462,6 +467,7 @@
 		"index": 83,
 		"level": 7,
 		"faction": "dungeon",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -469,7 +475,7 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -477,7 +483,7 @@
 			{
 				"type" : "DRAGON_NATURE"
 			},
-			"fireBreath" :
+			"twoHexAttackBreath" :
 			{
 				"type" : "TWO_HEX_ATTACK_BREATH"
 			},

+ 18 - 10
config/creatures/fortress.json

@@ -46,7 +46,7 @@
 		"hasDoubleWeek": true,
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			}
@@ -76,7 +76,7 @@
 		"faction": "fortress",
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			}
@@ -105,6 +105,7 @@
 		"level": 5,
 		"faction": "fortress",
 		"upgrades": ["mightyGorgon"],
+		"doubleWide" : true,
 		"graphics" :
 		{
 			"animation": "CCGORG.DEF"
@@ -123,6 +124,7 @@
 		"index": 103,
 		"level": 5,
 		"faction": "fortress",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"deathStare" : 
@@ -153,7 +155,7 @@
 		"faction": "fortress",
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -186,7 +188,7 @@
 		"faction": "fortress",
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -222,6 +224,7 @@
 		"index": 106,
 		"level": 4,
 		"faction": "fortress",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"petrify" :
@@ -250,6 +253,7 @@
 		"index": 107,
 		"level": 4,
 		"faction": "fortress",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"petrify" :
@@ -278,9 +282,10 @@
 		"level": 6,
 		"faction": "fortress",
 		"upgrades": ["wyvernMonarch"],
+		"doubleWide" : true,
 		"abilities" :
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			}
@@ -303,9 +308,10 @@
 		"index": 109,
 		"level": 6,
 		"faction": "fortress",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -334,6 +340,7 @@
 		"index": 110,
 		"level": 7,
 		"faction": "fortress",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -341,11 +348,11 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"attackAll" :
+			"attackAllAdjacent" :
 			{
 				"type" : "ATTACKS_ALL_ADJACENT"
 			},
-			"noRetaliate" :
+			"noRetaliation" :
 			{
 				"type" : "BLOCKS_RETALIATION"
 			}
@@ -369,6 +376,7 @@
 		"index": 111,
 		"level": 7,
 		"faction": "fortress",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -376,11 +384,11 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"attackAll" :
+			"attackAllAdjacent" :
 			{
 				"type" : "ATTACKS_ALL_ADJACENT"
 			},
-			"noRetaliate" :
+			"noRetaliation" :
 			{
 				"type" : "BLOCKS_RETALIATION"
 			}

+ 11 - 14
config/creatures/inferno.json

@@ -53,7 +53,7 @@
 		"hasDoubleWeek": true,
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			}
@@ -83,7 +83,7 @@
 		"faction": "inferno",
 		"abilities":
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
@@ -117,10 +117,7 @@
 		"level": 3,
 		"faction": "inferno",
 		"upgrades": ["cerberus"],
-		"abilities":
-		{
-			 "FLYING_ARMY" : null //hell hound doesn't fly
-		},
+		"doubleWide" : true,
 		"graphics" :
 		{
 			"animation": "CHHOUN.DEF"
@@ -139,6 +136,7 @@
 		"index": 47,
 		"level": 3,
 		"faction": "inferno",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"noRetaliation" :
@@ -148,8 +146,7 @@
 			"threeHeads" : 
 			{
 				"type" : "THREE_HEADED_ATTACK"
-			},
-			"FLYING_ARMY" : null //cerberus doesn't fly
+			}
 		},
 		"graphics" :
 		{
@@ -361,12 +358,12 @@
 				"type" : "KING",
 				"val" : 2
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
-				// type loaded from crtraits
+				"type" : "FLYING",
 				"subtype" : "movementTeleporting"
 			},
-			"blockRetaliation" :
+			"noRetaliation" :
 			{
 				"type" : "BLOCKS_RETALIATION"
 			},
@@ -421,12 +418,12 @@
 				"type" : "KING",
 				"val" : 2
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
-				// type loaded from crtraits
+				"type" : "FLYING",
 				"subtype" : "movementTeleporting"
 			},
-			"blockRetaliation" :
+			"noRetaliation" :
 			{
 				"type" : "BLOCKS_RETALIATION"
 			},

+ 26 - 22
config/creatures/necropolis.json

@@ -7,7 +7,7 @@
 		"upgrades": ["skeletonWarrior"],
 		"abilities" :
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			}
@@ -32,7 +32,7 @@
 		"faction": "necropolis",
 		"abilities" :
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			}
@@ -59,7 +59,7 @@
 		"upgrades": ["zombieLord"],
 		"abilities" :
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			}
@@ -96,7 +96,7 @@
 		},
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
@@ -115,11 +115,11 @@
 		"faction": "necropolis",
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -151,11 +151,11 @@
 		"faction": "necropolis",
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -190,11 +190,11 @@
 		"faction": "necropolis",
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -226,11 +226,11 @@
 		"faction": "necropolis",
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -267,11 +267,11 @@
 		"faction": "necropolis",
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
@@ -307,11 +307,11 @@
 		"faction": "necropolis",
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
@@ -344,9 +344,10 @@
 		"index": 66,
 		"level": 6,
 		"faction": "necropolis",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
@@ -376,9 +377,10 @@
 		"index": 67,
 		"level": 6,
 		"faction": "necropolis",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
@@ -412,9 +414,10 @@
 		"index": 68,
 		"level": 7,
 		"faction": "necropolis",
+		"doubleWide" : true,
 		"abilities" :
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
@@ -423,7 +426,7 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -460,9 +463,10 @@
 		"index": 69,
 		"level": 7,
 		"faction": "necropolis",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"IS_UNDEAD" :
+			"undead" :
 			{
 				"type" : "UNDEAD"
 			},
@@ -471,7 +475,7 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},

+ 16 - 13
config/creatures/neutral.json

@@ -68,6 +68,7 @@
 		"level": 10,
 		"faction": "neutral",
 		"excludeFromRandomization" : true,
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -75,7 +76,7 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -83,7 +84,7 @@
 			{
 				"type" : "DRAGON_NATURE"
 			},
-			"fireBreath" :
+			"twoHexAttackBreath" :
 			{
 				"type" : "TWO_HEX_ATTACK_BREATH"
 			},
@@ -120,6 +121,7 @@
 		"level": 10,
 		"faction": "neutral",
 		"excludeFromRandomization" : true,
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -139,8 +141,7 @@
 			"crystals" :
 			{
 				"type" : "SPECIAL_CRYSTAL_GENERATION"
-			},
-			"FLYING_ARMY" : null
+			}
 		},
 		"graphics" :
 		{
@@ -161,6 +162,7 @@
 		"level": 8,
 		"faction": "neutral",
 		"excludeFromRandomization" : true,
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -264,6 +266,7 @@
 		"level": 10,
 		"faction": "neutral",
 		"excludeFromRandomization" : true,
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -271,7 +274,7 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -279,7 +282,7 @@
 			{
 				"type" : "DRAGON_NATURE"
 			},
-			"fireBreath" :
+			"twoHexAttackBreath" :
 			{
 				"type" : "TWO_HEX_ATTACK_BREATH"
 			},
@@ -318,15 +321,15 @@
 		"excludeFromRandomization" : true,
 		"abilities":
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"const_no_melee_penalty" :
+			"noMeleePenalty" :
 			{
 				"type" : "NO_MELEE_PENALTY"
 			},
-			"noPenalty" : 
+			"noWallPenalty" :
 			{
 				"type" : "NO_WALL_PENALTY"
 			},
@@ -405,7 +408,7 @@
 		"excludeFromRandomization" : true,
 		"abilities":
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
@@ -413,7 +416,7 @@
 			{
 				"type" : "NO_DISTANCE_PENALTY"
 			},
-			"noPenalty" : 
+			"noWallPenalty" :
 			{
 				"type" : "NO_WALL_PENALTY"
 			}
@@ -443,7 +446,7 @@
 		"faction": "neutral",
 		"abilities": 
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
@@ -545,6 +548,7 @@
 		"index": 142,
 		"level": 3,
 		"faction": "neutral",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"sandWalker" :
@@ -554,7 +558,6 @@
 				"propagator" : "HERO"
 			}
 		},
-		"doubleWide" : true,
 		"graphics" :
 		{
 			"animation": "CNOMAD.DEF"

+ 16 - 8
config/creatures/rampart.json

@@ -5,6 +5,7 @@
 		"level": 1,
 		"faction": "rampart",
 		"upgrades": ["centaurCaptain"],
+		"doubleWide" : true,
 		"hasDoubleWeek": true,
 		"graphics" :
 		{
@@ -26,6 +27,7 @@
 		"index": 15,
 		"level": 1,
 		"faction": "rampart",
+		"doubleWide" : true,
 		"graphics" :
 		{
 			"missile" : null,
@@ -101,7 +103,7 @@
 		"upgrades": ["grandElf"],
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			}
@@ -131,7 +133,7 @@
 		"faction": "rampart",
 		"abilities": 
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
@@ -165,9 +167,10 @@
 		"index": 20,
 		"level": 4,
 		"faction": "rampart",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -197,9 +200,10 @@
 		"index": 21,
 		"level": 4,
 		"faction": "rampart",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -282,6 +286,7 @@
 		"index": 24,
 		"level": 6,
 		"faction": "rampart",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"blinds" :
@@ -316,6 +321,7 @@
 		"index": 25,
 		"level": 6,
 		"faction": "rampart",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"blinds" :
@@ -350,6 +356,7 @@
 		"index": 26,
 		"level": 7,
 		"faction": "rampart",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -357,7 +364,7 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -365,7 +372,7 @@
 			{
 				"type" : "DRAGON_NATURE"
 			},
-			"fireBreath" :
+			"twoHexAttackBreath" :
 			{
 				"type" : "TWO_HEX_ATTACK_BREATH"
 			},
@@ -394,6 +401,7 @@
 		"index": 27,
 		"level": 7,
 		"faction": "rampart",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -401,7 +409,7 @@
 				"type" : "KING",
 				"val" : 0
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -409,7 +417,7 @@
 			{
 				"type" : "DRAGON_NATURE"
 			},
-			"fireBreath" :
+			"twoHexAttackBreath" :
 			{
 				"type" : "TWO_HEX_ATTACK_BREATH"
 			},

+ 10 - 2
config/creatures/special.json

@@ -36,8 +36,14 @@
 		"index": 145,
 		"level": 0,
 		"faction": "neutral",
-		"abilities" : {
-			"siegeMachine" : { "type" : "CATAPULT", "subtype" : "spell.catapultShot" }
+		"doubleWide" : true,
+		"abilities" :
+		{
+			"siegeMachine" :
+			{
+				"type" : "CATAPULT",
+				"subtype" : "spell.catapultShot"
+			}
 		},
 		"graphics" :
 		{
@@ -60,6 +66,7 @@
 		"index": 146,
 		"level": 0,
 		"faction": "neutral",
+		"doubleWide" : true,
 		"graphics" :
 		{
 			"animation": "SMBAL.DEF",
@@ -81,6 +88,7 @@
 		"index": 147,
 		"level": 0,
 		"faction": "neutral",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"heals" : {

+ 21 - 13
config/creatures/stronghold.json

@@ -44,6 +44,7 @@
 		"level": 2,
 		"faction": "stronghold",
 		"upgrades": ["hobgoblinWolfRider"],
+		"doubleWide" : true,
 		"hasDoubleWeek": true,
 		"graphics" :
 		{
@@ -63,6 +64,7 @@
 		"index": 87,
 		"level": 2,
 		"faction": "stronghold",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"extraAttack" :
@@ -92,7 +94,7 @@
 		"upgrades": ["orcChieftain"],
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			}
@@ -122,7 +124,7 @@
 		"faction": "stronghold",
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			}
@@ -208,9 +210,10 @@
 		"level": 5,
 		"faction": "stronghold",
 		"upgrades": ["thunderbird"],
+		"doubleWide" : true,
 		"abilities" :
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			}
@@ -233,9 +236,10 @@
 		"index": 93,
 		"level": 5,
 		"faction": "stronghold",
+		"doubleWide" : true,
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -272,13 +276,14 @@
 		"faction": "stronghold",
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"siege" : {
-				"subtype" : "spell.cyclopsShot",
-				"type" : "CATAPULT"
+			"siege" :
+			{
+				"type" : "CATAPULT",
+				"subtype" : "spell.cyclopsShot"
 			}
 		},
 		"upgrades": ["cyclopKing"],
@@ -307,18 +312,19 @@
 		"faction": "stronghold",
 		"abilities":
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"siege" : {
-				"subtype" : "spell.cyclopsShot",
-				"type" : "CATAPULT"
+			"siege" :
+			{
+				"type" : "CATAPULT",
+				"subtype" : "spell.cyclopsShot"
 			},
 			"siegeLevel" :
 			{
-				"subtype" : "spell.cyclopsShot",
 				"type" : "CATAPULT_EXTRA_SHOTS",
+				"subtype" : "spell.cyclopsShot",
 				"valueType" : "BASE_NUMBER",
 				"val" : 1
 			}
@@ -346,6 +352,7 @@
 		"index": 96,
 		"level": 7,
 		"faction": "stronghold",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise
@@ -378,6 +385,7 @@
 		"index": 97,
 		"level": 7,
 		"faction": "stronghold",
+		"doubleWide" : true,
 		"abilities":
 		{
 			"KING_1" : // Will be affected by Slayer with no expertise

+ 14 - 12
config/creatures/tower.json

@@ -28,7 +28,7 @@
 		"faction": "tower",
 		"abilities" :
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			}
@@ -62,7 +62,7 @@
 			{
 				"type" : "GARGOYLE"
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			}
@@ -92,7 +92,7 @@
 			{
 				"type" : "GARGOYLE"
 			},
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			}
@@ -180,11 +180,11 @@
 		"faction": "tower",
 		"abilities": 
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"const_no_melee_penalty" :
+			"noMeleePenalty" :
 			{
 				"type" : "NO_MELEE_PENALTY"
 			},
@@ -220,15 +220,15 @@
 		"faction": "tower",
 		"abilities": 
 		{
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"const_no_melee_penalty" :
+			"noMeleePenalty" :
 			{
 				"type" : "NO_MELEE_PENALTY"
 			},
-			"const_no_wall_penalty" :
+			"noWallPenalty" :
 			{
 				"type" : "NO_WALL_PENALTY"
 			},
@@ -271,7 +271,7 @@
 		"faction": "tower",
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -309,7 +309,7 @@
 		"faction": "tower",
 		"abilities":
 		{
-			"FLYING_ARMY" :
+			"canFly" :
 			{
 				"type" : "FLYING"
 			},
@@ -360,6 +360,7 @@
 		"index": 38,
 		"level": 6,
 		"faction": "tower",
+		"doubleWide" : true,
 		"abilities" :
 		{
 			"noRetaliation" : 
@@ -386,6 +387,7 @@
 		"index": 39,
 		"level": 6,
 		"faction": "tower",
+		"doubleWide" : true,
 		"abilities" :
 		{
 			"noRetaliation" : 
@@ -449,11 +451,11 @@
 				"type" : "KING",
 				"val" : 3
 			},
-			"SHOOTING_ARMY" :
+			"shooter" :
 			{
 				"type" : "SHOOTER"
 			},
-			"const_no_melee_penalty" :
+			"noMeleePenalty" :
 			{
 				"type" : "NO_MELEE_PENALTY"
 			},

+ 1 - 51
lib/CCreatureHandler.cpp

@@ -462,56 +462,6 @@ void CCreatureHandler::loadCommanders()
 	}
 }
 
-void CCreatureHandler::loadBonuses(JsonNode & creature, std::string bonuses) const
-{
-	auto makeBonusNode = [&](const std::string & type, double val = 0) -> JsonNode
-	{
-		JsonNode ret;
-		ret["type"].String() = type;
-		ret["val"].Float() = val;
-		return ret;
-	};
-
-	static const std::map<std::string, JsonNode> abilityMap =
-	{
-		{"FLYING_ARMY",            makeBonusNode("FLYING")},
-		{"SHOOTING_ARMY",          makeBonusNode("SHOOTER")},
-		{"SIEGE_WEAPON",           makeBonusNode("SIEGE_WEAPON")},
-		{"const_free_attack",      makeBonusNode("BLOCKS_RETALIATION")},
-		{"IS_UNDEAD",              makeBonusNode("UNDEAD")},
-		{"const_no_melee_penalty", makeBonusNode("NO_MELEE_PENALTY")},
-		{"const_jousting",         makeBonusNode("JOUSTING", 5)},
-		{"KING_1",                 makeBonusNode("KING")}, // Slayer with no expertise
-		{"KING_2",                 makeBonusNode("KING", 2)}, // Advanced Slayer or better
-		{"KING_3",                 makeBonusNode("KING", 3)}, // Expert Slayer only
-		{"const_no_wall_penalty",  makeBonusNode("NO_WALL_PENALTY")},
-		{"MULTI_HEADED",           makeBonusNode("ATTACKS_ALL_ADJACENT")},
-		{"IMMUNE_TO_MIND_SPELLS",  makeBonusNode("MIND_IMMUNITY")},
-		{"HAS_EXTENDED_ATTACK",    makeBonusNode("TWO_HEX_ATTACK_BREATH")}
-	};
-
-	auto hasAbility = [&](const std::string & name) -> bool 
-	{
-		return boost::algorithm::find_first(bonuses, name);
-	};
-
-	for(const auto & a : abilityMap)
-	{
-		if(hasAbility(a.first))
-			creature["abilities"][a.first] = a.second;
-	}
-	if(hasAbility("DOUBLE_WIDE"))
-		creature["doubleWide"].Bool() = true;
-
-	if(hasAbility("const_raises_morale"))
-	{
-		JsonNode node = makeBonusNode("MORALE");
-		node["val"].Float() = 1;
-		node["propagator"].String() = "HERO";
-		creature["abilities"]["const_raises_morale"] = node;
-	}
-}
-
 std::vector<JsonNode> CCreatureHandler::loadLegacyData()
 {
 	size_t dataSize = VLC->engineSettings()->getInteger(EGameSettings::TEXTS_CREATURE);
@@ -581,7 +531,7 @@ std::vector<JsonNode> CCreatureHandler::loadLegacyData()
 
 		// unused - ability text, not used since we no longer have original creature window
 		parser.readString();
-		loadBonuses(data, parser.readString()); //Attributes
+		parser.readString(); // unused - abilities, not used since we load them all from json configs
 
 		h3Data.push_back(data);
 	}

+ 0 - 2
lib/CCreatureHandler.h

@@ -195,8 +195,6 @@ private:
 	void loadStackExperience(CCreature * creature, const JsonNode & input) const;
 	void loadCreatureJson(CCreature * creature, const JsonNode & config) const;
 
-	/// adding abilities from ZCRTRAIT.TXT
-	void loadBonuses(JsonNode & creature, std::string bonuses) const;
 	/// load all creatures from H3 files
 	void load();
 	void loadCommanders();