瀏覽代碼

Fixed clone damage

Ivan Savenko 2 年之前
父節點
當前提交
a6622b5896
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      lib/CStack.cpp
  2. 1 1
      lib/battle/CUnitState.cpp

+ 1 - 0
lib/CStack.cpp

@@ -201,6 +201,7 @@ void CStack::prepareAttacked(BattleStackAttacked & bsa, vstd::RNG & rand, std::s
 {
 	auto initialCount = customState->getCount();
 
+	// compute damage and update bsa.damageAmount
 	customState->damage(bsa.damageAmount);
 
 	bsa.killedAmount = initialCount - customState->getCount();

+ 1 - 1
lib/battle/CUnitState.cpp

@@ -823,7 +823,7 @@ void CUnitState::damage(int64_t & amount)
 		// block ability should not kill clone (0 damage)
 		if(amount > 0)
 		{
-			amount = 1;//TODO: what should be actual damage against clone?
+			amount = 0;
 			health.reset();
 		}
 	}