Add rust immunity to rusted plate

Throw items in spray pattern for trickster's box
This commit is contained in:
2026-06-06 15:58:31 -07:00
parent 09db0ccd88
commit 85e74821ad
4 changed files with 33 additions and 6 deletions
+2 -2
View File
@@ -916,7 +916,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
if (SigilComponent.Sigil.ElementType == weapon.WeaponElement)
totalDamage = Mathf.RoundToInt(totalDamage * 1.15f);
totalDamage = Mathf.RoundToInt(totalDamage * (1 + SigilComponent.Sigil.AttackModifier));
totalDamage = Mathf.RoundToInt(totalDamage * (1 + SigilComponent.Sigil.AttackModifier));
if (isCriticalHit)
{
@@ -942,7 +942,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
rng.Randomize();
if (rng.Randf() <= rustChance)
{
if (rng.Randf() >= 0.5f && ((Accessory)EquipmentComponent.EquippedAccessory.Value).AccessoryTag != AccessoryTag.StatusEffectImmunity)
if (rng.Randf() >= 0.5f && ((Accessory)EquipmentComponent.EquippedAccessory.Value).AccessoryTag != AccessoryTag.StatusEffectImmunity && ((Armor)EquipmentComponent.EquippedArmor.Value).ArmorTag != ArmorTag.ImmuneToRust)
StatusEffectComponent.Rust.OnNext(true);
else
enemy.StatusEffectComponent.Rust.OnNext(true);