2019-11-08 17:45:43 +00:00
|
|
|
#ifndef CREATURELIB_SCRIPT_HPP
|
|
|
|
#define CREATURELIB_SCRIPT_HPP
|
|
|
|
|
|
|
|
#include <any>
|
|
|
|
#include <string>
|
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
|
|
|
#include "Hooks.hpp"
|
|
|
|
|
|
|
|
namespace CreatureLib::Battling{
|
2019-11-09 11:15:45 +00:00
|
|
|
class ExecutingAttack;
|
|
|
|
class Creature;
|
|
|
|
|
2019-11-08 17:45:43 +00:00
|
|
|
class Script{
|
|
|
|
const std::string _name;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit Script(std::string name) :_name(std::move(name)){}
|
|
|
|
virtual ~Script() = default;
|
|
|
|
|
|
|
|
virtual void Stack(){};
|
|
|
|
|
|
|
|
const std::string& GetName(){
|
|
|
|
return _name;
|
|
|
|
}
|
2019-11-09 11:15:45 +00:00
|
|
|
|
|
|
|
virtual void OnIncomingAttackFails(ExecutingAttack* attack, Creature* target){};
|
|
|
|
virtual void IsInvulnerable(ExecutingAttack* attack, Creature* target){};
|
|
|
|
virtual void OnAttackMiss(ExecutingAttack* attack, Creature* target){};
|
2019-11-08 17:45:43 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //CREATURELIB_SCRIPT_HPP
|