persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
Guard.cpp
Go to the documentation of this file.
1
#include "
Guard.hpp
"
2
#include "
core/logger.hpp
"
3
4
TurnResult
Guard::resolve
(
PartyMember
* user,
BattleParticipant
*
/*target*/
,
Skill
*
/*skill*/
)
5
{
6
if
(user ==
nullptr
)
7
{
8
logMessage
(
LogSeverity::ERROR
,
"Called with null user"
);
9
return
{
false
, 0,
false
,
"Guard"
};
10
}
11
12
logMessage
(
LogSeverity::DEBUG
,
"Guard action resolving for: "
+ user->
name
);
13
14
user->
guarding
=
true
;
15
return
{
true
, 0,
false
,
"Guard"
};
16
}
Guard.hpp
logMessage
void logMessage(LogSeverity severity, std::string_view message, std::source_location location)
Logs a diagnostic message and halts only for fatal messages.
Definition
logger.cpp:110
logger.hpp
Util to handle error logging.
LogSeverity::ERROR
@ ERROR
Definition
logger.hpp:17
LogSeverity::DEBUG
@ DEBUG
Definition
logger.hpp:15
BattleParticipant
Participant of battle.
Definition
BattleParticipant.hpp:30
BattleParticipant::name
std::string name
Definition
BattleParticipant.hpp:31
Guard::resolve
TurnResult resolve(PartyMember *user, BattleParticipant *target, Skill *skill=nullptr) override
Definition
Guard.cpp:4
PartyMember
Definition
PartyMember.hpp:14
PartyMember::guarding
bool guarding
Definition
PartyMember.hpp:21
Skill
Definition
Skill.hpp:10
TurnResult
Result of a singular turn. Note that currently multi target skills do use a seperate turn result for ...
Definition
TurnResult.hpp:14
source
battleActions
actions
Guard.cpp
Generated by
1.15.0