Browse Source

Moved the rest of creatures abilities to cr_abils.txt.

Frank Zago 16 years ago
parent
commit
7d9da8974d
2 changed files with 78 additions and 92 deletions
  1. 78 30
      config/cr_abils.txt
  2. 0 62
      hch/CCreatureHandler.cpp

+ 78 - 30
config/cr_abils.txt

@@ -42,7 +42,15 @@
 +  37 RANDOM_GENIE_SPELLCASTER 0 0 0  		//master genies cast spells
 +  38 BLOCKS_RETALIATION 0 0 0		//nagas block retaliation
 +  39 BLOCKS_RETALIATION 0 0 0  	//naga queens block retaliation
++  40 SPELL_IMMUNITY 0 50 0			//giants are immune to mind spells (sorrow)
++  40 SPELL_IMMUNITY 0 59 0			//giants are immune to mind spells (berserk)
++  40 SPELL_IMMUNITY 0 60 0			//giants are immune to mind spells (hypnotize)
++  40 SPELL_IMMUNITY 0 61 0			//giants are immune to mind spells (forgetfulness)
 +  41 HATE 0 83 0		   	 		//titans hate black dragons
++  41 SPELL_IMMUNITY 0 50 0			//titans are immune to mind spells (sorrow)
++  41 SPELL_IMMUNITY 0 59 0			//titans are immune to mind spells (berserk)
++  41 SPELL_IMMUNITY 0 60 0			//titans are immune to mind spells (hypnotize)
++  41 SPELL_IMMUNITY 0 61 0			//titans are immune to mind spells (forgetfulness)
 +  43 MANA_CHANNELING 20 0 0 		//familiars
 +  45 SPELL_LIKE_ATTACK 21 0 0 		//magogs fire with fireballs
 +  47 BLOCKS_RETALIATION 0 0 0 		//cerberus
@@ -79,43 +87,83 @@
 +  67 SPELL_AFTER_ATTACK 0 42 20 	//dread knights
 +  68 ENEMY_MORALE_DECREASING -1 0 0		//bone dragon
 +  69 ENEMY_MORALE_DECREASING -1 0 0 		//ghost dragon
-+  69 SPELL_AFTER_ATTACK 0 75 20   //ghost dragon
-+  70 SPELL_IMMUNITY 0 62 0	  	   //troglodytes are immune to blind
-+  71 SPELL_IMMUNITY 0 62 0		   //infernal troglodytes are immune to blind
-+  72 RETURN_AFTER_STRIKE 0 0 0	   //Harpies return after attack
-+  73 BLOCKS_RETALIATION 0 0 0	   //Harpy Hags
-+  73 RETURN_AFTER_STRIKE 0 0 0	   //Harpy Hags return after attack
-+  76 SPELL_AFTER_ATTACK 0 70 220  //medusas
-+  77 SPELL_AFTER_ATTACK 0 70 220  //medusa queens
-+  78 SELF_MORALE 0 0 0	   	  	   //minotaurs
-+  79 SELF_MORALE 0 0 0			   //minotaur kings
-+  81 SPELL_AFTER_ATTACK 0 74 20   //scorpicore
-+  82 LEVEL_SPELL_IMMUNITY 3 0 0   //red dragon's spell immunity
-+  83 LEVEL_SPELL_IMMUNITY 5 0 0   //black dragon's spell immunity
++  69 SPELL_AFTER_ATTACK 0 75 20   	//ghost dragon
++  70 SPELL_IMMUNITY 0 62 0	  	   	//troglodytes are immune to blind
++  71 SPELL_IMMUNITY 0 62 0		   	//infernal troglodytes are immune to blind
++  72 RETURN_AFTER_STRIKE 0 0 0	   	//Harpies return after attack
++  73 BLOCKS_RETALIATION 0 0 0	   	//Harpy Hags
++  73 RETURN_AFTER_STRIKE 0 0 0	   	//Harpy Hags return after attack
++  76 SPELL_AFTER_ATTACK 0 70 220  	//medusas
++  77 SPELL_AFTER_ATTACK 0 70 220  	//medusa queens
++  78 SELF_MORALE 0 0 0	   	  	   	//minotaurs
++  79 SELF_MORALE 0 0 0			   	//minotaur kings
++  81 SPELL_AFTER_ATTACK 0 74 20   	//scorpicore
++  82 LEVEL_SPELL_IMMUNITY 3 0 0   	//red dragon's spell immunity
++  83 LEVEL_SPELL_IMMUNITY 5 0 0   	//black dragon's spell immunity
 +  87 ADDITIONAL_ATTACK 1 0 0		//wolf raider
-+  91 SPELLCASTER 2 43 6   	   	   //ogre magi cast bloodlust
-+  93 SPELL_AFTER_ATTACK 0 77 20   //thunderbirds
++  91 SPELLCASTER 2 43 6   	   	   	//ogre magi cast bloodlust
++  93 SPELL_AFTER_ATTACK 0 77 20   	//thunderbirds
 +  96 ENEMY_DEFENCE_REDUCTION 40 0 0		//behemots
 +  97 ENEMY_DEFENCE_REDUCTION 80 0 0		//ancient behemots
-+ 103 SPELL_AFTER_ATTACK 0 79 10   //mighty gorgons
-+ 104 SPELL_AFTER_ATTACK 0 78 100  //serpent fly
-+ 105 SPELL_AFTER_ATTACK 0 45 100  //mighty gorgons
-+ 105 SPELL_AFTER_ATTACK 0 78 100  //dragon fly
-+ 106 SPELL_AFTER_ATTACK 0 70 20   //basilisks
-+ 107 SPELL_AFTER_ATTACK 0 70 20   //greater basilisks
-+ 109 SPELL_AFTER_ATTACK 0 71 20   //Wyvern Monarch
-+ 110 ATTACKS_ALL_ADJACENT 0 0 0   //hydras
-+ 110 BLOCKS_RETALIATION 0 0 0 	   //hydras
-+ 111 ATTACKS_ALL_ADJACENT 0 0 0   //chaos hydras
-+ 111 BLOCKS_RETALIATION 0 0 0 	   //chaos hydras
++ 103 SPELL_AFTER_ATTACK 0 79 10   	//mighty gorgons
++ 104 SPELL_AFTER_ATTACK 0 78 100  	//serpent fly
++ 105 SPELL_AFTER_ATTACK 0 45 100  	//mighty gorgons
++ 105 SPELL_AFTER_ATTACK 0 78 100  	//dragon fly
++ 106 SPELL_AFTER_ATTACK 0 70 20   	//basilisks
++ 107 SPELL_AFTER_ATTACK 0 70 20   	//greater basilisks
++ 109 SPELL_AFTER_ATTACK 0 71 20   	//Wyvern Monarch
++ 110 ATTACKS_ALL_ADJACENT 0 0 0   	//hydras
++ 110 BLOCKS_RETALIATION 0 0 0 	   	//hydras
++ 111 ATTACKS_ALL_ADJACENT 0 0 0   	//chaos hydras
++ 111 BLOCKS_RETALIATION 0 0 0 	   	//chaos hydras
++ 112 MORE_DAMAGE_FROM_SPELL 100 17 0	  	//air elementals are vulnerable to lightning bolt
++ 112 MORE_DAMAGE_FROM_SPELL 100 19 0		//air elementals are vulnerable to chain lightning
++ 112 NON_LIVING 0 0 0		 	 	//air elementals are non-living
++ 112 SPELL_IMMUNITY 0 23 0			//air elementals are immune to meteor shower
++ 112 SPELL_IMMUNITY 0 50 0			//air elementals are immune to mind spells (sorrow)
++ 112 SPELL_IMMUNITY 0 59 0			//air elementals are immune to mind spells (berserk)
++ 112 SPELL_IMMUNITY 0 60 0			//air elementals are immune to mind spells (hypnotize)
++ 112 SPELL_IMMUNITY 0 61 0			//air elementals are immune to mind spells (forgetfulness)
++ 113 MORE_DAMAGE_FROM_SPELL 100 23 0		//earth elementals are vulnerable to meteor shower
++ 113 NON_LIVING 0 0 0		 	 	//earth elementals are non-living
++ 113 SPELL_IMMUNITY 0 17 0			//earth elementals are immune to lightning bolt
++ 113 SPELL_IMMUNITY 0 19 0			//earth elementals are immune to chain lightning
++ 113 SPELL_IMMUNITY 0 50 0			//earth elementals are immune to mind spells (sorrow)
++ 113 SPELL_IMMUNITY 0 59 0			//earth elementals are immune to mind spells (berserk)
++ 113 SPELL_IMMUNITY 0 60 0			//earth elementals are immune to mind spells (hypnotize)
++ 113 SPELL_IMMUNITY 0 61 0			//earth elementals are immune to mind spells (forgetfulness)
++ 114 FIRE_IMMUNITY 0 0 0			//fire elementals are immune to fire spells
++ 114 MORE_DAMAGE_FROM_SPELL 100 16 0		//fire elementals are vulnerable to ice bolt
++ 114 MORE_DAMAGE_FROM_SPELL 100 20 0		//fire elementals are vulnerable to frost ring
++ 114 NON_LIVING 0 0 0		 	 	//fire elementals are non-living
++ 114 SPELL_IMMUNITY 0 50 0			//fire elementals are immune to mind spells (sorrow)
++ 114 SPELL_IMMUNITY 0 59 0			//fire elementals are immune to mind spells (berserk)
++ 114 SPELL_IMMUNITY 0 60 0			//fire elementals are immune to mind spells (hypnotize)
++ 114 SPELL_IMMUNITY 0 61 0			//fire elementals are immune to mind spells (forgetfulness)
 + 115 DOUBLE_WIDE 0 0 0				//water elemental should be treated as double-wide
++ 115 MORE_DAMAGE_FROM_SPELL 100 13 0		//water elementals are vulnerable to fire wall
++ 115 MORE_DAMAGE_FROM_SPELL 100 21 0		//water elementals are vulnerable to fireball
++ 115 MORE_DAMAGE_FROM_SPELL 100 22 0		//water elementals are vulnerable to inferno
++ 115 MORE_DAMAGE_FROM_SPELL 100 29 0		//water elementals are vulnerable to fire shield
++ 115 NON_LIVING 0 0 0		 	 	//water elementals are non-living
++ 115 SPELL_IMMUNITY 0 16 0			//water elementals are immune to ice bolt
++ 115 SPELL_IMMUNITY 0 20 0			//water elementals are immune to frost ring
++ 115 SPELL_IMMUNITY 0 50 0			//water elementals are immune to mind spells (sorrow)
++ 115 SPELL_IMMUNITY 0 59 0			//water elementals are immune to mind spells (berserk)
++ 115 SPELL_IMMUNITY 0 60 0			//water elementals are immune to mind spells (hypnotize)
++ 115 SPELL_IMMUNITY 0 61 0			//water elementals are immune to mind spells (forgetfulness)
++ 116 NON_LIVING 0 0 0		 	   	//gold golems are non-living
++ 116 SPELL_DAMAGE_REDUCTION 85 -1 0		//gold golems reduce dmg from spells
++ 117 NON_LIVING 0 0 0				//diamond golems are non-living
++ 117 SPELL_DAMAGE_REDUCTION 95 -1 0		//diamond golems reduce dmg from spells
++ 121 LEVEL_SPELL_IMMUNITY 5 0 0	//magic elementals are immune to all spells
 + 123 DOUBLE_WIDE 0 0 0 			//ice elemental should be treated as double-wide
 + 140 DOUBLE_WIDE 0 0 0 			//boar should be treated as double-wide
 + 142 DOUBLE_WIDE 0 0 0 			//nomads should be treated as double-wide
 + 147 NOT_ACTIVE 0 0 0	   	 		//First Aid Tent //TODO: remove when support is added
 + 148 NOT_ACTIVE 0 0 0				//Ammo Cart
-- 46  FLYING 	  	  				//hell hound doesn't fly
-- 47  FLYING 			  			//cerberus doesn't fly
-- 120 DOUBLE_WIDE 0 0 0				//psychic elemental
-- 121 DOUBLE_WIDE 0 0 0				//magic elemental
+-  46 FLYING		  				//hell hound doesn't fly
+-  47 FLYING			  			//cerberus doesn't fly
+- 120 DOUBLE_WIDE					//psychic elemental
+- 121 DOUBLE_WIDE					//magic elemental
 0

+ 0 - 62
hch/CCreatureHandler.cpp

@@ -472,68 +472,6 @@ void CCreatureHandler::loadCreatures()
 		idToProjectileSpin[id] = spin;
 	}
 	inp2.close();
-
-	//TODO: create a tidy configuration file to control fixing unit abilities
-/*	creatures[115].abilities.push_back(makeCreatureAbility(StackFeature::DOUBLE_WIDE, 0));//water elemental should be treated as double-wide
-	creatures[123].abilities.push_back(makeCreatureAbility(StackFeature::DOUBLE_WIDE, 0));//ice elemental should be treated as double-wide
-	creatures[140].abilities.push_back(makeCreatureAbility(StackFeature::DOUBLE_WIDE, 0));//boar should be treated as double-wide
-	creatures[142].abilities.push_back(makeCreatureAbility(StackFeature::DOUBLE_WIDE, 0));//nomads should be treated as double-wide
-
-	creatures[46].abilities -= StackFeature::FLYING; //hell hound
-	creatures[47].abilities -= StackFeature::FLYING; //cerberus
-*/
-
-	std::vector<int> mindSpells = getMindSpells();
-	for(int g=0; g<mindSpells.size(); ++g)
-	{
-		creatures[40].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, mindSpells[g]); //giants are immune to mind spells
-	}
-	for(int g=0; g<mindSpells.size(); ++g)
-	{
-		creatures[41].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, mindSpells[g]); //titans are immune to mind spells
-	}
-	for(int g=0; g<mindSpells.size(); ++g)
-	{
-		creatures[112].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, mindSpells[g]); //air elementals are immune to mind spells
-	}
-	creatures[112].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, 23); //air elementals are immune to meteor shower
-	creatures[112].abilities += makeCreatureAbility(StackFeature::MORE_DAMAGE_FROM_SPELL, 100, 17); //air elementals are vulnerable to lightning bolt
-	creatures[112].abilities += makeCreatureAbility(StackFeature::MORE_DAMAGE_FROM_SPELL, 100, 19); //air elementals are vulnerable to chain lightning
-	creatures[112].abilities += makeCreatureAbility(StackFeature::NON_LIVING, 0); //air elementals are non-living
-	for(int g=0; g<mindSpells.size(); ++g)
-	{
-		creatures[113].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, mindSpells[g]); //earth elementals are immune to mind spells
-	}
-	creatures[113].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, 17); //earth elementals are immune to lightning bolt
-	creatures[113].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, 19); //earth elementals are immune to chain lightning
-	creatures[113].abilities += makeCreatureAbility(StackFeature::MORE_DAMAGE_FROM_SPELL, 100, 23); //earth elementals are vulnerable to meteor shower
-	creatures[113].abilities += makeCreatureAbility(StackFeature::NON_LIVING, 0); //earth elementals are non-living
-	for(int g=0; g<mindSpells.size(); ++g)
-	{
-		creatures[114].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, mindSpells[g]); //fire elementals are immune to mind spells
-	}
-	creatures[114].abilities += makeCreatureAbility(StackFeature::FIRE_IMMUNITY, 0); //fire elementals are immune to fire spells
-	creatures[114].abilities += makeCreatureAbility(StackFeature::MORE_DAMAGE_FROM_SPELL, 100, 16); //fire elementals are vulnerable to ice bolt
-	creatures[114].abilities += makeCreatureAbility(StackFeature::MORE_DAMAGE_FROM_SPELL, 100, 20); //fire elementals are vulnerable to frost ring
-	creatures[114].abilities += makeCreatureAbility(StackFeature::NON_LIVING, 0); //fire elementals are non-living
-	for(int g=0; g<mindSpells.size(); ++g)
-	{
-		creatures[115].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, mindSpells[g]); //water elementals are immune to mind spells
-	}
-	creatures[115].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, 16); //water elementals are immune to ice bolt
-	creatures[115].abilities += makeCreatureAbility(StackFeature::SPELL_IMMUNITY, 0, 20); //water elementals are immune to frost ring
-	creatures[115].abilities += makeCreatureAbility(StackFeature::MORE_DAMAGE_FROM_SPELL, 100, 13); //water elementals are vulnerable to fire wall
-	creatures[115].abilities += makeCreatureAbility(StackFeature::MORE_DAMAGE_FROM_SPELL, 100, 22); //water elementals are vulnerable to inferno
-	creatures[115].abilities += makeCreatureAbility(StackFeature::MORE_DAMAGE_FROM_SPELL, 100, 21); //water elementals are vulnerable to fireball
-	creatures[115].abilities += makeCreatureAbility(StackFeature::MORE_DAMAGE_FROM_SPELL, 100, 29); //water elementals are vulnerable to fire shield
-	creatures[115].abilities += makeCreatureAbility(StackFeature::NON_LIVING, 0); //water elementals are non-living
-	creatures[116].abilities += makeCreatureAbility(StackFeature::SPELL_DAMAGE_REDUCTION, 85, -1); //gold golems reduce dmg from spells
-	creatures[116].abilities += makeCreatureAbility(StackFeature::NON_LIVING, 0); //gold golems are non-living
-	creatures[117].abilities += makeCreatureAbility(StackFeature::SPELL_DAMAGE_REDUCTION, 95, -1); //diamond golems reduce dmg from spells
-	creatures[117].abilities += makeCreatureAbility(StackFeature::NON_LIVING, 0); //diamond golems are non-living
-	creatures[121].abilities += makeCreatureAbility(StackFeature::LEVEL_SPELL_IMMUNITY, 5); //magic elementals are immune to all spells
-
-	//TODO: the rest of creatures
 }
 
 void CCreatureHandler::loadAnimationInfo()