2017-07-13 10:26:03 +02:00
|
|
|
/*
|
|
|
|
* CEmptyAI.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
2011-12-14 00:23:17 +03:00
|
|
|
#pragma once
|
|
|
|
|
2011-12-31 13:03:29 +03:00
|
|
|
#include "../../lib/AI_Base.h"
|
2008-04-13 14:05:39 +03:00
|
|
|
#include "../../CCallback.h"
|
2009-04-22 21:48:56 +03:00
|
|
|
|
2010-12-24 17:37:48 +02:00
|
|
|
struct HeroMoveDetails;
|
|
|
|
|
2007-10-21 19:45:13 +03:00
|
|
|
class CEmptyAI : public CGlobalAI
|
2007-10-17 01:41:45 +03:00
|
|
|
{
|
2015-12-29 04:43:33 +02:00
|
|
|
std::shared_ptr<CCallback> cb;
|
2011-05-04 05:32:35 +03:00
|
|
|
|
2007-10-17 01:41:45 +03:00
|
|
|
public:
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
virtual void saveGame(BinarySerializer & h, const int version) override;
|
|
|
|
virtual void loadGame(BinaryDeserializer & h, const int version) override;
|
|
|
|
|
2022-12-07 21:50:45 +02:00
|
|
|
void initGameInterface(std::shared_ptr<Environment> ENV, std::shared_ptr<CCallback> CB) override;
|
2012-05-30 21:37:21 +03:00
|
|
|
void yourTurn() override;
|
2013-05-27 17:20:46 +03:00
|
|
|
void heroGotLevel(const CGHeroInstance *hero, PrimarySkill::PrimarySkill pskill, std::vector<SecondarySkill> &skills, QueryID queryID) override;
|
|
|
|
void commanderGotLevel (const CCommanderInstance * commander, std::vector<ui32> skills, QueryID queryID) override;
|
|
|
|
void showBlockingDialog(const std::string &text, const std::vector<Component> &components, QueryID askID, const int soundID, bool selection, bool cancel) override;
|
2015-11-28 01:41:30 +02:00
|
|
|
void showTeleportDialog(TeleportChannelID channel, TTeleportExitsList exits, bool impassable, QueryID askID) override;
|
2013-05-27 17:20:46 +03:00
|
|
|
void showGarrisonDialog(const CArmedInstance *up, const CGHeroInstance *down, bool removableUnits, QueryID queryID) override;
|
2017-06-06 06:53:51 +02:00
|
|
|
void showMapObjectSelectDialog(QueryID askID, const Component & icon, const MetaString & title, const MetaString & description, const std::vector<ObjectInstanceID> & objects) override;
|
2007-10-17 01:41:45 +03:00
|
|
|
};
|
|
|
|
|
2009-09-10 17:06:28 +03:00
|
|
|
#define NAME "EmptyAI 0.1"
|