fix morpheel logic

This commit is contained in:
madeline
2026-04-30 02:48:30 -07:00
parent 3f560b060c
commit 44f3828f68
+9 -2
View File
@@ -11,6 +11,7 @@
#include "d/actor/d_a_alink.h"
#include "d/actor/d_a_ni.h"
#include "d/actor/d_a_npc4.h"
#include "d/actor/d_a_b_ob.h"
#include "d/actor/d_a_player.h"
#include "f_pc/f_pc_name.h"
#include "f_op/f_op_actor_mng.h"
@@ -841,9 +842,15 @@ std::vector<AchievementSystem::Entry> AchievementSystem::makeEntries() {
static bool prevMorpheelAlive = false;
static bool inArena = false;
static bool zoraWorn = false;
const bool morpheelAlive = fopAcM_SearchByName(fpcNm_B_OH_e) != nullptr;
const auto* morpheel = static_cast<const b_ob_class*>(fopAcM_SearchByName(fpcNm_B_OB_e));
const bool morpheelAlive = morpheel != nullptr && morpheel->mAnmID != 0x14;
const bool morpheelDead = morpheel != nullptr && morpheel->mAnmID == 0x14;
const bool lakebedCleared = dComIfGs_isEventBit(dSv_event_flag_c::M_045);
if (inArena && morpheel == nullptr) {
zoraWorn = false;
}
if (morpheelAlive && !lakebedCleared) {
inArena = true;
if (daPy_py_c::checkZoraWearFlg()) {
@@ -851,7 +858,7 @@ std::vector<AchievementSystem::Entry> AchievementSystem::makeEntries() {
}
}
if (prevMorpheelAlive && !morpheelAlive && inArena && !zoraWorn) {
if (prevMorpheelAlive && morpheelDead && inArena && !zoraWorn) {
a.progress = 1;
}