Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ninja stunlocking #33244

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Nov 10, 2024

  1. Fix ninja stunlocking-shorter stun, shorter cooldown, higher energy c…

    …ost.
    
    TL;DR Ninja can still stunlock, but for a shorter amount of time and higher energy cost.  Each stun applied is 1 second, with a 1 second cool down.  The ninja may stun 5 times on one small-capacity powercell, for a total of a maximum 5 second stunlock if they use all the energy in their cell.
    
    There is a conflict in the design of ninja stunlocking with their gloves.
    
    Content.Server/Ninja/Systems/StunProviderSystem.cs
    Has a comment:
    
    // short cooldown to prevent instant stunlocking
            _useDelay.SetLength((uid, useDelay), comp.Cooldown, id: comp.DelayId);
            _useDelay.TryResetDelay((uid, useDelay), id: comp.DelayId);
    
    However, 
    Content.Shared/Ninja/Components/StunProviderComponent.cs
    has the following code:
    
    /// <summary>
        /// Time that someone is stunned for, stacks if done multiple times.
        /// </summary>
        [DataField]
        public TimeSpan StunTime = TimeSpan.FromSeconds(5);
    
        /// <summary>
        /// How long stunning is disabled after stunning something.
        /// </summary>
        [DataField]
        public TimeSpan Cooldown = TimeSpan.FromSeconds(2);
    
    Currently, a ninja may apply a 5 second stun every 2 seconds, and may do this 10 times on a full small capacity energy cell.  This requires too little skill and energy to be considered balanced, considering the ninja's entire toolkit.  
    
    The PR adjusts the stun length to 1 second with a 1 second cooldown, and doubles the energy cost of stunning.  Stunlocking is now still possible, but the ninja can only stunlock for a maximum of 5 seconds and must consume all energy in a small capacity powercell to do so.  This will incentivize ninjas to find other ways of dealing with threats such as crafting cable cuffs or upgrade their suit cell.
    Shaddap1 authored Nov 10, 2024
    Configuration menu
    Copy the full SHA
    97fcff0 View commit details
    Browse the repository at this point in the history
  2. Increased stun length and cooldown to 2 seconds to allow for cuffings

    referencing Content.Shared/Cuffs/Components/HandcuffComponent.cs
    
    /// <summary>
        ///     The time it takes to cuff an entity.
        /// </summary>
        [DataField, ViewVariables(VVAccess.ReadWrite)]
        public float CuffTime = 3.5f;
    
        /// <summary>
        ///     If an entity being cuffed is stunned, this amount of time is subtracted from the time it takes to add/remove their cuffs.
        /// </summary>
        [DataField, ViewVariables(VVAccess.ReadWrite)]
        public float StunBonus = 2f;
    
    Stun length was increased to allow ninja to cuff stunlocked targets, making use of the stun bonus.
    Shaddap1 authored Nov 10, 2024
    Configuration menu
    Copy the full SHA
    be644ec View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    25ba124 View commit details
    Browse the repository at this point in the history
  4. Reduced power cost increase from 72 to 60

    Each stun now consumes 1/6 of small capacity of powercell instead of 1/5.
    Shaddap1 authored Nov 10, 2024
    Configuration menu
    Copy the full SHA
    c3c8772 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2024

  1. Stun adjusted to 3 seconds, cooldown adjusted to 2.8 seconds

    The earlier 2.5 second stun and 2.5 cooldown was functional in playtesting, but in response to feedback, a 3 second stun and a 2.8 second cooldown will provide better QoL and account for ping more generously.
    
    Two consecutive stuns is now the same duration as being stamcrit by a stunbaton/disabler etc.
    Shaddap1 authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    a53cd71 View commit details
    Browse the repository at this point in the history
  2. Corrected comment on charges per power cell.

    Comment now accurately describes new cost proportional to small, medium, and high capacity powercells.
    Shaddap1 authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    53b5159 View commit details
    Browse the repository at this point in the history