mirror of
https://github.com/zeldaret/botw
synced 2026-06-02 18:18:30 -04:00
match some ai::Query
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryCheckHorseCustomizeSelect.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtCommonFlagsUtils.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -8,9 +9,15 @@ CheckHorseCustomizeSelect::CheckHorseCustomizeSelect(const InitArg& arg)
|
||||
|
||||
CheckHorseCustomizeSelect::~CheckHorseCustomizeSelect() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int CheckHorseCustomizeSelect::doQuery() {
|
||||
return -1;
|
||||
if (ksys::gdt::getFlag_Shop_IsDecide()) {
|
||||
s32 state = ksys::gdt::getFlag_Shop_CurrentItemState();
|
||||
if (state == 0)
|
||||
return 0;
|
||||
if (state == 0xF)
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
|
||||
void CheckHorseCustomizeSelect::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryCheckHorseTakenOut.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtSpecialFlags.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,13 @@ CheckHorseTakenOut::CheckHorseTakenOut(const InitArg& arg) : ksys::act::ai::Quer
|
||||
|
||||
CheckHorseTakenOut::~CheckHorseTakenOut() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int CheckHorseTakenOut::doQuery() {
|
||||
return -1;
|
||||
s32 active = ksys::gdt::getS32ByKey("Horse_ActiveIndex");
|
||||
if (active < 0)
|
||||
return 2;
|
||||
|
||||
s32 selected = ksys::gdt::getS32ByKey("Horse_SelectedIndex");
|
||||
return active == selected;
|
||||
}
|
||||
|
||||
void CheckHorseTakenOut::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryCheckManufactResult.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtCommonFlagsUtils.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,15 @@ CheckManufactResult::CheckManufactResult(const InitArg& arg) : ksys::act::ai::Qu
|
||||
|
||||
CheckManufactResult::~CheckManufactResult() = default;
|
||||
|
||||
// FIXME: implement
|
||||
static constexpr s32 sManufactResults[8] = {0, 6, 4, 6, 1, 2, 3, 5};
|
||||
|
||||
int CheckManufactResult::doQuery() {
|
||||
return -1;
|
||||
if (ksys::gdt::getFlag_Shop_IsDecide()) {
|
||||
s32 state = ksys::gdt::getFlag_Shop_CurrentItemState();
|
||||
if (state < 8 && state >= 0)
|
||||
return sManufactResults[state];
|
||||
}
|
||||
return 6;
|
||||
}
|
||||
|
||||
void CheckManufactResult::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "Game/AI/Query/queryCheckPorchInItem.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actActorUtil.h"
|
||||
#include "KingSystem/ActorSystem/actTag.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +9,8 @@ CheckPorchInItem::CheckPorchInItem(const InitArg& arg) : ksys::act::ai::Query(ar
|
||||
|
||||
CheckPorchInItem::~CheckPorchInItem() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int CheckPorchInItem::doQuery() {
|
||||
return -1;
|
||||
return ksys::act::hasTag(mPorchItemName, ksys::act::tags::CanGetPouch);
|
||||
}
|
||||
|
||||
void CheckPorchInItem::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -7,9 +7,8 @@ CheckProConUse::CheckProConUse(const InitArg& arg) : ksys::act::ai::Query(arg) {
|
||||
|
||||
CheckProConUse::~CheckProConUse() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int CheckProConUse::doQuery() {
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CheckProConUse::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryCheckRupee.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,12 @@ CheckRupee::CheckRupee(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
CheckRupee::~CheckRupee() = default;
|
||||
|
||||
// FIXME: implement
|
||||
// NON_MATCHING
|
||||
int CheckRupee::doQuery() {
|
||||
return -1;
|
||||
s32 value = 0;
|
||||
if (!ksys::gdt::Manager::instance()->getParamBypassPerm().get().getS32(&value, "CurrentRupee"))
|
||||
return 0;
|
||||
return value >= *mValue;
|
||||
}
|
||||
|
||||
void CheckRupee::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryCheckSellResult.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtCommonFlagsUtils.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,17 @@ CheckSellResult::CheckSellResult(const InitArg& arg) : ksys::act::ai::Query(arg)
|
||||
|
||||
CheckSellResult::~CheckSellResult() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int CheckSellResult::doQuery() {
|
||||
return -1;
|
||||
if (ksys::gdt::getFlag_Shop_IsDecide()) {
|
||||
s32 flag = ksys::gdt::getFlag_Shop_CurrentItemState();
|
||||
if (flag == 0)
|
||||
return 0;
|
||||
if (flag == 0xD)
|
||||
return 1;
|
||||
if (flag == 0xE)
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
void CheckSellResult::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryCheckShopSelectedItemName.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtSpecialFlags.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -8,9 +9,10 @@ CheckShopSelectedItemName::CheckShopSelectedItemName(const InitArg& arg)
|
||||
|
||||
CheckShopSelectedItemName::~CheckShopSelectedItemName() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int CheckShopSelectedItemName::doQuery() {
|
||||
return -1;
|
||||
const char* result = &sead::SafeString::cNullChar;
|
||||
ksys::gdt::getStr64ByKey(&result, "Shop_SelectItemName");
|
||||
return mPorchItemName == result;
|
||||
}
|
||||
|
||||
void CheckShopSelectedItemName::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryCheckTimeType.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/World/worldManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,19 @@ CheckTimeType::CheckTimeType(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
CheckTimeType::~CheckTimeType() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int CheckTimeType::doQuery() {
|
||||
return -1;
|
||||
auto* wm = ksys::world::Manager::instance();
|
||||
if (wm == nullptr)
|
||||
return 0;
|
||||
|
||||
auto* tm = wm->getTimeMgr();
|
||||
if (tm == nullptr)
|
||||
return 0;
|
||||
|
||||
u32 division = tm->getTimeDivision();
|
||||
if (division < 8)
|
||||
return division;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CheckTimeType::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryCheckWarpMist.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/World/worldManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ CheckWarpMist::CheckWarpMist(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
CheckWarpMist::~CheckWarpMist() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int CheckWarpMist::doQuery() {
|
||||
return -1;
|
||||
return ksys::world::Manager::instance()->getEnvMgr()->getWarpMistIntensity() > 0.0f;
|
||||
}
|
||||
|
||||
void CheckWarpMist::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryComparePlayerHeart.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actPlayerInfo.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,12 @@ ComparePlayerHeart::ComparePlayerHeart(const InitArg& arg) : ksys::act::ai::Quer
|
||||
|
||||
ComparePlayerHeart::~ComparePlayerHeart() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int ComparePlayerHeart::doQuery() {
|
||||
return -1;
|
||||
auto* pi = ksys::act::PlayerInfo::instance();
|
||||
if (pi == nullptr)
|
||||
return 0;
|
||||
|
||||
return pi->getLife() >= *mThreshold;
|
||||
}
|
||||
|
||||
void ComparePlayerHeart::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryComparePlayerMaxHeart.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actPlayerInfo.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,13 @@ ComparePlayerMaxHeart::ComparePlayerMaxHeart(const InitArg& arg) : ksys::act::ai
|
||||
|
||||
ComparePlayerMaxHeart::~ComparePlayerMaxHeart() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int ComparePlayerMaxHeart::doQuery() {
|
||||
return -1;
|
||||
auto* pi = ksys::act::PlayerInfo::instance();
|
||||
if (pi == nullptr)
|
||||
return 0;
|
||||
|
||||
s32 full_hearts = pi->getMaxHearts() / 4;
|
||||
return full_hearts >= *mThreshold;
|
||||
}
|
||||
|
||||
void ComparePlayerMaxHeart::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryComparePlayerMaxStamina.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actPlayerInfo.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,16 @@ ComparePlayerMaxStamina::ComparePlayerMaxStamina(const InitArg& arg) : ksys::act
|
||||
|
||||
ComparePlayerMaxStamina::~ComparePlayerMaxStamina() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int ComparePlayerMaxStamina::doQuery() {
|
||||
return -1;
|
||||
auto* pi = ksys::act::PlayerInfo::instance();
|
||||
if (pi == nullptr)
|
||||
return 0;
|
||||
|
||||
s32 stamina = pi->getMaxStamina();
|
||||
if (stamina % 200 <= 0)
|
||||
return stamina / 200 >= *mThreshold;
|
||||
else
|
||||
return stamina / 200 + 1 >= *mThreshold;
|
||||
}
|
||||
|
||||
void ComparePlayerMaxStamina::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryComparePlayerOriginalHeart.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actPlayerInfo.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -8,9 +9,20 @@ ComparePlayerOriginalHeart::ComparePlayerOriginalHeart(const InitArg& arg)
|
||||
|
||||
ComparePlayerOriginalHeart::~ComparePlayerOriginalHeart() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int ComparePlayerOriginalHeart::doQuery() {
|
||||
return -1;
|
||||
using PlayerInfo = ksys::act::PlayerInfo;
|
||||
|
||||
if (PlayerInfo::instance() == nullptr)
|
||||
return 0;
|
||||
|
||||
s32 life = PlayerInfo::instance()->getLife();
|
||||
s32 hearts = PlayerInfo::instance()->getMaxHearts();
|
||||
s32 compare;
|
||||
if (life <= hearts)
|
||||
compare = life;
|
||||
else
|
||||
compare = hearts;
|
||||
return compare >= *mThreshold;
|
||||
}
|
||||
|
||||
void ComparePlayerOriginalHeart::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryCountFlag4.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,30 @@ CountFlag4::CountFlag4(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
CountFlag4::~CountFlag4() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int CountFlag4::doQuery() {
|
||||
return -1;
|
||||
auto* gdm = ksys::gdt::Manager::instance();
|
||||
if (gdm == nullptr)
|
||||
return 0;
|
||||
|
||||
bool x = false;
|
||||
int result = 0;
|
||||
|
||||
auto isOn = [&](const sead::SafeString& s) {
|
||||
return gdm->getParamBypassPerm().get().getBool(&x, s) && x;
|
||||
};
|
||||
|
||||
if (!mGameDataFlagNo0.isEmpty())
|
||||
result += isOn(mGameDataFlagNo0);
|
||||
if (!mGameDataFlagNo1.isEmpty())
|
||||
result += isOn(mGameDataFlagNo1);
|
||||
if (!mGameDataFlagNo2.isEmpty())
|
||||
result += isOn(mGameDataFlagNo2);
|
||||
if (!mGameDataFlagNo3.isEmpty())
|
||||
result += isOn(mGameDataFlagNo3);
|
||||
if (!mGameDataFlagNo4.isEmpty())
|
||||
result += isOn(mGameDataFlagNo4);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void CountFlag4::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryEnemyDieCheck.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actActor.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ EnemyDieCheck::EnemyDieCheck(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
EnemyDieCheck::~EnemyDieCheck() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int EnemyDieCheck::doQuery() {
|
||||
return -1;
|
||||
return mActor->getActorFlags2().isOff(ksys::act::Actor::ActorFlag2::Alive);
|
||||
}
|
||||
|
||||
void EnemyDieCheck::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryEnemyRestLifeRate.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actActor.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,16 @@ EnemyRestLifeRate::EnemyRestLifeRate(const InitArg& arg) : ksys::act::ai::Query(
|
||||
|
||||
EnemyRestLifeRate::~EnemyRestLifeRate() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int EnemyRestLifeRate::doQuery() {
|
||||
return -1;
|
||||
s32* life = mActor->getLife();
|
||||
float value;
|
||||
|
||||
if (life != nullptr)
|
||||
value = *life;
|
||||
else
|
||||
value = 1.0f;
|
||||
|
||||
return mActor->getMaxLife() * *mCheckRate <= value;
|
||||
}
|
||||
|
||||
void EnemyRestLifeRate::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryGeneralChoice2.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actActorUtil.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,12 @@ GeneralChoice2::GeneralChoice2(const InitArg& arg) : ksys::act::ai::Query(arg) {
|
||||
|
||||
GeneralChoice2::~GeneralChoice2() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int GeneralChoice2::doQuery() {
|
||||
return -1;
|
||||
s32 idx = ksys::act::getSelectedChoiceIdx(2, getName());
|
||||
if (idx < 0)
|
||||
return 0;
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
void GeneralChoice2::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryGeneralChoice3.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actActorUtil.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,12 @@ GeneralChoice3::GeneralChoice3(const InitArg& arg) : ksys::act::ai::Query(arg) {
|
||||
|
||||
GeneralChoice3::~GeneralChoice3() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int GeneralChoice3::doQuery() {
|
||||
return -1;
|
||||
s32 idx = ksys::act::getSelectedChoiceIdx(3, getName());
|
||||
if (idx < 0)
|
||||
return 0;
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
void GeneralChoice3::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryGeneralChoice4.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actActorUtil.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -9,7 +10,11 @@ GeneralChoice4::~GeneralChoice4() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int GeneralChoice4::doQuery() {
|
||||
return -1;
|
||||
s32 idx = ksys::act::getSelectedChoiceIdx(4, getName());
|
||||
if (idx < 0)
|
||||
return 0;
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
void GeneralChoice4::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryGeneralChoice8.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actActorUtil.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -9,7 +10,11 @@ GeneralChoice8::~GeneralChoice8() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int GeneralChoice8::doQuery() {
|
||||
return -1;
|
||||
s32 idx = ksys::act::getSelectedChoiceIdx(8, getName());
|
||||
if (idx < 0)
|
||||
return 0;
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
void GeneralChoice8::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryHasArmorAlreadyDyed.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "Game/UI/uiPauseMenuDataMgr.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,12 @@ HasArmorAlreadyDyed::HasArmorAlreadyDyed(const InitArg& arg) : ksys::act::ai::Qu
|
||||
|
||||
HasArmorAlreadyDyed::~HasArmorAlreadyDyed() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int HasArmorAlreadyDyed::doQuery() {
|
||||
return -1;
|
||||
auto* pm = ui::PauseMenuDataMgr::instance();
|
||||
if (pm == nullptr)
|
||||
return 0;
|
||||
|
||||
return pm->countAlreadyDyedArmor() > 0;
|
||||
}
|
||||
|
||||
void HasArmorAlreadyDyed::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryHasArmorDye.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "Game/UI/uiPauseMenuDataMgr.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,12 @@ HasArmorDye::HasArmorDye(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
HasArmorDye::~HasArmorDye() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int HasArmorDye::doQuery() {
|
||||
return -1;
|
||||
auto* pm = ui::PauseMenuDataMgr::instance();
|
||||
if (pm == nullptr)
|
||||
return 0;
|
||||
|
||||
return pm->countArmorDye() > 0;
|
||||
}
|
||||
|
||||
void HasArmorDye::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryHasCookResultInPorch.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "Game/UI/uiUtils.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,8 +8,48 @@ HasCookResultInPorch::HasCookResultInPorch(const InitArg& arg) : ksys::act::ai::
|
||||
|
||||
HasCookResultInPorch::~HasCookResultInPorch() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int HasCookResultInPorch::doQuery() {
|
||||
s32 num;
|
||||
|
||||
if (mCookEffectType == "AllOK")
|
||||
num = ui::countCookResultsAllOk(mPorchItemName);
|
||||
else
|
||||
num = ui::countCookResultsCheck(mPorchItemName, getEffect());
|
||||
|
||||
if (num < *mCount)
|
||||
return 0;
|
||||
else if (num == *mCount)
|
||||
return 1;
|
||||
else if (num > *mCount)
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int HasCookResultInPorch::getEffect() const {
|
||||
if (mCookEffectType == "None")
|
||||
return -1;
|
||||
if (mCookEffectType == "ResistHot")
|
||||
return 4;
|
||||
if (mCookEffectType == "ResistCold")
|
||||
return 5;
|
||||
if (mCookEffectType == "ResistElectric")
|
||||
return 6;
|
||||
if (mCookEffectType == "AttackUp")
|
||||
return 10;
|
||||
if (mCookEffectType == "DefenseUp")
|
||||
return 11;
|
||||
if (mCookEffectType == "Quietness")
|
||||
return 12;
|
||||
if (mCookEffectType == "AllSpeed")
|
||||
return 13;
|
||||
if (mCookEffectType == "Fireproof")
|
||||
return 16;
|
||||
if (mCookEffectType == "GutsRecover")
|
||||
return 14;
|
||||
if (mCookEffectType == "ExGutsMaxUp")
|
||||
return 15;
|
||||
if (mCookEffectType == "LifeMaxUp")
|
||||
return 2;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ public:
|
||||
~HasCookResultInPorch() override;
|
||||
int doQuery() override;
|
||||
|
||||
int getEffect() const;
|
||||
|
||||
void loadParams() override;
|
||||
void loadParams(const evfl::QueryArg& arg) override;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryHasEnoughPayment.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,16 @@ HasEnoughPayment::HasEnoughPayment(const InitArg& arg) : ksys::act::ai::Query(ar
|
||||
|
||||
HasEnoughPayment::~HasEnoughPayment() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int HasEnoughPayment::doQuery() {
|
||||
return -1;
|
||||
auto* gdm = ksys::gdt::Manager::instance();
|
||||
if (gdm != nullptr) {
|
||||
s32 state = -1;
|
||||
if (!gdm->getParam().get().getS32(&state, "Shop_CurrentItemState"))
|
||||
return 1;
|
||||
if (state == 2 || state == 3)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void HasEnoughPayment::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryHasItemDye.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "Game/UI/uiPauseMenuDataMgr.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,11 @@ HasItemDye::HasItemDye(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
HasItemDye::~HasItemDye() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int HasItemDye::doQuery() {
|
||||
return -1;
|
||||
auto* pm = ui::PauseMenuDataMgr::instance();
|
||||
if (pm == nullptr)
|
||||
return 0;
|
||||
return pm->hasItemDye();
|
||||
}
|
||||
|
||||
void HasItemDye::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryHasPorchArrow.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "Game/UI/uiUtils.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,11 @@ HasPorchArrow::HasPorchArrow(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
HasPorchArrow::~HasPorchArrow() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int HasPorchArrow::doQuery() {
|
||||
return -1;
|
||||
s32 arrow_cnt = ui::getItemValue("NormalArrow") + ui::getItemValue("FireArrow") +
|
||||
ui::getItemValue("IceArrow") + ui::getItemValue("ElectricArrow") +
|
||||
ui::getItemValue("BombArrow_A") + ui::getItemValue("AncientArrow");
|
||||
return arrow_cnt < *mCheckNum;
|
||||
}
|
||||
|
||||
void HasPorchArrow::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryHasPorchItem.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "Game/UI/uiUtils.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ HasPorchItem::HasPorchItem(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
HasPorchItem::~HasPorchItem() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int HasPorchItem::doQuery() {
|
||||
return -1;
|
||||
return ui::getItemValue(mPorchItemName) >= *mCount;
|
||||
}
|
||||
|
||||
void HasPorchItem::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "Game/AI/Query/queryHasPorchItemByCategory.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "Game/UI/uiPauseMenuDataMgr.h"
|
||||
#include "KingSystem/ActorSystem/actTag.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +9,72 @@ HasPorchItemByCategory::HasPorchItemByCategory(const InitArg& arg) : ksys::act::
|
||||
|
||||
HasPorchItemByCategory::~HasPorchItemByCategory() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int HasPorchItemByCategory::doQuery() {
|
||||
return -1;
|
||||
s32 result = 0;
|
||||
using namespace ksys::act::tags;
|
||||
|
||||
auto* pm = ui::PauseMenuDataMgr::instance();
|
||||
if (pm == nullptr)
|
||||
return 1;
|
||||
|
||||
switch (*mCategory) {
|
||||
case 0:
|
||||
result = pm->countItemsWithProfile("WeaponBow", true);
|
||||
break;
|
||||
case 1:
|
||||
result = pm->countItemsWithProfile("WeaponShield", true);
|
||||
break;
|
||||
case 2:
|
||||
result = pm->countItemsWithProfile("WeaponSpear", true);
|
||||
break;
|
||||
case 3:
|
||||
result = pm->countItemsWithProfile("WeaponSmallSword", true);
|
||||
break;
|
||||
case 4:
|
||||
result = pm->countItemsWithTag(Arrow, false);
|
||||
break;
|
||||
case 16:
|
||||
result = pm->countItemsWithTag(Arrow, true);
|
||||
break;
|
||||
case 5:
|
||||
result = pm->countItemsWithProfile("WeaponLargeSword", true);
|
||||
break;
|
||||
case 6:
|
||||
result = pm->countItemsWithTag(CookMushroom, true);
|
||||
break;
|
||||
case 7:
|
||||
result = pm->countItemsWithTag(RoastItem, true);
|
||||
break;
|
||||
case 8:
|
||||
result = pm->countItemsWithTag(CookFruit, true);
|
||||
break;
|
||||
case 9:
|
||||
result = pm->countItemsWithTag(CookOre, true);
|
||||
break;
|
||||
case 10:
|
||||
result = pm->countItemsWithTag(CookPlant, true);
|
||||
break;
|
||||
case 11:
|
||||
result = pm->countItemsWithTag(EnemyMaterial, true);
|
||||
break;
|
||||
case 12:
|
||||
result = pm->countItemsWithTag(CookMeat, true);
|
||||
break;
|
||||
case 13:
|
||||
result = pm->countItemsWithTag(CookMaterial, true);
|
||||
break;
|
||||
case 14:
|
||||
result = pm->countItemsWithProfile("HorseReins", true);
|
||||
break;
|
||||
case 15:
|
||||
result = pm->countItemsWithProfile("HorseSaddle", true);
|
||||
break;
|
||||
default:
|
||||
result = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return result < *mCount;
|
||||
}
|
||||
|
||||
void HasPorchItemByCategory::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "Game/AI/Query/queryHasPouchItemByPouchCategory.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "Game/UI/uiPauseMenuDataMgr.h"
|
||||
#include "KingSystem/ActorSystem/actTag.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -8,9 +10,44 @@ HasPouchItemByPouchCategory::HasPouchItemByPouchCategory(const InitArg& arg)
|
||||
|
||||
HasPouchItemByPouchCategory::~HasPouchItemByPouchCategory() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int HasPouchItemByPouchCategory::doQuery() {
|
||||
return -1;
|
||||
s32 result = 0;
|
||||
using namespace ksys::act::tags;
|
||||
|
||||
auto* pm = ui::PauseMenuDataMgr::instance();
|
||||
if (pm == nullptr)
|
||||
return 1;
|
||||
|
||||
switch (*mCategory) {
|
||||
case 0:
|
||||
result = pm->countItemsWithCategory(ui::PouchCategory::Sword);
|
||||
break;
|
||||
case 1:
|
||||
result = pm->countItemsWithProfile("WeaponBow", false);
|
||||
break;
|
||||
case 2:
|
||||
result = pm->countItemsWithTag(Arrow, false);
|
||||
break;
|
||||
case 3:
|
||||
result = pm->countItemsWithCategory(ui::PouchCategory::Shield);
|
||||
break;
|
||||
case 4:
|
||||
result = pm->countItemsWithCategory(ui::PouchCategory::Armor);
|
||||
break;
|
||||
case 5:
|
||||
result = pm->countItemsWithCategory(ui::PouchCategory::Material);
|
||||
break;
|
||||
case 6:
|
||||
result = pm->countItemsWithCategory(ui::PouchCategory::Food);
|
||||
break;
|
||||
case 7:
|
||||
result = pm->countItemsWithCategory(ui::PouchCategory::KeyItem);
|
||||
break;
|
||||
default:
|
||||
result = 0;
|
||||
break;
|
||||
}
|
||||
return result < *mCount;
|
||||
}
|
||||
|
||||
void HasPouchItemByPouchCategory::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryHasSetItem.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,24 @@ HasSetItem::HasSetItem(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
HasSetItem::~HasSetItem() = default;
|
||||
|
||||
// FIXME: implement
|
||||
// NON_MATCHING: temp duplication
|
||||
int HasSetItem::doQuery() {
|
||||
return -1;
|
||||
auto* gdm = ksys::gdt::Manager::instance();
|
||||
if (gdm == nullptr)
|
||||
return 0;
|
||||
|
||||
auto flag_type = gdm->getParam().get1().getBuffer()->getFlagType(mItemName);
|
||||
|
||||
if (flag_type == ksys::gdt::FlagType::Bool) {
|
||||
bool value = false;
|
||||
if (gdm->getParamBypassPerm().get().getBool(&value, mItemName))
|
||||
return value;
|
||||
} else if (flag_type == ksys::gdt::FlagType::S32) {
|
||||
s32 value = 0;
|
||||
if (gdm->getParamBypassPerm().get().getS32(&value, mItemName))
|
||||
return value >= *mCount;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HasSetItem::loadParams(const evfl::QueryArg& arg) {
|
||||
|
||||
@@ -7,9 +7,8 @@ IsAppAlreadyExchanged::IsAppAlreadyExchanged(const InitArg& arg) : ksys::act::ai
|
||||
|
||||
IsAppAlreadyExchanged::~IsAppAlreadyExchanged() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsAppAlreadyExchanged::doQuery() {
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void IsAppAlreadyExchanged::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryIsBloodyMoonTrig.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/World/worldManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ IsBloodyMoonTrig::IsBloodyMoonTrig(const InitArg& arg) : ksys::act::ai::Query(ar
|
||||
|
||||
IsBloodyMoonTrig::~IsBloodyMoonTrig() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsBloodyMoonTrig::doQuery() {
|
||||
return -1;
|
||||
return ksys::world::Manager::instance()->getTimeMgr()->wasBloodyDayAndDayPassed();
|
||||
}
|
||||
|
||||
void IsBloodyMoonTrig::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryIsCurrentAocFieldStage.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/System/StageInfo.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ IsCurrentAocFieldStage::IsCurrentAocFieldStage(const InitArg& arg) : ksys::act::
|
||||
|
||||
IsCurrentAocFieldStage::~IsCurrentAocFieldStage() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsCurrentAocFieldStage::doQuery() {
|
||||
return -1;
|
||||
return ksys::StageInfo::sIsAocField;
|
||||
}
|
||||
|
||||
void IsCurrentAocFieldStage::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryIsCurrentCDungeonStage.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/System/StageInfo.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ IsCurrentCDungeonStage::IsCurrentCDungeonStage(const InitArg& arg) : ksys::act::
|
||||
|
||||
IsCurrentCDungeonStage::~IsCurrentCDungeonStage() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsCurrentCDungeonStage::doQuery() {
|
||||
return -1;
|
||||
return ksys::StageInfo::sIsCDungeon;
|
||||
}
|
||||
|
||||
void IsCurrentCDungeonStage::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryIsCurrentMainFieldDungeonStage.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/System/StageInfo.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -8,9 +9,8 @@ IsCurrentMainFieldDungeonStage::IsCurrentMainFieldDungeonStage(const InitArg& ar
|
||||
|
||||
IsCurrentMainFieldDungeonStage::~IsCurrentMainFieldDungeonStage() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsCurrentMainFieldDungeonStage::doQuery() {
|
||||
return -1;
|
||||
return ksys::StageInfo::sIsMainFieldDungeon;
|
||||
}
|
||||
|
||||
void IsCurrentMainFieldDungeonStage::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryIsCurrentMainFieldStage.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/System/StageInfo.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ IsCurrentMainFieldStage::IsCurrentMainFieldStage(const InitArg& arg) : ksys::act
|
||||
|
||||
IsCurrentMainFieldStage::~IsCurrentMainFieldStage() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsCurrentMainFieldStage::doQuery() {
|
||||
return -1;
|
||||
return ksys::StageInfo::getCurrentMapType() == "MainField";
|
||||
}
|
||||
|
||||
void IsCurrentMainFieldStage::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryIsItemInStock.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/GameData/gdtManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,16 @@ IsItemInStock::IsItemInStock(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
IsItemInStock::~IsItemInStock() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsItemInStock::doQuery() {
|
||||
return -1;
|
||||
auto* gdm = ksys::gdt::Manager::instance();
|
||||
if (gdm != nullptr) {
|
||||
s32 state = -1;
|
||||
if (!gdm->getParam().get().getS32(&state, "Shop_CurrentItemState"))
|
||||
return 1;
|
||||
if (state == 1)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void IsItemInStock::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryIsOnInstEventFlag.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actActor.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ IsOnInstEventFlag::IsOnInstEventFlag(const InitArg& arg) : ksys::act::ai::Query(
|
||||
|
||||
IsOnInstEventFlag::~IsOnInstEventFlag() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsOnInstEventFlag::doQuery() {
|
||||
return -1;
|
||||
return mActor->getActorFlags2().isOn(ksys::act::Actor::ActorFlag2::InstEvent);
|
||||
}
|
||||
|
||||
void IsOnInstEventFlag::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "Game/AI/Query/queryIsSuccessEndLastDemoAction.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/ActorSystem/actActor.h"
|
||||
#include "KingSystem/ActorSystem/actAiRoot.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -8,9 +10,16 @@ IsSuccessEndLastDemoAction::IsSuccessEndLastDemoAction(const InitArg& arg)
|
||||
|
||||
IsSuccessEndLastDemoAction::~IsSuccessEndLastDemoAction() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsSuccessEndLastDemoAction::doQuery() {
|
||||
return -1;
|
||||
if (mActor != nullptr && mActor->getRootAi() != nullptr) {
|
||||
auto* action = mActor->getRootAi()->getCurrentAction();
|
||||
if (action == nullptr)
|
||||
return 0;
|
||||
|
||||
if (action->isFinished())
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void IsSuccessEndLastDemoAction::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -7,9 +7,8 @@ IsTerrorDisappeared::IsTerrorDisappeared(const InitArg& arg) : ksys::act::ai::Qu
|
||||
|
||||
IsTerrorDisappeared::~IsTerrorDisappeared() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int IsTerrorDisappeared::doQuery() {
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void IsTerrorDisappeared::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryWhatDayOfTheWeek.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/World/worldManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ WhatDayOfTheWeek::WhatDayOfTheWeek(const InitArg& arg) : ksys::act::ai::Query(ar
|
||||
|
||||
WhatDayOfTheWeek::~WhatDayOfTheWeek() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int WhatDayOfTheWeek::doQuery() {
|
||||
return -1;
|
||||
return u8(ksys::world::Manager::instance()->getTimeMgr()->getNumberOfDays() % 7);
|
||||
}
|
||||
|
||||
void WhatDayOfTheWeek::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryWhatDungeonType.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/World/worldManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,8 @@ WhatDungeonType::WhatDungeonType(const InitArg& arg) : ksys::act::ai::Query(arg)
|
||||
|
||||
WhatDungeonType::~WhatDungeonType() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int WhatDungeonType::doQuery() {
|
||||
return -1;
|
||||
return u8(ksys::world::Manager::instance()->getDungeonType());
|
||||
}
|
||||
|
||||
void WhatDungeonType::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Game/AI/Query/queryWhatMoonName.h"
|
||||
#include <evfl/Query.h>
|
||||
#include "KingSystem/World/worldManager.h"
|
||||
|
||||
namespace uking::query {
|
||||
|
||||
@@ -7,9 +8,9 @@ WhatMoonName::WhatMoonName(const InitArg& arg) : ksys::act::ai::Query(arg) {}
|
||||
|
||||
WhatMoonName::~WhatMoonName() = default;
|
||||
|
||||
// FIXME: implement
|
||||
int WhatMoonName::doQuery() {
|
||||
return -1;
|
||||
auto* tm = ksys::world::Manager::instance()->getTimeMgr();
|
||||
return static_cast<int>(tm->getMoonType());
|
||||
}
|
||||
|
||||
void WhatMoonName::loadParams(const evfl::QueryArg& arg) {}
|
||||
|
||||
@@ -34,4 +34,8 @@ int getItemGeneralLife(const char* name);
|
||||
// TODO: move this to yet another translation unit (TBD but not the same one as the above)
|
||||
void addItemForDebug(const sead::SafeString& name, int value);
|
||||
|
||||
int countCookResultsCheck(const sead::SafeString& name, s32 effect_type);
|
||||
int countCookResultsAllOk(const sead::SafeString& name);
|
||||
int getItemValue(const sead::SafeString& name);
|
||||
|
||||
} // namespace uking::ui
|
||||
|
||||
@@ -40,7 +40,9 @@ public:
|
||||
};
|
||||
|
||||
enum class ActorFlag2 {
|
||||
InstEvent = 0x8,
|
||||
NoDistanceCheck = 0x80,
|
||||
Alive = 0x4000000,
|
||||
};
|
||||
|
||||
enum class DeleteType {
|
||||
@@ -70,7 +72,7 @@ public:
|
||||
bool is_life_infinite, int i, int life) const;
|
||||
|
||||
virtual s32 getMaxLife();
|
||||
|
||||
virtual s32* getLife();
|
||||
virtual LifeRecoverInfo* getLifeRecoverInfo();
|
||||
|
||||
void emitBasicSigOn();
|
||||
|
||||
@@ -165,4 +165,6 @@ bool getSameGroupActorName(sead::SafeString* name, const sead::SafeString& defau
|
||||
al::ByamlIter* actor_info);
|
||||
bool getSameGroupActorName(sead::SafeString* name, const sead::SafeString& actor_name);
|
||||
|
||||
s32 getSelectedChoiceIdx(s32 max, const char* query_name);
|
||||
|
||||
} // namespace ksys::act
|
||||
|
||||
@@ -14,6 +14,9 @@ class PlayerInfo {
|
||||
|
||||
public:
|
||||
PlayerBase* getPlayer() const;
|
||||
s32 getLife() const;
|
||||
u32 getMaxHearts() const;
|
||||
f32 getMaxStamina() const;
|
||||
};
|
||||
|
||||
} // namespace ksys::act
|
||||
|
||||
@@ -207,6 +207,8 @@ public:
|
||||
|
||||
void allowPaletteOverride();
|
||||
|
||||
float getWarpMistIntensity() const { return mWarpMistIntensity; }
|
||||
|
||||
protected:
|
||||
void init_(sead::Heap* heap) override;
|
||||
void calc_() override;
|
||||
|
||||
@@ -98,6 +98,7 @@ public:
|
||||
BloodMoonForceMode getBloodMoonForceMode() const { return mBloodMoonForceMode; }
|
||||
bool isPlayedDemo103Or997() const { return mPlayedDemo103Or997; }
|
||||
bool isFindDungeonActivated() const { return mFindDungeonActivated; }
|
||||
bool wasBloodyDayAndDayPassed() const { return mWasBloodyDayAndDayPassed; }
|
||||
bool isResetGdtOnNextSceneUnloadForBloodMoon() const {
|
||||
return mResetGdtOnNextSceneUnloadForBloodMoon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user