Reworks attack scripts to handle effect chance and effect name through data files.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user