Peoplemon  0.1.0
Peoplemon 3 game source documentation
OwnedMove.cpp
Go to the documentation of this file.
3 
4 namespace core
5 {
6 namespace pplmn
7 {
9 : id(MoveId::Unknown)
10 , curPP(0)
11 , maxPP(0) {}
12 
14 : id(id)
15 , curPP(Move::pp(id))
16 , maxPP(Move::pp(id)) {}
17 
18 void OwnedMove::restorePP(int pp) { curPP = std::min(curPP + pp, maxPP); }
19 
20 } // namespace pplmn
21 } // namespace core
MoveId
The id of a move.
Definition: MoveId.hpp:16
Core classes and functionality for both the editor and game.
Encapsulates the move datastore.
Definition: Move.hpp:21
void restorePP(int pp)
Restores some pp to the move.
Definition: OwnedMove.cpp:18
unsigned int maxPP
The pp to restore to. Increased max pp is stored here.
Definition: OwnedMove.hpp:25
unsigned int curPP
The current pp of the move.
Definition: OwnedMove.hpp:22
OwnedMove()
Creates an empty Unknown move with 0 pp.
Definition: OwnedMove.cpp:8