From 5899f4ea5a978ded0362bdf46185f8fbb1a2607c Mon Sep 17 00:00:00 2001 From: Skubman Date: Thu, 12 Dec 2024 07:26:32 +0800 Subject: [PATCH] Pistol-Whipping (Guns as Melee Weapons) (#1335) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description Adds the ability to use guns as melee weapons and throwing weapons. The gun melee attack is a Light Attack done with a right click. The attack rate is slower than average melee weapons. The cooldown on melee attacks after shooting has been removed entirely, so you can right-click immediately after shooting (like in hero shooters 😎). The cooldown on shooting after a melee attack has been set to a constant 0.5 seconds. ## Balance Technically speaking, weaving shooting and pistol-whipping lowers your overall DPS in most cases, because you can't shoot for 0.5 seconds after doing a melee attack. With _skillful_ usage, however, it provides some key tactical advantages: - Preserving ammo by dealing damage without firing a shot. - Deal stamina damage as a natural effect of dealing melee Blunt damage. - Most non-pistol guns have increased blunt stamina damage factors to help with this. - Bypassing Piercing resists of armors with a higher Piercing resist than Blunt resist like plate carriers. - Doing the combo of right-clicking immediately after shooting deals a big burst of damage. Pistol-whipping also helps as a last resort when you run out of ammo. However, it's almost always better to use a proper melee weapon instead of a gun as a pure melee weapon, because you can't power attack with guns and the guns' melee attack rate are slower by design than most melee weapons. Shotguns benefit the most from pistol-whipping, because their ideal range is close-range where a melee attack can be performed, and their low fire rate means they're not affected too much by the 0.5s shooting cooldown. Guns have received throwing damage. You can throw guns at the enemy once you're out of ammo to deal extra damage. I think this makes fights a little more spectacular to watch. Melee damage sorted by group (from least to greatest): 1. Revolver 2. Pistol (+ Energy Pistol) 3. Sniper rifle 4. Rifle (+ Energy Rifle) 5. Sub Machine Gun 6. Shotgun 7. Light Machine Gun (L6 saw) 8. Heavy Machine Gun ## Media **mk 58** ![image](https://github.com/user-attachments/assets/d17bc1c7-7ec5-4124-93c3-306026f7a23f) **Kardashev-Mosin (Wielded)** ![image](https://github.com/user-attachments/assets/52132262-48ae-48fa-a72c-3df5ae6bfd17) **Basic Combat** https://github.com/user-attachments/assets/922998d1-0cd0-4fea-8f0b-365bcff3c12b **Particle Decelerator Combo (80 damage)** https://github.com/user-attachments/assets/ce62334a-13dd-46d9-9c0e-453e26bf1261 Combo: Shoot + Power Attack, wait 1.6s then Power Attack + Throw This combo costs 90 stamina which almost depletes 100 stamina leaving you vulnerable, so the Vigor trait can help you pull off this combo. ## Changelog :cl: Skubman - add: Pistol-whipping has been added. You can press right click with a gun to perform a Light Attack. Most guns will deal Blunt damage, apart from the Kardashev-Mosin dealing Piercing/Slash damage with its bayonet. Weaving bullets and melee attacks correctly will give you the upper hand in combat. - add: Guns can now be thrown to deal the same damage as their melee damage. --- .../Melee/MeleeWeaponSystem.Effects.cs | 10 ++ .../Weapons/Melee/MeleeWeaponSystem.cs | 37 +++--- .../Weapons/Melee/MeleeWeaponSystem.cs | 25 ++-- .../Weapons/Melee/MeleeWeaponComponent.cs | 20 +++ .../Weapons/Melee/SharedMeleeWeaponSystem.cs | 42 ++----- .../Weapons/Ranged/Components/GunComponent.cs | 6 + .../Weapons/Ranged/Systems/SharedGunSystem.cs | 18 +-- .../Locale/en-US/store/uplink-catalog.ftl | 2 +- .../Weapons/Guns/Battery/battery_guns.yml | 18 +++ .../Objects/Weapons/Guns/LMGs/lmgs.yml | 21 +++- .../Objects/Weapons/Guns/Basic/base_pka.yml | 17 +++ .../Weapons/Guns/Battery/battery_guns.yml | 114 ++++++++++++++++++ .../Objects/Weapons/Guns/HMGs/hmgs.yml | 14 +++ .../Objects/Weapons/Guns/LMGs/lmgs.yml | 18 +++ .../Weapons/Guns/Launchers/launchers.yml | 14 +++ .../Objects/Weapons/Guns/Pistols/pistols.yml | 13 ++ .../Weapons/Guns/Revolvers/revolvers.yml | 13 ++ .../Objects/Weapons/Guns/Rifles/rifles.yml | 18 +++ .../Objects/Weapons/Guns/SMGs/smgs.yml | 18 +++ .../Weapons/Guns/Shotguns/shotguns.yml | 64 ++++++++++ .../Objects/Weapons/Guns/Snipers/snipers.yml | 78 ++++++++++-- .../Objects/Weapons/Guns/flare_gun.yml | 13 ++ .../Objects/Weapons/Guns/pneumatic_cannon.yml | 13 ++ 23 files changed, 528 insertions(+), 78 deletions(-) diff --git a/Content.Client/Weapons/Melee/MeleeWeaponSystem.Effects.cs b/Content.Client/Weapons/Melee/MeleeWeaponSystem.Effects.cs index 3e1a4b1906d..ffcd7454ac7 100644 --- a/Content.Client/Weapons/Melee/MeleeWeaponSystem.Effects.cs +++ b/Content.Client/Weapons/Melee/MeleeWeaponSystem.Effects.cs @@ -136,6 +136,7 @@ private Animation GetThrustAnimation(SpriteComponent sprite, float distance, Ang { const float thrustEnd = 0.05f; const float length = 0.15f; + var rotation = sprite.Rotation + spriteRotation; var startOffset = sprite.Rotation.RotateVec(new Vector2(0f, -distance / 5f)); var endOffset = sprite.Rotation.RotateVec(new Vector2(0f, -distance)); @@ -144,6 +145,15 @@ private Animation GetThrustAnimation(SpriteComponent sprite, float distance, Ang Length = TimeSpan.FromSeconds(length), AnimationTracks = { + new AnimationTrackComponentProperty() + { + ComponentType = typeof(SpriteComponent), + Property = nameof(SpriteComponent.Rotation), + KeyFrames = + { + new AnimationTrackProperty.KeyFrame(rotation, 0f), + } + }, new AnimationTrackComponentProperty() { ComponentType = typeof(SpriteComponent), diff --git a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs index 1d72f16706f..9f2ee5eb8f6 100644 --- a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs +++ b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs @@ -9,6 +9,7 @@ using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Melee.Events; using Content.Shared.Weapons.Ranged.Components; +using Content.Shared.Wieldable.Components; using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Input; @@ -71,10 +72,22 @@ public override void Update(float frameTime) return; } - var useDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.Use); - var altDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.UseSecondary); + var useDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.Use) == BoundKeyState.Down; + var altDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.UseSecondary) == BoundKeyState.Down; - if (weapon.AutoAttack || useDown != BoundKeyState.Down && altDown != BoundKeyState.Down) + // Disregard inputs to the shoot binding + if (TryComp(weaponUid, out var gun) && + // Except if can't shoot due to being unwielded + (!HasComp(weaponUid) || + (TryComp(weaponUid, out var wieldable) && wieldable.Wielded))) + { + if (gun.UseKey) + useDown = false; + else + altDown = false; + } + + if (weapon.AutoAttack || !useDown && !altDown) { if (weapon.Attacking) { @@ -82,23 +95,13 @@ public override void Update(float frameTime) } } - if (weapon.Attacking || weapon.NextAttack > Timing.CurTime) + if (weapon.Attacking || weapon.NextAttack > Timing.CurTime || (!useDown && !altDown)) { return; } // TODO using targeted actions while combat mode is enabled should NOT trigger attacks. - // TODO: Need to make alt-fire melee its own component I guess? - // Melee and guns share a lot in the middle but share virtually nothing at the start and end so - // it's kinda tricky. - // I think as long as we make secondaries their own component it's probably fine - // as long as guncomp has an alt-use key then it shouldn't be too much of a PITA to deal with. - if (TryComp(weaponUid, out var gun) && gun.UseKey) - { - return; - } - var mousePos = _eyeManager.PixelToMap(_inputManager.MouseScreenPosition); if (mousePos.MapId == MapId.Nullspace) @@ -118,7 +121,8 @@ public override void Update(float frameTime) } // Heavy attack. - if (altDown == BoundKeyState.Down) + if (!weapon.DisableHeavy && + (!weapon.SwapKeys ? altDown : useDown)) { // If it's an unarmed attack then do a disarm if (weapon.AltDisarm && weaponUid == entity) @@ -139,7 +143,8 @@ public override void Update(float frameTime) } // Light attack - if (useDown == BoundKeyState.Down) + if (!weapon.DisableClick && + (!weapon.SwapKeys ? useDown : altDown)) { var attackerPos = Transform(entity).MapPosition; diff --git a/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs b/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs index daf76268a3c..26f0c20608e 100644 --- a/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs +++ b/Content.Server/Weapons/Melee/MeleeWeaponSystem.cs @@ -53,22 +53,25 @@ private void OnMeleeExamineDamage(EntityUid uid, MeleeWeaponComponent component, return; var damageSpec = GetDamage(uid, args.User, component); - if (damageSpec.Empty) return; - _damageExamine.AddDamageExamine(args.Message, damageSpec, Loc.GetString("damage-melee")); - - if (damageSpec * component.HeavyDamageBaseModifier != damageSpec) - _damageExamine.AddDamageExamine(args.Message, damageSpec * component.HeavyDamageBaseModifier, Loc.GetString("damage-melee-heavy")); + if (!component.DisableClick) + _damageExamine.AddDamageExamine(args.Message, damageSpec, Loc.GetString("damage-melee")); - if (component.HeavyStaminaCost != 0) + if (!component.DisableHeavy) { - var staminaCostMarkup = FormattedMessage.FromMarkupOrThrow( - Loc.GetString("damage-stamina-cost", - ("type", Loc.GetString("damage-melee-heavy")), ("cost", component.HeavyStaminaCost))); - args.Message.PushNewline(); - args.Message.AddMessage(staminaCostMarkup); + if (damageSpec * component.HeavyDamageBaseModifier != damageSpec) + _damageExamine.AddDamageExamine(args.Message, damageSpec * component.HeavyDamageBaseModifier, Loc.GetString("damage-melee-heavy")); + + if (component.HeavyStaminaCost != 0) + { + var staminaCostMarkup = FormattedMessage.FromMarkupOrThrow( + Loc.GetString("damage-stamina-cost", + ("type", Loc.GetString("damage-melee-heavy")), ("cost", component.HeavyStaminaCost))); + args.Message.PushNewline(); + args.Message.AddMessage(staminaCostMarkup); + } } } diff --git a/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs b/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs index 16847c3797e..b698728193f 100644 --- a/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs +++ b/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs @@ -41,6 +41,26 @@ public sealed partial class MeleeWeaponComponent : Component [DataField] public bool ResetOnHandSelected = true; + /// + /// If true, swaps the keybinds for light attacks and heavy attacks. + /// + [DataField] + public bool SwapKeys = false; + + /// + /// If true, disables heavy attacks for this weapon, and prevents the heavy damage values appearing + /// when the damage values are examined. + /// + [DataField] + public bool DisableHeavy = false; + + /// + /// If true, disables single-target attacks for this weapon, and prevents the single-target damage values appearing + /// when the damage values are examined. + /// + [DataField] + public bool DisableClick = false; + /* * Melee combat works based around 2 types of attacks: * 1. Click attacks with left-click. This attacks whatever is under your mnouse diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index 7bc817dd24a..aa15ecfb286 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -62,8 +62,6 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnMeleeSelected); - SubscribeLocalEvent(OnMeleeShotAttempted); - SubscribeLocalEvent(OnMeleeShot); SubscribeLocalEvent(OnGetBonusMeleeDamage); SubscribeLocalEvent(OnGetBonusHeavyDamageModifier); SubscribeLocalEvent(OnGetBonusMeleeAttackRate); @@ -86,24 +84,6 @@ private void OnMapInit(EntityUid uid, MeleeWeaponComponent component, MapInitEve #endif } - private void OnMeleeShotAttempted(EntityUid uid, MeleeWeaponComponent comp, ref ShotAttemptedEvent args) - { - if (comp.NextAttack > Timing.CurTime) - args.Cancel(); - } - - private void OnMeleeShot(EntityUid uid, MeleeWeaponComponent component, ref GunShotEvent args) - { - if (!TryComp(uid, out var gun)) - return; - - if (gun.NextFire > component.NextAttack) - { - component.NextAttack = gun.NextFire; - Dirty(uid, component); - } - } - private void OnMeleeSelected(EntityUid uid, MeleeWeaponComponent component, HandSelectedEvent args) { var attackRate = GetAttackRate(uid, args.User, component); @@ -169,29 +149,23 @@ private void OnStopAttack(StopAttackEvent msg, EntitySessionEventArgs args) private void OnLightAttack(LightAttackEvent msg, EntitySessionEventArgs args) { - if (args.SenderSession.AttachedEntity is not {} user) + if (args.SenderSession.AttachedEntity is not {} user || + !TryGetWeapon(user, out var weaponUid, out var weapon) || + weaponUid != GetEntity(msg.Weapon) || + weapon.DisableClick) return; - if (!TryGetWeapon(user, out var weaponUid, out var weapon) || - weaponUid != GetEntity(msg.Weapon)) - { - return; - } - AttemptAttack(user, weaponUid, weapon, msg, args.SenderSession); } private void OnHeavyAttack(HeavyAttackEvent msg, EntitySessionEventArgs args) { - if (args.SenderSession.AttachedEntity is not {} user) + if (args.SenderSession.AttachedEntity is not {} user || + !TryGetWeapon(user, out var weaponUid, out var weapon) || + weaponUid != GetEntity(msg.Weapon) || + weapon.DisableHeavy) return; - if (!TryGetWeapon(user, out var weaponUid, out var weapon) || - weaponUid != GetEntity(msg.Weapon)) - { - return; - } - AttemptAttack(user, weaponUid, weapon, msg, args.SenderSession); } diff --git a/Content.Shared/Weapons/Ranged/Components/GunComponent.cs b/Content.Shared/Weapons/Ranged/Components/GunComponent.cs index 8d7ecae1a81..d522df5395e 100644 --- a/Content.Shared/Weapons/Ranged/Components/GunComponent.cs +++ b/Content.Shared/Weapons/Ranged/Components/GunComponent.cs @@ -208,6 +208,12 @@ public sealed partial class GunComponent : Component [AutoPausedField] public TimeSpan NextFire = TimeSpan.Zero; + /// + /// After dealing a melee attack with this gun, the minimum cooldown in seconds before the gun can shoot again. + /// + [DataField] + public float MeleeCooldown = 0.528f; + /// /// What firemodes can be selected. /// diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 2fbb6785e29..7afb41239c6 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -114,14 +114,18 @@ private void OnMapInit(Entity gun, ref MapInitEvent args) private void OnGunMelee(EntityUid uid, GunComponent component, MeleeHitEvent args) { - if (!TryComp(uid, out var melee)) - return; + var curTime = Timing.CurTime; - if (melee.NextAttack > component.NextFire) - { - component.NextFire = melee.NextAttack; - Dirty(uid, component); - } + if (component.NextFire < curTime) + component.NextFire = curTime; + + var meleeCooldown = TimeSpan.FromSeconds(component.MeleeCooldown); + + component.NextFire += meleeCooldown; + while (component.NextFire <= curTime) + component.NextFire += meleeCooldown; + + Dirty(uid, component); } private void OnShootRequest(RequestShootEvent msg, EntitySessionEventArgs args) diff --git a/Resources/Locale/en-US/store/uplink-catalog.ftl b/Resources/Locale/en-US/store/uplink-catalog.ftl index 1754bb89d3e..2ac91d171eb 100644 --- a/Resources/Locale/en-US/store/uplink-catalog.ftl +++ b/Resources/Locale/en-US/store/uplink-catalog.ftl @@ -9,7 +9,7 @@ uplink-pistol-cobra-name = Cobra uplink-pistol-cobra-desc = A rugged, robust operator handgun with inbuilt silencer. Uses pistol magazines (.25 caseless). uplink-rifle-mosin-name = Surplus Rifle -uplink-rifle-mosin-desc = A bolt action service rifle that has seen many wars. Not modern by any standard, hand loaded, and terrible recoil, but it is cheap. +uplink-rifle-mosin-desc = A bolt action service rifle that has seen many wars. Not modern by any standard, hand loaded, and terrible recoil, but it is cheap. The attached bayonet allows it to be used as an improvised spear. uplink-esword-name = Energy Sword uplink-esword-desc = A very dangerous energy sword that can reflect shots. Can be stored in pockets when turned off. Makes a lot of noise when used or turned on. diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml index f3b41bdbfec..d1251659ece 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -165,6 +165,15 @@ Disabler: { state: mode-disabler } Lethal: { state: mode-lethal } Special: { state: mode-stun } # Unused + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 7.5 + bluntStaminaDamageFactor: 1.0 + wideAnimationRotation: 135 + - type: DamageOtherOnHit + staminaCost: 5 - type: entity name: miniature energy gun @@ -232,6 +241,15 @@ - Sidearm - type: StaticPrice price: 750 + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 7.5 + bluntStaminaDamageFactor: 1.0 + wideAnimationRotation: 135 + - type: DamageOtherOnHit + staminaCost: 5 - type: entity name: PDW-9 Energy Pistol diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml index 9fb68453ee3..64fdf76f9a3 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml @@ -1,4 +1,4 @@ -- type: entity +- type: entity name: Experimental L6 SAW parent: BaseItem id: WeaponLightMachineGunL6Borg @@ -38,4 +38,21 @@ # - type: DynamicPrice # price: 500 - type: Appearance - + - type: MeleeWeapon + attackRate: 1.4 + damage: + types: + Blunt: 11 + bluntStaminaDamageFactor: 1.3333 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 3 + - type: DamageOtherOnHit + staminaCost: 12 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_pka.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_pka.yml index 93621bc3a28..4eec74f05a6 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_pka.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/base_pka.yml @@ -48,3 +48,20 @@ - Belt - type: UseDelay delay: 1 + - type: MeleeWeapon + attackRate: 1.3333 + damage: + types: + Blunt: 9.0 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 2.5 + - type: DamageOtherOnHit + staminaCost: 8 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml index 62a98bd5da8..62291cc2714 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -37,6 +37,24 @@ - type: SurgeryTool endSound: path: /Audio/Weapons/Guns/Gunshots/laser.ogg + - type: MeleeWeapon + attackRate: 1.3333 + damage: + types: + Blunt: 8.5 + bluntStaminaDamageFactor: 1.25 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 2.5 + - type: DamageOtherOnHit + staminaCost: 7 - type: entity id: BaseWeaponPowerCell @@ -78,6 +96,24 @@ - type: SurgeryTool endSound: path: /Audio/Weapons/Guns/Gunshots/laser.ogg + - type: MeleeWeapon + attackRate: 1.3333 + damage: + types: + Blunt: 9.0 + bluntStaminaDamageFactor: 1.25 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 2.5 + - type: DamageOtherOnHit + staminaCost: 7 - type: entity id: BaseWeaponBatterySmall @@ -98,6 +134,15 @@ slots: - Belt - suitStorage + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 7.5 + bluntStaminaDamageFactor: 1.0 + wideAnimationRotation: 135 + - type: DamageOtherOnHit + staminaCost: 5 - type: entity id: BaseWeaponPowerCellSmall @@ -114,6 +159,15 @@ quickEquip: false slots: - Belt + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 7.5 + bluntStaminaDamageFactor: 1.0 + wideAnimationRotation: 135 + - type: DamageOtherOnHit + staminaCost: 5 - type: entity name: svalinn laser pistol @@ -248,6 +302,10 @@ fireCost: 62.5 - type: StaticPrice price: 300 + - type: MeleeWeapon + damage: + types: + Blunt: 4 - type: entity name: pulse pistol @@ -377,6 +435,14 @@ - type: HitscanBatteryAmmoProvider proto: RedHeavyLaser fireCost: 100 + - type: MeleeWeapon + attackRate: 1.4 + damage: + types: + Blunt: 10 + bluntStaminaDamageFactor: 1.3333 + - type: DamageOtherOnHit + staminaCost: 9.5 - type: entity name: portable particle decelerator @@ -408,6 +474,22 @@ - type: Battery maxCharge: 10000 startingCharge: 10000 + - type: MeleeWeapon + attackRate: 1.6 + damage: # This is super expensive, low attack rate, slows down the user and high stam cost so it can be high + types: + Blunt: 34 + Structural: 10 + swapKeys: false + disableHeavy: false + disableClick: true + bluntStaminaDamageFactor: 1.5 + heavyRateModifier: 1.0 + heavyDamageBaseModifier: 1.0 + heavyStaminaCost: 21 + wideAnimationRotation: 270 + - type: DamageOtherOnHit + staminaCost: 48 - type: entity name: x-ray cannon @@ -476,6 +558,12 @@ - type: GuideHelp guides: - Security + - type: MeleeWeapon + damage: + types: + Blunt: 5.0 + bluntStaminaDamageFactor: 2.5 + wideAnimationRotation: 135 - type: entity name: disabler SMG @@ -514,6 +602,12 @@ zeroVisible: true - type: StaticPrice price: 260 + - type: MeleeWeapon + damage: + types: + Blunt: 6.5 + bluntStaminaDamageFactor: 2.5 + wideAnimationRotation: 180 - type: entity name: practice disabler @@ -539,6 +633,11 @@ - type: ProjectileBatteryAmmoProvider proto: BulletDisablerPractice fireCost: 100 + - type: MeleeWeapon + damage: + types: + Blunt: 3 + bluntStaminaDamageFactor: 1.0 - type: entity name: taser @@ -615,6 +714,15 @@ price: 750 - type: StealTarget stealGroup: WeaponCaptain + - type: MeleeWeapon + attackRate: 1.3333 + damage: + types: + Blunt: 9 + bluntStaminaDamageFactor: 1.25 + wideAnimationRotation: 135 + - type: DamageOtherOnHit + staminaCost: 5 - type: entity name: advanced laser pistol @@ -650,6 +758,12 @@ - type: Appearance - type: StaticPrice price: 63 + - type: MeleeWeapon + damage: + types: + Blunt: 8 + - type: DamageOtherOnHit + staminaCost: 6 - type: entity name: C.H.I.M.P. handcannon diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/HMGs/hmgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/HMGs/hmgs.yml index 9d685e1ddc0..72df09ac508 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/HMGs/hmgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/HMGs/hmgs.yml @@ -20,6 +20,20 @@ - type: StaticPrice price: 500 # No chamber because HMG may want its own + - type: MeleeWeapon + attackRate: 1.5 + damage: + types: + Blunt: 16 + bluntStaminaDamageFactor: 1.5 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: DamageOtherOnHit + staminaCost: 16 - type: entity name: minigun diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml index f90cbb6e601..4b6e21a4922 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml @@ -62,6 +62,24 @@ price: 500 - type: UseDelay delay: 1 + - type: MeleeWeapon + attackRate: 1.4 + damage: + types: + Blunt: 11 + bluntStaminaDamageFactor: 1.3333 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 3 + - type: DamageOtherOnHit + staminaCost: 12 - type: entity name: L6 SAW diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml index be4ea534d7d..dc49dce0f3a 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml @@ -19,6 +19,20 @@ containers: ballistic-ammo: !type:Container ents: [] + - type: MeleeWeapon + attackRate: 1.5 + damage: + types: + Blunt: 14 + bluntStaminaDamageFactor: 1.5 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: DamageOtherOnHit + staminaCost: 14 - type: entity name: china lake diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml index 73c2231b23a..fefc41ae865 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml @@ -66,6 +66,19 @@ - type: StaticPrice price: 500 - type: AmmoCounter + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 7.5 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 135 + soundHit: + collection: MetalThud + - type: DamageOtherOnHit + staminaCost: 5 - type: entity name: viper diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml index 734b6c4adca..c85ce56974b 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml @@ -50,6 +50,19 @@ path: /Audio/Weapons/Guns/MagIn/revolver_magin.ogg - type: StaticPrice price: 500 + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 7 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 135 + soundHit: + collection: MetalThud + - type: DamageOtherOnHit + staminaCost: 5 - type: entity name: Deckard diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index 61df2b857ea..0aa281b95c0 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -51,6 +51,24 @@ gun_chamber: !type:ContainerSlot - type: StaticPrice price: 500 + - type: MeleeWeapon + attackRate: 1.3333 + damage: + types: + Blunt: 8.5 + bluntStaminaDamageFactor: 1.25 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 2.5 + - type: DamageOtherOnHit + staminaCost: 7.5 - type: entity name: AKMS diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml index b448ddea3e4..8d43953a07b 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml @@ -54,6 +54,24 @@ gun_chamber: !type:ContainerSlot - type: StaticPrice price: 500 + - type: MeleeWeapon + attackRate: 1.3333 + damage: + types: + Blunt: 9.0 + bluntStaminaDamageFactor: 1.25 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 2.5 + - type: DamageOtherOnHit + staminaCost: 8 - type: entity name: Atreides diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml index 44ee4a08c1b..40c85374123 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml @@ -43,6 +43,24 @@ ents: [] - type: StaticPrice price: 500 + - type: MeleeWeapon + attackRate: 1.4 + damage: + types: + Blunt: 10 + bluntStaminaDamageFactor: 1.3333 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 2.5 + - type: DamageOtherOnHit + staminaCost: 9.5 - type: entity name: Bulldog @@ -102,6 +120,24 @@ - type: Appearance - type: StaticPrice price: 500 + - type: MeleeWeapon + attackRate: 1.4 + damage: + types: + Blunt: 10 + bluntStaminaDamageFactor: 1.3333 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 2.5 + - type: DamageOtherOnHit + staminaCost: 9.5 - type: entity name: antique Bulldog @@ -136,6 +172,12 @@ graph: ShotgunSawn node: start deconstructionTarget: null + - type: MeleeWeapon + damage: + types: + Blunt: 8.5 + - type: DamageOtherOnHit + staminaCost: 7.5 - type: entity name: double-barreled shotgun @@ -162,6 +204,13 @@ - type: BallisticAmmoProvider - type: Wieldable - type: GunRequiresWield + - type: MeleeWeapon + attackRate: 1.4 + damage: + types: + Blunt: 9 + - type: DamageOtherOnHit + staminaCost: 8.0 - type: entity parent: WeaponShotgunEnforcer @@ -216,6 +265,13 @@ graph: ShotgunSawn node: shotgunsawn deconstructionTarget: null + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 7.5 + - type: DamageOtherOnHit + staminaCost: 6 - type: entity name: sawn-off shogun @@ -255,6 +311,14 @@ deconstructionTarget: null - type: StaticPrice price: 0 + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 7.5 + wideAnimationRotation: 135 + - type: DamageOtherOnHit + staminaCost: 5 - type: entity name: blunderbuss diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml index 88c00bedbd5..86b90f2bdea 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml @@ -39,12 +39,30 @@ ents: [] - type: StaticPrice price: 500 + - type: MeleeWeapon + attackRate: 1.3333 + damage: + types: + Blunt: 8.0 + bluntStaminaDamageFactor: 1.25 + swapKeys: true + disableHeavy: true + wideAnimationRotation: 135 + animation: WeaponArcThrust + soundHit: + collection: MetalThud + - type: IncreaseDamageOnWield + damage: + types: + Blunt: 2.5 + - type: DamageOtherOnHit + staminaCost: 7.5 - type: entity name: Kardashev-Mosin parent: [BaseWeaponSniper, BaseGunWieldable] id: WeaponSniperMosin - description: A weapon for hunting, or endless trench warfare. Uses .30 rifle ammo. + description: A weapon for hunting, or endless trench warfare, with a bayonet attached at the barrel. Uses .30 rifle ammo. components: - type: Sprite sprite: Objects/Weapons/Guns/Snipers/bolt_gun_wood.rsi @@ -56,6 +74,30 @@ soundGunshot: path: /Audio/Weapons/Guns/Gunshots/sniper.ogg fireOnDropChance: 1 + - type: MeleeWeapon + range: 1.75 + damage: + types: + Piercing: 5 + Slash: 3.5 + wideAnimationRotation: -135 + soundHit: + path: /Audio/Weapons/bladeslice.ogg + - type: IncreaseDamageOnWield + damage: + types: + Piercing: 4 + Slash: 2 + - type: DamageOtherOnHit + damage: + types: + Piercing: 8 + Slash: 3 + - type: EmbeddableProjectile + removalTime: 3.5 + - type: EmbedPassiveDamage + - type: ThrowingAngle + angle: 225 - type: entity name: Kardashev-Mosin @@ -114,15 +156,29 @@ capacity: 1 proto: CartridgeAntiMateriel - type: MeleeWeapon - wideAnimationRotation: -135 + range: 1.75 damage: types: - Piercing: 15 #you fucking stab em - Bloodloss: 2 #no way to apply bleed, triangular bayonet wounds are hard to fix(source:that one copypasta) - angle: 0 - animation: WeaponArcThrust + Piercing: 5 + Slash: 3.5 + wideAnimationRotation: -135 soundHit: path: /Audio/Weapons/bladeslice.ogg + - type: IncreaseDamageOnWield + damage: + types: + Piercing: 4 + Slash: 2 + - type: DamageOtherOnHit + damage: + types: + Piercing: 8 + Slash: 3 + - type: EmbeddableProjectile + removalTime: 3.5 + - type: EmbedPassiveDamage + - type: ThrowingAngle + angle: 225 - type: entity name: flintlock pistol @@ -152,4 +208,12 @@ proto: CartridgeAntiMateriel - type: StaticPrice price: 0 - + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 7.5 + bluntStaminaDamageFactor: 1.0 + wideAnimationRotation: 135 + - type: DamageOtherOnHit + staminaCost: 5 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/flare_gun.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/flare_gun.yml index 9b046a7aae6..0ad30e9ed6e 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/flare_gun.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/flare_gun.yml @@ -37,3 +37,16 @@ slots: - Belt - suitStorage + - type: MeleeWeapon + attackRate: 1.2 + damage: + types: + Blunt: 6.5 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 135 + soundHit: + collection: MetalThud + - type: DamageOtherOnHit + staminaCost: 4.5 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/pneumatic_cannon.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/pneumatic_cannon.yml index 12511729460..2f1527d3592 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/pneumatic_cannon.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/pneumatic_cannon.yml @@ -61,6 +61,19 @@ storagebase: !type:Container ents: [] gas_tank: !type:ContainerSlot + - type: MeleeWeapon + attackRate: 1.33 + damage: + types: + Blunt: 9 + swapKeys: true + disableHeavy: true + animation: WeaponArcThrust + wideAnimationRotation: 180 + soundHit: + collection: MetalThud + - type: DamageOtherOnHit + staminaCost: 8 - type: entity name: pie cannon