diff --git a/config/commanders.json b/config/commanders.json
index fee89569a..59837b8b4 100644
--- a/config/commanders.json
+++ b/config/commanders.json
@@ -3,9 +3,9 @@
//Commander receives these bonuses on level-up
"bonusPerLevel":
[
- ["CREATURE_DAMAGE", 2, "creatureDamageMin", 0 ], //+2 minimum damage
- ["CREATURE_DAMAGE", 4, "creatureDamageMax", 0 ], //+4 maximum damage
- ["STACK_HEALTH", 20, null, 0 ] //+20 hp
+ { "type" : "CREATURE_DAMAGE", "val" : 2, "subtype" : "creatureDamageMin" }, //+2 minimum damage
+ { "type" : "CREATURE_DAMAGE", "val" : 4, "subtype" : "creatureDamageMax" }, //+4 maximum damage
+ { "type" : "STACK_HEALTH", "val" : 20 } //+20 hp
],
//Value of bonuses given by each skill level
"skillLevels":
@@ -22,20 +22,71 @@
"abilityRequirements":
//Two secondary skills needed for each special ability
[
- {"ability": ["ENEMY_DEFENCE_REDUCTION", 50, null, 0 ], "skills": [0, 1]},
- {"ability": ["FEAR", 0, null, 0 ], "skills": [0, 2]},
- {"ability": ["ALWAYS_MAXIMUM_DAMAGE", 0, null, 0 ], "skills": [0, 3]},
- {"ability": [["SHOOTER", 0, null, 0 ], ["NO_MELEE_PENALTY", 0, null, 0 ]], "skills": [0, 4]},
- {"ability": ["BLOCKS_RETALIATION", 0, null, 0 ], "skills": [0,5]},
- {"ability": ["UNLIMITED_RETALIATIONS", 0, null, 0 ], "skills": [1, 2]},
- {"ability": ["ATTACKS_ALL_ADJACENT", 0, null, 0 ], "skills": [1, 3]},
- {"ability": ["NONE", 30, null, 0 ], "skills": [1, 4]}, // TODO: Implement bonus that gives chance to completely block one enemy attack per turn
- {"ability": ["FIRE_SHIELD", 1, null, 0 ], "skills": [1, 5]},
- {"ability": ["ADDITIONAL_ATTACK", 1, null, 0 ], "skills": [2, 3]},
- {"ability": ["HP_REGENERATION", 50, null, 0 ], "skills": [2, 4]},
- {"ability": ["SPELL_AFTER_ATTACK", 30, "spell.paralyze", 0 ], "skills": [2, 5]},
- {"ability": ["JOUSTING", 5, null, 0 ], "skills": [3, 4]},
- {"ability": ["DEATH_STARE", 1, "deathStareCommander", 0 ], "skills": [3,5]},
- {"ability": ["FLYING", 0, "movementFlying", 0 ], "skills": [4,5]}
+ {
+ "ability": [{ "type" : "ENEMY_DEFENCE_REDUCTION", "val": 50 }],
+ "skills": [0, 1]
+ },
+ {
+ "ability": [{ "type" : "FEAR", "val": 0 }],
+ "skills": [0, 2]
+ },
+ {
+ "ability": [{ "type" : "ALWAYS_MAXIMUM_DAMAGE", "val": 0 }],
+ "skills": [0, 3]
+ },
+ {
+ "ability": [
+ { "type" : "SHOOTER", "val": 0 },
+ { "type" : "NO_MELEE_PENALTY", "val": 0 }
+ ],
+ "skills": [0, 4]
+ },
+ {
+ "ability": [{ "type" : "BLOCKS_RETALIATION", "val": 0 }],
+ "skills": [0,5]
+ },
+ {
+ "ability": [{ "type" : "UNLIMITED_RETALIATIONS", "val": 0 }],
+ "skills": [1, 2]
+ },
+ {
+ "ability": [{ "type" : "ATTACKS_ALL_ADJACENT", "val": 0 }],
+ "skills": [1, 3]
+ },
+ {
+ // TODO: Implement bonus that gives chance to completely block one enemy attack per turn
+ "ability": [{ "type" : "NONE", "val": 30 }],
+ "skills": [1, 4]
+ },
+ {
+ "ability": [{ "type" : "FIRE_SHIELD", "val": 1 }],
+ "skills": [1, 5]
+ },
+ {
+ "ability": [{ "type" : "ADDITIONAL_ATTACK", "val": 1 }],
+ "skills": [2, 3]
+ },
+ {
+ "ability": [{ "type" : "HP_REGENERATION", "val": 50 }],
+ "skills": [2, 4]
+ },
+ {
+ "ability": [{ "type" : "SPELL_AFTER_ATTACK", "val": 30, "subtype" : "spell.paralyze" }],
+ "skills": [2, 5]
+ },
+ {
+ "ability": [{ "type" : "JOUSTING", "val": 5 }],
+ "skills": [3, 4]
+ },
+ {
+ "ability": [{ "type" : "DEATH_STARE", "val": 1, "subtype" : "deathStareCommander" }],
+ "skills": [3,5]
+ },
+ {
+ "ability": [{ "type" : "FLYING", "val": 0, "subtype" : "movementFlying" }],
+ "skills": [4,5]
+ }
]
+
+
}
diff --git a/config/creatures/neutral.json b/config/creatures/neutral.json
index 9dcd9f10c..8f16b2e76 100644
--- a/config/creatures/neutral.json
+++ b/config/creatures/neutral.json
@@ -110,7 +110,7 @@
"fearless" :
{
"type" : "FEARFUL",
- "valueType" : "INDEPENDENT_MAX",
+ "valueType" : "INDEPENDENT_MIN",
"description" : "PLACEHOLDER",
"val" : 0
diff --git a/config/factions/tower.json b/config/factions/tower.json
index 5ce5bc6a7..e3194218e 100644
--- a/config/factions/tower.json
+++ b/config/factions/tower.json
@@ -202,6 +202,7 @@
"produce" : { "gold": 5000 },
"bonuses": [
{ "type": "PRIMARY_SKILL", "subtype": "primarySkill.knowledge", "val": 15 },
+ { "type": "COMBAT_MANA_BONUS", "val": 150 },
{ "type": "FULL_MAP_SCOUTING" }
]
},
diff --git a/docs/images/Bonus_System_Nodes.gv b/docs/images/Bonus_System_Nodes.gv
index c72e6aea5..fdcea94b1 100644
--- a/docs/images/Bonus_System_Nodes.gv
+++ b/docs/images/Bonus_System_Nodes.gv
@@ -23,7 +23,7 @@ digraph mygraph {
"Team" [
label =<
| Team |
- | Propagator: TEAM_PROPAGATOR |
+ | Propagator: TEAM |
| C++ Class: TeamState |
Per-team node. Game will put players without team into a team with a single player |
>
@@ -31,7 +31,7 @@ digraph mygraph {
"Player" [
label =<
| Player |
- | Propagator: PLAYER_PROPAGATOR |
+ | Propagator: PLAYER |
| C++ Class: CPlayerState |
Per-player team. All objects owned by a player belong to such node |
>
@@ -50,13 +50,6 @@ digraph mygraph {
Contains per-hero global bonuses, specialty bonuses, primary and secondary skill bonuses, campaign primary skill bonus |
>
]
- "Combat" [
- label =<
- | Combat |
- | Propagator: BATTLE_WIDE |
- Node that contains both sides of a combat Anything propagated to this node will affect both sides in combat |
-
>
- ]
};
subgraph rankedHeroes {
@@ -68,11 +61,11 @@ digraph mygraph {
Hero that is currently visiting owned or allied town |
>
]
- "Garrisoned Hero" [
+ "Hero defending town" [
fillcolor="#80808080"
label =<
- | Garrisoned Hero |
- Hero that is currently placed in a garrison of owned town |
+ | Hero defending town |
+ Hero that is currently fighting on a defending side in a siege |
>
]
"Wandering Hero" [
@@ -111,6 +104,7 @@ digraph mygraph {
fillcolor="#80808080"
label =<
| Town |
+ | Propagator: TOWN |
| C++ Class: CGTownInstance |
| Represents a town on map. |
| Contains town building bonuses |
@@ -140,7 +134,7 @@ digraph mygraph {
"Town and visiting hero" [
label =<
| Town and Visiting Hero |
- | Propagator: VISITED_TOWN_AND_VISITOR |
+ | Propagator: TOWN_AND_VISITOR |
| C++ Class: CTownAndVisitingHero |
Helper node that exists solely to propagate bonuses to both town and visiting hero |
| Note: Neutral towns are attached to global node instead |
@@ -190,6 +184,7 @@ digraph mygraph {
"Army" [
label =<
| Army |
+ | Propagator: ARMY |
| C++ Class: CArmedInstance |
Represents any object that can hold army, such as town, hero, mines, garrisons, wandering monsters |
| Contain anti-magic garrison bonus, faction mixing morale bonus |
@@ -253,13 +248,13 @@ digraph mygraph {
"Creature Type" -> "Summon in Combat"
"Creature Type" -> "Unit in Army"
- "Town" -> "Garrisoned Hero"
+ "Town" -> "Hero defending town"
"Town" -> "Army"
"Neutral Army" -> "Army"
"Owned Army" -> "Army"
"Visiting Hero" -> "Hero"
- "Garrisoned Hero" -> "Hero"
+ "Hero defending town" -> "Hero"
"Wandering Hero" -> "Hero"
"Hero" -> "Army"
}
diff --git a/docs/images/Bonus_System_Nodes.svg b/docs/images/Bonus_System_Nodes.svg
index 9b1f71d6f..0e8c903b0 100644
--- a/docs/images/Bonus_System_Nodes.svg
+++ b/docs/images/Bonus_System_Nodes.svg
@@ -4,536 +4,542 @@
-