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 0bd2979a84..f505e30a69 100644 Binary files a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/heal_music.png and b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/heal_music.png differ diff --git a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/meta.json b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/meta.json index 183475062f..c68661f925 100644 --- a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/meta.json +++ b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "All right reserved", - "copyright": "Created by .kreks., cure_burn, cure_poison, heal_music, speed_music, plant_growth by TheShuEd", + "copyright": "Created by TheShuEd, cure_wounds created by .kreks.", "states": [ { "name": "cure_burn" @@ -19,6 +19,9 @@ { "name": "heal_music" }, + { + "name": "peace_music" + }, { "name": "plant_growth" }, diff --git a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/peace_music.png b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/peace_music.png new file mode 100644 index 0000000000..cba804143b Binary files /dev/null and b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/peace_music.png differ diff --git a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/speed_music.png b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/speed_music.png index e4af409d88..150e03c366 100644 Binary files a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/speed_music.png and b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/speed_music.png differ