Files
CreatureLib/src/Battling/Flow/ResolveTarget.hpp
Deukhoofd 8241a2d7b1
All checks were successful
continuous-integration/drone/push Build is passing
Check if target of attack is a valid target for that attack.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-05-24 10:57:17 +02:00

22 lines
813 B
C++

#ifndef CREATURELIB_RESOLVETARGET_HPP
#define CREATURELIB_RESOLVETARGET_HPP
#include "../../Library/Attacks/AttackTarget.hpp"
#include "../Models/Battle.hpp"
#include "../Models/Creature.hpp"
#include "../Models/CreatureIndex.hpp"
namespace CreatureLib::Battling {
class TargetResolver {
typedef ArbUt::List<ArbUt::OptionalBorrowedPtr<Creature>> TargetList;
public:
static TargetList ResolveTargets(const CreatureIndex& index, CreatureLib::Library::AttackTarget target,
const ArbUt::BorrowedPtr<Battle>& battle);
static bool IsValidTarget(const CreatureIndex& index, CreatureLib::Library::AttackTarget target,
const ArbUt::BorrowedPtr<Creature>& user);
};
}
#endif // CREATURELIB_RESOLVETARGET_HPP