MCPcopy Create free account
hub / github.com/EasyRPG/Player / GetSkillFailureMessage

Function GetSkillFailureMessage

src/game_message_terms.cpp:151–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151std::string GetSkillFailureMessage(const Game_Battler& source, const Game_Battler& target, const lcf::rpg::Skill& skill) {
152 std::string_view msg;
153 switch (skill.failure_message) {
154 case 0:
155 msg = lcf::Data::terms.skill_failure_a;
156 break;
157 case 1:
158 msg = lcf::Data::terms.skill_failure_b;
159 break;
160 case 2:
161 msg = lcf::Data::terms.skill_failure_c;
162 break;
163 case 3:
164 msg = lcf::Data::terms.dodge;
165 break;
166 default:
167 break;
168 }
169 return GetActionFailureMessage(source.GetName(), target.GetName(), msg);
170}
171
172std::string GetUndamagedMessage(const Game_Battler& target) {
173 std::string_view name = target.GetName();

Callers 1

GetFailureMessageMethod · 0.85

Calls 2

GetActionFailureMessageFunction · 0.85
GetNameMethod · 0.45

Tested by

no test coverage detected