Peoplemon  0.1.0
Peoplemon 3 game source documentation
Classes | Public Types | Public Member Functions | List of all members
core::battle::cmd::Message Class Reference

Represents a message to be displayed. The actual message text is generated by the battle controller. More...

#include <Message.hpp>

Public Types

enum class  Type : std::uint8_t {
  _ERROR = 0 , Attack = 1 , SuperEffective , NotEffective ,
  IsNotAffected , CriticalHit , AttackMissed , Callback ,
  SendOut , TrainerIntro , WildIntro , NetworkIntro ,
  OpponentFirstSendout , PlayerFirstSendout , AttackRestoredHp , GainedAilment ,
  GainedAilmentSnackshare , GainedPassiveAilment , AilmentGiveFail , PassiveAilmentGiveFail ,
  GenericMoveFailed , WasProtected , RecoilDamage , SuicideEffect ,
  CounterEffect , OnlySleepAffected , EveryoneWokenUp , RandomMove ,
  Absorb , NoPPDeath , MaxAtkMinAcc , DoubleBroPower ,
  Move64Cancel , StatsStolen , DeathSwapSac , DeathSwapFailed ,
  DeathSwapRevived , Guarded , GuardFailed , GuardBlockedAilment ,
  GuardBlockedPassiveAilment , SubstituteSuicide , SubstituteCreated , SubstituteAlreadyExists ,
  SubstituteTookDamage , SubstituteDied , SubstituteAilmentBlocked , SubstitutePassiveAilmentBlocked ,
  AilmentSatPassiveAilmentBlocked , HealBellHealed , HealBellAlreadyHealthy , StatIncreased ,
  StatIncreasedSharply , StatIncreaseFailed , StatDecreased , StatDecreasedSharply ,
  StatDecreaseFailed , ChargeStarted , ChargeUnleashed , PeanutAllergic ,
  PeanutAte , EncoreStart , EncoreFailed , BatonPassFailed ,
  BatonPassStart , BatonPassStatsCopied , DeathCountDown , DeathFromCountdown ,
  DeathCountDownFailed , GambleOne , GambleTwenty , GambleMiddle ,
  BallServed , BallBumped , BallSet , BallSetFail ,
  BallSpiked , BallSpikeFail , BallSwiped , BallSwipeFail ,
  BallBlocked , BallBlockFail , BallSpikeBlocked , BallSwipeBlocked ,
  BallKillSelf , BallKillSpike , BallKillSwipe , BallKillTimeout ,
  BallNoSwitchSuicide , PPLowered , PPLowerFail , EndureStart ,
  Endured , EndureFail , SpikesApplied , SpikesFailed ,
  SpikesDamage , HealNextStart , HealNextHealed , HealNextFail ,
  Roar , RoarFailedNoSwitch , RoarClearedArea , AttackThenSwitched ,
  AttackSwitchFailed , SleepHealed , SleepHealFailed , WokeUp ,
  SleepingAilment , Fainted , TrainerLost , WonMoney ,
  WhiteoutA , WhiteoutB , NetworkWinLose , AwardedXp ,
  LevelUp , TryingToLearnMove , AskForgetMove , ForgotMove ,
  LearnedMove , DidntLearnMove , IsConfused , HurtConfusion ,
  SnappedConfusion , StolenAilment , TrappedAilment , DistractedAilment ,
  AnnoyAilment , FrustratedAilment , StickyAilment , FrozenAilment ,
  ThawedOut , BoardGameSwitchBlocked , ChillaxCritBlocked , ClassyFrustratedBlocked ,
  GoonDamage , QuickDrawFirst , FriendlyAilmentHeal , SassyDamage ,
  BeefyPower , ReservedQuietPower , DukeOfJokes , EngagingAbility ,
  DerpDerpConfuse , KlutzDrop , SidetrackDistract , NoJokeTeachAbility ,
  FieryTeachAbility , ExperiencedTeachAbility , NewTeachAbility , DozeOffAbility ,
  DouseFlamesAbility , FlirtyAbility , UndyingFaithAbility , TooCoolAbility ,
  FakeStudyAbility , AlcoholicAbility , AlcoholicAbilityFailed , TotalMomAbility ,
  CantSwimAbility , AllNighterAbility , AdamentAbility , AbsPitchNotEffective ,
  AbsPitchSuperEffective , GameMakerVirusAbility , SnapshotAbility , GetBakedAbility ,
  PreUseItem , ItemUseResult , ItemNoEffect , BagOfGoldfish ,
  BackwardsHoodyStatDown , BackwordsHoodyConfuse , GlassesAcc , SpoonDamage ,
  SlappingGloveDamage , SuperTinyMiniFridge , SketchySack , GoldfishCracker ,
  WakeUpBelle , PowerJuice , IcedTea , SpeedJuice ,
  RunFailedNotWild , RunFailed , RunAway , PeopleballNoSteal ,
  PeopleballBrokeout , PeopleballCaught , AskToSetNickname , AskForNickname ,
  SentToStorage , StorageFailed , PeoplemonCloned , CloneFailed
}
 The type of message to display. More...
 

Public Member Functions

 Message (Type type)
 Construct a new Message. More...
 
 Message (pplmn::MoveId move, bool forHost)
 Construct a new Message of the Attack type. More...
 
 Message (Type type, pplmn::MoveId oldMove, pplmn::MoveId newMove)
 Construct a new Message for when moves change. More...
 
 Message (Type type, bool forHost)
 Construct a new Message with an extra boolean value. More...
 
 Message (Type type, pplmn::Ailment ailment, bool forHost)
 Construct a new Message with an ailment. More...
 
 Message (Type type, pplmn::PassiveAilment ailment, bool forHost)
 Construct a new Message with a passive ailment. More...
 
 Message (Type type, pplmn::Stat stat, bool forHost)
 Construct a new Message for stat increases and decreases. More...
 
 Message (Type type, std::int16_t ival, bool forHost)
 Construct a new Message for some integer type. More...
 
 Message (Type type, std::uint8_t index, unsigned int ival, bool forHost)
 Creates a new Message for the given type, index, and int value. Index is for player peoplemon only. Active battler field is used for this purpose. More...
 
 Message (Type type, std::uint8_t index, pplmn::MoveId move, bool forHost)
 Creates a message with an index and a move. More...
 
 Message (Type type, pplmn::MoveId move, bool forHost)
 Creates a message with a move. More...
 
 Message (Type type, item::Id item, bool forHost)
 Construct a new Message for items. More...
 
 Message (Type type, std::uint8_t index, item::Id item, bool forHost)
 Construct a new Message for using an item on a peoplemon. More...
 
Type getType () const
 Returns the type of message this is. More...
 
pplmn::MoveId getMoveId () const
 Returns the move id of the message. More...
 
bool forHostBattler () const
 Returns whether or not this message is for the active battler or not. More...
 
std::uint8_t forIndex () const
 Returns the peoplemon index the message is for. More...
 
pplmn::Ailment getAilment () const
 Returns the ailment for this message. More...
 
pplmn::PassiveAilment getPassiveAilment () const
 Returns the passive ailment for this message. More...
 
pplmn::Stat getStat () const
 Returns the stat for this message. More...
 
pplmn::MoveId getOriginalMove () const
 Returns the original move for the message. More...
 
pplmn::MoveId getNewMove () const
 Returns the new move for the message. More...
 
std::int16_t getInt () const
 Returns the integer bundled with this message. More...
 
std::uint16_t getUnsigned () const
 Returns the unsigned int value stored in this message. More...
 
item::Id getItem () const
 Returns the item for this message. More...
 

Detailed Description

Represents a message to be displayed. The actual message text is generated by the battle controller.

Definition at line 26 of file Message.hpp.

Member Enumeration Documentation

◆ Type

enum core::battle::cmd::Message::Type : std::uint8_t
strong

The type of message to display.

Enumerator
_ERROR 
Attack 
SuperEffective 
NotEffective 
IsNotAffected 
CriticalHit 
AttackMissed 
Callback 
SendOut 
TrainerIntro 
WildIntro 
NetworkIntro 
OpponentFirstSendout 
PlayerFirstSendout 
AttackRestoredHp 
GainedAilment 
GainedAilmentSnackshare 
GainedPassiveAilment 
AilmentGiveFail 
PassiveAilmentGiveFail 
GenericMoveFailed 
WasProtected 
RecoilDamage 
SuicideEffect 
CounterEffect 
OnlySleepAffected 
EveryoneWokenUp 
RandomMove 
Absorb 
NoPPDeath 
MaxAtkMinAcc 
DoubleBroPower 
Move64Cancel 
StatsStolen 
DeathSwapSac 
DeathSwapFailed 
DeathSwapRevived 
Guarded 
GuardFailed 
GuardBlockedAilment 
GuardBlockedPassiveAilment 
SubstituteSuicide 
SubstituteCreated 
SubstituteAlreadyExists 
SubstituteTookDamage 
SubstituteDied 
SubstituteAilmentBlocked 
SubstitutePassiveAilmentBlocked 
AilmentSatPassiveAilmentBlocked 
HealBellHealed 
HealBellAlreadyHealthy 
StatIncreased 
StatIncreasedSharply 
StatIncreaseFailed 
StatDecreased 
StatDecreasedSharply 
StatDecreaseFailed 
ChargeStarted 
ChargeUnleashed 
PeanutAllergic 
PeanutAte 
EncoreStart 
EncoreFailed 
BatonPassFailed 
BatonPassStart 
BatonPassStatsCopied 
DeathCountDown 
DeathFromCountdown 
DeathCountDownFailed 
GambleOne 
GambleTwenty 
GambleMiddle 
BallServed 
BallBumped 
BallSet 
BallSetFail 
BallSpiked 
BallSpikeFail 
BallSwiped 
BallSwipeFail 
BallBlocked 
BallBlockFail 
BallSpikeBlocked 
BallSwipeBlocked 
BallKillSelf 
BallKillSpike 
BallKillSwipe 
BallKillTimeout 
BallNoSwitchSuicide 
PPLowered 
PPLowerFail 
EndureStart 
Endured 
EndureFail 
SpikesApplied 
SpikesFailed 
SpikesDamage 
HealNextStart 
HealNextHealed 
HealNextFail 
Roar 
RoarFailedNoSwitch 
RoarClearedArea 
AttackThenSwitched 
AttackSwitchFailed 
SleepHealed 
SleepHealFailed 
WokeUp 
SleepingAilment 
Fainted 
TrainerLost 
WonMoney 
WhiteoutA 
WhiteoutB 
NetworkWinLose 
AwardedXp 
LevelUp 
TryingToLearnMove 
AskForgetMove 
ForgotMove 
LearnedMove 
DidntLearnMove 
IsConfused 
HurtConfusion 
SnappedConfusion 
StolenAilment 
TrappedAilment 
DistractedAilment 
AnnoyAilment 
FrustratedAilment 
StickyAilment 
FrozenAilment 
ThawedOut 
BoardGameSwitchBlocked 
ChillaxCritBlocked 
ClassyFrustratedBlocked 
GoonDamage 
QuickDrawFirst 
FriendlyAilmentHeal 
SassyDamage 
BeefyPower 
ReservedQuietPower 
DukeOfJokes 
EngagingAbility 
DerpDerpConfuse 
KlutzDrop 
SidetrackDistract 
NoJokeTeachAbility 
FieryTeachAbility 
ExperiencedTeachAbility 
NewTeachAbility 
DozeOffAbility 
DouseFlamesAbility 
FlirtyAbility 
UndyingFaithAbility 
TooCoolAbility 
FakeStudyAbility 
AlcoholicAbility 
AlcoholicAbilityFailed 
TotalMomAbility 
CantSwimAbility 
AllNighterAbility 
AdamentAbility 
AbsPitchNotEffective 
AbsPitchSuperEffective 
GameMakerVirusAbility 
SnapshotAbility 
GetBakedAbility 
PreUseItem 
ItemUseResult 
ItemNoEffect 
BagOfGoldfish 
BackwardsHoodyStatDown 
BackwordsHoodyConfuse 
GlassesAcc 
SpoonDamage 
SlappingGloveDamage 
SuperTinyMiniFridge 
SketchySack 
GoldfishCracker 
WakeUpBelle 
PowerJuice 
IcedTea 
SpeedJuice 
RunFailedNotWild 
RunFailed 
RunAway 
PeopleballNoSteal 
PeopleballBrokeout 
PeopleballCaught 
AskToSetNickname 
AskForNickname 
SentToStorage 
StorageFailed 
PeoplemonCloned 
CloneFailed 

Definition at line 32 of file Message.hpp.

Constructor & Destructor Documentation

◆ Message() [1/13]

core::battle::cmd::Message::Message ( Type  type)

Construct a new Message.

Parameters
typeThe type of message to display

Definition at line 11 of file Message.cpp.

◆ Message() [2/13]

core::battle::cmd::Message::Message ( pplmn::MoveId  move,
bool  forHost 
)

Construct a new Message of the Attack type.

Parameters
moveThe move being used
forHostTrue if the message is for the host battler, false for the other

Definition at line 16 of file Message.cpp.

◆ Message() [3/13]

core::battle::cmd::Message::Message ( Type  type,
pplmn::MoveId  oldMove,
pplmn::MoveId  newMove 
)

Construct a new Message for when moves change.

Parameters
typeThe type of message
oldMoveThe original move
newMoveThe move it turned into

Definition at line 41 of file Message.cpp.

◆ Message() [4/13]

core::battle::cmd::Message::Message ( Type  type,
bool  forHost 
)

Construct a new Message with an extra boolean value.

Parameters
typeThe type of message to create
forHostTrue if the message is for the host battler, false for the other

Definition at line 21 of file Message.cpp.

◆ Message() [5/13]

core::battle::cmd::Message::Message ( Type  type,
pplmn::Ailment  ailment,
bool  forHost 
)

Construct a new Message with an ailment.

Parameters
typeThe type of message to create
ailmentThe ailment to create it with
forHostTrue if the message is for the host battler, false for the other

Definition at line 26 of file Message.cpp.

◆ Message() [6/13]

core::battle::cmd::Message::Message ( Type  type,
pplmn::PassiveAilment  ailment,
bool  forHost 
)

Construct a new Message with a passive ailment.

Parameters
typeThe type of message to create
ailmentThe ailment to create it with
forHostTrue if the message is for the host battler, false for the other

Definition at line 31 of file Message.cpp.

◆ Message() [7/13]

core::battle::cmd::Message::Message ( Type  type,
pplmn::Stat  stat,
bool  forHost 
)

Construct a new Message for stat increases and decreases.

Parameters
typeThe type of message to create
statThe stat the message is for
forHostTrue if the message is for the host battler, false for the other

Definition at line 36 of file Message.cpp.

◆ Message() [8/13]

core::battle::cmd::Message::Message ( Type  type,
std::int16_t  ival,
bool  forHost 
)

Construct a new Message for some integer type.

Parameters
typeThe type of message
ivalThe integer type to have in the message
forHostTrue if the message is for the host battler, false for the other

Definition at line 46 of file Message.cpp.

◆ Message() [9/13]

core::battle::cmd::Message::Message ( Type  type,
std::uint8_t  index,
unsigned int  ival,
bool  forHost 
)

Creates a new Message for the given type, index, and int value. Index is for player peoplemon only. Active battler field is used for this purpose.

Parameters
typeThe type of message
indexThe index of the peoplemon it is for
ivalThe integer value to store
forHostTrue if the message is for the host battler, false for the other

Definition at line 51 of file Message.cpp.

◆ Message() [10/13]

core::battle::cmd::Message::Message ( Type  type,
std::uint8_t  index,
pplmn::MoveId  move,
bool  forHost 
)

Creates a message with an index and a move.

Parameters
typeThe type of message
indexThe index of the player peoplemon
moveThe move for the message
forHostTrue if the message is for the host battler, false for the other

Definition at line 57 of file Message.cpp.

◆ Message() [11/13]

core::battle::cmd::Message::Message ( Type  type,
pplmn::MoveId  move,
bool  forHost 
)

Creates a message with a move.

Parameters
typeThe type of message
moveThe move for the message
forHostTrue if the message is for the host battler, false for the other

Definition at line 63 of file Message.cpp.

◆ Message() [12/13]

core::battle::cmd::Message::Message ( Type  type,
item::Id  item,
bool  forHost 
)

Construct a new Message for items.

Parameters
typeThe type of message
itemThe item the message is for
forHostWhether or not the message is for the active battler

Definition at line 68 of file Message.cpp.

◆ Message() [13/13]

core::battle::cmd::Message::Message ( Type  type,
std::uint8_t  index,
item::Id  item,
bool  forHost 
)

Construct a new Message for using an item on a peoplemon.

Parameters
typeThe type of message
indexThe index of the peoplemon having the item used on it
itemThe item being used
forHostTrue if the message is for the host battler, false for the other

Definition at line 73 of file Message.cpp.

Member Function Documentation

◆ forHostBattler()

bool core::battle::cmd::Message::forHostBattler ( ) const

Returns whether or not this message is for the active battler or not.

Definition at line 86 of file Message.cpp.

◆ forIndex()

std::uint8_t core::battle::cmd::Message::forIndex ( ) const

Returns the peoplemon index the message is for.

Definition at line 88 of file Message.cpp.

◆ getAilment()

pplmn::Ailment core::battle::cmd::Message::getAilment ( ) const

Returns the ailment for this message.

Definition at line 90 of file Message.cpp.

◆ getInt()

std::int16_t core::battle::cmd::Message::getInt ( ) const

Returns the integer bundled with this message.

Definition at line 115 of file Message.cpp.

◆ getItem()

item::Id core::battle::cmd::Message::getItem ( ) const

Returns the item for this message.

Definition at line 125 of file Message.cpp.

◆ getMoveId()

pplmn::MoveId core::battle::cmd::Message::getMoveId ( ) const

Returns the move id of the message.

Definition at line 81 of file Message.cpp.

◆ getNewMove()

pplmn::MoveId core::battle::cmd::Message::getNewMove ( ) const

Returns the new move for the message.

Definition at line 110 of file Message.cpp.

◆ getOriginalMove()

pplmn::MoveId core::battle::cmd::Message::getOriginalMove ( ) const

Returns the original move for the message.

Definition at line 105 of file Message.cpp.

◆ getPassiveAilment()

pplmn::PassiveAilment core::battle::cmd::Message::getPassiveAilment ( ) const

Returns the passive ailment for this message.

Definition at line 95 of file Message.cpp.

◆ getStat()

pplmn::Stat core::battle::cmd::Message::getStat ( ) const

Returns the stat for this message.

Definition at line 100 of file Message.cpp.

◆ getType()

Message::Type core::battle::cmd::Message::getType ( ) const

Returns the type of message this is.

Definition at line 79 of file Message.cpp.

◆ getUnsigned()

std::uint16_t core::battle::cmd::Message::getUnsigned ( ) const

Returns the unsigned int value stored in this message.

Definition at line 120 of file Message.cpp.


The documentation for this class was generated from the following files: