瀏覽代碼

Add some useful comments

Dydzio 1 年之前
父節點
當前提交
6119898932
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      client/battle/BattleActionsController.cpp

+ 5 - 1
client/battle/BattleActionsController.cpp

@@ -998,9 +998,13 @@ void BattleActionsController::activateStack()
 				};
 				bool hasShootSecondaryAction = std::any_of(possibleActions.begin() + 1, possibleActions.end(), shootActionPredicate);
 
-				if(hasShootSecondaryAction)
+				if(hasShootSecondaryAction) //casters may have shooting capabilities, for example storm elementals
 					actionsToSelect.emplace_back(PossiblePlayerBattleAction::SHOOT);
 
+				/* TODO: maybe it would also make sense to check spellcast as non-top priority action ("NO_SPELLCAST_BY_DEFAULT" bonus)?
+				 * it would require going beyond this "if" block for melee casters
+				 * F button helps, but some mod creatures may have that bonus and more than 1 castable spell */
+
 				actionsToSelect.emplace_back(PossiblePlayerBattleAction::ATTACK); //always allow melee attack as last option
 			}
 		}