16 : type(
Type::DisplayMessage)
17 , data(std::forward<cmd::Message>(s)) {}
20 : type(
Type::PlayAnimation)
21 , data(std::forward<cmd::Animation>(a)) {}
27 const cmd::Message* m = std::get_if<cmd::Message>(&data);
28 return m ? *m : empty;
34 return a ? *a : empty;
38 const bool* b = std::get_if<bool>(&data);
Core classes and functionality for both the editor and game.
Represents a type of animation that can be played in battle.
bool forHost() const
Returns whether or not this command is for the active battler.
const cmd::Message & getMessage() const
Returns the message if this command is a message.
Type
The type the command is.
Type getType() const
Returns the type of this command.
Command(Type type)
Creates a new command of the given type with no data.
const cmd::Animation & getAnimation() const
Returns the animation if this command is an animation.
Represents a message to be displayed. The actual message text is generated by the battle controller.