Selaa lähdekoodia

Added graphics for GENERAL_DAMAGE_REDUCTION bonus. Files are now in vcmi mod.

DjWarmonger 11 vuotta sitten
vanhempi
sitoutus
b518fd6ea6
4 muutettua tiedostoa jossa 20 lisäystä ja 2 poistoa
  1. 2 1
      ChangeLog
  2. 6 0
      config/bonuses_texts.json
  3. 11 0
      lib/CBonusTypeHandler.cpp
  4. 1 1
      lib/GameConstants.h

+ 2 - 1
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

+ 6 - 0
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",

+ 11 - 0
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: 
 		{

+ 1 - 1
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;