diff --git a/res/DllResources.rc b/res/DllResources.rc index fdeaeb9..f0e75bc 100644 --- a/res/DllResources.rc +++ b/res/DllResources.rc @@ -9,8 +9,8 @@ MHUD2_ISAAC_FONT_CHARMAP RCDATA "files/MHUD2FontCharmap.texmap" OPENGL_HUD_SPRITE_VERTEX_SHADER RCDATA "shaders/hud_icon_vert.glsl" OPENGL_HUD_SPRITE_FRAG_SHADER RCDATA "shaders/hud_icon_frag.glsl" -#define PRODUCT_VER 1,3,1,0 -#define PRODUCT_VER_STR "1.3.1" +#define PRODUCT_VER 1,3,2,0 +#define PRODUCT_VER_STR "1.3.2" #ifdef NDEBUG #define VER_DEBUG 0 diff --git a/res/WinResource.rc b/res/WinResource.rc index 8aa2e6e..dfeddbb 100644 --- a/res/WinResource.rc +++ b/res/WinResource.rc @@ -2,8 +2,8 @@ APP_ICON ICON "files/MissingHUD2_Ico.ico" -#define PRODUCT_VER 1,3,1,0 -#define PRODUCT_VER_STR "1.3.1" +#define PRODUCT_VER 1,3,2,0 +#define PRODUCT_VER_STR "1.3.2" #ifdef NDEBUG #define VER_DEBUG 0 diff --git a/src/LoaderGUI.ui b/src/LoaderGUI.ui index d945cef..34e0639 100644 --- a/src/LoaderGUI.ui +++ b/src/LoaderGUI.ui @@ -215,7 +215,7 @@ - <a href="https://github.com/networkMe/missinghud2/releases">v1.3.1</a> + <a href="https://github.com/networkMe/missinghud2/releases">v1.3.2</a> Qt::RichText diff --git a/src/dll/RebirthMemReader.cpp b/src/dll/RebirthMemReader.cpp index b105025..1a1b812 100644 --- a/src/dll/RebirthMemReader.cpp +++ b/src/dll/RebirthMemReader.cpp @@ -105,12 +105,6 @@ float RebirthMemReader::GetDealWithDevilChance() if (current_floor_ == 1 || current_floor_ > 8) // In-eligible for natural DWD on these floors (even with Goat Head) return 0.0f; - // If these 2 conditions are met, you get a guaranteed DWD. I have not a clue what sets these though! - DWORD dwd_floor_flag_unknown_1 = *((DWORD*)(player_manager_inst + PLAYER_MANAGER_DEVILDEAL_UNKNOWN_1)); - DWORD dwd_floor_flag_unknown_2 = *((DWORD*)(player_manager_inst + PLAYER_MANAGER_DEVILDEAL_UNKNOWN_2)); - if (dwd_floor_flag_unknown_1 == 0x2 && dwd_floor_flag_unknown_2 < 0xB) - return 1.0f; - DWORD player = GetPlayerMemAddr(); float dwd_chance = 0.01f; // Default 1% chance @@ -120,20 +114,18 @@ float RebirthMemReader::GetDealWithDevilChance() if (PlayerHasItem(PASSIVE_ITEM_BLACKCANDLE)) // Black Candle adds 15% chance dwd_chance += 0.15f; - DWORD afterbirth_items_flag = *((DWORD*)(player + UNKNOWN_AFTERBIRTH_ITEMS)); + DWORD pentagram_count = *((DWORD*)(player + PASSIVE_ITEM_PENTAGRAM_COUNT)); - // No idea what Afterbirth item this is, but it can affect whether - // the Afterbirth item's 5% increase is introduced - if (PlayerHasItem(0x188)) + // Zodiac has a chance to give you a Pentagram effect + if (PlayerHasItem(PASSIVE_ITEM_ZODIAC)) { - // This item relies on RNG as to whether it contributes to the devil deal chance or not?? DWORD rng_func_result = AfterBirthItemRNGFunc(); - if (rng_func_result == 0x33) - ++afterbirth_items_flag; + if (rng_func_result == PASSIVE_ITEM_PENTAGRAM) // Is Zodiac randomly providing a Pentagram? + ++pentagram_count; } - if (afterbirth_items_flag > 1) // There's a 3 Afterbirth items that use this flag - dwd_chance += 0.05f; // They add 5% if it's above 1 but I have no idea what sets this flag + if (pentagram_count > 1) + dwd_chance += 0.05f; // More than one Pentagram adds another 5% chance DWORD player_active_item = *((DWORD*)(player + ITEM_ACTIVE_SLOT)); if (player_active_item == ACTIVE_ITEM_BOOKOFREVELATIONS) // Holding Book of Revelations adds 17.5% chance @@ -430,7 +422,7 @@ bool RebirthMemReader::PlayingGreed() DWORD RebirthMemReader::AfterBirthItemRNGFunc() { - if (!PlayerHasItem(0x188)) + if (!PlayerHasItem(PASSIVE_ITEM_ZODIAC)) return 0; DWORD player_manager_inst = GetPlayerManagerMemAddr(); diff --git a/src/dll/RebirthMemReader.h b/src/dll/RebirthMemReader.h index 6dfb5b7..13c3abf 100644 --- a/src/dll/RebirthMemReader.h +++ b/src/dll/RebirthMemReader.h @@ -27,24 +27,23 @@ #define WCHAR_ISAAC_MODULE_NAME L"isaac-ng.exe" -#define ITEM_ACTIVE_SLOT 0x1CD4 +#define ITEM_ACTIVE_SLOT 0x1CF4 #define ACTIVE_ITEM_BOOKOFREVELATIONS 0x4E #define ACTIVE_ITEM_BOOKOFBELIAL 0x22 -#define PLAYER_HAS_ITEM_FORM_OFFSET 0x1D84 +#define PLAYER_HAS_ITEM_FORM_OFFSET 0x1DA4 #define PASSIVE_ITEM_PENTAGRAM 0x33 #define PASSIVE_ITEM_BLACKCANDLE 0x104 #define PASSIVE_ITEM_GOATHEAD 0xD7 -#define UNKNOWN_AFTERBIRTH_ITEMS 0x1E50 +#define PASSIVE_ITEM_ZODIAC 0x188 +#define PASSIVE_ITEM_PENTAGRAM_COUNT 0x1E70 #define PLAYER_MANAGER_FLOOR_FLAGS 0x708C #define PLAYER_MANAGER_FLOOR_BOSS_FIGHT 0x7014 #define PLAYER_MANAGER_ROOM_CODE 0x7018 #define PLAYER_MANAGER_ROOM_CODE_FORMULA_OFFSET 0x6D40 #define PLAYER_MANAGER_BOSS_ROOM_CODE 0x7020 -#define PLAYER_MANAGER_DEVILDEAL_PREV_FLOOR 0x174DD4 -#define PLAYER_MANAGER_DEVILDEAL_UNKNOWN_1 0x175020 -#define PLAYER_MANAGER_DEVILDEAL_UNKNOWN_2 0x703C +#define PLAYER_MANAGER_DEVILDEAL_PREV_FLOOR 0x174DDC #define BOSS_FIGHT_TOOK_RED_DMG 0xE8C @@ -56,14 +55,14 @@ // These values are the offsets of the specific statistic from the core Player memory address enum RebirthPlayerStat { - kSpeed = 0x1CBC, - kRange = 0x1BF4, - kTearsDelay = 0x1BE0, - kShotSpeed = 0x1BE4, - kShotHeight = 0x1BF8, - kDamage = 0x1BF0, - kLuck = 0x1CC0, - kTearsFired = 0x1BEC, + kSpeed = 0x1CDC, + kRange = 0x1C14, + kTearsDelay = 0x1C00, + kShotSpeed = 0x1C04, + kShotHeight = 0x1C18, + kDamage = 0x1C10, + kLuck = 0x1CE0, + kTearsFired = 0x1C0C, kDealWithDevil = 0xFFFFFFFF // An advanced function is required for this statistic }; diff --git a/src/mhud2_version.h b/src/mhud2_version.h index 5038d05..3f80893 100644 --- a/src/mhud2_version.h +++ b/src/mhud2_version.h @@ -15,10 +15,10 @@ #ifndef MISSINGHUD2_VERSION_H #define MISSINGHUD2_VERSION_H -#define MHUD2_VERSION "v1.3.1" +#define MHUD2_VERSION "v1.3.2" #define MHUD2_MAJOR_VERSION 1 #define MHUD2_MINOR_VERSION 3 -#define MHUD2_REVISION_VERSION 1 +#define MHUD2_REVISION_VERSION 2 #endif //MISSINGHUD2_VERSION_H