mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 04:42:18 -05:00
unbreakable/always on fire deku stick (#3192)
* Adds Ultra Deku Stick Cheat Author: Vexus <vdfk94@gmail.com> * implement the stuff * move enum to a resonable spot * Apply suggestions from code review * Update soh/src/overlays/actors/ovl_player_actor/z_player.c * i thought i could do everything through the gh web ui but fine i'll fix it locally --------- Co-authored-by: Vexus <vdfk94@gmail.com>
This commit is contained in:
parent
af19645a88
commit
56deb1cf64
@ -68,3 +68,9 @@ typedef enum {
|
||||
BONK_DAMAGE_8_HEARTS,
|
||||
BONK_DAMAGE_OHKO,
|
||||
} BonkDamage;
|
||||
|
||||
typedef enum {
|
||||
DEKU_STICK_NORMAL,
|
||||
DEKU_STICK_UNBREAKABLE,
|
||||
DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE,
|
||||
} DekuStickType;
|
||||
|
@ -83,6 +83,7 @@ std::string GetWindowButtonText(const char* text, bool menuOpen) {
|
||||
static const char* autosaveLabels[6] = { "Off", "New Location + Major Item", "New Location + Any Item", "New Location", "Major Item", "Any Item" };
|
||||
static const char* DebugSaveFileModes[3] = { "Off", "Vanilla", "Maxed" };
|
||||
static const char* FastFileSelect[5] = { "File N.1", "File N.2", "File N.3", "Zelda Map Select (require OoT Debug Mode)", "File select" };
|
||||
static const char* DekuStickCheat[3] = { "Normal", "Unbreakable", "Unbreakable + Always on Fire" };
|
||||
static const char* bonkDamageValues[8] = {
|
||||
"No Damage",
|
||||
"0.25 Heart",
|
||||
@ -1251,6 +1252,8 @@ void DrawCheatsMenu() {
|
||||
UIWidgets::Tooltip("This allows you to put up your shield with any two-handed weapon in hand except for Deku Sticks");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Time Sync", "gTimeSync", true, false);
|
||||
UIWidgets::Tooltip("This syncs the ingame time with the real world time");
|
||||
ImGui::Text("Deku Sticks:");
|
||||
UIWidgets::EnhancementCombobox("gDekuStickCheat", DekuStickCheat, DEKU_STICK_NORMAL);
|
||||
UIWidgets::PaddedEnhancementCheckbox("No ReDead/Gibdo Freeze", "gNoRedeadFreeze", true, false);
|
||||
UIWidgets::Tooltip("Prevents ReDeads and Gibdos from being able to freeze you with their scream");
|
||||
UIWidgets::Spacer(2.0f);
|
||||
|
@ -7998,13 +7998,15 @@ void func_80842A28(PlayState* play, Player* this) {
|
||||
}
|
||||
|
||||
void func_80842A88(PlayState* play, Player* this) {
|
||||
if (CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
Inventory_ChangeAmmo(ITEM_STICK, -1);
|
||||
func_80835F44(play, this, ITEM_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_80842AC4(PlayState* play, Player* this) {
|
||||
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_85C > 0.5f)) {
|
||||
if (AMMO(ITEM_STICK) != 0) {
|
||||
if (AMMO(ITEM_STICK) != 0 && CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND],
|
||||
this->actor.shape.rot.y + 0x8000);
|
||||
this->unk_85C = 0.5f;
|
||||
@ -10352,20 +10354,28 @@ static Color_RGBA8 D_808547C0 = { 255, 50, 0, 0 };
|
||||
void func_80848A04(PlayState* play, Player* this) {
|
||||
f32 temp;
|
||||
|
||||
if (this->unk_85C == 0.0f) {
|
||||
if (CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE) {
|
||||
f32 temp2 = 1.0f; // Secondary temporary variable to use with the alleged draw flame function
|
||||
this->unk_860 = 200; // Keeps the stick's flame lit
|
||||
this->unk_85C = 1.0f; // Ensures the stick is the proper length
|
||||
func_8002836C(play, &this->meleeWeaponInfo[0].tip, &D_808547A4, &D_808547B0, &D_808547BC, &D_808547C0, temp2 * 200.0f,
|
||||
0, 8); // I believe this draws the flame effect
|
||||
}
|
||||
|
||||
if (this->unk_85C == 0.0f && CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
func_80835F44(play, this, 0xFF);
|
||||
return;
|
||||
}
|
||||
|
||||
temp = 1.0f;
|
||||
if (DECR(this->unk_860) == 0) {
|
||||
if (DECR(this->unk_860) == 0 && CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
Inventory_ChangeAmmo(ITEM_STICK, -1);
|
||||
this->unk_860 = 1;
|
||||
temp = 0.0f;
|
||||
this->unk_85C = temp;
|
||||
} else if (this->unk_860 > 200) {
|
||||
temp = (210 - this->unk_860) / 10.0f;
|
||||
} else if (this->unk_860 < 20) {
|
||||
} else if (this->unk_860 < 20 && CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_NORMAL) {
|
||||
temp = this->unk_860 / 20.0f;
|
||||
this->unk_85C = temp;
|
||||
}
|
||||
@ -10627,7 +10637,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
|
||||
func_808473D4(play, this);
|
||||
func_80836BEC(this, play);
|
||||
|
||||
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_860 != 0)) {
|
||||
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && ((this->unk_860 != 0) || CVarGetInteger("gDekuStickCheat", DEKU_STICK_NORMAL) == DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE)) {
|
||||
func_80848A04(play, this);
|
||||
} else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 < 0)) {
|
||||
this->unk_860++;
|
||||
|
Loading…
Reference in New Issue
Block a user