浏览代码

- Compile fix
- Fixed Basilisk spawning at Hive
- Fixed double-shot of Marksman

DjWarmonger 12 年之前
父节点
当前提交
b554af25d3
共有 4 个文件被更改,包括 11 次插入2 次删除
  1. 1 1
      AI/EmptyAI/CEmptyAI.cpp
  2. 1 1
      config/bankconfig.json
  3. 7 0
      config/creatures/castle.json
  4. 2 0
      lib/BattleState.cpp

+ 1 - 1
AI/EmptyAI/CEmptyAI.cpp

@@ -5,7 +5,7 @@ void CEmptyAI::init(CCallback * CB)
 {
 	cb = CB;
 	human=false;
-	playerID=cb->getMyColor();
+	playerID = *cb->getMyColor();
 	std::cout << "EmptyAI initialized." << std::endl;
 }
 void CEmptyAI::yourTurn()

+ 1 - 1
config/bankconfig.json

@@ -286,7 +286,7 @@
 				{
 					"chance": 30,
 					"guards": [ { "number": 30, "id": 105} ],
-					"upgrade_chance": 30,
+					"upgrade_chance": 0,
 					"combat_value": 154,
 					"reward_creatures": [ { "number": 4, "id": 108 } ],
 					"value": 3200,

+ 7 - 0
config/creatures/castle.json

@@ -69,6 +69,13 @@
 		"id": 3,
 		"level": 2,
 		"faction": "castle",
+		"abilities": [
+						{
+							"type": "ADDITIONAL_ATTACK",
+							"val" : 1,
+							"effectRange": "ONLY_DISTANCE_FIGHT"
+						}
+					],	
 		"graphics" :
 		{
 			"animation": "CHCBOW.DEF",

+ 2 - 0
lib/BattleState.cpp

@@ -883,6 +883,8 @@ void CStack::postInit()
 	assert(type);
 	assert(getParentNodes().size());
 
+	//FIXME: the following should take into account ONLY_ENEMY_ARMY bonus range
+
 	firstHPleft = MaxHealth();
 	shots = getCreature()->valOfBonuses(Bonus::SHOTS);
 	counterAttacks = 1 + valOfBonuses(Bonus::ADDITIONAL_RETALIATION);