Peoplemon
0.1.0
Peoplemon 3 game source documentation
src
Core
Peoplemon
BattleStats.cpp
Go to the documentation of this file.
1
#include <
Core/Peoplemon/BattleStats.hpp
>
2
3
namespace
core
4
{
5
namespace
pplmn
6
{
7
BattleStats::BattleStats
(
bool
z)
8
: acc(z ? 0 : 100)
9
, evade(z ? 0 : 100)
10
, crit(z ? 0 : 6) {}
11
12
float
BattleStats::getAccuracyMultiplier
(
int
stage) {
13
switch
(stage) {
14
case
-6:
15
return
0.33f;
16
case
-5:
17
return
0.36f;
18
case
-4:
19
return
0.43f;
20
case
-3:
21
return
0.50f;
22
case
-2:
23
return
0.60f;
24
case
-1:
25
return
0.75f;
26
case
1:
27
return
1.33f;
28
case
2:
29
return
1.66f;
30
case
3:
31
return
2.f;
32
case
4:
33
return
2.33f;
34
case
5:
35
return
2.66f;
36
case
6:
37
return
3.f;
38
case
0:
39
default
:
40
return
1.f;
41
}
42
}
43
44
}
// namespace pplmn
45
}
// namespace core
BattleStats.hpp
core
Core classes and functionality for both the editor and game.
Definition:
Conversation.hpp:15
core::pplmn::BattleStats::getAccuracyMultiplier
static float getAccuracyMultiplier(int adjustedStage)
Returns the accuracy multiplier for a move hitting.
Definition:
BattleStats.cpp:12
core::pplmn::BattleStats::BattleStats
BattleStats(bool zero)
Initializes all stats to 0 or to their defaults.
Definition:
BattleStats.cpp:7
Generated on Sun Aug 18 2024 22:16:51 for Peoplemon by
1.9.1