mirror of
https://github.com/zeldaret/botw
synced 2026-07-30 15:53:56 -04:00
Game: Finish HardModeManager
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "Game/DLC/aocHardModeManager.h"
|
||||
#include <math/seadMathCalcCommon.h>
|
||||
#include "KingSystem/ActorSystem/actActor.h"
|
||||
#include "KingSystem/ActorSystem/actActorUtil.h"
|
||||
#include "KingSystem/ActorSystem/actTag.h"
|
||||
#include "KingSystem/Utils/InitTimeInfo.h"
|
||||
|
||||
@@ -75,6 +77,26 @@ void HardModeManager::modifyEnemyNoticeDuration(f32* value) const {
|
||||
*value = sead::Mathf::max(*value * getMultiplier(MultiplierType::EnemyNoticeDuration), 0);
|
||||
}
|
||||
|
||||
bool HardModeManager::shouldCreateLifeRecoverInfo(ksys::act::Actor* actor) {
|
||||
// Health regen should only apply to enemy actors.
|
||||
if (!ksys::act::isEnemyProfile(actor))
|
||||
return false;
|
||||
|
||||
// But not to wolves or bears...
|
||||
if (ksys::act::isWolfOrBear(actor))
|
||||
return false;
|
||||
|
||||
// and not to Dark Beast Ganon...
|
||||
if (actor->getName() == "Enemy_GanonBeast")
|
||||
return false;
|
||||
|
||||
// and not to enemy swarms...
|
||||
if (actor->getProfile() == "EnemySwarm")
|
||||
return false;
|
||||
|
||||
return actor->getMaxLife() > 1;
|
||||
}
|
||||
|
||||
bool HardModeManager::shouldApplyMasterModeDamageMultiplier(
|
||||
const ksys::act::ActorConstDataAccess& accessor) {
|
||||
if (!accessor.hasProc())
|
||||
|
||||
@@ -40,6 +40,7 @@ public:
|
||||
void nerfHpRestore(s32* hp) const;
|
||||
void modifyEnemyNoticeDuration(f32* value) const;
|
||||
|
||||
static bool shouldCreateLifeRecoverInfo(ksys::act::Actor* actor);
|
||||
static bool
|
||||
shouldApplyMasterModeDamageMultiplier(const ksys::act::ActorConstDataAccess& accessor);
|
||||
static void buffDamage(s32& damage);
|
||||
|
||||
Reference in New Issue
Block a user