From 5252e2aefebeea11936565f8582247d0c792c7fc Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Mon, 4 Mar 2013 18:33:58 +0000 Subject: [PATCH] Added few more icons for creature abilities. Graphics here http://forum.vcmi.eu/viewtopic.php?p=8715#8715 --- config/bonusnames.json | 2 ++ config/creatures/neutral.json | 1 + lib/CCreatureSet.cpp | 9 +++++++++ lib/GameConstants.h | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/config/bonusnames.json b/config/bonusnames.json index 38af269c3..a3ecb8e8b 100644 --- a/config/bonusnames.json +++ b/config/bonusnames.json @@ -58,6 +58,8 @@ { "id": "SPELLCASTER", "name": "Spellcaster (%s)", "description": "Can cast spells" }, { "id": "ENCHANTER", "name": "Enchanter (%s)", "description": "Casts mass spell every turn" }, { "id": "ENCHANTED", "name": "Enchanted (%s)", "description": "Affected by permanent spell" }, + { "id": "FIRE_SHIELD", "name": "Fire Shield (%d%)", "description": "Reflects melee damage" }, + { "id": "MAGIC_MIRROR", "name": "Magic Mirror (%d%)", "description": "Chance to reflect hostile spell" }, { "id": "RANDOM_SPELLCASTER", "name": "Random spellcaster", "description": "Can cast random spell" }, { "id": "DAEMON_SUMMONING", "name": "Summoner (%s)", "description": "Can rise creatures from corpses" } ] diff --git a/config/creatures/neutral.json b/config/creatures/neutral.json index f3f09cff6..62168f948 100644 --- a/config/creatures/neutral.json +++ b/config/creatures/neutral.json @@ -92,6 +92,7 @@ "level": 8, "faction": "neutral", "abilities": [ [ "DRAGON_NATURE", 0, 0, 0 ], //faerie dragon is a dragon + [ "MAGIC_MIRROR", 30, 0, 0 ] [ "CASTS", 5, 0, 0 ], [ "CREATURE_SPELL_POWER", 500, 0, 0], //5 spell power per dragon [ "SPELLCASTER", 2, "spell.magicArrow", 10 ], diff --git a/lib/CCreatureSet.cpp b/lib/CCreatureSet.cpp index a651037d1..b27a08af4 100644 --- a/lib/CCreatureSet.cpp +++ b/lib/CCreatureSet.cpp @@ -661,6 +661,7 @@ std::string CStackInstance::bonusToString(Bonus *bonus, bool description) const case Bonus::REBIRTH: case Bonus::DEATH_STARE: case Bonus::LIFE_DRAIN: + case Bonus::FIRE_SHIELD: boost::algorithm::replace_first(text, "%d", boost::lexical_cast(valOfBonuses(Selector::typeSubtype(bonus->type, bonus->subtype)))); break; case Bonus::HATE: @@ -883,6 +884,14 @@ std::string CStackInstance::bonusToGraphics(Bonus *bonus) const fileName = "ManaDrain.bmp"; break; case Bonus::LIFE_DRAIN: fileName = "DrainLife.bmp"; break; + case Bonus::FIRE_SHIELD: + fileName = "FireShield.bmp"; break; + case Bonus::MAGIC_MIRROR: + fileName = "MagicMirror.bmp"; break; + case Bonus::NON_LIVING: + fileName = "NonLiving.bmp"; break; + case Bonus::SPELL_LIKE_ATTACK: + fileName = "SpellLikeAttack.bmp"; break; } if(!fileName.empty() && !fullPath) fileName = "zvs/Lib1.res/" + fileName; diff --git a/lib/GameConstants.h b/lib/GameConstants.h index 09b316105..0f7bdec4f 100644 --- a/lib/GameConstants.h +++ b/lib/GameConstants.h @@ -741,7 +741,7 @@ public: PENDANT_OF_SORCERY = 150, BOOTS_OF_HASTE = 151, BOW_OF_SEEKING = 152, - DRAGON_EYE_RING = 153, + DRAGON_EYE_RING = 153 //HARDENED_SHIELD = 154, //SLAVAS_RING_OF_POWER = 155 };