Make ScriptMacro a header instead of source file.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-02-19 15:32:43 +01:00
parent b886f0aebf
commit f22c23d593
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
6 changed files with 4 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#include "TurnHandler.hpp" #include "TurnHandler.hpp"
#include "../../Core/Exceptions/NotImplementedException.hpp" #include "../../Core/Exceptions/NotImplementedException.hpp"
#include "../Models/Battle.hpp" #include "../Models/Battle.hpp"
#include "../ScriptHandling/ScriptMacros.cpp" #include "../ScriptHandling/ScriptMacros.hpp"
using namespace CreatureLib::Battling; using namespace CreatureLib::Battling;

View File

@ -1,5 +1,5 @@
#include "DamageLibrary.hpp" #include "DamageLibrary.hpp"
#include "../ScriptHandling/ScriptMacros.cpp" #include "../ScriptHandling/ScriptMacros.hpp"
using namespace CreatureLib::Battling; using namespace CreatureLib::Battling;
int DamageLibrary::GetDamage(ExecutingAttack* attack, Creature* target, uint8_t hitIndex) const { int DamageLibrary::GetDamage(ExecutingAttack* attack, Creature* target, uint8_t hitIndex) const {

View File

@ -4,7 +4,6 @@
bool CreatureLib::Battling::MiscLibrary::IsCritical(CreatureLib::Battling::ExecutingAttack* attack, bool CreatureLib::Battling::MiscLibrary::IsCritical(CreatureLib::Battling::ExecutingAttack* attack,
CreatureLib::Battling::Creature* target, uint8_t hit) const { CreatureLib::Battling::Creature* target, uint8_t hit) const {
auto rand = target->GetBattle()->GetRandom(); auto rand = target->GetBattle()->GetRandom();
// HOOK: Increase chance for critical hits.
return rand->Get(10) <= 0; return rand->Get(10) <= 0;
} }
bool CreatureLib::Battling::MiscLibrary::CanFlee(FleeTurnChoice* switchChoice) const { return true; } bool CreatureLib::Battling::MiscLibrary::CanFlee(FleeTurnChoice* switchChoice) const { return true; }

View File

@ -1,5 +1,5 @@
#include "BattleRandom.hpp" #include "BattleRandom.hpp"
#include "../ScriptHandling/ScriptMacros.cpp" #include "../ScriptHandling/ScriptMacros.hpp"
#include "Creature.hpp" #include "Creature.hpp"
#include "ExecutingAttack.hpp" #include "ExecutingAttack.hpp"

View File

@ -2,7 +2,7 @@
#include <algorithm> #include <algorithm>
#include <utility> #include <utility>
#include "../Models/Battle.hpp" #include "../Models/Battle.hpp"
#include "../ScriptHandling/ScriptMacros.cpp" #include "../ScriptHandling/ScriptMacros.hpp"
using namespace CreatureLib; using namespace CreatureLib;