diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs index 39bb05278b..389fb9b075 100644 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs +++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs @@ -89,6 +89,7 @@ public partial class CP14SharedMagicSystem : EntitySystem { BreakOnMove = delayedEffect.BreakOnMove, BreakOnDamage = delayedEffect.BreakOnDamage, + Hidden = delayedEffect.Hidden, BlockDuplicate = true, }; @@ -126,6 +127,7 @@ public partial class CP14SharedMagicSystem : EntitySystem { BreakOnMove = delayedEffect.BreakOnMove, BreakOnDamage = delayedEffect.BreakOnDamage, + Hidden = delayedEffect.Hidden, BlockDuplicate = true, }; @@ -158,6 +160,7 @@ public partial class CP14SharedMagicSystem : EntitySystem { BreakOnMove = delayedEffect.BreakOnMove, BreakOnDamage = delayedEffect.BreakOnDamage, + Hidden = delayedEffect.Hidden, BlockDuplicate = true, }; diff --git a/Content.Shared/_CP14/MagicSpell/Events/CP14DelayedActionEvents.cs b/Content.Shared/_CP14/MagicSpell/Events/CP14DelayedActionEvents.cs index 7e12413bfa..4f16752afe 100644 --- a/Content.Shared/_CP14/MagicSpell/Events/CP14DelayedActionEvents.cs +++ b/Content.Shared/_CP14/MagicSpell/Events/CP14DelayedActionEvents.cs @@ -16,6 +16,9 @@ public sealed partial class CP14DelayedWorldTargetActionEvent : WorldTargetActio [DataField] public bool BreakOnDamage { get; private set; } = true; + + [DataField] + public bool Hidden { get; private set; } = false; } [Serializable, NetSerializable] @@ -38,6 +41,9 @@ public sealed partial class CP14DelayedEntityTargetActionEvent : EntityTargetAct [DataField] public bool BreakOnDamage { get; private set; } = true; + + [DataField] + public bool Hidden { get; private set; } = false; } [Serializable, NetSerializable] @@ -56,6 +62,9 @@ public sealed partial class CP14DelayedInstantActionEvent : InstantActionEvent, [DataField] public bool BreakOnDamage { get; private set; } = true; + + [DataField] + public bool Hidden { get; private set; } = false; } [Serializable, NetSerializable] diff --git a/Content.Shared/_CP14/MagicSpell/Events/CP14IDelayedMagicEffect.cs b/Content.Shared/_CP14/MagicSpell/Events/CP14IDelayedMagicEffect.cs index 0e52bc538a..1cf716df7b 100644 --- a/Content.Shared/_CP14/MagicSpell/Events/CP14IDelayedMagicEffect.cs +++ b/Content.Shared/_CP14/MagicSpell/Events/CP14IDelayedMagicEffect.cs @@ -10,4 +10,6 @@ public interface ICP14DelayedMagicEffect // The speak n spell interface public bool BreakOnMove { get; } public bool BreakOnDamage { get; } + + public bool Hidden{ get; } } diff --git a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellCasterTeleport.cs b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellCasterTeleport.cs index 070460a21f..c3359f2784 100644 --- a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellCasterTeleport.cs +++ b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellCasterTeleport.cs @@ -1,3 +1,5 @@ +using Content.Shared.Examine; +using Content.Shared.Popups; using Robust.Shared.Map; using Robust.Shared.Prototypes; @@ -5,6 +7,9 @@ namespace Content.Shared._CP14.MagicSpell.Spells; public sealed partial class CP14SpellCasterTeleport : CP14SpellEffect { + [DataField] + public bool NeedVision = true; + public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args) { EntityCoordinates? targetPoint = null; @@ -17,6 +22,15 @@ public sealed partial class CP14SpellCasterTeleport : CP14SpellEffect return; var transform = entManager.System(); + var examine = entManager.System(); + var popup = entManager.System(); + + if (NeedVision && !examine.InRangeUnOccluded(args.User.Value, targetPoint.Value)) + { + // can only dash if the destination is visible on screen + popup.PopupEntity(Loc.GetString("dash-ability-cant-see"), args.User.Value, args.User.Value); + return; + } transform.SetCoordinates(args.User.Value, targetPoint.Value); } diff --git a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellSpawnEntity.cs b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellSpawnEntityOnTarget.cs similarity index 91% rename from Content.Shared/_CP14/MagicSpell/Spells/CP14SpellSpawnEntity.cs rename to Content.Shared/_CP14/MagicSpell/Spells/CP14SpellSpawnEntityOnTarget.cs index 127545e7b9..6545f85b7e 100644 --- a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellSpawnEntity.cs +++ b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellSpawnEntityOnTarget.cs @@ -3,7 +3,7 @@ using Robust.Shared.Prototypes; namespace Content.Shared._CP14.MagicSpell.Spells; -public sealed partial class CP14SpellSpawnEntity : CP14SpellEffect +public sealed partial class CP14SpellSpawnEntityOnTarget : CP14SpellEffect { [DataField] public List Spawns = new(); diff --git a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellSpawnEntityOnUser.cs b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellSpawnEntityOnUser.cs new file mode 100644 index 0000000000..43b3cc34e5 --- /dev/null +++ b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellSpawnEntityOnUser.cs @@ -0,0 +1,21 @@ +using Robust.Shared.Map; +using Robust.Shared.Prototypes; + +namespace Content.Shared._CP14.MagicSpell.Spells; + +public sealed partial class CP14SpellSpawnEntityOnUser : CP14SpellEffect +{ + [DataField] + public List Spawns = new(); + + public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args) + { + if (args.User is null || !entManager.TryGetComponent(args.User.Value, out var transformComponent)) + return; + + foreach (var spawn in Spawns) + { + entManager.SpawnAtPosition(spawn, transformComponent.Coordinates); + } + } +} diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/cure_wounds.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/cure_wounds.yml index c06aa14b02..f48ebeb081 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/cure_wounds.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/cure_wounds.yml @@ -6,11 +6,11 @@ - type: CP14MagicEffect manaCost: 15 telegraphyEffects: - - !type:CP14SpellSpawnEntity + - !type:CP14SpellSpawnEntityOnTarget spawns: - CP14ImpactEffectCureWounds effects: - - !type:CP14SpellSpawnEntity + - !type:CP14SpellSpawnEntityOnTarget spawns: - CP14ImpactEffectCureWounds - !type:CP14SpellApplyEntityEffect diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/flame_creation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/flame_creation.yml index fb412c18e9..b73ec9b4e6 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/flame_creation.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/flame_creation.yml @@ -6,7 +6,7 @@ - type: CP14MagicEffect manaCost: 5 effects: - - !type:CP14SpellSpawnEntity + - !type:CP14SpellSpawnEntityOnTarget spawns: - CP14ImpactEffectFlameCreation - !type:CP14SpellSpawnInHandEntity diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_dagger.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_dagger.yml index 2fb5dfa55a..418b7fab6a 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_dagger.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_dagger.yml @@ -6,7 +6,7 @@ - type: CP14MagicEffect manaCost: 15 effects: - - !type:CP14SpellSpawnEntity + - !type:CP14SpellSpawnEntityOnTarget spawns: - CP14ImpactEffectIceDagger - !type:CP14SpellSpawnInHandEntity diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_step.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_step.yml index f46741e0dc..2d88e9cc7b 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_step.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_step.yml @@ -1,26 +1,24 @@ - type: entity id: CP14ActionSpellShadowStep name: Shadow step - description: A step through the gash of reality that allows you to cover a lot of distance quickly + description: A step through the gash of reality that allows you to cover a small of distance quickly components: - type: CP14MagicEffect - manaCost: 40 + manaCost: 20 telegraphyEffects: - - !type:CP14SpellSpawnEntity + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectShadowStep + - !type:CP14SpellSpawnEntityOnUser spawns: - CP14ImpactEffectShadowStep effects: - - !type:CP14SpellSpawnEntity - spawns: - - CP14ImpactEffectShadowStep - !type:CP14SpellCasterTeleport - - type: CP14MagicEffectVerbalAspect - startSpeech: "Tenebrae, accipe me..." - endSpeech: "in alium locum" + - type: CP14MagicEffectSomaticAspect - type: WorldTargetAction - useDelay: 15 - range: 10 - checkCanAccess: false + useDelay: 10 + range: 7 + checkCanAccess: true itemIconStyle: BigAction sound: !type:SoundPathSpecifier path: /Audio/Magic/rumble.ogg @@ -29,6 +27,7 @@ state: shadow_step event: !type:CP14DelayedWorldTargetActionEvent delay: 1 + hidden: true - type: entity id: CP14ImpactEffectShadowStep @@ -37,6 +36,5 @@ components: - type: Sprite layers: - - state: particles_up - color: "#79b330" - shader: unshaded \ No newline at end of file + - state: wave_up + color: "#5e427e" \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Rings/ring.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Rings/ring.yml index 28ffdc5562..72c30a3015 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Rings/ring.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Rings/ring.yml @@ -63,4 +63,22 @@ - type: CP14SpellStorageAccessWearing - type: CP14SpellStorage spells: - - CP14ActionSpellCureWounds \ No newline at end of file + - CP14ActionSpellCureWounds + +- type: entity + id: CP14ClothingRingShadowStep + parent: CP14ClothingRingBase + name: conductive ring + description: A standard mana-conductive ring that allows the user to step throught shadows. + suffix: Shadow step + components: + - type: Sprite + layers: + - state: brass_ring + - state: emerald_stone_small + - type: CP14SpellStorageRequireAttune + - type: CP14MagicAttuningItem + - type: CP14SpellStorageAccessWearing + - type: CP14SpellStorage + spells: + - CP14ActionSpellShadowStep \ No newline at end of file diff --git a/Resources/Textures/_CP14/Effects/Magic/cast_impact.rsi/meta.json b/Resources/Textures/_CP14/Effects/Magic/cast_impact.rsi/meta.json index d9e4483942..cd1908d9de 100644 --- a/Resources/Textures/_CP14/Effects/Magic/cast_impact.rsi/meta.json +++ b/Resources/Textures/_CP14/Effects/Magic/cast_impact.rsi/meta.json @@ -21,6 +21,21 @@ 0.2 ] ] + }, + { + "name": "wave_up", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] } ] } \ No newline at end of file diff --git a/Resources/Textures/_CP14/Effects/Magic/cast_impact.rsi/wave_up.png b/Resources/Textures/_CP14/Effects/Magic/cast_impact.rsi/wave_up.png new file mode 100644 index 0000000000..51c1a7969b Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Magic/cast_impact.rsi/wave_up.png differ