Magic spell refactor part 2 (#1757)

* 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>
This commit is contained in:
Red
2025-09-17 22:13:10 +03:00
committed by GitHub
parent c1a13c6757
commit 930caa30b3
131 changed files with 1678 additions and 3710 deletions

View File

@@ -1,7 +0,0 @@
using Content.Shared._CP14.MagicSpell;
namespace Content.Client._CP14.MagicSpell;
public sealed partial class CP14ClientMagicSystem : CP14SharedMagicSystem
{
}

View File

@@ -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<CP14ActionSpeakingComponent, CP14ActionStartDoAfterEvent>(OnVerbalActionStarted);
SubscribeLocalEvent<CP14ActionSpeakingComponent, ActionDoAfterEvent>(OnVerbalActionPerformed);
SubscribeLocalEvent<CP14ActionEmotingComponent, CP14ActionStartDoAfterEvent>(OnEmoteActionStarted);
SubscribeLocalEvent<CP14ActionEmotingComponent, ActionDoAfterEvent>(OnEmoteActionPerformed);
SubscribeLocalEvent<CP14ActionDoAfterVisualsComponent, CP14ActionStartDoAfterEvent>(OnSpawnMagicVisualEffect);
SubscribeLocalEvent<CP14ActionDoAfterVisualsComponent, ActionDoAfterEvent>(OnDespawnMagicVisualEffect);
}
private void OnVerbalActionStarted(Entity<CP14ActionSpeakingComponent> 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<CP14ActionEmotingComponent> ent, ref CP14ActionStartDoAfterEvent args)
{
var performer = GetEntity(args.Performer);
_chat.TrySendInGameICMessage(performer, Loc.GetString(ent.Comp.StartEmote), InGameICChatType.Emote, true);
}
private void OnVerbalActionPerformed(Entity<CP14ActionSpeakingComponent> 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<CP14ActionEmotingComponent> 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<CP14ActionDoAfterVisualsComponent> 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<CP14ActionDoAfterVisualsComponent> ent, ref ActionDoAfterEvent args)
{
if (args.Repeat)
return;
QueueDel(ent.Comp.SpawnedEntity);
ent.Comp.SpawnedEntity = null;
}
}

View File

@@ -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<CP14ActionRequiredMusicToolComponent, ActionAttemptEvent>(OnActionMusicAttempt);
}

View File

@@ -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<CP14SpellEffectOnHitComponent, MeleeHitEvent>(OnMeleeHit);
SubscribeLocalEvent<CP14SpellEffectOnHitComponent, ThrowDoHitEvent>(OnProjectileHit);
SubscribeLocalEvent<CP14SpellEffectOnCollideComponent, StartCollideEvent>(OnStartCollide);
SubscribeLocalEvent<CP14ActionSpeakingComponent, CP14ActionSpeechEvent>(OnSpellSpoken);
SubscribeLocalEvent<CP14MagicEffectCastingVisualComponent, CP14StartCastMagicEffectEvent>(OnSpawnMagicVisualEffect);
SubscribeLocalEvent<CP14MagicEffectCastingVisualComponent, CP14EndCastMagicEffectEvent>(OnDespawnMagicVisualEffect);
}
private void OnStartCollide(Entity<CP14SpellEffectOnCollideComponent> ent, ref StartCollideEvent args)
@@ -119,23 +97,4 @@ public sealed class CP14MagicSystem : CP14SharedMagicSystem
break;
}
}
private void OnSpellSpoken(Entity<CP14ActionSpeakingComponent> 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<CP14MagicEffectCastingVisualComponent> 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<CP14MagicEffectCastingVisualComponent> ent, ref CP14EndCastMagicEffectEvent args)
{
QueueDel(ent.Comp.SpawnedEntity);
ent.Comp.SpawnedEntity = null;
}
}

View File

@@ -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<CP14MagicEffectComponent>(spellEnt.Value);
provided.SpellStorage = storage;
storage.Comp.SpellEntities.Add(spellEnt.Value);
}

View File

@@ -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)

View File

@@ -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<CP14ActionFreeHandsRequiredComponent, ActionAttemptEvent>(OnSomaticActionAttempt);
@@ -52,9 +42,10 @@ public abstract partial class CP14SharedActionSystem
if (args.Cancelled)
return;
TryComp<CP14MagicEffectComponent>(ent, out var magicEffect);
if (!TryComp<ActionComponent>(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<CP14MagicEnergyContainerComponent>(magicEffect.SpellStorage, out var magicContainer))
if (action.Container is not null &&
TryComp<CP14MagicEnergyContainerComponent>(action.Container, out var magicContainer))
requiredMana = MathF.Max(0, (float)(requiredMana - magicContainer.Energy));
if (requiredMana <= 0)

View File

@@ -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<CP14ActionDoAfterSlowdownComponent, CP14ActionStartDoAfterEvent>(OnStartDoAfter);
SubscribeLocalEvent<CP14ActionDoAfterSlowdownComponent, ActionDoAfterEvent>(OnEndDoAfter);
SubscribeLocalEvent<CP14SlowdownFromActionsComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovespeed);
}
private void OnStartDoAfter(Entity<CP14ActionDoAfterSlowdownComponent> ent, ref CP14ActionStartDoAfterEvent args)
{
var performer = GetEntity(args.Performer);
EnsureComp<CP14SlowdownFromActionsComponent>(performer, out var slowdown);
slowdown.SpeedAffectors.TryAdd(GetNetEntity(ent), ent.Comp.SpeedMultiplier);
Dirty(performer, slowdown);
_movement.RefreshMovementSpeedModifiers(performer);
}
private void OnEndDoAfter(Entity<CP14ActionDoAfterSlowdownComponent> ent, ref ActionDoAfterEvent args)
{
if (args.Repeat)
return;
var performer = GetEntity(args.Performer);
if (!TryComp<CP14SlowdownFromActionsComponent>(performer, out var slowdown))
return;
slowdown.SpeedAffectors.Remove(GetNetEntity(ent));
Dirty(performer, slowdown);
_movement.RefreshMovementSpeedModifiers(performer);
if (slowdown.SpeedAffectors.Count == 0)
RemCompDeferred<CP14SlowdownFromActionsComponent>(performer);
}
private void OnRefreshMovespeed(Entity<CP14SlowdownFromActionsComponent> ent, ref RefreshMovementSpeedModifiersEvent args)
{
var targetSpeedModifier = 1f;
foreach (var (_, affector) in ent.Comp.SpeedAffectors)
{
targetSpeedModifier *= affector;
}
args.ModifySpeed(targetSpeedModifier);
}
}

View File

@@ -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;

View File

@@ -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<CP14ActionMaterialCostComponent, ActionPerformedEvent>(OnMaterialCostActionPerformed);
SubscribeLocalEvent<CP14ActionStaminaCostComponent, ActionPerformedEvent>(OnStaminaCostActionPerformed);
SubscribeLocalEvent<CP14ActionManaCostComponent, ActionPerformedEvent>(OnManaCostActionPerformed);
SubscribeLocalEvent<CP14ActionSkillPointCostComponent, ActionPerformedEvent>(OnSkillPointCostActionPerformed);
}
private void OnMaterialCostActionPerformed(Entity<CP14ActionMaterialCostComponent> ent, ref ActionPerformedEvent args)
{
if (ent.Comp.Requirement is null)
return;
HashSet<EntityUid> 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<CP14ActionStaminaCostComponent> ent, ref ActionPerformedEvent args)
{
_stamina.TakeStaminaDamage(args.Performer, ent.Comp.Stamina, visual: false);
}
private void OnManaCostActionPerformed(Entity<CP14ActionManaCostComponent> 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<CP14MagicEnergyContainerComponent>(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<CP14MagicEnergyContainerComponent>(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<CP14ActionSkillPointCostComponent> ent, ref ActionPerformedEvent args)
{
if (ent.Comp.SkillPoint is null)
return;
_skill.RemoveSkillPoints(args.Performer, ent.Comp.SkillPoint.Value, ent.Comp.Count);
}
}

View File

@@ -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<TransformComponent, CP14ActionStartDoAfterEvent>(OnActionTelegraphy);
SubscribeLocalEvent<TransformComponent, CP14InstantModularEffectEvent>(OnInstantCast);
SubscribeLocalEvent<TransformComponent, CP14WorldTargetModularEffectEvent>(OnWorldTargetCast);
SubscribeLocalEvent<TransformComponent, CP14EntityTargetModularEffectEvent>(OnEntityTargetCast);
}
private void OnActionTelegraphy(Entity<TransformComponent> 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<ActionComponent>(action, out var actionComp))
return;
//Instant
if (TryComp<InstantActionComponent>(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<WorldTargetActionComponent>(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<EntityTargetActionComponent>(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<TransformComponent> 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<TransformComponent> 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<TransformComponent> 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
{
/// <summary>
/// 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.
/// </summary>
[DataField]
public List<CP14SpellEffect> TelegraphyEffects = new();
[DataField]
public List<CP14SpellEffect> Effects = new();
}
public sealed partial class CP14WorldTargetModularEffectEvent : WorldTargetActionEvent
{
/// <summary>
/// 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.
/// </summary>
[DataField]
public List<CP14SpellEffect> TelegraphyEffects = new();
[DataField]
public List<CP14SpellEffect> Effects = new();
}
public sealed partial class CP14EntityTargetModularEffectEvent : EntityTargetActionEvent
{
/// <summary>
/// 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.
/// </summary>
[DataField]
public List<CP14SpellEffect> TelegraphyEffects = new();
[DataField]
public List<CP14SpellEffect> Effects = new();
}

View File

@@ -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<ActionComponent> _actionQuery;
public override void Initialize()
{
base.Initialize();
_actionQuery = GetEntityQuery<ActionComponent>();
InitializeAttempts();
InitializeExamine();
InitializePerformed();
InitializeModularEffects();
InitializeDoAfter();
}
}
/// <summary>
/// Called on an action when an attempt to start doAfter using this action begins.
/// </summary>
public sealed class CP14ActionStartDoAfterEvent(NetEntity performer, RequestPerformActionEvent input) : EntityEventArgs
{
public NetEntity Performer = performer;
public readonly RequestPerformActionEvent Input = input;
}

View File

@@ -0,0 +1,11 @@
namespace Content.Shared._CP14.Actions.Components;
/// <summary>
/// Slows the caster while using action
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedActionSystem))]
public sealed partial class CP14ActionDoAfterSlowdownComponent : Component
{
[DataField]
public float SpeedMultiplier = 1f;
}

View File

@@ -1,12 +1,12 @@
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.MagicSpell.Components;
namespace Content.Shared._CP14.Actions.Components;
/// <summary>
/// Creates a temporary entity that exists while the spell is cast, and disappears at the end. For visual special effects.
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
public sealed partial class CP14MagicEffectCastingVisualComponent : Component
[RegisterComponent, Access(typeof(CP14SharedActionSystem))]
public sealed partial class CP14ActionDoAfterVisualsComponent : Component
{
[DataField]
public EntityUid? SpawnedEntity;

View File

@@ -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!
}

View File

@@ -1,9 +1,9 @@
namespace Content.Shared._CP14.MagicSpell.Components;
namespace Content.Shared._CP14.Actions.Components;
/// <summary>
/// Requires the user to have at least one free hand to use this spell
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
[RegisterComponent]
public sealed partial class CP14ActionFreeHandsRequiredComponent : Component
{
[DataField]

View File

@@ -1,11 +1,9 @@
using Content.Shared._CP14.MagicSpell;
namespace Content.Shared._CP14.Actions.Components;
/// <summary>
/// Requires the user to play music to use this spell
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
[RegisterComponent]
public sealed partial class CP14ActionRequiredMusicToolComponent : Component
{
}

View File

@@ -5,7 +5,7 @@ namespace Content.Shared._CP14.Actions.Components;
/// <summary>
/// Blocks the user from using action against target target in SSD.
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
[RegisterComponent]
public sealed partial class CP14ActionSSDBlockComponent : Component
{
}

View File

@@ -11,17 +11,7 @@ public sealed partial class CP14ActionSpeakingComponent : Component
[DataField]
public string EndSpeech = string.Empty; //Not LocId!
}
/// <summary>
/// patch to send an event to the server for saying a phrase out loud
/// </summary>
[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;
}

View File

@@ -5,7 +5,7 @@ namespace Content.Shared._CP14.Actions.Components;
/// <summary>
/// Restricts the use of this action, by spending stamina.
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
[RegisterComponent]
public sealed partial class CP14ActionStaminaCostComponent : Component
{
[DataField]

View File

@@ -0,0 +1,13 @@
using Robust.Shared.GameStates;
namespace Content.Shared._CP14.Actions.Components;
/// <summary>
/// apply slowdown effect from casting spells
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(CP14SharedActionSystem))]
public sealed partial class CP14SlowdownFromActionsComponent : Component
{
[DataField, AutoNetworkedField]
public Dictionary<NetEntity, float> SpeedAffectors = new();
}

View File

@@ -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<CP14ActionSpeakingComponent, CP14StartCastMagicEffectEvent>(OnVerbalAspectStartCast);
SubscribeLocalEvent<CP14ActionSpeakingComponent, CP14MagicEffectConsumeResourceEvent>(OnVerbalAspectAfterCast);
SubscribeLocalEvent<CP14MagicEffectEmotingComponent, CP14StartCastMagicEffectEvent>(OnEmoteStartCast);
SubscribeLocalEvent<CP14MagicEffectEmotingComponent, CP14MagicEffectConsumeResourceEvent>(OnEmoteEndCast);
//Consuming resources
SubscribeLocalEvent<CP14ActionMaterialCostComponent, CP14MagicEffectConsumeResourceEvent>(OnMaterialAspectEndCast);
SubscribeLocalEvent<CP14ActionStaminaCostComponent, CP14MagicEffectConsumeResourceEvent>(OnStaminaConsume);
SubscribeLocalEvent<CP14ActionManaCostComponent, CP14MagicEffectConsumeResourceEvent>(OnManaConsume);
SubscribeLocalEvent<CP14ActionSkillPointCostComponent, CP14MagicEffectConsumeResourceEvent>(OnSkillPointConsume);
}
private void OnVerbalAspectStartCast(Entity<CP14ActionSpeakingComponent> 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<CP14ActionSpeakingComponent> 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<CP14MagicEffectEmotingComponent> 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<CP14MagicEffectEmotingComponent> 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<CP14ActionMaterialCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
{
if (ent.Comp.Requirement is null || args.Performer is null)
return;
HashSet<EntityUid> 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<CP14ActionStaminaCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
{
if (args.Performer is null)
return;
_stamina.TakeStaminaDamage(args.Performer.Value, ent.Comp.Stamina, visual: false);
}
private void OnManaConsume(Entity<CP14ActionManaCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
{
if (!TryComp<CP14MagicEffectComponent>(ent, out var magicEffect))
return;
var requiredMana = CalculateManacost(ent, args.Performer);
//First - used object
if (magicEffect.SpellStorage is not null && TryComp<CP14MagicEnergyContainerComponent>(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<CP14MagicEnergyContainerComponent>(args.Performer, out var playerMana))
_magicEnergy.ChangeEnergy((args.Performer.Value, playerMana), -requiredMana, out _, out _, safe: false);
}
private void OnSkillPointConsume(Entity<CP14ActionSkillPointCostComponent> 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);
}
}

View File

@@ -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<CP14DelayedInstantActionEvent>(OnInstantAction);
SubscribeLocalEvent<CP14DelayedWorldTargetActionEvent>(OnWorldTargetAction);
SubscribeLocalEvent<CP14DelayedEntityTargetActionEvent>(OnEntityTargetAction);
SubscribeLocalEvent<CP14MagicEffectComponent, CP14DelayedInstantActionDoAfterEvent>(OnDelayedInstantActionDoAfter);
SubscribeLocalEvent<CP14MagicEffectComponent, CP14DelayedEntityWorldTargetActionDoAfterEvent>(OnDelayedEntityWorldTargetDoAfter);
SubscribeLocalEvent<CP14MagicEffectComponent, CP14DelayedEntityTargetActionDoAfterEvent>(OnDelayedEntityTargetDoAfter);
}
private bool TryStartDelayedAction(ICP14DelayedMagicEffect delayedEffect, DoAfterEvent doAfter, Entity<CP14MagicEffectComponent> 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<CP14MagicEffectComponent> 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<CP14MagicEffectComponent> 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;
}
/// <summary>
/// Instant action used from hotkey event
/// </summary>
private void OnInstantAction(CP14DelayedInstantActionEvent args)
{
if (args.Handled)
return;
if (args is not ICP14DelayedMagicEffect delayedEffect)
return;
if (!TryComp<CP14MagicEffectComponent>(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;
}
/// <summary>
/// Target action used from hotkey event
/// </summary>
private void OnWorldTargetAction(CP14DelayedWorldTargetActionEvent args)
{
if (args.Handled)
return;
if (args is not ICP14DelayedMagicEffect delayedEffect)
return;
if (!TryComp<CP14MagicEffectComponent>(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;
}
/// <summary>
/// Target action used from hotkey event
/// </summary>
private void OnEntityTargetAction(CP14DelayedEntityTargetActionEvent args)
{
if (args.Handled)
return;
if (args is not ICP14DelayedMagicEffect delayedEffect)
return;
if (!TryComp<CP14MagicEffectComponent>(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;
}
/// <summary>
/// Action doAfter finished or interrupted
/// </summary>
private void OnDelayedInstantActionDoAfter(Entity<CP14MagicEffectComponent> 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;
}
/// <summary>
/// Action doAfter finished or interrupted
/// </summary>
private void OnDelayedEntityWorldTargetDoAfter(Entity<CP14MagicEffectComponent> 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;
}
/// <summary>
/// Action doAfter finished or interrupted
/// </summary>
private void OnDelayedEntityTargetDoAfter(Entity<CP14MagicEffectComponent> 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;
}
}

View File

@@ -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<CP14InstantActionEvent>(OnMagicInstantAction);
SubscribeLocalEvent<CP14WorldTargetActionEvent>(OnMagicWorldTargetAction);
SubscribeLocalEvent<CP14EntityTargetActionEvent>(OnMagicEntityTargetAction);
}
private void OnMagicInstantAction(CP14InstantActionEvent args)
{
if (args.Handled)
return;
if (!TryComp<CP14MagicEffectComponent>(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<CP14MagicEffectComponent>(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<CP14MagicEffectComponent>(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);
}
}

View File

@@ -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<CP14MagicEffectCastSlowdownComponent, CP14StartCastMagicEffectEvent>(OnSlowdownCaster);
SubscribeLocalEvent<CP14MagicEffectCastSlowdownComponent, CP14EndCastMagicEffectEvent>(OnUnslowdownCaster);
SubscribeLocalEvent<CP14MagicCasterSlowdownComponent, RefreshMovementSpeedModifiersEvent>(OnCasterRefreshMovespeed);
}
private void OnSlowdownCaster(Entity<CP14MagicEffectCastSlowdownComponent> ent, ref CP14StartCastMagicEffectEvent args)
{
if (!TryComp<CP14MagicCasterSlowdownComponent>(args.Performer, out var caster))
return;
caster.SpeedModifier = ent.Comp.SpeedMultiplier;
_movement.RefreshMovementSpeedModifiers(args.Performer);
}
private void OnUnslowdownCaster(Entity<CP14MagicEffectCastSlowdownComponent> ent, ref CP14EndCastMagicEffectEvent args)
{
if (!TryComp<CP14MagicCasterSlowdownComponent>(args.Performer, out var caster))
return;
caster.SpeedModifier = 1f;
_movement.RefreshMovementSpeedModifiers(args.Performer);
}
private void OnCasterRefreshMovespeed(Entity<CP14MagicCasterSlowdownComponent> ent, ref RefreshMovementSpeedModifiersEvent args)
{
args.ModifySpeed(ent.Comp.SpeedModifier);
}
}

View File

@@ -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<CP14ToggleableInstantActionEvent>(OnToggleableInstantAction);
SubscribeLocalEvent<CP14ToggleableWorldTargetActionEvent>(OnToggleableEntityWorldTargetAction);
SubscribeLocalEvent<CP14ToggleableEntityTargetActionEvent>(OnToggleableEntityTargetAction);
SubscribeLocalEvent<CP14MagicEffectComponent, CP14ToggleableInstantActionDoAfterEvent>(OnToggleableInstantActionDoAfterEvent);
SubscribeLocalEvent<CP14MagicEffectComponent, CP14ToggleableEntityWorldTargetActionDoAfterEvent>(OnToggleableEntityWorldTargetActionDoAfterEvent);
SubscribeLocalEvent<CP14MagicEffectComponent, CP14ToggleableEntityTargetActionDoAfterEvent>(OnToggleableEntityTargetActionDoAfterEvent);
}
private void UpdateToggleableActions()
{
var query = EntityQueryEnumerator<CP14MagicEffectComponent, CP14MagicEffectToggledComponent>();
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<CP14MagicEffectComponent> ent, ref CP14ToggleableInstantActionDoAfterEvent args)
{
EndToggleableAction(ent, args.User, args.Cooldown);
}
private void OnToggleableEntityWorldTargetActionDoAfterEvent(Entity<CP14MagicEffectComponent> ent, ref CP14ToggleableEntityWorldTargetActionDoAfterEvent args)
{
EndToggleableAction(ent, args.User, args.Cooldown);
}
private void OnToggleableEntityTargetActionDoAfterEvent(Entity<CP14MagicEffectComponent> ent, ref CP14ToggleableEntityTargetActionDoAfterEvent args)
{
EndToggleableAction(ent, args.User, args.Cooldown);
}
private void StartToggleableAction(ICP14ToggleableMagicEffect toggleable, DoAfterEvent doAfter, Entity<CP14MagicEffectComponent> 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<CP14MagicEffectToggledComponent>(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<CP14MagicEffectComponent> 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<CP14MagicEffectToggledComponent>(action);
var endEv = new CP14EndCastMagicEffectEvent(performer);
RaiseLocalEvent(action, ref endEv);
}
private void ToggleToggleableAction(ICP14ToggleableMagicEffect toggleable, DoAfterEvent doAfter, Entity<CP14MagicEffectComponent> 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);
}
/// <summary>
/// Instant action used from hotkey event
/// </summary>
private void OnToggleableInstantAction(CP14ToggleableInstantActionEvent args)
{
if (args.Handled)
return;
if (args is not ICP14ToggleableMagicEffect toggleable)
return;
if (!TryComp<CP14MagicEffectComponent>(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;
}
/// <summary>
/// Target action used from hotkey event
/// </summary>
private void OnToggleableEntityWorldTargetAction(CP14ToggleableWorldTargetActionEvent args)
{
if (args.Handled)
return;
if (args is not ICP14ToggleableMagicEffect toggleable)
return;
if (!TryComp<CP14MagicEffectComponent>(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;
}
/// <summary>
/// Entity target action used from hotkey event
/// </summary>
private void OnToggleableEntityTargetAction(CP14ToggleableEntityTargetActionEvent args)
{
if (args.Handled)
return;
if (args is not ICP14ToggleableMagicEffect toggleable)
return;
if (!TryComp<CP14MagicEffectComponent>(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;
}
}

View File

@@ -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;
/// <summary>
/// This system handles the basic mechanics of spell use, such as doAfter, event invocation, and energy spending.
/// </summary>
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<CP14MagicEnergyContainerComponent> _magicContainerQuery;
private EntityQuery<CP14MagicEffectComponent> _magicEffectQuery;
public override void Initialize()
{
base.Initialize();
InitializeDelayedActions();
InitializeToggleableActions();
InitializeInstantActions();
InitializeChecks();
InitializeSlowdown();
_magicContainerQuery = GetEntityQuery<CP14MagicEnergyContainerComponent>();
_magicEffectQuery = GetEntityQuery<CP14MagicEffectComponent>();
SubscribeLocalEvent<CP14MagicEffectComponent, ComponentShutdown>(OnMagicEffectShutdown);
SubscribeLocalEvent<CP14MagicEffectComponent, CP14StartCastMagicEffectEvent>(OnStartCast);
SubscribeLocalEvent<CP14MagicEffectComponent, CP14EndCastMagicEffectEvent>(OnEndCast);
}
private void OnStartCast(Entity<CP14MagicEffectComponent> ent, ref CP14StartCastMagicEffectEvent args)
{
var caster = EnsureComp<CP14MagicCasterComponent>(args.Performer);
caster.CastedSpells.Add(ent);
}
private void OnEndCast(Entity<CP14MagicEffectComponent> ent, ref CP14EndCastMagicEffectEvent args)
{
if (!_net.IsServer)
return;
if (!TryComp<CP14MagicCasterComponent>(args.Performer, out var caster))
return;
caster.CastedSpells.Remove(ent);
//Break all casts
List<EntityUid> 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<CP14MagicEffectComponent> ent, ref ComponentShutdown args)
{
if (_doAfter.IsRunning(ent.Comp.ActiveDoAfter))
_doAfter.Cancel(ent.Comp.ActiveDoAfter);
}
private void CastTelegraphy(Entity<CP14MagicEffectComponent> ent, CP14SpellEffectBaseArgs args)
{
if (!_timing.IsFirstTimePredicted)
return;
foreach (var effect in ent.Comp.TelegraphyEffects)
{
effect.Effect(EntityManager, args);
}
}
private void CastSpell(Entity<CP14MagicEffectComponent> 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<ActionComponent>(ent, out var actionComp)
&& TryComp<CP14ActionManaCostComponent>(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<CP14ActionManaCostComponent> 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;
}
}

View File

@@ -1,11 +0,0 @@
namespace Content.Shared._CP14.MagicSpell.Components;
/// <summary>
///
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
public sealed partial class CP14MagicCasterComponent : Component
{
[DataField]
public List<EntityUid> CastedSpells = new();
}

View File

@@ -1,11 +0,0 @@
namespace Content.Shared._CP14.MagicSpell.Components;
/// <summary>
/// apply slowdown effect from casting spells
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
public sealed partial class CP14MagicCasterSlowdownComponent : Component
{
[DataField]
public float SpeedModifier = 1f;
}

View File

@@ -1,11 +0,0 @@
namespace Content.Shared._CP14.MagicSpell.Components;
/// <summary>
/// Slows the caster while using this spell
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
public sealed partial class CP14MagicEffectCastSlowdownComponent : Component
{
[DataField]
public float SpeedMultiplier = 1f;
}

View File

@@ -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;
/// <summary>
/// Stores the results and appearance of the magic effect
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem), typeof(CP14SharedSpellStorageSystem))]
public sealed partial class CP14MagicEffectComponent : Component
{
/// <summary>
/// if this effect was provided by an spellstorage, it will be recorded here automatically.
/// </summary>
[DataField]
public EntityUid? SpellStorage;
/// <summary>
/// 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.
/// </summary>
[DataField]
public List<CP14SpellEffect> TelegraphyEffects = new();
[DataField]
public List<CP14SpellEffect> Effects = new();
[DataField]
public DoAfterId? ActiveDoAfter;
}

View File

@@ -1,14 +0,0 @@
namespace Content.Shared._CP14.MagicSpell.Components;
/// <summary>
/// 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
/// </summary>
[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!
}

View File

@@ -1,31 +0,0 @@
using Content.Shared.DoAfter;
using Robust.Shared.Map;
namespace Content.Shared._CP14.MagicSpell.Components;
/// <summary>
///
/// </summary>
[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;
}

View File

@@ -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;
}
/// <summary>
/// is invoked if all conditions are met and the spell has begun to be cast (doAfter start moment)
/// </summary>
[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;
}
}
/// <summary>
/// is invoked on the spell itself when the spell process has been completed or interrupted (doAfter end moment)
/// </summary>
[ByRefEvent]
public sealed class CP14EndCastMagicEffectEvent : EntityEventArgs
{
public EntityUid Performer { get; init; }
public CP14EndCastMagicEffectEvent(EntityUid performer)
{
Performer = performer;
}
}
/// <summary>
/// is invoked only if the spell has been successfully cast
/// </summary>
[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<CP14MagicEffectComponent> Action { get; init; }
public FixedPoint2 Manacost { get; init; }
public CP14SpellFromSpellStorageUsedEvent(EntityUid? performer, Entity<CP14MagicEffectComponent> 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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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<CP14MagicCasterComponent>(args.Target.Value, out var caster))
return;
var interrupt = false;
foreach (var spell in caster.CastedSpells)
{
if (entManager.HasComponent<CP14ActionManaCostComponent>(spell))
{
interrupt = true;
break;
}
}
if (!interrupt)
return;
var electrocutionSystem = entManager.System<SharedElectrocutionSystem>();
electrocutionSystem.TryDoElectrocution(args.Target.Value, args.User, Damage, Duration, true, ignoreInsulation: true );
}
}

View File

@@ -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 = () =>
{

View File

@@ -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

View File

@@ -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
event: !type:CP14WorldTargetModularEffectEvent
effects:
- !type:CP14SpellDash
speed: 20
range: 3.5

View File

@@ -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

View File

@@ -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

View File

@@ -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
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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
event: !type:CP14EntityTargetModularEffectEvent
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectMagicSplitting
effects:
- !type:CP14SpellMixSolution
reactionTypes:
- CP14MagicSplitting
- !type:CP14SpellApplyEntityEffect
effects:
- !type:CP14ManaChange
manaDelta: -5
safe: false

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
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

View File

@@ -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
event: !type:CP14InstantModularEffectEvent
telegraphyEffects:
- !type:CP14SpellApplyEntityEffect
effects:
- !type:Jitter
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectBloodEssence
- !type:CP14SpellSpawnInHandEntity
spawns:
- CP14BloodEssence

View File

@@ -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

Some files were not shown because too many files have changed in this diff Show More