Skip to content

Commit

Permalink
more equation fine tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Feb 17, 2024
1 parent 88ceff8 commit 72e0005
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
7 changes: 4 additions & 3 deletions Content.Server/Nyanotrasen/Lamiae/LamiaSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ private EntityUid AddSegment(EntityUid uid, EntityUid lamia, LamiaComponent lami
segmentComponent.Lamia = lamia;
segmentComponent.AttachedToUid = uid;
segmentComponent.MaxSegments = lamiaComponent.NumberOfSegments;
segmentComponent.DamageModifierConstant = segmentComponent.MaxSegments * 0.4f;
float taperConstant = segmentComponent.MaxSegments / 2;
float damageModifyCoefficient = lamiaComponent.DamageModifierConstant / lamiaComponent.NumberOfSegments;
segmentComponent.DamageModifyFactor = lamiaComponent.DamageModifierConstant * damageModifyCoefficient;
segmentComponent.ExplosiveModifyFactor = 1 / segmentComponent.DamageModifyFactor / (segmentComponent.MaxSegments / 10);
float damageModifyCoefficient = segmentComponent.DamageModifierConstant / lamiaComponent.NumberOfSegments;
segmentComponent.DamageModifyFactor = segmentComponent.DamageModifierConstant * damageModifyCoefficient;
segmentComponent.ExplosiveModifyFactor = 1 / segmentComponent.DamageModifyFactor / (segmentComponent.MaxSegments * 0.1f);

EntityUid segment;
if (segmentNumber == 1)
Expand Down
7 changes: 0 additions & 7 deletions Content.Shared/Nyanotrasen/Lamiae/LamiaComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,5 @@ public sealed partial class LamiaComponent : Component

[DataField("numberOfSegments")]
public int NumberOfSegments = 30;

/// <summary>
/// Used to derive how much damage should transfer from segments to body. Higher = less damage transfered.
/// Clamped to NumberOfSegments as a maximum value
/// </summary>
[DataField("damageModifierConstant")]
public float DamageModifierConstant = 8f;
}
}
1 change: 1 addition & 0 deletions Content.Shared/Nyanotrasen/Lamiae/LamiaSegmentComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public sealed partial class LamiaSegmentComponent : Component
public EntityUid Lamia = default!;
public int SegmentNumber = default!;
public int MaxSegments = default!;
public float DamageModifierConstant = default!;
[DataField("segmentId")]
public string? segmentId;
}
Expand Down

0 comments on commit 72e0005

Please sign in to comment.