瀏覽代碼

Initialize the change.

toneyisnow 5 年之前
父節點
當前提交
0fe3c0a569
共有 6 個文件被更改,包括 32 次插入15 次删除
  1. 1 0
      client/battle/CBattleInterface.cpp
  2. 9 1
      config/bonuses.json
  3. 12 6
      config/bonuses_texts.json
  4. 5 5
      config/creatures/tower.json
  5. 1 0
      lib/HeroBonus.cpp
  6. 4 3
      lib/HeroBonus.h

+ 1 - 0
client/battle/CBattleInterface.cpp

@@ -2237,6 +2237,7 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
 				{
 					if (!(shere->hasBonusOfType(Bonus::UNDEAD)
 						|| shere->hasBonusOfType(Bonus::NON_LIVING)
+						|| shere->hasBonusOfType(Bonus::GARGOYLE)
 						|| shere->summoned
 						|| shere->isClone()
 						|| shere->hasBonusOfType(Bonus::SIEGE_WEAPON)

+ 9 - 1
config/bonuses.json

@@ -230,7 +230,15 @@
 			"icon":  "zvs/Lib1.res/E_TROLL"
 		}
 	},
-	
+
+	"GARGOYLE":
+	{
+		"graphics":
+		{
+			"icon":  "zvs/Lib1.res/NonLiving"	// Just use the NonLiving icon for now
+		}
+	},
+
 	"GENERAL_DAMAGE_REDUCTION":
 	{
 		"graphics":

+ 12 - 6
config/bonuses_texts.json

@@ -144,12 +144,6 @@
 		"description": "Ignores part of Defence for the attack"
 	},
 
-	"GENERAL_DAMAGE_REDUCTION":
-	{
-		"name": "Reduce Damage (${val}%)",
-		"description": "Reduces physical damage from ranged or melee"
-	},
-
 	"FIRE_IMMUNITY":
 	{
 		"name": "Fire immunity",
@@ -198,6 +192,18 @@
 		"description": "May Regenerate to full Health"
 	},
 
+	"GARGOYLE":
+	{
+		"name": "Gargoyle",
+		"description": "Cannot be rised or healed"
+	},
+
+	"GENERAL_DAMAGE_REDUCTION":
+	{
+		"name": "Reduce Damage (${val}%)",
+		"description": "Reduces physical damage from ranged or melee"
+	},
+
 	"HATE":
 	{
 		"name": "Hates ${subtype.creature}",

+ 5 - 5
config/creatures/tower.json

@@ -51,9 +51,9 @@
 		"faction": "tower",
 		"abilities":
 		{
-			"nonliving" :
+			"gargoyle" :
 			{
-				"type" : "NON_LIVING"
+				"type" : "GARGOYLE"
 			}
 		},
 		"upgrades": ["obsidianGargoyle"],
@@ -77,9 +77,9 @@
 		"faction": "tower",
 		"abilities":
 		{
-			"nonliving" :
+			"gargoyle" :
 			{
-				"type" : "NON_LIVING"
+				"type" : "GARGOYLE"
 			}
 		},
 		"graphics" :
@@ -392,7 +392,7 @@
 			{
 				"type" : "MIND_IMMUNITY"
 			},
-			"hateArchAngels" : 
+			"hateBlackDragon" : 
 			{
 				"type" : "HATE",
 				"subtype" : "creature.blackDragon",

+ 1 - 0
lib/HeroBonus.cpp

@@ -643,6 +643,7 @@ bool IBonusBearer::isLiving() const //TODO: theoreticaly there exists "LIVING" b
 	static const std::string cachingStr = "IBonusBearer::isLiving";
 	static const CSelector selector = Selector::type(Bonus::UNDEAD)
 		.Or(Selector::type(Bonus::NON_LIVING))
+		.Or(Selector::type(Bonus::GARGOYLE))
 		.Or(Selector::type(Bonus::SIEGE_WEAPON));
 
 	return !hasBonus(selector, cachingStr);

+ 4 - 3
lib/HeroBonus.h

@@ -174,8 +174,9 @@ public:
 	BONUS_NAME(TWO_HEX_ATTACK_BREATH) /*eg. dragons*/	\
 	BONUS_NAME(SPELL_DAMAGE_REDUCTION) /*eg. golems; value - reduction in %, subtype - spell school; -1 - all, 0 - air, 1 - fire, 2 - water, 3 - earth*/ \
 	BONUS_NAME(NO_WALL_PENALTY)							\
-	BONUS_NAME(NON_LIVING) /*eg. gargoyle*/				\
-	BONUS_NAME(RANDOM_SPELLCASTER) /*eg. master genie, val - level*/ \
+	BONUS_NAME(NON_LIVING) /*eg. golems, cannot be rised or healed, only neutral morale */				\
+    BONUS_NAME(GARGOYLE) /* gargoyle is special than NON_LIVING, cannot be rised or healed */ \
+    BONUS_NAME(RANDOM_SPELLCASTER) /*eg. master genie, val - level*/ \
 	BONUS_NAME(BLOCKS_RETALIATION) /*eg. naga*/			\
 	BONUS_NAME(SPELL_IMMUNITY) /*subid - spell id*/		\
 	BONUS_NAME(MANA_CHANNELING) /*value in %, eg. familiar*/ \
@@ -271,7 +272,7 @@ public:
 	BONUS_NAME(DESTRUCTION) /*kills extra units after hit, subtype = 0 - kill percentage of units, 1 - kill amount, val = chance in percent to trigger, additional info - amount/percentage to kill*/ \
 	BONUS_NAME(SPECIAL_CRYSTAL_GENERATION) /*crystal dragon crystal generation*/ \
 	BONUS_NAME(NO_SPELLCAST_BY_DEFAULT) /*spellcast will not be default attack option for this creature*/ \
-
+	
 	/* end of list */