Cleanup CMake file.
This commit is contained in:
@@ -29,7 +29,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void TurnOrdering::OrderChoices(std::vector<std::shared_ptr<BaseTurnChoice>>& vec, ArbUt::Random& rand) {
|
||||
void TurnOrdering::OrderChoices(std::vector<std::shared_ptr<BaseTurnChoice>>& vec,
|
||||
[[maybe_unused]] ArbUt::Random& rand) {
|
||||
for (auto item : vec) {
|
||||
if (item->GetKind() == TurnChoiceKind::Attack) {
|
||||
auto attackChoice = static_cast<AttackTurnChoice*>(item.get());
|
||||
|
||||
@@ -18,7 +18,7 @@ uint32_t DamageLibrary::GetDamage(ExecutingAttack* attack, Creature* target, uin
|
||||
}
|
||||
|
||||
uint8_t DamageLibrary::GetBasePower(ExecutingAttack* attack, Creature* target, uint8_t hitIndex,
|
||||
const ExecutingAttack::HitData& hitData) const {
|
||||
[[maybe_unused]] const ExecutingAttack::HitData& hitData) const {
|
||||
AssertNotNull(attack)
|
||||
AssertNotNull(target)
|
||||
auto bp = attack->GetAttack()->GetAttack()->GetBasePower();
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
#include "../Models/Battle.hpp"
|
||||
#include "../TurnChoices/AttackTurnChoice.hpp"
|
||||
|
||||
bool CreatureLib::Battling::MiscLibrary::IsCritical(CreatureLib::Battling::ExecutingAttack* attack,
|
||||
CreatureLib::Battling::Creature* target, uint8_t hit) const {
|
||||
bool CreatureLib::Battling::MiscLibrary::IsCritical([[maybe_unused]] CreatureLib::Battling::ExecutingAttack* attack,
|
||||
CreatureLib::Battling::Creature* target,
|
||||
[[maybe_unused]] uint8_t hit) const {
|
||||
AssertNotNull(target)
|
||||
auto rand = target->GetBattle()->GetRandom();
|
||||
return rand->Get(10) <= 0;
|
||||
@@ -31,9 +32,9 @@ static CreatureLib::Battling::LearnedAttack* GetReplacementAttack() {
|
||||
return _replacementAttack;
|
||||
}
|
||||
|
||||
bool CreatureLib::Battling::MiscLibrary::CanFlee(FleeTurnChoice* switchChoice) const { return true; }
|
||||
bool CreatureLib::Battling::MiscLibrary::CanFlee([[maybe_unused]] FleeTurnChoice* switchChoice) const { return true; }
|
||||
CreatureLib::Battling::BaseTurnChoice*
|
||||
CreatureLib::Battling::MiscLibrary::ReplacementAttack(Creature* user, CreatureIndex target) const {
|
||||
CreatureLib::Battling::MiscLibrary::ReplacementAttack(Creature* user, [[maybe_unused]] CreatureIndex target) const {
|
||||
AssertNotNull(user)
|
||||
auto sideTarget = 0;
|
||||
if (user->GetBattleSide()->GetSideIndex() == 0)
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace CreatureLib::Battling {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline const uint8_t GetTargetCount() const noexcept { return _targetCount; }
|
||||
inline uint8_t GetTargetCount() const noexcept { return _targetCount; }
|
||||
inline const ArbUt::BorrowedPtr<Creature>* GetTargets() const noexcept { return _targets; }
|
||||
inline uint8_t GetNumberOfHits() const noexcept { return _numberHits; }
|
||||
|
||||
|
||||
@@ -21,45 +21,59 @@ namespace CreatureLib::Battling {
|
||||
|
||||
virtual const ArbUt::StringView& GetName() const noexcept = 0;
|
||||
|
||||
virtual void OnInitialize(const ArbUt::List<CreatureLib::Library::EffectParameter*>& parameters){};
|
||||
virtual void OnBeforeTurn(const BaseTurnChoice* choice){};
|
||||
virtual void
|
||||
OnInitialize([[maybe_unused]] const ArbUt::List<CreatureLib::Library::EffectParameter*>& parameters){};
|
||||
virtual void OnBeforeTurn([[maybe_unused]] const BaseTurnChoice* choice){};
|
||||
|
||||
virtual void ChangePriority(AttackTurnChoice* choice, int8_t* priority){};
|
||||
virtual void ChangeAttack(AttackTurnChoice* choice, ArbUt::StringView* outAttack){};
|
||||
virtual void PreventAttack(ExecutingAttack* attack, bool* outResult){};
|
||||
virtual void FailAttack(ExecutingAttack* attack, bool* outFailed){};
|
||||
virtual void StopBeforeAttack(ExecutingAttack* attack, bool* outResult){};
|
||||
virtual void OnBeforeAttack(ExecutingAttack* attack){};
|
||||
virtual void ChangePriority([[maybe_unused]] AttackTurnChoice* choice, [[maybe_unused]] int8_t* priority){};
|
||||
virtual void ChangeAttack([[maybe_unused]] AttackTurnChoice* choice,
|
||||
[[maybe_unused]] ArbUt::StringView* outAttack){};
|
||||
virtual void PreventAttack([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] bool* outResult){};
|
||||
virtual void FailAttack([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] bool* outFailed){};
|
||||
virtual void StopBeforeAttack([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] bool* outResult){};
|
||||
virtual void OnBeforeAttack([[maybe_unused]] ExecutingAttack* attack){};
|
||||
|
||||
virtual void FailIncomingAttack(ExecutingAttack* attack, Creature* target, bool* outResult){};
|
||||
virtual void IsInvulnerable(ExecutingAttack* attack, Creature* target, bool* outResult){};
|
||||
virtual void OnAttackMiss(ExecutingAttack* attack, Creature* target){};
|
||||
virtual void ChangeAttackType(ExecutingAttack* attack, Creature* target, uint8_t hitNumber, uint8_t* outType){};
|
||||
virtual void ChangeEffectiveness(ExecutingAttack* attack, Creature* target, uint8_t hitNumber,
|
||||
float* effectiveness){};
|
||||
virtual void FailIncomingAttack([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] bool* outResult){};
|
||||
virtual void IsInvulnerable([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] bool* outResult){};
|
||||
virtual void OnAttackMiss([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target){};
|
||||
virtual void ChangeAttackType([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] uint8_t hitNumber, [[maybe_unused]] uint8_t* outType){};
|
||||
virtual void ChangeEffectiveness([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] uint8_t hitNumber, [[maybe_unused]] float* effectiveness){};
|
||||
|
||||
virtual void OverrideBasePower(ExecutingAttack* attack, Creature* target, uint8_t hitIndex,
|
||||
uint8_t* basePower){};
|
||||
virtual void ChangeDamageStatsUser(ExecutingAttack* attack, Creature* target, uint8_t hitIndex,
|
||||
Creature** statsUser){};
|
||||
virtual void OverrideBasePower([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] uint8_t hitIndex, [[maybe_unused]] uint8_t* basePower){};
|
||||
virtual void ChangeDamageStatsUser([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] uint8_t hitIndex, [[maybe_unused]] Creature** statsUser){};
|
||||
|
||||
virtual void BypassDefensiveStat(ExecutingAttack* attack, Creature* target, uint8_t hitIndex, bool* bypass){};
|
||||
virtual void BypassOffensiveStat(ExecutingAttack* attack, Creature* target, uint8_t hitIndex, bool* bypass){};
|
||||
virtual void ModifyStatModifier(ExecutingAttack* attack, Creature* target, uint8_t hitIndex, float* modifier){};
|
||||
virtual void ModifyDamageModifier(ExecutingAttack* attack, Creature* target, uint8_t hitIndex,
|
||||
float* modifier){};
|
||||
virtual void OverrideDamage(ExecutingAttack* attack, Creature* target, uint8_t hitIndex, uint32_t* damage){};
|
||||
virtual void BypassDefensiveStat([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] uint8_t hitIndex, [[maybe_unused]] bool* bypass){};
|
||||
virtual void BypassOffensiveStat([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] uint8_t hitIndex, [[maybe_unused]] bool* bypass){};
|
||||
virtual void ModifyStatModifier([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] uint8_t hitIndex, [[maybe_unused]] float* modifier){};
|
||||
virtual void ModifyDamageModifier([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] uint8_t hitIndex, [[maybe_unused]] float* modifier){};
|
||||
virtual void OverrideDamage([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] uint8_t hitIndex, [[maybe_unused]] uint32_t* damage){};
|
||||
|
||||
virtual void PreventSecondaryEffects(const ExecutingAttack* attack, Creature* target, uint8_t hitNumber,
|
||||
bool* outResult){};
|
||||
virtual void OnSecondaryEffect(const ExecutingAttack* attack, Creature* target, uint8_t hitNumber){};
|
||||
virtual void PreventSecondaryEffects([[maybe_unused]] const ExecutingAttack* attack,
|
||||
[[maybe_unused]] Creature* target, [[maybe_unused]] uint8_t hitNumber,
|
||||
[[maybe_unused]] bool* outResult){};
|
||||
virtual void OnSecondaryEffect([[maybe_unused]] const ExecutingAttack* attack,
|
||||
[[maybe_unused]] Creature* target, [[maybe_unused]] uint8_t hitNumber){};
|
||||
|
||||
virtual void OnAfterHits(const ExecutingAttack* attack, Creature* target){};
|
||||
virtual void OnAfterHits([[maybe_unused]] const ExecutingAttack* attack, [[maybe_unused]] Creature* target){};
|
||||
|
||||
virtual void PreventSelfSwitch(const SwitchTurnChoice* choice, bool* outResult){};
|
||||
virtual void PreventSelfSwitch([[maybe_unused]] const SwitchTurnChoice* choice,
|
||||
[[maybe_unused]] bool* outResult){};
|
||||
|
||||
virtual void ModifyEffectChance(const ExecutingAttack* attack, Creature* target, float* chance){};
|
||||
virtual void ModifyIncomingEffectChance(const ExecutingAttack* attack, Creature* target, float* chance){};
|
||||
virtual void ModifyEffectChance([[maybe_unused]] const ExecutingAttack* attack,
|
||||
[[maybe_unused]] Creature* target, [[maybe_unused]] float* chance){};
|
||||
virtual void ModifyIncomingEffectChance([[maybe_unused]] const ExecutingAttack* attack,
|
||||
[[maybe_unused]] Creature* target, [[maybe_unused]] float* chance){};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,11 @@ namespace CreatureLib::Battling {
|
||||
public:
|
||||
virtual ~ScriptResolver() = default;
|
||||
|
||||
virtual void Initialize(BattleLibrary* library){};
|
||||
virtual Script* LoadScript(ScriptCategory category, const ArbUt::StringView& scriptName) { return nullptr; };
|
||||
virtual void Initialize([[maybe_unused]] BattleLibrary* library){};
|
||||
virtual Script* LoadScript([[maybe_unused]] ScriptCategory category,
|
||||
[[maybe_unused]] const ArbUt::StringView& scriptName) {
|
||||
return nullptr;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user