2 Commits

Author SHA1 Message Date
8e5f196d37 Update BuildData
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-11-21 12:42:42 +01:00
9685037cf3 Update to new Throw message. 2021-11-21 12:42:35 +01:00
3 changed files with 5 additions and 4 deletions

View File

@@ -155,7 +155,7 @@ class BattleFunctions {
static void LearnMove(PkmnLib::Battling::Pokemon* user, const ArbUt::StringView& moveName) {
auto move = Globals::Library.GetValue()->GetMoveLibrary()->TryGet(moveName);
if (!move.has_value()) {
THROW("Unknown move: " << moveName);
THROW("Unknown move: ", moveName);
}
user->AddAttack(
new PkmnLib::Battling::LearnedMove(move.value(), CreatureLib::Battling::AttackLearnMethod::Unknown));

View File

@@ -5,7 +5,8 @@
class MiscMockFunctions {
static CScriptHandle CreateMoveScript(const ArbUt::StringView& name) {
auto script = Globals::Library.GetValue()->GetScriptResolver()->LoadScript(nullptr, ScriptCategory::Attack, name);
auto script =
Globals::Library.GetValue()->GetScriptResolver()->LoadScript(nullptr, ScriptCategory::Attack, name);
if (script != nullptr) {
auto* ctx = asGetActiveContext();
TestEnvironment* env = static_cast<TestEnvironment*>(ctx->GetUserData(684));
@@ -25,7 +26,7 @@ class MiscMockFunctions {
auto move = Globals::Library.GetValue()->GetMoveLibrary()->TryGet(moveName);
if (!move.has_value()) {
THROW("Unknown move: " << moveName);
THROW("Unknown move: ", moveName);
}
auto learnedMove =
new PkmnLib::Battling::LearnedMove(move.value(), CreatureLib::Battling::AttackLearnMethod::Unknown);