From 20b52d23a54863797891edc4d716debe8bf337bf Mon Sep 17 00:00:00 2001 From: rhailrake <49613070+rhailrake@users.noreply.github.com> Date: Sun, 16 Jul 2023 16:22:12 +0600 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B5=D1=80=D1=84=D0=BE=D1=86=D0=B8?= =?UTF-8?q?=D1=80=D0=BA=20(#203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * нерф дабла, заебала резня каждый раунд * ohio * blood dagger --- .../White/Other/CritSystem/CritComponent.cs | 3 + .../White/Other/CritSystem/CritSystem.cs | 30 ++++++- Resources/Locale/ru-RU/white/something.ftl | 1 + .../Prototypes/Catalog/uplink_catalog.yml | 15 ++++ .../Objects/Weapons/Melee/daggers.yml | 28 ++++++ .../Objects/Weapons/Melee/e_sword.yml | 4 +- .../Weapons/Melee/blood_dagger.rsi/icon.png | Bin 0 -> 916 bytes .../Melee/blood_dagger.rsi/inhand-left.png | Bin 0 -> 982 bytes .../Melee/blood_dagger.rsi/inhand-right.png | Bin 0 -> 958 bytes .../Weapons/Melee/blood_dagger.rsi/meta.json | 84 ++++++++++++++++++ 10 files changed, 159 insertions(+), 6 deletions(-) create mode 100644 Resources/Prototypes/Entities/Objects/Weapons/Melee/daggers.yml create mode 100644 Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/icon.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/inhand-left.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/inhand-right.png create mode 100644 Resources/Textures/Objects/Weapons/Melee/blood_dagger.rsi/meta.json 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 0000000000000000000000000000000000000000..4612949044e0f0e169e3962b1785bd16b3b2862f GIT binary patch literal 916 zcmV;F18e+=P)omx-v6;(0&e^*X##dP z|KUE6KQN>nQg}%f2wT|eIRkgOmPhlHbaz(wfbr}M-gA6(H4@T6?8%?!7s!Z{JmF%cyc29B!oN=?W71MU?JQZ__;Va8C(r@6%c)m z#Xo3Cj8|!7H2@E*)y{1RDTMDq1h>u*)KwUXf7F_wYz-FDB!Y#o2#|*uB17_zUKEwB z!9uEGt8pza#w;-u|KwF+&BfCY{I)DknZpdA%wYyl<}d>&bC>~?IV>OGdtmv1rR4+2 z@&RRO`G8|L!SVrZ53|h&q}-p^<{vc^w0r$x7 zn*5dzXu4_nfDTwbfHKGjq}rd?=I_-7EFX|-K7h***BbeN6#ShPAhSZL^8tW-7i4>W zfUE?y^8+;V0f74X0bB{#k;+7!1e_wbBrI7!VIaBi{8^2(vWzOGIbcd}`_rHhO ztM9jdtui}&z@hg^(P^R2%l1opI5RvFXs}>W;A8B-$=tzq!Sw7$cQ1J{mVeRvqZ!uT zyvTI0{{DL*hwM3jqW&Ib{_*)|<(9(-&3uyuPs{&%{%;Xu%Fpu;n&1ER_1dre_u}#Y zC*pM)yenCp|CevxKd~-<*{^Qa4Yo3N+m^4t`|_7?;QyuekM71#{(tjlyiG$)+_dla ztM~ud`tx)5`<=h;e767n^CEW3d8Mew@=%AX?<@bwuVXlTTkw4LqskeIOIJ6t<^Q+a|GVkW z%!e`cn*X1$J4Qcy7yI{c=e(f0c`SAdzU}P@ZGoOSh@91DW>*tG}|iZ4_@ z>H+=uH~h7}oI`fb-MG#BGZ@wue#-tXe%JO+({{h(_V4tC4os;;R&H?GbNatH!r5V`uKd?`V9;*e%`k%nPYOeIF^j@EZ=j=Zu0Qwx6W0Z) z=-um2+P@aMAfW@CFz{dTy|2F-b9?tOo@7wk#3y=F=ezWM$#pC<8)PIX@xc={( z^QZaN;D|UM^=C8FhdcNG$w4Dw|C68d_cHP1yW6bqe7>-K$~rdrJ%4}ydB^=Jz3ub= z;=kRt99V9zO;_3jAc>Em@E>!H%D(+h Tq0XMbjLP8Y>gTe~DWM4fS{lBY literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..e93b1a9810786eee6770cb189d922c5808c96a05 GIT binary patch literal 958 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSoCO|{#S9F5M?jcysy3fA0|Rq` zr;B4q#hkZu9P<`C2)Jf1nYd}DbV0+;gC0A3!;L5Lr<{x|oIR(J`3vu!#G@CcO%TeF zI^DLe?f*Ts*&gz<+)JgFzFOXB!lA&&)X~iFNTI<37xSDse@dXew}pU{QUZ0 z#;ncn5}s}2c=G)0{@tusjyVUM{IBMqW51E7wk_fK_U-SkY>O0c{PX9hxoE-;j@SB! zWW*M7J-lBXI(P4UZHReq#Se@x)>tt>^LaO*}tqIOin% zVfe-c_eX$+_~!kV|M(mmoKAjq*MN%?_9`$eCWkh({rmsu(`L?q*`?1oet!SFnIk~D zJ3i~*E2bm!w%vFju{+lGl>E<^e?nP19@fvvuR9@c9{udx_kI6Y{<+HXL+af@3;Xi* z@tNQ4k7h9)$-5T(fAh=l^8CN|KdavJSM}-gYxRYU$78wu zISuUgIi8GCzuu^Rnk>4&>@{CnUbn-)Uq3fTJLKB5*gp5?5;*Oz<2+yS&X+|`8~)h* zJjrDc)ACh3k*`}|w%q;Iuii|3U;E$kle`sc%NA20z9PQeeM+mOs6F-~RSUyUoB1$>8bg=d#Wzp$P!#)Qvy@ literal 0 HcmV?d00001 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