mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Nullkiller: fix android
This commit is contained in:
parent
3e9bf9b662
commit
4f51d3c929
@ -11,8 +11,8 @@
|
||||
#include "StdInc.h"
|
||||
#include "ArmyManager.h"
|
||||
#include "../Engine/Nullkiller.h"
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/mapObjects/MapObjects.h"
|
||||
#include "../../../CCallback.h"
|
||||
#include "../../../lib/mapObjects/MapObjects.h"
|
||||
|
||||
class StackUpgradeInfo
|
||||
{
|
||||
|
@ -10,12 +10,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AIUtility.h"
|
||||
#include "../AIUtility.h"
|
||||
|
||||
#include "../../lib/GameConstants.h"
|
||||
#include "../../lib/VCMI_Lib.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/CBuildingHandler.h"
|
||||
#include "../../../lib/GameConstants.h"
|
||||
#include "../../../lib/VCMI_Lib.h"
|
||||
#include "../../../lib/CTownHandler.h"
|
||||
#include "../../../lib/CBuildingHandler.h"
|
||||
|
||||
class Nullkiller;
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "../Engine/Nullkiller.h"
|
||||
#include "lib/mapping/CMap.h" //for victory conditions
|
||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
||||
|
||||
extern boost::thread_specific_ptr<CCallback> cb;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "lib/mapping/CMap.h" //for victory conditions
|
||||
#include "../Engine/Nullkiller.h"
|
||||
|
||||
|
@ -8,11 +8,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "../Engine/Nullkiller.h"
|
||||
#include "../../CCallback.h"
|
||||
#include "../../lib/mapObjects/MapObjects.h"
|
||||
#include "../../lib/CHeroHandler.h"
|
||||
#include "../../../lib/mapObjects/MapObjects.h"
|
||||
#include "../../../lib/CHeroHandler.h"
|
||||
|
||||
SecondarySkillEvaluator HeroManager::wariorSkillsScores = SecondarySkillEvaluator(
|
||||
{
|
||||
|
@ -10,12 +10,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AIUtility.h"
|
||||
#include "../AIUtility.h"
|
||||
|
||||
#include "../../lib/GameConstants.h"
|
||||
#include "../../lib/VCMI_Lib.h"
|
||||
#include "../../lib/CTownHandler.h"
|
||||
#include "../../lib/CBuildingHandler.h"
|
||||
#include "../../../lib/GameConstants.h"
|
||||
#include "../../../lib/VCMI_Lib.h"
|
||||
#include "../../../lib/CTownHandler.h"
|
||||
#include "../../../lib/CBuildingHandler.h"
|
||||
|
||||
class DLL_EXPORT IHeroManager //: public: IAbstractManager
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ const CGObjectInstance * ObjectCluster::calculateCenter() const
|
||||
priority += newPriority;
|
||||
}
|
||||
|
||||
auto closestPair = *vstd::minElementByFun(objects, [&](const std::pair<const CGObjectInstance *, ObjectInfo> & pair) -> int
|
||||
auto closestPair = *vstd::minElementByFun(objects, [&](const std::pair<const CGObjectInstance *, ClusterObjectInfo> & pair) -> int
|
||||
{
|
||||
return pair.first->visitablePos().dist2dSQ(tile);
|
||||
});
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "../Pathfinding/AINodeStorage.h"
|
||||
|
||||
struct ObjectInfo
|
||||
struct ClusterObjectInfo
|
||||
{
|
||||
float priority;
|
||||
float movementCost;
|
||||
@ -22,7 +22,7 @@ struct ObjectInfo
|
||||
struct ObjectCluster
|
||||
{
|
||||
public:
|
||||
std::map<const CGObjectInstance *, ObjectInfo> objects;
|
||||
std::map<const CGObjectInstance *, ClusterObjectInfo> objects;
|
||||
const CGObjectInstance * blocker;
|
||||
|
||||
void reset()
|
||||
|
@ -7,8 +7,9 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "AIMemory.h"
|
||||
#include "../../../CCallback.h"
|
||||
|
||||
void AIMemory::removeFromMemory(const CGObjectInstance * obj)
|
||||
{
|
||||
|
@ -7,12 +7,12 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "FuzzyEngines.h"
|
||||
#include "../Goals/Goals.h"
|
||||
|
||||
#include "../../lib/mapObjects/MapObjects.h"
|
||||
#include "VCAI.h"
|
||||
#include "../../../lib/mapObjects/MapObjects.h"
|
||||
#include "../VCAI.h"
|
||||
|
||||
#define MIN_AI_STRENGTH (0.5f) //lower when combat AI gets smarter
|
||||
#define UNGUARDED_OBJECT (100.0f) //we consider unguarded objects 100 times weaker than us
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
#include <fl/Headers.h>
|
||||
#include "Goals/AbstractGoal.h"
|
||||
#include "../Goals/AbstractGoal.h"
|
||||
|
||||
class CArmedInstance;
|
||||
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "FuzzyHelper.h"
|
||||
|
||||
#include "../../lib/mapObjects/CommonConstructors.h"
|
||||
#include "Goals/Goals.h"
|
||||
#include "../../../lib/mapObjects/CommonConstructors.h"
|
||||
#include "../Goals/Goals.h"
|
||||
#include "Nullkiller.h"
|
||||
|
||||
ui64 FuzzyHelper::estimateBankDanger(const CBank * bank)
|
||||
|
@ -518,9 +518,9 @@ public:
|
||||
auto hero = clusterGoal.hero.get();
|
||||
auto role = evaluationContext.evaluator.ai->heroManager->getHeroRole(clusterGoal.hero);
|
||||
|
||||
std::vector<std::pair<const CGObjectInstance *, ObjectInfo>> objects(cluster->objects.begin(), cluster->objects.end());
|
||||
std::vector<std::pair<const CGObjectInstance *, ClusterObjectInfo>> objects(cluster->objects.begin(), cluster->objects.end());
|
||||
|
||||
std::sort(objects.begin(), objects.end(), [](std::pair<const CGObjectInstance *, ObjectInfo> o1, std::pair<const CGObjectInstance *, ObjectInfo> o2) -> bool
|
||||
std::sort(objects.begin(), objects.end(), [](std::pair<const CGObjectInstance *, ClusterObjectInfo> o1, std::pair<const CGObjectInstance *, ClusterObjectInfo> o2) -> bool
|
||||
{
|
||||
return o1.second.priority > o2.second.priority;
|
||||
});
|
||||
@ -684,7 +684,6 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task)
|
||||
{
|
||||
logAi->error("evaluate VisitTile: %s", fe.getWhat());
|
||||
}
|
||||
assert(result >= 0);
|
||||
|
||||
#ifdef AI_TRACE_LEVEL >= 1
|
||||
logAi->trace("Evaluated %s, loss: %f, turn: %d, turns main: %f, scout: %f, gold: %d, cost: %d, army gain: %d, danger: %d, role: %s, strategical value: %f, cwr: %f, fear: %f, result %f",
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "BuyArmy.h"
|
||||
#include "../../../lib/mapObjects/CGTownInstance.h"
|
||||
#include "VCAI.h"
|
||||
#include "Engine/Nullkiller.h"
|
||||
#include "../VCAI.h"
|
||||
#include "../Engine/Nullkiller.h"
|
||||
|
||||
|
||||
extern boost::thread_specific_ptr<CCallback> cb;
|
||||
|
Loading…
Reference in New Issue
Block a user