mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-24 06:41:52 -05:00
Remove potion values (#5021)
This commit is contained in:
parent
8ce5c46531
commit
0177690b54
@ -1161,30 +1161,6 @@ void RegisterCustomSkeletons() {
|
||||
});
|
||||
}
|
||||
|
||||
#define FAIRY_FLAG_BIG (1 << 9)
|
||||
|
||||
|
||||
void RegisterFairyCustomization() {
|
||||
REGISTER_VB_SHOULD(VB_FAIRY_HEAL, {
|
||||
EnElf* enElf = va_arg(args, EnElf*);
|
||||
// Don't trigger if fairy is shuffled
|
||||
if (!IS_RANDO || !OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_FAIRIES) || enElf->sohFairyIdentity.randomizerInf == RAND_INF_MAX) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyEffect"), 0) && !(enElf->fairyFlags & FAIRY_FLAG_BIG))
|
||||
{
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyPercentRestore"), 0))
|
||||
{
|
||||
Health_ChangeBy(gPlayState, (gSaveContext.healthCapacity * CVarGetInteger(CVAR_ENHANCEMENT("FairyHealth"), 100) / 100 + 15) / 16 * 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
Health_ChangeBy(gPlayState, CVarGetInteger(CVAR_ENHANCEMENT("FairyHealth"), 8) * 16);
|
||||
}
|
||||
*should = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void InitMods() {
|
||||
BossRush_RegisterHooks();
|
||||
RandomizerRegisterHooks();
|
||||
@ -1217,6 +1193,5 @@ void InitMods() {
|
||||
RegisterHurtContainerModeHandler();
|
||||
RegisterPauseMenuHooks();
|
||||
RandoKaleido_RegisterHooks();
|
||||
RegisterFairyCustomization();
|
||||
RegisterCustomSkeletons();
|
||||
}
|
||||
|
@ -105,29 +105,6 @@ const std::vector<const char*> enhancementsCvars = {
|
||||
CVAR_ENHANCEMENT("GoronPot"),
|
||||
CVAR_ENHANCEMENT("FullHealthSpawn"),
|
||||
CVAR_ENHANCEMENT("DampeWin"),
|
||||
CVAR_ENHANCEMENT("RedPotionEffect"),
|
||||
CVAR_ENHANCEMENT("RedPotionHealth"),
|
||||
CVAR_ENHANCEMENT("RedPercentRestore"),
|
||||
CVAR_ENHANCEMENT("GreenPotionEffect"),
|
||||
CVAR_ENHANCEMENT("GreenPotionMana"),
|
||||
CVAR_ENHANCEMENT("GreenPercentRestore"),
|
||||
CVAR_ENHANCEMENT("BluePotionEffects"),
|
||||
CVAR_ENHANCEMENT("BluePotionHealth"),
|
||||
CVAR_ENHANCEMENT("BlueHealthPercentRestore"),
|
||||
CVAR_ENHANCEMENT("BluePotionMana"),
|
||||
CVAR_ENHANCEMENT("BlueManaPercentRestore"),
|
||||
CVAR_ENHANCEMENT("MilkEffect"),
|
||||
CVAR_ENHANCEMENT("MilkHealth"),
|
||||
CVAR_ENHANCEMENT("MilkPercentRestore"),
|
||||
CVAR_ENHANCEMENT("SeparateHalfMilkEffect"),
|
||||
CVAR_ENHANCEMENT("HalfMilkHealth"),
|
||||
CVAR_ENHANCEMENT("HalfMilkPercentRestore"),
|
||||
CVAR_ENHANCEMENT("FairyEffect"),
|
||||
CVAR_ENHANCEMENT("FairyHealth"),
|
||||
CVAR_ENHANCEMENT("FairyPercentRestore"),
|
||||
CVAR_ENHANCEMENT("FairyReviveEffect"),
|
||||
CVAR_ENHANCEMENT("FairyReviveHealth"),
|
||||
CVAR_ENHANCEMENT("FairyRevivePercentRestore"),
|
||||
CVAR_ENHANCEMENT("CustomizeFishing"),
|
||||
CVAR_ENHANCEMENT("InstantFishing"),
|
||||
CVAR_ENHANCEMENT("GuaranteeFishingBite"),
|
||||
|
@ -83,7 +83,7 @@ void ShuffleFairies_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should,
|
||||
|
||||
va_end(args);
|
||||
|
||||
// Grant item when picking up fairy. If randomized, disable healing effect.
|
||||
// Grant item when picking up fairy.
|
||||
if (id == VB_FAIRY_HEAL) {
|
||||
EnElf* enElf = (EnElf*)(actor);
|
||||
if (enElf->sohFairyIdentity.randomizerInf && enElf->sohFairyIdentity.randomizerInf != RAND_INF_MAX) {
|
||||
|
@ -926,95 +926,6 @@ void DrawEnhancementsMenu() {
|
||||
|
||||
if (ImGui::BeginMenu("Difficulty Options"))
|
||||
{
|
||||
if (ImGui::BeginMenu("Potion Values"))
|
||||
{
|
||||
UIWidgets::EnhancementCheckbox("Change Red Potion Effect", CVAR_ENHANCEMENT("RedPotionEffect"));
|
||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Red Potions");
|
||||
bool disabledRedPotion = !CVarGetInteger(CVAR_ENHANCEMENT("RedPotionEffect"), 0);
|
||||
static const char* disabledTooltipRedPotion = "This option is disabled because \"Change Red Potion Effect\" is turned off";
|
||||
UIWidgets::EnhancementSliderInt("Red Potion Health: %d", "##REDPOTIONHEALTH", CVAR_ENHANCEMENT("RedPotionHealth"), 1, 100, "", 0, true, disabledRedPotion, disabledTooltipRedPotion);
|
||||
UIWidgets::Tooltip("Changes the amount of health restored by Red Potions");
|
||||
UIWidgets::EnhancementCheckbox("Red Potion Percent Restore", CVAR_ENHANCEMENT("RedPercentRestore"), disabledRedPotion, disabledTooltipRedPotion);
|
||||
UIWidgets::Tooltip("Toggles from Red Potions restoring a fixed amount of health to a percent of the player's current max health");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Change Green Potion Effect", CVAR_ENHANCEMENT("GreenPotionEffect"));
|
||||
UIWidgets::Tooltip("Enable the following changes to the amount of mana restored by Green Potions");
|
||||
bool disabledGreenPotion = !CVarGetInteger(CVAR_ENHANCEMENT("GreenPotionEffect"), 0);
|
||||
static const char* disabledTooltipGreenPotion = "This option is disabled because \"Change Green Potion Effect\" is turned off";
|
||||
UIWidgets::EnhancementSliderInt("Green Potion Mana: %d", "##GREENPOTIONMANA", CVAR_ENHANCEMENT("GreenPotionMana"), 1, 100, "", 0, true, disabledGreenPotion, disabledTooltipGreenPotion);
|
||||
UIWidgets::Tooltip("Changes the amount of mana restored by Green Potions, base max mana is 48, max upgraded mana is 96");
|
||||
UIWidgets::EnhancementCheckbox("Green Potion Percent Restore", CVAR_ENHANCEMENT("GreenPercentRestore"), disabledGreenPotion, disabledTooltipGreenPotion);
|
||||
UIWidgets::Tooltip("Toggles from Green Potions restoring a fixed amount of mana to a percent of the player's current max mana");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Change Blue Potion Effects", CVAR_ENHANCEMENT("BluePotionEffects"));
|
||||
UIWidgets::Tooltip("Enable the following changes to the amount of health and mana restored by Blue Potions");
|
||||
bool disabledBluePotion = !CVarGetInteger(CVAR_ENHANCEMENT("BluePotionEffects"), 0);
|
||||
static const char* disabledTooltipBluePotion = "This option is disabled because \"Change Blue Potion Effects\" is turned off";
|
||||
UIWidgets::EnhancementSliderInt("Blue Potion Health: %d", "##BLUEPOTIONHEALTH", CVAR_ENHANCEMENT("BluePotionHealth"), 1, 100, "", 0, true, disabledBluePotion, disabledTooltipBluePotion);
|
||||
UIWidgets::Tooltip("Changes the amount of health restored by Blue Potions");
|
||||
UIWidgets::EnhancementCheckbox("Blue Potion Health Percent Restore", CVAR_ENHANCEMENT("BlueHealthPercentRestore"), disabledBluePotion, disabledTooltipBluePotion);
|
||||
UIWidgets::Tooltip("Toggles from Blue Potions restoring a fixed amount of health to a percent of the player's current max health");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
UIWidgets::EnhancementSliderInt("Blue Potion Mana: %d", "##BLUEPOTIONMANA", CVAR_ENHANCEMENT("BluePotionMana"), 1, 100, "", 0, true, disabledBluePotion, disabledTooltipBluePotion);
|
||||
UIWidgets::Tooltip("Changes the amount of mana restored by Blue Potions, base max mana is 48, max upgraded mana is 96");
|
||||
UIWidgets::EnhancementCheckbox("Blue Potion Mana Percent Restore", CVAR_ENHANCEMENT("BlueManaPercentRestore"), disabledBluePotion, disabledTooltipBluePotion);
|
||||
UIWidgets::Tooltip("Toggles from Blue Potions restoring a fixed amount of mana to a percent of the player's current max mana");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Change Milk Effect", CVAR_ENHANCEMENT("MilkEffect"));
|
||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Milk");
|
||||
bool disabledMilk = !CVarGetInteger(CVAR_ENHANCEMENT("MilkEffect"), 0);
|
||||
static const char* disabledTooltipMilk = "This option is disabled because \"Change Milk Effect\" is turned off";
|
||||
UIWidgets::EnhancementSliderInt("Milk Health: %d", "##MILKHEALTH", CVAR_ENHANCEMENT("MilkHealth"), 1, 100, "", 0, true, disabledMilk, disabledTooltipMilk);
|
||||
UIWidgets::Tooltip("Changes the amount of health restored by Milk");
|
||||
UIWidgets::EnhancementCheckbox("Milk Percent Restore", CVAR_ENHANCEMENT("MilkPercentRestore"), disabledMilk, disabledTooltipMilk);
|
||||
UIWidgets::Tooltip("Toggles from Milk restoring a fixed amount of health to a percent of the player's current max health");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Separate Half Milk Effect", CVAR_ENHANCEMENT("SeparateHalfMilkEffect"), disabledMilk, disabledTooltipMilk);
|
||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Half Milk\nIf this is disabled, Half Milk will behave the same as Full Milk.");
|
||||
bool disabledHalfMilk = disabledMilk || !CVarGetInteger(CVAR_ENHANCEMENT("SeparateHalfMilkEffect"), 0);
|
||||
static const char* disabledTooltipHalfMilk = "This option is disabled because \"Separate Half Milk Effect\" is turned off";
|
||||
UIWidgets::EnhancementSliderInt("Half Milk Health: %d", "##HALFMILKHEALTH", CVAR_ENHANCEMENT("HalfMilkHealth"), 1, 100, "", 0, true, disabledHalfMilk, disabledTooltipHalfMilk);
|
||||
UIWidgets::Tooltip("Changes the amount of health restored by Half Milk");
|
||||
UIWidgets::EnhancementCheckbox("Half Milk Percent Restore", CVAR_ENHANCEMENT("HalfMilkPercentRestore"), disabledHalfMilk, disabledTooltipHalfMilk);
|
||||
UIWidgets::Tooltip("Toggles from Half Milk restoring a fixed amount of health to a percent of the player's current max health");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Change Fairy Effect", CVAR_ENHANCEMENT("FairyEffect"));
|
||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Fairies");
|
||||
bool disabledFairy = !CVarGetInteger(CVAR_ENHANCEMENT("FairyEffect"), 0);
|
||||
static const char* disabledTooltipFairy = "This option is disabled because \"Change Fairy Effect\" is turned off";
|
||||
UIWidgets::EnhancementSliderInt("Fairy: %d", "##FAIRYHEALTH", CVAR_ENHANCEMENT("FairyHealth"), 1, 100, "", 0, true, disabledFairy, disabledTooltipFairy);
|
||||
UIWidgets::Tooltip("Changes the amount of health restored by Fairies");
|
||||
UIWidgets::EnhancementCheckbox("Fairy Percent Restore", CVAR_ENHANCEMENT("FairyPercentRestore"), disabledFairy, disabledTooltipFairy);
|
||||
UIWidgets::Tooltip("Toggles from Fairies restoring a fixed amount of health to a percent of the player's current max health");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
UIWidgets::EnhancementCheckbox("Change Fairy Revive Effect", CVAR_ENHANCEMENT("FairyReviveEffect"));
|
||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Fairy Revivals");
|
||||
bool disabledFairyRevive = !CVarGetInteger(CVAR_ENHANCEMENT("FairyReviveEffect"), 0);
|
||||
static const char* disabledTooltipFairyRevive = "This option is disabled because \"Change Fairy Revive Effect\" is turned off";
|
||||
UIWidgets::EnhancementSliderInt("Fairy Revival: %d", "##FAIRYREVIVEHEALTH", CVAR_ENHANCEMENT("FairyReviveHealth"), 1, 100, "", 0, true, disabledFairyRevive, disabledTooltipFairyRevive);
|
||||
UIWidgets::Tooltip("Changes the amount of health restored by Fairy Revivals");
|
||||
UIWidgets::EnhancementCheckbox("Fairy Revive Percent Restore", CVAR_ENHANCEMENT("FairyRevivePercentRestore"), disabledFairyRevive, disabledTooltipFairyRevive);
|
||||
UIWidgets::Tooltip("Toggles from Fairy Revivals restoring a fixed amount of health to a percent of the player's current max health");
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
if (ImGui::BeginMenu("Shooting Gallery")) {
|
||||
UIWidgets::EnhancementCheckbox("Customize Behavior", CVAR_ENHANCEMENT("CustomizeShootingGallery"));
|
||||
UIWidgets::Tooltip("Turn on/off changes to the shooting gallery behavior");
|
||||
|
@ -149,11 +149,6 @@ namespace SOH {
|
||||
{ MigrationAction::Rename, "gBetterFW", "gEnhancements.BetterFarore" },
|
||||
{ MigrationAction::Rename, "gBetterOwl", "gEnhancements.BetterOwl" },
|
||||
{ MigrationAction::Rename, "gBlueFireArrows", "gEnhancements.BlueFireArrows" },
|
||||
{ MigrationAction::Rename, "gBlueHealthPercentRestore", "gEnhancements.BlueHealthPercentRestore" },
|
||||
{ MigrationAction::Rename, "gBlueManaPercentRestore", "gEnhancements.BlueManaPercentRestore" },
|
||||
{ MigrationAction::Rename, "gBluePotionEffects", "gEnhancements.BluePotionEffects" },
|
||||
{ MigrationAction::Rename, "gBluePotionHealth", "gEnhancements.BluePotionHealth" },
|
||||
{ MigrationAction::Rename, "gBluePotionMana", "gEnhancements.BluePotionMana" },
|
||||
{ MigrationAction::Rename, "gBombchuBowlingAmmunition", "gEnhancements.BombchuBowlingAmmo" },
|
||||
{ MigrationAction::Rename, "gBombchuBowlingNoBigCucco", "gEnhancements.BombchuBowlingNoBigCucco" },
|
||||
{ MigrationAction::Rename, "gBombchuBowlingNoSmallCucco", "gEnhancements.BombchuBowlingNoSmallCucco" },
|
||||
@ -205,12 +200,6 @@ namespace SOH {
|
||||
{ MigrationAction::Rename, "gEnemySpawnsOverWaterboxes", "gEnhancements.EnemySpawnsOverWaterboxes" },
|
||||
{ MigrationAction::Rename, "gEquipmentCanBeRemoved", "gEnhancements.EquipmentCanBeRemoved" },
|
||||
{ MigrationAction::Rename, "gFPSGauntlets", "gEnhancements.FirstPersonGauntlets" },
|
||||
{ MigrationAction::Rename, "gFairyEffect", "gEnhancements.FairyEffect" },
|
||||
{ MigrationAction::Rename, "gFairyHealth", "gEnhancements.FairyHealth" },
|
||||
{ MigrationAction::Rename, "gFairyPercentRestore", "gEnhancements.FairyPercentRestore" },
|
||||
{ MigrationAction::Rename, "gFairyReviveEffect", "gEnhancements.FairyReviveEffect" },
|
||||
{ MigrationAction::Rename, "gFairyReviveHealth", "gEnhancements.FairyReviveHealth" },
|
||||
{ MigrationAction::Rename, "gFairyRevivePercentRestore", "gEnhancements.FairyRevivePercentRestore" },
|
||||
{ MigrationAction::Rename, "gFallDamageMul", "gEnhancements.FallDamageMult" },
|
||||
{ MigrationAction::Rename, "gFastBoomerang", "gEnhancements.FastBoomerang" },
|
||||
{ MigrationAction::Rename, "gFastChests", "gEnhancements.FastChests" },
|
||||
@ -235,14 +224,9 @@ namespace SOH {
|
||||
{ MigrationAction::Rename, "gGerudoWarriorClothingFix", "gEnhancements.GerudoWarriorClothingFix" },
|
||||
{ MigrationAction::Rename, "gGoronPot", "gEnhancements.GoronPot" },
|
||||
{ MigrationAction::Rename, "gGravediggingTourFix", "gEnhancements.GravediggingTourFix" },
|
||||
{ MigrationAction::Rename, "gGreenPercentRestore", "gEnhancements.GreenPercentRestore" },
|
||||
{ MigrationAction::Rename, "gGreenPotionEffect", "gEnhancements.GreenPotionEffect" },
|
||||
{ MigrationAction::Rename, "gGreenPotionMana", "gEnhancements.GreenPotionMana" },
|
||||
{ MigrationAction::Rename, "gGsCutscene", "gEnhancements.GSCutscene" },
|
||||
{ MigrationAction::Rename, "gGuaranteeFishingBite", "gEnhancements.GuaranteeFishingBite" },
|
||||
{ MigrationAction::Rename, "gGuardVision", "gEnhancements.GuardVision" },
|
||||
{ MigrationAction::Rename, "gHalfMilkHealth", "gEnhancements.HalfMilkHealth" },
|
||||
{ MigrationAction::Rename, "gHalfMilkPercentRestore", "gEnhancements.HalfMilkPercentRestore" },
|
||||
{ MigrationAction::Rename, "gHideBunnyHood", "gEnhancements.HideBunnyHood" },
|
||||
{ MigrationAction::Rename, "gHookshotableReticle", "gEnhancements.HookshotableReticle" },
|
||||
{ MigrationAction::Rename, "gHoverFishing", "gEnhancements.HoverFishing" },
|
||||
@ -259,9 +243,6 @@ namespace SOH {
|
||||
{ MigrationAction::Rename, "gMMBunnyHood", "gEnhancements.MMBunnyHood" },
|
||||
{ MigrationAction::Rename, "gMarketSneak", "gEnhancements.MarketSneak" },
|
||||
{ MigrationAction::Rename, "gMaskSelect", "gEnhancements.MaskSelect" },
|
||||
{ MigrationAction::Rename, "gMilkEffect", "gEnhancements.MilkEffect" },
|
||||
{ MigrationAction::Rename, "gMilkHealth", "gEnhancements.MilkHealth" },
|
||||
{ MigrationAction::Rename, "gMilkPercentRestore", "gEnhancements.MilkPercentRestore" },
|
||||
{ MigrationAction::Rename, "gMinFrameCount", "gEnhancements.MinFrameCount" },
|
||||
{ MigrationAction::Rename, "gMinimalUI", "gEnhancements.MinimalUI" },
|
||||
{ MigrationAction::Rename, "gMirroredWorldMode", "gEnhancements.MirroredWorldMode" },
|
||||
@ -291,16 +272,12 @@ namespace SOH {
|
||||
{ MigrationAction::Rename, "gRandomizedEnemies", "gEnhancements.RandomizedEnemies" },
|
||||
{ MigrationAction::Rename, "gRandomizedEnemySizes", "gEnhancements.RandomizedEnemySizes" },
|
||||
{ MigrationAction::Rename, "gRedGanonBlood", "gEnhancements.RedGanonBlood" },
|
||||
{ MigrationAction::Rename, "gRedPercentRestore", "gEnhancements.RedPercentRestore" },
|
||||
{ MigrationAction::Rename, "gRedPotionEffect", "gEnhancements.RedPotionEffect" },
|
||||
{ MigrationAction::Rename, "gRedPotionHealth", "gEnhancements.RedPotionHealth" },
|
||||
{ MigrationAction::Rename, "gRememberSaveLocation", "gEnhancements.RememberSaveLocation" },
|
||||
{ MigrationAction::Rename, "gRemoveExplosiveLimit", "gEnhancements.RemoveExplosiveLimit" },
|
||||
{ MigrationAction::Rename, "gRestoreRBAValues", "gEnhancements.RestoreRBAValues" },
|
||||
{ MigrationAction::Rename, "gRupeeDash", "gEnhancements.RupeeDash" },
|
||||
{ MigrationAction::Rename, "gSceneSpecificDirtPathFix", "gEnhancements.SceneSpecificDirtPathFix" },
|
||||
{ MigrationAction::Rename, "gSeparateArrows", "gEnhancements.SeparateArrows" },
|
||||
{ MigrationAction::Rename, "gSeparateHalfMilkEffect", "gEnhancements.SeparateHalfMilkEffect" },
|
||||
{ MigrationAction::Rename, "gShadowTag", "gEnhancements.ShadowTag" },
|
||||
{ MigrationAction::Rename, "gShowDoorLocksOnBothSides", "gEnhancements.ShowDoorLocksOnBothSides" },
|
||||
{ MigrationAction::Rename, "gSilverRupeeJingleExtend", "gEnhancements.SilverRupeeJingleExtend" },
|
||||
|
@ -9468,16 +9468,7 @@ void func_80843AE8(PlayState* play, Player* this) {
|
||||
LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_derth_rebirth, 1.0f, 99.0f,
|
||||
Animation_GetLastFrame(&gPlayerAnim_link_derth_rebirth), ANIMMODE_ONCE, 0.0f);
|
||||
}
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyReviveEffect"), 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyRevivePercentRestore"), 0)) {
|
||||
gSaveContext.healthAccumulator =
|
||||
(gSaveContext.healthCapacity * CVarGetInteger(CVAR_ENHANCEMENT("FairyReviveHealth"), 100) / 100 + 15) / 16 * 16;
|
||||
} else {
|
||||
gSaveContext.healthAccumulator = CVarGetInteger(CVAR_ENHANCEMENT("FairyReviveHealth"), 20) * 16;
|
||||
}
|
||||
} else {
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
}
|
||||
this->av2.actionVar2 = -1;
|
||||
}
|
||||
} else if (gSaveContext.healthAccumulator == 0) {
|
||||
@ -14481,13 +14472,13 @@ void Player_Action_8084E9AC(Player* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
static u8 D_808549FC[] = {
|
||||
0x01, 0x03, 0x02, 0x04, 0x04,
|
||||
};
|
||||
|
||||
void Player_Action_8084EAC0(Player* this, PlayState* play) {
|
||||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
if (this->av2.actionVar2 == 0) {
|
||||
static u8 D_808549FC[] = {
|
||||
0x01, 0x03, 0x02, 0x04, 0x04,
|
||||
};
|
||||
|
||||
if (this->itemAction == PLAYER_IA_BOTTLE_POE) {
|
||||
s32 rand = Rand_S16Offset(-1, 3);
|
||||
|
||||
@ -14507,77 +14498,6 @@ void Player_Action_8084EAC0(Player* this, PlayState* play) {
|
||||
} else {
|
||||
s32 sp28 = D_808549FC[this->itemAction - PLAYER_IA_BOTTLE_POTION_RED];
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RedPotionEffect"), 0) && this->itemAction == PLAYER_IA_BOTTLE_POTION_RED) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RedPercentRestore"), 0)) {
|
||||
gSaveContext.healthAccumulator =
|
||||
(gSaveContext.healthCapacity * CVarGetInteger(CVAR_ENHANCEMENT("RedPotionHealth"), 100) / 100 + 15) / 16 * 16;
|
||||
} else {
|
||||
gSaveContext.healthAccumulator = CVarGetInteger(CVAR_ENHANCEMENT("RedPotionHealth"), 20) * 16;
|
||||
}
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("BluePotionEffects"), 0) &&
|
||||
this->itemAction == PLAYER_IA_BOTTLE_POTION_BLUE) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BlueHealthPercentRestore"), 0)) {
|
||||
gSaveContext.healthAccumulator =
|
||||
(gSaveContext.healthCapacity * CVarGetInteger(CVAR_ENHANCEMENT("BluePotionHealth"), 100) / 100 + 15) / 16 * 16;
|
||||
} else {
|
||||
gSaveContext.healthAccumulator = CVarGetInteger(CVAR_ENHANCEMENT("BluePotionHealth"), 20) * 16;
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("BlueManaPercentRestore"), 0)) {
|
||||
if (gSaveContext.magicState != MAGIC_STATE_ADD) {
|
||||
Magic_Fill(play);
|
||||
}
|
||||
|
||||
Magic_RequestChange(play,
|
||||
(gSaveContext.magicLevel * 48 * CVarGetInteger(CVAR_ENHANCEMENT("BluePotionMana"), 100) / 100 + 15) /
|
||||
16 * 16,
|
||||
MAGIC_ADD);
|
||||
} else {
|
||||
if (gSaveContext.magicState != MAGIC_STATE_ADD) {
|
||||
Magic_Fill(play);
|
||||
}
|
||||
|
||||
Magic_RequestChange(play, CVarGetInteger(CVAR_ENHANCEMENT("BluePotionMana"), 100), MAGIC_ADD);
|
||||
;
|
||||
}
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("GreenPotionEffect"), 0) &&
|
||||
this->itemAction == PLAYER_IA_BOTTLE_POTION_GREEN) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("GreenPercentRestore"), 0)) {
|
||||
if (gSaveContext.magicState != MAGIC_STATE_ADD) {
|
||||
Magic_Fill(play);
|
||||
}
|
||||
|
||||
Magic_RequestChange(play,
|
||||
(gSaveContext.magicLevel * 48 * CVarGetInteger(CVAR_ENHANCEMENT("GreenPotionMana"), 100) / 100 + 15) /
|
||||
16 * 16,
|
||||
MAGIC_ADD);
|
||||
} else {
|
||||
if (gSaveContext.magicState != MAGIC_STATE_ADD) {
|
||||
Magic_Fill(play);
|
||||
}
|
||||
|
||||
Magic_RequestChange(play, CVarGetInteger(CVAR_ENHANCEMENT("GreenPotionMana"), 100), MAGIC_ADD);
|
||||
;
|
||||
}
|
||||
} else if (CVarGetInteger(CVAR_ENHANCEMENT("MilkEffect"), 0) && (this->itemAction == PLAYER_IA_BOTTLE_MILK_FULL ||
|
||||
this->itemAction == PLAYER_IA_BOTTLE_MILK_HALF)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MilkPercentRestore"), 0)) {
|
||||
gSaveContext.healthAccumulator =
|
||||
(gSaveContext.healthCapacity * CVarGetInteger(CVAR_ENHANCEMENT("MilkHealth"), 100) / 100 + 15) / 16 * 16;
|
||||
} else {
|
||||
gSaveContext.healthAccumulator = CVarGetInteger(CVAR_ENHANCEMENT("MilkHealth"), 5) * 16;
|
||||
}
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("SeparateHalfMilkEffect"), 0) &&
|
||||
this->itemAction == PLAYER_IA_BOTTLE_MILK_HALF) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("HalfMilkPercentRestore"), 0)) {
|
||||
gSaveContext.healthAccumulator =
|
||||
(gSaveContext.healthCapacity * CVarGetInteger(CVAR_ENHANCEMENT("HalfMilkHealth"), 100) / 100 + 15) / 16 *
|
||||
16;
|
||||
} else {
|
||||
gSaveContext.healthAccumulator = CVarGetInteger(CVAR_ENHANCEMENT("HalfMilkHealth"), 5) * 16;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (sp28 & 1) {
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
}
|
||||
@ -14590,15 +14510,13 @@ void Player_Action_8084EAC0(Player* this, PlayState* play) {
|
||||
gSaveContext.healthAccumulator = 0x50;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Player_AnimPlayLoopAdjusted(play, this, &gPlayerAnim_link_bottle_drink_demo_wait);
|
||||
this->av2.actionVar2 = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
func_8083C0E8(this, play);
|
||||
func_8005B1A4(Play_GetCamera(play, 0));
|
||||
}
|
||||
} else if (this->av2.actionVar2 == 1) {
|
||||
if ((gSaveContext.healthAccumulator == 0) && (gSaveContext.magicState != MAGIC_STATE_FILL)) {
|
||||
Player_AnimChangeOnceMorphAdjusted(play, this, &gPlayerAnim_link_bottle_drink_demo_end);
|
||||
@ -14724,17 +14642,8 @@ void Player_Action_8084EED8(Player* this, PlayState* play) {
|
||||
Player_PlaySfx(this, NA_SE_EV_BOTTLE_CAP_OPEN);
|
||||
Player_PlaySfx(this, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
|
||||
} else if (LinkAnimation_OnFrame(&this->skelAnime, 47.0f)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyEffect"), 0)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FairyPercentRestore"), 0)) {
|
||||
gSaveContext.healthAccumulator =
|
||||
(gSaveContext.healthCapacity * CVarGetInteger(CVAR_ENHANCEMENT("FairyHealth"), 100) / 100 + 15) / 16 * 16;
|
||||
} else {
|
||||
gSaveContext.healthAccumulator = CVarGetInteger(CVAR_ENHANCEMENT("FairyHealth"), 8) * 16;
|
||||
}
|
||||
} else {
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static BottleDropInfo D_80854A28[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user