From aed7e0994a2b73b353cb67f80ee646d8e8860aa4 Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Wed, 26 Feb 2025 12:01:14 +0300 Subject: [PATCH] pax bard (#943) --- .../CP14SharedMagicSystem.Checks.cs | 11 +++ .../CP14MagicEffctPacifiedBlockComponent.cs | 12 +++ .../en-US/_CP14/magicEnergy/magic-spells.ftl | 3 +- .../ru-RU/_CP14/magicEnergy/magic-spells.ftl | 3 +- .../Actions/Spells/Fire/T1_fire_rune.yml | 1 + .../Actions/Spells/Fire/T1_fireball.yml | 1 + .../Spells/Healing/T0_heal_ballade.yml | 2 +- .../Spells/Healing/T0_peace_ballade.yml | 83 ++++++++++++++++++ .../Spells/Healing/T0_speed_ballade.yml | 2 +- .../Actions/Spells/Physical/T0_Kick.yml | 1 + .../Actions/Spells/Water/T1_ice_shards.yml | 1 + .../Prototypes/_CP14/Loadouts/spells.yml | 14 +++ .../Actions/Spells/healing.rsi/heal_music.png | Bin 323 -> 326 bytes .../Actions/Spells/healing.rsi/meta.json | 5 +- .../Spells/healing.rsi/peace_music.png | Bin 0 -> 360 bytes .../Spells/healing.rsi/speed_music.png | Bin 349 -> 329 bytes 16 files changed, 134 insertions(+), 5 deletions(-) create mode 100644 Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffctPacifiedBlockComponent.cs create mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_peace_ballade.yml create mode 100644 Resources/Textures/_CP14/Actions/Spells/healing.rsi/peace_music.png diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs index 9f85896803..75d5ebb3dd 100644 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs +++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs @@ -1,5 +1,6 @@ using Content.Shared._CP14.MagicSpell.Components; using Content.Shared._CP14.MagicSpell.Events; +using Content.Shared.CombatMode.Pacification; using Content.Shared.Damage.Components; using Content.Shared.Hands.Components; using Content.Shared.Instruments; @@ -16,6 +17,7 @@ public abstract partial class CP14SharedMagicSystem SubscribeLocalEvent(OnVerbalCheck); SubscribeLocalEvent(OnManaCheck); SubscribeLocalEvent(OnStaminaCheck); + SubscribeLocalEvent(OnPacifiedCheck); //Verbal speaking SubscribeLocalEvent(OnVerbalAspectStartCast); @@ -90,6 +92,15 @@ public abstract partial class CP14SharedMagicSystem } } + private void OnPacifiedCheck(Entity ent, ref CP14CastMagicEffectAttemptEvent args) + { + if (HasComp(args.Performer)) + { + args.PushReason(Loc.GetString("cp14-magic-spell-pacified")); + args.Cancel(); + } + } + private void OnVerbalAspectStartCast(Entity ent, ref CP14StartCastMagicEffectEvent args) { var ev = new CP14VerbalAspectSpeechEvent diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffctPacifiedBlockComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffctPacifiedBlockComponent.cs new file mode 100644 index 0000000000..82b03ac22d --- /dev/null +++ b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffctPacifiedBlockComponent.cs @@ -0,0 +1,12 @@ +using Content.Shared._CP14.MagicSpellStorage; +using Content.Shared.FixedPoint; + +namespace Content.Shared._CP14.MagicSpell.Components; + +/// +/// Blocks the target from using magic if they are pacified. +/// +[RegisterComponent, Access(typeof(CP14SharedMagicSystem), typeof(CP14SpellStorageSystem))] +public sealed partial class CP14MagicEffectPacifiedBlockComponent : Component +{ +} diff --git a/Resources/Locale/en-US/_CP14/magicEnergy/magic-spells.ftl b/Resources/Locale/en-US/_CP14/magicEnergy/magic-spells.ftl index edf1db07d7..376c1b3545 100644 --- a/Resources/Locale/en-US/_CP14/magicEnergy/magic-spells.ftl +++ b/Resources/Locale/en-US/_CP14/magicEnergy/magic-spells.ftl @@ -16,4 +16,5 @@ cp14-magic-spell-need-verbal-component = You can't cast the spell out loud. cp14-magic-spell-need-somatic-component = You don't have your hands free. cp14-magic-spell-stamina-not-enough = You don't have the energy to do it. -cp14-magic-staminacost = Stamina cost \ No newline at end of file +cp14-magic-staminacost = Stamina cost +cp14-magic-spell-pacified = It could hurt someone! \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-spells.ftl b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-spells.ftl index a4c8b32d09..433beaa736 100644 --- a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-spells.ftl +++ b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-spells.ftl @@ -16,4 +16,5 @@ cp14-magic-spell-need-verbal-component = Вы не можете произнес cp14-magic-spell-need-somatic-component = Вам не хватает свободных рук. cp14-magic-spell-stamina-not-enough = Вам не хватает сил, чтобы сделать это. -cp14-magic-staminacost = Затраты энергии \ No newline at end of file +cp14-magic-staminacost = Затраты энергии +cp14-magic-spell-pacified = Это может навредить кому либо! \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fire_rune.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fire_rune.yml index 257086aceb..e4555bc7ce 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fire_rune.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fire_rune.yml @@ -22,6 +22,7 @@ - CP14AreaEntityEffectFireRune - type: CP14MagicEffectCastingVisual proto: CP14RuneEarthWall + - type: CP14MagicEffectPacifiedBlock - type: EntityWorldTargetAction range: 10 itemIconStyle: BigAction diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fireball.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fireball.yml index 6b6211061a..4ca926c72f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fireball.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fireball.yml @@ -24,6 +24,7 @@ - type: CP14MagicEffectSomaticAspect - type: CP14MagicEffectCastingVisual proto: CP14RuneFireball + - type: CP14MagicEffectPacifiedBlock - type: EntityWorldTargetAction checkCanAccess: false raiseOnUser: true diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_heal_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_heal_ballade.yml index e88461df09..ff5c57b4cd 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_heal_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_heal_ballade.yml @@ -71,7 +71,7 @@ - type: Sprite sprite: _CP14/Effects/music.rsi layers: - - state: notes_3 + - state: notes_5 color: "#79b330" shader: unshaded diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_peace_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_peace_ballade.yml new file mode 100644 index 0000000000..39b2ead4be --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_peace_ballade.yml @@ -0,0 +1,83 @@ +- type: entity + id: CP14ActionSpellPeaceBallade + name: Peace ballade + description: Your music is filled with peaceful magic, forbidding anyone near you to fight. + components: + - type: Sprite + sprite: _CP14/Actions/Spells/healing.rsi + state: peace_music + - type: CP14MagicEffectCastSlowdown + speedMultiplier: 0.8 + - type: CP14MagicEffectManaCost + manaCost: 5 + - type: CP14MagicEffect + magicType: Healing + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14AreaEntityEffectPeaceBallade + - type: CP14MagicEffectRequiredMusicTool + - type: CP14MagicEffectCastingVisual + proto: CP14RunePeaceBallade + - type: InstantAction + itemIconStyle: BigAction + sound: !type:SoundPathSpecifier + path: /Audio/Magic/rumble.ogg + icon: + sprite: _CP14/Actions/Spells/healing.rsi + state: peace_music + event: !type:CP14ToggleableInstantActionEvent + effectFrequency: 1 + cooldown: 15 + castTime: 120 + hidden: true + +- type: entity + id: CP14AreaEntityEffectPeaceBallade + categories: [ HideSpawnMenu ] + components: + - type: TimedDespawn + lifetime: 1.6 + - type: CP14AreaEntityEffect + range: 3 + maxTargets: 4 + whitelist: + components: + - MobState + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectPeaceBallade + - !type:CP14SpellApplyEntityEffect + effects: + - !type:GenericStatusEffect + key: Pacified + component: Pacified + type: Add + time: 1.5 + +- type: entity + id: CP14ImpactEffectPeaceBallade + parent: CP14BaseMagicImpact + categories: [ HideSpawnMenu ] + components: + - type: Sprite + sprite: _CP14/Effects/music.rsi + layers: + - state: notes_5 + color: "#bd4fda" + shader: unshaded + +- type: entity + id: CP14RunePeaceBallade + parent: CP14BaseMagicRune + categories: [ HideSpawnMenu ] + components: + - type: PointLight + color: "#bd4fda" + - type: Sprite + sprite: _CP14/Effects/music.rsi + layers: + - state: notes_3 + color: "#bd4fda" + shader: unshaded \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_speed_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_speed_ballade.yml index f8dd9eb012..94d0cff45f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_speed_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_speed_ballade.yml @@ -63,7 +63,7 @@ - type: Sprite sprite: _CP14/Effects/music.rsi layers: - - state: notes_3 + - state: notes_5 color: "#e8cb56" shader: unshaded diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Physical/T0_Kick.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Physical/T0_Kick.yml index 907ca06b10..7e2ad36453 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Physical/T0_Kick.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Physical/T0_Kick.yml @@ -31,6 +31,7 @@ startSpeech: cp14-kick-emote-start endSpeech: cp14-kick-emote emote: true + - type: CP14MagicEffectPacifiedBlock - type: EntityTargetAction canTargetSelf: false range: 1 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_shards.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_shards.yml index 4cb8916e13..b04e2a9926 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_shards.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_shards.yml @@ -22,6 +22,7 @@ endSpeech: "Glacies acus!" - type: CP14MagicEffectCastingVisual proto: CP14RuneIceShards + - type: CP14MagicEffectPacifiedBlock - type: EntityWorldTargetAction repeat: true checkCanAccess: false diff --git a/Resources/Prototypes/_CP14/Loadouts/spells.yml b/Resources/Prototypes/_CP14/Loadouts/spells.yml index 041e4b59bf..850bca6e47 100644 --- a/Resources/Prototypes/_CP14/Loadouts/spells.yml +++ b/Resources/Prototypes/_CP14/Loadouts/spells.yml @@ -24,6 +24,7 @@ - CP14ActionSpellKick - CP14ActionSpellHealBallade - CP14ActionSpellSpeedBallade + - CP14ActionSpellPeaceBallade - type: loadout id: CP14ActionSpellBase @@ -272,6 +273,19 @@ actions: - CP14ActionSpellSpeedBallade effects: + - !type:JobRequirementLoadoutEffect + requirement: + !type:TraitsRequirement + inverted: true + traits: + - CP14ManaWasting + +- type: loadout + id: CP14ActionSpellPeaceBallade + dummyEntity: CP14ActionSpellPeaceBallade + actions: + - CP14ActionSpellPeaceBallade + effects: - !type:JobRequirementLoadoutEffect requirement: !type:TraitsRequirement diff --git a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/heal_music.png b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/heal_music.png index 0bd2979a843814cf2aa7ca10001379fe9352b303..f505e30a69a3fd502df7c677ec28fd73e60a8a32 100644 GIT binary patch delta 287 zcmV+)0pR|_0>%Q6Fn<96Nkl5JkU^m4%nENyBM80V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