diff --git a/Content.Server/White/Other/CritSystem/CritComponent.cs b/Content.Server/White/Other/CritSystem/CritComponent.cs index 9ed6a35339..457f6ef1b1 100644 --- a/Content.Server/White/Other/CritSystem/CritComponent.cs +++ b/Content.Server/White/Other/CritSystem/CritComponent.cs @@ -11,6 +11,9 @@ public sealed partial class CritComponent : Component [ViewVariables(VVAccess.ReadWrite)] public float CritMultiplier = 2.5f; + [DataField("isBloodDagger")] + public bool IsBloodDagger; + [DataField("workingChance")] public int? WorkingChance; } diff --git a/Content.Server/White/Other/CritSystem/CritSystem.cs b/Content.Server/White/Other/CritSystem/CritSystem.cs index 76b04b4f14..8ba974512f 100644 --- a/Content.Server/White/Other/CritSystem/CritSystem.cs +++ b/Content.Server/White/Other/CritSystem/CritSystem.cs @@ -2,6 +2,7 @@ using Content.Server.Body.Systems; using Content.Server.Popups; using Content.Shared.Damage; using Content.Shared.Damage.Prototypes; +using Content.Shared.Examine; using Content.Shared.Mobs.Components; using Content.Shared.Popups; using Content.Shared.Weapons.Melee.Events; @@ -16,11 +17,24 @@ public sealed class CritSystem : EntitySystem [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly PopupSystem _popup = default!; [Dependency] private readonly BloodstreamSystem _bloodstream = default!; + [Dependency] private readonly DamageableSystem _damageableSystem = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(HandleHit); + SubscribeLocalEvent(OnExamine); + } + + private void OnExamine(EntityUid uid, CritComponent component, ExaminedEvent args) + { + if (component.IsBloodDagger) + { + args.PushMarkup( + "[color=red]Критическая жажда: Кинжал Жажды обладает смертоносной точностью. Его владелец имеет 20% шанс нанести критический урон, поражая врага в его самые уязвимые места.\n" + + "Кровавый абсорб: При каждом успешном критическом ударе, кинжал извлекает кровь из цели, восстанавливая здоровье владельцу пропорционально количеству высосанной крови.[/color]" + ); + } } private void HandleHit(EntityUid uid, CritComponent component, MeleeHitEvent args) @@ -34,13 +48,21 @@ public sealed class CritSystem : EntitySystem continue; var damage = args.BaseDamage.Total * component.CritMultiplier; - var ohio = _random.Next(1, 20); - args.BonusDamage = new DamageSpecifier(_prototypeManager.Index("Blunt"), damage); + if (component.IsBloodDagger) + { + var ohio = _random.Next(1, 20); + var damageGroup = _prototypeManager.Index("Brute"); + + _bloodstream.TryModifyBloodLevel(target, -ohio); + _damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(damageGroup, -ohio)); + + damage = args.BaseDamage.Total * component.CritMultiplier + ohio; + } + + args.BonusDamage = new DamageSpecifier(_prototypeManager.Index("Slash"), damage); _popup.PopupEntity($@"Crit! {damage}", args.User, PopupType.MediumCaution); - - _bloodstream.TryModifyBloodLevel(target, -ohio); } } diff --git a/Resources/Locale/ru-RU/white/something.ftl b/Resources/Locale/ru-RU/white/something.ftl index 19ef6419c4..01187a294b 100644 --- a/Resources/Locale/ru-RU/white/something.ftl +++ b/Resources/Locale/ru-RU/white/something.ftl @@ -85,6 +85,7 @@ shoes-they = На ногах у них # Character information character-information-verb-message = Информация о персонаже +character-information-verb-text = Информация о персонаже character-information-ui-title = Информация о персонаже character-information-ui-flavor-text-placeholder = Нет заданного флавора. diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 2c5d6e04ae..ed6d6b56a6 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -1,5 +1,20 @@ # TODO: make more categories # Guns +- type: listing + id: UplinkBloodDagger + name: кинжал жажды + description: "Критическая жажда: Кинжал Жажды обладает смертоносной точностью. Его владелец имеет 20% шанс нанести критический урон, поражая врага в его самые уязвимые места. Кровавый абсорб: При каждом успешном критическом ударе, кинжал извлекает кровь из цели, восстанавливая здоровье владельцу пропорционально количеству высосанной крови." + icon: { sprite: /Textures/Objects/Weapons/Melee/blood_dagger.rsi, state: icon } + productEntity: BloodSuckerDagger + cost: + Telecrystal: 10 + categories: + - UplinkWeapons + conditions: + - !type:StoreWhitelistCondition + blacklist: + tags: + - NukeOpsUplink - type: listing id: UplinkPistolViper diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/daggers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/daggers.yml new file mode 100644 index 0000000000..7c7cd45153 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/daggers.yml @@ -0,0 +1,28 @@ +- type: entity + name: кинжал жажды + parent: BaseItem + id: BloodSuckerDagger + components: + - type: Sharp + - type: Sprite + sprite: Objects/Weapons/Melee/blood_dagger.rsi + state: icon + - type: MeleeWeapon + attackRate: 1.3 + damage: + types: + Slash: 10.5 + - type: Item + size: 20 + - type: Clothing + sprite: Objects/Weapons/Melee/blood_dagger.rsi + slots: + - back + - type: DisarmMalus + - type: Crit + critChance: 20 + critMultiplier: 2.2 + isBloodDagger: true + - type: Reflect + reflectProb: 0.15 + enabled: true diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml index 94c55d46b1..59685f8d1f 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/e_sword.yml @@ -233,8 +233,8 @@ - type: IncreaseDamageOnWield damage: types: - Slash: 7.5 - Heat: 7.5 + Slash: 1.5 + Heat: 1.5 - type: MeleeWeapon attackRate: 1 - type: Reflect diff --git a/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/icon.png b/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/icon.png new file mode 100644 index 0000000000..4612949044 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/icon.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/inhand-left.png b/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/inhand-left.png new file mode 100644 index 0000000000..e990972857 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/inhand-right.png b/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/inhand-right.png new file mode 100644 index 0000000000..e93b1a9810 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/inhand-right.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/meta.json b/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/meta.json new file mode 100644 index 0000000000..bbc105ae0b --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/meta.json @@ -0,0 +1,84 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "poxuy", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.5 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 0.8, + 0.1, + 0.1, + 0.1 + ], + [ + 0.8, + 0.1, + 0.1, + 0.1 + ], + [ + 0.8, + 0.1, + 0.1, + 0.1 + ], + [ + 0.8, + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 0.8, + 0.1, + 0.1, + 0.1 + ], + [ + 0.8, + 0.1, + 0.1, + 0.1 + ], + [ + 0.8, + 0.1, + 0.1, + 0.1 + ], + [ + 0.8, + 0.1, + 0.1, + 0.1 + ] + ] + } + ] +} \ No newline at end of file