From 930caa30b350d06195c6a5de9e9f68cb3e457ef3 Mon Sep 17 00:00:00 2001 From: Red <96445749+TheShuEd@users.noreply.github.com> Date: Wed, 17 Sep 2025 22:13:10 +0300 Subject: [PATCH] Magic spell refactor part 2 (#1757) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * DoAfter support for Actions (#38253) * Adds Action DoAfter Events * Adds DoAfterArgs fields to DoAfterComp * Adds a base doafter action * Adds Attempt action doafter logic * Adds doafter logic to actions * Changes Action Attempt Doafter and action doafter to take in Performer and the original use delay. Use delay now triggers when a repeated action is cancelled. * Readds the TryPerformAction method and readds request perform action into the action doafter events * Adds a force skip to DoAfter Cancel so we can skip the complete check * Adds a Delay Reduction field to the comp and to the comp state * Fixes doafter mispredict, changes doafter comp check to a guard clause, sets delay reduction if it exists. * Cancels ActionDoAfter if charges is 0 * Serializes Attempt Frequency * Comment for rework * Changes todo into a comment * Moves doafterargs to doafterargscomp * Adds DoAfterArgs comp to BaseDoAfterAction * Removes unused trycomp with actionDoAfter * Replaces DoAfterRepateUseDelay const with timespan.zero * Removes unused usings * Makes SharedActionsSystem partial, adds DoAfter partial class to ActionSystem, moves ActionDoAfter logic to the SharedActionsSystem.DoAfter class * Cleanup and prediction * Renames OnActionDoAfterAttempt to OnActionDoAfter, moves both to Shared Action DoAfter * Removes ActionAttemptDoAfterEvent and moves its summaries to ActionDoAfterEvent. Converts OnActionDoAfterAttempt into TryStartActionDoAfter * Removes Extra check for charges and actiondoafters * Sloptimization * Cleanup * Cleanup * Adds param descs --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> * Refactor CP14 action emote and speech handling Moved emote and speech logic from magic spell components to dedicated CP14 action components and systems. Removed CP14MagicEffectEmotingComponent and related event handling, introducing CP14ActionEmotingComponent and updating event subscriptions. Updated resource consumption and performed logic to use new action-based components. Adjusted affected prototypes and removed obsolete code. * kicking in * Refactor athletic spell actions and remove mana cost calc Reworked dash and sprint spell YAMLs to use modular effect events and updated their action properties. Removed the unused CalculateManacost method from CP14SharedMagicSystem.cs. Also removed the startDelay property from the kick action. * fix cooldown and resource cost * casting visuals adapt * telegraphy adapt * slowdown adaption * Remove Lumera and Merkas demigod spells and skills Deleted all spell and skill prototypes related to the Lumera and Merkas demigods, including their actions, effects, and skill trees. Updated athletic sprint and second wind spells, and refactored portal_to_city spell to use modular effects. Also added a debug category to the admin skill reset verb. * fuck... * done * some refactor hell * light + lurker process * meta process * mobs process * vampire * finish * no clientside * Update water_creation.yml * fixes * Update ice_ghost.yml * а * viator review * fix lurker --------- Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> --- .../_CP14/MagicSpell/CP14ClientMagicSystem.cs | 7 - .../Actions/CP14ActionSystem.DoAfters.cs | 76 +++++++ .../_CP14/Actions/CP14ActionSystem.cs | 5 + .../_CP14/MagicSpell/CP14MagicSystem.cs | 43 +--- .../CP14SpellStorageSystem.cs | 6 - .../Actions/SharedActionsSystem.DoAfter.cs | 8 +- .../_CP14/Actions/CP14ActionSystem.Attempt.cs | 25 +-- .../Actions/CP14ActionSystem.DoAfters.cs | 55 +++++ .../_CP14/Actions/CP14ActionSystem.Examine.cs | 1 - .../Actions/CP14ActionSystem.Performed.cs | 97 +++++++++ .../CP14SharedActionSystem.ModularEffects.cs | 145 +++++++++++++ .../_CP14/Actions/CP14SharedActionSystem.cs | 37 ++++ .../CP14ActionDoAfterSlowdownComponent.cs | 11 + .../CP14ActionDoAfterVisualsComponent.cs} | 6 +- .../Components/CP14ActionEmotingComponent.cs | 11 + .../CP14ActionFreeHandsRequiredComponent.cs | 4 +- .../CP14ActionRequiredMusicToolComponent.cs | 4 +- .../Components/CP14ActionSSDBlockComponent.cs | 2 +- .../Components/CP14ActionSpeakingComponent.cs | 16 +- .../CP14ActionStaminaCostComponent.cs | 2 +- .../CP14SlowdownFromActionsComponent.cs | 13 ++ .../CP14SharedMagicSystem.Checks.cs | 136 ------------ .../CP14SharedMagicSystem.DelayedActions.cs | 205 ------------------ .../CP14SharedMagicSystem.InstantActions.cs | 57 ----- .../CP14SharedMagicSystem.Slowdown.cs | 39 ---- ...CP14SharedMagicSystem.ToggleableActions.cs | 199 ----------------- .../_CP14/MagicSpell/CP14SharedMagicSystem.cs | 165 -------------- .../Components/CP14MagicCasterComponent.cs | 11 - .../CP14MagicCasterSlowdownComponent.cs | 11 - .../CP14MagicEffectCastSlowdownComponent.cs | 11 - .../Components/CP14MagicEffectComponent.cs | 32 --- .../CP14MagicEffectEmotingComponent.cs | 14 -- .../CP14MagicEffectToggledComponent.cs | 31 --- .../Events/CP14CastMagicEffectEvent.cs | 66 +----- .../Events/CP14DelayedActionEvents.cs | 149 ------------- .../Events/CP14ToggleableActionEvents.cs | 147 ------------- .../Spells/C14SpellInterruptSpell.cs | 40 ---- .../_CP14/Skill/CP14SkillSystem.Admin.cs | 1 + .../Actions/Spells/Athletic/MOB_sprint.yml | 29 --- .../Entities/Actions/Spells/Athletic/dash.yml | 14 +- .../Entities/Actions/Spells/Athletic/kick.yml | 51 ++--- .../Actions/Spells/Athletic/second_wind.yml | 48 ++-- .../Actions/Spells/Athletic/sprint.yml | 36 +-- .../Spells/Demigods/Lumera/darkmist.yml | 73 ------- .../Spells/Demigods/Lumera/mind_degrade.yml | 125 ----------- .../Spells/Demigods/Lumera/mind_upgrade.yml | 122 ----------- .../Spells/Demigods/Lumera/moon_strike.yml | 96 -------- .../Spells/Demigods/Lumera/renounce.yml | 45 ---- .../Actions/Spells/Demigods/Lumera/speak.yml | 21 -- .../Actions/Spells/Demigods/Lumera/touch.yml | 53 ----- .../Actions/Spells/Demigods/Lumera/warp.yml | 13 -- .../Actions/Spells/Demigods/generic.yml | 43 ---- .../Spells/Dimension/portal_to_city.yml | 27 +-- .../Actions/Spells/Dimension/shadow_grab.yml | 39 ++-- .../Actions/Spells/Dimension/shadow_step.yml | 31 ++- .../Actions/Spells/Dimension/shadow_swap.yml | 43 ---- .../Actions/Spells/Earth/MOB_spider_trap.yml | 35 ++- .../Spells/Earth/MOB_subterranean_leap.yml | 34 +-- .../Actions/Spells/Earth/T1_earth_wall.yml | 30 ++- .../Actions/Spells/Electric/electric_trap.yml | 30 ++- .../Spells/Electric/lightning_strike.yml | 51 +++-- .../Electric/lightning_strike_small.yml | 45 ++-- .../Actions/Spells/Electric/speed_ballade.yml | 53 +++-- .../Actions/Spells/Fire/fire_trap.yml | 30 ++- .../Entities/Actions/Spells/Fire/fireball.yml | 25 +-- .../Entities/Actions/Spells/Fire/firewave.yml | 29 +-- .../Actions/Spells/Fire/flame_creation.yml | 26 +-- .../Entities/Actions/Spells/Fire/heat.yml | 41 ++-- .../Actions/Spells/Fire/hell_ballade.yml | 55 +++-- .../Spells/Fire/tiefling_inner_fire.yml | 44 ++-- .../Actions/Spells/Life/air_saturation.yml | 37 ++-- .../Actions/Spells/Life/cure_heat.yml | 49 ++--- .../Actions/Spells/Life/cure_poison.yml | 56 +++-- .../Actions/Spells/Life/cure_wounds.yml | 56 +++-- .../Spells/Life/magical_acceleration.yml | 25 +-- .../Actions/Spells/Life/peace_ballade.yml | 57 +++-- .../Actions/Spells/Life/plant_growth.yml | 113 ---------- .../Actions/Spells/Life/resurrection.yml | 59 +++-- .../Actions/Spells/Life/sheep_polymorph.yml | 37 ++-- .../Actions/Spells/Light/flash_light.yml | 30 ++- .../Actions/Spells/Light/search_of_life.yml | 27 +-- .../Actions/Spells/Light/sphere_of_light.yml | 28 +-- .../Entities/Actions/Spells/Lurker/Fear.yml | 58 +++-- .../Entities/Actions/Spells/Lurker/Kick.yml | 65 +++--- .../Entities/Actions/Spells/Lurker/Step.yml | 35 ++- .../Actions/Spells/Meta/mana_armor.yml | 27 ++- .../Actions/Spells/Meta/mana_ballade.yml | 54 +++-- .../Actions/Spells/Meta/mana_consume.yml | 54 +++-- .../Actions/Spells/Meta/mana_gift.yml | 62 +++--- .../Actions/Spells/Meta/mana_splitting.yml | 41 ++-- .../Spells/Meta/mana_splitting_small.yml | 40 ++-- .../Actions/Spells/Meta/mana_trance.yml | 45 ++-- .../Actions/Spells/Misc/MOB_vuln_spikes.yml | 27 +-- .../Actions/Spells/Skeleton/bone_hound.yml | 30 ++- .../Entities/Actions/Spells/Slime/jump.yml | 21 +- .../Entities/Actions/Spells/Vampire/bite.yml | 51 +++-- .../Actions/Spells/Vampire/blood_step.yml | 30 ++- .../Actions/Spells/Vampire/cure_wounds.yml | 65 +++--- .../Actions/Spells/Vampire/essence_create.yml | 32 ++- .../Actions/Spells/Vampire/hypnosys.yml | 37 ++-- .../Actions/Spells/Vampire/portal.yml | 27 ++- .../Spells/Vampire/power_explosion.yml | 74 +++---- .../Actions/Spells/Vampire/power_punch.yml | 39 ++-- .../Actions/Spells/Vampire/resurrection.yml | 61 +++--- .../Actions/Spells/Vampire/search_vampire.yml | 43 ++-- .../Actions/Spells/Water/beer_creation.yml | 25 +-- .../Entities/Actions/Spells/Water/freeze.yml | 50 ++--- .../Actions/Spells/Water/ice_arrow.yml | 28 +-- .../Actions/Spells/Water/ice_dagger.yml | 28 +-- .../Actions/Spells/Water/ice_shards.yml | 21 +- .../Actions/Spells/Water/ice_trap.yml | 30 ++- .../Actions/Spells/Water/water_creation.yml | 25 +-- .../Spawners/Random/Loot/demiplane.yml | 1 - .../_CP14/Entities/Mobs/NPC/Flem.yml | 1 - .../_CP14/Entities/Mobs/NPC/Slimes/base.yml | 1 - .../_CP14/Entities/Mobs/NPC/animals.yml | 5 +- .../_CP14/Entities/Mobs/NPC/fairy.yml | 31 ++- .../_CP14/Entities/Mobs/NPC/ice_ghost.yml | 9 +- .../Entities/Mobs/NPC/invisible_whistler.yml | 1 - .../_CP14/Entities/Mobs/NPC/mole.yml | 1 - .../_CP14/Entities/Mobs/NPC/spineguard.yml | 1 - .../Mobs/Player/DemiplaneAntag/lurker.yml | 1 - .../Entities/Mobs/Player/Patrons/gods.yml | 12 +- .../_CP14/Entities/Mobs/Species/base.yml | 1 - .../Prototypes/_CP14/Entities/Mobs/base.yml | 1 - .../Objects/Weapons/Magic/twoHandedStaffs.yml | 3 +- .../Prototypes/_CP14/Skill/Basic/healing.yml | 14 -- .../_CP14/Skill/Demigods/lumera.yml | 167 -------------- .../_CP14/Skill/Demigods/merkas.yml | 12 - .../Guidebook_EN/JobsTabs/Innkeepers.xml | 1 - .../Guidebook_RU/JobsTabs/Innkeepers.xml | 1 - 131 files changed, 1678 insertions(+), 3710 deletions(-) delete mode 100644 Content.Client/_CP14/MagicSpell/CP14ClientMagicSystem.cs create mode 100644 Content.Server/_CP14/Actions/CP14ActionSystem.DoAfters.cs create mode 100644 Content.Shared/_CP14/Actions/CP14ActionSystem.DoAfters.cs create mode 100644 Content.Shared/_CP14/Actions/CP14ActionSystem.Performed.cs create mode 100644 Content.Shared/_CP14/Actions/CP14SharedActionSystem.ModularEffects.cs create mode 100644 Content.Shared/_CP14/Actions/Components/CP14ActionDoAfterSlowdownComponent.cs rename Content.Shared/_CP14/{MagicSpell/Components/CP14MagicEffectCastingVisualComponent.cs => Actions/Components/CP14ActionDoAfterVisualsComponent.cs} (62%) create mode 100644 Content.Shared/_CP14/Actions/Components/CP14ActionEmotingComponent.cs create mode 100644 Content.Shared/_CP14/Actions/Components/CP14SlowdownFromActionsComponent.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.DelayedActions.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.InstantActions.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Slowdown.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.ToggleableActions.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/Components/CP14MagicCasterComponent.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/Components/CP14MagicCasterSlowdownComponent.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectCastSlowdownComponent.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectComponent.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectEmotingComponent.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectToggledComponent.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/Events/CP14DelayedActionEvents.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/Events/CP14ToggleableActionEvents.cs delete mode 100644 Content.Shared/_CP14/MagicSpell/Spells/C14SpellInterruptSpell.cs delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/MOB_sprint.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/darkmist.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_degrade.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_upgrade.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/renounce.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/speak.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/touch.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/warp.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/generic.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml delete mode 100644 Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/plant_growth.yml delete mode 100644 Resources/Prototypes/_CP14/Skill/Demigods/lumera.yml delete mode 100644 Resources/Prototypes/_CP14/Skill/Demigods/merkas.yml diff --git a/Content.Client/_CP14/MagicSpell/CP14ClientMagicSystem.cs b/Content.Client/_CP14/MagicSpell/CP14ClientMagicSystem.cs deleted file mode 100644 index 77f15ea0b0..0000000000 --- a/Content.Client/_CP14/MagicSpell/CP14ClientMagicSystem.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Content.Shared._CP14.MagicSpell; - -namespace Content.Client._CP14.MagicSpell; - -public sealed partial class CP14ClientMagicSystem : CP14SharedMagicSystem -{ -} diff --git a/Content.Server/_CP14/Actions/CP14ActionSystem.DoAfters.cs b/Content.Server/_CP14/Actions/CP14ActionSystem.DoAfters.cs new file mode 100644 index 0000000000..7a60e6951b --- /dev/null +++ b/Content.Server/_CP14/Actions/CP14ActionSystem.DoAfters.cs @@ -0,0 +1,76 @@ +using Content.Server.Chat.Systems; +using Content.Shared._CP14.Actions; +using Content.Shared._CP14.Actions.Components; +using Content.Shared.Actions.Events; + +namespace Content.Server._CP14.Actions; + +public sealed partial class CP14ActionSystem +{ + private void InitializeDoAfter() + { + SubscribeLocalEvent(OnVerbalActionStarted); + SubscribeLocalEvent(OnVerbalActionPerformed); + + SubscribeLocalEvent(OnEmoteActionStarted); + SubscribeLocalEvent(OnEmoteActionPerformed); + + SubscribeLocalEvent(OnSpawnMagicVisualEffect); + SubscribeLocalEvent(OnDespawnMagicVisualEffect); + } + + private void OnVerbalActionStarted(Entity ent, ref CP14ActionStartDoAfterEvent args) + { + var performer = GetEntity(args.Performer); + _chat.TrySendInGameICMessage(performer, ent.Comp.StartSpeech, ent.Comp.Whisper ? InGameICChatType.Whisper : InGameICChatType.Speak, true); + } + + private void OnEmoteActionStarted(Entity ent, ref CP14ActionStartDoAfterEvent args) + { + var performer = GetEntity(args.Performer); + _chat.TrySendInGameICMessage(performer, Loc.GetString(ent.Comp.StartEmote), InGameICChatType.Emote, true); + } + + private void OnVerbalActionPerformed(Entity ent, ref ActionDoAfterEvent args) + { + if (args.Cancelled) + return; + + if (!args.Handled) + return; + + var performer = GetEntity(args.Performer); + _chat.TrySendInGameICMessage(performer, ent.Comp.EndSpeech, ent.Comp.Whisper ? InGameICChatType.Whisper : InGameICChatType.Speak, true); + } + + private void OnEmoteActionPerformed(Entity ent, ref ActionDoAfterEvent args) + { + if (args.Cancelled) + return; + + if (!args.Handled) + return; + + var performer = GetEntity(args.Performer); + _chat.TrySendInGameICMessage(performer, Loc.GetString(ent.Comp.EndEmote), InGameICChatType.Emote, true); + } + + private void OnSpawnMagicVisualEffect(Entity ent, ref CP14ActionStartDoAfterEvent args) + { + QueueDel(ent.Comp.SpawnedEntity); + + var performer = GetEntity(args.Performer); + var vfx = SpawnAttachedTo(ent.Comp.Proto, Transform(performer).Coordinates); + _transform.SetParent(vfx, performer); + ent.Comp.SpawnedEntity = vfx; + } + + private void OnDespawnMagicVisualEffect(Entity ent, ref ActionDoAfterEvent args) + { + if (args.Repeat) + return; + + QueueDel(ent.Comp.SpawnedEntity); + ent.Comp.SpawnedEntity = null; + } +} diff --git a/Content.Server/_CP14/Actions/CP14ActionSystem.cs b/Content.Server/_CP14/Actions/CP14ActionSystem.cs index 8b0cc4371f..81279a66ab 100644 --- a/Content.Server/_CP14/Actions/CP14ActionSystem.cs +++ b/Content.Server/_CP14/Actions/CP14ActionSystem.cs @@ -1,3 +1,4 @@ +using Content.Server.Chat.Systems; using Content.Server.Instruments; using Content.Shared._CP14.Actions; using Content.Shared._CP14.Actions.Components; @@ -8,9 +9,13 @@ namespace Content.Server._CP14.Actions; public sealed partial class CP14ActionSystem : CP14SharedActionSystem { + [Dependency] private readonly ChatSystem _chat = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; + public override void Initialize() { base.Initialize(); + InitializeDoAfter(); SubscribeLocalEvent(OnActionMusicAttempt); } diff --git a/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs b/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs index 103eef7456..1dc2764c3c 100644 --- a/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs +++ b/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs @@ -1,32 +1,15 @@ -using Content.Server._CP14.MagicEnergy; -using Content.Server.Atmos.Components; -using Content.Server.Chat.Systems; -using Content.Server.Instruments; -using Content.Shared._CP14.Actions.Components; -using Content.Shared._CP14.MagicEnergy.Components; -using Content.Shared._CP14.MagicSpell; -using Content.Shared._CP14.MagicSpell.Components; -using Content.Shared._CP14.MagicSpell.Events; using Content.Shared._CP14.MagicSpell.Spells; -using Content.Shared.Actions; using Content.Shared.CombatMode.Pacification; -using Content.Shared.FixedPoint; -using Content.Shared.Instruments; -using Content.Shared.Projectiles; using Content.Shared.Throwing; using Content.Shared.Weapons.Melee.Events; using Content.Shared.Whitelist; -using Robust.Server.GameObjects; using Robust.Shared.Physics.Events; using Robust.Shared.Random; namespace Content.Server._CP14.MagicSpell; -public sealed class CP14MagicSystem : CP14SharedMagicSystem +public sealed class CP14MagicSystem : EntitySystem { - [Dependency] private readonly ChatSystem _chat = default!; - [Dependency] private readonly TransformSystem _transform = default!; - [Dependency] private readonly CP14MagicEnergySystem _magicEnergy = default!; [Dependency] private readonly EntityLookupSystem _lookup = default!; [Dependency] private readonly EntityWhitelistSystem _whitelist = default!; [Dependency] private readonly IRobustRandom _random = default!; @@ -40,11 +23,6 @@ public sealed class CP14MagicSystem : CP14SharedMagicSystem SubscribeLocalEvent(OnMeleeHit); SubscribeLocalEvent(OnProjectileHit); SubscribeLocalEvent(OnStartCollide); - - SubscribeLocalEvent(OnSpellSpoken); - - SubscribeLocalEvent(OnSpawnMagicVisualEffect); - SubscribeLocalEvent(OnDespawnMagicVisualEffect); } private void OnStartCollide(Entity ent, ref StartCollideEvent args) @@ -119,23 +97,4 @@ public sealed class CP14MagicSystem : CP14SharedMagicSystem break; } } - - private void OnSpellSpoken(Entity ent, ref CP14ActionSpeechEvent args) - { - if (args.Performer is not null && args.Speech is not null) - _chat.TrySendInGameICMessage(args.Performer.Value, args.Speech, args.Emote ? InGameICChatType.Emote : InGameICChatType.Speak, true); - } - - private void OnSpawnMagicVisualEffect(Entity ent, ref CP14StartCastMagicEffectEvent args) - { - var vfx = SpawnAttachedTo(ent.Comp.Proto, Transform(args.Performer).Coordinates); - _transform.SetParent(vfx, args.Performer); - ent.Comp.SpawnedEntity = vfx; - } - - private void OnDespawnMagicVisualEffect(Entity ent, ref CP14EndCastMagicEffectEvent args) - { - QueueDel(ent.Comp.SpawnedEntity); - ent.Comp.SpawnedEntity = null; - } } diff --git a/Content.Server/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs b/Content.Server/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs index ae7cb40b29..fb91670ad6 100644 --- a/Content.Server/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs +++ b/Content.Server/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs @@ -1,10 +1,8 @@ using Content.Server._CP14.MagicSpellStorage.Components; -using Content.Shared._CP14.MagicSpell.Components; using Content.Shared._CP14.MagicSpell.Events; using Content.Shared._CP14.MagicSpellStorage; using Content.Shared.Actions; using Content.Shared.Damage; -using Content.Shared.Hands.EntitySystems; using Content.Shared.Mind; namespace Content.Server._CP14.MagicSpellStorage; @@ -17,7 +15,6 @@ public sealed partial class CP14SpellStorageSystem : CP14SharedSpellStorageSyste [Dependency] private readonly ActionContainerSystem _actionContainer = default!; [Dependency] private readonly SharedActionsSystem _actions = default!; [Dependency] private readonly SharedMindSystem _mind = default!; - [Dependency] private readonly SharedHandsSystem _hands = default!; [Dependency] private readonly DamageableSystem _damageable = default!; public override void Initialize() @@ -46,9 +43,6 @@ public sealed partial class CP14SpellStorageSystem : CP14SharedSpellStorageSyste if (spellEnt is null) continue; - var provided = EntityManager.EnsureComponent(spellEnt.Value); - provided.SpellStorage = storage; - storage.Comp.SpellEntities.Add(spellEnt.Value); } diff --git a/Content.Shared/Actions/SharedActionsSystem.DoAfter.cs b/Content.Shared/Actions/SharedActionsSystem.DoAfter.cs index 51e4b6e560..12f740bdd1 100644 --- a/Content.Shared/Actions/SharedActionsSystem.DoAfter.cs +++ b/Content.Shared/Actions/SharedActionsSystem.DoAfter.cs @@ -1,4 +1,5 @@ -using Content.Shared.Actions.Events; +using Content.Shared._CP14.Actions; +using Content.Shared.Actions.Events; using Content.Shared.DoAfter; namespace Content.Shared.Actions; @@ -20,6 +21,11 @@ public abstract partial class SharedActionsSystem var netEnt = GetNetEntity(performer); + //CP14 doAfter start event + var cp14StartEv = new CP14ActionStartDoAfterEvent(netEnt, input); + RaiseLocalEvent(ent, cp14StartEv); + //CP14 end + var actionDoAfterEvent = new ActionDoAfterEvent(netEnt, originalUseDelay, input); var doAfterArgs = new DoAfterArgs(EntityManager, performer, delay, actionDoAfterEvent, ent.Owner, performer) diff --git a/Content.Shared/_CP14/Actions/CP14ActionSystem.Attempt.cs b/Content.Shared/_CP14/Actions/CP14ActionSystem.Attempt.cs index f6162a12a7..be1e058524 100644 --- a/Content.Shared/_CP14/Actions/CP14ActionSystem.Attempt.cs +++ b/Content.Shared/_CP14/Actions/CP14ActionSystem.Attempt.cs @@ -1,34 +1,24 @@ using System.Linq; using Content.Shared._CP14.Actions.Components; -using Content.Shared._CP14.MagicEnergy; using Content.Shared._CP14.MagicEnergy.Components; -using Content.Shared._CP14.MagicSpell.Components; using Content.Shared._CP14.MagicSpell.Events; using Content.Shared._CP14.Religion.Components; -using Content.Shared._CP14.Religion.Systems; using Content.Shared._CP14.Skill.Components; +using Content.Shared.Actions.Components; using Content.Shared.Actions.Events; using Content.Shared.CombatMode.Pacification; using Content.Shared.Damage.Components; using Content.Shared.Hands.Components; -using Content.Shared.Hands.EntitySystems; using Content.Shared.Mobs; using Content.Shared.Mobs.Components; using Content.Shared.Popups; using Content.Shared.Speech.Muting; using Content.Shared.SSDIndicator; -using Robust.Shared.Random; -using Robust.Shared.Timing; namespace Content.Shared._CP14.Actions; public abstract partial class CP14SharedActionSystem { - [Dependency] private readonly SharedHandsSystem _hand = default!; - [Dependency] private readonly CP14SharedMagicEnergySystem _magicEnergy = default!; - [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly IGameTiming _timing = default!; - [Dependency] private readonly CP14SharedReligionGodSystem _god = default!; private void InitializeAttempts() { SubscribeLocalEvent(OnSomaticActionAttempt); @@ -52,9 +42,10 @@ public abstract partial class CP14SharedActionSystem if (args.Cancelled) return; - TryComp(ent, out var magicEffect); + if (!TryComp(ent, out var action)) + return; - //Total man required + //Total mana required var requiredMana = ent.Comp.ManaCost; if (ent.Comp.CanModifyManacost) @@ -63,15 +54,15 @@ public abstract partial class CP14SharedActionSystem RaiseLocalEvent(args.User, manaEv); - if (magicEffect?.SpellStorage is not null) - RaiseLocalEvent(magicEffect.SpellStorage.Value, manaEv); + if (action.Container is not null) + RaiseLocalEvent(action.Container.Value, manaEv); requiredMana = manaEv.GetManacost(); } //First - trying get mana from item - if (magicEffect is not null && magicEffect.SpellStorage is not null && - TryComp(magicEffect.SpellStorage, out var magicContainer)) + if (action.Container is not null && + TryComp(action.Container, out var magicContainer)) requiredMana = MathF.Max(0, (float)(requiredMana - magicContainer.Energy)); if (requiredMana <= 0) diff --git a/Content.Shared/_CP14/Actions/CP14ActionSystem.DoAfters.cs b/Content.Shared/_CP14/Actions/CP14ActionSystem.DoAfters.cs new file mode 100644 index 0000000000..31d375055f --- /dev/null +++ b/Content.Shared/_CP14/Actions/CP14ActionSystem.DoAfters.cs @@ -0,0 +1,55 @@ +using Content.Shared._CP14.Actions.Components; +using Content.Shared.Actions.Events; +using Content.Shared.Movement.Systems; + +namespace Content.Shared._CP14.Actions; + +public abstract partial class CP14SharedActionSystem +{ + private void InitializeDoAfter() + { + SubscribeLocalEvent(OnStartDoAfter); + SubscribeLocalEvent(OnEndDoAfter); + SubscribeLocalEvent(OnRefreshMovespeed); + } + + private void OnStartDoAfter(Entity ent, ref CP14ActionStartDoAfterEvent args) + { + var performer = GetEntity(args.Performer); + EnsureComp(performer, out var slowdown); + + slowdown.SpeedAffectors.TryAdd(GetNetEntity(ent), ent.Comp.SpeedMultiplier); + Dirty(performer, slowdown); + _movement.RefreshMovementSpeedModifiers(performer); + } + + private void OnEndDoAfter(Entity ent, ref ActionDoAfterEvent args) + { + if (args.Repeat) + return; + + var performer = GetEntity(args.Performer); + if (!TryComp(performer, out var slowdown)) + return; + + slowdown.SpeedAffectors.Remove(GetNetEntity(ent)); + Dirty(performer, slowdown); + + _movement.RefreshMovementSpeedModifiers(performer); + + if (slowdown.SpeedAffectors.Count == 0) + RemCompDeferred(performer); + } + + private void OnRefreshMovespeed(Entity ent, ref RefreshMovementSpeedModifiersEvent args) + { + var targetSpeedModifier = 1f; + + foreach (var (_, affector) in ent.Comp.SpeedAffectors) + { + targetSpeedModifier *= affector; + } + + args.ModifySpeed(targetSpeedModifier); + } +} diff --git a/Content.Shared/_CP14/Actions/CP14ActionSystem.Examine.cs b/Content.Shared/_CP14/Actions/CP14ActionSystem.Examine.cs index 99fcc4b057..1984ddb413 100644 --- a/Content.Shared/_CP14/Actions/CP14ActionSystem.Examine.cs +++ b/Content.Shared/_CP14/Actions/CP14ActionSystem.Examine.cs @@ -1,6 +1,5 @@ using System.Linq; using Content.Shared._CP14.Actions.Components; -using Content.Shared._CP14.MagicSpell.Components; using Content.Shared.Examine; using Content.Shared.Mobs; diff --git a/Content.Shared/_CP14/Actions/CP14ActionSystem.Performed.cs b/Content.Shared/_CP14/Actions/CP14ActionSystem.Performed.cs new file mode 100644 index 0000000000..6be5266b09 --- /dev/null +++ b/Content.Shared/_CP14/Actions/CP14ActionSystem.Performed.cs @@ -0,0 +1,97 @@ +using Content.Shared._CP14.Actions.Components; +using Content.Shared._CP14.MagicEnergy.Components; +using Content.Shared._CP14.MagicSpell.Events; +using Content.Shared.Actions.Events; +using Content.Shared.FixedPoint; + +namespace Content.Shared._CP14.Actions; + +public abstract partial class CP14SharedActionSystem +{ + private void InitializePerformed() + { + SubscribeLocalEvent(OnMaterialCostActionPerformed); + SubscribeLocalEvent(OnStaminaCostActionPerformed); + SubscribeLocalEvent(OnManaCostActionPerformed); + SubscribeLocalEvent(OnSkillPointCostActionPerformed); + } + + private void OnMaterialCostActionPerformed(Entity ent, ref ActionPerformedEvent args) + { + if (ent.Comp.Requirement is null) + return; + + HashSet heldedItems = new(); + + foreach (var hand in _hand.EnumerateHands(args.Performer)) + { + var helded = _hand.GetHeldItem(args.Performer, hand); + if (helded is not null) + heldedItems.Add(helded.Value); + } + + ent.Comp.Requirement.PostCraft(EntityManager, _proto, heldedItems); + } + + private void OnStaminaCostActionPerformed(Entity ent, ref ActionPerformedEvent args) + { + _stamina.TakeStaminaDamage(args.Performer, ent.Comp.Stamina, visual: false); + } + + private void OnManaCostActionPerformed(Entity ent, ref ActionPerformedEvent args) + { + if (!_actionQuery.TryComp(ent, out var action)) + return; + + if (action.Container is null) + return; + + var innate = action.Container == args.Performer; + + var manaCost = ent.Comp.ManaCost; + + if (ent.Comp.CanModifyManacost) + { + var manaEv = new CP14CalculateManacostEvent(args.Performer, ent.Comp.ManaCost); + + RaiseLocalEvent(args.Performer, manaEv); + + if (!innate) + RaiseLocalEvent(action.Container.Value, manaEv); + + manaCost = manaEv.GetManacost(); + } + + //First - try to take mana from container + if (!innate && TryComp(action.Container, out var magicStorage)) + { + var spellEv = new CP14SpellFromSpellStorageUsedEvent(args.Performer, ent, manaCost); + RaiseLocalEvent(action.Container.Value, ref spellEv); + + _magicEnergy.ChangeEnergy((action.Container.Value, magicStorage), -manaCost, out var changedEnergy, out var overloadedEnergy, safe: false); + manaCost -= FixedPoint2.Abs(changedEnergy + overloadedEnergy); + } + + //Second - action user + if (manaCost > 0 && + TryComp(args.Performer, out var playerMana)) + _magicEnergy.ChangeEnergy((args.Performer, playerMana), -manaCost, out _, out _, safe: false); + + //And spawn mana trace + _magicVision.SpawnMagicTrace( + Transform(args.Performer).Coordinates, + action.Icon, + Loc.GetString("cp14-magic-vision-used-spell", ("name", MetaData(ent).EntityName)), + TimeSpan.FromSeconds((float)ent.Comp.ManaCost * 50), + args.Performer, + null); //TODO: We need a way to pass spell target here + } + + private void OnSkillPointCostActionPerformed(Entity ent, ref ActionPerformedEvent args) + { + if (ent.Comp.SkillPoint is null) + return; + + _skill.RemoveSkillPoints(args.Performer, ent.Comp.SkillPoint.Value, ent.Comp.Count); + } +} diff --git a/Content.Shared/_CP14/Actions/CP14SharedActionSystem.ModularEffects.cs b/Content.Shared/_CP14/Actions/CP14SharedActionSystem.ModularEffects.cs new file mode 100644 index 0000000000..fb4481bb9e --- /dev/null +++ b/Content.Shared/_CP14/Actions/CP14SharedActionSystem.ModularEffects.cs @@ -0,0 +1,145 @@ +using Content.Shared._CP14.MagicSpell.Spells; +using Content.Shared.Actions; +using Content.Shared.Actions.Components; + +namespace Content.Shared._CP14.Actions; + +public abstract partial class CP14SharedActionSystem +{ + private void InitializeModularEffects() + { + SubscribeLocalEvent(OnActionTelegraphy); + + SubscribeLocalEvent(OnInstantCast); + SubscribeLocalEvent(OnWorldTargetCast); + SubscribeLocalEvent(OnEntityTargetCast); + } + + private void OnActionTelegraphy(Entity ent, ref CP14ActionStartDoAfterEvent args) + { + if (!_timing.IsFirstTimePredicted) + return; + + var performer = GetEntity(args.Performer); + var action = GetEntity(args.Input.Action); + var target = GetEntity(args.Input.EntityTarget); + var targetPosition = GetCoordinates(args.Input.EntityCoordinatesTarget); + + if (!TryComp(action, out var actionComp)) + return; + + //Instant + if (TryComp(action, out var instant) && instant.Event is CP14InstantModularEffectEvent instantModular) + { + var spellArgs = new CP14SpellEffectBaseArgs(performer, actionComp.Container, performer, Transform(performer).Coordinates); + + foreach (var effect in instantModular.TelegraphyEffects) + { + effect.Effect(EntityManager, spellArgs); + } + } + + //World Target + if (TryComp(action, out var worldTarget) && worldTarget.Event is CP14WorldTargetModularEffectEvent worldModular && targetPosition is not null) + { + var spellArgs = new CP14SpellEffectBaseArgs(performer, actionComp.Container, null, targetPosition.Value); + + foreach (var effect in worldModular.TelegraphyEffects) + { + effect.Effect(EntityManager, spellArgs); + } + } + + //Entity Target + if (TryComp(action, out var entityTarget) && entityTarget.Event is CP14EntityTargetModularEffectEvent entityModular && target is not null) + { + var spellArgs = new CP14SpellEffectBaseArgs(performer, actionComp.Container, target, Transform(target.Value).Coordinates); + + foreach (var effect in entityModular.TelegraphyEffects) + { + effect.Effect(EntityManager, spellArgs); + } + } + } + + private void OnInstantCast(Entity ent, ref CP14InstantModularEffectEvent args) + { + if (!_timing.IsFirstTimePredicted) + return; + + var spellArgs = new CP14SpellEffectBaseArgs(args.Performer, args.Action.Comp.Container, args.Performer, Transform(args.Performer).Coordinates); + + foreach (var effect in args.Effects) + { + effect.Effect(EntityManager, spellArgs); + } + + args.Handled = true; + } + + private void OnWorldTargetCast(Entity ent, ref CP14WorldTargetModularEffectEvent args) + { + if (!_timing.IsFirstTimePredicted) + return; + + var spellArgs = new CP14SpellEffectBaseArgs(args.Performer, args.Action.Comp.Container, null, args.Target); + + foreach (var effect in args.Effects) + { + effect.Effect(EntityManager, spellArgs); + } + + args.Handled = true; + } + + private void OnEntityTargetCast(Entity ent, ref CP14EntityTargetModularEffectEvent args) + { + if (!_timing.IsFirstTimePredicted) + return; + + var spellArgs = new CP14SpellEffectBaseArgs(args.Performer, args.Action.Comp.Container, args.Target, Transform(args.Target).Coordinates); + + foreach (var effect in args.Effects) + { + effect.Effect(EntityManager, spellArgs); + } + + args.Handled = true; + } +} + +public sealed partial class CP14InstantModularEffectEvent : InstantActionEvent +{ + /// + /// Effects that will trigger at the beginning of the cast, before mana is spent. Should have no gameplay importance, just special effects, popups and sounds. + /// + [DataField] + public List TelegraphyEffects = new(); + + [DataField] + public List Effects = new(); +} + +public sealed partial class CP14WorldTargetModularEffectEvent : WorldTargetActionEvent +{ + /// + /// Effects that will trigger at the beginning of the cast, before mana is spent. Should have no gameplay importance, just special effects, popups and sounds. + /// + [DataField] + public List TelegraphyEffects = new(); + + [DataField] + public List Effects = new(); +} + +public sealed partial class CP14EntityTargetModularEffectEvent : EntityTargetActionEvent +{ + /// + /// Effects that will trigger at the beginning of the cast, before mana is spent. Should have no gameplay importance, just special effects, popups and sounds. + /// + [DataField] + public List TelegraphyEffects = new(); + + [DataField] + public List Effects = new(); +} diff --git a/Content.Shared/_CP14/Actions/CP14SharedActionSystem.cs b/Content.Shared/_CP14/Actions/CP14SharedActionSystem.cs index 6279187e2b..2d45672e88 100644 --- a/Content.Shared/_CP14/Actions/CP14SharedActionSystem.cs +++ b/Content.Shared/_CP14/Actions/CP14SharedActionSystem.cs @@ -1,5 +1,16 @@ +using Content.Shared._CP14.MagicEnergy; +using Content.Shared._CP14.MagicVision; +using Content.Shared._CP14.Religion.Systems; +using Content.Shared._CP14.Skill; +using Content.Shared.Actions; +using Content.Shared.Actions.Components; +using Content.Shared.Damage.Systems; +using Content.Shared.Hands.EntitySystems; +using Content.Shared.Movement.Systems; using Content.Shared.Popups; using Robust.Shared.Prototypes; +using Robust.Shared.Random; +using Robust.Shared.Timing; namespace Content.Shared._CP14.Actions; @@ -7,11 +18,37 @@ public abstract partial class CP14SharedActionSystem : EntitySystem { [Dependency] protected readonly SharedPopupSystem Popup = default!; [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly SharedHandsSystem _hand = default!; + [Dependency] private readonly CP14SharedMagicEnergySystem _magicEnergy = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly CP14SharedReligionGodSystem _god = default!; + [Dependency] private readonly SharedStaminaSystem _stamina = default!; + [Dependency] private readonly CP14SharedSkillSystem _skill = default!; + [Dependency] private readonly CP14SharedMagicVisionSystem _magicVision = default!; + [Dependency] private readonly MovementSpeedModifierSystem _movement = default!; + + private EntityQuery _actionQuery; public override void Initialize() { base.Initialize(); + + _actionQuery = GetEntityQuery(); + InitializeAttempts(); InitializeExamine(); + InitializePerformed(); + InitializeModularEffects(); + InitializeDoAfter(); } } + +/// +/// Called on an action when an attempt to start doAfter using this action begins. +/// +public sealed class CP14ActionStartDoAfterEvent(NetEntity performer, RequestPerformActionEvent input) : EntityEventArgs +{ + public NetEntity Performer = performer; + public readonly RequestPerformActionEvent Input = input; +} diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionDoAfterSlowdownComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionDoAfterSlowdownComponent.cs new file mode 100644 index 0000000000..9a29925a30 --- /dev/null +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionDoAfterSlowdownComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Shared._CP14.Actions.Components; + +/// +/// Slows the caster while using action +/// +[RegisterComponent, Access(typeof(CP14SharedActionSystem))] +public sealed partial class CP14ActionDoAfterSlowdownComponent : Component +{ + [DataField] + public float SpeedMultiplier = 1f; +} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectCastingVisualComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionDoAfterVisualsComponent.cs similarity index 62% rename from Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectCastingVisualComponent.cs rename to Content.Shared/_CP14/Actions/Components/CP14ActionDoAfterVisualsComponent.cs index 3e5e62d9b7..6ac9415c85 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectCastingVisualComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionDoAfterVisualsComponent.cs @@ -1,12 +1,12 @@ using Robust.Shared.Prototypes; -namespace Content.Shared._CP14.MagicSpell.Components; +namespace Content.Shared._CP14.Actions.Components; /// /// Creates a temporary entity that exists while the spell is cast, and disappears at the end. For visual special effects. /// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectCastingVisualComponent : Component +[RegisterComponent, Access(typeof(CP14SharedActionSystem))] +public sealed partial class CP14ActionDoAfterVisualsComponent : Component { [DataField] public EntityUid? SpawnedEntity; diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionEmotingComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionEmotingComponent.cs new file mode 100644 index 0000000000..35cb9233ca --- /dev/null +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionEmotingComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Shared._CP14.Actions.Components; + +[RegisterComponent] +public sealed partial class CP14ActionEmotingComponent : Component +{ + [DataField] + public string StartEmote = string.Empty; //Not LocId! + + [DataField] + public string EndEmote = string.Empty; //Not LocId! +} diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionFreeHandsRequiredComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionFreeHandsRequiredComponent.cs index 24b79d480b..b7bbdf9101 100644 --- a/Content.Shared/_CP14/Actions/Components/CP14ActionFreeHandsRequiredComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionFreeHandsRequiredComponent.cs @@ -1,9 +1,9 @@ -namespace Content.Shared._CP14.MagicSpell.Components; +namespace Content.Shared._CP14.Actions.Components; /// /// Requires the user to have at least one free hand to use this spell /// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] +[RegisterComponent] public sealed partial class CP14ActionFreeHandsRequiredComponent : Component { [DataField] diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionRequiredMusicToolComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionRequiredMusicToolComponent.cs index 79451253f2..b19e4e304c 100644 --- a/Content.Shared/_CP14/Actions/Components/CP14ActionRequiredMusicToolComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionRequiredMusicToolComponent.cs @@ -1,11 +1,9 @@ -using Content.Shared._CP14.MagicSpell; - namespace Content.Shared._CP14.Actions.Components; /// /// Requires the user to play music to use this spell /// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] +[RegisterComponent] public sealed partial class CP14ActionRequiredMusicToolComponent : Component { } diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionSSDBlockComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionSSDBlockComponent.cs index 00ac65a3d8..90d01236f1 100644 --- a/Content.Shared/_CP14/Actions/Components/CP14ActionSSDBlockComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionSSDBlockComponent.cs @@ -5,7 +5,7 @@ namespace Content.Shared._CP14.Actions.Components; /// /// Blocks the user from using action against target target in SSD. /// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] +[RegisterComponent] public sealed partial class CP14ActionSSDBlockComponent : Component { } diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionSpeakingComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionSpeakingComponent.cs index 91876fe7e6..888fd863cd 100644 --- a/Content.Shared/_CP14/Actions/Components/CP14ActionSpeakingComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionSpeakingComponent.cs @@ -11,17 +11,7 @@ public sealed partial class CP14ActionSpeakingComponent : Component [DataField] public string EndSpeech = string.Empty; //Not LocId! -} - -/// -/// patch to send an event to the server for saying a phrase out loud -/// -[ByRefEvent] -public sealed class CP14ActionSpeechEvent : EntityEventArgs -{ - public EntityUid? Performer { get; init; } - - public string? Speech { get; init; } - - public bool Emote { get; init; } + + [DataField] + public bool Whisper = false; } diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionStaminaCostComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionStaminaCostComponent.cs index 7849aeb811..d91b3a272f 100644 --- a/Content.Shared/_CP14/Actions/Components/CP14ActionStaminaCostComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionStaminaCostComponent.cs @@ -5,7 +5,7 @@ namespace Content.Shared._CP14.Actions.Components; /// /// Restricts the use of this action, by spending stamina. /// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] +[RegisterComponent] public sealed partial class CP14ActionStaminaCostComponent : Component { [DataField] diff --git a/Content.Shared/_CP14/Actions/Components/CP14SlowdownFromActionsComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14SlowdownFromActionsComponent.cs new file mode 100644 index 0000000000..bd4cd07241 --- /dev/null +++ b/Content.Shared/_CP14/Actions/Components/CP14SlowdownFromActionsComponent.cs @@ -0,0 +1,13 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared._CP14.Actions.Components; + +/// +/// apply slowdown effect from casting spells +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(CP14SharedActionSystem))] +public sealed partial class CP14SlowdownFromActionsComponent : Component +{ + [DataField, AutoNetworkedField] + public Dictionary SpeedAffectors = new(); +} diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs deleted file mode 100644 index ed1352fc2c..0000000000 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs +++ /dev/null @@ -1,136 +0,0 @@ -using Content.Shared._CP14.Actions.Components; -using Content.Shared._CP14.MagicEnergy.Components; -using Content.Shared._CP14.MagicSpell.Components; -using Content.Shared._CP14.MagicSpell.Events; -using Content.Shared._CP14.Religion.Systems; -using Content.Shared._CP14.Skill; -using Content.Shared.FixedPoint; -using Content.Shared.Hands.EntitySystems; - -namespace Content.Shared._CP14.MagicSpell; - -public abstract partial class CP14SharedMagicSystem -{ - [Dependency] private readonly CP14SharedReligionGodSystem _god = default!; - [Dependency] private readonly SharedHandsSystem _hand = default!; - [Dependency] private readonly CP14SharedSkillSystem _skill = default!; - - private void InitializeChecks() - { - //Verbal speaking - SubscribeLocalEvent(OnVerbalAspectStartCast); - SubscribeLocalEvent(OnVerbalAspectAfterCast); - - SubscribeLocalEvent(OnEmoteStartCast); - SubscribeLocalEvent(OnEmoteEndCast); - - //Consuming resources - SubscribeLocalEvent(OnMaterialAspectEndCast); - SubscribeLocalEvent(OnStaminaConsume); - SubscribeLocalEvent(OnManaConsume); - SubscribeLocalEvent(OnSkillPointConsume); - } - - private void OnVerbalAspectStartCast(Entity ent, - ref CP14StartCastMagicEffectEvent args) - { - var ev = new CP14ActionSpeechEvent - { - Performer = args.Performer, - Speech = Loc.GetString(ent.Comp.StartSpeech), - Emote = false, - }; - RaiseLocalEvent(ent, ref ev); - } - - private void OnVerbalAspectAfterCast(Entity ent, - ref CP14MagicEffectConsumeResourceEvent args) - { - var ev = new CP14ActionSpeechEvent - { - Performer = args.Performer, - Speech = Loc.GetString(ent.Comp.EndSpeech), - Emote = false - }; - RaiseLocalEvent(ent, ref ev); - } - - private void OnEmoteStartCast(Entity ent, ref CP14StartCastMagicEffectEvent args) - { - var ev = new CP14ActionSpeechEvent - { - Performer = args.Performer, - Speech = Loc.GetString(ent.Comp.StartEmote), - Emote = true, - }; - RaiseLocalEvent(ent, ref ev); - } - - - private void OnEmoteEndCast(Entity ent, ref CP14MagicEffectConsumeResourceEvent args) - { - var ev = new CP14ActionSpeechEvent - { - Performer = args.Performer, - Speech = Loc.GetString(ent.Comp.EndEmote), - Emote = true - }; - RaiseLocalEvent(ent, ref ev); - } - - private void OnMaterialAspectEndCast(Entity ent, ref CP14MagicEffectConsumeResourceEvent args) - { - if (ent.Comp.Requirement is null || args.Performer is null) - return; - - HashSet heldedItems = new(); - - foreach (var hand in _hand.EnumerateHands(args.Performer.Value)) - { - var helded = _hand.GetHeldItem(args.Performer.Value, hand); - if (helded is not null) - heldedItems.Add(helded.Value); - } - - ent.Comp.Requirement.PostCraft(EntityManager, _proto, heldedItems); - } - - private void OnStaminaConsume(Entity ent, ref CP14MagicEffectConsumeResourceEvent args) - { - if (args.Performer is null) - return; - - _stamina.TakeStaminaDamage(args.Performer.Value, ent.Comp.Stamina, visual: false); - } - - private void OnManaConsume(Entity ent, ref CP14MagicEffectConsumeResourceEvent args) - { - if (!TryComp(ent, out var magicEffect)) - return; - - var requiredMana = CalculateManacost(ent, args.Performer); - - //First - used object - if (magicEffect.SpellStorage is not null && TryComp(magicEffect.SpellStorage, out var magicStorage)) - { - var spellEv = new CP14SpellFromSpellStorageUsedEvent(args.Performer, (ent, magicEffect), requiredMana); - RaiseLocalEvent(magicEffect.SpellStorage.Value, ref spellEv); - - _magicEnergy.ChangeEnergy((magicEffect.SpellStorage.Value, magicStorage), -requiredMana, out var changedEnergy, out var overloadedEnergy, safe: false); - requiredMana -= FixedPoint2.Abs(changedEnergy + overloadedEnergy); - } - - //Second - action user - if (requiredMana > 0 && - TryComp(args.Performer, out var playerMana)) - _magicEnergy.ChangeEnergy((args.Performer.Value, playerMana), -requiredMana, out _, out _, safe: false); - } - - private void OnSkillPointConsume(Entity ent, ref CP14MagicEffectConsumeResourceEvent args) - { - if (ent.Comp.SkillPoint is null || args.Performer is null) - return; - - _skill.RemoveSkillPoints(args.Performer.Value, ent.Comp.SkillPoint.Value, ent.Comp.Count); - } -} diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.DelayedActions.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.DelayedActions.cs deleted file mode 100644 index c08489fc12..0000000000 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.DelayedActions.cs +++ /dev/null @@ -1,205 +0,0 @@ -using Content.Shared._CP14.MagicSpell.Components; -using Content.Shared._CP14.MagicSpell.Events; -using Content.Shared._CP14.MagicSpell.Spells; -using Content.Shared.DoAfter; -using Robust.Shared.Map; - -namespace Content.Shared._CP14.MagicSpell; - -public abstract partial class CP14SharedMagicSystem -{ - private void InitializeDelayedActions() - { - SubscribeLocalEvent(OnInstantAction); - SubscribeLocalEvent(OnWorldTargetAction); - SubscribeLocalEvent(OnEntityTargetAction); - - SubscribeLocalEvent(OnDelayedInstantActionDoAfter); - SubscribeLocalEvent(OnDelayedEntityWorldTargetDoAfter); - SubscribeLocalEvent(OnDelayedEntityTargetDoAfter); - } - - private bool TryStartDelayedAction(ICP14DelayedMagicEffect delayedEffect, DoAfterEvent doAfter, Entity action, EntityUid? target, EntityUid performer) - { - if (_doAfter.IsRunning(action.Comp.ActiveDoAfter)) - return false; - - var fromItem = action.Comp.SpellStorage is not null && action.Comp.SpellStorage.Value != performer; - - var doAfterEventArgs = new DoAfterArgs(EntityManager, performer, MathF.Max(delayedEffect.CastDelay, 0.3f), doAfter, action, used: action.Comp.SpellStorage, target: target) - { - BreakOnMove = delayedEffect.BreakOnMove, - BreakOnDamage = delayedEffect.BreakOnDamage, - Hidden = delayedEffect.Hidden, - DistanceThreshold = delayedEffect.DistanceThreshold, - CancelDuplicate = true, - BlockDuplicate = true, - BreakOnDropItem = fromItem, - NeedHand = fromItem, - RequireCanInteract = delayedEffect.RequireCanInteract, - }; - - if (_doAfter.TryStartDoAfter(doAfterEventArgs, out var doAfterId)) - { - action.Comp.ActiveDoAfter = doAfterId; - return true; - } - - return false; - } - - private void EndDelayedAction(Entity action, EntityUid performer, float? cooldown = null) - { - var endEv = new CP14EndCastMagicEffectEvent(performer); - RaiseLocalEvent(action, ref endEv); - - if (cooldown is not null) - _action.SetCooldown(action.Owner, TimeSpan.FromSeconds(cooldown.Value)); - } - - private bool UseDelayedAction(ICP14DelayedMagicEffect delayedEffect, Entity action, DoAfterEvent doAfter, EntityUid performer, EntityUid? target = null, EntityCoordinates? worldTarget = null) - { - // Event may return an empty entity with id = 0, which causes bugs - var currentTarget = target; - if (currentTarget is not null && currentTarget == EntityUid.Invalid) - currentTarget = null; - - if (_doAfter.IsRunning(action.Comp.ActiveDoAfter)) - { - _doAfter.Cancel(action.Comp.ActiveDoAfter); - return false; - } - - if (!TryStartDelayedAction(delayedEffect, doAfter, action, currentTarget, performer)) - return false; - - var evStart = new CP14StartCastMagicEffectEvent(performer); - RaiseLocalEvent(action, ref evStart); - - var spellArgs = new CP14SpellEffectBaseArgs(performer, action.Comp.SpellStorage, currentTarget, worldTarget); - CastTelegraphy(action, spellArgs); - return true; - } - - /// - /// Instant action used from hotkey event - /// - private void OnInstantAction(CP14DelayedInstantActionEvent args) - { - if (args.Handled) - return; - - if (args is not ICP14DelayedMagicEffect delayedEffect) - return; - - if (!TryComp(args.Action, out var magicEffect)) - return; - - var doAfter = new CP14DelayedInstantActionDoAfterEvent(args.Cooldown); - - if (!UseDelayedAction(delayedEffect, (args.Action, magicEffect), doAfter, args.Performer, args.Performer)) - return; - - args.Handled = true; - } - - /// - /// Target action used from hotkey event - /// - private void OnWorldTargetAction(CP14DelayedWorldTargetActionEvent args) - { - if (args.Handled) - return; - - if (args is not ICP14DelayedMagicEffect delayedEffect) - return; - - if (!TryComp(args.Action, out var magicEffect)) - return; - - var doAfter = new CP14DelayedEntityWorldTargetActionDoAfterEvent( - EntityManager.GetNetCoordinates(args.Target), - EntityManager.GetNetEntity(args.Entity), - args.Cooldown); - - if (!UseDelayedAction(delayedEffect, (args.Action, magicEffect), doAfter, args.Performer, args.Entity, args.Target)) - return; - - args.Handled = true; - } - - /// - /// Target action used from hotkey event - /// - private void OnEntityTargetAction(CP14DelayedEntityTargetActionEvent args) - { - if (args.Handled) - return; - - if (args is not ICP14DelayedMagicEffect delayedEffect) - return; - - if (!TryComp(args.Action, out var magicEffect)) - return; - - var doAfter = new CP14DelayedEntityTargetActionDoAfterEvent(EntityManager.GetNetEntity(args.Target), args.Cooldown); - - if (!UseDelayedAction(delayedEffect, (args.Action, magicEffect), doAfter, args.Performer, args.Target)) - return; - - args.Handled = true; - } - - /// - /// Action doAfter finished or interrupted - /// - private void OnDelayedInstantActionDoAfter(Entity ent, ref CP14DelayedInstantActionDoAfterEvent args) - { - EndDelayedAction(ent, args.User, args.Cooldown); - - if (args.Cancelled || args.Handled) - return; - - CastSpell(ent, new CP14SpellEffectBaseArgs(args.User, args.Used, args.User, Transform(args.User).Coordinates)); - - args.Handled = true; - } - - /// - /// Action doAfter finished or interrupted - /// - private void OnDelayedEntityWorldTargetDoAfter(Entity ent, - ref CP14DelayedEntityWorldTargetActionDoAfterEvent args) - { - EndDelayedAction(ent, args.User, args.Cooldown); - - if (args.Cancelled || args.Handled) - return; - - var targetPos = EntityManager.GetCoordinates(args.TargetPosition); - EntityManager.TryGetEntity(args.TargetEntity, out var targetEnt); - - CastSpell(ent, new CP14SpellEffectBaseArgs(args.User, args.Used, targetEnt, targetPos)); - - args.Handled = true; - } - - /// - /// Action doAfter finished or interrupted - /// - private void OnDelayedEntityTargetDoAfter(Entity ent, ref CP14DelayedEntityTargetActionDoAfterEvent args) - { - EndDelayedAction(ent, args.User, args.Cooldown); - - if (args.Cancelled || args.Handled) - return; - - EntityManager.TryGetEntity(args.TargetEntity, out var targetEnt); - EntityCoordinates? targetPos = null; - if (targetEnt is not null) { targetPos = Transform(targetEnt.Value).Coordinates; } - - CastSpell(ent, new CP14SpellEffectBaseArgs(args.User, args.Used, targetEnt, targetPos)); - - args.Handled = true; - } -} diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.InstantActions.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.InstantActions.cs deleted file mode 100644 index bce06450ee..0000000000 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.InstantActions.cs +++ /dev/null @@ -1,57 +0,0 @@ -using Content.Shared._CP14.MagicSpell.Components; -using Content.Shared._CP14.MagicSpell.Events; -using Content.Shared._CP14.MagicSpell.Spells; - -namespace Content.Shared._CP14.MagicSpell; - -public abstract partial class CP14SharedMagicSystem -{ - private void InitializeInstantActions() - { - SubscribeLocalEvent(OnMagicInstantAction); - SubscribeLocalEvent(OnMagicWorldTargetAction); - SubscribeLocalEvent(OnMagicEntityTargetAction); - } - - private void OnMagicInstantAction(CP14InstantActionEvent args) - { - if (args.Handled) - return; - - if (!TryComp(args.Action, out var magicEffect)) - return; - - var spellArgs = new CP14SpellEffectBaseArgs(args.Performer, magicEffect.SpellStorage, args.Performer, Transform(args.Performer).Coordinates); - CastSpell((args.Action, magicEffect), spellArgs); - - _action.SetCooldown(args.Action.Owner, args.Cooldown); - } - - private void OnMagicWorldTargetAction(CP14WorldTargetActionEvent args) - { - if (args.Handled) - return; - - if (!TryComp(args.Action, out var magicEffect)) - return; - - var spellArgs = new CP14SpellEffectBaseArgs(args.Performer, magicEffect.SpellStorage, null, args.Target); - CastSpell((args.Action, magicEffect), spellArgs); - - _action.SetCooldown(args.Action.Owner, args.Cooldown); - } - - private void OnMagicEntityTargetAction(CP14EntityTargetActionEvent args) - { - if (args.Handled) - return; - - if (!TryComp(args.Action, out var magicEffect)) - return; - - var spellArgs = new CP14SpellEffectBaseArgs(args.Performer, magicEffect.SpellStorage, args.Target, Transform(args.Target).Coordinates); - CastSpell((args.Action, magicEffect), spellArgs); - - _action.SetCooldown(args.Action.Owner, args.Cooldown); - } -} diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Slowdown.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Slowdown.cs deleted file mode 100644 index 3570ab66c1..0000000000 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Slowdown.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Content.Shared._CP14.MagicSpell.Components; -using Content.Shared._CP14.MagicSpell.Events; -using Content.Shared.Movement.Systems; - -namespace Content.Shared._CP14.MagicSpell; - -public abstract partial class CP14SharedMagicSystem -{ - private void InitializeSlowdown() - { - SubscribeLocalEvent(OnSlowdownCaster); - SubscribeLocalEvent(OnUnslowdownCaster); - SubscribeLocalEvent(OnCasterRefreshMovespeed); - } - - private void OnSlowdownCaster(Entity ent, ref CP14StartCastMagicEffectEvent args) - { - if (!TryComp(args.Performer, out var caster)) - return; - - caster.SpeedModifier = ent.Comp.SpeedMultiplier; - _movement.RefreshMovementSpeedModifiers(args.Performer); - } - - private void OnUnslowdownCaster(Entity ent, ref CP14EndCastMagicEffectEvent args) - { - if (!TryComp(args.Performer, out var caster)) - return; - - caster.SpeedModifier = 1f; - - _movement.RefreshMovementSpeedModifiers(args.Performer); - } - - private void OnCasterRefreshMovespeed(Entity ent, ref RefreshMovementSpeedModifiersEvent args) - { - args.ModifySpeed(ent.Comp.SpeedModifier); - } -} diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.ToggleableActions.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.ToggleableActions.cs deleted file mode 100644 index aefb06169f..0000000000 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.ToggleableActions.cs +++ /dev/null @@ -1,199 +0,0 @@ -using Content.Shared._CP14.MagicSpell.Components; -using Content.Shared._CP14.MagicSpell.Events; -using Content.Shared._CP14.MagicSpell.Spells; -using Content.Shared.DoAfter; -using Robust.Shared.Map; -using Robust.Shared.Timing; - -namespace Content.Shared._CP14.MagicSpell; - -public abstract partial class CP14SharedMagicSystem -{ - private void InitializeToggleableActions() - { - SubscribeLocalEvent(OnToggleableInstantAction); - SubscribeLocalEvent(OnToggleableEntityWorldTargetAction); - SubscribeLocalEvent(OnToggleableEntityTargetAction); - - SubscribeLocalEvent(OnToggleableInstantActionDoAfterEvent); - SubscribeLocalEvent(OnToggleableEntityWorldTargetActionDoAfterEvent); - SubscribeLocalEvent(OnToggleableEntityTargetActionDoAfterEvent); - } - - private void UpdateToggleableActions() - { - var query = EntityQueryEnumerator(); - - while (query.MoveNext(out var uid, out var effect, out var toggled)) - { - if (toggled.NextTick > _timing.CurTime) - continue; - - if (toggled.Performer is null) - continue; - - toggled.NextTick = _timing.CurTime + TimeSpan.FromSeconds(toggled.Frequency); - - var spellArgs = - new CP14SpellEffectBaseArgs(toggled.Performer, effect.SpellStorage, toggled.EntityTarget, toggled.WorldTarget); - - //if (!CanCastSpell((uid, effect), spellArgs)) - //{ - // if (_doAfter.IsRunning(toggled.DoAfterId)) - // _doAfter.Cancel(toggled.DoAfterId); - // continue; - //} - - CastSpell((uid, effect), spellArgs); - } - } - - private void OnToggleableInstantActionDoAfterEvent(Entity ent, ref CP14ToggleableInstantActionDoAfterEvent args) - { - EndToggleableAction(ent, args.User, args.Cooldown); - } - - private void OnToggleableEntityWorldTargetActionDoAfterEvent(Entity ent, ref CP14ToggleableEntityWorldTargetActionDoAfterEvent args) - { - EndToggleableAction(ent, args.User, args.Cooldown); - } - - private void OnToggleableEntityTargetActionDoAfterEvent(Entity ent, ref CP14ToggleableEntityTargetActionDoAfterEvent args) - { - EndToggleableAction(ent, args.User, args.Cooldown); - } - - private void StartToggleableAction(ICP14ToggleableMagicEffect toggleable, DoAfterEvent doAfter, Entity action, EntityUid performer, EntityUid? entityTarget = null, EntityCoordinates? worldTarget = null) - { - if (_doAfter.IsRunning(action.Comp.ActiveDoAfter)) - return; - - // event may return an empty entity with id = 0, which causes bugs - var _target = entityTarget; - if (_target is not null && _target.Value.Id == 0) - _target = null; - - var evStart = new CP14StartCastMagicEffectEvent(performer); - RaiseLocalEvent(action, ref evStart); - - var fromItem = action.Comp.SpellStorage is not null && action.Comp.SpellStorage.Value != performer; - - var doAfterEventArgs = new DoAfterArgs(EntityManager, performer, toggleable.CastTime, doAfter, action, used: action.Comp.SpellStorage, target: _target) - { - BreakOnMove = toggleable.BreakOnMove, - BreakOnDamage = toggleable.BreakOnDamage, - Hidden = toggleable.Hidden, - DistanceThreshold = toggleable.DistanceThreshold, - CancelDuplicate = true, - BlockDuplicate = true, - BreakOnDropItem = fromItem, - NeedHand = fromItem, - }; - - if (_doAfter.TryStartDoAfter(doAfterEventArgs, out var doAfterId)) - { - EnsureComp(action, out var toggled); - toggled.Frequency = toggleable.EffectFrequency; - toggled.Performer = performer; - toggled.DoAfterId = doAfterId; - toggled.Cooldown = toggleable.Cooldown; - - toggled.EntityTarget = _target; - toggled.WorldTarget = worldTarget; - - action.Comp.ActiveDoAfter = doAfterId; - } - } - - private void EndToggleableAction(Entity action, EntityUid performer, float? cooldown = null) - { - //This is an extremely dirty hack. I added it only because I know that in the coming weeks we will be rewriting this entire system. - // But until then, the game just needs to work as intended. The refactoring of actions hit us all hard... - //The main problem is that my stupid spell system has its own separate cooldown, which works independently of the official system (to support doAfters). - //And at this point in the code, the cooldown was first set by my system, and then reset to 0 by the official system. - //Previously, I edited the official system a little so that it would not reset the cooldowns, but I don't want to repeat this after refactoring the actions. - //So I just delay installing the cooldown from my fucked-up system for a split second. This is evil! And we will destroy this evil! - Timer.Spawn(50, - () => - { - if (cooldown is not null) - _action.SetCooldown(action.Owner, TimeSpan.FromSeconds(cooldown.Value)); - }); - RemCompDeferred(action); - - var endEv = new CP14EndCastMagicEffectEvent(performer); - RaiseLocalEvent(action, ref endEv); - } - - private void ToggleToggleableAction(ICP14ToggleableMagicEffect toggleable, DoAfterEvent doAfter, Entity action, EntityUid performer, EntityUid? entityTarget = null, EntityCoordinates? worldTarget = null) - { - if (_doAfter.IsRunning(action.Comp.ActiveDoAfter)) - _doAfter.Cancel(action.Comp.ActiveDoAfter); - else - StartToggleableAction(toggleable, doAfter, action, performer, entityTarget, worldTarget); - } - - /// - /// Instant action used from hotkey event - /// - private void OnToggleableInstantAction(CP14ToggleableInstantActionEvent args) - { - if (args.Handled) - return; - - if (args is not ICP14ToggleableMagicEffect toggleable) - return; - - if (!TryComp(args.Action, out var magicEffect)) - return; - - var doAfter = new CP14ToggleableInstantActionDoAfterEvent(args.Cooldown); - ToggleToggleableAction(toggleable, doAfter, (args.Action, magicEffect), args.Performer, args.Performer, Transform(args.Performer).Coordinates); - - args.Handled = true; - } - - /// - /// Target action used from hotkey event - /// - private void OnToggleableEntityWorldTargetAction(CP14ToggleableWorldTargetActionEvent args) - { - if (args.Handled) - return; - - if (args is not ICP14ToggleableMagicEffect toggleable) - return; - - if (!TryComp(args.Action, out var magicEffect)) - return; - - var doAfter = new CP14ToggleableEntityWorldTargetActionDoAfterEvent( - EntityManager.GetNetCoordinates(args.Target), - EntityManager.GetNetEntity(args.Entity), - args.Cooldown); - ToggleToggleableAction(toggleable, doAfter, (args.Action, magicEffect), args.Performer, args.Entity, args.Target); - - args.Handled = true; - } - - /// - /// Entity target action used from hotkey event - /// - private void OnToggleableEntityTargetAction(CP14ToggleableEntityTargetActionEvent args) - { - if (args.Handled) - return; - - if (args is not ICP14ToggleableMagicEffect toggleable) - return; - - if (!TryComp(args.Action, out var magicEffect)) - return; - - var doAfter = new CP14ToggleableEntityTargetActionDoAfterEvent(EntityManager.GetNetEntity(args.Target), args.Cooldown); - ToggleToggleableAction(toggleable, doAfter, (args.Action, magicEffect), args.Performer, args.Target, Transform(args.Target).Coordinates); - - args.Handled = true; - } -} - diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs deleted file mode 100644 index 25f415c9e3..0000000000 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System.Text; -using Content.Shared._CP14.Actions.Components; -using Content.Shared._CP14.MagicEnergy; -using Content.Shared._CP14.MagicEnergy.Components; -using Content.Shared._CP14.MagicSpell.Components; -using Content.Shared._CP14.MagicSpell.Events; -using Content.Shared._CP14.MagicSpell.Spells; -using Content.Shared._CP14.MagicVision; -using Content.Shared.Actions; -using Content.Shared.Actions.Components; -using Content.Shared.Damage.Systems; -using Content.Shared.DoAfter; -using Content.Shared.FixedPoint; -using Content.Shared.Movement.Systems; -using Content.Shared.Popups; -using Robust.Shared.Network; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; -using Robust.Shared.Timing; - -namespace Content.Shared._CP14.MagicSpell; - -/// -/// This system handles the basic mechanics of spell use, such as doAfter, event invocation, and energy spending. -/// -public abstract partial class CP14SharedMagicSystem : EntitySystem -{ - [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; - [Dependency] private readonly CP14SharedMagicEnergySystem _magicEnergy = default!; - [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly IPrototypeManager _proto = default!; - [Dependency] private readonly MetaDataSystem _meta = default!; - [Dependency] private readonly SharedActionsSystem _action = default!; - [Dependency] private readonly MovementSpeedModifierSystem _movement = default!; - [Dependency] private readonly SharedStaminaSystem _stamina = default!; - [Dependency] private readonly IGameTiming _timing = default!; - [Dependency] private readonly CP14SharedMagicVisionSystem _magicVision = default!; - [Dependency] private readonly INetManager _net = default!; - - private EntityQuery _magicContainerQuery; - private EntityQuery _magicEffectQuery; - - public override void Initialize() - { - base.Initialize(); - InitializeDelayedActions(); - InitializeToggleableActions(); - InitializeInstantActions(); - InitializeChecks(); - InitializeSlowdown(); - - _magicContainerQuery = GetEntityQuery(); - _magicEffectQuery = GetEntityQuery(); - - SubscribeLocalEvent(OnMagicEffectShutdown); - - SubscribeLocalEvent(OnStartCast); - SubscribeLocalEvent(OnEndCast); - } - - private void OnStartCast(Entity ent, ref CP14StartCastMagicEffectEvent args) - { - var caster = EnsureComp(args.Performer); - - caster.CastedSpells.Add(ent); - } - - private void OnEndCast(Entity ent, ref CP14EndCastMagicEffectEvent args) - { - if (!_net.IsServer) - return; - - if (!TryComp(args.Performer, out var caster)) - return; - - caster.CastedSpells.Remove(ent); - - //Break all casts - List castedSpells = new(); - foreach (var casted in caster.CastedSpells) - { - castedSpells.Add(casted); - } - - foreach (var casted in castedSpells) - { - if (!_magicEffectQuery.TryComp(casted, out var castedComp)) - continue; - - _doAfter.Cancel(castedComp.ActiveDoAfter); - } - } - - public override void Update(float frameTime) - { - base.Update(frameTime); - - UpdateToggleableActions(); - } - - private void OnMagicEffectShutdown(Entity ent, ref ComponentShutdown args) - { - if (_doAfter.IsRunning(ent.Comp.ActiveDoAfter)) - _doAfter.Cancel(ent.Comp.ActiveDoAfter); - } - - private void CastTelegraphy(Entity ent, CP14SpellEffectBaseArgs args) - { - if (!_timing.IsFirstTimePredicted) - return; - - foreach (var effect in ent.Comp.TelegraphyEffects) - { - effect.Effect(EntityManager, args); - } - } - - private void CastSpell(Entity ent, CP14SpellEffectBaseArgs args) - { - if (!_timing.IsFirstTimePredicted) - return; - - var ev = new CP14MagicEffectConsumeResourceEvent(args.User); - RaiseLocalEvent(ent, ref ev); - - foreach (var effect in ent.Comp.Effects) - { - effect.Effect(EntityManager, args); - } - - if (args.User is not null - && TryComp(ent, out var actionComp) - && TryComp(ent, out var manaCost)) - { - _magicVision.SpawnMagicTrace( - Transform(args.User.Value).Coordinates, - actionComp.Icon, - Loc.GetString("cp14-magic-vision-used-spell", ("name", MetaData(ent).EntityName)), - TimeSpan.FromSeconds((float)manaCost.ManaCost * 50), - args.User, - args.Position); - } - } - - public FixedPoint2 CalculateManacost(Entity ent, EntityUid? caster) - { - var manaCost = ent.Comp.ManaCost; - - if (ent.Comp.CanModifyManacost && _magicEffectQuery.TryComp(ent, out var magicEffect)) - { - var manaEv = new CP14CalculateManacostEvent(caster, ent.Comp.ManaCost); - - if (caster is not null) - RaiseLocalEvent(caster.Value, manaEv); - - if (magicEffect.SpellStorage is not null) - RaiseLocalEvent(magicEffect.SpellStorage.Value, manaEv); - - manaCost = manaEv.GetManacost(); - } - - return manaCost; - } -} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicCasterComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicCasterComponent.cs deleted file mode 100644 index bb73fec3d1..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicCasterComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Shared._CP14.MagicSpell.Components; - -/// -/// -/// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicCasterComponent : Component -{ - [DataField] - public List CastedSpells = new(); -} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicCasterSlowdownComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicCasterSlowdownComponent.cs deleted file mode 100644 index b5e69bce57..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicCasterSlowdownComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Shared._CP14.MagicSpell.Components; - -/// -/// apply slowdown effect from casting spells -/// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicCasterSlowdownComponent : Component -{ - [DataField] - public float SpeedModifier = 1f; -} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectCastSlowdownComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectCastSlowdownComponent.cs deleted file mode 100644 index 61cdc2d0fc..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectCastSlowdownComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Shared._CP14.MagicSpell.Components; - -/// -/// Slows the caster while using this spell -/// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectCastSlowdownComponent : Component -{ - [DataField] - public float SpeedMultiplier = 1f; -} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectComponent.cs deleted file mode 100644 index 8034d6488d..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectComponent.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Content.Shared._CP14.MagicRitual.Prototypes; -using Content.Shared._CP14.MagicSpell.Spells; -using Content.Shared._CP14.MagicSpellStorage; -using Content.Shared.DoAfter; -using Robust.Shared.Prototypes; - -namespace Content.Shared._CP14.MagicSpell.Components; - -/// -/// Stores the results and appearance of the magic effect -/// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem), typeof(CP14SharedSpellStorageSystem))] -public sealed partial class CP14MagicEffectComponent : Component -{ - /// - /// if this effect was provided by an spellstorage, it will be recorded here automatically. - /// - [DataField] - public EntityUid? SpellStorage; - - /// - /// Effects that will trigger at the beginning of the cast, before mana is spent. Should have no gameplay importance, just special effects, popups and sounds. - /// - [DataField] - public List TelegraphyEffects = new(); - - [DataField] - public List Effects = new(); - - [DataField] - public DoAfterId? ActiveDoAfter; -} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectEmotingComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectEmotingComponent.cs deleted file mode 100644 index a812192c9f..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectEmotingComponent.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Content.Shared._CP14.MagicSpell.Components; - -/// -/// Requires the user to be able to speak in order to use this spell. Also forces the user to use certain phrases at the beginning and end of a spell cast -/// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectEmotingComponent : Component -{ - [DataField] - public string StartEmote = string.Empty; //Not LocId! - - [DataField] - public string EndEmote = string.Empty; //Not LocId! -} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectToggledComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectToggledComponent.cs deleted file mode 100644 index 2cd384b7ad..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectToggledComponent.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Content.Shared.DoAfter; -using Robust.Shared.Map; - -namespace Content.Shared._CP14.MagicSpell.Components; - -/// -/// -/// -[RegisterComponent, AutoGenerateComponentPause, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectToggledComponent : Component -{ - [DataField] - public float Cooldown = 1f; - - [DataField, AutoPausedField] - public TimeSpan NextTick = TimeSpan.Zero; - - [DataField] - public float Frequency = 0f; - - [DataField] - public EntityUid? Performer; - - public DoAfterId? DoAfterId; - - [DataField] - public EntityUid? EntityTarget; - - [DataField] - public EntityCoordinates? WorldTarget; -} diff --git a/Content.Shared/_CP14/MagicSpell/Events/CP14CastMagicEffectEvent.cs b/Content.Shared/_CP14/MagicSpell/Events/CP14CastMagicEffectEvent.cs index 1f463539bc..c0bb678be3 100644 --- a/Content.Shared/_CP14/MagicSpell/Events/CP14CastMagicEffectEvent.cs +++ b/Content.Shared/_CP14/MagicSpell/Events/CP14CastMagicEffectEvent.cs @@ -1,10 +1,5 @@ -using Content.Shared._CP14.MagicRitual.Prototypes; -using Content.Shared._CP14.MagicSpell.Components; -using Content.Shared._CP14.MagicSpell.Spells; using Content.Shared.FixedPoint; using Content.Shared.Inventory; -using Robust.Shared.Map; -using Robust.Shared.Prototypes; namespace Content.Shared._CP14.MagicSpell.Events; @@ -33,59 +28,14 @@ public sealed class CP14CalculateManacostEvent : EntityEventArgs, IInventoryRela public SlotFlags TargetSlots { get; } = SlotFlags.All; } -/// -/// is invoked if all conditions are met and the spell has begun to be cast (doAfter start moment) -/// [ByRefEvent] -public sealed class CP14StartCastMagicEffectEvent : EntityEventArgs +public sealed class CP14SpellFromSpellStorageUsedEvent( + EntityUid? performer, + EntityUid? action, + FixedPoint2 manacost) + : EntityEventArgs { - public EntityUid Performer { get; init; } - - public CP14StartCastMagicEffectEvent(EntityUid performer) - { - Performer = performer; - } -} - -/// -/// is invoked on the spell itself when the spell process has been completed or interrupted (doAfter end moment) -/// -[ByRefEvent] -public sealed class CP14EndCastMagicEffectEvent : EntityEventArgs -{ - public EntityUid Performer { get; init; } - - public CP14EndCastMagicEffectEvent(EntityUid performer) - { - Performer = performer; - } -} - -/// -/// is invoked only if the spell has been successfully cast -/// -[ByRefEvent] -public sealed class CP14MagicEffectConsumeResourceEvent : EntityEventArgs -{ - public EntityUid? Performer { get; init; } - - public CP14MagicEffectConsumeResourceEvent(EntityUid? performer) - { - Performer = performer; - } -} - -[ByRefEvent] -public sealed class CP14SpellFromSpellStorageUsedEvent : EntityEventArgs -{ - public EntityUid? Performer { get; init; } - public Entity Action { get; init; } - public FixedPoint2 Manacost { get; init; } - - public CP14SpellFromSpellStorageUsedEvent(EntityUid? performer, Entity action, FixedPoint2 manacost) - { - Performer = performer; - Action = action; - Manacost = manacost; - } + public EntityUid? Performer { get; init; } = performer; + public EntityUid? Action { get; init; } = action; + public FixedPoint2 Manacost { get; init; } = manacost; } diff --git a/Content.Shared/_CP14/MagicSpell/Events/CP14DelayedActionEvents.cs b/Content.Shared/_CP14/MagicSpell/Events/CP14DelayedActionEvents.cs deleted file mode 100644 index 76777a89bb..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Events/CP14DelayedActionEvents.cs +++ /dev/null @@ -1,149 +0,0 @@ -using Content.Shared.Actions; -using Content.Shared.DoAfter; -using Robust.Shared.Map; -using Robust.Shared.Serialization; - -namespace Content.Shared._CP14.MagicSpell.Events; - -public interface ICP14DelayedMagicEffect -{ - public float Cooldown { get; } - - public float CastDelay { get; } - - public bool BreakOnMove { get; } - - public bool BreakOnDamage { get; } - - public float DistanceThreshold { get; } - - public bool Hidden { get; } - - public bool RequireCanInteract { get; } -} - -public sealed partial class CP14DelayedWorldTargetActionEvent : WorldTargetActionEvent, - ICP14DelayedMagicEffect -{ - [DataField] - public float Cooldown { get; private set; } = 1f; - - [DataField] - public float CastDelay { get; private set; } = 1f; - - [DataField] - public bool BreakOnMove { get; private set; } = true; - - [DataField] - public bool BreakOnDamage { get; private set; } = true; - - [DataField] - public float DistanceThreshold { get; private set; } = 100f; - - [DataField] - public bool Hidden { get; private set; } = false; - - [DataField] - public bool RequireCanInteract { get; private set; } = true; -} - -//Entity Target -public sealed partial class CP14DelayedEntityTargetActionEvent : EntityTargetActionEvent, - ICP14DelayedMagicEffect -{ - [DataField] - public float Cooldown { get; private set; } = 1f; - - [DataField] - public float CastDelay { get; private set; } = 1f; - - [DataField] - public bool BreakOnMove { get; private set; } = true; - - [DataField] - public bool BreakOnDamage { get; private set; } = true; - - [DataField] - public float DistanceThreshold { get; private set; } = 100f; - - [DataField] - public bool Hidden { get; private set; } = false; - - [DataField] - public bool RequireCanInteract { get; private set; } = true; -} - -public sealed partial class CP14DelayedInstantActionEvent : InstantActionEvent, ICP14DelayedMagicEffect -{ - [DataField] - public float Cooldown { get; private set; } = 3f; - - [DataField] - public float CastDelay { get; private set; } = 1f; - - [DataField] - public bool BreakOnMove { get; private set; } = true; - - [DataField] - public bool BreakOnDamage { get; private set; } = true; - - [DataField] - public float DistanceThreshold { get; private set; } = 100f; - - [DataField] - public bool Hidden { get; private set; } = false; - - [DataField] - public bool RequireCanInteract { get; private set; } = true; -} - -[Serializable, NetSerializable] -public sealed partial class CP14DelayedEntityWorldTargetActionDoAfterEvent : DoAfterEvent -{ - [DataField] - public NetCoordinates? TargetPosition; - [DataField] - public NetEntity? TargetEntity; - [DataField] - public float? Cooldown; - - public CP14DelayedEntityWorldTargetActionDoAfterEvent(NetCoordinates? targetPos, NetEntity? targetEntity, float cooldown) - { - TargetPosition = targetPos; - TargetEntity = targetEntity; - Cooldown = cooldown; - } - - public override DoAfterEvent Clone() => this; -} - -[Serializable, NetSerializable] -public sealed partial class CP14DelayedEntityTargetActionDoAfterEvent : DoAfterEvent -{ - [DataField] - public NetEntity? TargetEntity; - [DataField] - public float? Cooldown; - - public CP14DelayedEntityTargetActionDoAfterEvent(NetEntity? targetEntity, float cooldown) - { - TargetEntity = targetEntity; - Cooldown = cooldown; - } - - public override DoAfterEvent Clone() => this; -} - -[Serializable, NetSerializable] -public sealed partial class CP14DelayedInstantActionDoAfterEvent : DoAfterEvent -{ - [DataField] - public float? Cooldown; - - public CP14DelayedInstantActionDoAfterEvent(float cooldown) - { - Cooldown = cooldown; - } - - public override DoAfterEvent Clone() => this; -} diff --git a/Content.Shared/_CP14/MagicSpell/Events/CP14ToggleableActionEvents.cs b/Content.Shared/_CP14/MagicSpell/Events/CP14ToggleableActionEvents.cs deleted file mode 100644 index eaabf1c8d3..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Events/CP14ToggleableActionEvents.cs +++ /dev/null @@ -1,147 +0,0 @@ -using Content.Shared.Actions; -using Content.Shared.DoAfter; -using Robust.Shared.Map; -using Robust.Shared.Serialization; - -namespace Content.Shared._CP14.MagicSpell.Events; - -public interface ICP14ToggleableMagicEffect -{ - public float EffectFrequency { get; } - - public float CastTime { get; } - - public float Cooldown { get; } - - public bool BreakOnMove { get; } - - public bool BreakOnDamage { get; } - - public float DistanceThreshold { get; } - - public bool Hidden{ get; } -} - -public sealed partial class CP14ToggleableInstantActionEvent : InstantActionEvent, ICP14ToggleableMagicEffect -{ - [DataField] - public float EffectFrequency { get; private set; } = 1f; - - [DataField] - public float Cooldown { get; private set; } = 3f; - - [DataField] - public float CastTime { get; private set; } = 10f; - - [DataField] - public bool BreakOnMove { get; private set; } = false; - - [DataField] - public bool BreakOnDamage { get; private set; } = true; - - [DataField] - public float DistanceThreshold { get; private set; } = 100f; - - [DataField] - public bool Hidden { get; private set; } = false; -} - -public sealed partial class CP14ToggleableWorldTargetActionEvent : WorldTargetActionEvent, ICP14ToggleableMagicEffect -{ - [DataField] - public float EffectFrequency { get; private set; } = 1f; - - [DataField] - public float Cooldown { get; private set; } = 3f; - - [DataField] - public float CastTime { get; private set; } = 10f; - - [DataField] - public bool BreakOnMove { get; private set; } = false; - - [DataField] - public bool BreakOnDamage { get; private set; } = true; - - [DataField] - public float DistanceThreshold { get; private set; } = 100f; - - [DataField] - public bool Hidden { get; private set; } = false; -} - -public sealed partial class CP14ToggleableEntityTargetActionEvent : EntityTargetActionEvent, ICP14ToggleableMagicEffect -{ - [DataField] - public float EffectFrequency { get; private set; } = 1f; - - [DataField] - public float Cooldown { get; private set; } = 3f; - - [DataField] - public float CastTime { get; private set; } = 10f; - - [DataField] - public bool BreakOnMove { get; private set; } = false; - - [DataField] - public bool BreakOnDamage { get; private set; } = true; - - [DataField] - public float DistanceThreshold { get; private set; } = 100f; - - [DataField] - public bool Hidden { get; private set; } = false; -} - -[Serializable, NetSerializable] -public sealed partial class CP14ToggleableInstantActionDoAfterEvent : DoAfterEvent -{ - [DataField] - public float? Cooldown; - - public CP14ToggleableInstantActionDoAfterEvent(float cooldown) - { - Cooldown = cooldown; - } - - public override DoAfterEvent Clone() => this; -} - -[Serializable, NetSerializable] -public sealed partial class CP14ToggleableEntityWorldTargetActionDoAfterEvent : DoAfterEvent -{ - [DataField] - public NetCoordinates? TargetPosition; - [DataField] - public NetEntity? TargetEntity; - [DataField] - public float? Cooldown; - - public CP14ToggleableEntityWorldTargetActionDoAfterEvent(NetCoordinates? targetPos, NetEntity? targetEntity, float cooldown) - { - TargetPosition = targetPos; - TargetEntity = targetEntity; - Cooldown = cooldown; - } - - public override DoAfterEvent Clone() => this; -} - - -[Serializable, NetSerializable] -public sealed partial class CP14ToggleableEntityTargetActionDoAfterEvent : DoAfterEvent -{ - [DataField] - public NetEntity? TargetEntity; - [DataField] - public float? Cooldown; - - public CP14ToggleableEntityTargetActionDoAfterEvent(NetEntity? targetEntity, float cooldown) - { - TargetEntity = targetEntity; - Cooldown = cooldown; - } - - public override DoAfterEvent Clone() => this; -} diff --git a/Content.Shared/_CP14/MagicSpell/Spells/C14SpellInterruptSpell.cs b/Content.Shared/_CP14/MagicSpell/Spells/C14SpellInterruptSpell.cs deleted file mode 100644 index 2ba4e1b609..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Spells/C14SpellInterruptSpell.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Content.Shared._CP14.Actions.Components; -using Content.Shared._CP14.MagicSpell.Components; -using Content.Shared.Electrocution; - -namespace Content.Shared._CP14.MagicSpell.Spells; - -public sealed partial class CP14SpellInterruptSpell : CP14SpellEffect -{ - [DataField] - public TimeSpan Duration = TimeSpan.FromSeconds(5); - - [DataField] - public int Damage = 10; - - public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args) - { - if (args.Target is null) - return; - - if (!entManager.TryGetComponent(args.Target.Value, out var caster)) - return; - - var interrupt = false; - foreach (var spell in caster.CastedSpells) - { - if (entManager.HasComponent(spell)) - { - interrupt = true; - break; - } - } - - if (!interrupt) - return; - - var electrocutionSystem = entManager.System(); - - electrocutionSystem.TryDoElectrocution(args.Target.Value, args.User, Damage, Duration, true, ignoreInsulation: true ); - } -} diff --git a/Content.Shared/_CP14/Skill/CP14SkillSystem.Admin.cs b/Content.Shared/_CP14/Skill/CP14SkillSystem.Admin.cs index 4c78e77ba3..2baa5bfb07 100644 --- a/Content.Shared/_CP14/Skill/CP14SkillSystem.Admin.cs +++ b/Content.Shared/_CP14/Skill/CP14SkillSystem.Admin.cs @@ -56,6 +56,7 @@ public abstract partial class CP14SharedSkillSystem { Text = "Reset skills", Message = "Remove all learned skills", + Category = VerbCategory.Debug, Icon = new SpriteSpecifier.Rsi(new("/Textures/_CP14/Interface/Misc/reroll.rsi"), "reroll"), Act = () => { diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/MOB_sprint.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/MOB_sprint.yml deleted file mode 100644 index 94d675c822..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/MOB_sprint.yml +++ /dev/null @@ -1,29 +0,0 @@ -- type: entity - id: CP14ActionBearSpellSprint - parent: CP14ActionSpellBase - name: Sprint - description: Catch up and rip, every predator can accelerate and catch up with its prey. - components: - - type: Sprite - sprite: _CP14/Actions/Spells/physical.rsi - state: sprint - - type: CP14MagicEffectCastSlowdown - speedMultiplier: 1.8 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14DustEffect - - type: Action - icon: - sprite: _CP14/Actions/Spells/physical.rsi - state: sprint - - type: TargetAction - checkCanAccess: false - range: 15 - - type: InstantAction - event: !type:CP14ToggleableInstantActionEvent - effectFrequency: 0.2 - cooldown: 8 - castTime: 3 - hidden: true diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/dash.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/dash.yml index a47ce436da..841967bc05 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/dash.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/dash.yml @@ -6,12 +6,9 @@ components: - type: CP14ActionStaminaCost stamina: 20 - - type: CP14MagicEffect - effects: - - !type:CP14SpellDash - speed: 20 - range: 3.5 - type: Action + sound: null + useDelay: 5 icon: sprite: _CP14/Actions/Spells/physical.rsi state: dash @@ -19,5 +16,8 @@ checkCanAccess: false range: 10 #Thats not dash range, thats interaction clickable zone range - type: WorldTargetAction - event: !type:CP14WorldTargetActionEvent - cooldown: 5 \ No newline at end of file + event: !type:CP14WorldTargetModularEffectEvent + effects: + - !type:CP14SpellDash + speed: 20 + range: 3.5 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/kick.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/kick.yml index defb1e164b..7880cb4680 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/kick.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/kick.yml @@ -4,34 +4,21 @@ name: Kick description: You perform an epic leg kick at your chosen object, pushing it away from you. components: - - type: Sprite - sprite: _CP14/Actions/Spells/physical.rsi - state: kick - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.4 - type: CP14ActionStaminaCost stamina: 40 - - type: CP14MagicEffect - effects: - - !type:CP14SpellKnockdown - - !type:CP14SpellThrowFromUser - distance: 1.5 - throwPower: 5 - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14DustEffectKickSound - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - ignoreResistances: false - damage: - types: - Blunt: 5 - - type: CP14MagicEffectEmoting + - type: CP14ActionEmoting startEmote: cp14-kick-emote-start endEmote: cp14-kick-emote - type: CP14ActionDangerous + - type: DoAfterArgs + breakOnHandChange: false + distanceThreshold: 1.5 + delay: 0.5 - type: Action + useDelay: 5 + sound: null icon: sprite: _CP14/Actions/Spells/physical.rsi state: kick @@ -39,17 +26,27 @@ range: 1 - type: EntityTargetAction canTargetSelf: false - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 5 - castDelay: 0.5 - distanceThreshold: 1.5 - breakOnMove: false - breakOnDamage: false whitelist: components: - Body - Item - Anchorable + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellKnockdown + - !type:CP14SpellThrowFromUser + distance: 1.5 + throwPower: 5 + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14DustEffectKickSound + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + ignoreResistances: false + damage: + types: + Blunt: 5 - type: entity id: CP14DustEffectKickSound diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/second_wind.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/second_wind.yml index d272eff961..e330e5e624 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/second_wind.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/second_wind.yml @@ -6,35 +6,35 @@ name: Second wind description: Through pain and blood, you find a second wind, instantly restoring your stamina. components: - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectSecondWind - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - - !type:MovespeedModifier - walkSpeedModifier: 1.15 - sprintSpeedModifier: 1.15 - statusLifetime: 2 - - !type:CP14StaminaChange - staminaDelta: 100 - - !type:HealthChange - damage: - types: - Blunt: 20 - - !type:ModifyStatusEffect - effectProto: StatusEffectStunned - time: 6 - type: Remove - type: Action + useDelay: 10 + sound: null icon: sprite: _CP14/Actions/Spells/physical.rsi state: second_wind - type: InstantAction - event: !type:CP14InstantActionEvent - cooldown: 10 + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectSecondWind + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Jitter + - !type:MovespeedModifier + walkSpeedModifier: 1.15 + sprintSpeedModifier: 1.15 + statusLifetime: 2 + - !type:CP14StaminaChange + staminaDelta: 100 + - !type:HealthChange + damage: + types: + Blunt: 20 + - !type:ModifyStatusEffect + effectProto: StatusEffectStunned + time: 6 + type: Remove - type: entity id: CP14ImpactEffectSecondWind diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/sprint.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/sprint.yml index 256f11a0be..48d3ff7e42 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/sprint.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/sprint.yml @@ -4,25 +4,31 @@ name: Sprint description: At the cost of heavy stamina expenditure, you accelerate significantly in movement. components: - - type: Sprite - sprite: _CP14/Actions/Spells/physical.rsi - state: sprint - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 1.3 - type: CP14ActionStaminaCost - stamina: 1.5 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14DustEffect + stamina: 2.0 + - type: DoAfterArgs + hidden: true + repeat: true + delay: 0.25 - type: Action + useDelay: 2 + sound: null icon: sprite: _CP14/Actions/Spells/physical.rsi state: sprint - type: InstantAction - event: !type:CP14ToggleableInstantActionEvent - effectFrequency: 0.2 - cooldown: 2 - castTime: 30 - hidden: true \ No newline at end of file + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14DustEffect + +- type: entity + id: CP14ActionBearSpellSprint + parent: CP14ActionSpellSprint + description: Catch up and rip, every predator can accelerate and catch up with its prey. + components: + - type: CP14ActionDoAfterSlowdown + speedMultiplier: 1.8 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/darkmist.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/darkmist.yml deleted file mode 100644 index 418cc61e27..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/darkmist.yml +++ /dev/null @@ -1,73 +0,0 @@ -- type: entity - id: CP14ActionSpellGodLumeraDarkmist - parent: CP14ActionSpellBase - name: Impenetrable darkness - description: You summon a thick fog that obscures vision and disorients mortals. - components: - - type: CP14ActionReligionRestricted - - type: CP14ActionManaCost - manaCost: 10 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectFlashLight - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14LumeraDarkMist - - type: Action - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: mist - - type: TargetAction - checkCanAccess: false - repeat: true - range: 100 - - type: WorldTargetAction - event: !type:CP14WorldTargetActionEvent - cooldown: 0.15 - -- type: entity - parent: - - BaseStructure - - BaseShadow - id: CP14LumeraDarkMist - categories: [ HideSpawnMenu ] - components: - - type: SyncSprite - - type: TimedDespawn - lifetime: 60 - - type: Occluder - - type: Sprite - drawdepth: Effects - sprite: Effects/spookysmoke.rsi - layers: - - state: spookysmoke - color: "#3266a8" - map: [base] - - type: OptionsVisualizer - visuals: - base: - - options: Default - data: { state: spookysmoke } - - options: ReducedMotion - data: { state: spookysmoke_static } - - type: Physics - bodyType: Static - canCollide: false - - type: Fixtures - fixtures: - fix1: - shape: - !type:PhysShapeAabb - bounds: "-0.5,-0.5,0.5,0.5" - layer: - - SlipLayer - mask: - - ItemMask - density: 1000 - hard: false - - type: Tag - tags: - - HideContextMenu diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_degrade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_degrade.yml deleted file mode 100644 index 0bf8e57ab5..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_degrade.yml +++ /dev/null @@ -1,125 +0,0 @@ -- type: entity - id: CP14ActionSpellGodLumeraMindDegrade - parent: CP14ActionSpellBase - name: The Wrath of Lumera - description: "You unleash your anger on the creature, stunning it, inflicting damage, and burning its mind, removing 0.5 memory points." - components: - - type: CP14ActionReligionRestricted - - type: CP14ActionManaCost - manaCost: 300 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14RuneMindDegrade - - !type:CP14SpellApplyEntityEffect - effects: - - !type:ChemVomit - - !type:Jitter - time: 16 - - !type:HealthChange - damage: - types: - Slash: 10 - Blunt: 10 - Piercing: 10 - - !type:MovespeedModifier - walkSpeedModifier: 0.02 - sprintSpeedModifier: 0.02 - statusLifetime: 19 - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14LumeraMindDegradeImpact - - !type:CP14SpellRemoveMemoryPoint - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - time: 16 - - !type:Paralyze - paralyzeTime: 16 - - !type:Drunk - boozePower: 20 - - !type:HealthChange - damage: - types: - Slash: 10 - Blunt: 10 - Piercing: 10 - - !type:MovespeedModifier - walkSpeedModifier: 0.5 - sprintSpeedModifier: 0.5 - statusLifetime: 30 - - type: Action - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: wrath - - type: TargetAction - range: 100 - - type: EntityTargetAction - blacklist: - components: - - CP14ReligionEntity - whitelist: - components: - - CP14SkillStorage - canTargetSelf: false - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 300 - castDelay: 16 - breakOnMove: false - breakOnDamage: false - -- type: entity - id: CP14RuneMindDegrade - parent: CP14BaseMagicRune - categories: [ HideSpawnMenu ] - save: false - components: - - type: TimedDespawn - lifetime: 16 - - type: PointLight - color: "#ae424d" - radius: 5 - energy: 8 - - type: LightFade - duration: 10 - - type: Sprite - layers: - - state: medium_circle - scale: 1.5, 1.5 - color: "#ae424d" - shader: unshaded - - type: EmitSoundOnSpawn - sound: - path: /Audio/_CP14/Effects/ritual_begin.ogg - params: - pitch: 1 - -- type: entity - id: CP14LumeraMindDegradeImpact - categories: [ HideSpawnMenu ] - parent: CP14BaseMagicImpact - save: false - components: - - type: PointLight - color: "#ae424d" - enabled: true - radius: 15 - energy: 8 - netsync: false - - type: Sprite - layers: - - state: stars - scale: 2, 2 - color: "#ae424d" - shader: unshaded - - type: LightFade - duration: 1 - - type: TimedDespawn - lifetime: 3 - - type: EmitSoundOnSpawn - sound: - path: /Audio/Effects/inneranomaly.ogg - params: - pitch: 1 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_upgrade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_upgrade.yml deleted file mode 100644 index 9d4938145a..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_upgrade.yml +++ /dev/null @@ -1,122 +0,0 @@ -- type: entity - id: CP14ActionSpellGodLumeraMindUpgrade - parent: CP14ActionSpellBase - name: Expansion of consciousness - description: "You expand the boundaries of what is possible for the chosen creature, revealing to it the secrets of the universe. The target gains +0.5 memory points, up to a maximum of 6.5" - components: - - type: CP14ActionReligionRestricted - onlyOnFollowers: true - - type: CP14ActionManaCost - manaCost: 300 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14RuneMindImprove - - !type:CP14SpellApplyEntityEffect - effects: - - !type:ChemVomit - - !type:Jitter - time: 16 - - !type:HealthChange - damage: - types: - Slash: 10 - Blunt: 10 - Piercing: 10 - - !type:MovespeedModifier - walkSpeedModifier: 0.02 - sprintSpeedModifier: 0.02 - statusLifetime: 19 - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14LumeraMindImproveImpact - - !type:CP14SpellAddMemoryPoint - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - time: 16 - - !type:Paralyze - paralyzeTime: 16 - - !type:Drunk - boozePower: 20 - - !type:HealthChange - damage: - types: - Slash: 10 - Blunt: 10 - Piercing: 10 - - !type:MovespeedModifier - walkSpeedModifier: 0.5 - sprintSpeedModifier: 0.5 - statusLifetime: 30 - - type: Action - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: mind_upgrade - - type: TargetAction - range: 100 - - type: EntityTargetAction - blacklist: - components: - - CP14ReligionEntity - whitelist: - components: - - CP14SkillStorage - canTargetSelf: false - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 300 - castDelay: 16 - breakOnMove: false - breakOnDamage: false - -- type: entity - id: CP14RuneMindImprove - parent: CP14BaseMagicRune - categories: [ HideSpawnMenu ] - save: false - components: - - type: TimedDespawn - lifetime: 16 - - type: PointLight - color: "#586dcc" - radius: 5 - energy: 8 - - type: LightFade - duration: 10 - - type: Sprite - layers: - - state: medium_circle - scale: 1.5, 1.5 - color: "#586dcc" - shader: unshaded - - type: EmitSoundOnSpawn - sound: - path: /Audio/_CP14/Effects/ritual_begin.ogg - -- type: entity - id: CP14LumeraMindImproveImpact - categories: [ HideSpawnMenu ] - parent: CP14BaseMagicImpact - save: false - components: - - type: PointLight - color: "#3843a8" - enabled: true - radius: 15 - energy: 8 - netsync: false - - type: Sprite - layers: - - state: stars - scale: 2, 2 - color: "#9fb0fc" - shader: unshaded - - type: LightFade - duration: 1 - - type: TimedDespawn - lifetime: 3 - - type: EmitSoundOnSpawn - sound: - path: /Audio/_CP14/Effects/ritual_end.ogg \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml deleted file mode 100644 index 2df0e8b90b..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml +++ /dev/null @@ -1,96 +0,0 @@ -- type: entity - id: CP14ActionSpellGodLumeraMoonStrike - parent: CP14ActionSpellBase - name: Lunar strike - description: You focus the concentrated light of the stars into a single point, blinding and damaging everything that comes within reach of the angry goddess. - components: - - type: CP14ActionReligionRestricted - - type: CP14ActionManaCost - manaCost: 30 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectMoonStrike - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14SkyLumeraStrike - - type: Action - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: moon_beam - - type: TargetAction - repeat: true - checkCanAccess: false - range: 100 - - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 25 - castDelay: 1 - breakOnMove: false - -- type: entity - id: CP14ImpactEffectMoonStrike - parent: CP14BaseMagicImpact - categories: [ HideSpawnMenu ] - save: false - components: - - type: Sprite - noRot: true - drawdepth: BelowFloor - sprite: _CP14/Effects/Magic/area_impact.rsi - layers: - - state: area_impact_out - color: "#7ca5d8" - scale: 2, 2 - shader: unshaded - -- type: entity - id: CP14SkyLumeraStrike - categories: [ ForkFiltered ] - name: lumera strike - save: false - components: - - type: Sprite - sprite: _CP14/Effects/lumera_strike.rsi - drawdepth: Mobs - noRot: true - offset: 0,3 - layers: - - state: pewpew - shader: unshaded - - type: TimedDespawn - lifetime: 2 - - type: Tag - tags: - - HideContextMenu - - type: PointLight - color: "#7ca5d8" - enabled: true - radius: 10 - energy: 8 - netsync: false - - type: LightFade - duration: 1 - - type: CP14AreaEntityEffect - range: 1 - effects: - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - - !type:HealthChange - ignoreResistances: false - damage: - types: - Heat: 10 - - type: TriggerOnSpawn - - type: FlashOnTrigger - range: 1.5 - - type: CP14FarSound - closeSound: - collection: CP14MoonStrike - params: - variation: 0.2 - maxDistance: 20 - volume: 20 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/renounce.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/renounce.yml deleted file mode 100644 index d8f82a9495..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/renounce.yml +++ /dev/null @@ -1,45 +0,0 @@ -- type: entity - id: CP14ActionSpellGodLumeraRenounce - parent: CP14ActionSpellBase - name: Renunciation of a follower - description: You are rejecting the chosen follower. They lose the opportunity to become your follower at any time. - components: - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14LumeraRenounceImpact - - !type:CP14SpellGodRenounce - - type: ConfirmableAction - popup: cp-renounce-action-god-popup - - type: Action - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: renounce - - type: TargetAction - repeat: true - checkCanAccess: false - range: 100 - - type: EntityTargetAction - event: !type:CP14EntityTargetActionEvent - cooldown: 0.5 - -- type: entity - id: CP14LumeraRenounceImpact - categories: [ HideSpawnMenu ] - parent: CP14BaseMagicImpact - save: false - components: - - type: PointLight - color: "#94154e" - enabled: true - radius: 5 - energy: 4 - netsync: false - - type: Sprite - layers: - - state: stars - color: "#94154e" - shader: unshaded - - type: LightFade - duration: 1 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/speak.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/speak.yml deleted file mode 100644 index e0db8b0c53..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/speak.yml +++ /dev/null @@ -1,21 +0,0 @@ -- type: entity - id: CP14LumeraSpeakImpact - categories: [ HideSpawnMenu ] - parent: CP14BaseMagicImpact - save: false - components: - - type: PointLight - color: "#3843a8" - enabled: true - radius: 5 - energy: 4 - netsync: false - - type: Sprite - layers: - - state: stars - color: "#3843a8" - shader: unshaded - - type: LightFade - duration: 1 - - type: TimedDespawn - lifetime: 2 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/touch.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/touch.yml deleted file mode 100644 index 41f15ffbd9..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/touch.yml +++ /dev/null @@ -1,53 +0,0 @@ -- type: entity - id: CP14ActionSpellGodLumeraTouch - parent: CP14ActionSpellBase - name: Touch of Lumera - description: "Multitasking effects on the world: depending on what you click on, the effect may vary. Using it on an empty space will create a glowing sign that attracts the attention of mortals." - components: - - type: CP14ActionReligionRestricted - - type: CP14ActionManaCost - manaCost: 5 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14LumeraTouchImpact - - !type:CP14SpellGodTouch - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - - type: Action - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: touch - - type: TargetAction - repeat: true - interactOnMiss: false - #checkCanAccess: false - range: 100 - - type: EntityTargetAction - event: !type:CP14EntityTargetActionEvent - cooldown: 0.5 - - type: WorldTargetAction - event: !type:CP14WorldTargetActionEvent - cooldown: 0.5 - -- type: entity - id: CP14LumeraTouchImpact - categories: [ HideSpawnMenu ] - parent: CP14BaseMagicImpact - save: false - components: - - type: PointLight - color: "#3843a8" - enabled: true - radius: 5 - energy: 4 - netsync: false - - type: Sprite - layers: - - state: stars - color: "#3843a8" - shader: unshaded - - type: LightFade - duration: 1 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/warp.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/warp.yml deleted file mode 100644 index e32b3448f6..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/warp.yml +++ /dev/null @@ -1,13 +0,0 @@ -- type: entity - id: CP14ActionSpellGodLumeraWarp - name: Fast travel - description: Allows you to quickly teleport to your altars and followers. - components: - - type: Action - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: warp - priority: -8 - - type: InstantAction - event: !type:ToggleIntrinsicUIEvent - key: enum.CP14ReligionEntityUiKey.Key \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/generic.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/generic.yml deleted file mode 100644 index 9cf8aa9d26..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/generic.yml +++ /dev/null @@ -1,43 +0,0 @@ -- type: entity - id: CP14ActionRenounceFromGod - name: Renounce patron - description: You renounce your patron by severing your connection with him. After that, you can never become his follower again, but you can become a follower of another patron. - components: - - type: Action - icon: - sprite: _CP14/Interface/Alerts/divine_offer.rsi - state: unoffer - itemIconStyle: BigAction - priority: -8 - checkCanInteract: false - checkConsciousness: false - - type: InstantAction - event: !type:CP14RenounceFromGodEvent - - type: ConfirmableAction - popup: cp14-renounce-action-popup - -- type: entity - id: CP14ActionAppealToGod - parent: CP14ActionSpellBase - name: Appeal to god - description: You call upon your patron! He will hear your call wherever he may be. - components: - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectSphereOfLight - - !type:CP14SpellTransferManaToGod - amount: 20 - safe: true - - !type:CP14SpellSendMessageToGod - - type: Action - icon: - sprite: _CP14/Actions/DemigodSpells/generic.rsi - state: appeal - priority: -8 - - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 15 - castDelay: 1.5 - breakOnMove: true \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/portal_to_city.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/portal_to_city.yml index bda43884f7..841e93fb29 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/portal_to_city.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/portal_to_city.yml @@ -4,31 +4,32 @@ name: Portal to city description: You open a portal leading to a city that will last for one minute. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 30 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectShadowStep - effects: - - !type:CP14SpellTeleportToCity - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14ImpactEffectShadowStep - type: CP14ActionFreeHandsRequired + - type: DoAfterArgs + breakOnHandChange: false + breakOnMove: true + delay: 2 - type: Action + useDelay: 30 icon: sprite: _CP14/Actions/Spells/dimension.rsi state: demi_arrow - type: TargetAction range: 3 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 30 - castDelay: 2 - breakOnMove: true + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectShadowStep + effects: + - !type:CP14SpellTeleportToCity - type: entity parent: CP14BaseSpellScrollDimension diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml index 4d0ab51413..849094a1d7 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml @@ -4,30 +4,17 @@ name: Shadow grab description: You attract a ghostly hand that draws an object or entity to you components: - - type: Sprite - sprite: _CP14/Actions/Spells/dimension.rsi - state: shadow_grab - type: CP14ActionManaCost manaCost: 20 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectShadowStep - - !type:CP14SpellSpawnEntityOnUser - spawns: - - CP14ImpactEffectShadowGrab - effects: - - !type:CP14SpellThrowToUser - throwPower: 10 - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectShadowStep - type: CP14ActionFreeHandsRequired - type: Action + useDelay: 5 icon: sprite: _CP14/Actions/Spells/dimension.rsi state: shadow_grab + - type: DoAfterArgs + breakOnHandChange: false + delay: 0.5 - type: TargetAction range: 10 - type: EntityTargetAction @@ -35,10 +22,20 @@ components: - Item canTargetSelf: false - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 5 - castDelay: 0.5 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectShadowStep + - !type:CP14SpellSpawnEntityOnUser + spawns: + - CP14ImpactEffectShadowGrab + effects: + - !type:CP14SpellThrowToUser + throwPower: 10 + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectShadowStep - type: entity id: CP14ImpactEffectShadowGrab diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml index 3cd32f0e60..6e51ae1739 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml @@ -4,34 +4,33 @@ name: Shadow step description: A step through the gash of reality that allows you to cover a small of distance quickly components: - - type: Sprite - sprite: _CP14/Actions/Spells/dimension.rsi - state: shadow_step - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.8 - type: CP14ActionManaCost manaCost: 20 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectShadowStep - effects: - - !type:CP14SpellCasterTeleport - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14ImpactEffectShadowStep - type: CP14ActionFreeHandsRequired - type: Action + useDelay: 30 icon: sprite: _CP14/Actions/Spells/dimension.rsi state: shadow_step + - type: DoAfterArgs + breakOnHandChange: false + breakOnMove: false + hidden: true + delay: 0.5 - type: TargetAction range: 7 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 30 - hidden: true - breakOnMove: false + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectShadowStep + effects: + - !type:CP14SpellCasterTeleport - type: entity id: CP14ImpactEffectShadowStep diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml deleted file mode 100644 index ede760848a..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml +++ /dev/null @@ -1,43 +0,0 @@ -- type: entity - id: CP14ActionSpellShadowSwap - parent: CP14ActionSpellBase - name: Shadow swap - description: A warp of space between two living beings - components: - - type: Sprite - sprite: _CP14/Actions/Spells/dimension.rsi - state: shadow_swap - - type: CP14MagicEffectCastSlowdown - speedMultiplier: 0.8 - - type: CP14ActionManaCost - manaCost: 20 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnUser - spawns: - - CP14ImpactEffectShadowStep - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectShadowStep - effects: - - !type:CP14SpellCasterSwap - - type: CP14MagicEffectCastingVisual - proto: CP14ImpactEffectShadowStep - - type: CP14ActionFreeHandsRequired - - type: CP14ActionTargetMobStatusRequired - - type: Action - icon: - sprite: _CP14/Actions/Spells/dimension.rsi - state: shadow_swap - - type: TargetAction - range: 5 - interactOnMiss: false - - type: EntityTargetAction - whitelist: - components: - - MobState - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 30 - hidden: true - breakOnMove: false - requireCanInteract: false diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_spider_trap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_spider_trap.yml index b8ba626f11..981f2d37d0 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_spider_trap.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_spider_trap.yml @@ -3,19 +3,8 @@ name: web trap description: You wrap a web around the target, slowing its movement. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.3 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactSpiderTrap - effects: - - !type:CP14SpellSpawnEntitiesOnTargetInRadius - spawn: CP14SpiderWeb - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactSpiderTrap - type: Action itemIconStyle: BigAction useDelay: 20 @@ -24,16 +13,26 @@ icon: sprite: _CP14/Structures/Dungeon/floor_web.rsi state: full + - type: DoAfterArgs + breakOnMove: false + breakOnDamage: false + hidden: true + delay: 0.5 - type: TargetAction range: 10 checkCanAccess: false - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - hidden: true - breakOnMove: false - breakOnDamage: false - cooldown: 20 - castDelay: 0.5 + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactSpiderTrap + effects: + - !type:CP14SpellSpawnEntitiesOnTargetInRadius + spawn: CP14SpiderWeb + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactSpiderTrap - type: entity id: CP14ImpactSpiderTrap diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_subterranean_leap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_subterranean_leap.yml index 195c15cf7f..fbbd074fbd 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_subterranean_leap.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_subterranean_leap.yml @@ -3,22 +3,11 @@ name: Subterranean leap description: Make a subterranean leap, quickly approaching the victim. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: -1.0 - type: CP14ActionManaCost manaCost: 5 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectDigging - effects: - - !type:CP14SpellCasterTeleport - needVision: false - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectDigging - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14ImpactEffectDigging - type: Action useDelay: 8 @@ -28,13 +17,26 @@ icon: sprite: _CP14/Actions/Spells/earth.rsi state: subterranean_leap + - type: DoAfterArgs + breakOnMove: false + breakOnDamage: false + hidden: true + delay: 0.5 - type: TargetAction checkCanAccess: false range: 10 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - hidden: true - breakOnMove: false + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectDigging + effects: + - !type:CP14SpellCasterTeleport + needVision: false + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectDigging - type: entity id: CP14ImpactEffectDigging diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml index f6b626c56d..f5d0327cd7 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml @@ -4,22 +4,10 @@ name: Earth wall description: Raises a solid wall of earth from the bowels. components: - - type: Sprite - sprite: _CP14/Actions/Spells/earth.rsi - state: earth_wall - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.3 - type: CP14ActionManaCost manaCost: 15 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectEarthWall - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14WallSpawnEarthWall - type: CP14ActionMaterialCost requirement: !type:StackResource stack: CP14Dirt @@ -27,17 +15,27 @@ - type: CP14ActionSpeaking startSpeech: "Surgite terram..." endSpeech: "de profundis terrae" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneEarthWall + - type: DoAfterArgs + delay: 1.5 - type: Action + useDelay: 10 icon: sprite: _CP14/Actions/Spells/earth.rsi state: earth_wall - type: TargetAction range: 10 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 10 + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectEarthWall + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14WallSpawnEarthWall - type: entity id: CP14RuneEarthWall diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/electric_trap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/electric_trap.yml index 3c248b479f..4669031246 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/electric_trap.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/electric_trap.yml @@ -4,36 +4,34 @@ name: Electric trap description: Creates a electric trap at the selected location. Don't forget to recharge it with mana. components: - - type: Sprite - sprite: _CP14/Actions/Spells/electromancy.rsi - state: electric_trap - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.9 - type: CP14ActionManaCost manaCost: 40 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectElectricTrap - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14SpawnMagicElectricTrap - type: CP14ActionSpeaking startSpeech: "Signum electricum..." endSpeech: "hunc locum custodi" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneElectricTrap - type: Action + useDelay: 4 icon: sprite: _CP14/Actions/Spells/electromancy.rsi state: electric_trap - type: TargetAction range: 3 + - type: DoAfterArgs + delay: 2 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 4 + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectElectricTrap + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14SpawnMagicElectricTrap - type: entity id: CP14RuneElectricTrap diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike.yml index 4c3e08e102..186907060a 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike.yml @@ -4,48 +4,47 @@ name: Lightning strike description: You charge a powerful lightning bolt that burns a large amount of stamina from the target. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 20 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ElectrifiedEffect - - !type:CP14SpellCreateBeam - beamProto: CP14LightningStrikeBeam - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - ignoreResistances: false - damage: - types: - Shock: 12 - - !type:Jitter - - !type:CP14StaminaChange - staminaDelta: -80 - - !type:CP14SpellThrowFromUser - throwPower: 4 - distance: 1 - type: CP14ActionSpeaking startSpeech: "A fulgur percutiens... " endSpeech: "erit ledo vobis!" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneLightningStrike - type: CP14ActionDangerous - type: Action + useDelay: 10 icon: sprite: _CP14/Actions/Spells/electromancy.rsi state: lightning_strike - type: TargetAction range: 5 + - type: DoAfterArgs + delay: 2 - type: EntityTargetAction canTargetSelf: false - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 10 - castDelay: 2.0 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ElectrifiedEffect + - !type:CP14SpellCreateBeam + beamProto: CP14LightningStrikeBeam + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + ignoreResistances: false + damage: + types: + Shock: 12 + - !type:Jitter + - !type:CP14StaminaChange + staminaDelta: -80 + - !type:CP14SpellThrowFromUser + throwPower: 4 + distance: 1 - type: entity name: lightning diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike_small.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike_small.yml index 9a7039b321..88cb617998 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike_small.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike_small.yml @@ -4,32 +4,13 @@ name: Small lightning strike description: You charge a lightning bolt that burns a medium amount of stamina from the target. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 7 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ElectrifiedEffect - - !type:CP14SpellCreateBeam - beamProto: CP14LightningStrikeSmallBeam - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - - !type:CP14StaminaChange - staminaDelta: -15 - - !type:HealthChange - ignoreResistances: false - damage: - types: - Shock: 4 - - !type:CP14SpellThrowFromUser - throwPower: 2 - distance: 0.5 - type: CP14ActionDangerous - type: Action + useDelay: 4 icon: sprite: _CP14/Actions/Spells/electromancy.rsi state: lightning_strike_small @@ -37,8 +18,26 @@ range: 3 - type: EntityTargetAction canTargetSelf: false - event: !type:CP14EntityTargetActionEvent - cooldown: 4 + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ElectrifiedEffect + - !type:CP14SpellCreateBeam + beamProto: CP14LightningStrikeSmallBeam + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Jitter + - !type:CP14StaminaChange + staminaDelta: -15 + - !type:HealthChange + ignoreResistances: false + damage: + types: + Shock: 4 + - !type:CP14SpellThrowFromUser + throwPower: 2 + distance: 0.5 - type: entity name: lightning diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/speed_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/speed_ballade.yml index 8cb5a69829..cb8c772455 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/speed_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/speed_ballade.yml @@ -4,43 +4,42 @@ name: Speed ballade description: Your music is filled with accelerating magic, speeding up the movement of all creatures nearby components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 1 - type: CP14ActionManaCost manaCost: 1 - - type: CP14MagicEffect - effects: - - !type:CP14SpellArea - affectCaster: true - range: 5 - maxTargets: 4 - whitelist: - components: - - MobState - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectSpeedBallade - - !type:CP14SpellApplyEntityEffect - effects: - - !type:MovespeedModifier - walkSpeedModifier: 1.2 - sprintSpeedModifier: 1.2 - statusLifetime: 1.8 + - type: DoAfterArgs + hidden: true + repeat: true + delay: 1 - type: CP14ActionRequiredMusicTool - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneSpeedBallade - type: Action + useDelay: 15 icon: sprite: _CP14/Actions/Spells/electromancy.rsi state: speed_music - type: InstantAction - event: !type:CP14ToggleableInstantActionEvent - effectFrequency: 1 - cooldown: 15 - castTime: 120 - hidden: true - breakOnDamage: false + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellArea + affectCaster: true + range: 5 + maxTargets: 4 + whitelist: + components: + - MobState + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectSpeedBallade + - !type:CP14SpellApplyEntityEffect + effects: + - !type:MovespeedModifier + walkSpeedModifier: 1.2 + sprintSpeedModifier: 1.2 + statusLifetime: 1.8 - type: entity id: CP14ImpactEffectSpeedBallade diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fire_trap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fire_trap.yml index 9ac12d3c2f..418314977f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fire_trap.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fire_trap.yml @@ -4,36 +4,34 @@ name: Fire trap description: Creates a fire trap at the selected location. Don't forget to recharge it with mana. components: - - type: Sprite - sprite: _CP14/Actions/Spells/fire.rsi - state: fire_trap - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.9 - type: CP14ActionManaCost manaCost: 40 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectFireTrap - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14SpawnMagicFireTrap - type: CP14ActionSpeaking startSpeech: "Signum ignis..." endSpeech: "hunc locum custodi" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneFireTrap - type: Action + useDelay: 4 icon: sprite: _CP14/Actions/Spells/fire.rsi state: fire_trap - type: TargetAction range: 3 + - type: DoAfterArgs + delay: 2 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 4 + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectFireTrap + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14SpawnMagicFireTrap - type: entity id: CP14RuneFireTrap diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fireball.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fireball.yml index 2e5cfc69bd..60c883ac83 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fireball.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fireball.yml @@ -4,25 +4,21 @@ name: Fireball description: An effective method of destruction - an explosive fireball components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.3 - type: CP14ActionManaCost manaCost: 20 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnUser - spawns: - - CP14ImpactEffectFireball - - !type:CP14SpellProjectile - prototype: CP14Fireball - type: CP14ActionSpeaking startSpeech: "Quaeso, quemdam inter vos quaero... " endSpeech: "A pila!" - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneFireball - type: CP14ActionDangerous + - type: DoAfterArgs + delay: 2.5 - type: Action + useDelay: 25 icon: sprite: _CP14/Actions/Spells/fire.rsi state: fireball @@ -30,10 +26,13 @@ checkCanAccess: false range: 60 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 25 - castDelay: 2.5 - breakOnMove: false + event: !type:CP14WorldTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnUser + spawns: + - CP14ImpactEffectFireball + - !type:CP14SpellProjectile + prototype: CP14Fireball - type: entity id: CP14RuneFireball diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/firewave.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/firewave.yml index c3d50c357c..4de0a909b4 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/firewave.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/firewave.yml @@ -4,26 +4,19 @@ name: Firewave description: You release a wave of hot fire that strikes multiple targets in an area. components: - - type: Sprite - sprite: _CP14/Actions/Spells/fire.rsi - state: firewave - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.75 - type: CP14ActionManaCost manaCost: 10 - - type: CP14MagicEffect - effects: - - !type:CP14SpellProjectile - prototype: CP14Firebolt - spread: 2 - projectileSpeed: 5 - projectileCount: 8 - type: CP14ActionSpeaking endSpeech: "Ignis acus!" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneFirebolt - type: CP14ActionDangerous + - type: DoAfterArgs + delay: 0.5 - type: Action + useDelay: 1 icon: sprite: _CP14/Actions/Spells/fire.rsi state: firewave @@ -32,11 +25,13 @@ checkCanAccess: false range: 60 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 1.0 - castDelay: 0.5 - breakOnMove: false - breakOnDamage: false + event: !type:CP14WorldTargetModularEffectEvent + effects: + - !type:CP14SpellProjectile + prototype: CP14Firebolt + spread: 2 + projectileSpeed: 5 + projectileCount: 8 - type: entity id: CP14RuneFirebolt diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/flame_creation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/flame_creation.yml index 1fba98177f..73938291ca 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/flame_creation.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/flame_creation.yml @@ -6,29 +6,29 @@ components: - type: CP14ActionManaCost manaCost: 5 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectFlameCreation - - !type:CP14SpellSpawnInHandEntity - spawns: - - CP14FlameCreationArtificialFlame - type: CP14ActionSpeaking startSpeech: "Et conteret ignis..." endSpeech: "in manu mea" - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneFlameCreation - type: Action + useDelay: 10 icon: sprite: _CP14/Actions/Spells/fire.rsi state: flame_creation + - type: DoAfterArgs + breakOnHandChange: false + delay: 1 - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 10 - breakOnMove: false + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectFlameCreation + - !type:CP14SpellSpawnInHandEntity + spawns: + - CP14FlameCreationArtificialFlame - type: entity id: CP14RuneFlameCreation diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/heat.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/heat.yml index f6ac87a9b1..018a85212d 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/heat.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/heat.yml @@ -4,43 +4,40 @@ name: Heat description: You start to heat the target up a lot, burning it from the inside. components: - - type: Sprite - sprite: _CP14/Actions/Spells/fire.rsi - state: heat - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.8 - type: CP14ActionManaCost manaCost: 7 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectHeat - - !type:CP14AdjustAllSolutionThermalEnergy - delta: 2500 - - !type:CP14SpellApplyEntityEffect - effects: - - !type:AdjustTemperature - amount: 20000 - - !type:ExtinguishReaction - type: CP14ActionSpeaking startSpeech: "Vos adepto calidum..." - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneHeat - type: CP14ActionDangerous - type: Action + useDelay: 8 icon: sprite: _CP14/Actions/Spells/fire.rsi state: heat + - type: DoAfterArgs + hidden: true + repeat: true + distanceThreshold: 5 - type: TargetAction range: 8 interactOnMiss: false - type: EntityTargetAction - event: !type:CP14ToggleableEntityTargetActionEvent - cooldown: 8 - castTime: 10 - distanceThreshold: 5 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectHeat + - !type:CP14AdjustAllSolutionThermalEnergy + delta: 2500 + - !type:CP14SpellApplyEntityEffect + effects: + - !type:AdjustTemperature + amount: 20000 + - !type:ExtinguishReaction - type: entity id: CP14ImpactEffectHeat diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/hell_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/hell_ballade.yml index 050a983898..99d64764f9 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/hell_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/hell_ballade.yml @@ -7,45 +7,44 @@ - type: Sprite sprite: _CP14/Actions/Spells/fire.rsi state: fire_music - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 8 - - type: CP14MagicEffect - effects: - - !type:CP14SpellArea - range: 3 - maxTargets: 4 - whitelist: - components: - - MobState - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectHellBallade - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - - !type:FlammableReaction - multiplier: 0.5 - - !type:AdjustTemperature - amount: 500 - - !type:Ignite - type: CP14ActionRequiredMusicTool - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneHellBallade + - type: DoAfterArgs + hidden: true + repeat: true + delay: 1 - type: CP14ActionDangerous - type: Action + useDelay: 15 icon: sprite: _CP14/Actions/Spells/fire.rsi state: fire_music - type: InstantAction - event: !type:CP14ToggleableInstantActionEvent - effectFrequency: 1 - cooldown: 15 - castTime: 120 - hidden: true - breakOnDamage: false + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellArea + range: 3 + maxTargets: 4 + whitelist: + components: + - MobState + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectHellBallade + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Jitter + - !type:FlammableReaction + multiplier: 0.5 + - !type:AdjustTemperature + amount: 500 + - !type:Ignite - type: entity id: CP14ImpactEffectHellBallade diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/tiefling_inner_fire.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/tiefling_inner_fire.yml index d583124c33..c787fabc4f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/tiefling_inner_fire.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/tiefling_inner_fire.yml @@ -4,35 +4,35 @@ name: Inner fire description: You unleash your inner fire, setting yourself on fire and temporarily speeding up your movement. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneTieflingRevenge - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectTieflingRevenge - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - - !type:FlammableReaction - multiplier: 1.5 - - !type:AdjustTemperature - amount: 6000 - - !type:Ignite - - !type:MovespeedModifier - walkSpeedModifier: 1.2 - sprintSpeedModifier: 1.2 - statusLifetime: 5 + - type: DoAfterArgs + delay: 1 - type: Action + useDelay: 10 icon: sprite: _CP14/Actions/Spells/fire.rsi state: tiefling_revenge - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 10 - breakOnMove: false + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectTieflingRevenge + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Jitter + - !type:FlammableReaction + multiplier: 1.5 + - !type:AdjustTemperature + amount: 6000 + - !type:Ignite + - !type:MovespeedModifier + walkSpeedModifier: 1.2 + sprintSpeedModifier: 1.2 + statusLifetime: 5 - type: entity id: CP14ImpactEffectTieflingRevenge diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/air_saturation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/air_saturation.yml index f28c7f83e6..b27e30e557 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/air_saturation.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/air_saturation.yml @@ -4,25 +4,18 @@ name: Air saturation description: You surround the target with fresh air, healing suffocation. This can sustain the dying. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.4 - type: CP14ActionManaCost manaCost: 5 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectAirSaturation - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - damage: - types: - Asphyxiation: -5 - - !type:Jitter - - type: CP14MagicEffectCastingVisual + - type: DoAfterArgs + repeat: true + delay: 1 + breakOnMove: true + - type: CP14ActionDoAfterVisuals proto: CP14RuneAirSaturation - type: Action + useDelay: 2 icon: sprite: _CP14/Actions/Spells/healing.rsi state: air_saturation @@ -30,10 +23,18 @@ range: 2 interactOnMiss: false - type: EntityTargetAction - event: !type:CP14ToggleableEntityTargetActionEvent - cooldown: 2 - castTime: 10 - breakOnMove: true + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectAirSaturation + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + damage: + types: + Asphyxiation: -5 + - !type:Jitter # Effects diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_heat.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_heat.yml index 61c5d427f5..c660bf1917 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_heat.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_heat.yml @@ -4,40 +4,23 @@ name: Cure burn description: You heal skin damage caused by excessive cooling or heating. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 12 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectCureBurn - effects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectCureBurn - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - damage: - types: - Cold: -10 - Heat: -10 - Shock: -10 - - !type:Jitter - type: CP14ActionTargetMobStatusRequired - type: CP14ActionSpeaking startSpeech: "Pellis dolorem..." endSpeech: "non novit" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneCureBurn - type: Action + useDelay: 5 icon: sprite: _CP14/Actions/Spells/healing.rsi state: cure_burn + - type: DoAfterArgs + delay: 1.5 - type: TargetAction range: 7 interactOnMiss: false @@ -45,10 +28,24 @@ whitelist: components: - MobState - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 5 - castDelay: 1.5 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectCureBurn + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectCureBurn + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + damage: + types: + Cold: -10 + Heat: -10 + Shock: -10 + - !type:Jitter - type: entity id: CP14RuneCureBurn diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_poison.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_poison.yml index d87c6459d7..2d59dc6256 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_poison.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_poison.yml @@ -4,56 +4,50 @@ name: Blood purification description: You cleanse the target's blood of poisons and acids, and restore its volume slightly components: - - type: Sprite - sprite: _CP14/Actions/Spells/healing.rsi - state: cure_poison - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 12 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectBloodPurification - effects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectBloodPurification - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - damage: - types: - Poison: -10 - Bloodloss: -10 - Caustic: -10 - - !type:Jitter - - !type:ModifyBloodLevel - amount: 25 - type: CP14ActionSpeaking startSpeech: "Nella coda..." endSpeech: "sta il veleno" - type: CP14ActionTargetMobStatusRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneBloodPurification - type: Action + useDelay: 5 icon: sprite: _CP14/Actions/Spells/healing.rsi state: cure_poison - type: TargetAction range: 7 interactOnMiss: false + - type: DoAfterArgs + delay: 1.5 - type: EntityTargetAction whitelist: components: - MobState - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 5 - castDelay: 1.5 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBloodPurification + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBloodPurification + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + damage: + types: + Poison: -10 + Bloodloss: -10 + Caustic: -10 + - !type:Jitter + - !type:ModifyBloodLevel + amount: 25 - type: entity id: CP14RuneBloodPurification diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_wounds.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_wounds.yml index 224d974c8f..b7f30cd05b 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_wounds.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_wounds.yml @@ -4,42 +4,20 @@ name: Cure wounds description: You heal the target from physical damage components: - - type: Sprite - sprite: _CP14/Actions/Spells/healing.rsi - state: cure_wounds - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 12 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectCureWounds - effects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectCureWounds - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - damage: - types: - Slash: -10 - Blunt: -10 - Piercing: -10 - - !type:Jitter - - !type:ModifyBleedAmount - amount: -5 + - type: DoAfterArgs + delay: 1.5 - type: CP14ActionSpeaking startSpeech: "Et curabuntur..." endSpeech: "vulnera tua" - type: CP14ActionTargetMobStatusRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneCureWounds - type: Action + useDelay: 5 icon: sprite: _CP14/Actions/Spells/healing.rsi state: cure_wounds @@ -50,10 +28,26 @@ whitelist: components: - MobState - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 5 - castDelay: 1.5 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectCureWounds + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectCureWounds + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + damage: + types: + Slash: -10 + Blunt: -10 + Piercing: -10 + - !type:Jitter + - !type:ModifyBleedAmount + amount: -5 - type: entity id: CP14RuneCureWounds diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml index eb92a65b9a..0e96157005 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml @@ -4,28 +4,25 @@ name: Magical acceleration description: At the cost of magic energy, you significantly accelerate your movement speed components: - - type: Sprite - sprite: _CP14/Actions/Spells/misc.rsi - state: magical_acceleration - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 1.3 - type: CP14ActionManaCost manaCost: 3 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14MagicAccelerationDustEffect + - type: DoAfterArgs + hidden: true + repeat: true + delay: 0.25 - type: Action + useDelay: 2 icon: sprite: _CP14/Actions/Spells/misc.rsi state: magical_acceleration - type: InstantAction - event: !type:CP14ToggleableInstantActionEvent - effectFrequency: 0.2 - cooldown: 2 - castTime: 10 - hidden: true + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14MagicAccelerationDustEffect - type: entity id: CP14MagicAccelerationDustEffect diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/peace_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/peace_ballade.yml index 36704aa8d3..f000f030b8 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/peace_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/peace_ballade.yml @@ -4,46 +4,43 @@ 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 + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.8 - type: CP14ActionManaCost manaCost: 2 - - type: CP14MagicEffect - effects: - - !type:CP14SpellArea - range: 4 - maxTargets: 8 - affectCaster: true - whitelist: - components: - - MobState - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectPeaceBallade - - !type:CP14SpellApplyEntityEffect - effects: - - !type:GenericStatusEffect - key: Pacified - component: Pacified - type: Add - time: 1.8 + - type: DoAfterArgs + hidden: true + repeat: true + delay: 1 - type: CP14ActionRequiredMusicTool - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RunePeaceBallade - type: Action + sound: null icon: sprite: _CP14/Actions/Spells/healing.rsi state: peace_music - type: InstantAction - event: !type:CP14ToggleableInstantActionEvent - effectFrequency: 1 - cooldown: 15 - castTime: 120 - hidden: true + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellArea + range: 4 + maxTargets: 8 + affectCaster: true + whitelist: + components: + - MobState + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectPeaceBallade + - !type:CP14SpellApplyEntityEffect + effects: + - !type:GenericStatusEffect + key: Pacified + component: Pacified + type: Add + time: 1.8 - type: entity id: CP14ImpactEffectPeaceBallade diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/plant_growth.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/plant_growth.yml deleted file mode 100644 index b90b53485a..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/plant_growth.yml +++ /dev/null @@ -1,113 +0,0 @@ -- type: entity - id: CP14ActionSpellPlantGrowth - parent: CP14ActionSpellBase - name: Plant growth - description: You restore health and internal resources to the selected plant. - components: - - type: CP14MagicEffectCastSlowdown - speedMultiplier: 0.8 - - type: CP14ActionManaCost - manaCost: 5 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectCureWounds - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - damage: - types: - Asphyxiation: -1 - Bloodloss: -1 - Blunt: -1 - Cellular: -0.1 - Caustic: -1 - Cold: -1 - Heat: -1 - Piercing: -1 - Poison: -1 - Radiation: -1 - Shock: -1 - Slash: -1 - - !type:SatiateThirst - factor: 3 - - !type:SatiateHunger - factor: 3 - conditions: - - !type:OrganType - type: CP14Vampire - shouldHave: false - - !type:CP14PlantResourceModify - energy: 3 - resourse: 3 - - !type:Jitter - - type: CP14ActionSpeaking - startSpeech: "Plantae durant..." - - type: CP14MagicEffectCastingVisual - proto: CP14RunePlantGrowth - - type: Action - icon: - sprite: _CP14/Actions/Spells/healing.rsi - state: plant_growth - - type: TargetAction - range: 2 - interactOnMiss: false - - type: EntityTargetAction - whitelist: - components: - - CP14Plant - - CP14MagicEnergyPhotosynthesis - event: !type:CP14ToggleableEntityTargetActionEvent - cooldown: 2 - castTime: 10 - breakOnMove: true - -- type: entity - parent: CP14ActionSpellPlantGrowth - id: CP14ActionSpellPlantGrowthSilva - name: Blessing of silvas - components: - - type: CP14ActionManaCost - manaCost: 3 - -# Scrolls - -- type: entity - parent: CP14BaseSpellScrollHealing - id: CP14SpellScrollPlantGrowth - name: plant growth spell scroll - components: - - type: CP14SpellStorage - spells: - - CP14ActionSpellPlantGrowth - -# Effects - -- type: entity - id: CP14ImpactEffectPlantGrowth - parent: CP14BaseMagicImpact - categories: [ HideSpawnMenu ] - save: false - components: - - type: Sprite - layers: - - state: wave_up - color: "#5096d4" - shader: unshaded - -- type: entity - id: CP14RunePlantGrowth - parent: CP14BaseMagicRune - categories: [ HideSpawnMenu ] - save: false - components: - - type: PointLight - color: "#328643" - - type: Sprite - layers: - - state: medium_circle - color: "#79b330" - shader: unshaded - diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml index e3fecf1e1f..18c8671517 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml @@ -4,41 +4,17 @@ name: Resurrection description: You're trying to put the soul back into the body. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.2 - type: CP14ActionManaCost manaCost: 100 - type: CP14ActionTargetMobStatusRequired allowedStates: - Dead - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectResurrection - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectResurrection - - !type:CP14SpellResurrectionEffect - - !type:CP14SpellApplyEntityEffect - effects: - - !type:ChemVomit - probability: 0.25 - - !type:Emote - showInChat: false - emote: Cough - probability: 0.3 - - !type:HealthChange - damage: - types: - Asphyxiation: -500 - Bloodloss: -100 - - !type:Jitter - type: CP14ActionSpeaking startSpeech: "Redi animam meam..." endSpeech: "Eu rezei por ti" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneResurrection - type: Action icon: @@ -47,15 +23,38 @@ - type: TargetAction range: 7 interactOnMiss: false + - type: DoAfterArgs + delay: 5 + breakOnMove: true - type: EntityTargetAction canTargetSelf: false whitelist: components: - MobState - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 300 - castDelay: 10 - breakOnMove: true + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectResurrection + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectResurrection + - !type:CP14SpellResurrectionEffect + - !type:CP14SpellApplyEntityEffect + effects: + - !type:ChemVomit + probability: 0.25 + - !type:Emote + showInChat: false + emote: Cough + probability: 0.3 + - !type:HealthChange + damage: + types: + Asphyxiation: -500 + Bloodloss: -100 + - !type:Jitter - type: entity id: CP14RuneResurrection diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/sheep_polymorph.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/sheep_polymorph.yml index afc7abcfda..2ff24f1b87 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/sheep_polymorph.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/sheep_polymorph.yml @@ -7,44 +7,43 @@ - type: Sprite sprite: _CP14/Actions/Spells/misc.rsi state: polymorph - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 30 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectSheepPolymorph - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectSheepPolymorph - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Polymorph - prototype: CP14Sheep - type: CP14ActionSpeaking startSpeech: "Pascam et custodiam..." endSpeech: "pecora tua" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneSheepPolymorph - type: CP14ActionTargetMobStatusRequired - type: Action + useDelay: 30 icon: sprite: _CP14/Actions/Spells/misc.rsi state: polymorph - type: TargetAction range: 3 interactOnMiss: false + - type: DoAfterArgs + delay: 1.5 - type: EntityTargetAction whitelist: components: - MobState - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 30 - castDelay: 1.5 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectSheepPolymorph + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectSheepPolymorph + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Polymorph + prototype: CP14Sheep - type: entity id: CP14RuneSheepPolymorph diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/flash_light.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/flash_light.yml index c584b32c40..6546dfcfdf 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/flash_light.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/flash_light.yml @@ -4,36 +4,32 @@ name: Flash Light description: Creates a flash of bright, blinding light. components: - - type: Sprite - sprite: _CP14/Actions/Spells/light.rsi - state: flash_light - type: CP14ActionManaCost manaCost: 10 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectFlashLight - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14SpawnEffectFlashLight - type: CP14ActionSpeaking startSpeech: "Lux clara..." endSpeech: "excaecant inimicos meos" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneFlashLight + - type: DoAfterArgs + delay: 0.5 - type: Action + useDelay: 6 icon: sprite: _CP14/Actions/Spells/light.rsi state: flash_light - type: TargetAction range: 10 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 5 - castDelay: 0.5 - breakOnMove: false + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectFlashLight + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14SpawnEffectFlashLight - type: entity id: CP14RuneFlashLight diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/search_of_life.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/search_of_life.yml index 3bffd14fdb..09a743114d 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/search_of_life.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/search_of_life.yml @@ -4,33 +4,30 @@ name: Search of life description: Detects all living things in a large radius around you. components: - - type: Sprite - sprite: _CP14/Actions/Spells/light.rsi - state: search_of_life - type: CP14ActionManaCost manaCost: 30 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectSearchOfLife - - !type:CP14SpellPointerToAlive - pointerEntity: CP14SearchOfLifePointer - searchRange: 30 - type: CP14ActionSpeaking startSpeech: "Ego vultus..." endSpeech: "parumper vita" - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneSearchOfLife + - type: DoAfterArgs + delay: 1.5 - type: Action + useDelay: 30 icon: sprite: _CP14/Actions/Spells/light.rsi state: search_of_life - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 30 - castDelay: 1.5 + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectSearchOfLife + - !type:CP14SpellPointerToAlive + pointerEntity: CP14SearchOfLifePointer + searchRange: 30 - type: entity id: CP14ImpactEffectSearchOfLife diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/sphere_of_light.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/sphere_of_light.yml index 859f6ebcd6..8e292418cf 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/sphere_of_light.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/sphere_of_light.yml @@ -4,29 +4,21 @@ name: Sphere of Light description: Materialization of a bright and safe light source. components: - - type: Sprite - sprite: _CP14/Actions/Spells/light.rsi - state: sphere_of_light - type: CP14ActionManaCost manaCost: 10 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectSphereOfLight - - !type:CP14SpellApplyStatusEffect - statusEffect: CP14StatusEffectGlowing - duration: 120 - type: CP14ActionSpeaking startSpeech: "Appare in manu tua..." endSpeech: "sphaera lucis" - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneSphereOfLight - type: Action + useDelay: 30 icon: sprite: _CP14/Actions/Spells/light.rsi state: sphere_of_light + - type: DoAfterArgs + delay: 0.5 - type: TargetAction range: 5 - type: EntityTargetAction @@ -35,10 +27,14 @@ - MobState - Item - Anchorable - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 30 - castDelay: 0.5 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectSphereOfLight + - !type:CP14SpellApplyStatusEffect + statusEffect: CP14StatusEffectGlowing + duration: 120 - type: entity id: CP14RuneSphereOfLight diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Fear.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Fear.yml index 89b8473a62..2507bb6af8 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Fear.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Fear.yml @@ -4,51 +4,47 @@ name: Primal terror description: You plunge the target into primal terror, robbing them of the ability to fight and speak. components: - - type: Sprite - sprite: _CP14/Actions/Spells/lurker.rsi - state: fear - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.4 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnUser - spawns: - - CP14RuneLurkerFearImpact - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectLurkerFear - - !type:CP14SpellRevealStealthUser - - !type:CP14SpellApplyEntityEffect - effects: - - !type:MovespeedModifier - walkSpeedModifier: 0.2 - sprintSpeedModifier: 0.2 - statusLifetime: 2 - - !type:Jitter - - !type:GenericStatusEffect - key: Pacified - component: Pacified - type: Add - time: 2 - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneLurkerFear - type: Action + useDelay: 30 icon: sprite: _CP14/Actions/Spells/lurker.rsi state: fear - type: TargetAction range: 15 interactOnMiss: false + - type: DoAfterArgs + delay: 1.5 + hidden: true - type: EntityTargetAction canTargetSelf: false whitelist: components: - MobState - event: !type:CP14ToggleableEntityTargetActionEvent - cooldown: 30 - castTime: 30 - breakOnMove: false - hidden: true + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnUser + spawns: + - CP14RuneLurkerFearImpact + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectLurkerFear + - !type:CP14SpellRevealStealthUser + - !type:CP14SpellApplyEntityEffect + effects: + - !type:MovespeedModifier + walkSpeedModifier: 0.2 + sprintSpeedModifier: 0.2 + statusLifetime: 2 + - !type:Jitter + - !type:GenericStatusEffect + key: Pacified + component: Pacified + type: Add + time: 2 - type: entity id: CP14ImpactEffectLurkerFear diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Kick.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Kick.yml index fb1d746399..8c64c2edfe 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Kick.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Kick.yml @@ -4,40 +4,18 @@ name: Crushing attack description: You prepare a powerful melee strike that will knock your target back with force and stun them for a long time. components: - - type: Sprite - sprite: _CP14/Actions/Spells/lurker.rsi - state: kick - type: CP14ActionStaminaCost stamina: 20 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellRevealStealthUser - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14LurkerRitualSound - effects: - - !type:CP14SpellRevealStealthUser - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Paralyze - paralyzeTime: 15 - - !type:CP14SpellThrowFromUser - throwPower: 4 - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14DustEffectKickSound - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - ignoreResistances: false - damage: - types: - Blunt: 10 - - type: CP14MagicEffectEmoting + - type: DoAfterArgs + delay: 2.5 + distanceThreshold: 1.5 + breakOnDamage: true + - type: CP14ActionEmoting startEmote: cp14-kick-lurker-start endEmote: cp14-kick-lurker - type: CP14ActionDangerous - type: Action + useDelay: 20 icon: sprite: _CP14/Actions/Spells/lurker.rsi state: kick @@ -45,10 +23,27 @@ range: 2 - type: EntityTargetAction canTargetSelf: false - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 20 - castDelay: 2.5 - distanceThreshold: 1.5 - breakOnMove: false - breakOnDamage: true - + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellRevealStealthUser + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14LurkerRitualSound + effects: + - !type:CP14SpellRevealStealthUser + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Paralyze + paralyzeTime: 15 + - !type:CP14SpellThrowFromUser + throwPower: 4 + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14DustEffectKickSound + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + ignoreResistances: false + damage: + types: + Blunt: 10 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Step.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Step.yml index aeddd2cf8a..7eca6e7022 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Step.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Step.yml @@ -4,23 +4,13 @@ name: Shadow step description: A step through the gash of reality that allows you to cover a small of distance quickly. components: - - type: Sprite - sprite: _CP14/Actions/Spells/lurker.rsi - state: step - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectLurkerStep - effects: - - !type:CP14SpellCasterTeleport - needVision: false - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14LurkerRitualSound - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneLurkerFear + - type: DoAfterArgs + delay: 1.0 + hidden: true - type: Action + useDelay: 30 icon: sprite: _CP14/Actions/Spells/lurker.rsi state: step @@ -28,10 +18,17 @@ checkCanAccess: false range: 10 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 30 - hidden: true - breakOnMove: false + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectLurkerStep + effects: + - !type:CP14SpellCasterTeleport + needVision: false + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14LurkerRitualSound - type: entity id: CP14ImpactEffectLurkerStep diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_armor.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_armor.yml index 26340e40ee..fb17c56872 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_armor.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_armor.yml @@ -4,21 +4,16 @@ name: Magic Armor description: You surround the target with a short-lived magical barrier that absorbs some of the damage it receives. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 15 - - type: CP14MagicEffectCastingVisual + - type: DoAfterArgs + delay: 1.0 + - type: CP14ActionDoAfterVisuals proto: CP14RuneManaTrance - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaGift - - !type:CP14SpellApplyStatusEffect - statusEffect: CP14StatusEffectMagicArmor - duration: 20 - type: Action + useDelay: 10 icon: sprite: _CP14/Actions/Spells/meta.rsi state: magic_armor @@ -30,7 +25,11 @@ - MobState - Item - Anchorable - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 10 - castDelay: 1.0 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaGift + - !type:CP14SpellApplyStatusEffect + statusEffect: CP14StatusEffectMagicArmor + duration: 20 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_ballade.yml index 18c6b4206d..930dad8f5d 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_ballade.yml @@ -4,46 +4,42 @@ name: Magic ballade description: With your music, you infuse the objects around you with mana components: - - type: Sprite - sprite: _CP14/Actions/Spells/meta.rsi - state: magic_music - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.8 - type: CP14ActionManaCost manaCost: 5 canModifyManacost: false - - type: CP14MagicEffect - effects: - - !type:CP14SpellArea - range: 5 - maxTargets: 5 - whitelist: - components: - - CP14MagicEnergyContainer - - CP14MagicEnergyCrystalSlot - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectMagicBallade - - !type:CP14SpellApplyEntityEffect - effects: - - !type:CP14ManaChange - manaDelta: 1.2 - safe: true + - type: DoAfterArgs + hidden: true + repeat: true + delay: 1 - type: CP14ActionRequiredMusicTool - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneMagicBallade - type: Action + useDelay: 15 icon: sprite: _CP14/Actions/Spells/meta.rsi state: magic_music - type: InstantAction - event: !type:CP14ToggleableInstantActionEvent - effectFrequency: 1 - cooldown: 15 - castTime: 120 - hidden: true - breakOnDamage: false + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellArea + range: 5 + maxTargets: 5 + whitelist: + components: + - CP14MagicEnergyContainer + - CP14MagicEnergyCrystalSlot + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectMagicBallade + - !type:CP14SpellApplyEntityEffect + effects: + - !type:CP14ManaChange + manaDelta: 1.2 + safe: true - type: entity id: CP14ImpactEffectMagicBallade diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_consume.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_consume.yml index 1d66c2ff33..19452be1e9 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_consume.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_consume.yml @@ -4,36 +4,33 @@ name: Mana consume description: You absorb a small amount of mana from the target. components: - - type: Sprite - sprite: _CP14/Actions/Spells/meta.rsi - state: mana_consume - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaConsume - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaConsume - - !type:CP14SpellConsumeManaEffect - mana: 10 - - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneManaConsume - type: Action + useDelay: 5 icon: sprite: _CP14/Actions/Spells/meta.rsi state: mana_consume + - type: DoAfterArgs + repeat: true + breakOnMove: true + delay: 1 - type: TargetAction - type: EntityTargetAction whitelist: components: - CP14MagicEnergyContainer - event: !type:CP14ToggleableEntityTargetActionEvent - cooldown: 5 - castTime: 10 - breakOnMove: true + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaConsume + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaConsume + - !type:CP14SpellConsumeManaEffect + mana: 10 - type: entity id: CP14ActionSpellManaConsumeElf @@ -41,14 +38,15 @@ name: Carefull mana consume description: You absorb mana at a tremendous rate without dealing damage to the mana holder. components: - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaConsume - - !type:CP14SpellConsumeManaEffect - safe: true - mana: 20 + - type: EntityTargetAction + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaConsume + - !type:CP14SpellConsumeManaEffect + safe: true + mana: 20 - type: entity id: CP14RuneManaConsume diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_gift.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_gift.yml index 387dda27a9..0c1a8e9af1 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_gift.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_gift.yml @@ -4,30 +4,17 @@ name: Mana transfer description: You can transfer a small amount of your magical energy to a target entity or magical object. components: - - type: Sprite - sprite: _CP14/Actions/Spells/meta.rsi - state: mana_gift - type: CP14ActionManaCost manaCost: 10 canModifyManacost: false - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaGift - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaGift - - !type:CP14SpellApplyEntityEffect - effects: - - !type:CP14ManaChange - manaDelta: 10 - safe: false - - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: DoAfterArgs + repeat: true + breakOnMove: true + delay: 1 + - type: CP14ActionDoAfterVisuals proto: CP14RuneManaGift - type: Action + useDelay: 2 icon: sprite: _CP14/Actions/Spells/meta.rsi state: mana_gift @@ -39,10 +26,20 @@ - CP14MagicEnergyContainer - CP14MagicEnergyCrystalSlot canTargetSelf: true - event: !type:CP14ToggleableEntityTargetActionEvent - cooldown: 2 - castTime: 10 - breakOnMove: true + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaGift + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaGift + - !type:CP14SpellApplyEntityEffect + effects: + - !type:CP14ManaChange + manaDelta: 10 + safe: false - type: entity id: CP14ActionSpellManaGiftElf @@ -52,16 +49,17 @@ components: - type: CP14ActionManaCost manaCost: 20 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaGift - - !type:CP14SpellApplyEntityEffect + - type: EntityTargetAction + event: !type:CP14EntityTargetModularEffectEvent effects: - - !type:CP14ManaChange - manaDelta: 20 - safe: true + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaGift + - !type:CP14SpellApplyEntityEffect + effects: + - !type:CP14ManaChange + manaDelta: 20 + safe: true - type: entity id: CP14RuneManaGift diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting.yml index 6a9b5d7ace..7edc38c2c6 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting.yml @@ -4,27 +4,18 @@ name: Magic splitting description: You destroy the very essence of magic, interrupting spell casts, destroying mana and more. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.7 - type: CP14ActionManaCost manaCost: 10 - - type: CP14MagicEffect - effects: - - !type:CP14SpellMixSolution - reactionTypes: - - CP14MagicSplitting - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectMagicSplitting - - !type:CP14SpellInterruptSpell - - !type:CP14SpellApplyEntityEffect - effects: - - !type:CP14ManaChange - manaDelta: -5 - safe: false - - type: CP14MagicEffectCastingVisual + - type: DoAfterArgs + delay: 1 + repeat: true + breakOnMove: true + - type: CP14ActionDoAfterVisuals proto: CP14RuneMagicSplitting - type: Action + useDelay: 15 icon: sprite: _CP14/Actions/Spells/meta.rsi state: counter_spell @@ -35,11 +26,19 @@ components: - CP14MagicEnergyContainer - ExaminableSolution - event: !type:CP14ToggleableEntityTargetActionEvent - cooldown: 15 - castTime: 15 - distanceThreshold: 5 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellMixSolution + reactionTypes: + - CP14MagicSplitting + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectMagicSplitting + - !type:CP14SpellApplyEntityEffect + effects: + - !type:CP14ManaChange + manaDelta: -5 + safe: false - type: entity id: CP14RuneMagicSplitting diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting_small.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting_small.yml index 253da1470a..2f909ceac5 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting_small.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting_small.yml @@ -4,31 +4,19 @@ name: Small magic splitting description: You destroy the very essence of magic, interrupting spell casts, destroying mana and more. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.7 - type: CP14ActionManaCost manaCost: 10 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectMagicSplitting - effects: - - !type:CP14SpellMixSolution - reactionTypes: - - CP14MagicSplitting - - !type:CP14SpellInterruptSpell - - !type:CP14SpellApplyEntityEffect - effects: - - !type:CP14ManaChange - manaDelta: -15 - safe: false - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneMagicSplitting - type: Action + useDelay: 10 icon: sprite: _CP14/Actions/Spells/meta.rsi state: counter_spell_small + - type: DoAfterArgs + delay: 1 - type: TargetAction range: 5 - type: EntityTargetAction @@ -36,7 +24,17 @@ components: - CP14MagicEnergyContainer - ExaminableSolution - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 10 - castDelay: 0.5 - breakOnMove: false \ No newline at end of file + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectMagicSplitting + effects: + - !type:CP14SpellMixSolution + reactionTypes: + - CP14MagicSplitting + - !type:CP14SpellApplyEntityEffect + effects: + - !type:CP14ManaChange + manaDelta: -5 + safe: false \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_trance.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_trance.yml index f7acdbe514..83af665187 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_trance.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_trance.yml @@ -4,37 +4,34 @@ name: Mana trance description: You go into a trance for a while, restoring mana. components: - - type: Sprite - sprite: _CP14/Actions/Spells/meta.rsi - state: mana_trance - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.05 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaGift - - !type:CP14SpellApplyEntityEffect - effects: - - !type:CP14ManaChange - manaDelta: 2 - safe: true - - !type:HealthChange - damage: - types: - CP14ManaDepletion: -0.1 - - type: CP14MagicEffectCastingVisual + - type: DoAfterArgs + repeat: true + delay: 1 + hidden: true + - type: CP14ActionDoAfterVisuals proto: CP14RuneManaTrance - type: Action + useDelay: 60 icon: sprite: _CP14/Actions/Spells/meta.rsi state: mana_trance - type: InstantAction - event: !type:CP14ToggleableInstantActionEvent - cooldown: 60 - castTime: 120 - hidden: true - breakOnMove: false + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaGift + - !type:CP14SpellApplyEntityEffect + effects: + - !type:CP14ManaChange + manaDelta: 2 + safe: true + - !type:HealthChange + damage: + types: + CP14ManaDepletion: -0.1 - type: entity id: CP14RuneManaTrance diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Misc/MOB_vuln_spikes.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Misc/MOB_vuln_spikes.yml index 0161f3626c..4a2bdd7839 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Misc/MOB_vuln_spikes.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Misc/MOB_vuln_spikes.yml @@ -4,16 +4,12 @@ name: Weakness Spikes description: You throw out several small spikes that cause weakness. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.8 - - type: CP14MagicEffect - effects: - - !type:CP14SpellProjectile - prototype: CP14SpikeVuln - spread: 1.5 - projectileSpeed: 10 - projectileCount: 10 - - type: CP14MagicEffectCastingVisual + - type: DoAfterArgs + delay: 1 + hidden: true + - type: CP14ActionDoAfterVisuals proto: CP14RuneVulnSpikes - type: CP14ActionDangerous - type: Action @@ -27,12 +23,13 @@ checkCanAccess: false range: 60 - type: EntityTargetAction - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 7.5 - castDelay: 1.0 - breakOnDamage: false - breakOnMove: false - hidden: true + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellProjectile + prototype: CP14SpikeVuln + spread: 1.5 + projectileSpeed: 10 + projectileCount: 10 - type: entity id: CP14RuneVulnSpikes diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Skeleton/bone_hound.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Skeleton/bone_hound.yml index a0cd1b7606..42dacf6aef 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Skeleton/bone_hound.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Skeleton/bone_hound.yml @@ -4,22 +4,10 @@ name: Call of the Bone hound description: The spell creates a bloodthirsty bone hound from bones. With luck, it may even gain a mind as cunning as your own. components: - - type: Sprite - sprite: _CP14/Actions/Spells/skeleton.rsi - state: bone_hound - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 50 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectCallBoneHound - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14MobMonsterBoneHound - type: CP14ActionMaterialCost requirement: !type:StackResource stack: CP14Bone @@ -27,9 +15,12 @@ - type: CP14ActionSpeaking startSpeech: "Ossa mortuorum..." endSpeech: "incipiunt mihi quasi canis canis servire" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneCallBoneHound + - type: DoAfterArgs + delay: 5 - type: Action + useDelay: 20 icon: sprite: _CP14/Actions/Spells/skeleton.rsi state: bone_hound @@ -38,8 +29,15 @@ - type: TargetAction range: 10 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 20 + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectCallBoneHound + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14MobMonsterBoneHound - type: entity id: CP14RuneCallBoneHound diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Slime/jump.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Slime/jump.yml index c12b3b591d..7a2f68dc00 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Slime/jump.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Slime/jump.yml @@ -3,15 +3,11 @@ name: Slime jump description: Jump! JUMP! components: - - type: Sprite - sprite: _CP14/Actions/Spells/slime.rsi - state: jump - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.1 - - type: CP14MagicEffect - effects: - - !type:CP14SpellThrowUserTo - throwPower: 8 + - type: DoAfterArgs + delay: 1 + hidden: true - type: Action itemIconStyle: BigAction useDelay: 8 @@ -22,8 +18,7 @@ checkCanAccess: false range: 10 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - hidden: true - breakOnMove: false - breakOnDamage: false - castDelay: 1 + event: !type:CP14WorldTargetModularEffectEvent + effects: + - !type:CP14SpellThrowUserTo + throwPower: 8 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/bite.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/bite.yml index 7a07a84869..4551910788 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/bite.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/bite.yml @@ -4,36 +4,18 @@ name: Vampire bite description: You suck the blood and very essence of life from your victim. (The amount of essence in each player is limited) components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.3 - type: CP14MagicEffectVampire - type: CP14ActionSSDBlock - type: CP14ActionTargetMobStatusRequired allowedStates: - Alive - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectVampireBite - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - effects: - - !type:CP14SpellSuckBlood - suckAmount: 5 - - !type:CP14SpellVampireGatherEssence - - !type:CP14SpellSpawnEntityOnUser - clientside: true - spawns: - - CP14ImpactEffectBloodEssence - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - - !type:ModifyBloodLevel - amount: -3 + - type: DoAfterArgs + delay: 2 + hidden: true - type: Action + useDelay: 0.5 icon: sprite: _CP14/Actions/Spells/vampire.rsi state: bite @@ -50,9 +32,26 @@ components: - MobState - Bloodstream - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 0.5 - castDelay: 2 + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectVampireBite + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Jitter + effects: + - !type:CP14SpellSuckBlood + suckAmount: 5 + - !type:CP14SpellVampireGatherEssence + - !type:CP14SpellSpawnEntityOnUser + spawns: + - CP14ImpactEffectBloodEssence + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Jitter + - !type:ModifyBloodLevel + amount: -3 - type: entity id: CP14ImpactEffectVampireBite diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/blood_step.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/blood_step.yml index 34d9359560..9b3bff9fb5 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/blood_step.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/blood_step.yml @@ -4,23 +4,18 @@ name: Blood step description: A step through the gash of reality that allows you to cover a small of distance quickly components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.4 - type: CP14MagicEffectVampire - type: CP14ActionManaCost manaCost: 30 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectBloodStep - effects: - - !type:CP14SpellCasterTeleport - needVision: true - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14ImpactEffectBloodStep + - type: DoAfterArgs + delay: 0.5 + hidden: true - type: Action + useDelay: 10 icon: sprite: _CP14/Actions/Spells/vampire.rsi state: blood_step @@ -28,11 +23,14 @@ checkCanAccess: true range: 10 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 10 - hidden: true - castDelay: 0.5 - breakOnMove: false + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBloodStep + effects: + - !type:CP14SpellCasterTeleport + needVision: true - type: entity id: CP14ImpactEffectBloodStep diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/cure_wounds.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/cure_wounds.yml index 661329e23b..c0ffb86fc5 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/cure_wounds.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/cure_wounds.yml @@ -4,7 +4,7 @@ name: Cure blood description: You heal the target from any kind of damage. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 12 @@ -12,48 +12,45 @@ - type: CP14ActionSkillPointCost skillPoint: Blood count: 0.1 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectBloodEssence - effects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectBloodEssence - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - damage: - types: - Slash: -15 - Blunt: -15 - Piercing: -15 - Poison: -15 - Bloodloss: -15 - Caustic: -15 - Cold: -15 - Heat: -15 - Shock: -15 - - !type:Jitter - - !type:ModifyBleedAmount - amount: -25 - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneVampireHypnosis - type: Action + useDelay: 5 icon: sprite: _CP14/Actions/Spells/vampire.rsi state: wound_heal - type: TargetAction range: 7 interactOnMiss: false + - type: DoAfterArgs + delay: 1.5 - type: EntityTargetAction whitelist: components: - MobState - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 5 - castDelay: 1.5 - breakOnMove: false \ No newline at end of file + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBloodEssence + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBloodEssence + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + damage: + types: + Slash: -15 + Blunt: -15 + Piercing: -15 + Poison: -15 + Bloodloss: -15 + Caustic: -15 + Cold: -15 + Heat: -15 + Shock: -15 + - !type:Jitter + - !type:ModifyBleedAmount + amount: -25 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/essence_create.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/essence_create.yml index eea8385416..0ca81caa85 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/essence_create.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/essence_create.yml @@ -9,27 +9,25 @@ - type: CP14ActionSkillPointCost skillPoint: Blood count: 1 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Jitter - effects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectBloodEssence - - !type:CP14SpellSpawnInHandEntity - spawns: - - CP14BloodEssence + - type: DoAfterArgs + delay: 2.5 - type: Action + useDelay: 1 icon: sprite: _CP14/Actions/Spells/vampire.rsi state: essence_create sound: !type:SoundPathSpecifier path: /Audio/_CP14/Effects/essence_consume.ogg - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 0.5 - castDelay: 2.5 - breakOnMove: false \ No newline at end of file + event: !type:CP14InstantModularEffectEvent + telegraphyEffects: + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Jitter + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBloodEssence + - !type:CP14SpellSpawnInHandEntity + spawns: + - CP14BloodEssence \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/hypnosys.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/hypnosys.yml index 96661bbc6b..1bcd6ffc3e 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/hypnosys.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/hypnosys.yml @@ -4,27 +4,17 @@ name: Hypnosys description: You focus on the target, mesmerizing and lulling it to sleep. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14MagicEffectVampire - type: CP14ActionManaCost manaCost: 5 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectVampireHypnosis - - !type:CP14SpellApplyEntityEffect - effects: - - !type:ModifyStatusEffect - effectProto: CP14StatusEffectVampireForceSleep - type: Add - time: 4 - refresh: true - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneVampireHypnosis + - type: DoAfterArgs + delay: 3 - type: Action + useDelay: 120 icon: sprite: _CP14/Actions/Spells/vampire.rsi state: blood_moon @@ -35,11 +25,18 @@ whitelist: components: - MobState - event: !type:CP14ToggleableEntityTargetActionEvent - effectFrequency: 3 - cooldown: 60 - castTime: 30 - distanceThreshold: 6 + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectVampireHypnosis + - !type:CP14SpellApplyEntityEffect + effects: + - !type:ModifyStatusEffect + effectProto: CP14StatusEffectVampireForceSleep + type: Add + time: 4 + refresh: true - type: entity id: CP14RuneVampireHypnosis diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/portal.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/portal.yml index 62da4932fc..62925f41c8 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/portal.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/portal.yml @@ -4,27 +4,26 @@ name: Teleport to the vampire lair description: You open a portal leading to the location of your clan's portal glyph. The portal will disappear in 30 seconds. If the glyph is not constructed, the portal will be chaotic, teleporting players in different directions. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.5 - type: CP14ActionManaCost manaCost: 30 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectBloodEssence - effects: - - !type:CP14SpellTeleportToVampireSingleton - - type: CP14ActionFreeHandsRequired + - type: DoAfterArgs + delay: 2 + breakOnMove: true + breakOnDamage: true - type: Action + useDelay: 60 icon: sprite: _CP14/Actions/Spells/vampire.rsi state: portal - type: TargetAction range: 3 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 60 - castDelay: 2 - breakOnMove: true - breakOnDamage: true \ No newline at end of file + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBloodEssence + effects: + - !type:CP14SpellTeleportToVampireSingleton \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_explosion.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_explosion.yml index b427d60704..5fa0cf574f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_explosion.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_explosion.yml @@ -4,53 +4,51 @@ name: Impulse description: By unleashing the power of your ancient vampire clan, you repel everyone and everything around you, stunning them for a long time. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.4 - type: CP14MagicEffectVampire - type: CP14ActionManaCost manaCost: 50 - type: CP14ActionDangerous - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnUser - spawns: - - CP14ImpactEffectVampireKick #TODO - - !type:CP14SpellArea - range: 2 - maxTargets: 16 - affectCaster: false - whitelist: - components: - - Body - - Item - - Anchorable - effects: - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Paralyze - paralyzeTime: 2 - - !type:CP14SpellThrowFromUser - throwPower: 15 - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectBloodStep - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - ignoreResistances: false - damage: - types: - Blunt: 10 - type: Action + useDelay: 60 icon: sprite: _CP14/Actions/Spells/vampire.rsi state: power_kick_3 sound: !type:SoundPathSpecifier path: /Audio/_CP14/Effects/essence_consume.ogg + - type: DoAfterArgs + delay: 1.5 - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 60 - castDelay: 1.5 - breakOnMove: false - breakOnDamage: false \ No newline at end of file + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnUser + spawns: + - CP14ImpactEffectVampireKick #TODO + - !type:CP14SpellArea + range: 2 + maxTargets: 16 + affectCaster: false + whitelist: + components: + - Body + - Item + - Anchorable + effects: + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Paralyze + paralyzeTime: 2 + - !type:CP14SpellThrowFromUser + throwPower: 15 + - !type:CP14SpellSpawnEntityOnTarget + clientside: true + spawns: + - CP14ImpactEffectBloodStep + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + ignoreResistances: false + damage: + types: + Blunt: 10 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_punch.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_punch.yml index b3b51eece8..8064be1654 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_punch.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_punch.yml @@ -8,25 +8,8 @@ - type: CP14MagicEffectVampire - type: CP14ActionManaCost manaCost: 20 - - type: CP14MagicEffect - effects: - - !type:CP14SpellApplyEntityEffect - effects: - - !type:Paralyze - paralyzeTime: 3 - - !type:CP14SpellThrowFromUser - throwPower: 9 - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectVampireKick - - !type:CP14SpellApplyEntityEffect - effects: - - !type:HealthChange - ignoreResistances: false - damage: - types: - Blunt: 10 - type: Action + useDelay: 45 icon: sprite: _CP14/Actions/Spells/vampire.rsi state: power_kick @@ -36,13 +19,29 @@ range: 1 - type: EntityTargetAction canTargetSelf: false - event: !type:CP14EntityTargetActionEvent - cooldown: 45 whitelist: components: - Body - Item - Anchorable + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellApplyEntityEffect + effects: + - !type:Paralyze + paralyzeTime: 3 + - !type:CP14SpellThrowFromUser + throwPower: 9 + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectVampireKick + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + ignoreResistances: false + damage: + types: + Blunt: 10 - type: entity id: CP14ImpactEffectVampireKick diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/resurrection.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/resurrection.yml index fe44e42203..9210f79271 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/resurrection.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/resurrection.yml @@ -4,7 +4,7 @@ name: Resurrection description: You're trying to put the soul back into the body. components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.7 - type: CP14ActionManaCost manaCost: 50 @@ -15,38 +15,15 @@ - type: CP14ActionTargetMobStatusRequired allowedStates: - Dead - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectBloodEssenceInverse - effects: - - !type:CP14SpellSpawnEntityOnTarget - clientside: true - spawns: - - CP14ImpactEffectBloodEssence2 - - !type:CP14SpellResurrectionEffect - - !type:CP14SpellApplyEntityEffect - effects: - - !type:ChemVomit - probability: 0.25 - - !type:Emote - showInChat: false - emote: Cough - probability: 0.3 - - !type:HealthChange - damage: - types: - Asphyxiation: -500 - Bloodloss: -100 - - !type:Jitter - type: CP14ActionSpeaking startSpeech: "Redi animam meam..." endSpeech: "Eu rezei por ti" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneVampireResurrection + - type: DoAfterArgs + delay: 5 - type: Action + useDelay: 180 sound: !type:SoundPathSpecifier path: /Audio/_CP14/Effects/ritual_end.ogg icon: @@ -60,10 +37,30 @@ whitelist: components: - MobState - event: !type:CP14DelayedEntityTargetActionEvent - cooldown: 180 - castDelay: 16 - breakOnMove: true + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBloodEssenceInverse + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBloodEssence2 + - !type:CP14SpellResurrectionEffect + - !type:CP14SpellApplyEntityEffect + effects: + - !type:ChemVomit + probability: 0.25 + - !type:Emote + showInChat: false + emote: Cough + probability: 0.3 + - !type:HealthChange + damage: + types: + Asphyxiation: -500 + Bloodloss: -100 + - !type:Jitter - type: entity id: CP14RuneVampireResurrection diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/search_vampire.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/search_vampire.yml index c14d4a8caf..8224479c91 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/search_vampire.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/search_vampire.yml @@ -6,24 +6,24 @@ components: - type: CP14ActionManaCost manaCost: 10 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectVampireHypnosis - - !type:CP14SpellPointerToVampireClan - searchRange: 60 - pointerEntity: CP14BloodlustPointer - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneVampireHypnosis + - type: DoAfterArgs + delay: 1.5 - type: Action + useDelay: 8 icon: sprite: _CP14/Actions/Spells/vampire.rsi state: search_clan - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 8 - castDelay: 1.5 + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectVampireHypnosis + - !type:CP14SpellPointerToVampireClan + searchRange: 60 + pointerEntity: CP14BloodlustPointer - type: entity parent: CP14ActionSpellBloodConnection @@ -31,19 +31,20 @@ name: Blood identification description: You are searching within a large radius for all vampires from other factions and their clan hearts. components: - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectVampireHypnosis - - !type:CP14SpellPointerToVampireClan - inversed: true - searchRange: 60 - pointerEntity: CP14BloodlustPointer - type: Action icon: sprite: _CP14/Actions/Spells/vampire.rsi state: search_clan_enemy + - type: InstantAction + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectVampireHypnosis + - !type:CP14SpellPointerToVampireClan + inversed: true + searchRange: 60 + pointerEntity: CP14BloodlustPointer - type: entity id: CP14BloodlustPointer diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/beer_creation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/beer_creation.yml index 88d6d89bd3..ca553ac83f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/beer_creation.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/beer_creation.yml @@ -9,29 +9,28 @@ state: beer_creation - type: CP14ActionManaCost manaCost: 20 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectBeerCreation - - !type:CP14SpellSpawnInHandEntity - spawns: - - CP14LiquidDropBeer - type: CP14ActionSpeaking startSpeech: "beer..." endSpeech: "Arriva la birra" - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneBeerCreation - type: Action + useDelay: 10 icon: sprite: _CP14/Actions/Spells/water.rsi state: beer_creation + - type: DoAfterArgs + delay: 1 - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 30 - castDelay: 5 - breakOnMove: true + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectBeerCreation + - !type:CP14SpellSpawnInHandEntity + spawns: + - CP14LiquidDropBeer - type: entity id: CP14RuneBeerCreation diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/freeze.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/freeze.yml index 8b9b20b14d..f03323224d 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/freeze.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/freeze.yml @@ -4,35 +4,22 @@ name: Freeze description: You begin to severely cool down the target, slowing its movement speed. components: - - type: Sprite - sprite: _CP14/Actions/Spells/water.rsi - state: freeze - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.8 - type: CP14ActionManaCost manaCost: 7 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectFreeze - - !type:CP14AdjustAllSolutionThermalEnergy - delta: -1200 # One full use cools 100u from ~300k to ~250k - - !type:CP14SpellApplyEntityEffect - effects: - - !type:MovespeedModifier - walkSpeedModifier: 0.5 - sprintSpeedModifier: 0.5 - statusLifetime: 2 - - !type:AdjustTemperature - amount: -12000 - - !type:ExtinguishReaction - type: CP14ActionSpeaking startSpeech: "Vos adepto frigus..." - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RunePlantFreeze - type: CP14ActionDangerous + - type: DoAfterArgs + repeat: true + breakOnMove: true + delay: 1.5 + distanceThreshold: 5 - type: Action + useDelay: 15 icon: sprite: _CP14/Actions/Spells/water.rsi state: freeze @@ -40,11 +27,22 @@ range: 5 interactOnMiss: false - type: EntityTargetAction - event: !type:CP14ToggleableEntityTargetActionEvent - cooldown: 5 - castTime: 3 - distanceThreshold: 5 - breakOnMove: false + event: !type:CP14EntityTargetModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectFreeze + - !type:CP14AdjustAllSolutionThermalEnergy + delta: -1200 # One full use cools 100u from ~300k to ~250k + - !type:CP14SpellApplyEntityEffect + effects: + - !type:MovespeedModifier + walkSpeedModifier: 0.5 + sprintSpeedModifier: 0.5 + statusLifetime: 2 + - !type:AdjustTemperature + amount: -12000 + - !type:ExtinguishReaction - type: entity id: CP14ImpactEffectFreeze diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_arrow.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_arrow.yml index 21eb2a7e47..119d27e99e 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_arrow.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_arrow.yml @@ -4,34 +4,30 @@ name: Ice arrow description: You create a temporary sharp ice arrow that can be used as a disposable bow projectile. components: - - type: Sprite - sprite: _CP14/Actions/Spells/water.rsi - state: ice_arrow - type: CP14ActionManaCost manaCost: 7 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectWaterCreation - - !type:CP14SpellSpawnInHandEntity - spawns: - - CP14IceArrow - type: CP14ActionSpeaking startSpeech: "Sagitta glaciei..." endSpeech: "in manu mea" - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneWaterCreation + - type: DoAfterArgs + delay: 0.5 - type: Action + useDelay: 5 icon: sprite: _CP14/Actions/Spells/water.rsi state: ice_arrow - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 5 - castDelay: 0.5 - breakOnMove: false + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectWaterCreation + - !type:CP14SpellSpawnInHandEntity + spawns: + - CP14IceArrow - type: entity parent: CP14BaseSpellScrollWater diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_dagger.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_dagger.yml index 56ff342c85..6503b418f6 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_dagger.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_dagger.yml @@ -4,34 +4,30 @@ name: Ice dagger description: You form an icy sharp dagger that will do for temporary use. components: - - type: Sprite - sprite: _CP14/Actions/Spells/water.rsi - state: ice_dagger - type: CP14ActionManaCost manaCost: 25 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectWaterCreation - - !type:CP14SpellSpawnInHandEntity - spawns: - - CP14WeaponDaggerIce - type: CP14ActionSpeaking startSpeech: "Un pittore sulla..." endSpeech: "soglia della mano" - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneWaterCreation + - type: DoAfterArgs + delay: 0.5 - type: Action + useDelay: 5 icon: sprite: _CP14/Actions/Spells/water.rsi state: ice_dagger - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 5 - castDelay: 0.5 - breakOnMove: false + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectWaterCreation + - !type:CP14SpellSpawnInHandEntity + spawns: + - CP14WeaponDaggerIce - type: entity name: ice dagger diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_shards.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_shards.yml index c6285335b5..dafee5c98d 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_shards.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_shards.yml @@ -7,23 +7,13 @@ - type: Sprite sprite: _CP14/Actions/Spells/water.rsi state: ice_shards - - type: CP14MagicEffectCastSlowdown - speedMultiplier: 0.75 - type: CP14ActionManaCost manaCost: 5 - - type: CP14MagicEffect - effects: - - !type:CP14SpellProjectile - prototype: CP14IceShard - - !type:CP14SpellSpawnEntityOnUser - spawns: - - CP14ImpactEffectWaterCreation - type: CP14ActionSpeaking endSpeech: "Glacies acus!" - - type: CP14MagicEffectCastingVisual - proto: CP14RuneIceShards - type: CP14ActionDangerous - type: Action + useDelay: 0.5 icon: sprite: _CP14/Actions/Spells/water.rsi state: ice_shards @@ -32,8 +22,13 @@ checkCanAccess: false range: 60 - type: WorldTargetAction - event: !type:CP14WorldTargetActionEvent - cooldown: 0.5 + event: !type:CP14WorldTargetModularEffectEvent + effects: + - !type:CP14SpellProjectile + prototype: CP14IceShard + - !type:CP14SpellSpawnEntityOnUser + spawns: + - CP14ImpactEffectWaterCreation - type: entity id: CP14RuneIceShards diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_trap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_trap.yml index 1057f97ee1..a5c97ab0bb 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_trap.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_trap.yml @@ -4,36 +4,34 @@ name: Ice trap description: Creates a ice trap at the selected location. Don't forget to recharge it with mana. components: - - type: Sprite - sprite: _CP14/Actions/Spells/water.rsi - state: ice_trap - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: 0.9 - type: CP14ActionManaCost manaCost: 40 - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectIceTrap - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14SpawnMagicIceTrap - type: CP14ActionSpeaking startSpeech: "Signum glaciei..." endSpeech: "hunc locum custodi" - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneIceTrap - type: Action + useDelay: 4 icon: sprite: _CP14/Actions/Spells/water.rsi state: ice_trap + - type: DoAfterArgs + delay: 5 - type: TargetAction range: 3 - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 4 + event: !type:CP14WorldTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectIceTrap + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14SpawnMagicIceTrap - type: entity id: CP14RuneIceTrap diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/water_creation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/water_creation.yml index 259dddd534..6b75a47bf6 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/water_creation.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/water_creation.yml @@ -9,26 +9,25 @@ state: water_creation - type: CP14ActionManaCost manaCost: 10 - - type: CP14MagicEffect - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectWaterCreation - - !type:CP14SpellSpawnInHandEntity - spawns: - - CP14LiquidDropWater - type: CP14ActionFreeHandsRequired - - type: CP14MagicEffectCastingVisual + - type: CP14ActionDoAfterVisuals proto: CP14RuneWaterCreation - type: Action + useDelay: 10 icon: sprite: _CP14/Actions/Spells/water.rsi state: water_creation + - type: DoAfterArgs + delay: 1 - type: InstantAction - event: !type:CP14DelayedInstantActionEvent - cooldown: 10 - castDelay: 0.8 - breakOnMove: false + event: !type:CP14InstantModularEffectEvent + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectWaterCreation + - !type:CP14SpellSpawnInHandEntity + spawns: + - CP14LiquidDropWater - type: entity id: CP14RuneWaterCreation diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml index a78671bb54..d21d2c20e8 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml @@ -36,7 +36,6 @@ - id: CP14SpellScrollEarthWall - id: CP14SpellScrollFlashLight - id: CP14SpellScrollWaterCreation - - id: CP14SpellScrollPlantGrowth - id: CP14SpellScrollMagicalAcceleration - id: CP14SpellScrollHeat - id: CP14ScrapCopper diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Flem.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Flem.yml index 5c5696f554..fef6942ca6 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Flem.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Flem.yml @@ -78,7 +78,6 @@ gender: epicene - type: TypingIndicator proto: alien - - type: CP14MagicCasterSlowdown - type: CP14MagicEnergyContainer magicAlert: CP14MagicEnergy maxEnergy: 100 diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Slimes/base.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Slimes/base.yml index 952a2b9615..00fec0a8fd 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Slimes/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Slimes/base.yml @@ -102,7 +102,6 @@ capacity: 2 showContents: true occludesLight: false - - type: CP14MagicCasterSlowdown - type: Tag tags: - FootstepSound diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/animals.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/animals.yml index cb7d24931e..0889c3e213 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/animals.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/animals.yml @@ -475,8 +475,8 @@ - type: NpcFactionMember factions: - CP14AggressiveAnimals - - type: NPCUseActionOnTarget - actionId: CP14ActionBearSpellSprint + #- type: NPCUseActionOnTarget # TODO: add support for non-target actions + # actionId: CP14ActionBearSpellSprint - type: Sprite drawdepth: Mobs layers: @@ -524,7 +524,6 @@ Base: dead - type: Stamina critThreshold: 300 - - type: CP14MagicCasterSlowdown - type: Butcherable spawned: - id: CP14FoodMeatBoar # TODO diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/fairy.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/fairy.yml index 572f0852dc..ed984aa30e 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/fairy.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/fairy.yml @@ -66,7 +66,6 @@ variation: 0.125 pitch: 1.1 - type: SoundWhileAlive - - type: CP14MagicCasterSlowdown - type: CP14MagicEnergyContainer magicAlert: CP14MagicEnergy maxEnergy: 300 @@ -102,19 +101,8 @@ - type: Sprite sprite: _CP14/Actions/Spells/meta.rsi state: mana_consume - - type: CP14MagicEffect - telegraphyEffects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaConsume - effects: - - !type:CP14SpellSpawnEntityOnTarget - spawns: - - CP14ImpactEffectManaConsume - - !type:CP14SpellConsumeManaEffect - safe: false - mana: 0.5 - type: Action + useDelay: 5 icon: sprite: _CP14/Actions/Spells/meta.rsi state: mana_consume @@ -123,8 +111,15 @@ whitelist: components: - CP14MagicEnergyContainer - event: !type:CP14ToggleableEntityTargetActionEvent - cooldown: 5 - castTime: 10 - breakOnMove: false - hidden: true + event: !type:CP14EntityTargetModularEffectEvent + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaConsume + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectManaConsume + - !type:CP14SpellConsumeManaEffect + safe: false + mana: 0.5 diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/ice_ghost.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/ice_ghost.yml index bdd2191dba..9d6f39dfcd 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/ice_ghost.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/ice_ghost.yml @@ -62,7 +62,6 @@ behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] - - type: CP14MagicCasterSlowdown - type: CP14MagicEnergyContainer magicAlert: CP14MagicEnergy maxEnergy: 100 @@ -80,16 +79,12 @@ parent: CP14ActionSpellIceShards id: CP14ActionSpellIceShardsGhost components: - - type: CP14MagicEffectCastSlowdown + - type: CP14ActionDoAfterSlowdown speedMultiplier: -2.0 - type: Action useDelay: 1 - type: TargetAction checkCanAccess: true - type: WorldTargetAction - event: !type:CP14DelayedWorldTargetActionEvent - cooldown: 0.5 - castDelay: 0.2 - breakOnMove: false - hidden: true + event: !type:CP14WorldTargetModularEffectEvent diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/invisible_whistler.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/invisible_whistler.yml index 1405002feb..f29031f496 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/invisible_whistler.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/invisible_whistler.yml @@ -102,7 +102,6 @@ - type: StealthOnMove passiveVisibilityRate: -0.40 movementVisibilityRate: 0.10 - - type: CP14MagicCasterSlowdown - type: CP14MagicEnergyContainer magicAlert: CP14MagicEnergy maxEnergy: 50 diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/mole.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/mole.yml index 172fe13218..d9082b07f4 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/mole.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/mole.yml @@ -101,7 +101,6 @@ - type: Grammar attributes: gender: epicene - - type: CP14MagicCasterSlowdown - type: CP14MagicEnergyContainer magicAlert: CP14MagicEnergy maxEnergy: 100 diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/spineguard.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/spineguard.yml index 49efa3950b..e09f3235f1 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/spineguard.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/spineguard.yml @@ -109,7 +109,6 @@ - type: Grammar attributes: gender: epicene - - type: CP14MagicCasterSlowdown - type: CP14MagicEnergyContainer - type: Tag tags: diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/lurker.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/lurker.yml index 9380db71f6..6f0005ff29 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/lurker.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/lurker.yml @@ -98,7 +98,6 @@ - type: CP14NightVision - type: FootstepModifier footstepSoundCollection: null # Silent footstep - - type: CP14MagicCasterSlowdown - type: CP14SpellStorage grantAccessToSelf: true spells: diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Player/Patrons/gods.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Player/Patrons/gods.yml index 78b4fd769a..4d3943a49f 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Player/Patrons/gods.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Player/Patrons/gods.yml @@ -112,11 +112,11 @@ religion: Lumera - type: CP14ReligionVision shaderColor: 0.29, 0.66, 0.87 - - type: IntrinsicUI - uis: - enum.CP14ReligionEntityUiKey.Key: - toggleAction: CP14ActionSpellGodLumeraWarp - - type: CP14ReligionSpeaker - speaker: CP14LumeraSpeakImpact + #- type: IntrinsicUI + # uis: + # enum.CP14ReligionEntityUiKey.Key: + # toggleAction: CP14ActionSpellGodLumeraWarp + #- type: CP14ReligionSpeaker + # speaker: CP14LumeraSpeakImpact - type: CP14PriceScanner - type: SolutionScanner \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml index 7c3edc6fc3..70b2ef81d4 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml @@ -236,7 +236,6 @@ - Healing - Electromancy - Athletic - - MartialArts - Craftsmanship - type: CP14VampireEssenceHolder - type: CP14UnknownIdentity diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/base.yml b/Resources/Prototypes/_CP14/Entities/Mobs/base.yml index e0c323acbf..5e61f943ea 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/base.yml @@ -79,7 +79,6 @@ abstract: true categories: [ ForkFiltered ] components: - - type: CP14MagicCasterSlowdown - type: CP14MagicEnergyContainer magicAlert: CP14MagicEnergy maxEnergy: 100 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml index 7085e8f17c..0d14337eda 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml @@ -80,7 +80,6 @@ spells: - CP14ActionSpellShadowStep - CP14ActionSpellShadowGrab - - CP14ActionSpellShadowSwap - type: Sprite sprite: _CP14/Objects/Weapons/Magic/TwoHandedStaff/shadow_staff.rsi - type: Clothing @@ -135,7 +134,7 @@ components: - type: CP14SpellStorage spells: - - CP14ActionSpellPlantGrowth + - CP14ActionSpellCureWounds - type: Sprite sprite: _CP14/Objects/Weapons/Magic/TwoHandedStaff/druid_staff.rsi - type: Clothing diff --git a/Resources/Prototypes/_CP14/Skill/Basic/healing.yml b/Resources/Prototypes/_CP14/Skill/Basic/healing.yml index 97cf53fd18..090fc53361 100644 --- a/Resources/Prototypes/_CP14/Skill/Basic/healing.yml +++ b/Resources/Prototypes/_CP14/Skill/Basic/healing.yml @@ -26,20 +26,6 @@ - !type:SpeciesBlacklist species: CP14Skeleton -- type: cp14Skill - id: CP14ActionSpellPlantGrowth - skillUiPosition: 2, 4 - tree: Healing - icon: - sprite: _CP14/Actions/Spells/healing.rsi - state: plant_growth - effects: - - !type:AddAction - action: CP14ActionSpellPlantGrowth - restrictions: - - !type:NeedPrerequisite - prerequisite: HealingT1 - - type: cp14Skill id: CP14ActionSpellSheepPolymorph skillUiPosition: 0, 4 diff --git a/Resources/Prototypes/_CP14/Skill/Demigods/lumera.yml b/Resources/Prototypes/_CP14/Skill/Demigods/lumera.yml deleted file mode 100644 index e88ca9ca5b..0000000000 --- a/Resources/Prototypes/_CP14/Skill/Demigods/lumera.yml +++ /dev/null @@ -1,167 +0,0 @@ -# T1 - -- type: cp14Skill - id: LumeraT1 - skillUiPosition: 1, 0 - tree: GodLumera - name: cp14-skill-lumera-t1-name - learnCost: 0 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: t1 - -- type: cp14Skill - id: LumeraTouch - skillUiPosition: 0, 3 - tree: GodLumera - learnCost: 0.0 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: touch - effects: - - !type:AddAction - action: CP14ActionSpellGodLumeraTouch - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT1 - -- type: cp14Skill - id: LumeraRenounce - skillUiPosition: 2, 3 - tree: GodLumera - learnCost: 0.0 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: renounce - effects: - - !type:AddAction - action: CP14ActionSpellGodLumeraRenounce - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT1 - -- type: cp14Skill - id: LumeraMindScan - name: cp14-skill-lumera-mind-scan-name - desc: cp14-skill-lumera-mind-scan-desc - skillUiPosition: 0, 5 - tree: GodLumera - learnCost: 0.5 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: mind_scan - effects: - - !type:AddComponents - components: - - type: CP14SkillScanner - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT1 - -- type: cp14Skill - id: LumeraMagicVision - skillUiPosition: 2, 5 - tree: GodLumera - icon: - sprite: _CP14/Actions/Spells/meta.rsi - state: magic_vision - effects: - - !type:AddAction - action: CP14ActionToggleMagicVision - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT1 - -# T2 - -- type: cp14Skill - id: LumeraT2 - skillUiPosition: 7, 0 - tree: GodLumera - name: cp14-skill-lumera-t2-name - learnCost: 0 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: t2 - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT1 - - !type:GodFollowerPercentage - percentage: 0.25 - -- type: cp14Skill - id: LumeraDarkMist - skillUiPosition: 6, 3 - tree: GodLumera - learnCost: 1.0 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: mist - effects: - - !type:AddAction - action: CP14ActionSpellGodLumeraDarkmist - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT2 - -- type: cp14Skill - id: LumeraMoonStrike - skillUiPosition: 8, 3 - tree: GodLumera - learnCost: 1.0 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: moon_beam - effects: - - !type:AddAction - action: CP14ActionSpellGodLumeraMoonStrike - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT2 - -# T3 - -- type: cp14Skill - id: LumeraT3 - skillUiPosition: 13, 0 - tree: GodLumera - name: cp14-skill-lumera-t3-name - learnCost: 0 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: t3 - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT2 - - !type:GodFollowerPercentage - percentage: 0.5 - -- type: cp14Skill - id: LumeraMindUpgrade - skillUiPosition: 12, 3 - tree: GodLumera - learnCost: 1.0 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: mind_upgrade - effects: - - !type:AddAction - action: CP14ActionSpellGodLumeraMindUpgrade - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT3 - -- type: cp14Skill - id: LumeraMindDegrade - skillUiPosition: 14, 3 - tree: GodLumera - learnCost: 1.0 - icon: - sprite: _CP14/Actions/DemigodSpells/lumera.rsi - state: wrath - effects: - - !type:AddAction - action: CP14ActionSpellGodLumeraMindDegrade - restrictions: - - !type:NeedPrerequisite - prerequisite: LumeraT3 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Skill/Demigods/merkas.yml b/Resources/Prototypes/_CP14/Skill/Demigods/merkas.yml deleted file mode 100644 index 53c5d70e09..0000000000 --- a/Resources/Prototypes/_CP14/Skill/Demigods/merkas.yml +++ /dev/null @@ -1,12 +0,0 @@ -- type: cp14Skill - id: NatureGodT1 - skillUiPosition: 1, 0 - tree: GodMerkas - name: cp14-skill-life-t1-name - learnCost: 0.5 - icon: - sprite: _CP14/Actions/skill_tree.rsi - state: heal - effects: - - !type:AddAction - action: CP14ActionSpellBloodPurification \ No newline at end of file diff --git a/Resources/ServerInfo/_CP14/Guidebook_EN/JobsTabs/Innkeepers.xml b/Resources/ServerInfo/_CP14/Guidebook_EN/JobsTabs/Innkeepers.xml index f02e6c1342..71446cf8d8 100644 --- a/Resources/ServerInfo/_CP14/Guidebook_EN/JobsTabs/Innkeepers.xml +++ b/Resources/ServerInfo/_CP14/Guidebook_EN/JobsTabs/Innkeepers.xml @@ -10,7 +10,6 @@ To keep your crops alive for an extended period, be sure to water them frequently. Keeping plants healthy is easier with the spell **“Plant Growth”** from the Vivification tree, which restores a plant’s water, nutrients, and health. - diff --git a/Resources/ServerInfo/_CP14/Guidebook_RU/JobsTabs/Innkeepers.xml b/Resources/ServerInfo/_CP14/Guidebook_RU/JobsTabs/Innkeepers.xml index f02e6c1342..71446cf8d8 100644 --- a/Resources/ServerInfo/_CP14/Guidebook_RU/JobsTabs/Innkeepers.xml +++ b/Resources/ServerInfo/_CP14/Guidebook_RU/JobsTabs/Innkeepers.xml @@ -10,7 +10,6 @@ To keep your crops alive for an extended period, be sure to water them frequently. Keeping plants healthy is easier with the spell **“Plant Growth”** from the Vivification tree, which restores a plant’s water, nutrients, and health. -