From b518fd6ea63934d4ca74e310485bb7149bcf8404 Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Tue, 28 Oct 2014 19:04:34 +0100 Subject: [PATCH] Added graphics for GENERAL_DAMAGE_REDUCTION bonus. Files are now in vcmi mod. --- ChangeLog | 3 ++- config/bonuses_texts.json | 6 ++++++ lib/CBonusTypeHandler.cpp | 11 +++++++++++ lib/GameConstants.h | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9433827ec..4921d696e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -0.96 -> 0.next +0.96 -> 0.97 GENERAL: * VCMI can now be compiled with SDL2 * (windows) Moved VCMI data directory from '%userprofile%\vcmi' to '%userprofile%\Documents\My Games\vcmi' @@ -17,6 +17,7 @@ GRAPHICS: * Better upscaling when running in fullscreen mode. * New creature/commader window * New resolutions and bonus icons are now part of a separate mod +* Added graphics for GENERAL_DAMAGE_REDUCTION bonus (Kuririn) RANDOM MAP GENERATOR: * Random map generator now creates complete and playable maps, should match original RMG diff --git a/config/bonuses_texts.json b/config/bonuses_texts.json index 359b39770..ffd8ae1e3 100644 --- a/config/bonuses_texts.json +++ b/config/bonuses_texts.json @@ -126,6 +126,12 @@ "description": "Reduces Defense for one attack" }, + "GENERAL_DAMAGE_REDUCTION": + { + "name": "Reduce Damage (${val}%)", + "description": "Reduces physical damage" + }, + "FIRE_IMMUNITY": { "name": "Immune to Fire", diff --git a/lib/CBonusTypeHandler.cpp b/lib/CBonusTypeHandler.cpp index 1f18363ae..259d9f327 100644 --- a/lib/CBonusTypeHandler.cpp +++ b/lib/CBonusTypeHandler.cpp @@ -232,6 +232,17 @@ std::string CBonusTypeHandler::bonusToGraphics(const Bonus* bonus) const } break; } + case Bonus::GENERAL_DAMAGE_REDUCTION: + { + switch (bonus->subtype) + { + case 0: + fileName = "DamageReductionMelee.bmp"; break; + case 1: + fileName = "DamageReductionRanged.bmp"; break; + } + break; + } default: { diff --git a/lib/GameConstants.h b/lib/GameConstants.h index e612038dc..3e036cb49 100644 --- a/lib/GameConstants.h +++ b/lib/GameConstants.h @@ -14,7 +14,7 @@ namespace GameConstants { - const std::string VCMI_VERSION = "VCMI 0.96b"; + const std::string VCMI_VERSION = "VCMI 0.96c"; const int BFIELD_WIDTH = 17; const int BFIELD_HEIGHT = 11;