Reworks attack scripts to handle effect chance and effect name through data files.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-06 12:02:29 +02:00
parent e2675d06fb
commit 340520e0e3
8 changed files with 68 additions and 21 deletions

View File

@@ -21,8 +21,11 @@ namespace CreatureLib::Battling {
return;
auto battle = user->GetBattle();
if (battle != nullptr) {
auto library = battle->GetLibrary();
_attackScript = library->LoadScript(ScriptCategory::Attack, _attack->GetAttack()->GetName());
if (_attack->GetAttack()->HasSecondaryEffect()) {
auto library = battle->GetLibrary();
_attackScript = library->LoadScript(ScriptCategory::Attack,
_attack->GetAttack()->GetSecondaryEffect().GetEffectName());
}
}
}