mirror of https://github.com/zeldaret/botw.git
Game: Finish HardModeManager
This commit is contained in:
parent
29ffc51ad8
commit
97f3d2943b
|
@ -74468,7 +74468,7 @@ Address,Quality,Size,Name
|
||||||
0x0000007100d6d35c,O,000056,_ZNK5uking3aoc15HardModeManager13nerfHpRestoreEPf
|
0x0000007100d6d35c,O,000056,_ZNK5uking3aoc15HardModeManager13nerfHpRestoreEPf
|
||||||
0x0000007100d6d394,O,000064,_ZNK5uking3aoc15HardModeManager13nerfHpRestoreEPi
|
0x0000007100d6d394,O,000064,_ZNK5uking3aoc15HardModeManager13nerfHpRestoreEPi
|
||||||
0x0000007100d6d3d4,O,000060,_ZNK5uking3aoc15HardModeManager25modifyEnemyNoticeDurationEPf
|
0x0000007100d6d3d4,O,000060,_ZNK5uking3aoc15HardModeManager25modifyEnemyNoticeDurationEPf
|
||||||
0x0000007100d6d410,U,000304,
|
0x0000007100d6d410,O,000304,_ZN5uking3aoc15HardModeManager27shouldCreateLifeRecoverInfoEPN4ksys3act5ActorE
|
||||||
0x0000007100d6d540,O,006164,_ZN5uking3aoc15HardModeManager37shouldApplyMasterModeDamageMultiplierERKN4ksys3act20ActorConstDataAccessE
|
0x0000007100d6d540,O,006164,_ZN5uking3aoc15HardModeManager37shouldApplyMasterModeDamageMultiplierERKN4ksys3act20ActorConstDataAccessE
|
||||||
0x0000007100d6ed54,O,000040,_ZN5uking3aoc15HardModeManager10buffDamageERi
|
0x0000007100d6ed54,O,000040,_ZN5uking3aoc15HardModeManager10buffDamageERi
|
||||||
0x0000007100d6ed7c,O,000172,_ZN5uking3aoc15HardModeManager26loadIsLastPlayHardModeFlagEv
|
0x0000007100d6ed7c,O,000172,_ZN5uking3aoc15HardModeManager26loadIsLastPlayHardModeFlagEv
|
||||||
|
|
Can't render this file because it is too large.
|
|
@ -1,5 +1,7 @@
|
||||||
#include "Game/DLC/aocHardModeManager.h"
|
#include "Game/DLC/aocHardModeManager.h"
|
||||||
#include <math/seadMathCalcCommon.h>
|
#include <math/seadMathCalcCommon.h>
|
||||||
|
#include "KingSystem/ActorSystem/actActor.h"
|
||||||
|
#include "KingSystem/ActorSystem/actActorUtil.h"
|
||||||
#include "KingSystem/ActorSystem/actTag.h"
|
#include "KingSystem/ActorSystem/actTag.h"
|
||||||
#include "KingSystem/Utils/InitTimeInfo.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);
|
*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(
|
bool HardModeManager::shouldApplyMasterModeDamageMultiplier(
|
||||||
const ksys::act::ActorConstDataAccess& accessor) {
|
const ksys::act::ActorConstDataAccess& accessor) {
|
||||||
if (!accessor.hasProc())
|
if (!accessor.hasProc())
|
||||||
|
|
|
@ -40,6 +40,7 @@ public:
|
||||||
void nerfHpRestore(s32* hp) const;
|
void nerfHpRestore(s32* hp) const;
|
||||||
void modifyEnemyNoticeDuration(f32* value) const;
|
void modifyEnemyNoticeDuration(f32* value) const;
|
||||||
|
|
||||||
|
static bool shouldCreateLifeRecoverInfo(ksys::act::Actor* actor);
|
||||||
static bool
|
static bool
|
||||||
shouldApplyMasterModeDamageMultiplier(const ksys::act::ActorConstDataAccess& accessor);
|
shouldApplyMasterModeDamageMultiplier(const ksys::act::ActorConstDataAccess& accessor);
|
||||||
static void buffDamage(s32& damage);
|
static void buffDamage(s32& damage);
|
||||||
|
|
Loading…
Reference in New Issue