Magic system refactor part 1 (#1709)
* Refactor pacified block logic to action system Moved pacified block functionality from magic spell components to the new CP14ActionSystem and related components. Removed CP14MagicEffectPacifiedBlockComponent and its logic, and introduced CP14ActionDangerousComponent for handling pacified checks. Updated examine and checks logic to use the new action-based components, improving separation of concerns between magic and action systems. * finish pacified * mobtargetstate refactor * skillpoint cost refactor * somaticAspect refactor * material cost refactor * mana cost now * stamina cost * SSD + verbal aspect * religion * music tool refactor * vampire * get rid of this event * manacost refac * Remove magicType field from spell definitions Eliminated the 'magicType' property from all CP14MagicEffect components in spell YAML files across Electric, Fire, Life, Light, and Water categories. This streamlines spell configuration and may reflect a change in how magic types are handled in the system. * Remove mana cost reduction effects from skill tiers Eliminated the ModifyManacost effects from tier 2 and tier 3 skills in electromancy, healing, hydrosophistry, illusion, and pyrokinetic. This change standardizes skill progression and may be part of a balance update to mana cost mechanics. * comment out T3 tiers * namespace refactor * fix hands
This commit is contained in:
7
Content.Client/_CP14/Actions/CP14ClientActionSystem.cs
Normal file
7
Content.Client/_CP14/Actions/CP14ClientActionSystem.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using Content.Shared._CP14.Actions;
|
||||
|
||||
namespace Content.Client._CP14.Actions;
|
||||
|
||||
public sealed partial class CP14ClientActionSystem : CP14SharedActionSystem
|
||||
{
|
||||
}
|
||||
@@ -2,4 +2,4 @@ using Content.Shared._CP14.MagicEnergy;
|
||||
|
||||
namespace Content.Client._CP14.MagicEnergy;
|
||||
|
||||
public sealed class CP14MagicEnergySystem : SharedCP14MagicEnergySystem;
|
||||
public sealed class CP14MagicEnergySystem : CP14SharedMagicEnergySystem;
|
||||
|
||||
43
Content.Server/_CP14/Actions/CP14ActionSystem.cs
Normal file
43
Content.Server/_CP14/Actions/CP14ActionSystem.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Content.Server.Instruments;
|
||||
using Content.Shared._CP14.Actions;
|
||||
using Content.Shared._CP14.MagicSpell.Components;
|
||||
using Content.Shared.Actions.Events;
|
||||
using Content.Shared.Instruments;
|
||||
|
||||
namespace Content.Server._CP14.Actions;
|
||||
|
||||
public sealed partial class CP14ActionSystem : CP14SharedActionSystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<CP14ActionRequiredMusicToolComponent, ActionAttemptEvent>(OnActionMusicAttempt);
|
||||
}
|
||||
|
||||
private void OnActionMusicAttempt(Entity<CP14ActionRequiredMusicToolComponent> ent, ref ActionAttemptEvent args)
|
||||
{
|
||||
if (args.Cancelled)
|
||||
return;
|
||||
|
||||
var passed = false;
|
||||
var query = EntityQueryEnumerator<ActiveInstrumentComponent, InstrumentComponent>();
|
||||
while (query.MoveNext(out var uid, out var active, out var instrument))
|
||||
{
|
||||
if (!instrument.Playing)
|
||||
continue;
|
||||
|
||||
if (Transform(uid).ParentUid != args.User)
|
||||
continue;
|
||||
|
||||
passed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (passed)
|
||||
return;
|
||||
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-music-aspect"), args.User, args.User);
|
||||
args.Cancelled = true;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server._CP14.MagicEnergy;
|
||||
|
||||
public sealed partial class CP14MagicEnergySystem : SharedCP14MagicEnergySystem
|
||||
public sealed partial class CP14MagicEnergySystem : CP14SharedMagicEnergySystem
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly CP14MagicEnergyCrystalSlotSystem _magicSlot = default!;
|
||||
|
||||
@@ -2,6 +2,7 @@ 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;
|
||||
@@ -40,12 +41,10 @@ public sealed class CP14MagicSystem : CP14SharedMagicSystem
|
||||
SubscribeLocalEvent<CP14SpellEffectOnHitComponent, ThrowDoHitEvent>(OnProjectileHit);
|
||||
SubscribeLocalEvent<CP14SpellEffectOnCollideComponent, StartCollideEvent>(OnStartCollide);
|
||||
|
||||
SubscribeLocalEvent<CP14MagicEffectVerbalAspectComponent, CP14SpellSpeechEvent>(OnSpellSpoken);
|
||||
SubscribeLocalEvent<CP14ActionSpeakingComponent, CP14ActionSpeechEvent>(OnSpellSpoken);
|
||||
|
||||
SubscribeLocalEvent<CP14MagicEffectCastingVisualComponent, CP14StartCastMagicEffectEvent>(OnSpawnMagicVisualEffect);
|
||||
SubscribeLocalEvent<CP14MagicEffectCastingVisualComponent, CP14EndCastMagicEffectEvent>(OnDespawnMagicVisualEffect);
|
||||
|
||||
SubscribeLocalEvent<CP14MagicEffectRequiredMusicToolComponent, CP14CastMagicEffectAttemptEvent>(OnMusicCheck);
|
||||
}
|
||||
|
||||
private void OnStartCollide(Entity<CP14SpellEffectOnCollideComponent> ent, ref StartCollideEvent args)
|
||||
@@ -121,7 +120,7 @@ public sealed class CP14MagicSystem : CP14SharedMagicSystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSpellSpoken(Entity<CP14MagicEffectVerbalAspectComponent> ent, ref CP14SpellSpeechEvent args)
|
||||
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);
|
||||
@@ -139,27 +138,4 @@ public sealed class CP14MagicSystem : CP14SharedMagicSystem
|
||||
QueueDel(ent.Comp.SpawnedEntity);
|
||||
ent.Comp.SpawnedEntity = null;
|
||||
}
|
||||
|
||||
private void OnMusicCheck(Entity<CP14MagicEffectRequiredMusicToolComponent> ent, ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
var passed = false;
|
||||
var query = EntityQueryEnumerator<ActiveInstrumentComponent, InstrumentComponent>();
|
||||
while (query.MoveNext(out var uid, out var active, out var instrument))
|
||||
{
|
||||
if (!instrument.Playing)
|
||||
continue;
|
||||
|
||||
if (Transform(uid).ParentUid != args.Performer)
|
||||
continue;
|
||||
|
||||
passed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (passed)
|
||||
return;
|
||||
|
||||
args.PushReason(Loc.GetString("cp14-magic-music-aspect"));
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@ namespace Content.Server._CP14.ModularCraft.Modifiers;
|
||||
|
||||
public sealed partial class EditManacostModify : CP14ModularCraftModifier
|
||||
{
|
||||
[DataField]
|
||||
public Dictionary<ProtoId<CP14MagicTypePrototype>, FixedPoint2> Modifiers = new();
|
||||
|
||||
[DataField]
|
||||
public FixedPoint2 GlobalModifier = 1f;
|
||||
|
||||
@@ -20,21 +17,6 @@ public sealed partial class EditManacostModify : CP14ModularCraftModifier
|
||||
if (!entManager.TryGetComponent<CP14MagicManacostModifyComponent>(start, out var manacostModifyComp))
|
||||
return;
|
||||
|
||||
foreach (var (magicType, modifier) in Modifiers)
|
||||
{
|
||||
if (manacostModifyComp.Modifiers.ContainsKey(magicType))
|
||||
{
|
||||
if (modifier >= 1f)
|
||||
manacostModifyComp.Modifiers[magicType] += modifier - 1f;
|
||||
else
|
||||
manacostModifyComp.Modifiers[magicType] -= 1f - modifier;
|
||||
}
|
||||
else
|
||||
{
|
||||
manacostModifyComp.Modifiers[magicType] = modifier;
|
||||
}
|
||||
}
|
||||
|
||||
manacostModifyComp.GlobalModifier += GlobalModifier;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Shared.CCVar;
|
||||
using Robust.Server;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
@@ -10,7 +9,6 @@ public sealed partial class CP14RoundEndSystem
|
||||
{
|
||||
[Dependency] private readonly IConsoleHost _consoleHost = default!;
|
||||
[Dependency] private readonly GameTicker _ticker = default!;
|
||||
[Dependency] private readonly IBaseServer _baseServer = default!;
|
||||
|
||||
private TimeSpan _nextUpdateTime = TimeSpan.Zero;
|
||||
private readonly TimeSpan _updateFrequency = TimeSpan.FromSeconds(60f);
|
||||
@@ -114,7 +112,7 @@ public sealed partial class CP14RoundEndSystem
|
||||
{
|
||||
var ruDays = now.DayOfWeek is DayOfWeek.Tuesday || now.DayOfWeek is DayOfWeek.Thursday || now.DayOfWeek is DayOfWeek.Saturday;
|
||||
|
||||
var timeMap = new (int Hour, int Minute, Action Action)[]
|
||||
var timeMap = new (int Hour, int Minute, System.Action Action)[]
|
||||
{
|
||||
(21, 45, () =>
|
||||
{
|
||||
|
||||
280
Content.Shared/_CP14/Actions/CP14ActionSystem.Attempt.cs
Normal file
280
Content.Shared/_CP14/Actions/CP14ActionSystem.Attempt.cs
Normal file
@@ -0,0 +1,280 @@
|
||||
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.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);
|
||||
SubscribeLocalEvent<CP14ActionSpeakingComponent, ActionAttemptEvent>(OnVerbalActionAttempt);
|
||||
SubscribeLocalEvent<CP14ActionMaterialCostComponent, ActionAttemptEvent>(OnMaterialActionAttempt);
|
||||
SubscribeLocalEvent<CP14ActionManaCostComponent, ActionAttemptEvent>(OnManacostActionAttempt);
|
||||
SubscribeLocalEvent<CP14ActionStaminaCostComponent, ActionAttemptEvent>(OnStaminaCostActionAttempt);
|
||||
SubscribeLocalEvent<CP14ActionDangerousComponent, ActionAttemptEvent>(OnDangerousActionAttempt);
|
||||
SubscribeLocalEvent<CP14ActionSkillPointCostComponent, ActionAttemptEvent>(OnSkillPointActionAttempt);
|
||||
|
||||
SubscribeLocalEvent<CP14ActionSSDBlockComponent, ActionValidateEvent>(OnActionSSDAttempt);
|
||||
SubscribeLocalEvent<CP14ActionTargetMobStatusRequiredComponent, ActionValidateEvent>(OnTargetMobStatusRequiredValidate);
|
||||
SubscribeLocalEvent<CP14ActionReligionRestrictedComponent, ActionValidateEvent>(OnReligionActionValidate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Before using a spell, a mana check is made for the amount of mana to show warnings.
|
||||
/// </summary>
|
||||
private void OnManacostActionAttempt(Entity<CP14ActionManaCostComponent> ent, ref ActionAttemptEvent args)
|
||||
{
|
||||
if (args.Cancelled)
|
||||
return;
|
||||
|
||||
TryComp<CP14MagicEffectComponent>(ent, out var magicEffect);
|
||||
|
||||
//Total man required
|
||||
var requiredMana = ent.Comp.ManaCost;
|
||||
|
||||
if (ent.Comp.CanModifyManacost)
|
||||
{
|
||||
var manaEv = new CP14CalculateManacostEvent(args.User, ent.Comp.ManaCost);
|
||||
|
||||
RaiseLocalEvent(args.User, manaEv);
|
||||
|
||||
if (magicEffect?.SpellStorage is not null)
|
||||
RaiseLocalEvent(magicEffect.SpellStorage.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))
|
||||
requiredMana = MathF.Max(0, (float)(requiredMana - magicContainer.Energy));
|
||||
|
||||
if (requiredMana <= 0)
|
||||
return;
|
||||
|
||||
//Second - trying get mana from performer
|
||||
if (!TryComp<CP14MagicEnergyContainerComponent>(args.User, out var playerMana))
|
||||
{
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-no-mana-component"), args.User, args.User);
|
||||
args.Cancelled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_magicEnergy.HasEnergy(args.User, requiredMana, playerMana, true) && _timing.IsFirstTimePredicted)
|
||||
Popup.PopupClient(Loc.GetString($"cp14-magic-spell-not-enough-mana-cast-warning-{_random.Next(5)}"),
|
||||
args.User,
|
||||
args.User,
|
||||
PopupType.SmallCaution);
|
||||
}
|
||||
|
||||
private void OnStaminaCostActionAttempt(Entity<CP14ActionStaminaCostComponent> ent, ref ActionAttemptEvent args)
|
||||
{
|
||||
if (!TryComp<StaminaComponent>(args.User, out var staminaComp))
|
||||
return;
|
||||
|
||||
if (!staminaComp.Critical)
|
||||
return;
|
||||
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-stamina-not-enough"), args.User, args.User);
|
||||
args.Cancelled = true;
|
||||
}
|
||||
|
||||
private void OnSomaticActionAttempt(Entity<CP14ActionFreeHandsRequiredComponent> ent, ref ActionAttemptEvent args)
|
||||
{
|
||||
if (args.Cancelled)
|
||||
return;
|
||||
|
||||
if (TryComp<HandsComponent>(args.User, out var hands))
|
||||
{
|
||||
if (_hand.CountFreeHands((args.User, hands)) >= ent.Comp.FreeHandRequired)
|
||||
return;
|
||||
}
|
||||
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-need-somatic-component"), args.User, args.User);
|
||||
args.Cancelled = true;
|
||||
}
|
||||
|
||||
private void OnVerbalActionAttempt(Entity<CP14ActionSpeakingComponent> ent, ref ActionAttemptEvent args)
|
||||
{
|
||||
if (!HasComp<MutedComponent>(args.User))
|
||||
return;
|
||||
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-need-verbal-component"), args.User, args.User);
|
||||
args.Cancelled = true;
|
||||
}
|
||||
|
||||
private void OnMaterialActionAttempt(Entity<CP14ActionMaterialCostComponent> ent, ref ActionAttemptEvent args)
|
||||
{
|
||||
if (args.Cancelled)
|
||||
return;
|
||||
|
||||
if (ent.Comp.Requirement is null)
|
||||
return;
|
||||
|
||||
HashSet<EntityUid> heldedItems = new();
|
||||
|
||||
foreach (var hand in _hand.EnumerateHands(args.User))
|
||||
{
|
||||
var helded = _hand.GetHeldItem(args.User, hand);
|
||||
if (helded is not null)
|
||||
heldedItems.Add(helded.Value);
|
||||
}
|
||||
|
||||
if (!ent.Comp.Requirement.CheckRequirement(EntityManager, _proto, heldedItems))
|
||||
{
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-need-material-component"), args.User, args.User);
|
||||
args.Cancelled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDangerousActionAttempt(Entity<CP14ActionDangerousComponent> ent, ref ActionAttemptEvent args)
|
||||
{
|
||||
if (args.Cancelled)
|
||||
return;
|
||||
|
||||
if (HasComp<PacifiedComponent>(args.User))
|
||||
{
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-pacified"), args.User, args.User);
|
||||
args.Cancelled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSkillPointActionAttempt(Entity<CP14ActionSkillPointCostComponent> ent, ref ActionAttemptEvent args)
|
||||
{
|
||||
if (!_proto.TryIndex(ent.Comp.SkillPoint, out var indexedSkillPoint) || ent.Comp.SkillPoint is null)
|
||||
return;
|
||||
|
||||
if (!TryComp<CP14SkillStorageComponent>(args.User, out var skillStorage))
|
||||
{
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-skillpoint-not-enough",
|
||||
("name", Loc.GetString(indexedSkillPoint.Name)),
|
||||
("count", ent.Comp.Count)),
|
||||
args.User,
|
||||
args.User);
|
||||
args.Cancelled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
var points = skillStorage.SkillPoints;
|
||||
if (points.TryGetValue(ent.Comp.SkillPoint.Value, out var currentPoints))
|
||||
{
|
||||
var freePoints = currentPoints.Max - currentPoints.Sum;
|
||||
|
||||
if (freePoints < ent.Comp.Count)
|
||||
{
|
||||
var d = ent.Comp.Count - freePoints;
|
||||
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-skillpoint-not-enough",
|
||||
("name", Loc.GetString(indexedSkillPoint.Name)),
|
||||
("count", d)),
|
||||
args.User,
|
||||
args.User);
|
||||
args.Cancelled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTargetMobStatusRequiredValidate(Entity<CP14ActionTargetMobStatusRequiredComponent> ent,
|
||||
ref ActionValidateEvent args)
|
||||
{
|
||||
if (args.Invalid)
|
||||
return;
|
||||
|
||||
var target = GetEntity(args.Input.EntityTarget);
|
||||
|
||||
if (!TryComp<MobStateComponent>(target, out var mobStateComp))
|
||||
{
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-target-not-mob"), args.User, args.User);
|
||||
args.Invalid = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ent.Comp.AllowedStates.Contains(mobStateComp.CurrentState))
|
||||
{
|
||||
var states = string.Join(", ",
|
||||
ent.Comp.AllowedStates.Select(state => state switch
|
||||
{
|
||||
MobState.Alive => Loc.GetString("cp14-magic-spell-target-mob-state-live"),
|
||||
MobState.Dead => Loc.GetString("cp14-magic-spell-target-mob-state-dead"),
|
||||
MobState.Critical => Loc.GetString("cp14-magic-spell-target-mob-state-critical")
|
||||
}));
|
||||
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-target-mob-state", ("state", states)),
|
||||
args.User,
|
||||
args.User);
|
||||
args.Invalid = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnActionSSDAttempt(Entity<CP14ActionSSDBlockComponent> ent, ref ActionValidateEvent args)
|
||||
{
|
||||
if (args.Invalid)
|
||||
return;
|
||||
|
||||
if (!TryComp<SSDIndicatorComponent>(GetEntity(args.Input.EntityTarget), out var ssdIndication))
|
||||
return;
|
||||
|
||||
if (ssdIndication.IsSSD)
|
||||
{
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-ssd"), args.User, args.User);
|
||||
args.Invalid = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnReligionActionValidate(Entity<CP14ActionReligionRestrictedComponent> ent, ref ActionValidateEvent args)
|
||||
{
|
||||
if (args.Invalid)
|
||||
return;
|
||||
|
||||
if (!TryComp<CP14ReligionEntityComponent>(args.User, out var religionComp))
|
||||
return;
|
||||
|
||||
var position = GetCoordinates(args.Input.EntityCoordinatesTarget);
|
||||
var target = GetEntity(args.Input.EntityTarget);
|
||||
|
||||
if (target is not null)
|
||||
position ??= Transform(target.Value).Coordinates;
|
||||
|
||||
if (ent.Comp.OnlyInReligionZone)
|
||||
{
|
||||
if (position is null || !_god.InVision(position.Value, (args.User, religionComp)))
|
||||
{
|
||||
args.Invalid = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (ent.Comp.OnlyOnFollowers)
|
||||
{
|
||||
if (target is null || !TryComp<CP14ReligionFollowerComponent>(target, out var follower) || follower.Religion != religionComp.Religion)
|
||||
{
|
||||
Popup.PopupClient(Loc.GetString("cp14-magic-spell-target-god-follower"), args.User, args.User);
|
||||
args.Invalid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Content.Shared/_CP14/Actions/CP14ActionSystem.Examine.cs
Normal file
74
Content.Shared/_CP14/Actions/CP14ActionSystem.Examine.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using System.Linq;
|
||||
using Content.Shared._CP14.Actions.Components;
|
||||
using Content.Shared._CP14.MagicSpell.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Mobs;
|
||||
|
||||
namespace Content.Shared._CP14.Actions;
|
||||
|
||||
public abstract partial class CP14SharedActionSystem
|
||||
{
|
||||
private void InitializeExamine()
|
||||
{
|
||||
SubscribeLocalEvent<CP14ActionManaCostComponent, ExaminedEvent>(OnManacostExamined);
|
||||
SubscribeLocalEvent<CP14ActionStaminaCostComponent, ExaminedEvent>(OnStaminaCostExamined);
|
||||
SubscribeLocalEvent<CP14ActionSkillPointCostComponent, ExaminedEvent>(OnSkillPointCostExamined);
|
||||
|
||||
SubscribeLocalEvent<CP14ActionSpeakingComponent, ExaminedEvent>(OnVerbalExamined);
|
||||
SubscribeLocalEvent<CP14ActionFreeHandsRequiredComponent, ExaminedEvent>(OnSomaticExamined);
|
||||
SubscribeLocalEvent<CP14ActionMaterialCostComponent, ExaminedEvent>(OnMaterialExamined);
|
||||
SubscribeLocalEvent<CP14ActionRequiredMusicToolComponent, ExaminedEvent>(OnMusicExamined);
|
||||
SubscribeLocalEvent<CP14ActionTargetMobStatusRequiredComponent, ExaminedEvent>(OnMobStateExamined);
|
||||
}
|
||||
|
||||
private void OnManacostExamined(Entity<CP14ActionManaCostComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup($"{Loc.GetString("cp14-magic-manacost")}: [color=#5da9e8]{ent.Comp.ManaCost}[/color]", priority: 9);
|
||||
}
|
||||
|
||||
private void OnStaminaCostExamined(Entity<CP14ActionStaminaCostComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup($"{Loc.GetString("cp14-magic-staminacost")}: [color=#3fba54]{ent.Comp.Stamina}[/color]", priority: 9);
|
||||
}
|
||||
|
||||
private void OnSkillPointCostExamined(Entity<CP14ActionSkillPointCostComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
if (!_proto.TryIndex(ent.Comp.SkillPoint, out var indexedSkillPoint))
|
||||
return;
|
||||
|
||||
args.PushMarkup($"{Loc.GetString("cp14-magic-skillpointcost", ("name", Loc.GetString(indexedSkillPoint.Name)), ("count", ent.Comp.Count))}", priority: 9);
|
||||
}
|
||||
|
||||
private void OnVerbalExamined(Entity<CP14ActionSpeakingComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-verbal-aspect"), 8);
|
||||
}
|
||||
|
||||
private void OnSomaticExamined(Entity<CP14ActionFreeHandsRequiredComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-somatic-aspect") + " " + ent.Comp.FreeHandRequired, 8);
|
||||
}
|
||||
|
||||
private void OnMaterialExamined(Entity<CP14ActionMaterialCostComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
if (ent.Comp.Requirement is not null)
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-material-aspect") + " " + ent.Comp.Requirement.GetRequirementTitle(_proto));
|
||||
}
|
||||
private void OnMusicExamined(Entity<CP14ActionRequiredMusicToolComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-music-aspect"));
|
||||
}
|
||||
|
||||
private void OnMobStateExamined(Entity<CP14ActionTargetMobStatusRequiredComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
var states = string.Join(", ",
|
||||
ent.Comp.AllowedStates.Select(state => state switch
|
||||
{
|
||||
MobState.Alive => Loc.GetString("cp14-magic-spell-target-mob-state-live"),
|
||||
MobState.Dead => Loc.GetString("cp14-magic-spell-target-mob-state-dead"),
|
||||
MobState.Critical => Loc.GetString("cp14-magic-spell-target-mob-state-critical")
|
||||
}));
|
||||
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-spell-target-mob-state", ("state", states)));
|
||||
}
|
||||
}
|
||||
17
Content.Shared/_CP14/Actions/CP14SharedActionSystem.cs
Normal file
17
Content.Shared/_CP14/Actions/CP14SharedActionSystem.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared._CP14.Actions;
|
||||
|
||||
public abstract partial class CP14SharedActionSystem : EntitySystem
|
||||
{
|
||||
[Dependency] protected readonly SharedPopupSystem Popup = default!;
|
||||
[Dependency] private readonly IPrototypeManager _proto = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
InitializeAttempts();
|
||||
InitializeExamine();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Content.Shared._CP14.MagicSpell;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared._CP14.Actions.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Blocks the target from using magic if they are pacified.
|
||||
/// Also block using spell on SSD player
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class CP14ActionDangerousComponent : Component
|
||||
{
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
/// Requires the user to have at least one free hand to use this spell
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectSomaticAspectComponent : Component
|
||||
public sealed partial class CP14ActionFreeHandsRequiredComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public int FreeHandRequired = 1;
|
||||
@@ -1,12 +1,12 @@
|
||||
using Content.Shared.FixedPoint;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
namespace Content.Shared._CP14.Actions.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Restricts the use of this action, by spending mana or user requirements.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectManaCostComponent : Component
|
||||
[RegisterComponent]
|
||||
public sealed partial class CP14ActionManaCostComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public FixedPoint2 ManaCost = 0f;
|
||||
@@ -1,12 +1,12 @@
|
||||
using Content.Shared._CP14.Workbench;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
namespace Content.Shared._CP14.Actions.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Requires the caster to hold a specific resource in their hand, which will be spent to use the spell.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectMaterialAspectComponent : Component
|
||||
[RegisterComponent]
|
||||
public sealed partial class CP14ActionMaterialCostComponent : Component
|
||||
{
|
||||
[DataField(required: true)]
|
||||
public CP14WorkbenchCraftRequirement? Requirement;
|
||||
@@ -1,10 +1,11 @@
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
|
||||
namespace Content.Shared._CP14.Actions.Components;
|
||||
|
||||
/// <summary>
|
||||
/// If the user belongs to a religion, this spell can only be used within the area of influence of that religion
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectReligionRestrictedComponent : Component
|
||||
[RegisterComponent]
|
||||
public sealed partial class CP14ActionReligionRestrictedComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// does not allow the spell to be used outside the god's area of influence
|
||||
@@ -0,0 +1,11 @@
|
||||
using Content.Shared._CP14.MagicSpell;
|
||||
|
||||
namespace Content.Shared._CP14.Actions.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Blocks the user from using action against target target in SSD.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14ActionSSDBlockComponent : Component
|
||||
{
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
using Content.Shared._CP14.Skill.Prototypes;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
namespace Content.Shared._CP14.Actions.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Restricts the use of this action, by spending user skillpoints
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectSkillPointCostComponent : Component
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class CP14ActionSkillPointCostComponent : Component
|
||||
{
|
||||
[DataField(required: true)]
|
||||
public ProtoId<CP14SkillPointPrototype>? SkillPoint;
|
||||
@@ -1,10 +1,10 @@
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
namespace Content.Shared._CP14.Actions.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
|
||||
/// Requires the user to be able to speak in order to use this action. Also forces the user to use certain phrases at the beginning and end of a action use
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectVerbalAspectComponent : Component
|
||||
[RegisterComponent]
|
||||
public sealed partial class CP14ActionSpeakingComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public string StartSpeech = string.Empty; //Not LocId!
|
||||
@@ -17,7 +17,7 @@ public sealed partial class CP14MagicEffectVerbalAspectComponent : Component
|
||||
/// patch to send an event to the server for saying a phrase out loud
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public sealed class CP14SpellSpeechEvent : EntityEventArgs
|
||||
public sealed class CP14ActionSpeechEvent : EntityEventArgs
|
||||
{
|
||||
public EntityUid? Performer { get; init; }
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
using Content.Shared._CP14.MagicSpell;
|
||||
|
||||
namespace Content.Shared._CP14.Actions.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Restricts the use of this action, by spending stamina.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectStaminaCostComponent : Component
|
||||
public sealed partial class CP14ActionStaminaCostComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public float Stamina = 0f;
|
||||
@@ -1,13 +1,13 @@
|
||||
using Content.Shared.Mobs;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
namespace Content.Shared._CP14.Actions.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Allows you to limit the use of a spell based on the target's alive/dead status
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class CP14MagicEffectTargetMobStatusRequiredComponent : Component
|
||||
public sealed partial class CP14ActionTargetMobStatusRequiredComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public HashSet<MobState> AllowedStates = new() { MobState.Alive };
|
||||
@@ -35,7 +35,7 @@ public sealed partial class CP14ManaChange : EntityEffect
|
||||
if (args is EntityEffectReagentArgs reagentArgs)
|
||||
scale = ScaleByQuantity ? reagentArgs.Quantity * reagentArgs.Scale : reagentArgs.Scale;
|
||||
|
||||
var magicSystem = entityManager.System<SharedCP14MagicEnergySystem>();
|
||||
var magicSystem = entityManager.System<CP14SharedMagicEnergySystem>();
|
||||
magicSystem.ChangeEnergy(args.TargetEntity, ManaDelta * scale, out var changed, out var overload, safe: Safe);
|
||||
|
||||
scale -= FixedPoint2.Abs(changed + overload);
|
||||
|
||||
@@ -9,7 +9,7 @@ using Content.Shared.Rounding;
|
||||
|
||||
namespace Content.Shared._CP14.MagicEnergy;
|
||||
|
||||
public abstract class SharedCP14MagicEnergySystem : EntitySystem
|
||||
public abstract class CP14SharedMagicEnergySystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly AlertsSystem _alerts = default!;
|
||||
[Dependency] private readonly SharedAmbientSoundSystem _ambient = default!;
|
||||
@@ -9,7 +9,7 @@ namespace Content.Shared._CP14.MagicEnergy.Components;
|
||||
/// Allows an item to store magical energy within itself.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
[Access(typeof(SharedCP14MagicEnergySystem))]
|
||||
[Access(typeof(CP14SharedMagicEnergySystem))]
|
||||
public sealed partial class CP14MagicEnergyContainerComponent : Component
|
||||
{
|
||||
[DataField, AutoNetworkedField]
|
||||
|
||||
@@ -6,5 +6,5 @@ namespace Content.Shared._CP14.MagicEnergy.Components;
|
||||
/// Allows you to examine how much energy is in that object.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[Access(typeof(SharedCP14MagicEnergySystem))]
|
||||
[Access(typeof(CP14SharedMagicEnergySystem))]
|
||||
public sealed partial class CP14MagicEnergyExaminableComponent : Component;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Shared._CP14.MagicEnergy.Components;
|
||||
/// <summary>
|
||||
/// Restores or expends magical energy when taking damage of certain types.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))]
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicEnergySystem))]
|
||||
public sealed partial class CP14MagicEnergyFromDamageComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Shared._CP14.MagicEnergy.Components;
|
||||
/// <summary>
|
||||
/// Restores mana if the entity is in the sun, and wastes it if not
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))]
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicEnergySystem))]
|
||||
public sealed partial class CP14MagicEnergyPhotosynthesisComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
|
||||
@@ -12,7 +12,7 @@ public abstract class SharedCP14MagicEnergyCrystalSlotSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly ItemSlotsSystem _itemSlots = default!;
|
||||
[Dependency] private readonly SharedCP14MagicEnergySystem _magicEnergy = default!;
|
||||
[Dependency] private readonly CP14SharedMagicEnergySystem _magicEnergy = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _container = default!;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Content.Shared._CP14.MagicEssence;
|
||||
/// <summary>
|
||||
/// Allows you to see how much magic essence is stored in objects
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))]
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicEnergySystem))]
|
||||
public sealed partial class CP14MagicEssenceScannerComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public partial class CP14MagicEssenceSystem : EntitySystem
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelist = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly INetManager _net = default!;
|
||||
[Dependency] private readonly SharedCP14MagicEnergySystem _magicEnergy = default!;
|
||||
[Dependency] private readonly CP14SharedMagicEnergySystem _magicEnergy = default!;
|
||||
[Dependency] private readonly SharedSolutionContainerSystem _solution = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
|
||||
|
||||
@@ -10,9 +10,6 @@ namespace Content.Shared._CP14.MagicManacostModify;
|
||||
[RegisterComponent]
|
||||
public sealed partial class CP14MagicManacostModifyComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public Dictionary<ProtoId<CP14MagicTypePrototype>, FixedPoint2> Modifiers = new();
|
||||
|
||||
[DataField]
|
||||
public FixedPoint2 GlobalModifier = 1f;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public sealed partial class CP14MagicManacostModifySystem : EntitySystem
|
||||
if (!args.CanInteract || !args.CanAccess || !ent.Comp.Examinable)
|
||||
return;
|
||||
|
||||
var markup = GetManacostModifyMessage(ent.Comp.GlobalModifier, ent.Comp.Modifiers);
|
||||
var markup = GetManacostModifyMessage(ent.Comp.GlobalModifier);
|
||||
_examine.AddDetailedExamineVerb(
|
||||
args,
|
||||
ent.Comp,
|
||||
@@ -38,7 +38,7 @@ public sealed partial class CP14MagicManacostModifySystem : EntitySystem
|
||||
Loc.GetString("cp14-magic-examinable-verb-message"));
|
||||
}
|
||||
|
||||
public FormattedMessage GetManacostModifyMessage(FixedPoint2 global, Dictionary<ProtoId<CP14MagicTypePrototype>, FixedPoint2> modifiers)
|
||||
public FormattedMessage GetManacostModifyMessage(FixedPoint2 global)
|
||||
{
|
||||
var msg = new FormattedMessage();
|
||||
msg.AddMarkupOrThrow(Loc.GetString("cp14-clothing-magic-examine"));
|
||||
@@ -52,18 +52,6 @@ public sealed partial class CP14MagicManacostModifySystem : EntitySystem
|
||||
$"{Loc.GetString("cp14-clothing-magic-global")}: {plus}{MathF.Round((float)(global - 1) * 100, MidpointRounding.AwayFromZero)}%");
|
||||
}
|
||||
|
||||
foreach (var modifier in modifiers)
|
||||
{
|
||||
if (modifier.Value == 1)
|
||||
continue;
|
||||
|
||||
msg.PushNewline();
|
||||
|
||||
var plus = modifier.Value > 1 ? "+" : "";
|
||||
var indexedType = _proto.Index(modifier.Key);
|
||||
msg.AddMarkupOrThrow($"- [color={indexedType.Color.ToHex()}]{Loc.GetString(indexedType.Name)}[/color]: {plus}{(modifier.Value - 1)*100}%");
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
@@ -75,10 +63,5 @@ public sealed partial class CP14MagicManacostModifySystem : EntitySystem
|
||||
private void OnCalculateManacost(Entity<CP14MagicManacostModifyComponent> ent, ref CP14CalculateManacostEvent args)
|
||||
{
|
||||
args.Multiplier *= (float)ent.Comp.GlobalModifier;
|
||||
|
||||
if (args.MagicType is not null && ent.Comp.Modifiers.TryGetValue(args.MagicType.Value, out var modifier))
|
||||
{
|
||||
args.Multiplier *= (float)modifier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,11 @@
|
||||
using System.Linq;
|
||||
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.Components;
|
||||
using Content.Shared._CP14.Religion.Systems;
|
||||
using Content.Shared._CP14.Skill;
|
||||
using Content.Shared._CP14.Skill.Components;
|
||||
using Content.Shared.CombatMode.Pacification;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.FixedPoint;
|
||||
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;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell;
|
||||
|
||||
@@ -27,237 +17,24 @@ public abstract partial class CP14SharedMagicSystem
|
||||
|
||||
private void InitializeChecks()
|
||||
{
|
||||
SubscribeLocalEvent<CP14MagicEffectSomaticAspectComponent, CP14CastMagicEffectAttemptEvent>(OnSomaticCheck);
|
||||
SubscribeLocalEvent<CP14MagicEffectVerbalAspectComponent, CP14CastMagicEffectAttemptEvent>(OnVerbalCheck);
|
||||
SubscribeLocalEvent<CP14MagicEffectMaterialAspectComponent, CP14CastMagicEffectAttemptEvent>(OnMaterialCheck);
|
||||
SubscribeLocalEvent<CP14MagicEffectManaCostComponent, CP14CastMagicEffectAttemptEvent>(OnManaCheck);
|
||||
SubscribeLocalEvent<CP14MagicEffectStaminaCostComponent, CP14CastMagicEffectAttemptEvent>(OnStaminaCheck);
|
||||
SubscribeLocalEvent<CP14MagicEffectSkillPointCostComponent, CP14CastMagicEffectAttemptEvent>(OnSkillPointCheck);
|
||||
SubscribeLocalEvent<CP14MagicEffectPacifiedBlockComponent, CP14CastMagicEffectAttemptEvent>(OnPacifiedCheck);
|
||||
SubscribeLocalEvent<CP14MagicEffectSSDBlockComponent, CP14CastMagicEffectAttemptEvent>(OnSSDCheck);
|
||||
SubscribeLocalEvent<CP14MagicEffectTargetMobStatusRequiredComponent, CP14CastMagicEffectAttemptEvent>(OnMobStateCheck);
|
||||
SubscribeLocalEvent<CP14MagicEffectReligionRestrictedComponent, CP14CastMagicEffectAttemptEvent>(OnReligionRestrictedCheck);
|
||||
|
||||
//Verbal speaking
|
||||
SubscribeLocalEvent<CP14MagicEffectVerbalAspectComponent, CP14StartCastMagicEffectEvent>(OnVerbalAspectStartCast);
|
||||
SubscribeLocalEvent<CP14MagicEffectVerbalAspectComponent, CP14MagicEffectConsumeResourceEvent>(OnVerbalAspectAfterCast);
|
||||
SubscribeLocalEvent<CP14ActionSpeakingComponent, CP14StartCastMagicEffectEvent>(OnVerbalAspectStartCast);
|
||||
SubscribeLocalEvent<CP14ActionSpeakingComponent, CP14MagicEffectConsumeResourceEvent>(OnVerbalAspectAfterCast);
|
||||
|
||||
SubscribeLocalEvent<CP14MagicEffectEmotingComponent, CP14StartCastMagicEffectEvent>(OnEmoteStartCast);
|
||||
SubscribeLocalEvent<CP14MagicEffectEmotingComponent, CP14MagicEffectConsumeResourceEvent>(OnEmoteEndCast);
|
||||
|
||||
//Consuming resources
|
||||
SubscribeLocalEvent<CP14MagicEffectMaterialAspectComponent, CP14MagicEffectConsumeResourceEvent>(OnMaterialAspectEndCast);
|
||||
SubscribeLocalEvent<CP14MagicEffectStaminaCostComponent, CP14MagicEffectConsumeResourceEvent>(OnStaminaConsume);
|
||||
SubscribeLocalEvent<CP14MagicEffectManaCostComponent, CP14MagicEffectConsumeResourceEvent>(OnManaConsume);
|
||||
SubscribeLocalEvent<CP14MagicEffectSkillPointCostComponent, CP14MagicEffectConsumeResourceEvent>(OnSkillPointConsume);
|
||||
SubscribeLocalEvent<CP14ActionMaterialCostComponent, CP14MagicEffectConsumeResourceEvent>(OnMaterialAspectEndCast);
|
||||
SubscribeLocalEvent<CP14ActionStaminaCostComponent, CP14MagicEffectConsumeResourceEvent>(OnStaminaConsume);
|
||||
SubscribeLocalEvent<CP14ActionManaCostComponent, CP14MagicEffectConsumeResourceEvent>(OnManaConsume);
|
||||
SubscribeLocalEvent<CP14ActionSkillPointCostComponent, CP14MagicEffectConsumeResourceEvent>(OnSkillPointConsume);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Before using a spell, a mana check is made for the amount of mana to show warnings.
|
||||
/// </summary>
|
||||
private void OnManaCheck(Entity<CP14MagicEffectManaCostComponent> ent, ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
//Total man required
|
||||
var requiredMana = CalculateManacost(ent, args.Performer);
|
||||
|
||||
//First - trying get mana from item
|
||||
if (_magicEffectQuery.TryComp(ent, out var magicEffect))
|
||||
{
|
||||
if (magicEffect.SpellStorage is not null &&
|
||||
_magicContainerQuery.TryComp(magicEffect.SpellStorage, out var magicContainer))
|
||||
requiredMana = MathF.Max(0, (float)(requiredMana - magicContainer.Energy));
|
||||
}
|
||||
|
||||
if (requiredMana <= 0)
|
||||
return;
|
||||
|
||||
//Second - trying get mana from performer
|
||||
if (!_magicContainerQuery.TryComp(args.Performer, out var playerMana))
|
||||
{
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-no-mana-component"));
|
||||
args.Cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_magicEnergy.HasEnergy(args.Performer, requiredMana, playerMana, true))
|
||||
_popup.PopupEntity(Loc.GetString($"cp14-magic-spell-not-enough-mana-cast-warning-{_random.Next(5)}"),
|
||||
args.Performer,
|
||||
args.Performer,
|
||||
PopupType.SmallCaution);
|
||||
}
|
||||
|
||||
private void OnStaminaCheck(Entity<CP14MagicEffectStaminaCostComponent> ent,
|
||||
ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
if (!TryComp<StaminaComponent>(args.Performer, out var staminaComp))
|
||||
return;
|
||||
|
||||
if (!staminaComp.Critical)
|
||||
return;
|
||||
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-stamina-not-enough"));
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void OnSkillPointCheck(Entity<CP14MagicEffectSkillPointCostComponent> ent, ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
if (!_proto.TryIndex(ent.Comp.SkillPoint, out var indexedSkillPoint) || ent.Comp.SkillPoint is null)
|
||||
return;
|
||||
|
||||
if (!TryComp<CP14SkillStorageComponent>(args.Performer, out var skillStorage))
|
||||
{
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-skillpoint-not-enough", ("name", Loc.GetString(indexedSkillPoint.Name)), ("count", ent.Comp.Count)));
|
||||
args.Cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
var points = skillStorage.SkillPoints;
|
||||
if (points.TryGetValue(ent.Comp.SkillPoint.Value, out var currentPoints))
|
||||
{
|
||||
var freePoints = currentPoints.Max - currentPoints.Sum;
|
||||
|
||||
if (freePoints < ent.Comp.Count)
|
||||
{
|
||||
var d = ent.Comp.Count - freePoints;
|
||||
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-skillpoint-not-enough",
|
||||
("name", Loc.GetString(indexedSkillPoint.Name)),
|
||||
("count", d)));
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSomaticCheck(Entity<CP14MagicEffectSomaticAspectComponent> ent,
|
||||
ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
if (TryComp<HandsComponent>(args.Performer, out var hands) || hands is not null)
|
||||
{
|
||||
if (_hand.CountFreeableHands((args.Performer, hands)) >= ent.Comp.FreeHandRequired)
|
||||
return;
|
||||
}
|
||||
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-need-somatic-component"));
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void OnVerbalCheck(Entity<CP14MagicEffectVerbalAspectComponent> ent,
|
||||
ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
if (!HasComp<MutedComponent>(args.Performer))
|
||||
return;
|
||||
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-need-verbal-component"));
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void OnMaterialCheck(Entity<CP14MagicEffectMaterialAspectComponent> ent, ref CP14CastMagicEffectAttemptEvent 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);
|
||||
}
|
||||
|
||||
if (!ent.Comp.Requirement.CheckRequirement(EntityManager, _proto, heldedItems))
|
||||
{
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-need-material-component"));
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPacifiedCheck(Entity<CP14MagicEffectPacifiedBlockComponent> ent,
|
||||
ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
if (!HasComp<PacifiedComponent>(args.Performer))
|
||||
return;
|
||||
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-pacified"));
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void OnSSDCheck(Entity<CP14MagicEffectSSDBlockComponent> ent, ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
if (args.Target is null)
|
||||
return;
|
||||
|
||||
if (!TryComp<SSDIndicatorComponent>(args.Target.Value, out var ssdIndication))
|
||||
return;
|
||||
|
||||
if (ssdIndication.IsSSD)
|
||||
{
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-ssd"));
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMobStateCheck(Entity<CP14MagicEffectTargetMobStatusRequiredComponent> ent,
|
||||
ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
if (args.Target is not { } target)
|
||||
return;
|
||||
|
||||
if (!TryComp<MobStateComponent>(target, out var mobStateComp))
|
||||
{
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-target-not-mob"));
|
||||
args.Cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ent.Comp.AllowedStates.Contains(mobStateComp.CurrentState))
|
||||
{
|
||||
var states = string.Join(", ",
|
||||
ent.Comp.AllowedStates.Select(state => state switch
|
||||
{
|
||||
MobState.Alive => Loc.GetString("cp14-magic-spell-target-mob-state-live"),
|
||||
MobState.Dead => Loc.GetString("cp14-magic-spell-target-mob-state-dead"),
|
||||
MobState.Critical => Loc.GetString("cp14-magic-spell-target-mob-state-critical")
|
||||
}));
|
||||
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-target-mob-state", ("state", states)));
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnReligionRestrictedCheck(Entity<CP14MagicEffectReligionRestrictedComponent> ent,
|
||||
ref CP14CastMagicEffectAttemptEvent args)
|
||||
{
|
||||
if (!TryComp<CP14ReligionEntityComponent>(args.Performer, out var religionComp))
|
||||
return;
|
||||
|
||||
var position = args.Position;
|
||||
|
||||
if (args.Target is not null)
|
||||
position ??= Transform(args.Target.Value).Coordinates;
|
||||
|
||||
if (ent.Comp.OnlyInReligionZone)
|
||||
{
|
||||
if (position is null || !_god.InVision(position.Value, (args.Performer, religionComp)))
|
||||
{
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
if (ent.Comp.OnlyOnFollowers)
|
||||
{
|
||||
if (args.Target is null || !TryComp<CP14ReligionFollowerComponent>(args.Target, out var follower) || follower.Religion != religionComp.Religion)
|
||||
{
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-target-god-follower"));
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnVerbalAspectStartCast(Entity<CP14MagicEffectVerbalAspectComponent> ent,
|
||||
private void OnVerbalAspectStartCast(Entity<CP14ActionSpeakingComponent> ent,
|
||||
ref CP14StartCastMagicEffectEvent args)
|
||||
{
|
||||
var ev = new CP14SpellSpeechEvent
|
||||
var ev = new CP14ActionSpeechEvent
|
||||
{
|
||||
Performer = args.Performer,
|
||||
Speech = Loc.GetString(ent.Comp.StartSpeech),
|
||||
@@ -266,10 +43,10 @@ public abstract partial class CP14SharedMagicSystem
|
||||
RaiseLocalEvent(ent, ref ev);
|
||||
}
|
||||
|
||||
private void OnVerbalAspectAfterCast(Entity<CP14MagicEffectVerbalAspectComponent> ent,
|
||||
private void OnVerbalAspectAfterCast(Entity<CP14ActionSpeakingComponent> ent,
|
||||
ref CP14MagicEffectConsumeResourceEvent args)
|
||||
{
|
||||
var ev = new CP14SpellSpeechEvent
|
||||
var ev = new CP14ActionSpeechEvent
|
||||
{
|
||||
Performer = args.Performer,
|
||||
Speech = Loc.GetString(ent.Comp.EndSpeech),
|
||||
@@ -280,7 +57,7 @@ public abstract partial class CP14SharedMagicSystem
|
||||
|
||||
private void OnEmoteStartCast(Entity<CP14MagicEffectEmotingComponent> ent, ref CP14StartCastMagicEffectEvent args)
|
||||
{
|
||||
var ev = new CP14SpellSpeechEvent
|
||||
var ev = new CP14ActionSpeechEvent
|
||||
{
|
||||
Performer = args.Performer,
|
||||
Speech = Loc.GetString(ent.Comp.StartEmote),
|
||||
@@ -292,7 +69,7 @@ public abstract partial class CP14SharedMagicSystem
|
||||
|
||||
private void OnEmoteEndCast(Entity<CP14MagicEffectEmotingComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
|
||||
{
|
||||
var ev = new CP14SpellSpeechEvent
|
||||
var ev = new CP14ActionSpeechEvent
|
||||
{
|
||||
Performer = args.Performer,
|
||||
Speech = Loc.GetString(ent.Comp.EndEmote),
|
||||
@@ -301,7 +78,7 @@ public abstract partial class CP14SharedMagicSystem
|
||||
RaiseLocalEvent(ent, ref ev);
|
||||
}
|
||||
|
||||
private void OnMaterialAspectEndCast(Entity<CP14MagicEffectMaterialAspectComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
|
||||
private void OnMaterialAspectEndCast(Entity<CP14ActionMaterialCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
|
||||
{
|
||||
if (ent.Comp.Requirement is null || args.Performer is null)
|
||||
return;
|
||||
@@ -318,7 +95,7 @@ public abstract partial class CP14SharedMagicSystem
|
||||
ent.Comp.Requirement.PostCraft(EntityManager, _proto, heldedItems);
|
||||
}
|
||||
|
||||
private void OnStaminaConsume(Entity<CP14MagicEffectStaminaCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
|
||||
private void OnStaminaConsume(Entity<CP14ActionStaminaCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
|
||||
{
|
||||
if (args.Performer is null)
|
||||
return;
|
||||
@@ -326,7 +103,7 @@ public abstract partial class CP14SharedMagicSystem
|
||||
_stamina.TakeStaminaDamage(args.Performer.Value, ent.Comp.Stamina, visual: false);
|
||||
}
|
||||
|
||||
private void OnManaConsume(Entity<CP14MagicEffectManaCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
|
||||
private void OnManaConsume(Entity<CP14ActionManaCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
|
||||
{
|
||||
if (!TryComp<CP14MagicEffectComponent>(ent, out var magicEffect))
|
||||
return;
|
||||
@@ -349,9 +126,9 @@ public abstract partial class CP14SharedMagicSystem
|
||||
_magicEnergy.ChangeEnergy((args.Performer.Value, playerMana), -requiredMana, out _, out _, safe: false);
|
||||
}
|
||||
|
||||
private void OnSkillPointConsume(Entity<CP14MagicEffectSkillPointCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
|
||||
private void OnSkillPointConsume(Entity<CP14ActionSkillPointCostComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
|
||||
{
|
||||
if (!_proto.TryIndex(ent.Comp.SkillPoint, out var indexedSkillPoint) || ent.Comp.SkillPoint is null || args.Performer is null)
|
||||
if (ent.Comp.SkillPoint is null || args.Performer is null)
|
||||
return;
|
||||
|
||||
_skill.RemoveSkillPoints(args.Performer.Value, ent.Comp.SkillPoint.Value, ent.Comp.Count);
|
||||
|
||||
@@ -64,10 +64,6 @@ public abstract partial class CP14SharedMagicSystem
|
||||
if (currentTarget is not null && currentTarget == EntityUid.Invalid)
|
||||
currentTarget = null;
|
||||
|
||||
var spellArgs = new CP14SpellEffectBaseArgs(performer, action.Comp.SpellStorage, currentTarget, worldTarget);
|
||||
if (!CanCastSpell(action, spellArgs))
|
||||
return false;
|
||||
|
||||
if (_doAfter.IsRunning(action.Comp.ActiveDoAfter))
|
||||
{
|
||||
_doAfter.Cancel(action.Comp.ActiveDoAfter);
|
||||
@@ -79,6 +75,8 @@ public abstract partial class CP14SharedMagicSystem
|
||||
|
||||
var evStart = new CP14StartCastMagicEffectEvent(performer);
|
||||
RaiseLocalEvent(action, ref evStart);
|
||||
|
||||
var spellArgs = new CP14SpellEffectBaseArgs(performer, action.Comp.SpellStorage, currentTarget, worldTarget);
|
||||
CastTelegraphy(action, spellArgs);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
using System.Linq;
|
||||
using Content.Shared._CP14.MagicSpell.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Mobs;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell;
|
||||
|
||||
public abstract partial class CP14SharedMagicSystem
|
||||
{
|
||||
private void InitializeExamine()
|
||||
{
|
||||
SubscribeLocalEvent<CP14MagicEffectComponent, ExaminedEvent>(OnManaEffectExamined);
|
||||
|
||||
SubscribeLocalEvent<CP14MagicEffectManaCostComponent, ExaminedEvent>(OnManacostExamined);
|
||||
SubscribeLocalEvent<CP14MagicEffectStaminaCostComponent, ExaminedEvent>(OnStaminaCostExamined);
|
||||
SubscribeLocalEvent<CP14MagicEffectSkillPointCostComponent, ExaminedEvent>(OnSkillPointCostExamined);
|
||||
|
||||
SubscribeLocalEvent<CP14MagicEffectVerbalAspectComponent, ExaminedEvent>(OnVerbalExamined);
|
||||
SubscribeLocalEvent<CP14MagicEffectSomaticAspectComponent, ExaminedEvent>(OnSomaticExamined);
|
||||
SubscribeLocalEvent<CP14MagicEffectMaterialAspectComponent, ExaminedEvent>(OnMaterialExamined);
|
||||
SubscribeLocalEvent<CP14MagicEffectRequiredMusicToolComponent, ExaminedEvent>(OnMusicExamined);
|
||||
SubscribeLocalEvent<CP14MagicEffectTargetMobStatusRequiredComponent, ExaminedEvent>(OnMobStateExamined);
|
||||
}
|
||||
|
||||
private void OnManaEffectExamined(Entity<CP14MagicEffectComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
if (_proto.TryIndex(ent.Comp.MagicType, out var indexedMagic))
|
||||
{
|
||||
args.PushMarkup($"{Loc.GetString("cp14-magic-type")}: [color={indexedMagic.Color.ToHex()}]{Loc.GetString(indexedMagic.Name)}[/color]", 10);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnManacostExamined(Entity<CP14MagicEffectManaCostComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup($"{Loc.GetString("cp14-magic-manacost")}: [color=#5da9e8]{ent.Comp.ManaCost}[/color]", priority: 9);
|
||||
}
|
||||
|
||||
private void OnStaminaCostExamined(Entity<CP14MagicEffectStaminaCostComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup($"{Loc.GetString("cp14-magic-staminacost")}: [color=#3fba54]{ent.Comp.Stamina}[/color]", priority: 9);
|
||||
}
|
||||
|
||||
private void OnSkillPointCostExamined(Entity<CP14MagicEffectSkillPointCostComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
if (!_proto.TryIndex(ent.Comp.SkillPoint, out var indexedSkillPoint))
|
||||
return;
|
||||
|
||||
args.PushMarkup($"{Loc.GetString("cp14-magic-skillpointcost", ("name", Loc.GetString(indexedSkillPoint.Name)), ("count", ent.Comp.Count))}", priority: 9);
|
||||
}
|
||||
|
||||
private void OnVerbalExamined(Entity<CP14MagicEffectVerbalAspectComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-verbal-aspect"), 8);
|
||||
}
|
||||
|
||||
private void OnSomaticExamined(Entity<CP14MagicEffectSomaticAspectComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-somatic-aspect") + " " + ent.Comp.FreeHandRequired, 8);
|
||||
}
|
||||
|
||||
private void OnMaterialExamined(Entity<CP14MagicEffectMaterialAspectComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
if (ent.Comp.Requirement is not null)
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-material-aspect") + " " + ent.Comp.Requirement.GetRequirementTitle(_proto));
|
||||
}
|
||||
private void OnMusicExamined(Entity<CP14MagicEffectRequiredMusicToolComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-music-aspect"));
|
||||
}
|
||||
|
||||
private void OnMobStateExamined(Entity<CP14MagicEffectTargetMobStatusRequiredComponent> ent, ref ExaminedEvent args)
|
||||
{
|
||||
var states = string.Join(", ",
|
||||
ent.Comp.AllowedStates.Select(state => state switch
|
||||
{
|
||||
MobState.Alive => Loc.GetString("cp14-magic-spell-target-mob-state-live"),
|
||||
MobState.Dead => Loc.GetString("cp14-magic-spell-target-mob-state-dead"),
|
||||
MobState.Critical => Loc.GetString("cp14-magic-spell-target-mob-state-critical")
|
||||
}));
|
||||
|
||||
args.PushMarkup(Loc.GetString("cp14-magic-spell-target-mob-state", ("state", states)));
|
||||
}
|
||||
}
|
||||
@@ -22,11 +22,8 @@ public abstract partial class CP14SharedMagicSystem
|
||||
return;
|
||||
|
||||
var spellArgs = new CP14SpellEffectBaseArgs(args.Performer, magicEffect.SpellStorage, args.Performer, Transform(args.Performer).Coordinates);
|
||||
|
||||
if (!CanCastSpell((args.Action, magicEffect), spellArgs))
|
||||
return;
|
||||
|
||||
CastSpell((args.Action, magicEffect), spellArgs);
|
||||
|
||||
_action.SetCooldown(args.Action.Owner, args.Cooldown);
|
||||
}
|
||||
|
||||
@@ -39,11 +36,8 @@ public abstract partial class CP14SharedMagicSystem
|
||||
return;
|
||||
|
||||
var spellArgs = new CP14SpellEffectBaseArgs(args.Performer, magicEffect.SpellStorage, null, args.Target);
|
||||
|
||||
if (!CanCastSpell((args.Action, magicEffect), spellArgs))
|
||||
return;
|
||||
|
||||
CastSpell((args.Action, magicEffect), spellArgs);
|
||||
|
||||
_action.SetCooldown(args.Action.Owner, args.Cooldown);
|
||||
}
|
||||
|
||||
@@ -56,11 +50,8 @@ public abstract partial class CP14SharedMagicSystem
|
||||
return;
|
||||
|
||||
var spellArgs = new CP14SpellEffectBaseArgs(args.Performer, magicEffect.SpellStorage, args.Target, Transform(args.Target).Coordinates);
|
||||
|
||||
if (!CanCastSpell((args.Action, magicEffect), spellArgs))
|
||||
return;
|
||||
|
||||
CastSpell((args.Action, magicEffect), spellArgs);
|
||||
|
||||
_action.SetCooldown(args.Action.Owner, args.Cooldown);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,12 +37,12 @@ public abstract partial class CP14SharedMagicSystem
|
||||
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;
|
||||
}
|
||||
//if (!CanCastSpell((uid, effect), spellArgs))
|
||||
//{
|
||||
// if (_doAfter.IsRunning(toggled.DoAfterId))
|
||||
// _doAfter.Cancel(toggled.DoAfterId);
|
||||
// continue;
|
||||
//}
|
||||
|
||||
CastSpell((uid, effect), spellArgs);
|
||||
}
|
||||
@@ -127,10 +127,6 @@ public abstract partial class CP14SharedMagicSystem
|
||||
|
||||
private void ToggleToggleableAction(ICP14ToggleableMagicEffect toggleable, DoAfterEvent doAfter, Entity<CP14MagicEffectComponent> action, EntityUid performer, EntityUid? entityTarget = null, EntityCoordinates? worldTarget = null)
|
||||
{
|
||||
var spellArgs = new CP14SpellEffectBaseArgs(performer, entityTarget, entityTarget, worldTarget);
|
||||
if (!CanCastSpell(action, spellArgs))
|
||||
return;
|
||||
|
||||
if (_doAfter.IsRunning(action.Comp.ActiveDoAfter))
|
||||
_doAfter.Cancel(action.Comp.ActiveDoAfter);
|
||||
else
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
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.Access.Components;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Actions.Components;
|
||||
using Content.Shared.Damage.Systems;
|
||||
@@ -26,7 +26,7 @@ namespace Content.Shared._CP14.MagicSpell;
|
||||
public abstract partial class CP14SharedMagicSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
|
||||
[Dependency] private readonly SharedCP14MagicEnergySystem _magicEnergy = 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!;
|
||||
@@ -49,7 +49,6 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem
|
||||
InitializeInstantActions();
|
||||
InitializeChecks();
|
||||
InitializeSlowdown();
|
||||
InitializeExamine();
|
||||
|
||||
_magicContainerQuery = GetEntityQuery<CP14MagicEnergyContainerComponent>();
|
||||
_magicEffectQuery = GetEntityQuery<CP14MagicEffectComponent>();
|
||||
@@ -106,23 +105,6 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem
|
||||
_doAfter.Cancel(ent.Comp.ActiveDoAfter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checking to see if the spell can be used at all
|
||||
/// </summary>
|
||||
private bool CanCastSpell(Entity<CP14MagicEffectComponent> ent, CP14SpellEffectBaseArgs args)
|
||||
{
|
||||
if (args.User is not { } performer)
|
||||
return true;
|
||||
|
||||
var ev = new CP14CastMagicEffectAttemptEvent(performer, args.Used, args.Target, args.Position);
|
||||
RaiseLocalEvent(ent, ev);
|
||||
|
||||
if (ev.Reason != string.Empty)
|
||||
_popup.PopupPredicted(ev.Reason, performer, performer);
|
||||
|
||||
return !ev.Cancelled;
|
||||
}
|
||||
|
||||
private void CastTelegraphy(Entity<CP14MagicEffectComponent> ent, CP14SpellEffectBaseArgs args)
|
||||
{
|
||||
if (!_timing.IsFirstTimePredicted)
|
||||
@@ -149,7 +131,7 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem
|
||||
|
||||
if (args.User is not null
|
||||
&& TryComp<ActionComponent>(ent, out var actionComp)
|
||||
&& TryComp<CP14MagicEffectManaCostComponent>(ent, out var manaCost))
|
||||
&& TryComp<CP14ActionManaCostComponent>(ent, out var manaCost))
|
||||
{
|
||||
_magicVision.SpawnMagicTrace(
|
||||
Transform(args.User.Value).Coordinates,
|
||||
@@ -161,13 +143,13 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
protected FixedPoint2 CalculateManacost(Entity<CP14MagicEffectManaCostComponent> ent, EntityUid? caster)
|
||||
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, magicEffect.MagicType);
|
||||
var manaEv = new CP14CalculateManacostEvent(caster, ent.Comp.ManaCost);
|
||||
|
||||
if (caster is not null)
|
||||
RaiseLocalEvent(caster.Value, manaEv);
|
||||
|
||||
@@ -4,6 +4,6 @@ namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
/// Requires the user to play music to use this spell
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectRequiredMusicToolComponent : Component
|
||||
public sealed partial class CP14ActionRequiredMusicToolComponent : Component
|
||||
{
|
||||
}
|
||||
@@ -18,9 +18,6 @@ public sealed partial class CP14MagicEffectComponent : Component
|
||||
[DataField]
|
||||
public EntityUid? SpellStorage;
|
||||
|
||||
[DataField]
|
||||
public ProtoId<CP14MagicTypePrototype>? MagicType = null;
|
||||
|
||||
/// <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>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Blocks the target from using magic if they are pacified.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectPacifiedBlockComponent : Component
|
||||
{
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Blocks the target from using magic if they are pacified.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectSSDBlockComponent : Component
|
||||
{
|
||||
}
|
||||
@@ -8,35 +8,6 @@ using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Called first to verify that all conditions are met and the spell can be performed.
|
||||
/// </summary>
|
||||
public sealed class CP14CastMagicEffectAttemptEvent : CancellableEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The Performer of the event, to check if they meet the requirements.
|
||||
/// </summary>
|
||||
public readonly EntityUid Performer;
|
||||
public readonly EntityUid? Used;
|
||||
public readonly EntityUid? Target;
|
||||
public readonly EntityCoordinates? Position;
|
||||
|
||||
public string Reason = string.Empty;
|
||||
|
||||
public CP14CastMagicEffectAttemptEvent(EntityUid performer, EntityUid? used, EntityUid? target, EntityCoordinates? position)
|
||||
{
|
||||
Performer = performer;
|
||||
Used = used;
|
||||
Target = target;
|
||||
Position = position;
|
||||
}
|
||||
|
||||
public void PushReason(string reason)
|
||||
{
|
||||
Reason += $"{reason}\n";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An event that checks all sorts of conditions, and calculates the total cost of casting a spell. Called before the spell is cast.
|
||||
/// </summary>
|
||||
@@ -47,13 +18,11 @@ public sealed class CP14CalculateManacostEvent : EntityEventArgs, IInventoryRela
|
||||
|
||||
public float Multiplier = 1f;
|
||||
public EntityUid? Performer;
|
||||
public ProtoId<CP14MagicTypePrototype>? MagicType;
|
||||
|
||||
public CP14CalculateManacostEvent(EntityUid? performer, FixedPoint2 initialManacost, ProtoId<CP14MagicTypePrototype>? magicType)
|
||||
public CP14CalculateManacostEvent(EntityUid? performer, FixedPoint2 initialManacost)
|
||||
{
|
||||
Performer = performer;
|
||||
Manacost = initialManacost;
|
||||
MagicType = magicType;
|
||||
}
|
||||
|
||||
public float GetManacost()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Shared._CP14.Actions.Components;
|
||||
using Content.Shared._CP14.MagicSpell.Components;
|
||||
using Content.Shared.Electrocution;
|
||||
|
||||
@@ -22,7 +23,7 @@ public sealed partial class CP14SpellInterruptSpell : CP14SpellEffect
|
||||
var interrupt = false;
|
||||
foreach (var spell in caster.CastedSpells)
|
||||
{
|
||||
if (entManager.HasComponent<CP14MagicEffectManaCostComponent>(spell))
|
||||
if (entManager.HasComponent<CP14ActionManaCostComponent>(spell))
|
||||
{
|
||||
interrupt = true;
|
||||
break;
|
||||
|
||||
@@ -22,7 +22,7 @@ public sealed partial class CP14SpellConsumeManaEffect : CP14SpellEffect
|
||||
if (!entManager.HasComponent<CP14MagicEnergyContainerComponent>(targetEntity))
|
||||
return;
|
||||
|
||||
var magicEnergy = entManager.System<SharedCP14MagicEnergySystem>();
|
||||
var magicEnergy = entManager.System<CP14SharedMagicEnergySystem>();
|
||||
|
||||
//First - used object
|
||||
if (args.Used is not null)
|
||||
|
||||
@@ -25,7 +25,7 @@ public sealed partial class CP14SpellTransferManaToGod : CP14SpellEffect
|
||||
return;
|
||||
|
||||
var religionSys = entManager.System<CP14SharedReligionGodSystem>();
|
||||
var magicEnergySys = entManager.System<SharedCP14MagicEnergySystem>();
|
||||
var magicEnergySys = entManager.System<CP14SharedMagicEnergySystem>();
|
||||
|
||||
var gods = religionSys.GetGods(follower.Religion.Value);
|
||||
var manaAmount = Amount / gods.Count;
|
||||
|
||||
@@ -11,13 +11,13 @@ public sealed partial class AddManaMax : CP14SkillEffect
|
||||
public FixedPoint2 AdditionalMana = 0;
|
||||
public override void AddSkill(IEntityManager entManager, EntityUid target)
|
||||
{
|
||||
var magicSystem = entManager.System<SharedCP14MagicEnergySystem>();
|
||||
var magicSystem = entManager.System<CP14SharedMagicEnergySystem>();
|
||||
magicSystem.ChangeMaximumEnergy(target, AdditionalMana);
|
||||
}
|
||||
|
||||
public override void RemoveSkill(IEntityManager entManager, EntityUid target)
|
||||
{
|
||||
var magicSystem = entManager.System<SharedCP14MagicEnergySystem>();
|
||||
var magicSystem = entManager.System<CP14SharedMagicEnergySystem>();
|
||||
magicSystem.ChangeMaximumEnergy(target, -AdditionalMana);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,20 +12,10 @@ public sealed partial class ModifyManacost : CP14SkillEffect
|
||||
[DataField]
|
||||
public FixedPoint2 Global = 0f;
|
||||
|
||||
[DataField]
|
||||
public Dictionary<ProtoId<CP14MagicTypePrototype>, FixedPoint2> Modifiers = new();
|
||||
|
||||
public override void AddSkill(IEntityManager entManager, EntityUid target)
|
||||
{
|
||||
entManager.EnsureComponent<CP14MagicManacostModifyComponent>(target, out var magicEffectManaCost);
|
||||
|
||||
foreach (var (magicType, modifier) in Modifiers)
|
||||
{
|
||||
if (!magicEffectManaCost.Modifiers.ContainsKey(magicType))
|
||||
magicEffectManaCost.Modifiers.Add(magicType, 1 + modifier);
|
||||
else
|
||||
magicEffectManaCost.Modifiers[magicType] += modifier;
|
||||
}
|
||||
magicEffectManaCost.GlobalModifier += Global;
|
||||
}
|
||||
|
||||
@@ -33,15 +23,6 @@ public sealed partial class ModifyManacost : CP14SkillEffect
|
||||
{
|
||||
entManager.EnsureComponent<CP14MagicManacostModifyComponent>(target, out var magicEffectManaCost);
|
||||
|
||||
foreach (var (magicType, modifier) in Modifiers)
|
||||
{
|
||||
if (!magicEffectManaCost.Modifiers.ContainsKey(magicType))
|
||||
continue;
|
||||
|
||||
magicEffectManaCost.Modifiers[magicType] -= modifier;
|
||||
if (magicEffectManaCost.Modifiers[magicType] <= 0)
|
||||
magicEffectManaCost.Modifiers.Remove(magicType);
|
||||
}
|
||||
magicEffectManaCost.GlobalModifier -= Global;
|
||||
}
|
||||
|
||||
@@ -63,16 +44,6 @@ public sealed partial class ModifyManacost : CP14SkillEffect
|
||||
$"{Loc.GetString("cp14-clothing-magic-global")}: {plus}{MathF.Round((float)Global * 100, MidpointRounding.AwayFromZero)}%\n");
|
||||
}
|
||||
|
||||
foreach (var modifier in Modifiers)
|
||||
{
|
||||
if (modifier.Value == 0)
|
||||
continue;
|
||||
|
||||
var plus = modifier.Value > 1 ? "+" : "";
|
||||
var indexedType = protoManager.Index(modifier.Key);
|
||||
sb.Append($"- [color={indexedType.Color.ToHex()}]{Loc.GetString(indexedType.Name)}[/color]: {plus}{modifier.Value*100}%");
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Shared._CP14.MagicSpell.Events;
|
||||
using Content.Shared._CP14.Vampire.Components;
|
||||
using Content.Shared.Actions.Events;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.SSDIndicator;
|
||||
@@ -12,22 +13,25 @@ public abstract partial class CP14SharedVampireSystem
|
||||
|
||||
private void InitializeSpell()
|
||||
{
|
||||
SubscribeLocalEvent<CP14MagicEffectVampireComponent, CP14CastMagicEffectAttemptEvent>(OnVampireCastAttempt);
|
||||
SubscribeLocalEvent<CP14MagicEffectVampireComponent, ActionAttemptEvent>(OnVampireCastAttempt);
|
||||
SubscribeLocalEvent<CP14MagicEffectVampireComponent, ExaminedEvent>(OnVampireCastExamine);
|
||||
}
|
||||
|
||||
private void OnVampireCastAttempt(Entity<CP14MagicEffectVampireComponent> ent, ref CP14CastMagicEffectAttemptEvent args)
|
||||
private void OnVampireCastAttempt(Entity<CP14MagicEffectVampireComponent> ent, ref ActionAttemptEvent args)
|
||||
{
|
||||
if (args.Cancelled)
|
||||
return;
|
||||
|
||||
//If we are not vampires in principle, we certainly should not have this ability,
|
||||
//but then we will not limit its use to a valid vampire form that is unavailable to us.
|
||||
|
||||
if (!HasComp<CP14VampireComponent>(args.Performer))
|
||||
if (!HasComp<CP14VampireComponent>(args.User))
|
||||
return;
|
||||
|
||||
if (!HasComp<CP14VampireVisualsComponent>(args.Performer))
|
||||
if (!HasComp<CP14VampireVisualsComponent>(args.User))
|
||||
{
|
||||
args.PushReason(Loc.GetString("cp14-magic-spell-need-vampire-valid"));
|
||||
args.Cancel();
|
||||
_popup.PopupClient(Loc.GetString("cp14-magic-spell-need-vampire-valid"), args.User, args.User);
|
||||
args.Cancelled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public sealed partial class MagicInWorkbench : CP14WorkbenchCraftCondition
|
||||
EntityUid workbench,
|
||||
EntityUid user)
|
||||
{
|
||||
var magicSys = entManager.System<SharedCP14MagicEnergySystem>();
|
||||
var magicSys = entManager.System<CP14SharedMagicEnergySystem>();
|
||||
|
||||
magicSys.ChangeEnergy(workbench, -Energy, out _, out _);
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public sealed partial class MagicInWorkbench : CP14WorkbenchCraftCondition
|
||||
EntityUid workbench,
|
||||
EntityUid user)
|
||||
{
|
||||
var magicSys = entManager.System<SharedCP14MagicEnergySystem>();
|
||||
var magicSys = entManager.System<CP14SharedMagicEnergySystem>();
|
||||
magicSys.ChangeEnergy(workbench, -Energy, out _, out _);
|
||||
|
||||
if (entManager.TryGetComponent<TransformComponent>(workbench, out var xform))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name: Dash
|
||||
description: You make a quick dash to the chosen position to quickly close the distance or dodge danger.
|
||||
components:
|
||||
- type: CP14MagicEffectStaminaCost
|
||||
- type: CP14ActionStaminaCost
|
||||
stamina: 40
|
||||
- type: CP14MagicEffect
|
||||
effects:
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
state: kick
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.4
|
||||
- type: CP14MagicEffectStaminaCost
|
||||
- type: CP14ActionStaminaCost
|
||||
stamina: 40
|
||||
- type: CP14MagicEffect
|
||||
effects:
|
||||
@@ -32,7 +32,7 @@
|
||||
- type: CP14MagicEffectEmoting
|
||||
startEmote: cp14-kick-emote-start
|
||||
endEmote: cp14-kick-emote
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/physical.rsi
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
state: sprint
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 1.3
|
||||
- type: CP14MagicEffectStaminaCost
|
||||
- type: CP14ActionStaminaCost
|
||||
stamina: 1.5
|
||||
- type: CP14MagicEffect
|
||||
effects:
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
name: Impenetrable darkness
|
||||
description: You summon a thick fog that obscures vision and disorients mortals.
|
||||
components:
|
||||
- type: CP14MagicEffectReligionRestricted
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionReligionRestricted
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 10
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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: CP14MagicEffectReligionRestricted
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionReligionRestricted
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 300
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
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: CP14MagicEffectReligionRestricted
|
||||
- type: CP14ActionReligionRestricted
|
||||
onlyOnFollowers: true
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 300
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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: CP14MagicEffectReligionRestricted
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionReligionRestricted
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 30
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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: CP14MagicEffectReligionRestricted
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionReligionRestricted
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 5
|
||||
- type: CP14MagicEffect
|
||||
effects:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 30
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
@@ -17,7 +17,7 @@
|
||||
- !type:CP14SpellTeleportToCity
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14ImpactEffectShadowStep
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/dimension.rsi
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- type: Sprite
|
||||
sprite: _CP14/Actions/Spells/dimension.rsi
|
||||
state: shadow_grab
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 20
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
@@ -23,7 +23,7 @@
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
- CP14ImpactEffectShadowStep
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/dimension.rsi
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
state: shadow_step
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.8
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 20
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
@@ -20,7 +20,7 @@
|
||||
- !type:CP14SpellCasterTeleport
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14ImpactEffectShadowStep
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/dimension.rsi
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
state: shadow_swap
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.8
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 20
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
@@ -23,8 +23,8 @@
|
||||
- !type:CP14SpellCasterSwap
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14ImpactEffectShadowStep
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14MagicEffectTargetMobStatusRequired
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: CP14ActionTargetMobStatusRequired
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/dimension.rsi
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: -1.0
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 5
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
state: earth_wall
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.3
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 15
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
@@ -20,11 +20,11 @@
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
- CP14WallSpawnEarthWall
|
||||
- type: CP14MagicEffectMaterialAspect
|
||||
- type: CP14ActionMaterialCost
|
||||
requirement: !type:StackResource
|
||||
stack: CP14Dirt
|
||||
count: 2
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Surgite terram..."
|
||||
endSpeech: "de profundis terrae"
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 20
|
||||
- type: CP14MagicEffect
|
||||
magicType: Energia
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
@@ -29,12 +28,12 @@
|
||||
- !type:CP14SpellThrowFromUser
|
||||
throwPower: 4
|
||||
distance: 1
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "A fulgur percutiens... "
|
||||
endSpeech: "erit ledo vobis!"
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneLightningStrike
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/electromancy.rsi
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 7
|
||||
- type: CP14MagicEffect
|
||||
magicType: Energia
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
@@ -29,7 +28,7 @@
|
||||
- !type:CP14SpellThrowFromUser
|
||||
throwPower: 2
|
||||
distance: 0.5
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/electromancy.rsi
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 1
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 1
|
||||
- type: CP14MagicEffect
|
||||
magicType: Energia
|
||||
effects:
|
||||
- !type:CP14SpellArea
|
||||
affectCaster: true
|
||||
@@ -28,7 +27,7 @@
|
||||
walkSpeedModifier: 1.2
|
||||
sprintSpeedModifier: 1.2
|
||||
statusLifetime: 1.8
|
||||
- type: CP14MagicEffectRequiredMusicTool
|
||||
- type: CP14ActionRequiredMusicTool
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneSpeedBallade
|
||||
- type: Action
|
||||
|
||||
@@ -6,23 +6,22 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.3
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 20
|
||||
- type: CP14MagicEffect
|
||||
magicType: Fire
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnUser
|
||||
spawns:
|
||||
- CP14ImpactEffectFireball
|
||||
- !type:CP14SpellProjectile
|
||||
prototype: CP14Fireball
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Quaeso, quemdam inter vos quaero... "
|
||||
endSpeech: "A pila!"
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneFireball
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/fire.rsi
|
||||
|
||||
@@ -9,21 +9,20 @@
|
||||
state: firewave
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.75
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 10
|
||||
- type: CP14MagicEffect
|
||||
magicType: Fire
|
||||
effects:
|
||||
- !type:CP14SpellProjectile
|
||||
prototype: CP14Firebolt
|
||||
spread: 2
|
||||
projectileSpeed: 5
|
||||
projectileCount: 8
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
endSpeech: "Ignis acus!"
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneFirebolt
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/fire.rsi
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
name: Flame creation
|
||||
description: A artificial flame forms in your hand, illuminating your surroundings. You can throw it to use it as a disposable weapon.
|
||||
components:
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 5
|
||||
- type: CP14MagicEffect
|
||||
magicType: Fire
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
clientside: true
|
||||
@@ -16,10 +15,10 @@
|
||||
- !type:CP14SpellSpawnInHandEntity
|
||||
spawns:
|
||||
- CP14FlameCreationArtificialFlame
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Et conteret ignis..."
|
||||
endSpeech: "in manu mea"
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneFlameCreation
|
||||
- type: Action
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
state: heat
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.8
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 7
|
||||
- type: CP14MagicEffect
|
||||
magicType: Fire
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
@@ -24,11 +23,11 @@
|
||||
- !type:AdjustTemperature
|
||||
amount: 20000
|
||||
- !type:ExtinguishReaction
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Vos adepto calidum..."
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneHeat
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/fire.rsi
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
state: fire_music
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 8
|
||||
- type: CP14MagicEffect
|
||||
magicType: Fire
|
||||
effects:
|
||||
- !type:CP14SpellArea
|
||||
range: 3
|
||||
@@ -32,10 +31,10 @@
|
||||
- !type:AdjustTemperature
|
||||
amount: 500
|
||||
- !type:Ignite
|
||||
- type: CP14MagicEffectRequiredMusicTool
|
||||
- type: CP14ActionRequiredMusicTool
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneHellBallade
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/fire.rsi
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneTieflingRevenge
|
||||
- type: CP14MagicEffect
|
||||
magicType: Fire
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.4
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 5
|
||||
- type: CP14MagicEffect
|
||||
magicType: Life
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 12
|
||||
- type: CP14MagicEffect
|
||||
magicType: Life
|
||||
telegraphyEffects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
clientside: true
|
||||
@@ -29,8 +28,8 @@
|
||||
Heat: -10
|
||||
Shock: -10
|
||||
- !type:Jitter
|
||||
- type: CP14MagicEffectTargetMobStatusRequired
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionTargetMobStatusRequired
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Pellis dolorem..."
|
||||
endSpeech: "non novit"
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
state: cure_poison
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 12
|
||||
- type: CP14MagicEffect
|
||||
magicType: Life
|
||||
telegraphyEffects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
clientside: true
|
||||
@@ -34,10 +33,10 @@
|
||||
- !type:Jitter
|
||||
- !type:ModifyBloodLevel
|
||||
amount: 25
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Nella coda..."
|
||||
endSpeech: "sta il veleno"
|
||||
- type: CP14MagicEffectTargetMobStatusRequired
|
||||
- type: CP14ActionTargetMobStatusRequired
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneBloodPurification
|
||||
- type: Action
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
state: cure_wounds
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 12
|
||||
- type: CP14MagicEffect
|
||||
magicType: Life
|
||||
telegraphyEffects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
clientside: true
|
||||
@@ -34,10 +33,10 @@
|
||||
- !type:Jitter
|
||||
- !type:ModifyBleedAmount
|
||||
amount: -5
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Et curabuntur..."
|
||||
endSpeech: "vulnera tua"
|
||||
- type: CP14MagicEffectTargetMobStatusRequired
|
||||
- type: CP14ActionTargetMobStatusRequired
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneCureWounds
|
||||
- type: Action
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
state: magical_acceleration
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 1.3
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 3
|
||||
- type: CP14MagicEffect
|
||||
magicType: Life
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
state: peace_music
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.8
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 2
|
||||
- type: CP14MagicEffect
|
||||
magicType: Life
|
||||
effects:
|
||||
- !type:CP14SpellArea
|
||||
range: 4
|
||||
@@ -32,7 +31,7 @@
|
||||
component: Pacified
|
||||
type: Add
|
||||
time: 1.8
|
||||
- type: CP14MagicEffectRequiredMusicTool
|
||||
- type: CP14ActionRequiredMusicTool
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RunePeaceBallade
|
||||
- type: Action
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.8
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 5
|
||||
- type: CP14MagicEffect
|
||||
magicType: Life
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
clientside: true
|
||||
@@ -44,7 +43,7 @@
|
||||
energy: 3
|
||||
resourse: 3
|
||||
- !type:Jitter
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Plantae durant..."
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RunePlantGrowth
|
||||
@@ -70,7 +69,7 @@
|
||||
id: CP14ActionSpellPlantGrowthSilva
|
||||
name: Blessing of silvas
|
||||
components:
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 3
|
||||
|
||||
# Scrolls
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.2
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 100
|
||||
- type: CP14MagicEffectTargetMobStatusRequired
|
||||
- type: CP14ActionTargetMobStatusRequired
|
||||
allowedStates:
|
||||
- Dead
|
||||
- type: CP14MagicEffect
|
||||
magicType: Life
|
||||
telegraphyEffects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
@@ -36,7 +35,7 @@
|
||||
Asphyxiation: -500
|
||||
Bloodloss: -100
|
||||
- !type:Jitter
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Redi animam meam..."
|
||||
endSpeech: "Eu rezei por ti"
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
state: polymorph
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 30
|
||||
- type: CP14MagicEffect
|
||||
magicType: Life
|
||||
telegraphyEffects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
@@ -25,12 +24,12 @@
|
||||
effects:
|
||||
- !type:Polymorph
|
||||
prototype: CP14Sheep
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Pascam et custodiam..."
|
||||
endSpeech: "pecora tua"
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneSheepPolymorph
|
||||
- type: CP14MagicEffectTargetMobStatusRequired
|
||||
- type: CP14ActionTargetMobStatusRequired
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/misc.rsi
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
- type: Sprite
|
||||
sprite: _CP14/Actions/Spells/light.rsi
|
||||
state: flash_light
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 10
|
||||
- type: CP14MagicEffect
|
||||
magicType: Light
|
||||
telegraphyEffects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
@@ -19,7 +18,7 @@
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
- CP14SpawnEffectFlashLight
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Lux clara..."
|
||||
endSpeech: "excaecant inimicos meos"
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
- type: Sprite
|
||||
sprite: _CP14/Actions/Spells/light.rsi
|
||||
state: search_of_life
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 30
|
||||
- type: CP14MagicEffect
|
||||
magicType: Light
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
@@ -18,10 +17,10 @@
|
||||
- !type:CP14SpellPointerToAlive
|
||||
pointerEntity: CP14SearchOfLifePointer
|
||||
searchRange: 30
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Ego vultus..."
|
||||
endSpeech: "parumper vita"
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneSearchOfLife
|
||||
- type: Action
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
- type: Sprite
|
||||
sprite: _CP14/Actions/Spells/light.rsi
|
||||
state: sphere_of_light
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 10
|
||||
- type: CP14MagicEffect
|
||||
magicType: Light
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
@@ -18,10 +17,10 @@
|
||||
- !type:CP14SpellApplyStatusEffect
|
||||
statusEffect: CP14StatusEffectGlowing
|
||||
duration: 120
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Appare in manu tua..."
|
||||
endSpeech: "sphaera lucis"
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneSphereOfLight
|
||||
- type: Action
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- type: Sprite
|
||||
sprite: _CP14/Actions/Spells/lurker.rsi
|
||||
state: kick
|
||||
- type: CP14MagicEffectStaminaCost
|
||||
- type: CP14ActionStaminaCost
|
||||
stamina: 20
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
@@ -36,7 +36,7 @@
|
||||
- type: CP14MagicEffectEmoting
|
||||
startEmote: cp14-kick-lurker-start
|
||||
endEmote: cp14-kick-lurker
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/lurker.rsi
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 15
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneManaTrance
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
state: magic_music
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.8
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 5
|
||||
canModifyManacost: false
|
||||
- type: CP14MagicEffect
|
||||
@@ -30,7 +30,7 @@
|
||||
- !type:CP14ManaChange
|
||||
manaDelta: 1.2
|
||||
safe: true
|
||||
- type: CP14MagicEffectRequiredMusicTool
|
||||
- type: CP14ActionRequiredMusicTool
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneMagicBallade
|
||||
- type: Action
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
- CP14ImpactEffectManaConsume
|
||||
- !type:CP14SpellConsumeManaEffect
|
||||
mana: 10
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneManaConsume
|
||||
- type: Action
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- type: Sprite
|
||||
sprite: _CP14/Actions/Spells/meta.rsi
|
||||
state: mana_gift
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 10
|
||||
canModifyManacost: false
|
||||
- type: CP14MagicEffect
|
||||
@@ -24,7 +24,7 @@
|
||||
- !type:CP14ManaChange
|
||||
manaDelta: 10
|
||||
safe: false
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneManaGift
|
||||
- type: Action
|
||||
@@ -50,7 +50,7 @@
|
||||
name: Carefull mana transfer
|
||||
description: You transfer mana at a tremendous rate without dealing damage to the target.
|
||||
components:
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 20
|
||||
- type: CP14MagicEffect
|
||||
effects:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.7
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 10
|
||||
- type: CP14MagicEffect
|
||||
effects:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.7
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 10
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.3
|
||||
- type: CP14MagicEffectVampire
|
||||
- type: CP14MagicEffectSSDBlock
|
||||
- type: CP14MagicEffectTargetMobStatusRequired
|
||||
- type: CP14ActionSSDBlock
|
||||
- type: CP14ActionTargetMobStatusRequired
|
||||
allowedStates:
|
||||
- Alive
|
||||
- type: CP14MagicEffect
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.4
|
||||
- type: CP14MagicEffectVampire
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 30
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 12
|
||||
- type: CP14MagicEffectVampire
|
||||
- type: CP14MagicEffectSkillPointCost
|
||||
- type: CP14ActionSkillPointCost
|
||||
skillPoint: Blood
|
||||
count: 0.1
|
||||
- type: CP14MagicEffect
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
name: Form the essence of blood
|
||||
description: You extract the essence of life stolen from other beings from your body to pass on to other vampires or use in rituals.
|
||||
components:
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 15
|
||||
- type: CP14MagicEffectSkillPointCost
|
||||
- type: CP14ActionSkillPointCost
|
||||
skillPoint: Blood
|
||||
count: 1
|
||||
- type: CP14MagicEffect
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectVampire
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 5
|
||||
- type: CP14MagicEffect
|
||||
effects:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 30
|
||||
- type: CP14MagicEffect
|
||||
telegraphyEffects:
|
||||
@@ -15,7 +15,7 @@
|
||||
- CP14ImpactEffectBloodEssence
|
||||
effects:
|
||||
- !type:CP14SpellTeleportToVampireSingleton
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14ActionFreeHandsRequired
|
||||
- type: Action
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/vampire.rsi
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.4
|
||||
- type: CP14MagicEffectVampire
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 50
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: CP14MagicEffect
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnUser
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
name: Demonstration of strength
|
||||
description: By channeling the power of the oldest vampire clan, you instantly strike your target, causing them to fly back and lose their balance.
|
||||
components:
|
||||
- type: CP14MagicEffectPacifiedBlock
|
||||
- type: CP14ActionDangerous
|
||||
- type: CP14MagicEffectVampire
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 20
|
||||
- type: CP14MagicEffect
|
||||
effects:
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
components:
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.7
|
||||
- type: CP14MagicEffectManaCost
|
||||
- type: CP14ActionManaCost
|
||||
manaCost: 50
|
||||
- type: CP14MagicEffectVampire
|
||||
- type: CP14MagicEffectSkillPointCost
|
||||
- type: CP14ActionSkillPointCost
|
||||
skillPoint: Blood
|
||||
count: 1
|
||||
- type: CP14MagicEffectTargetMobStatusRequired
|
||||
- type: CP14ActionTargetMobStatusRequired
|
||||
allowedStates:
|
||||
- Dead
|
||||
- type: CP14MagicEffect
|
||||
@@ -41,7 +41,7 @@
|
||||
Asphyxiation: -500
|
||||
Bloodloss: -100
|
||||
- !type:Jitter
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
- type: CP14ActionSpeaking
|
||||
startSpeech: "Redi animam meam..."
|
||||
endSpeech: "Eu rezei por ti"
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user