From ba912c86ab1b1ebf144fa5fd27e5ca0ada5b8f1e Mon Sep 17 00:00:00 2001 From: Eddoursul Date: Mon, 29 Nov 2021 21:42:09 +0100 Subject: [PATCH] Revised spectralizing cost of spells and weapons: - Spell costs now directly correlate to their magicka costs. - Increased importance of base damage and tempering for weapons. --- SKSE/Plugins/fs.dll | 4 +-- .../fs/PhasmalistInventoryFunctions.cpp | 26 ++++++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/SKSE/Plugins/fs.dll b/SKSE/Plugins/fs.dll index 4084cf9a..8cfca8ec 100644 --- a/SKSE/Plugins/fs.dll +++ b/SKSE/Plugins/fs.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eaa7e273c50497d31a8dd1f2bd60648c2d4b56ba98feb9df718e6fa00636475a -size 160256 +oid sha256:3bc96a3063a7345eaed4aac14065ccbf2ecfa4d748d4bfe92a8525ac14d1d6d0 +size 167424 diff --git a/source/fs.dll/fs/PhasmalistInventoryFunctions.cpp b/source/fs.dll/fs/PhasmalistInventoryFunctions.cpp index 24fb0fb5..10feee56 100644 --- a/source/fs.dll/fs/PhasmalistInventoryFunctions.cpp +++ b/source/fs.dll/fs/PhasmalistInventoryFunctions.cpp @@ -47,7 +47,8 @@ namespace PhasmalistScripts { papyrusEnchantment::GetNthEffectMagicEffect(ench, i), papyrusEnchantment::GetNthEffectMagnitude(ench, i), papyrusEnchantment::GetNthEffectArea(ench, i), - papyrusEnchantment::GetNthEffectDuration(ench, i)); + papyrusEnchantment::GetNthEffectDuration(ench, i) + ); } return result * magicWeight; } @@ -56,6 +57,8 @@ namespace PhasmalistScripts { if (!spell) { return 0.0; } + /* + * // Sum of effect costs float result = 0; for (int i = papyrusSpell::GetNumEffects(spell) - 1; i >= 0; i--) { result += getMagicEffectStrength( @@ -64,7 +67,22 @@ namespace PhasmalistScripts { papyrusSpell::GetNthEffectDuration(spell, i), papyrusSpell::GetNthEffectArea(spell, i)); } - return result * magicWeight; + */ + + /* + * // The costliest effect + int iCostliestEffect = papyrusSpell::GetCostliestEffectIndex(spell); + + float result = getMagicEffectStrength( + papyrusSpell::GetNthEffectMagicEffect(spell, iCostliestEffect), + papyrusSpell::GetNthEffectMagnitude(spell, iCostliestEffect), + papyrusSpell::GetNthEffectDuration(spell, iCostliestEffect), + papyrusSpell::GetNthEffectArea(spell, iCostliestEffect) + ); + */ + + // 2.0.10: Switch to flat magicka correlation + return papyrusSpell::GetMagickaCost(spell) * 1.5; } float getAdditionalExtendDataStrength(InventoryEntryData * itemStack, float physicalStrength) { @@ -88,7 +106,7 @@ namespace PhasmalistScripts { //item has been tempered ExtraHealth * health = DYNAMIC_CAST(extraData->GetByType(kExtraData_Health), BSExtraData, ExtraHealth); if (health) { - strength += physicalStrength * (health->health - 1.0) * count; + strength += physicalStrength * (health->health - 1.0) * 20 * count; } } } @@ -102,7 +120,7 @@ namespace PhasmalistScripts { if (itemStack->type->IsWeapon()) { TESObjectWEAP * asWeapon = static_cast(itemStack->type); if (asWeapon) { - float baseDmg = papyrusWeapon::GetBaseDamage(asWeapon); + float baseDmg = papyrusWeapon::GetBaseDamage(asWeapon) * 1.5; float speed = papyrusWeapon::GetSpeed(asWeapon); physicalStrength = baseDmg * speed; strength += physicalStrength;