From 1e2e40b9c009dffa45874a178917fe5f30cf9ca8 Mon Sep 17 00:00:00 2001 From: AlexVinS Date: Tue, 29 Sep 2015 18:11:43 +0300 Subject: [PATCH 1/4] Tweak bonus descriptions, fixes mantiss 2261 --- config/bonuses_texts.json | 144 ++++++++++++++++++++------------------ 1 file changed, 75 insertions(+), 69 deletions(-) diff --git a/config/bonuses_texts.json b/config/bonuses_texts.json index b63f23a34..1ed5b625a 100644 --- a/config/bonuses_texts.json +++ b/config/bonuses_texts.json @@ -1,6 +1,6 @@ // macros: // ${val} - value of bonuses; Selector: type,subtype -// ${subtype.creature} - creature name +// ${subtype.creature} - creature name // ${subtype.spell} - spell name // ${MR} - magic resistance of bearer @@ -11,19 +11,19 @@ "name": "Double Strike", "description": "Attacks twice" }, - + "ADDITIONAL_RETALIATION": { "name": "Additional retaliations", "description": "May Retaliate ${val} extra times" }, - + "AIR_IMMUNITY": { - "name": "Immune to Air", - "description": "" + "name": "Air immunity", + "description": "Immune to all Air school spells" }, - + "ATTACKS_ALL_ADJACENT": { "name": "Attack all around", @@ -35,19 +35,19 @@ "name": "No retaliation", "description": "Enemy cannot Retaliate" }, - + "CATAPULT": { "name": "Catapult", "description": "Attacks siege walls" - }, - + }, + "CHANGES_SPELL_COST_FOR_ALLY": { "name": "Reduce Casting Cost (${val})", "description": "Reduce Casting Cost for hero" }, - + "CHANGES_SPELL_COST_FOR_ENEMY": { "name": "Magic Damper (${val})", @@ -59,31 +59,31 @@ "name": "Immune to Charge", "description": "Immune to Champion charge" }, - + "DAEMON_SUMMONING": { "name": "Summoner (${subtype.creature})", - "description": "Can rise creatures from corpses" + "description": "Can rise creatures from corpses" }, - - "DARKNESS": + + "DARKNESS": { "name": "Darness cover", "description": "Adds ${val} darkness radius" }, - + "DEATH_STARE": { "name": "Death Stare (${val}%)", "description": "${val}% chance to kill single creature" - }, - + }, + "DEFENSIVE_STANCE": { "name": "Defense Bonus", "description": "+${val} Defense when defending" }, - + "DOUBLE_DAMAGE_CHANCE": { "name": "Death Blow", @@ -95,7 +95,7 @@ "name": "Dragon", "description": "Creature has a Dragon Nature" }, - + "DIRECT_DAMAGE_IMMUNITY": { "name": "Direct Damage Immunity", @@ -104,62 +104,63 @@ "EARTH_IMMUNITY": { - "name": "Immune to Earth", - "description": "" + "name": "Earth immunity", + "description": "Immune to all Earth school spells" }, - + "ENCHANTER": { "name": "Enchanter", "description": "Can cast mass ${subtype.spell} every turn" }, - + "ENCHANTED": { "name": "Enchanted", "description": "Affected by permanent ${subtype.spell}" - }, + }, "ENEMY_DEFENCE_REDUCTION": { "name": "Reduce Enemy Defense (${val}%)", "description": "Reduces Defense for one attack" }, - + "GENERAL_DAMAGE_REDUCTION": { "name": "Reduce Damage (${val}%)", "description": "Reduces physical damage" }, - + "FIRE_IMMUNITY": { - "name": "Immune to Fire", - "description": "" + "name": "Fire immunity", + "description": "Immune to all Fire school spells" }, "FIRE_SHIELD": { "name": "Fire Shield (${val}%)", - "description": "Reflects melee damage" + "description": "Reflects melee damage" }, + "FEAR": { "name": "Fear", "description": "Causes Fear on an enemy stack" }, - + "FEARLESS": { "name": "Fearless", "description": "Immune to Fear ability" }, - + "FLYING": { "name": "Fly", "description": "Can Fly (ignores obstacles)" - }, + }, "FREE_SHOOTING": { @@ -172,51 +173,55 @@ "name": "Regeneration", "description": "May Regenerate full Health" }, - + "HATE": { "name": "Hates ${subtype.creature}", "description": "Does ${val}% more damage" }, - + "HEALER": { "name": "Healer", "description": "Heals allied units" }, - + "HP_REGENERATION": { "name": "Regeneration", "description": "Heals ${val} hit points every round" }, + "JOUSTING": { "name": "Champion Charge", "description": "+5% damage per hex travelled" }, - + "KING1": { - "name": "King1" + "name": "King1", + "description": "Vulnerable to basic SLAYER" }, - + "KING2": { - "name": "King2" + "name": "King2", + "description": "Vulnerable to adv. SLAYER" }, - + "KING3": { - "name": "King3" + "name": "King3", + "description":"Vulnerable to expert SLAYER" }, - + "LEVEL_SPELL_IMMUNITY": { "name": "Spell immunity 1-${val}", "description": "Immune to spells levels 1-${val}" }, - + "LIFE_DRAIN": { "name": "Drain life (${val}%)", @@ -228,6 +233,7 @@ "name": "Magic Channel ${val}%", "description": "Gives mana spent by enemy" }, + "MANA_DRAIN": { "name": "Mana Drain", @@ -257,19 +263,19 @@ "name": "No distance penalty", "description": "Full damage from any distance" }, + "NO_MELEE_PENALTY": { "name": "No melee penalty", "description": "Creature has no Melee Penalty" }, - - + "NO_MORALE": { - - }, - + + }, + "NO_WALL_PENALTY": { "name": "No wall penalty", @@ -280,7 +286,7 @@ { "name": "Non living", "description": "Immunity to many effects" - }, + }, "RANDOM_SPELLCASTER": { @@ -298,48 +304,49 @@ "name": "Rebirth (${val}%)", "description": "${val}% of stack will rise after death" }, - + "RETURN_AFTER_STRIKE": { "name": "Attack and Return", "description": "Returns after melee attack" }, - + "SELF_LUCK": { "name": "Positive luck", "description": "Always has Positive Luck" }, - + "SELF_MORALE": { "name": "Positive morale", "description": "Always has Positive Morale" }, - + "SHOOTER": { "name": "Ranged", "description": "Creature can shoot" - }, + }, + "SPELLCASTER": { "name": "Spellcaster", "description": "Can cast ${subtype.spell}" }, - + "SPELL_AFTER_ATTACK": { - "name": "Caster - ${subtype.spell}", - "description": "${val}% chance to cast after attack" + "name": "After attack cast", + "description": "${val}% to cast ${subtype.spell} after attack" }, - + "SPELL_BEFORE_ATTACK": { - "name": "Caster - ${subtype.spell}", - "description": "${val}% chance to cast before attack" + "name": "Before attack cast", + "description": "${val}% to cast ${subtype.spell} before attack" }, - + "SPELL_DAMAGE_REDUCTION": { "name": "Spell Resistance", @@ -348,17 +355,16 @@ "SPELL_IMMUNITY": { - "name": "Immune to ${subtype.spell}", - "description": "" + "name": "Spell immunity", + "description": "Immune to ${subtype.spell}" }, - "SPELL_LIKE_ATTACK": { "name": "Spell-like attack", "description": "Attacks with ${subtype.spell}" }, - + "SPELL_RESISTANCE_AURA": { "name": "Aura of Resistance", @@ -371,8 +377,6 @@ "description": "Breath Attack (2-hex range)" }, - - "THREE_HEADED_ATTACK": { "name": "Three-headed attack", @@ -384,14 +388,16 @@ "name": "Undead", "description": "Creature is Undead" }, + "UNLIMITED_RETALIATIONS": { "name": "Unlimited retaliations", "description": "Retaliate any number of attacks" }, + "WATER_IMMUNITY": { - "name": "Immune to Water", - "description": "" + "name": "Water immunity", + "description": "Immune to all Water school spells" } } From d6f6e9dc9eb699706460de2336d37c533f0411fe Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Thu, 1 Oct 2015 11:06:38 +0200 Subject: [PATCH 2/4] 0.98d release --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 93e676f18..52d54291b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ ADVETURE AI: * Fixed AI trying to go through underground rock * Fixed several cases causing AI wandering aimlessly -* AI can again pick bets artifacts and exchange artifacts between heroes +* AI can again pick best artifacts and exchange artifacts between heroes RANDOM MAP GENERATOR: * Changed fractalization algorithm so it can create cycles From 273392752754a8d766cf3b80c02b5b0c49d8f64d Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Thu, 1 Oct 2015 17:22:07 +0200 Subject: [PATCH 3/4] Version bump. --- lib/GameConstants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/GameConstants.h b/lib/GameConstants.h index 620f32b95..495d75b48 100644 --- a/lib/GameConstants.h +++ b/lib/GameConstants.h @@ -14,7 +14,7 @@ namespace GameConstants { - const std::string VCMI_VERSION = "VCMI 0.98d"; + const std::string VCMI_VERSION = "VCMI 0.98e"; const int BFIELD_WIDTH = 17; const int BFIELD_HEIGHT = 11; From abe02247b59dbec3a2c67f53541c919ce9425a3c Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Fri, 2 Oct 2015 17:28:33 +0200 Subject: [PATCH 4/4] Fixed bank randomization. --- lib/mapObjects/CommonConstructors.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/mapObjects/CommonConstructors.cpp b/lib/mapObjects/CommonConstructors.cpp index 742fb2ab8..8016db848 100644 --- a/lib/mapObjects/CommonConstructors.cpp +++ b/lib/mapObjects/CommonConstructors.cpp @@ -313,17 +313,15 @@ void CBankInstanceConstructor::configureObject(CGObjectInstance * object, CRando si32 selectedChance = rng.nextInt(totalChance - 1); //logGlobal->debugStream() << "Selected chance for bank config is " << selectedChance; + int cumulativeChance = 0; for (auto & node : levels) { - if (selectedChance < node["chance"].Float()) + cumulativeChance += node["chance"].Float(); + if (selectedChance < cumulativeChance) { bank->setConfig(generateConfig(node, rng)); + break; } - else - { - selectedChance -= node["chance"].Float(); - } - } }