From f22c23d593c7e32a90f104ac604a21bc9fe0f370 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 19 Feb 2020 15:32:43 +0100 Subject: [PATCH] Make ScriptMacro a header instead of source file. --- src/Battling/Flow/TurnHandler.cpp | 2 +- src/Battling/Library/DamageLibrary.cpp | 2 +- src/Battling/Library/MiscLibrary.cpp | 1 - src/Battling/Models/BattleRandom.cpp | 2 +- src/Battling/Models/Creature.cpp | 2 +- .../ScriptHandling/{ScriptMacros.cpp => ScriptMacros.hpp} | 0 6 files changed, 4 insertions(+), 5 deletions(-) rename src/Battling/ScriptHandling/{ScriptMacros.cpp => ScriptMacros.hpp} (100%) diff --git a/src/Battling/Flow/TurnHandler.cpp b/src/Battling/Flow/TurnHandler.cpp index 8283da8..fafce78 100644 --- a/src/Battling/Flow/TurnHandler.cpp +++ b/src/Battling/Flow/TurnHandler.cpp @@ -1,7 +1,7 @@ #include "TurnHandler.hpp" #include "../../Core/Exceptions/NotImplementedException.hpp" #include "../Models/Battle.hpp" -#include "../ScriptHandling/ScriptMacros.cpp" +#include "../ScriptHandling/ScriptMacros.hpp" using namespace CreatureLib::Battling; diff --git a/src/Battling/Library/DamageLibrary.cpp b/src/Battling/Library/DamageLibrary.cpp index 24383c9..54ad133 100644 --- a/src/Battling/Library/DamageLibrary.cpp +++ b/src/Battling/Library/DamageLibrary.cpp @@ -1,5 +1,5 @@ #include "DamageLibrary.hpp" -#include "../ScriptHandling/ScriptMacros.cpp" +#include "../ScriptHandling/ScriptMacros.hpp" using namespace CreatureLib::Battling; int DamageLibrary::GetDamage(ExecutingAttack* attack, Creature* target, uint8_t hitIndex) const { diff --git a/src/Battling/Library/MiscLibrary.cpp b/src/Battling/Library/MiscLibrary.cpp index d6a9c69..217c626 100644 --- a/src/Battling/Library/MiscLibrary.cpp +++ b/src/Battling/Library/MiscLibrary.cpp @@ -4,7 +4,6 @@ bool CreatureLib::Battling::MiscLibrary::IsCritical(CreatureLib::Battling::ExecutingAttack* attack, CreatureLib::Battling::Creature* target, uint8_t hit) const { auto rand = target->GetBattle()->GetRandom(); - // HOOK: Increase chance for critical hits. return rand->Get(10) <= 0; } bool CreatureLib::Battling::MiscLibrary::CanFlee(FleeTurnChoice* switchChoice) const { return true; } diff --git a/src/Battling/Models/BattleRandom.cpp b/src/Battling/Models/BattleRandom.cpp index a6575f6..9ed3716 100644 --- a/src/Battling/Models/BattleRandom.cpp +++ b/src/Battling/Models/BattleRandom.cpp @@ -1,5 +1,5 @@ #include "BattleRandom.hpp" -#include "../ScriptHandling/ScriptMacros.cpp" +#include "../ScriptHandling/ScriptMacros.hpp" #include "Creature.hpp" #include "ExecutingAttack.hpp" diff --git a/src/Battling/Models/Creature.cpp b/src/Battling/Models/Creature.cpp index 10e029b..953e83a 100644 --- a/src/Battling/Models/Creature.cpp +++ b/src/Battling/Models/Creature.cpp @@ -2,7 +2,7 @@ #include #include #include "../Models/Battle.hpp" -#include "../ScriptHandling/ScriptMacros.cpp" +#include "../ScriptHandling/ScriptMacros.hpp" using namespace CreatureLib; diff --git a/src/Battling/ScriptHandling/ScriptMacros.cpp b/src/Battling/ScriptHandling/ScriptMacros.hpp similarity index 100% rename from src/Battling/ScriptHandling/ScriptMacros.cpp rename to src/Battling/ScriptHandling/ScriptMacros.hpp