Implements creature switching as turn choice.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
21
src/Battling/TurnChoices/SwitchTurnChoice.hpp
Normal file
21
src/Battling/TurnChoices/SwitchTurnChoice.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef CREATURELIB_SWITCHTURNCHOICE_HPP
|
||||
#define CREATURELIB_SWITCHTURNCHOICE_HPP
|
||||
|
||||
#include "BaseTurnChoice.hpp"
|
||||
namespace CreatureLib::Battling {
|
||||
class SwitchTurnChoice : public BaseTurnChoice {
|
||||
Creature* _newCreature;
|
||||
|
||||
public:
|
||||
SwitchTurnChoice(Creature* user, Creature* newCreature) : BaseTurnChoice(user), _newCreature(newCreature) {}
|
||||
|
||||
TurnChoiceKind GetKind() const final { return TurnChoiceKind::Switch; }
|
||||
|
||||
inline Creature* GetNewCreature() const { return _newCreature; }
|
||||
|
||||
protected:
|
||||
void GetActiveScripts(std::vector<ScriptWrapper>& scripts) override { GetUser()->GetActiveScripts(scripts); }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_SWITCHTURNCHOICE_HPP
|
||||
Reference in New Issue
Block a user