Update to new Throw message.
This commit is contained in:
parent
175fc37be9
commit
507cf30097
File diff suppressed because it is too large
Load Diff
|
@ -60,8 +60,7 @@ namespace PkmnLibAI {
|
||||||
return userIndex;
|
return userIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
THROW("Unknown attack target kind: '" << CreatureLib::Library::AttackTargetHelper::ToString(moveTarget)
|
THROW("Unknown attack target kind: '", CreatureLib::Library::AttackTargetHelper::ToString(moveTarget), "'.")
|
||||||
<< "'.")
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit d3e95dad61c5ce60db17db905fec4eeb4f65fdce
|
Subproject commit e2edf6129dd3c2feb44bf5ce98644b26da9609f8
|
|
@ -73,12 +73,12 @@ u8 RunBattle(ArbUt::Random& rand, const PkmnLib::Battling::BattleLibrary* librar
|
||||||
if (!battle->TrySetChoice(c1)) {
|
if (!battle->TrySetChoice(c1)) {
|
||||||
if (c1->GetKind() == CreatureLib::Battling::TurnChoiceKind::Attack) {
|
if (c1->GetKind() == CreatureLib::Battling::TurnChoiceKind::Attack) {
|
||||||
auto a = (CreatureLib::Battling::AttackTurnChoice*)c1;
|
auto a = (CreatureLib::Battling::AttackTurnChoice*)c1;
|
||||||
THROW("Failed to set move choice of move: '"
|
THROW("Failed to set move choice of move: '", a->GetAttack()->GetAttack()->GetName(),
|
||||||
<< a->GetAttack()->GetAttack()->GetName() << "' targeting side "
|
"' targeting side ", (i32)a->GetTarget().GetSideIndex(), " and index ",
|
||||||
<< (i32)a->GetTarget().GetSideIndex() << " and index " << (i32)a->GetTarget().GetCreatureIndex());
|
(i32)a->GetTarget().GetCreatureIndex());
|
||||||
} else {
|
} else {
|
||||||
THROW("Failed to set choice of kind: "
|
THROW("Failed to set choice of kind: ",
|
||||||
<< CreatureLib::Battling::TurnChoiceKindHelper::ToString(c1->GetKind()));
|
CreatureLib::Battling::TurnChoiceKindHelper::ToString(c1->GetKind()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ensure(battle->TrySetChoice(c2));
|
Ensure(battle->TrySetChoice(c2));
|
||||||
|
|
|
@ -44,7 +44,14 @@ int main(int argc, char** argv) {
|
||||||
if (!workingDirectory.empty()) {
|
if (!workingDirectory.empty()) {
|
||||||
chdir(std::filesystem::path(workingDirectory).c_str());
|
chdir(std::filesystem::path(workingDirectory).c_str());
|
||||||
}
|
}
|
||||||
auto battleLib = BuildLibrary::Build("");
|
|
||||||
|
PkmnLib::Battling::BattleLibrary* battleLib;
|
||||||
|
try {
|
||||||
|
battleLib = BuildLibrary::Build("");
|
||||||
|
} catch (const ArbUt::Exception& e) {
|
||||||
|
std::cout << e.what() << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if (battleLib == nullptr) {
|
if (battleLib == nullptr) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue