Skip to content

Commit

Permalink
баф вампиров (#903)
Browse files Browse the repository at this point in the history
* vampires-buff

* blob fix!
  • Loading branch information
Rxup authored Nov 8, 2024
1 parent a4f7419 commit 0ba0b35
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Content.Server/Backmen/Blob/BlobMobSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Content.Shared.Backmen.Blob.Chemistry;
using Content.Shared.Backmen.Blob.Components;
using Content.Shared.Backmen.Language;
using Content.Shared.Backmen.Targeting;
using Content.Shared.Chat;
using Content.Shared.Chemistry.Components;
using Content.Shared.Damage;
Expand Down Expand Up @@ -127,7 +128,7 @@ private void OnSpokeAdd(Entity<BlobSpeakComponent> ent, ref ComponentStartup arg

private void OnPulsed(EntityUid uid, BlobMobComponent component, BlobMobGetPulseEvent args)
{
_damageableSystem.TryChangeDamage(uid, component.HealthOfPulse);
_damageableSystem.TryChangeDamage(uid, component.HealthOfPulse, targetPart: TargetBodyPart.All);
}


Expand Down
12 changes: 10 additions & 2 deletions Content.Server/Backmen/Vampiric/BkmVampireLevelingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,24 @@ public void UnlockTier(Entity<BkmVampireComponent> ent, int tier)

public void AddCurrency(Entity<BkmVampireComponent> ent, FixedPoint2 va, string? source = null)
{
va = Math.Max(0D, va.Double());
va = FixedPoint2.Max(0, va);
if (va == 0)
{
_popupSystem.PopupEntity($"Вы не получили эссенцию"+(source != null ? $" за {source}" : ""), ent, ent, PopupType.MediumCaution);
return;
}

var plus = va > 0;

if (plus)
{
va *= 3; // base mode buff
}

_store.TryAddCurrency(new Dictionary<string, FixedPoint2>
{ { ent.Comp.CurrencyPrototype, va } },
ent);
var plus = va > 0;


_popupSystem.PopupEntity($"Вы получили {(plus ? "+" : "-")} {Math.Abs(va.Double())} эссенцию"+(source != null ? $" за {source}" : ""), ent, ent, plus ? PopupType.Medium : PopupType.MediumCaution);
}
Expand Down

0 comments on commit 0ba0b35

Please sign in to comment.