Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Assets/Scripts/Game/Formulas/FormulaHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Source Code: https://github.com/Interkarma/daggerfall-unity
// Original Author: Gavin Clayton (interkarma@dfworkshop.net)
// Contributors: Allofich, Hazelnut, ifkopifko, Numidium, TheLacus
//
//
// Notes:
//

Expand Down Expand Up @@ -277,7 +277,7 @@ public static int CalculateShopliftingChance(PlayerEntity player, int shopQualit
chance += shopQuality + weightAndNumItems;
return Mathf.Clamp(chance, 5, 95);
}

// Calculate chance of stealth skill hiding the user.
public static int CalculateStealthChance(float distanceToTarget, DaggerfallEntityBehaviour target)
{
Expand Down Expand Up @@ -2264,7 +2264,7 @@ public static SpellCost CalculateEffectCosts(IEntityEffect effect, EffectSetting
if(TryGetOverride("CalculateEffectCosts", out del))
return del(effect, settings, casterEntity);

bool activeComponents = false;
bool activeComponents = false;

// Get related skill
int skillValue = 0;
Expand Down Expand Up @@ -2547,7 +2547,7 @@ public static int CalculateCastingCost(SpellRecord.SpellRecordData spell, bool e

int cost = 0;
int skill = 50; // 50 is used for item enchantments

for (int i = 0; i < 3; ++i)
{
if (i < spell.effects.Length && spell.effects[i].type != -1)
Expand Down Expand Up @@ -2684,7 +2684,7 @@ public static float GetWeaponEnchantmentMultiplier(WeaponMaterialTypes weaponMat
// The below yields correct enchantment power for staves matching classic
switch(weaponMaterial)
{
default:
default:
case WeaponMaterialTypes.Steel: // Steel uses base enchantment power
return 0f;
case WeaponMaterialTypes.Iron: // Iron is -25% from base
Expand Down Expand Up @@ -3071,6 +3071,12 @@ public static string GenerateBuildingName(int seed, DFLocation.BuildingTypes typ
singleton = true;
break;

case DFLocation.BuildingTypes.Town23:
// City wall
a = TextManager.Instance.GetLocalizedText("cityWall");
singleton = true;
break;

default:
// Do nothing for unknown/unsupported building type
// Houses can actually change names based on active quests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1577,4 +1577,5 @@ yep"
random,Random
nordSurnameImmutableSuffix,sen
confirmDefaultControls,Are you sure you want to set default controls?
saveLoadPromptFormat,{0} for '{1}'
saveLoadPromptFormat,{0} for '{1}'
cityWall,City Wall
Expand Down