#include "AttackTargetGoalEvaluator.h" #include "../EntityBrain/AttackSystem.h" #include "ArcanistGoalTypes.h" #include "GoalThink.h" //#include "../Raven_ObjectEnumerations.h" //#include "misc/cgdi.h" //#include "misc/Stream_Utility_Functions.h" //#include "Raven_Feature.h" //#include "debug/DebugConsole.h" //------------------ CalculateDesirability ------------------------------------ // // returns a value between 0 and 1 that indicates the Rating of a bot (the // higher the score, the stronger the bot). //----------------------------------------------------------------------------- float AttackTargetGoalEvaluator::CalculateDesirability(Vehicle* Bot) { float Desirability = 0.0; // only do the calculation if there is a target present if (Bot->getTargetSys()->isTargetPresent()) { const float Tweaker = 1.0; /* //MJ Notes for future - If I bring in flee due to low health, will need // to change this so that it doesnt outweigh flee Desirability = Tweaker * Raven_Feature::Health(Bot) * Raven_Feature::TotalWeaponStrength(Bot); */ Desirability = Tweaker; // bias the value according to the personality of the bot Desirability *= m_CharacterBias; } return Desirability; } //----------------------------- SetGoal --------------------------------------- //----------------------------------------------------------------------------- void AttackTargetGoalEvaluator::SetGoal(Vehicle* Bot) { Bot->getBrain()->AddGoalAttackTarget(); }