From a9280bb920430367b49bca281377d54860006477 Mon Sep 17 00:00:00 2001 From: Angelo Fallaria Date: Wed, 14 Aug 2024 13:30:36 +0800 Subject: [PATCH] Vulpkanin Rework: Number Changes (#713) # Description Per #711, this PR adds new stat changes to Vulpkanins to make them more mechanically interesting and distinct from Humans. - Receive the Voracious trait by default, giving them 2x eating/drinking speed. - Takes 30% less Cold damage - Takes 30% more Heat damage, up from 15%. - Hunger rate increased by 25%. - Receive 25% more fire stacks, increasing the Heat damage and duration of being on fire. - Flash duration has been increased by 50%. - The duration of flashes, 5 seconds, will become 7.5 seconds. **Only merge** alongside #715. ## Media
Expand **New flash duration** https://github.com/user-attachments/assets/afafd890-d40b-4c63-9259-53ae6a355e53
## Changelog :cl: Skubman - add: Vulpkanins receive the Voracious trait for free, giving them 2x eating/drinking speed, but Vulpkanins get hungrier 25% faster. - tweak: Vulpkanins gain a 30% Cold resistance, but their Heat vulnerability has increased from 15% to 30%. Vulpkanins also receive 25% more Fire stacks, amplifying the damage and duration of being on fire. - tweak: Flash duration against Vulpkanins has been increased by 50%. --------- Signed-off-by: VMSolidus Co-authored-by: VMSolidus --- Content.Client/Flash/FlashSystem.cs | 6 ++++-- .../Atmos/Components/FlammableComponent.cs | 6 ++++++ .../Atmos/EntitySystems/FlammableSystem.cs | 3 +++ Content.Server/Flash/FlashSystem.cs | 2 ++ Content.Shared/Flash/FlashableComponent.cs | 14 +++++++++++++- Content.Shared/Flash/SharedFlashSystem.cs | 2 +- .../Prototypes/DeltaV/Damage/modifier_sets.yml | 3 ++- .../DeltaV/Entities/Mobs/Species/vulpkanin.yml | 8 ++++++++ Resources/Prototypes/Traits/skills.yml | 5 +++++ 9 files changed, 44 insertions(+), 5 deletions(-) diff --git a/Content.Client/Flash/FlashSystem.cs b/Content.Client/Flash/FlashSystem.cs index ad8f8b0b82b..57a91983a96 100644 --- a/Content.Client/Flash/FlashSystem.cs +++ b/Content.Client/Flash/FlashSystem.cs @@ -38,8 +38,10 @@ private void OnFlashableHandleState(EntityUid uid, FlashableComponent component, // Few things here: // 1. If a shorter duration flash is applied then don't do anything // 2. If the client-side time is later than when the flash should've ended don't do anything + var calculatedStateDuration = state.Duration * state.DurationMultiplier; + var currentTime = _gameTiming.CurTime.TotalSeconds; - var newEndTime = state.Time.TotalSeconds + state.Duration; + var newEndTime = state.Time.TotalSeconds + calculatedStateDuration; var currentEndTime = component.LastFlash.TotalSeconds + component.Duration; if (currentEndTime > newEndTime) @@ -53,7 +55,7 @@ private void OnFlashableHandleState(EntityUid uid, FlashableComponent component, } component.LastFlash = state.Time; - component.Duration = state.Duration; + component.Duration = calculatedStateDuration; var overlay = _overlayManager.GetOverlay(); overlay.ReceiveFlash(component.Duration); diff --git a/Content.Server/Atmos/Components/FlammableComponent.cs b/Content.Server/Atmos/Components/FlammableComponent.cs index 679b5510586..33a163228f1 100644 --- a/Content.Server/Atmos/Components/FlammableComponent.cs +++ b/Content.Server/Atmos/Components/FlammableComponent.cs @@ -61,5 +61,11 @@ public sealed partial class FlammableComponent : Component /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float FirestackFade = -0.1f; + + /// + /// How stronger will firestack increases be? + /// + [DataField] + public float FireStackIncreaseMultiplier = 1f; } } diff --git a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs index 53fcb720766..d34de937a41 100644 --- a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs +++ b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs @@ -274,6 +274,9 @@ public void AdjustFireStacks(EntityUid uid, float relativeFireStacks, FlammableC if (!Resolve(uid, ref flammable)) return; + if (relativeFireStacks > 0) + relativeFireStacks *= flammable.FireStackIncreaseMultiplier; + flammable.FireStacks = MathF.Min(MathF.Max(MinimumFireStacks, flammable.FireStacks + relativeFireStacks), MaximumFireStacks); if (flammable.OnFire && flammable.FireStacks <= 0) diff --git a/Content.Server/Flash/FlashSystem.cs b/Content.Server/Flash/FlashSystem.cs index 013ee37a416..3f1e4e731df 100644 --- a/Content.Server/Flash/FlashSystem.cs +++ b/Content.Server/Flash/FlashSystem.cs @@ -133,6 +133,8 @@ public void Flash(EntityUid target, RaiseLocalEvent(used.Value, ref ev); } + flashDuration *= flashable.DurationMultiplier; + flashable.LastFlash = _timing.CurTime; flashable.Duration = flashDuration / 1000f; // TODO: Make this sane... Dirty(target, flashable); diff --git a/Content.Shared/Flash/FlashableComponent.cs b/Content.Shared/Flash/FlashableComponent.cs index c4f8074ceaf..5f3f214b6bb 100644 --- a/Content.Shared/Flash/FlashableComponent.cs +++ b/Content.Shared/Flash/FlashableComponent.cs @@ -10,6 +10,12 @@ public sealed partial class FlashableComponent : Component public float Duration; public TimeSpan LastFlash; + // + // How much to modify the duration of flashes against this entity. + // + [DataField] + public float DurationMultiplier = 1f; + [DataField] public CollisionGroup CollisionGroup = CollisionGroup.Opaque; @@ -22,10 +28,16 @@ public sealed class FlashableComponentState : ComponentState public float Duration { get; } public TimeSpan Time { get; } - public FlashableComponentState(float duration, TimeSpan time) + // + // How much to modify the duration of flashes against this entity. + // + public float DurationMultiplier { get; } + + public FlashableComponentState(float duration, TimeSpan time, float durationMultiplier) { Duration = duration; Time = time; + DurationMultiplier = durationMultiplier; } } diff --git a/Content.Shared/Flash/SharedFlashSystem.cs b/Content.Shared/Flash/SharedFlashSystem.cs index 16fdbfc2f3e..c4345154892 100644 --- a/Content.Shared/Flash/SharedFlashSystem.cs +++ b/Content.Shared/Flash/SharedFlashSystem.cs @@ -13,7 +13,7 @@ public override void Initialize() private static void OnFlashableGetState(EntityUid uid, FlashableComponent component, ref ComponentGetState args) { - args.State = new FlashableComponentState(component.Duration, component.LastFlash); + args.State = new FlashableComponentState(component.Duration, component.LastFlash, component.DurationMultiplier); } } } diff --git a/Resources/Prototypes/DeltaV/Damage/modifier_sets.yml b/Resources/Prototypes/DeltaV/Damage/modifier_sets.yml index a2b8be8bf6a..b389378eb01 100644 --- a/Resources/Prototypes/DeltaV/Damage/modifier_sets.yml +++ b/Resources/Prototypes/DeltaV/Damage/modifier_sets.yml @@ -1,7 +1,8 @@ - type: damageModifierSet id: Vulpkanin coefficients: - Heat: 1.15 + Heat: 1.30 + Cold: 0.70 - type: damageModifierSet id: Harpy diff --git a/Resources/Prototypes/DeltaV/Entities/Mobs/Species/vulpkanin.yml b/Resources/Prototypes/DeltaV/Entities/Mobs/Species/vulpkanin.yml index 0bcd71fbadb..909aba6632e 100644 --- a/Resources/Prototypes/DeltaV/Entities/Mobs/Species/vulpkanin.yml +++ b/Resources/Prototypes/DeltaV/Entities/Mobs/Species/vulpkanin.yml @@ -8,6 +8,7 @@ - type: HumanoidAppearance species: Vulpkanin - type: Hunger + baseDecayRate: 0.02083333332 # 25% more than default - type: Carriable # Carrying system from nyanotrasen. - type: Inventory # Allows vulps to wear properly shaped helmets speciesId: vulpkanin @@ -105,6 +106,13 @@ understands: - GalacticCommon - Canilunzt + - type: ConsumeDelayModifier + foodDelayMultiplier: 0.5 + drinkDelayMultiplier: 0.5 + - type: Flammable + fireStackIncreaseMultiplier: 1.25 + - type: Flashable + durationMultiplier: 1.5 - type: entity save: false diff --git a/Resources/Prototypes/Traits/skills.yml b/Resources/Prototypes/Traits/skills.yml index 40198b724ed..e0115c0562b 100644 --- a/Resources/Prototypes/Traits/skills.yml +++ b/Resources/Prototypes/Traits/skills.yml @@ -115,6 +115,11 @@ - type: ConsumeDelayModifier foodDelayMultiplier: 0.5 drinkDelayMultiplier: 0.5 + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: + - Vulpkanin - type: trait id: ParkourTraining