4
Fork 0

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.
english-generic-dialogue
Eddoursul 2 years ago
parent 846a1ebaa8
commit ba912c86ab
  1. BIN
      SKSE/Plugins/fs.dll
  2. 26
      source/fs.dll/fs/PhasmalistInventoryFunctions.cpp

BIN
SKSE/Plugins/fs.dll (Stored with Git LFS)

Binary file not shown.

@ -47,7 +47,8 @@ namespace PhasmalistScripts {
papyrusEnchantment::GetNthEffectMagicEffect(ench, i), papyrusEnchantment::GetNthEffectMagicEffect(ench, i),
papyrusEnchantment::GetNthEffectMagnitude(ench, i), papyrusEnchantment::GetNthEffectMagnitude(ench, i),
papyrusEnchantment::GetNthEffectArea(ench, i), papyrusEnchantment::GetNthEffectArea(ench, i),
papyrusEnchantment::GetNthEffectDuration(ench, i)); papyrusEnchantment::GetNthEffectDuration(ench, i)
);
} }
return result * magicWeight; return result * magicWeight;
} }
@ -56,6 +57,8 @@ namespace PhasmalistScripts {
if (!spell) { if (!spell) {
return 0.0; return 0.0;
} }
/*
* // Sum of effect costs
float result = 0; float result = 0;
for (int i = papyrusSpell::GetNumEffects(spell) - 1; i >= 0; i--) { for (int i = papyrusSpell::GetNumEffects(spell) - 1; i >= 0; i--) {
result += getMagicEffectStrength( result += getMagicEffectStrength(
@ -64,7 +67,22 @@ namespace PhasmalistScripts {
papyrusSpell::GetNthEffectDuration(spell, i), papyrusSpell::GetNthEffectDuration(spell, i),
papyrusSpell::GetNthEffectArea(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) { float getAdditionalExtendDataStrength(InventoryEntryData * itemStack, float physicalStrength) {
@ -88,7 +106,7 @@ namespace PhasmalistScripts {
//item has been tempered //item has been tempered
ExtraHealth * health = DYNAMIC_CAST(extraData->GetByType(kExtraData_Health), BSExtraData, ExtraHealth); ExtraHealth * health = DYNAMIC_CAST(extraData->GetByType(kExtraData_Health), BSExtraData, ExtraHealth);
if (health) { 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()) { if (itemStack->type->IsWeapon()) {
TESObjectWEAP * asWeapon = static_cast<TESObjectWEAP*>(itemStack->type); TESObjectWEAP * asWeapon = static_cast<TESObjectWEAP*>(itemStack->type);
if (asWeapon) { if (asWeapon) {
float baseDmg = papyrusWeapon::GetBaseDamage(asWeapon); float baseDmg = papyrusWeapon::GetBaseDamage(asWeapon) * 1.5;
float speed = papyrusWeapon::GetSpeed(asWeapon); float speed = papyrusWeapon::GetSpeed(asWeapon);
physicalStrength = baseDmg * speed; physicalStrength = baseDmg * speed;
strength += physicalStrength; strength += physicalStrength;

Loading…
Cancel
Save