Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
24 lines
931 B
C++
24 lines
931 B
C++
#ifndef CREATURELIB_SWITCHTURNCHOICE_HPP
|
|
#define CREATURELIB_SWITCHTURNCHOICE_HPP
|
|
|
|
#include "BaseTurnChoice.hpp"
|
|
namespace CreatureLib::Battling {
|
|
class SwitchTurnChoice : public BaseTurnChoice {
|
|
ArbUt::OptionalBorrowedPtr<Creature> _newCreature;
|
|
|
|
public:
|
|
SwitchTurnChoice(ArbUt::BorrowedPtr<Creature> user, ArbUt::OptionalBorrowedPtr<Creature> newCreature) noexcept
|
|
: BaseTurnChoice(user), _newCreature(newCreature) {}
|
|
|
|
TurnChoiceKind GetKind() const noexcept final { return TurnChoiceKind::Switch; }
|
|
|
|
inline const ArbUt::OptionalBorrowedPtr<Creature>& GetNewCreature() const noexcept { return _newCreature; }
|
|
size_t ScriptCount() const override { return GetUser()->ScriptCount(); }
|
|
|
|
protected:
|
|
void GetActiveScripts(ArbUt::List<ScriptWrapper>& scripts) override { GetUser()->GetActiveScripts(scripts); }
|
|
};
|
|
}
|
|
|
|
#endif // CREATURELIB_SWITCHTURNCHOICE_HPP
|