mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-09 04:58:03 -05:00
Split damage multiplication into its own PR (#656)
* Split damage multiplication into its own PR * Found a more elegant implementation of the powers char*[]
This commit is contained in:
parent
cff73cccf0
commit
4d65a5ff73
@ -72,6 +72,18 @@ namespace SohImGui {
|
|||||||
"None"
|
"None"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const char* powers[9] = {
|
||||||
|
"Vanilla (1x)",
|
||||||
|
"Double (2x)",
|
||||||
|
"Quadruple (4x)",
|
||||||
|
"Octuple (8x)",
|
||||||
|
"Hexadecuple (16x)",
|
||||||
|
"Duotrigintuple (32x)",
|
||||||
|
"Quattuorsexagintuple (64x)",
|
||||||
|
"Octoviginticentuple (128x)",
|
||||||
|
"Hexaquinquagintiducentuple (256x)"
|
||||||
|
};
|
||||||
|
|
||||||
std::map<std::string, std::vector<std::string>> hiddenwindowCategories;
|
std::map<std::string, std::vector<std::string>> hiddenwindowCategories;
|
||||||
std::map<std::string, std::vector<std::string>> windowCategories;
|
std::map<std::string, std::vector<std::string>> windowCategories;
|
||||||
std::map<std::string, CustomWindow> customWindows;
|
std::map<std::string, CustomWindow> customWindows;
|
||||||
@ -886,12 +898,36 @@ namespace SohImGui {
|
|||||||
|
|
||||||
if (ImGui::BeginMenu("Difficulty Options"))
|
if (ImGui::BeginMenu("Difficulty Options"))
|
||||||
{
|
{
|
||||||
EnhancementSliderInt("Damage Multiplier %dx", "##DAMAGEMUL", "gDamageMul", 1, 4, "");
|
ImGui::Text("Damage Multiplier");
|
||||||
Tooltip("Modifies all sources of damage not affected by other sliders");
|
EnhancementCombobox("gDamageMul", powers, 9, 0);
|
||||||
EnhancementSliderInt("Fall Damage Multiplier %dx", "##FALLDAMAGEMUL", "gFallDamageMul", 1, 4, "");
|
Tooltip("Modifies all sources of damage not affected by other sliders\n\
|
||||||
Tooltip("Modifies all fall damage");
|
2x: Can survive all common attacks from the start of the game\n\
|
||||||
EnhancementSliderInt("Void Damage Multiplier %dx", "##VOIDDAMAGEMUL", "gVoidDamageMul", 1, 4, "");
|
4x: Dies in 1 hit to any substantial attack from the start of the game\n\
|
||||||
Tooltip("Modifies damage taken after falling into a void");
|
8x: Can only survive trivial damage from the start of the game\n\
|
||||||
|
16x: Can survive all common attacks with max health without double defense\n\
|
||||||
|
32x: Can survive all common attacks with max health and double defense\n\
|
||||||
|
64x: Can survive trivial damage with max health without double defense\n\
|
||||||
|
128x: Can survive trivial damage with max health and double defense\n\
|
||||||
|
256x: Cannot survive damage");
|
||||||
|
ImGui::Text("Fall Damage Multiplier");
|
||||||
|
EnhancementCombobox("gFallDamageMul", powers, 8, 0);
|
||||||
|
Tooltip("Modifies all fall damage\n\
|
||||||
|
2x: Can survive all fall damage from the start of the game\n\
|
||||||
|
4x: Can only survive short fall damage from the start of the game\n\
|
||||||
|
8x: Cannot survive any fall damage from the start of the game\n\
|
||||||
|
16x: Can survive all fall damage with max health without double defense\n\
|
||||||
|
32x: Can survive all fall damage with max health and double defense\n\
|
||||||
|
64x: Can survive short fall damage with double defense\n\
|
||||||
|
128x: Cannot survive fall damage");
|
||||||
|
ImGui::Text("Void Damage Multiplier");
|
||||||
|
EnhancementCombobox("gVoidDamageMul", powers, 7, 0);
|
||||||
|
Tooltip("Modifies damage taken after falling into a void\n\
|
||||||
|
2x: Can survive void damage from the start of the game\n\
|
||||||
|
4x: Cannot survive void damage from the start of the game\n\
|
||||||
|
8x: Can survive void damage twice with max health without double defense\n\
|
||||||
|
16x: Can survive void damage with max health without double defense\n\
|
||||||
|
32x: Can survive void damage with max health and double defense\n\
|
||||||
|
64x: Cannot survive void damage");
|
||||||
|
|
||||||
EnhancementCheckbox("No Random Drops", "gNoRandomDrops");
|
EnhancementCheckbox("No Random Drops", "gNoRandomDrops");
|
||||||
Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
|
Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
|
||||||
|
@ -3603,7 +3603,7 @@ s32 func_80837B18_modified(GlobalContext* globalCtx, Player* this, s32 damage, u
|
|||||||
s32 modifiedDamage = damage;
|
s32 modifiedDamage = damage;
|
||||||
if (modified)
|
if (modified)
|
||||||
{
|
{
|
||||||
modifiedDamage *= CVar_GetS32("gDamageMul", 1);
|
modifiedDamage *= (1 << CVar_GetS32("gDamageMul", 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Health_ChangeBy(globalCtx, modifiedDamage);
|
return Health_ChangeBy(globalCtx, modifiedDamage);
|
||||||
@ -3836,7 +3836,7 @@ s32 func_808382DC(Player* this, GlobalContext* globalCtx) {
|
|||||||
|
|
||||||
if (this->unk_A86 != 0) {
|
if (this->unk_A86 != 0) {
|
||||||
if (!Player_InBlockingCsMode(globalCtx, this)) {
|
if (!Player_InBlockingCsMode(globalCtx, this)) {
|
||||||
Player_InflictDamageModified(globalCtx, -16 * CVar_GetS32("gVoidDamageMul", 1), false);
|
Player_InflictDamageModified(globalCtx, -16 * (1 << CVar_GetS32("gVoidDamageMul", 0)), false);
|
||||||
this->unk_A86 = 0;
|
this->unk_A86 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8407,7 +8407,7 @@ s32 func_80843E64(GlobalContext* globalCtx, Player* this) {
|
|||||||
|
|
||||||
impactInfo = &D_80854600[impactIndex];
|
impactInfo = &D_80854600[impactIndex];
|
||||||
|
|
||||||
if (Player_InflictDamageModified(globalCtx, impactInfo->damage * CVar_GetS32("gFallDamageMul", 1), false)) {
|
if (Player_InflictDamageModified(globalCtx, impactInfo->damage * (1 << CVar_GetS32("gFallDamageMul", 0)), false)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user