diff --git a/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs b/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs index c8a451b35f..fd4d598323 100644 --- a/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs +++ b/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs @@ -57,7 +57,7 @@ public sealed partial class CP14MagicSystem : CP14SharedMagicSystem private void OnSpellSpoken(Entity ent, ref CP14VerbalAspectSpeechEvent args) { if (args.Performer is not null && args.Speech is not null) - _chat.TrySendInGameICMessage(args.Performer.Value, args.Speech, InGameICChatType.Speak, true); + _chat.TrySendInGameICMessage(args.Performer.Value, args.Speech, args.Emote ? InGameICChatType.Emote : InGameICChatType.Speak, true); } private void OnSpawnMagicVisualEffect(Entity ent, ref CP14StartCastMagicEffectEvent args) diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs index 24380e5e90..3b59127edf 100644 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs +++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs @@ -95,7 +95,8 @@ public abstract partial class CP14SharedMagicSystem var ev = new CP14VerbalAspectSpeechEvent { Performer = args.Performer, - Speech = ent.Comp.StartSpeech, + Speech = Loc.GetString(ent.Comp.StartSpeech), + Emote = ent.Comp.Emote }; RaiseLocalEvent(ent, ref ev); } @@ -108,7 +109,8 @@ public abstract partial class CP14SharedMagicSystem var ev = new CP14VerbalAspectSpeechEvent { Performer = args.Performer, - Speech = ent.Comp.EndSpeech, + Speech = Loc.GetString(ent.Comp.EndSpeech), + Emote = ent.Comp.Emote }; RaiseLocalEvent(ent, ref ev); } diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectVerbalAspectComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectVerbalAspectComponent.cs index 8afa40ca6e..9d2dd25cb1 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectVerbalAspectComponent.cs +++ b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectVerbalAspectComponent.cs @@ -7,10 +7,13 @@ namespace Content.Shared._CP14.MagicSpell.Components; public sealed partial class CP14MagicEffectVerbalAspectComponent : Component { [DataField] - public string StartSpeech = string.Empty; + public string StartSpeech = string.Empty; //Not LocId! [DataField] - public string EndSpeech = string.Empty; + public string EndSpeech = string.Empty; //Not LocId! + + [DataField] + public bool Emote = false; } /// @@ -22,4 +25,6 @@ public sealed class CP14VerbalAspectSpeechEvent : EntityEventArgs public EntityUid? Performer { get; init; } public string? Speech { get; init; } + + public bool Emote { get; init; } } diff --git a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellThrowFromUser.cs b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellThrowFromUser.cs new file mode 100644 index 0000000000..d0d9b9c413 --- /dev/null +++ b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellThrowFromUser.cs @@ -0,0 +1,31 @@ +using Content.Shared.Throwing; + +namespace Content.Shared._CP14.MagicSpell.Spells; + +public sealed partial class CP14SpellThrowFromUser : CP14SpellEffect +{ + [DataField] + public float ThrowPower = 10f; + + public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args) + { + if (args.Target is null) + return; + + var targetEntity = args.Target.Value; + + var throwing = entManager.System(); + var xfom = entManager.System(); + + if (!entManager.TryGetComponent(args.User, out var userTransform)) + return; + + if (!entManager.TryGetComponent(targetEntity, out var targetTransform)) + return; + + var worldPos = xfom.GetWorldPosition(args.User.Value); + var foo = xfom.GetWorldPosition(args.Target.Value) - worldPos; + + throwing.TryThrow(targetEntity, foo * 2.5f, ThrowPower, args.User, doSpin: true); + } +} diff --git a/Resources/Locale/en-US/_CP14/magicSpells/speech.ftl b/Resources/Locale/en-US/_CP14/magicSpells/speech.ftl new file mode 100644 index 0000000000..20c3db8510 --- /dev/null +++ b/Resources/Locale/en-US/_CP14/magicSpells/speech.ftl @@ -0,0 +1 @@ +cp14-kick-emote = makes a strong kick \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/magicSpells/speech.ftl b/Resources/Locale/ru-RU/_CP14/magicSpells/speech.ftl new file mode 100644 index 0000000000..8b7586c54c --- /dev/null +++ b/Resources/Locale/ru-RU/_CP14/magicSpells/speech.ftl @@ -0,0 +1 @@ +cp14-kick-emote = совершает сильный пинок \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Darkness/T1_shadow_grab.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Darkness/T1_shadow_grab.yml index f0831ca93a..4aab7668fb 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Darkness/T1_shadow_grab.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Darkness/T1_shadow_grab.yml @@ -29,7 +29,6 @@ components: - Item canTargetSelf: false - checkCanAccess: false range: 10 itemIconStyle: BigAction sound: !type:SoundPathSpecifier diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Physical/T0_Kick.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Physical/T0_Kick.yml new file mode 100644 index 0000000000..f1e0cb953d --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Physical/T0_Kick.yml @@ -0,0 +1,42 @@ +- type: entity + id: CP14ActionSpellKick + name: Kick + description: You perform an epic leg kick at your chosen object, pushing it away from you. + components: + - type: Sprite + sprite: _CP14/Effects/Magic/spells_icons.rsi + state: kick + - type: CP14MagicEffectCastSlowdown + speedMultiplier: 0.4 + - type: CP14MagicEffectStaminaCost + stamina: 40 + - type: CP14MagicEffect + effects: + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Paralyze + paralyzeTime: 1 + - !type:CP14SpellThrowFromUser + throwPower: 9 + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14DustEffect + - type: CP14MagicEffectVerbalAspect + endSpeech: cp14-kick-emote + emote: true + - type: EntityTargetAction + canTargetSelf: false + range: 1 + itemIconStyle: BigAction + sound: !type:SoundPathSpecifier + path: /Audio/Effects/hit_kick.ogg + params: + pitch: 2 + icon: + sprite: _CP14/Effects/Magic/spells_icons.rsi + state: kick + event: !type:CP14DelayedEntityTargetActionEvent + cooldown: 5 + castDelay: 1 + entityDistance: 1 + breakOnMove: false \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml b/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml index a4bdca59b6..0064419f12 100644 --- a/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml +++ b/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml @@ -427,6 +427,7 @@ - CP14ModularIronPickaxe - CP14Lighter - CP14Torch + - CP14SmokingPipeFilledTobacco - CP14FluteInstrument - CP14LyraInstrument - CP14ClothingBeltQuiver @@ -498,7 +499,7 @@ - CP14Torch - type: loadout - id: CP14Pipe + id: CP14SmokingPipeFilledTobacco storage: back: - CP14SmokingPipeFilledTobacco @@ -559,6 +560,7 @@ - CP14ActionSpellFreeze - CP14ActionSpellBeerCreation - CP14ActionSpellSprint + - CP14ActionSpellKick - type: loadout id: CP14ActionSpellBase @@ -755,3 +757,9 @@ species: - CP14Goblin inverted: true # Goblins cannot take this spell, they have buffed version by default + +- type: loadout + id: CP14ActionSpellKick + dummyEntity: CP14ActionSpellKick + actions: + - CP14ActionSpellKick diff --git a/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/kick.png b/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/kick.png new file mode 100644 index 0000000000..3977141811 Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/kick.png differ diff --git a/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/meta.json b/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/meta.json index 4aa9e10ac4..275ef12cf9 100644 --- a/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/meta.json +++ b/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "All right reserved", - "copyright": "Created by .kreks., cure_poison, cure_burn, mana_gift, water creation, plant_growth, beer creation, sprint, tiefling_revenge, demi_arrow, rift_shield, rift_arrow, signal_light_blue, signal_light_red, freeze, signal_light_yellow and resurrection by TheShuEd", + "copyright": "Created by .kreks., cure_poison, cure_burn, mana_gift, water creation, plant_growth, beer creation, sprint, tiefling_revenge, demi_arrow, rift_shield, rift_arrow, signal_light_blue, signal_light_red, freeze, kick, signal_light_yellow and resurrection by TheShuEd", "states": [ { "name": "beer_creation" @@ -43,6 +43,9 @@ { "name": "ice_shards" }, + { + "name": "kick" + }, { "name": "mana_consume" },