diff --git a/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs b/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs index e324429859..d0a358155e 100644 --- a/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs +++ b/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs @@ -1,6 +1,7 @@ using System.Globalization; using System.Linq; using System.Numerics; +using Content.Client._CP14.IdentityRecognition; using Content.Client.Administration.Managers; using Content.Client.Chat; using Content.Client.Chat.Managers; @@ -820,6 +821,21 @@ public sealed partial class ChatUIController : UIController public void ProcessChatMessage(ChatMessage msg, bool speechBubble = true) { + //CP14 transform message on clientside + if (_player.LocalEntity is not null && msg.SenderEntity.IsValid()) + { + var ev = new CP14ClientTransformNameEvent(msg.SenderEntity); + _ent.EventBus.RaiseLocalEvent(_player.LocalEntity.Value, ev); + + if (ev.Handled) + { + var oldName = SharedChatSystem.GetStringInsideTag(msg, "Name"); + var newName = ev.Name; + msg.WrappedMessage = msg.WrappedMessage.Replace($"[Name]{oldName}[/Name]", $"[Name]{newName}[/Name]"); + } + } + //CP14 end + // color the name unless it's something like "the old man" if ((msg.Channel == ChatChannel.Local || msg.Channel == ChatChannel.Whisper) && _chatNameColorsEnabled) { diff --git a/Content.Client/_CP14/Actions/CP14ClientActionSystem.cs b/Content.Client/_CP14/Actions/CP14ClientActionSystem.cs new file mode 100644 index 0000000000..b596e9b435 --- /dev/null +++ b/Content.Client/_CP14/Actions/CP14ClientActionSystem.cs @@ -0,0 +1,7 @@ +using Content.Shared._CP14.Actions; + +namespace Content.Client._CP14.Actions; + +public sealed partial class CP14ClientActionSystem : CP14SharedActionSystem +{ +} diff --git a/Content.Client/_CP14/IdentityRecognition/CP14ClientIdentityRecognitionSystem.cs b/Content.Client/_CP14/IdentityRecognition/CP14ClientIdentityRecognitionSystem.cs new file mode 100644 index 0000000000..05bc2c5676 --- /dev/null +++ b/Content.Client/_CP14/IdentityRecognition/CP14ClientIdentityRecognitionSystem.cs @@ -0,0 +1,54 @@ +using Content.Shared._CP14.IdentityRecognition; +using Content.Shared.IdentityManagement; +using Content.Shared.Mind; +using Content.Shared.Mind.Components; + +namespace Content.Client._CP14.IdentityRecognition; + +public sealed partial class CP14ClientIdentityRecognitionSystem : CP14SharedIdentityRecognitionSystem +{ + [Dependency] private readonly SharedMindSystem _mind = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnTransformSpeakerName); + } + + private void OnTransformSpeakerName(Entity ent, ref CP14ClientTransformNameEvent args) + { + if (args.Handled) + return; + + var mindEntity = ent.Comp.Mind; + if (mindEntity is null) + return; + + TryComp(mindEntity.Value, out var knownNames); + + var speaker = GetEntity(args.Speaker); + + if (speaker == ent.Owner) + return; + + if (knownNames is not null && knownNames.Names.TryGetValue(args.Speaker.Id, out var name)) + { + args.Name = name; + } + else + { + args.Name = Identity.Name(speaker, EntityManager, ent); + } + args.Handled = true; + } +} + +public sealed class CP14ClientTransformNameEvent(NetEntity speaker) : EntityEventArgs +{ + public NetEntity Speaker = speaker; + + public string Name = string.Empty; + + public bool Handled { get; set; } +} diff --git a/Content.Client/_CP14/IdentityRecognition/CP14IdentityRecognitionBoundUserInterface.cs b/Content.Client/_CP14/IdentityRecognition/CP14IdentityRecognitionBoundUserInterface.cs new file mode 100644 index 0000000000..d934880f13 --- /dev/null +++ b/Content.Client/_CP14/IdentityRecognition/CP14IdentityRecognitionBoundUserInterface.cs @@ -0,0 +1,97 @@ +using Content.Shared._CP14.IdentityRecognition; +using Content.Shared.Labels.Components; +using Content.Shared.Mind.Components; +using Robust.Client.Player; +using Robust.Client.UserInterface; + +namespace Content.Client._CP14.IdentityRecognition; + +public sealed class CP14IdentityRecognitionBoundUserInterface : BoundUserInterface +{ + [Dependency] private readonly IEntityManager _entManager = default!; + [Dependency] private readonly IPlayerManager _player = default!; + + [ViewVariables] + private CP14RememberNameWindow? _window; + + private NetEntity? _rememberedTarget; + + public CP14IdentityRecognitionBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + IoCManager.InjectDependencies(this); + } + + protected override void Open() + { + base.Open(); + + _window = this.CreateWindow(); + + if (_entManager.TryGetComponent(Owner, out HandLabelerComponent? labeler)) + { + _window.SetMaxLabelLength(labeler!.MaxLabelChars); + } + + _window.OnRememberedNameChanged += OnLabelChanged; + Reload(); + } + + private void OnLabelChanged(string newLabel) + { + if (_rememberedTarget is null) + return; + + // Focus moment + var currentName = CurrentName(); + + if (currentName is not null && currentName.Equals(newLabel)) + return; + + SendPredictedMessage(new CP14RememberedNameChangedMessage(newLabel, _rememberedTarget.Value)); + } + + public void Reload() + { + if (_window is null) + return; + + var currentName = CurrentName(); + + if (currentName is null) + return; + + _window.SetCurrentLabel(currentName); + } + + private string? CurrentName() + { + if (_rememberedTarget is null) + return null; + if (!_entManager.TryGetComponent(_player.LocalEntity, out var mindContainer)) + return null; + if (!_entManager.TryGetComponent(mindContainer.Mind, out var knownNames)) + return null; + + var netId = _rememberedTarget.Value.Id; + return knownNames.Names.GetValueOrDefault(netId); + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (_window is null) + return; + + switch (state) + { + case CP14RememberNameUiState rememberNameUiState: + _rememberedTarget = rememberNameUiState.Target; + + var currentName = CurrentName(); + if (currentName is not null) + _window.SetCurrentLabel(currentName); + break; + } + } +} diff --git a/Content.Client/_CP14/IdentityRecognition/CP14RememberNameWindow.xaml b/Content.Client/_CP14/IdentityRecognition/CP14RememberNameWindow.xaml new file mode 100644 index 0000000000..e69281ef20 --- /dev/null +++ b/Content.Client/_CP14/IdentityRecognition/CP14RememberNameWindow.xaml @@ -0,0 +1,8 @@ + + + + diff --git a/Content.Client/_CP14/IdentityRecognition/CP14RememberNameWindow.xaml.cs b/Content.Client/_CP14/IdentityRecognition/CP14RememberNameWindow.xaml.cs new file mode 100644 index 0000000000..bd693420ec --- /dev/null +++ b/Content.Client/_CP14/IdentityRecognition/CP14RememberNameWindow.xaml.cs @@ -0,0 +1,61 @@ +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface.CustomControls; +using Robust.Client.UserInterface.XAML; + +namespace Content.Client._CP14.IdentityRecognition; + +[GenerateTypedNameReferences] +public sealed partial class CP14RememberNameWindow : DefaultWindow +{ + public event Action? OnRememberedNameChanged; + + /// + /// Is the user currently entering text into the control? + /// + private bool _focused; + // TODO LineEdit Make this a bool on the LineEdit control + + private string _label = string.Empty; + + public CP14RememberNameWindow() + { + RobustXamlLoader.Load(this); + + LabelLineEdit.OnTextChanged += e => + { + _label = e.Text; + OnRememberedNameChanged?.Invoke(_label); + }; + + LabelLineEdit.OnFocusEnter += _ => _focused = true; + LabelLineEdit.OnFocusExit += _ => + { + _focused = false; + LabelLineEdit.Text = _label; + }; + } + + protected override void Opened() + { + base.Opened(); + + // Give the editor keyboard focus, since that's the only + // thing the user will want to be doing with this UI + LabelLineEdit.GrabKeyboardFocus(); + } + + public void SetCurrentLabel(string label) + { + if (label == _label) + return; + + _label = label; + if (!_focused) + LabelLineEdit.Text = label; + } + + public void SetMaxLabelLength(int maxLength) + { + LabelLineEdit.IsValid = s => s.Length <= maxLength; + } +} diff --git a/Content.Client/_CP14/MagicEnergy/CP14MagicEnergySystem.cs b/Content.Client/_CP14/MagicEnergy/CP14MagicEnergySystem.cs index 10848f4b68..d2caad324a 100644 --- a/Content.Client/_CP14/MagicEnergy/CP14MagicEnergySystem.cs +++ b/Content.Client/_CP14/MagicEnergy/CP14MagicEnergySystem.cs @@ -2,4 +2,4 @@ using Content.Shared._CP14.MagicEnergy; namespace Content.Client._CP14.MagicEnergy; -public sealed class CP14MagicEnergySystem : SharedCP14MagicEnergySystem; +public sealed class CP14MagicEnergySystem : CP14SharedMagicEnergySystem; diff --git a/Content.Server/GameTicking/GameTicker.Spawning.cs b/Content.Server/GameTicking/GameTicker.Spawning.cs index b05572849e..ecdcc50610 100644 --- a/Content.Server/GameTicking/GameTicker.Spawning.cs +++ b/Content.Server/GameTicking/GameTicker.Spawning.cs @@ -284,7 +284,7 @@ namespace Content.Server.GameTicking var jobName = _jobs.MindTryGetJobName(newMind); _admin.UpdatePlayerList(player); - if (lateJoin && !silent) + if (lateJoin && !silent && false) //CP14 disable arrival snnouncement { if (jobPrototype.JoinNotifyCrew) { @@ -301,7 +301,7 @@ namespace Content.Server.GameTicking else { _chatSystem.DispatchStationAnnouncement(station, - Loc.GetString("cp14-latejoin-arrival-announcement",//CrystallEdge + Loc.GetString("latejoin-arrival-announcement", ("character", MetaData(mob).EntityName), ("gender", character.Gender), // CrystallEdge-LastnameGender ("entity", mob), diff --git a/Content.Server/IdentityManagement/IdentitySystem.cs b/Content.Server/IdentityManagement/IdentitySystem.cs index 131544e569..3173018712 100644 --- a/Content.Server/IdentityManagement/IdentitySystem.cs +++ b/Content.Server/IdentityManagement/IdentitySystem.cs @@ -90,6 +90,16 @@ public sealed class IdentitySystem : SharedIdentitySystem var representation = GetIdentityRepresentation(uid); var name = GetIdentityName(uid, representation); + //CP14 override character name + if (TryComp(uid, out var humanoid)) + { + var species = _humanoid.GetSpeciesRepresentation(humanoid.Species).ToLower(); + var age = _humanoid.GetAgeRepresentation(humanoid.Species, humanoid.Age); + + name = age + " " + species; + } + //CP14 end + // Clone the old entity's grammar to the identity entity, for loc purposes. if (TryComp(uid, out var grammar)) { diff --git a/Content.Server/_CP14/Actions/CP14ActionSystem.cs b/Content.Server/_CP14/Actions/CP14ActionSystem.cs new file mode 100644 index 0000000000..8b0cc4371f --- /dev/null +++ b/Content.Server/_CP14/Actions/CP14ActionSystem.cs @@ -0,0 +1,43 @@ +using Content.Server.Instruments; +using Content.Shared._CP14.Actions; +using Content.Shared._CP14.Actions.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(OnActionMusicAttempt); + } + + private void OnActionMusicAttempt(Entity ent, ref ActionAttemptEvent args) + { + if (args.Cancelled) + return; + + var passed = false; + var query = EntityQueryEnumerator(); + 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; + } +} diff --git a/Content.Server/_CP14/IdentityRecognition/CP14IdentityRecognitionSystem.cs b/Content.Server/_CP14/IdentityRecognition/CP14IdentityRecognitionSystem.cs new file mode 100644 index 0000000000..03a5e106f9 --- /dev/null +++ b/Content.Server/_CP14/IdentityRecognition/CP14IdentityRecognitionSystem.cs @@ -0,0 +1,7 @@ +using Content.Shared._CP14.IdentityRecognition; + +namespace Content.Server._CP14.IdentityRecognition; + +public sealed class CP14IdentityRecognitionSystem : CP14SharedIdentityRecognitionSystem +{ +} diff --git a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.cs b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.cs index c21a5782b9..cacbb69883 100644 --- a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.cs +++ b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.cs @@ -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!; diff --git a/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs b/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs index 6025aa72fe..103eef7456 100644 --- a/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs +++ b/Content.Server/_CP14/MagicSpell/CP14MagicSystem.cs @@ -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(OnProjectileHit); SubscribeLocalEvent(OnStartCollide); - SubscribeLocalEvent(OnSpellSpoken); + SubscribeLocalEvent(OnSpellSpoken); SubscribeLocalEvent(OnSpawnMagicVisualEffect); SubscribeLocalEvent(OnDespawnMagicVisualEffect); - - SubscribeLocalEvent(OnMusicCheck); } private void OnStartCollide(Entity ent, ref StartCollideEvent args) @@ -121,7 +120,7 @@ public sealed class CP14MagicSystem : CP14SharedMagicSystem } } - private void OnSpellSpoken(Entity ent, ref CP14SpellSpeechEvent args) + private void OnSpellSpoken(Entity ent, ref CP14ActionSpeechEvent args) { if (args.Performer is not null && args.Speech is not null) _chat.TrySendInGameICMessage(args.Performer.Value, args.Speech, args.Emote ? InGameICChatType.Emote : InGameICChatType.Speak, true); @@ -139,27 +138,4 @@ public sealed class CP14MagicSystem : CP14SharedMagicSystem QueueDel(ent.Comp.SpawnedEntity); ent.Comp.SpawnedEntity = null; } - - private void OnMusicCheck(Entity ent, ref CP14CastMagicEffectAttemptEvent args) - { - var passed = false; - var query = EntityQueryEnumerator(); - 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(); - } } diff --git a/Content.Server/_CP14/ModularCraft/Modifiers/EditManacostModify.cs b/Content.Server/_CP14/ModularCraft/Modifiers/EditManacostModify.cs index 7864826922..e0a8e9cc6d 100644 --- a/Content.Server/_CP14/ModularCraft/Modifiers/EditManacostModify.cs +++ b/Content.Server/_CP14/ModularCraft/Modifiers/EditManacostModify.cs @@ -9,9 +9,6 @@ namespace Content.Server._CP14.ModularCraft.Modifiers; public sealed partial class EditManacostModify : CP14ModularCraftModifier { - [DataField] - public Dictionary, FixedPoint2> Modifiers = new(); - [DataField] public FixedPoint2 GlobalModifier = 1f; @@ -20,21 +17,6 @@ public sealed partial class EditManacostModify : CP14ModularCraftModifier if (!entManager.TryGetComponent(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; } } diff --git a/Content.Server/_CP14/RoundEnd/CP14RoundEndSystem.CBT.cs b/Content.Server/_CP14/RoundEnd/CP14RoundEndSystem.CBT.cs index e1ea3f9942..3de9ed6a2a 100644 --- a/Content.Server/_CP14/RoundEnd/CP14RoundEndSystem.CBT.cs +++ b/Content.Server/_CP14/RoundEnd/CP14RoundEndSystem.CBT.cs @@ -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, () => { diff --git a/Content.Server/_CP14/RoundLeave/CP14RoundLeaveSystem.cs b/Content.Server/_CP14/RoundLeave/CP14RoundLeaveSystem.cs index ba99d64911..48ff5b614e 100644 --- a/Content.Server/_CP14/RoundLeave/CP14RoundLeaveSystem.cs +++ b/Content.Server/_CP14/RoundLeave/CP14RoundLeaveSystem.cs @@ -135,19 +135,16 @@ public sealed class CP14RoundLeaveSystem : EntitySystem _stationRecords.RemoveRecord(key, stationRecords); } - _chatSystem.DispatchStationAnnouncement(station.Value, - Loc.GetString( - _mobState.IsAlive(uid) ? "cp14-earlyleave-ship-announcement" : "cp14-earlyleave-ship-announcement-dead", - ("character", name), - ("job", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(jobName)) - ), - Loc.GetString("cp14-ship-sender"), - playDefaultSound: false - ); + //_chatSystem.DispatchStationAnnouncement(station.Value, + // Loc.GetString( + // _mobState.IsAlive(uid) ? "cp14-earlyleave-ship-announcement" : "cp14-earlyleave-ship-announcement-dead", + // ("character", name), + // ("job", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(jobName)) + // ), + // Loc.GetString("cp14-ship-sender"), + // playDefaultSound: false + //); QueueDel(uid); - - //if (mind is not null && mind.Value.Comp.Session is not null) - // _gameTicker.Respawn(mind.Value.Comp.Session); } } diff --git a/Content.Shared/_CP14/Actions/CP14ActionSystem.Attempt.cs b/Content.Shared/_CP14/Actions/CP14ActionSystem.Attempt.cs new file mode 100644 index 0000000000..f6162a12a7 --- /dev/null +++ b/Content.Shared/_CP14/Actions/CP14ActionSystem.Attempt.cs @@ -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(OnSomaticActionAttempt); + SubscribeLocalEvent(OnVerbalActionAttempt); + SubscribeLocalEvent(OnMaterialActionAttempt); + SubscribeLocalEvent(OnManacostActionAttempt); + SubscribeLocalEvent(OnStaminaCostActionAttempt); + SubscribeLocalEvent(OnDangerousActionAttempt); + SubscribeLocalEvent(OnSkillPointActionAttempt); + + SubscribeLocalEvent(OnActionSSDAttempt); + SubscribeLocalEvent(OnTargetMobStatusRequiredValidate); + SubscribeLocalEvent(OnReligionActionValidate); + } + + /// + /// Before using a spell, a mana check is made for the amount of mana to show warnings. + /// + private void OnManacostActionAttempt(Entity ent, ref ActionAttemptEvent args) + { + if (args.Cancelled) + return; + + TryComp(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(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(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 ent, ref ActionAttemptEvent args) + { + if (!TryComp(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 ent, ref ActionAttemptEvent args) + { + if (args.Cancelled) + return; + + if (TryComp(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 ent, ref ActionAttemptEvent args) + { + if (!HasComp(args.User)) + return; + + Popup.PopupClient(Loc.GetString("cp14-magic-spell-need-verbal-component"), args.User, args.User); + args.Cancelled = true; + } + + private void OnMaterialActionAttempt(Entity ent, ref ActionAttemptEvent args) + { + if (args.Cancelled) + return; + + if (ent.Comp.Requirement is null) + return; + + HashSet 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 ent, ref ActionAttemptEvent args) + { + if (args.Cancelled) + return; + + if (HasComp(args.User)) + { + Popup.PopupClient(Loc.GetString("cp14-magic-spell-pacified"), args.User, args.User); + args.Cancelled = true; + } + } + + private void OnSkillPointActionAttempt(Entity ent, ref ActionAttemptEvent args) + { + if (!_proto.TryIndex(ent.Comp.SkillPoint, out var indexedSkillPoint) || ent.Comp.SkillPoint is null) + return; + + if (!TryComp(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 ent, + ref ActionValidateEvent args) + { + if (args.Invalid) + return; + + var target = GetEntity(args.Input.EntityTarget); + + if (!TryComp(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 ent, ref ActionValidateEvent args) + { + if (args.Invalid) + return; + + if (!TryComp(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 ent, ref ActionValidateEvent args) + { + if (args.Invalid) + return; + + if (!TryComp(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(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; + } + } + } +} diff --git a/Content.Shared/_CP14/Actions/CP14ActionSystem.Examine.cs b/Content.Shared/_CP14/Actions/CP14ActionSystem.Examine.cs new file mode 100644 index 0000000000..99fcc4b057 --- /dev/null +++ b/Content.Shared/_CP14/Actions/CP14ActionSystem.Examine.cs @@ -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(OnManacostExamined); + SubscribeLocalEvent(OnStaminaCostExamined); + SubscribeLocalEvent(OnSkillPointCostExamined); + + SubscribeLocalEvent(OnVerbalExamined); + SubscribeLocalEvent(OnSomaticExamined); + SubscribeLocalEvent(OnMaterialExamined); + SubscribeLocalEvent(OnMusicExamined); + SubscribeLocalEvent(OnMobStateExamined); + } + + private void OnManacostExamined(Entity ent, ref ExaminedEvent args) + { + args.PushMarkup($"{Loc.GetString("cp14-magic-manacost")}: [color=#5da9e8]{ent.Comp.ManaCost}[/color]", priority: 9); + } + + private void OnStaminaCostExamined(Entity ent, ref ExaminedEvent args) + { + args.PushMarkup($"{Loc.GetString("cp14-magic-staminacost")}: [color=#3fba54]{ent.Comp.Stamina}[/color]", priority: 9); + } + + private void OnSkillPointCostExamined(Entity 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 ent, ref ExaminedEvent args) + { + args.PushMarkup(Loc.GetString("cp14-magic-verbal-aspect"), 8); + } + + private void OnSomaticExamined(Entity ent, ref ExaminedEvent args) + { + args.PushMarkup(Loc.GetString("cp14-magic-somatic-aspect") + " " + ent.Comp.FreeHandRequired, 8); + } + + private void OnMaterialExamined(Entity 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 ent, ref ExaminedEvent args) + { + args.PushMarkup(Loc.GetString("cp14-magic-music-aspect")); + } + + private void OnMobStateExamined(Entity 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))); + } +} diff --git a/Content.Shared/_CP14/Actions/CP14SharedActionSystem.cs b/Content.Shared/_CP14/Actions/CP14SharedActionSystem.cs new file mode 100644 index 0000000000..6279187e2b --- /dev/null +++ b/Content.Shared/_CP14/Actions/CP14SharedActionSystem.cs @@ -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(); + } +} diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionDangerousComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionDangerousComponent.cs new file mode 100644 index 0000000000..23b65fe73e --- /dev/null +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionDangerousComponent.cs @@ -0,0 +1,13 @@ +using Content.Shared._CP14.MagicSpell; +using Robust.Shared.GameStates; + +namespace Content.Shared._CP14.Actions.Components; + +/// +/// Blocks the target from using magic if they are pacified. +/// Also block using spell on SSD player +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class CP14ActionDangerousComponent : Component +{ +} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectSomaticAspectComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionFreeHandsRequiredComponent.cs similarity index 77% rename from Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectSomaticAspectComponent.cs rename to Content.Shared/_CP14/Actions/Components/CP14ActionFreeHandsRequiredComponent.cs index d811c2b52b..24b79d480b 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectSomaticAspectComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionFreeHandsRequiredComponent.cs @@ -4,7 +4,7 @@ namespace Content.Shared._CP14.MagicSpell.Components; /// Requires the user to have at least one free hand to use this spell /// [RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectSomaticAspectComponent : Component +public sealed partial class CP14ActionFreeHandsRequiredComponent : Component { [DataField] public int FreeHandRequired = 1; diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectManaCostComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionManaCostComponent.cs similarity index 67% rename from Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectManaCostComponent.cs rename to Content.Shared/_CP14/Actions/Components/CP14ActionManaCostComponent.cs index 40f56fc416..740b4fd1f8 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectManaCostComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionManaCostComponent.cs @@ -1,12 +1,12 @@ using Content.Shared.FixedPoint; -namespace Content.Shared._CP14.MagicSpell.Components; +namespace Content.Shared._CP14.Actions.Components; /// /// Restricts the use of this action, by spending mana or user requirements. /// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectManaCostComponent : Component +[RegisterComponent] +public sealed partial class CP14ActionManaCostComponent : Component { [DataField] public FixedPoint2 ManaCost = 0f; diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectMaterialAspectComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionMaterialCostComponent.cs similarity index 57% rename from Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectMaterialAspectComponent.cs rename to Content.Shared/_CP14/Actions/Components/CP14ActionMaterialCostComponent.cs index 434a5a4e72..7f819f6ced 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectMaterialAspectComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionMaterialCostComponent.cs @@ -1,12 +1,12 @@ using Content.Shared._CP14.Workbench; -namespace Content.Shared._CP14.MagicSpell.Components; +namespace Content.Shared._CP14.Actions.Components; /// /// Requires the caster to hold a specific resource in their hand, which will be spent to use the spell. /// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectMaterialAspectComponent : Component +[RegisterComponent] +public sealed partial class CP14ActionMaterialCostComponent : Component { [DataField(required: true)] public CP14WorkbenchCraftRequirement? Requirement; diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectReligionRestrictedComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionReligionRestrictedComponent.cs similarity index 70% rename from Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectReligionRestrictedComponent.cs rename to Content.Shared/_CP14/Actions/Components/CP14ActionReligionRestrictedComponent.cs index 25eca4eb4b..d429f791c8 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectReligionRestrictedComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionReligionRestrictedComponent.cs @@ -1,10 +1,11 @@ -namespace Content.Shared._CP14.MagicSpell.Components; + +namespace Content.Shared._CP14.Actions.Components; /// /// If the user belongs to a religion, this spell can only be used within the area of influence of that religion /// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectReligionRestrictedComponent : Component +[RegisterComponent] +public sealed partial class CP14ActionReligionRestrictedComponent : Component { /// /// does not allow the spell to be used outside the god's area of influence diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionRequiredMusicToolComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionRequiredMusicToolComponent.cs new file mode 100644 index 0000000000..79451253f2 --- /dev/null +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionRequiredMusicToolComponent.cs @@ -0,0 +1,11 @@ +using Content.Shared._CP14.MagicSpell; + +namespace Content.Shared._CP14.Actions.Components; + +/// +/// Requires the user to play music to use this spell +/// +[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] +public sealed partial class CP14ActionRequiredMusicToolComponent : Component +{ +} diff --git a/Content.Shared/_CP14/Actions/Components/CP14ActionSSDBlockComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionSSDBlockComponent.cs new file mode 100644 index 0000000000..00ac65a3d8 --- /dev/null +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionSSDBlockComponent.cs @@ -0,0 +1,11 @@ +using Content.Shared._CP14.MagicSpell; + +namespace Content.Shared._CP14.Actions.Components; + +/// +/// Blocks the user from using action against target target in SSD. +/// +[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] +public sealed partial class CP14ActionSSDBlockComponent : Component +{ +} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectSkillpointCostComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionSkillPointCostComponent.cs similarity index 64% rename from Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectSkillpointCostComponent.cs rename to Content.Shared/_CP14/Actions/Components/CP14ActionSkillPointCostComponent.cs index e07a421afb..df88fa0131 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectSkillpointCostComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionSkillPointCostComponent.cs @@ -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; /// /// Restricts the use of this action, by spending user skillpoints /// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectSkillPointCostComponent : Component +[RegisterComponent, NetworkedComponent] +public sealed partial class CP14ActionSkillPointCostComponent : Component { [DataField(required: true)] public ProtoId? SkillPoint; diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectVerbalAspectComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionSpeakingComponent.cs similarity index 51% rename from Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectVerbalAspectComponent.cs rename to Content.Shared/_CP14/Actions/Components/CP14ActionSpeakingComponent.cs index 058f6b9fac..91876fe7e6 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectVerbalAspectComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionSpeakingComponent.cs @@ -1,10 +1,10 @@ -namespace Content.Shared._CP14.MagicSpell.Components; +namespace Content.Shared._CP14.Actions.Components; /// -/// Requires the user to be able to speak in order to use this spell. Also forces the user to use certain phrases at the beginning and end of a spell cast +/// 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 /// -[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 /// [ByRefEvent] -public sealed class CP14SpellSpeechEvent : EntityEventArgs +public sealed class CP14ActionSpeechEvent : EntityEventArgs { public EntityUid? Performer { get; init; } diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectStaminaCostComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionStaminaCostComponent.cs similarity index 55% rename from Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectStaminaCostComponent.cs rename to Content.Shared/_CP14/Actions/Components/CP14ActionStaminaCostComponent.cs index ca3400ef5f..7849aeb811 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectStaminaCostComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionStaminaCostComponent.cs @@ -1,10 +1,12 @@ -namespace Content.Shared._CP14.MagicSpell.Components; +using Content.Shared._CP14.MagicSpell; + +namespace Content.Shared._CP14.Actions.Components; /// /// Restricts the use of this action, by spending stamina. /// [RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectStaminaCostComponent : Component +public sealed partial class CP14ActionStaminaCostComponent : Component { [DataField] public float Stamina = 0f; diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectTargetMobStatusRequiredComponent.cs b/Content.Shared/_CP14/Actions/Components/CP14ActionTargetMobStatusRequiredComponent.cs similarity index 68% rename from Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectTargetMobStatusRequiredComponent.cs rename to Content.Shared/_CP14/Actions/Components/CP14ActionTargetMobStatusRequiredComponent.cs index f3bbf073a8..876cb970b4 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectTargetMobStatusRequiredComponent.cs +++ b/Content.Shared/_CP14/Actions/Components/CP14ActionTargetMobStatusRequiredComponent.cs @@ -1,13 +1,13 @@ using Content.Shared.Mobs; using Robust.Shared.GameStates; -namespace Content.Shared._CP14.MagicSpell.Components; +namespace Content.Shared._CP14.Actions.Components; /// /// Allows you to limit the use of a spell based on the target's alive/dead status /// [RegisterComponent, NetworkedComponent] -public sealed partial class CP14MagicEffectTargetMobStatusRequiredComponent : Component +public sealed partial class CP14ActionTargetMobStatusRequiredComponent : Component { [DataField] public HashSet AllowedStates = new() { MobState.Alive }; diff --git a/Content.Shared/_CP14/Chemistry/ReagentEffect/CP14ManaChange.cs b/Content.Shared/_CP14/Chemistry/ReagentEffect/CP14ManaChange.cs index 021b8cf041..b8f18a5473 100644 --- a/Content.Shared/_CP14/Chemistry/ReagentEffect/CP14ManaChange.cs +++ b/Content.Shared/_CP14/Chemistry/ReagentEffect/CP14ManaChange.cs @@ -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(); + var magicSystem = entityManager.System(); magicSystem.ChangeEnergy(args.TargetEntity, ManaDelta * scale, out var changed, out var overload, safe: Safe); scale -= FixedPoint2.Abs(changed + overload); diff --git a/Content.Shared/_CP14/IdentityRecognition/CP14RememberedNamesComponent.cs b/Content.Shared/_CP14/IdentityRecognition/CP14RememberedNamesComponent.cs new file mode 100644 index 0000000000..afce91a5b6 --- /dev/null +++ b/Content.Shared/_CP14/IdentityRecognition/CP14RememberedNamesComponent.cs @@ -0,0 +1,15 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared._CP14.IdentityRecognition; + +/// +/// Stores all the names of other characters that the player has memorized. +/// These players will be visible to the player under that name, rather than as nameless characters. +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +public sealed partial class CP14RememberedNamesComponent : Component +{ + //Pair of NetEntity Id and names + [DataField, AutoNetworkedField] + public Dictionary Names = []; +} diff --git a/Content.Shared/_CP14/IdentityRecognition/CP14SharedIdentityRecognitionSystem.cs b/Content.Shared/_CP14/IdentityRecognition/CP14SharedIdentityRecognitionSystem.cs new file mode 100644 index 0000000000..d72788c966 --- /dev/null +++ b/Content.Shared/_CP14/IdentityRecognition/CP14SharedIdentityRecognitionSystem.cs @@ -0,0 +1,137 @@ +using Content.Shared.Examine; +using Content.Shared.Ghost; +using Content.Shared.IdentityManagement; +using Content.Shared.IdentityManagement.Components; +using Content.Shared.Mind; +using Content.Shared.Mind.Components; +using Content.Shared.Verbs; +using Robust.Shared.Player; +using Robust.Shared.Serialization; +using Robust.Shared.Utility; + +namespace Content.Shared._CP14.IdentityRecognition; + +public abstract class CP14SharedIdentityRecognitionSystem : EntitySystem +{ + [Dependency] private readonly SharedUserInterfaceSystem _uiSystem = default!; + [Dependency] private readonly SharedMindSystem _mind = default!; + [Dependency] private readonly SharedIdentitySystem _identity = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent>(OnUnknownIdentityVerb); + SubscribeLocalEvent(OnExaminedEvent); + + SubscribeLocalEvent(OnRememberedNameChanged); + + SubscribeLocalEvent(OnMapInit); + } + + private void OnMapInit(Entity ent, ref MapInitEvent args) + { + if (!TryComp(ent, out var mind)) + return; + + if (mind.OwnedEntity is null) + return; + + if (mind.CharacterName is null) + return; + + RememberCharacter(ent, GetNetEntity(mind.OwnedEntity.Value), mind.CharacterName); + } + + private void OnUnknownIdentityVerb(Entity ent, ref GetVerbsEvent args) + { + if (HasComp(args.User)) + return; + + if(!_mind.TryGetMind(args.User, out var mindId, out var mind)) + return; + + if (!TryComp(args.User, out var actor)) + return; + + if (args.User == ent.Owner) + return; + + EnsureComp(mindId); + + var seeAttemptEv = new SeeIdentityAttemptEvent(); + RaiseLocalEvent(ent.Owner, seeAttemptEv); + + var _args = args; + var verb = new Verb + { + Priority = 2, + Icon = new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")), + Text = Loc.GetString("cp14-remember-name-verb"), + Disabled = seeAttemptEv.Cancelled, + Act = () => + { + _uiSystem.SetUiState(_args.User, CP14RememberNameUiKey.Key, new CP14RememberNameUiState(GetNetEntity(ent))); + _uiSystem.TryToggleUi(_args.User, CP14RememberNameUiKey.Key, actor.PlayerSession); + }, + }; + args.Verbs.Add(verb); + } + + private void OnExaminedEvent(Entity ent, ref ExaminedEvent args) + { + var ev = new SeeIdentityAttemptEvent(); + RaiseLocalEvent(ent.Owner, ev); + + if (ev.Cancelled) + return; + + if (!_mind.TryGetMind(args.Examiner, out var mindId, out var mind)) + return; + + if (!TryComp(mindId, out var knownNames)) + return; + + if (knownNames.Names.TryGetValue(GetNetEntity(ent).Id, out var name)) + { + args.PushMarkup(Loc.GetString("cp14-remember-name-examine", ("name", name)), priority: -1); + } + } + + private void OnRememberedNameChanged(Entity ent, ref CP14RememberedNameChangedMessage args) + { + var mindEntity = ent.Comp.Mind; + + if (mindEntity is null) + return; + + RememberCharacter(mindEntity.Value, args.Target, args.Name); + } + + private void RememberCharacter(EntityUid mindEntity, NetEntity targetId, string name) + { + var knownNames = EnsureComp(mindEntity); + + knownNames.Names[targetId.Id] = name; + Dirty(mindEntity, knownNames); + } +} + +[Serializable, NetSerializable] +public sealed class CP14RememberedNameChangedMessage(string name, NetEntity target) : BoundUserInterfaceMessage +{ + public string Name { get; } = name; + public NetEntity Target { get; } = target; +} + +[Serializable, NetSerializable] +public enum CP14RememberNameUiKey +{ + Key, +} + +[Serializable, NetSerializable] +public sealed class CP14RememberNameUiState(NetEntity target) : BoundUserInterfaceState +{ + public NetEntity Target = target; +} diff --git a/Content.Shared/_CP14/IdentityRecognition/CP14UnknownIdentityComponent.cs b/Content.Shared/_CP14/IdentityRecognition/CP14UnknownIdentityComponent.cs new file mode 100644 index 0000000000..0cf57892f6 --- /dev/null +++ b/Content.Shared/_CP14/IdentityRecognition/CP14UnknownIdentityComponent.cs @@ -0,0 +1,13 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared._CP14.IdentityRecognition; + +/// +/// defines this character's name as unknown. +/// The name can be memorized via KnownNamesComponent, +/// and is hidden when IdentityBlocker is enabled. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class CP14UnknownIdentityComponent : Component +{ +} diff --git a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs b/Content.Shared/_CP14/MagicEnergy/CP14SharedMagicEnergySystem.cs similarity index 99% rename from Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs rename to Content.Shared/_CP14/MagicEnergy/CP14SharedMagicEnergySystem.cs index 4a729cb832..4ebd0fd36f 100644 --- a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs +++ b/Content.Shared/_CP14/MagicEnergy/CP14SharedMagicEnergySystem.cs @@ -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!; diff --git a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyContainerComponent.cs b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyContainerComponent.cs index 37ab1dab3a..16fb851f4b 100644 --- a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyContainerComponent.cs +++ b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyContainerComponent.cs @@ -9,7 +9,7 @@ namespace Content.Shared._CP14.MagicEnergy.Components; /// Allows an item to store magical energy within itself. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] -[Access(typeof(SharedCP14MagicEnergySystem))] +[Access(typeof(CP14SharedMagicEnergySystem))] public sealed partial class CP14MagicEnergyContainerComponent : Component { [DataField, AutoNetworkedField] diff --git a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyExaminableComponent.cs b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyExaminableComponent.cs index eaa1bcc486..6605b67ae5 100644 --- a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyExaminableComponent.cs +++ b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyExaminableComponent.cs @@ -6,5 +6,5 @@ namespace Content.Shared._CP14.MagicEnergy.Components; /// Allows you to examine how much energy is in that object. /// [RegisterComponent, NetworkedComponent] -[Access(typeof(SharedCP14MagicEnergySystem))] +[Access(typeof(CP14SharedMagicEnergySystem))] public sealed partial class CP14MagicEnergyExaminableComponent : Component; diff --git a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyFromDamageComponent.cs b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyFromDamageComponent.cs index 6663d72266..e1ec3cf645 100644 --- a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyFromDamageComponent.cs +++ b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyFromDamageComponent.cs @@ -6,7 +6,7 @@ namespace Content.Shared._CP14.MagicEnergy.Components; /// /// Restores or expends magical energy when taking damage of certain types. /// -[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))] +[RegisterComponent, Access(typeof(CP14SharedMagicEnergySystem))] public sealed partial class CP14MagicEnergyFromDamageComponent : Component { [DataField] diff --git a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPhotosynthesisComponent.cs b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPhotosynthesisComponent.cs index cfb7f72f47..c27bd40705 100644 --- a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPhotosynthesisComponent.cs +++ b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPhotosynthesisComponent.cs @@ -6,7 +6,7 @@ namespace Content.Shared._CP14.MagicEnergy.Components; /// /// Restores mana if the entity is in the sun, and wastes it if not /// -[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))] +[RegisterComponent, Access(typeof(CP14SharedMagicEnergySystem))] public sealed partial class CP14MagicEnergyPhotosynthesisComponent : Component { [DataField] diff --git a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergyCrystalSlotSystem.cs b/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergyCrystalSlotSystem.cs index 787b6bfc59..1f6c7444ce 100644 --- a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergyCrystalSlotSystem.cs +++ b/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergyCrystalSlotSystem.cs @@ -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!; diff --git a/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceScannerComponent.cs b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceScannerComponent.cs index 701889caee..360d1e6a72 100644 --- a/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceScannerComponent.cs +++ b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceScannerComponent.cs @@ -5,7 +5,7 @@ namespace Content.Shared._CP14.MagicEssence; /// /// Allows you to see how much magic essence is stored in objects /// -[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))] +[RegisterComponent, Access(typeof(CP14SharedMagicEnergySystem))] public sealed partial class CP14MagicEssenceScannerComponent : Component { } diff --git a/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSystem.cs b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSystem.cs index 2b979ce31d..7b474494a8 100644 --- a/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSystem.cs +++ b/Content.Shared/_CP14/MagicEssence/CP14MagicEssenceSystem.cs @@ -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!; diff --git a/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifyComponent.cs b/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifyComponent.cs index 565e98a347..9308d3962a 100644 --- a/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifyComponent.cs +++ b/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifyComponent.cs @@ -10,9 +10,6 @@ namespace Content.Shared._CP14.MagicManacostModify; [RegisterComponent] public sealed partial class CP14MagicManacostModifyComponent : Component { - [DataField] - public Dictionary, FixedPoint2> Modifiers = new(); - [DataField] public FixedPoint2 GlobalModifier = 1f; diff --git a/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifySystem.cs b/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifySystem.cs index 648e359dfa..3583ec388c 100644 --- a/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifySystem.cs +++ b/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifySystem.cs @@ -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, 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 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; - } } } diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs index 0e5e7851b3..ed1352fc2c 100644 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs +++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Checks.cs @@ -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(OnSomaticCheck); - SubscribeLocalEvent(OnVerbalCheck); - SubscribeLocalEvent(OnMaterialCheck); - SubscribeLocalEvent(OnManaCheck); - SubscribeLocalEvent(OnStaminaCheck); - SubscribeLocalEvent(OnSkillPointCheck); - SubscribeLocalEvent(OnPacifiedCheck); - SubscribeLocalEvent(OnSSDCheck); - SubscribeLocalEvent(OnMobStateCheck); - SubscribeLocalEvent(OnReligionRestrictedCheck); - //Verbal speaking - SubscribeLocalEvent(OnVerbalAspectStartCast); - SubscribeLocalEvent(OnVerbalAspectAfterCast); + SubscribeLocalEvent(OnVerbalAspectStartCast); + SubscribeLocalEvent(OnVerbalAspectAfterCast); SubscribeLocalEvent(OnEmoteStartCast); SubscribeLocalEvent(OnEmoteEndCast); //Consuming resources - SubscribeLocalEvent(OnMaterialAspectEndCast); - SubscribeLocalEvent(OnStaminaConsume); - SubscribeLocalEvent(OnManaConsume); - SubscribeLocalEvent(OnSkillPointConsume); + SubscribeLocalEvent(OnMaterialAspectEndCast); + SubscribeLocalEvent(OnStaminaConsume); + SubscribeLocalEvent(OnManaConsume); + SubscribeLocalEvent(OnSkillPointConsume); } - /// - /// Before using a spell, a mana check is made for the amount of mana to show warnings. - /// - private void OnManaCheck(Entity 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 ent, - ref CP14CastMagicEffectAttemptEvent args) - { - if (!TryComp(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 ent, ref CP14CastMagicEffectAttemptEvent args) - { - if (!_proto.TryIndex(ent.Comp.SkillPoint, out var indexedSkillPoint) || ent.Comp.SkillPoint is null) - return; - - if (!TryComp(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 ent, - ref CP14CastMagicEffectAttemptEvent args) - { - if (TryComp(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 ent, - ref CP14CastMagicEffectAttemptEvent args) - { - if (!HasComp(args.Performer)) - return; - - args.PushReason(Loc.GetString("cp14-magic-spell-need-verbal-component")); - args.Cancel(); - } - - private void OnMaterialCheck(Entity ent, ref CP14CastMagicEffectAttemptEvent args) - { - if (ent.Comp.Requirement is null) - return; - - HashSet heldedItems = new(); - - foreach (var hand in _hand.EnumerateHands(args.Performer)) - { - var helded = _hand.GetHeldItem(args.Performer, hand); - if (helded is not null) - heldedItems.Add(helded.Value); - } - - if (!ent.Comp.Requirement.CheckRequirement(EntityManager, _proto, heldedItems)) - { - args.PushReason(Loc.GetString("cp14-magic-spell-need-material-component")); - args.Cancel(); - } - } - - private void OnPacifiedCheck(Entity ent, - ref CP14CastMagicEffectAttemptEvent args) - { - if (!HasComp(args.Performer)) - return; - - args.PushReason(Loc.GetString("cp14-magic-spell-pacified")); - args.Cancel(); - } - - private void OnSSDCheck(Entity ent, ref CP14CastMagicEffectAttemptEvent args) - { - if (args.Target is null) - return; - - if (!TryComp(args.Target.Value, out var ssdIndication)) - return; - - if (ssdIndication.IsSSD) - { - args.PushReason(Loc.GetString("cp14-magic-spell-ssd")); - args.Cancel(); - } - } - - private void OnMobStateCheck(Entity ent, - ref CP14CastMagicEffectAttemptEvent args) - { - if (args.Target is not { } target) - return; - - if (!TryComp(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 ent, - ref CP14CastMagicEffectAttemptEvent args) - { - if (!TryComp(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(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 ent, + private void OnVerbalAspectStartCast(Entity 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 ent, + private void OnVerbalAspectAfterCast(Entity 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 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 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 ent, ref CP14MagicEffectConsumeResourceEvent args) + private void OnMaterialAspectEndCast(Entity 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 ent, ref CP14MagicEffectConsumeResourceEvent args) + private void OnStaminaConsume(Entity 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 ent, ref CP14MagicEffectConsumeResourceEvent args) + private void OnManaConsume(Entity ent, ref CP14MagicEffectConsumeResourceEvent args) { if (!TryComp(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 ent, ref CP14MagicEffectConsumeResourceEvent args) + private void OnSkillPointConsume(Entity 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); diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.DelayedActions.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.DelayedActions.cs index 0f5a434c2d..c08489fc12 100644 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.DelayedActions.cs +++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.DelayedActions.cs @@ -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; } diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Examine.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Examine.cs deleted file mode 100644 index 3a8e71fa2b..0000000000 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.Examine.cs +++ /dev/null @@ -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(OnManaEffectExamined); - - SubscribeLocalEvent(OnManacostExamined); - SubscribeLocalEvent(OnStaminaCostExamined); - SubscribeLocalEvent(OnSkillPointCostExamined); - - SubscribeLocalEvent(OnVerbalExamined); - SubscribeLocalEvent(OnSomaticExamined); - SubscribeLocalEvent(OnMaterialExamined); - SubscribeLocalEvent(OnMusicExamined); - SubscribeLocalEvent(OnMobStateExamined); - } - - private void OnManaEffectExamined(Entity 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 ent, ref ExaminedEvent args) - { - args.PushMarkup($"{Loc.GetString("cp14-magic-manacost")}: [color=#5da9e8]{ent.Comp.ManaCost}[/color]", priority: 9); - } - - private void OnStaminaCostExamined(Entity ent, ref ExaminedEvent args) - { - args.PushMarkup($"{Loc.GetString("cp14-magic-staminacost")}: [color=#3fba54]{ent.Comp.Stamina}[/color]", priority: 9); - } - - private void OnSkillPointCostExamined(Entity 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 ent, ref ExaminedEvent args) - { - args.PushMarkup(Loc.GetString("cp14-magic-verbal-aspect"), 8); - } - - private void OnSomaticExamined(Entity ent, ref ExaminedEvent args) - { - args.PushMarkup(Loc.GetString("cp14-magic-somatic-aspect") + " " + ent.Comp.FreeHandRequired, 8); - } - - private void OnMaterialExamined(Entity 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 ent, ref ExaminedEvent args) - { - args.PushMarkup(Loc.GetString("cp14-magic-music-aspect")); - } - - private void OnMobStateExamined(Entity 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))); - } -} diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.InstantActions.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.InstantActions.cs index 00631a9c45..bce06450ee 100644 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.InstantActions.cs +++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.InstantActions.cs @@ -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); } } diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.ToggleableActions.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.ToggleableActions.cs index 66eaad0f51..aefb06169f 100644 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.ToggleableActions.cs +++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.ToggleableActions.cs @@ -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 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 diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs index 46b4cfaaff..25f415c9e3 100644 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs +++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs @@ -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(); _magicEffectQuery = GetEntityQuery(); @@ -106,23 +105,6 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem _doAfter.Cancel(ent.Comp.ActiveDoAfter); } - /// - /// Checking to see if the spell can be used at all - /// - private bool CanCastSpell(Entity 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 ent, CP14SpellEffectBaseArgs args) { if (!_timing.IsFirstTimePredicted) @@ -149,7 +131,7 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem if (args.User is not null && TryComp(ent, out var actionComp) - && TryComp(ent, out var manaCost)) + && TryComp(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 ent, EntityUid? caster) + public FixedPoint2 CalculateManacost(Entity ent, EntityUid? caster) { var manaCost = ent.Comp.ManaCost; if (ent.Comp.CanModifyManacost && _magicEffectQuery.TryComp(ent, out var magicEffect)) { - var manaEv = new CP14CalculateManacostEvent(caster, ent.Comp.ManaCost, magicEffect.MagicType); + var manaEv = new CP14CalculateManacostEvent(caster, ent.Comp.ManaCost); if (caster is not null) RaiseLocalEvent(caster.Value, manaEv); diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectComponent.cs index d92e5703fc..8034d6488d 100644 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectComponent.cs +++ b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectComponent.cs @@ -18,9 +18,6 @@ public sealed partial class CP14MagicEffectComponent : Component [DataField] public EntityUid? SpellStorage; - [DataField] - public ProtoId? MagicType = null; - /// /// 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. /// diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectPacifiedBlockComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectPacifiedBlockComponent.cs deleted file mode 100644 index 01b2dd260b..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectPacifiedBlockComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Content.Shared._CP14.MagicSpell.Components; - -/// -/// Blocks the target from using magic if they are pacified. -/// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectPacifiedBlockComponent : Component -{ -} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectRequiredMusicToolComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectRequiredMusicToolComponent.cs deleted file mode 100644 index d8a12102d0..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectRequiredMusicToolComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Content.Shared._CP14.MagicSpell.Components; - -/// -/// Requires the user to play music to use this spell -/// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectRequiredMusicToolComponent : Component -{ -} diff --git a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectSSDBlockComponent.cs b/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectSSDBlockComponent.cs deleted file mode 100644 index 53ec253b29..0000000000 --- a/Content.Shared/_CP14/MagicSpell/Components/CP14MagicEffectSSDBlockComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Content.Shared._CP14.MagicSpell.Components; - -/// -/// Blocks the target from using magic if they are pacified. -/// -[RegisterComponent, Access(typeof(CP14SharedMagicSystem))] -public sealed partial class CP14MagicEffectSSDBlockComponent : Component -{ -} diff --git a/Content.Shared/_CP14/MagicSpell/Events/CP14CastMagicEffectEvent.cs b/Content.Shared/_CP14/MagicSpell/Events/CP14CastMagicEffectEvent.cs index 4206a7c5a5..1f463539bc 100644 --- a/Content.Shared/_CP14/MagicSpell/Events/CP14CastMagicEffectEvent.cs +++ b/Content.Shared/_CP14/MagicSpell/Events/CP14CastMagicEffectEvent.cs @@ -8,35 +8,6 @@ using Robust.Shared.Prototypes; namespace Content.Shared._CP14.MagicSpell.Events; -/// -/// Called first to verify that all conditions are met and the spell can be performed. -/// -public sealed class CP14CastMagicEffectAttemptEvent : CancellableEntityEventArgs -{ - /// - /// The Performer of the event, to check if they meet the requirements. - /// - 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"; - } -} - /// /// An event that checks all sorts of conditions, and calculates the total cost of casting a spell. Called before the spell is cast. /// @@ -47,13 +18,11 @@ public sealed class CP14CalculateManacostEvent : EntityEventArgs, IInventoryRela public float Multiplier = 1f; public EntityUid? Performer; - public ProtoId? MagicType; - public CP14CalculateManacostEvent(EntityUid? performer, FixedPoint2 initialManacost, ProtoId? magicType) + public CP14CalculateManacostEvent(EntityUid? performer, FixedPoint2 initialManacost) { Performer = performer; Manacost = initialManacost; - MagicType = magicType; } public float GetManacost() diff --git a/Content.Shared/_CP14/MagicSpell/Spells/C14SpellInterruptSpell.cs b/Content.Shared/_CP14/MagicSpell/Spells/C14SpellInterruptSpell.cs index d8ab0f5567..2ba4e1b609 100644 --- a/Content.Shared/_CP14/MagicSpell/Spells/C14SpellInterruptSpell.cs +++ b/Content.Shared/_CP14/MagicSpell/Spells/C14SpellInterruptSpell.cs @@ -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(spell)) + if (entManager.HasComponent(spell)) { interrupt = true; break; diff --git a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellConsumeMana.cs b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellConsumeMana.cs index ad4050a4b4..a80b3ab169 100644 --- a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellConsumeMana.cs +++ b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellConsumeMana.cs @@ -22,7 +22,7 @@ public sealed partial class CP14SpellConsumeManaEffect : CP14SpellEffect if (!entManager.HasComponent(targetEntity)) return; - var magicEnergy = entManager.System(); + var magicEnergy = entManager.System(); //First - used object if (args.Used is not null) diff --git a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellTransferManaToGod.cs b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellTransferManaToGod.cs index 4a8803979b..64941f7cae 100644 --- a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellTransferManaToGod.cs +++ b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellTransferManaToGod.cs @@ -25,7 +25,7 @@ public sealed partial class CP14SpellTransferManaToGod : CP14SpellEffect return; var religionSys = entManager.System(); - var magicEnergySys = entManager.System(); + var magicEnergySys = entManager.System(); var gods = religionSys.GetGods(follower.Religion.Value); var manaAmount = Amount / gods.Count; diff --git a/Content.Shared/_CP14/Skill/Effects/AddMaxMana.cs b/Content.Shared/_CP14/Skill/Effects/AddMaxMana.cs index 7fc05e438c..c07c873c0b 100644 --- a/Content.Shared/_CP14/Skill/Effects/AddMaxMana.cs +++ b/Content.Shared/_CP14/Skill/Effects/AddMaxMana.cs @@ -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(); + var magicSystem = entManager.System(); magicSystem.ChangeMaximumEnergy(target, AdditionalMana); } public override void RemoveSkill(IEntityManager entManager, EntityUid target) { - var magicSystem = entManager.System(); + var magicSystem = entManager.System(); magicSystem.ChangeMaximumEnergy(target, -AdditionalMana); } diff --git a/Content.Shared/_CP14/Skill/Effects/ModifyManacost.cs b/Content.Shared/_CP14/Skill/Effects/ModifyManacost.cs index dc684d1ae0..b4a85b27dc 100644 --- a/Content.Shared/_CP14/Skill/Effects/ModifyManacost.cs +++ b/Content.Shared/_CP14/Skill/Effects/ModifyManacost.cs @@ -12,20 +12,10 @@ public sealed partial class ModifyManacost : CP14SkillEffect [DataField] public FixedPoint2 Global = 0f; - [DataField] - public Dictionary, FixedPoint2> Modifiers = new(); - public override void AddSkill(IEntityManager entManager, EntityUid target) { entManager.EnsureComponent(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(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(); } } diff --git a/Content.Shared/_CP14/Vampire/CP14SharedVampireSysetm.Spell.cs b/Content.Shared/_CP14/Vampire/CP14SharedVampireSysetm.Spell.cs index b94422c207..7855fe5928 100644 --- a/Content.Shared/_CP14/Vampire/CP14SharedVampireSysetm.Spell.cs +++ b/Content.Shared/_CP14/Vampire/CP14SharedVampireSysetm.Spell.cs @@ -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(OnVampireCastAttempt); + SubscribeLocalEvent(OnVampireCastAttempt); SubscribeLocalEvent(OnVampireCastExamine); } - private void OnVampireCastAttempt(Entity ent, ref CP14CastMagicEffectAttemptEvent args) + private void OnVampireCastAttempt(Entity 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(args.Performer)) + if (!HasComp(args.User)) return; - if (!HasComp(args.Performer)) + if (!HasComp(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; } } diff --git a/Content.Shared/_CP14/Workbench/Conditions/MagicInWorkbench.cs b/Content.Shared/_CP14/Workbench/Conditions/MagicInWorkbench.cs index 11fb78b883..2efc2f2a8d 100644 --- a/Content.Shared/_CP14/Workbench/Conditions/MagicInWorkbench.cs +++ b/Content.Shared/_CP14/Workbench/Conditions/MagicInWorkbench.cs @@ -28,7 +28,7 @@ public sealed partial class MagicInWorkbench : CP14WorkbenchCraftCondition EntityUid workbench, EntityUid user) { - var magicSys = entManager.System(); + var magicSys = entManager.System(); magicSys.ChangeEnergy(workbench, -Energy, out _, out _); } @@ -39,7 +39,7 @@ public sealed partial class MagicInWorkbench : CP14WorkbenchCraftCondition EntityUid workbench, EntityUid user) { - var magicSys = entManager.System(); + var magicSys = entManager.System(); magicSys.ChangeEnergy(workbench, -Energy, out _, out _); if (entManager.TryGetComponent(workbench, out var xform)) diff --git a/Resources/Changelog/CP14_Changelog.yml b/Resources/Changelog/CP14_Changelog.yml index d4986fa90c..7383e3d7ac 100644 --- a/Resources/Changelog/CP14_Changelog.yml +++ b/Resources/Changelog/CP14_Changelog.yml @@ -1859,3 +1859,48 @@ id: 8235 time: '2025-08-24T23:03:24.0000000+00:00' url: https://github.com/crystallpunk-14/crystall-punk-14/pull/1705 +- author: TheShuEd + changes: + - message: Players no longer know each other's names at the start of the round. + type: Tweak + - message: "The player can \u201CRemember\u201D the name of any other character\ + \ (by entering any text) via the Verb menu. This \u201CRemembered\u201D name\ + \ will be visible in chat and when viewing the character." + type: Tweak + - message: Notifications about players arriving at and leaving the settlement are + disabled. + type: Remove + - message: Vampire masks no longer require blood essence to craft, but do not change + the wearer's voice. + type: Tweak + id: 8236 + time: '2025-08-27T14:34:11.0000000+00:00' + url: https://github.com/crystallpunk-14/crystall-punk-14/pull/1710 +- author: KittyCat432 + changes: + - message: Added the spineguard a new mob that can be found in underground areas. + type: Add + - message: Added a new monster toxin depletonide which is used in the spineguards + spines it causes you to take increased damage (1.4x). + type: Add + id: 8237 + time: '2025-08-30T07:27:04.0000000+00:00' + url: https://github.com/crystallpunk-14/crystall-punk-14/pull/1659 +- author: Nimfar11 + changes: + - message: Small boxes and barrels are once again being carried across the water. + type: Fix + - message: The T2 skeleton archer now has the ability to fight with a sword, which + he is also armed with. + type: Fix + id: 8238 + time: '2025-09-01T12:07:27.0000000+00:00' + url: https://github.com/crystallpunk-14/crystall-punk-14/pull/1730 +- author: Nimfar11 + changes: + - message: 'Adds three magic traps: electric, fire, and ice. They can only be created + with scrolls or appear in demiplanes.' + type: Add + id: 8239 + time: '2025-09-02T08:52:37.0000000+00:00' + url: https://github.com/crystallpunk-14/crystall-punk-14/pull/1662 diff --git a/Resources/Locale/en-US/_CP14/demiplane/modifiers.ftl b/Resources/Locale/en-US/_CP14/demiplane/modifiers.ftl index 3c55067b1f..99bd62b77f 100644 --- a/Resources/Locale/en-US/_CP14/demiplane/modifiers.ftl +++ b/Resources/Locale/en-US/_CP14/demiplane/modifiers.ftl @@ -16,6 +16,7 @@ cp14-modifier-cackle = cackles cp14-modifier-skeleton = sentient skeletons cp14-modifier-dyno = dynos cp14-modifier-mole = predatory moles +cp14-modifier-spineguard = spineguards cp14-modifier-watcher = watchers cp14-modifier-rabbits = rabbits cp14-modifier-boars = wild boars diff --git a/Resources/Locale/en-US/_CP14/identity/identity_recognition.ftl b/Resources/Locale/en-US/_CP14/identity/identity_recognition.ftl new file mode 100644 index 0000000000..6aea55ce4b --- /dev/null +++ b/Resources/Locale/en-US/_CP14/identity/identity_recognition.ftl @@ -0,0 +1,5 @@ +cp14-remember-name-verb = Remember name + +cp14-remember-name-name = Name + +cp14-remember-name-examine = You remember this character as [color=yellow]{$name}[/color] \ No newline at end of file diff --git a/Resources/Locale/en-US/_CP14/reagents/meta/monster_toxins.ftl b/Resources/Locale/en-US/_CP14/reagents/meta/monster_toxins.ftl index 00b12d2d56..eefb0ca703 100644 --- a/Resources/Locale/en-US/_CP14/reagents/meta/monster_toxins.ftl +++ b/Resources/Locale/en-US/_CP14/reagents/meta/monster_toxins.ftl @@ -3,3 +3,6 @@ cp14-reagent-desc-toxin-spider = A venom which slows down its victim while destr cp14-reagent-name-toxin-bleed = Hemoroxide cp14-reagent-desc-toxin-bleed = A venom which causes intense bleeding. Commonly used by Cackles. + +cp14-reagent-name-toxin-vuln = Depletonide +cp14-reagent-desc-toxin-vuln = A venom which causes the body to be more susceptible to damage and become fatigued. Commonly used by Spineguard's spines. diff --git a/Resources/Locale/en-US/_CP14/tips/tip.ftl b/Resources/Locale/en-US/_CP14/tips/tip.ftl index 75b4c4ec65..b17c71caa0 100644 --- a/Resources/Locale/en-US/_CP14/tips/tip.ftl +++ b/Resources/Locale/en-US/_CP14/tips/tip.ftl @@ -1,17 +1,17 @@ cp14-tips-1 = Keep an eye on the condition of your weapon! You can inspect it to see its condition and sharpness. cp14-tips-2 = If your weapon is dull, you can sharpen it with sharpening stones. cp14-tips-3 = Some light weapons, such as daggers or sickles, are effective for dual wield combat. -cp14-tips-4 = Some magic items can only work after being attuned. To customize the binding, press the RMB and select the desired action. +cp14-tips-4 = Initially, you don't know the names of the other characters! But you can remember any names and nicknames for them via the context menu. cp14-tips-5 = As an alchemist, if you mix some reagents together, you can no longer separate them! Look for the right alchemical reactions that will allow you to edit your solution. cp14-tips-6 = As an alchemist, remember to keep your cauldron off the stove or fire. Your potion may boil over, releasing a reagent cloud. -cp14-tips-7 = You can use shields to parry enemy attacks! Hit the enemy with a shield strike immediately after his attack and you can knock the weapon out of his hands. +cp14-tips-7 = As a vampire, if you try to suck out the essence of blood but there is none at the target, it can mean one of two things: Either you are eating another vampire, or your victim has already been eaten by other vampires. cp14-tips-8 = If you run out of magic energy, you can still use spells and spend mana, but it will damage you and potentially render you unconscious! -cp14-tips-9 = Don't go on the demiplanes alone, kids! The demiplanes are designed to be difficult for a group of 4 people. +cp14-tips-9 = Be careful during thunderstorms! Lightning can strike anyone and anything that is not under cover. It can cause massive fires. cp14-tips-10 = Tall bushes are good for hiding your character! But they slow you down a lot and make a lot of noise if you move in them. cp14-tips-11 = Don't forget to lock your doors if you don't want anyone to get in! -cp14-tips-12 = You can examine the demiplane key to see what you can find in it. The information may be incomplete, but you can still navigate by it, and choose where you want to go. -cp14-tips-13 = As a farmer, don't forget to water your vegetable garden! Plants die without watering. +cp14-tips-12 = You can create your own keys and locks to ensure the privacy of your territory! To do this, use key files and screwdrivers! +cp14-tips-13 = Tip number 13 does not exist. cp14-tips-14 = Demiplanes can be very dangerous, don't neglect medical consumables and alchemist potions. -cp14-tips-15 = When you use the demiplane key, an unstable rift opens up that will draw in up to 4 nearby players after a while. -cp14-tips-16 = When moving between or from the demiplane, you can additionally grab a large item (or the corpse of a dead friend) by pulling it with you during the teleportation time. -cp14-tips-17 = If you wish to leave the round, you may board a traveling ship. When it travels to the empire, you will leave the round and free up your role for another player. \ No newline at end of file +cp14-tips-15 = You can look inside the giant crystal connecting the demiplanes to see the entire current map of demiplane connections! +cp14-tips-16 = The main source of income for adventurers is the extraction of raw resources within pocket dimensions known as demi-planes. +cp14-tips-17 = The magic vision spell allows you to see where and when spells were used! Investigators can use this to search for criminals. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/demiplane/modifiers.ftl b/Resources/Locale/ru-RU/_CP14/demiplane/modifiers.ftl index 0776815b60..ccae642f9a 100644 --- a/Resources/Locale/ru-RU/_CP14/demiplane/modifiers.ftl +++ b/Resources/Locale/ru-RU/_CP14/demiplane/modifiers.ftl @@ -16,6 +16,7 @@ cp14-modifier-cackle = кэклзы cp14-modifier-skeleton = разумные скелеты cp14-modifier-dyno = динозавры cp14-modifier-mole = хищные кроты +cp14-modifier-spineguard = шипостражи cp14-modifier-watcher = наблюдатели cp14-modifier-rabbits = кролики cp14-modifier-boars = дикие кабаны diff --git a/Resources/Locale/ru-RU/_CP14/identity/identity_recognition.ftl b/Resources/Locale/ru-RU/_CP14/identity/identity_recognition.ftl new file mode 100644 index 0000000000..05304de6af --- /dev/null +++ b/Resources/Locale/ru-RU/_CP14/identity/identity_recognition.ftl @@ -0,0 +1,5 @@ +cp14-remember-name-verb = Запомнить имя + +cp14-remember-name-name = Имя + +cp14-remember-name-examine = Вы помните этого персонажа как [color=yellow]{$name}[/color] \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/reagents/meta/monster_toxins.ftl b/Resources/Locale/ru-RU/_CP14/reagents/meta/monster_toxins.ftl index 4eb8e01354..221dcb3b0d 100644 --- a/Resources/Locale/ru-RU/_CP14/reagents/meta/monster_toxins.ftl +++ b/Resources/Locale/ru-RU/_CP14/reagents/meta/monster_toxins.ftl @@ -3,3 +3,6 @@ cp14-reagent-desc-toxin-spider = Яд, который замедляет жер cp14-reagent-name-toxin-bleed = Гемороксид cp14-reagent-desc-toxin-bleed = Яд, вызывающий сильное кровотечение. Обычно используется Кэклзом. + +cp14-reagent-name-toxin-vuln = Деплетонид +cp14-reagent-desc-toxin-vuln = Яд, который делает тело более восприимчивым к повреждениям и утомляет его. Обычно используется шипами Шипостража. diff --git a/Resources/Locale/ru-RU/_CP14/tips/tip.ftl b/Resources/Locale/ru-RU/_CP14/tips/tip.ftl index 5822011e4b..8e9eee1762 100644 --- a/Resources/Locale/ru-RU/_CP14/tips/tip.ftl +++ b/Resources/Locale/ru-RU/_CP14/tips/tip.ftl @@ -1,17 +1,17 @@ cp14-tips-1 = Следите за состоянием вашего оружия! Вы можете осмотреть его, чтобы увидеть его состояние и остроту. cp14-tips-2 = Если ваше оружие затупилось, вы можете заточить его при помощи точильных камней. cp14-tips-3 = Некоторое легкое оружие, такое как кинжалы или серпы, эффективно для боя с двух рук. -cp14-tips-4 = Некоторые магические предметы могут работать только после привязки. Чтобы настроить привязку, нажмите ПКМ и выберите нужное действие. +cp14-tips-4 = Изначально вы не знаете как зовут других персонажей! Но вы можете запомнить любые имена и клички для них через контекстное меню. cp14-tips-5 = Будучи алхимиком, если вы смешали какие-то реагенты вместе, вы больше не сможете их разделить! Ищите нужные алхимические реакции, которые позволят вам редактировать ваш раствор. cp14-tips-6 = Будучи алхимиком, не забывайте убрать ваш котелок с печки или костра. Ваше зелье может выкипеть, выпустив реагентное облако. -cp14-tips-7 = Вы можете использовать щиты, чтобы парировать вражеские атаки! Попадите по противнику ударом щита сразу же после его атаки, и вы сможете выбить оружие из его рук. +cp14-tips-7 = Будучи вампиром, если вы пытаетесь высосать эссенции крови, но ее у цели нет, это может значить одно из двух: Или вы кушаете другого вампира, или вашу жертву уже кушали другие вампиры. cp14-tips-8 = Если у вас кончилась магическая энергия, вы все еще можете использовать заклинания и тратить ману, но это будет наносить вам урон, и потенциально может лишить вас сознания! -cp14-tips-9 = Не ходите, дети, в демипланы в одиночку! Демипланы рассчитаны по сложности на группу из 4 человек. +cp14-tips-9 = Будьте внимательны во время грозы! Молния может ударить в кого угодно и во что угодно, что не находится под крышей. И вызвать массвые пожары. cp14-tips-10 = Высокие кусты неплохо прячут вашего персонажа! Но сильно замедляют передвижение и шумят, если вы двигаетесь в них. cp14-tips-11 = Не забывайте закрывать двери на ключ, если не хотите чтобы туда заходил кто попало! -cp14-tips-12 = Вы можете осмотреть ключ демиплана, чтобы узнать, что вы можете в нем найти. Информация может быть неполной, но по ней вы все равно можете ориентироваться, и выбирать куда вы хотите отправиться. -cp14-tips-13 = Будучи фермером, не забывайте поливать свой огород! Растения умирают без полива. +cp14-tips-12 = Вы можете создавать свои ключи и замки, чтобы обеспечить приватность территории! Для этого пользуйтесь нпильниками для ключей и отвертками! +cp14-tips-13 = Совета номер 13 не существует. cp14-tips-14 = Демипланы могут быть очень опасны, не пренебрегайте медицинскими расходными материалами и алхимическими зельями. -cp14-tips-15 = Когда вы используете ключ демиплана, открывается нестабильный разлом, который через некоторое время затянет в себя до 4 ближайших игроков. -cp14-tips-16 = Перемещаясь между демипланом или из него, вы можете дополнительно захватить с собой большой предмет (или труп погибшего союзника), держа его во время момента телепортации. -cp14-tips-17 = Если вы хотите покинуть раунд, вы можете сесть на странствующий корабль. Когда он отправится в империю, вы покинете раунд и освободите свою роль для другого игрока. \ No newline at end of file +cp14-tips-15 = Вы можете заглянуть внутрь гигантского кристалла связи с демипланами, чтобы увидеть всю текущую карту демипланов! +cp14-tips-16 = Основным заработком авантюристов является добыча сырых ресурсов внутри карманных измерений-демипланов. +cp14-tips-17 = Заклинание магического зрения позволяет видеть где и когда были использованы заклинания! Дознаватели стражи могут использовать это для поиска преступников. \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Alerts/status_effect.yml b/Resources/Prototypes/_CP14/Alerts/status_effect.yml index 82f6d5c521..f3a7d4ac6d 100644 --- a/Resources/Prototypes/_CP14/Alerts/status_effect.yml +++ b/Resources/Prototypes/_CP14/Alerts/status_effect.yml @@ -22,4 +22,10 @@ description: cp14-alerts-confused-aura-desc icons: - sprite: _CP14/Actions/Spells/meta.rsi - state: magic_vision_shuffled \ No newline at end of file + state: magic_vision_shuffled + +- type: alert + id: CP14Vuln + icons: + - sprite: _CP14/Actions/Spells/misc.rsi + state: vulnerability diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/dash.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/dash.yml index 2638739ed3..08f671f1f2 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/dash.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/dash.yml @@ -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: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/kick.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/kick.yml index b478113fcd..c2276047ed 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/kick.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/kick.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/sprint.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/sprint.yml index 77524e3ff1..256f11a0be 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/sprint.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Athletic/sprint.yml @@ -9,7 +9,7 @@ state: sprint - type: CP14MagicEffectCastSlowdown speedMultiplier: 1.3 - - type: CP14MagicEffectStaminaCost + - type: CP14ActionStaminaCost stamina: 1.5 - type: CP14MagicEffect effects: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/darkmist.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/darkmist.yml index fa5c3ca02a..418cc61e27 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/darkmist.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/darkmist.yml @@ -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: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_degrade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_degrade.yml index 82667a6777..0bf8e57ab5 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_degrade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_degrade.yml @@ -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: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_upgrade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_upgrade.yml index bbdfb2ff14..9d4938145a 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_upgrade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/mind_upgrade.yml @@ -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: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml index b1b78d92b1..2df0e8b90b 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/moon_strike.yml @@ -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: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/touch.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/touch.yml index 056653381a..41f15ffbd9 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/touch.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Demigods/Lumera/touch.yml @@ -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: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/portal_to_city.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/portal_to_city.yml index 4d749c54cc..bda43884f7 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/portal_to_city.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/portal_to_city.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml index 039be19585..4d0ab51413 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml index ae36d216dc..3cd32f0e60 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml index fc81a4d30c..ede760848a 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_subterranean_leap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_subterranean_leap.yml index 2ecc21f2d4..195c15cf7f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_subterranean_leap.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/MOB_subterranean_leap.yml @@ -5,7 +5,7 @@ components: - type: CP14MagicEffectCastSlowdown speedMultiplier: -1.0 - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 5 - type: CP14MagicEffect telegraphyEffects: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml index 710be3439c..f6b626c56d 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/electric_trap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/electric_trap.yml new file mode 100644 index 0000000000..3c248b479f --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/electric_trap.yml @@ -0,0 +1,187 @@ +- type: entity + id: CP14ActionSpellElectricTrap + parent: CP14ActionSpellBase + name: Electric trap + description: Creates a electric trap at the selected location. Don't forget to recharge it with mana. + components: + - type: Sprite + sprite: _CP14/Actions/Spells/electromancy.rsi + state: electric_trap + - type: CP14MagicEffectCastSlowdown + speedMultiplier: 0.9 + - type: CP14ActionManaCost + manaCost: 40 + - type: CP14MagicEffect + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectElectricTrap + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14SpawnMagicElectricTrap + - type: CP14ActionSpeaking + startSpeech: "Signum electricum..." + endSpeech: "hunc locum custodi" + - type: CP14MagicEffectCastingVisual + proto: CP14RuneElectricTrap + - type: Action + icon: + sprite: _CP14/Actions/Spells/electromancy.rsi + state: electric_trap + - type: TargetAction + range: 3 + - type: WorldTargetAction + event: !type:CP14DelayedWorldTargetActionEvent + cooldown: 4 + +- type: entity + id: CP14RuneElectricTrap + parent: CP14BaseMagicTrap + categories: [ HideSpawnMenu ] + save: false + components: + - type: PointLight + color: "#e8ff4c" + - type: Sprite + layers: + - state: small_circle + color: "#e8ff4c" + shader: unshaded + - state: rune_fire + color: "#e8ff4c" + shader: unshaded + +- type: entity + id: CP14ImpactEffectElectricTrap + parent: CP14BaseMagicImpact + categories: [ HideSpawnMenu ] + save: false + components: + - type: Sprite + layers: + - state: particles_up + color: "#e8ff4c" + shader: unshaded + +- type: entity + id: CP14SpawnMagicElectricTrap + parent: CP14BaseMagicTrap + name: electric trap + description: A rune of electric drawn on the ground using magic — it's best not to step on it. + categories: [ ForkFiltered ] + components: + - type: Sprite + layers: + - state: small_circle + color: "#e8ff4c" + shader: unshaded + - state: rune_energia + color: "#e8ff4c" + shader: unshaded + - type: Fixtures + fixtures: + trap: + shape: + !type:PhysShapeAabb + bounds: "-0.2,-0.2,0.2,0.2" + hard: false + mask: + - MobMask + layer: + - SlipLayer + - type: CP14MagicEnergyExaminable + - type: CP14MagicEnergyContainer + maxEnergy: 42 + energy: 42 + unsafeSupport: true + - type: CP14MagicEnergyDraw + energy: -0.5 + delay: 5 + - type: CP14MagicUnsafeDamage + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 1 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: TriggerOnCollide + fixtureID: trap + - type: SpawnOnTrigger + proto: CP14ActionSpellElectricTrapEffect + - type: DeleteOnTrigger + +- type: entity + id: CP14ActionSpellElectricTrapEffect + name: electric star + categories: [ HideSpawnMenu ] + save: false + components: + - type: Sprite + sprite: _CP14/Effects/Magic/cast_impact.rsi + drawdepth: Mobs + noRot: true + layers: + - state: stars + color: "#e8ff4c" + shader: unshaded + - type: TimedDespawn + lifetime: 1 + - type: Tag + tags: + - HideContextMenu + - type: CP14AreaEntityEffect + range: 2 + effects: + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + ignoreResistances: false + damage: + types: + Shock: 10 + - !type:MovespeedModifier + walkSpeedModifier: 1.3 + sprintSpeedModifier: 1.3 + statusLifetime: 4 + - !type:Jitter + - !type:CP14StaminaChange + staminaDelta: -100 + - type: EmitSoundOnTrigger + sound: + path: /Audio/Effects/PowerSink/electric.ogg + params: + variation: 0.1 + volume: -2 + - type: TriggerOnSpawn + +- type: entity + parent: CP14BaseSpellScrollElectric + id: CP14SpellScrollElectricTrap + name: electric trap spell scroll + components: + - type: CP14SpellStorage + spells: + - CP14ActionSpellElectricTrap + +- type: entity + parent: CP14SpawnMagicElectricTrap + id: CP14SpawnMagicElectricTrapInvisible + suffix: Invisible. Permanent + components: + - type: Visibility + layer: 16 + - type: CP14MagicEnergyDraw + energy: 0 + delay: 0 + +- type: entity + parent: CP14SpawnMagicElectricTrap + id: CP14SpawnMagicElectricTrapPermanent + suffix: Permanent + components: + - type: CP14MagicEnergyDraw + energy: 0 + delay: 0 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike.yml index 701ecefeb7..4c3e08e102 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike_small.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike_small.yml index 2b02879661..9a7039b321 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike_small.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/lightning_strike_small.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/speed_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/speed_ballade.yml index 587ca5678e..8cb5a69829 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/speed_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Electric/speed_ballade.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fire_trap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fire_trap.yml new file mode 100644 index 0000000000..141989ff27 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fire_trap.yml @@ -0,0 +1,152 @@ +- type: entity + id: CP14ActionSpellFireTrap + parent: CP14ActionSpellBase + name: Fire trap + description: Creates a fire trap at the selected location. Don't forget to recharge it with mana. + components: + - type: Sprite + sprite: _CP14/Actions/Spells/fire.rsi + state: fire_trap + - type: CP14MagicEffectCastSlowdown + speedMultiplier: 0.9 + - type: CP14ActionManaCost + manaCost: 40 + - type: CP14MagicEffect + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectFireTrap + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14SpawnMagicFireTrap + - type: CP14ActionSpeaking + startSpeech: "Signum ignis..." + endSpeech: "hunc locum custodi" + - type: CP14MagicEffectCastingVisual + proto: CP14RuneFireTrap + - type: Action + icon: + sprite: _CP14/Actions/Spells/fire.rsi + state: fire_trap + - type: TargetAction + range: 3 + - type: WorldTargetAction + event: !type:CP14DelayedWorldTargetActionEvent + cooldown: 4 + +- type: entity + id: CP14RuneFireTrap + parent: CP14BaseMagicTrap + categories: [ HideSpawnMenu ] + save: false + components: + - type: PointLight + color: "#eea911" + - type: Sprite + layers: + - state: small_circle + color: "#fdda5d" + shader: unshaded + - state: rune_fire + color: "#eea911" + shader: unshaded + +- type: entity + id: CP14ImpactEffectFireTrap + parent: CP14BaseMagicImpact + categories: [ HideSpawnMenu ] + save: false + components: + - type: Sprite + layers: + - state: particles_up + color: "#eea911" + shader: unshaded + +- type: entity + id: CP14SpawnMagicFireTrap + parent: CP14BaseMagicTrap + name: fire trap + description: A rune of fire drawn on the ground using magic — it's best not to step on it. + categories: [ ForkFiltered ] + components: + - type: Sprite + layers: + - state: small_circle + color: "#fdda5d" + shader: unshaded + - state: rune_fire + color: "#eea911" + shader: unshaded + - type: Fixtures + fixtures: + trap: + shape: + !type:PhysShapeAabb + bounds: "-0.2,-0.2,0.2,0.2" + hard: false + mask: + - MobMask + layer: + - SlipLayer + - type: CP14MagicEnergyExaminable + - type: CP14MagicEnergyContainer + maxEnergy: 42 + energy: 42 + unsafeSupport: true + - type: CP14MagicEnergyDraw + energy: -0.5 + delay: 5 + - type: CP14MagicUnsafeDamage + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 1 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: TriggerOnCollide + fixtureID: trap + - type: IgnitionSource + temperature: 400 + ignited: true + - type: IgniteOnCollide + fireStacks: 3 + - type: ExplodeOnTrigger + - type: Explosive + explosionType: FireBomb + totalIntensity: 10.0 + intensitySlope: 4 + maxIntensity: 3 + - type: DeleteOnTrigger + +- type: entity + parent: CP14BaseSpellScrollFire + id: CP14SpellScrollFireTrap + name: fire trap spell scroll + components: + - type: CP14SpellStorage + spells: + - CP14ActionSpellFireTrap + +- type: entity + parent: CP14SpawnMagicFireTrap + id: CP14SpawnMagicFireTrapInvisible + suffix: Invisible. Permanent + components: + - type: Visibility + layer: 16 + - type: CP14MagicEnergyDraw + energy: 0 + delay: 0 + +- type: entity + parent: CP14SpawnMagicFireTrap + id: CP14SpawnMagicFireTrapPermanent + suffix: Permanent + components: + - type: CP14MagicEnergyDraw + energy: 0 + delay: 0 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fireball.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fireball.yml index 642c0b9f73..2e5cfc69bd 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fireball.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/fireball.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/firewave.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/firewave.yml index 96128e2d41..c3d50c357c 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/firewave.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/firewave.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/flame_creation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/flame_creation.yml index 6270e43193..1fba98177f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/flame_creation.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/flame_creation.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/heat.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/heat.yml index 89c1dec786..f6ac87a9b1 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/heat.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/heat.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/hell_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/hell_ballade.yml index 904e12b3e2..050a983898 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/hell_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/hell_ballade.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/tiefling_inner_fire.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/tiefling_inner_fire.yml index d26ebe290f..d583124c33 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/tiefling_inner_fire.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/tiefling_inner_fire.yml @@ -9,7 +9,6 @@ - type: CP14MagicEffectCastingVisual proto: CP14RuneTieflingRevenge - type: CP14MagicEffect - magicType: Fire effects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/air_saturation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/air_saturation.yml index c4d7710fc0..6c82195acc 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/air_saturation.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/air_saturation.yml @@ -6,10 +6,9 @@ components: - type: CP14MagicEffectCastSlowdown speedMultiplier: 0.4 - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 5 - type: CP14MagicEffect - magicType: Life effects: - !type:CP14SpellSpawnEntityOnTarget spawns: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_heat.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_heat.yml index d43ac3a9b6..61c5d427f5 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_heat.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_heat.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_poison.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_poison.yml index f59ed7e9e4..d87c6459d7 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_poison.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_poison.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_wounds.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_wounds.yml index bb00e27b79..224d974c8f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_wounds.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/cure_wounds.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml index 703d507a58..eb92a65b9a 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/magical_acceleration.yml @@ -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: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/peace_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/peace_ballade.yml index 72ee0f2bb0..36704aa8d3 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/peace_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/peace_ballade.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/plant_growth.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/plant_growth.yml index e46de57eeb..b90b53485a 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/plant_growth.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/plant_growth.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml index 668eb13304..e3fecf1e1f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/sheep_polymorph.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/sheep_polymorph.yml index b5a9e7cef7..afc7abcfda 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/sheep_polymorph.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/sheep_polymorph.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/flash_light.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/flash_light.yml index 56feae5cd6..c584b32c40 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/flash_light.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/flash_light.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/search_of_life.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/search_of_life.yml index 823ce36334..3bffd14fdb 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/search_of_life.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/search_of_life.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/sphere_of_light.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/sphere_of_light.yml index a06d0a7aed..859f6ebcd6 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/sphere_of_light.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Light/sphere_of_light.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Kick.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Kick.yml index 2ec202d7e2..fb1d746399 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Kick.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Lurker/Kick.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_armor.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_armor.yml index ce3d068468..26340e40ee 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_armor.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_armor.yml @@ -6,7 +6,7 @@ components: - type: CP14MagicEffectCastSlowdown speedMultiplier: 0.5 - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 15 - type: CP14MagicEffectCastingVisual proto: CP14RuneManaTrance diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_ballade.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_ballade.yml index 9d1ae031cc..18c6b4206d 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_ballade.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_ballade.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_consume.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_consume.yml index fc3b5a48a6..1d66c2ff33 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_consume.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_consume.yml @@ -18,7 +18,7 @@ - CP14ImpactEffectManaConsume - !type:CP14SpellConsumeManaEffect mana: 10 - - type: CP14MagicEffectSomaticAspect + - type: CP14ActionFreeHandsRequired - type: CP14MagicEffectCastingVisual proto: CP14RuneManaConsume - type: Action diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_gift.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_gift.yml index bbf7177196..387dda27a9 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_gift.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_gift.yml @@ -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: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting.yml index d4a65b89d8..167536727c 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting.yml @@ -6,7 +6,7 @@ components: - type: CP14MagicEffectCastSlowdown speedMultiplier: 0.7 - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 10 - type: CP14MagicEffect effects: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting_small.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting_small.yml index 2123a05dbe..253da1470a 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting_small.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_splitting_small.yml @@ -6,7 +6,7 @@ components: - type: CP14MagicEffectCastSlowdown speedMultiplier: 0.7 - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 10 - type: CP14MagicEffect telegraphyEffects: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Misc/MOB_vuln_spikes.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Misc/MOB_vuln_spikes.yml new file mode 100644 index 0000000000..0161f3626c --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Misc/MOB_vuln_spikes.yml @@ -0,0 +1,108 @@ +- type: entity + id: CP14ActionVulnSpikes + parent: CP14ActionSpellBase + name: Weakness Spikes + description: You throw out several small spikes that cause weakness. + components: + - type: CP14MagicEffectCastSlowdown + speedMultiplier: 0.8 + - type: CP14MagicEffect + effects: + - !type:CP14SpellProjectile + prototype: CP14SpikeVuln + spread: 1.5 + projectileSpeed: 10 + projectileCount: 10 + - type: CP14MagicEffectCastingVisual + proto: CP14RuneVulnSpikes + - type: CP14ActionDangerous + - type: Action + useDelay: 7.5 + icon: + sprite: _CP14/Actions/Spells/misc.rsi + state: vulnerability + color: "#a81e33" + - type: TargetAction + repeat: false + checkCanAccess: false + range: 60 + - type: EntityTargetAction + event: !type:CP14DelayedEntityTargetActionEvent + cooldown: 7.5 + castDelay: 1.0 + breakOnDamage: false + breakOnMove: false + hidden: true + +- type: entity + id: CP14RuneVulnSpikes + parent: CP14BaseMagicRune + categories: [ HideSpawnMenu ] + save: false + components: + - type: PointLight + color: "#7c1fff" + - type: Sprite + layers: + - state: double_outer + color: "#7c1fff" + shader: unshaded + +- type: entity + parent: BaseBullet + id: CP14SpikeVuln + name: weakness quill + description: Organically spiked with a weakening liquid inside. + categories: [ ForkFiltered ] + components: + - type: Sprite + sprite: _CP14/Objects/Weapons/Ranged/Projectiles/spike.rsi + layers: + - state: spike + shader: unshaded + - type: PointLight + color: "#62316b" + radius: 3.0 + energy: 15.0 + - type: EmbeddableProjectile + minimumSpeed: 3 + removalTime: 0.5 + offset: 0.0,0.0 + - type: Projectile + damage: + types: + Piercing: 0.5 + - type: SolutionContainerManager + solutions: + melee: + maxVol: 1 + reagents: + - ReagentId: CP14MonsterToxinVuln + Quantity: 1 + - type: SolutionInjectOnEmbed + transferAmount: 1 + blockSlots: NONE + solution: melee + - type: SolutionTransfer + maxTransferAmount: 1 + - type: TimedDespawn + lifetime: 10 + - type: Ammo + muzzleFlash: null + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 30 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 20 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: GlassBreak + - !type:DoActsBehavior + acts: [ "Destruction" ] diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/bite.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/bite.yml index 897765e72a..7a07a84869 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/bite.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/bite.yml @@ -7,8 +7,8 @@ - type: CP14MagicEffectCastSlowdown speedMultiplier: 0.3 - type: CP14MagicEffectVampire - - type: CP14MagicEffectSSDBlock - - type: CP14MagicEffectTargetMobStatusRequired + - type: CP14ActionSSDBlock + - type: CP14ActionTargetMobStatusRequired allowedStates: - Alive - type: CP14MagicEffect diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/blood_step.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/blood_step.yml index ea91d6f9a6..34d9359560 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/blood_step.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/blood_step.yml @@ -7,7 +7,7 @@ - type: CP14MagicEffectCastSlowdown speedMultiplier: 0.4 - type: CP14MagicEffectVampire - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 30 - type: CP14MagicEffect telegraphyEffects: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/cure_wounds.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/cure_wounds.yml index 5f42e975d3..661329e23b 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/cure_wounds.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/cure_wounds.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/essence_create.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/essence_create.yml index 9fb85243fc..eea8385416 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/essence_create.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/essence_create.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/hypnosys.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/hypnosys.yml index 1afceba23e..96661bbc6b 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/hypnosys.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/hypnosys.yml @@ -7,7 +7,7 @@ - type: CP14MagicEffectCastSlowdown speedMultiplier: 0.5 - type: CP14MagicEffectVampire - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 5 - type: CP14MagicEffect effects: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/portal.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/portal.yml index ea52a34996..62da4932fc 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/portal.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/portal.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_explosion.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_explosion.yml index 47fb07c048..8cc43b3376 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_explosion.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_explosion.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_punch.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_punch.yml index 7e4f21dae3..7c4be3c483 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_punch.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/power_punch.yml @@ -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: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/resurrection.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/resurrection.yml index dde33e64c6..fe44e42203 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/resurrection.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/resurrection.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/search_vampire.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/search_vampire.yml index cd046d0dca..5c4fa14a9e 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/search_vampire.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Vampire/search_vampire.yml @@ -4,7 +4,7 @@ name: Blood connection description: You can sense the location of vampires from your clan from miles away. components: - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 10 - type: CP14MagicEffect effects: diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/beer_creation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/beer_creation.yml index 4f3b8fb4d0..88d6d89bd3 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/beer_creation.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/beer_creation.yml @@ -7,10 +7,9 @@ - type: Sprite sprite: _CP14/Actions/Spells/water.rsi state: beer_creation - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 20 - type: CP14MagicEffect - magicType: Water effects: - !type:CP14SpellSpawnEntityOnTarget spawns: @@ -18,10 +17,10 @@ - !type:CP14SpellSpawnInHandEntity spawns: - CP14LiquidDropBeer - - type: CP14MagicEffectVerbalAspect + - type: CP14ActionSpeaking startSpeech: "beer..." endSpeech: "Arriva la birra" - - type: CP14MagicEffectSomaticAspect + - type: CP14ActionFreeHandsRequired - type: CP14MagicEffectCastingVisual proto: CP14RuneBeerCreation - type: Action diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/freeze.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/freeze.yml index 1f2868e243..8b9b20b14d 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/freeze.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/freeze.yml @@ -9,10 +9,9 @@ state: freeze - type: CP14MagicEffectCastSlowdown speedMultiplier: 0.8 - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 7 - type: CP14MagicEffect - magicType: Water effects: - !type:CP14SpellSpawnEntityOnTarget spawns: @@ -28,11 +27,11 @@ - !type:AdjustTemperature amount: -12000 - !type:ExtinguishReaction - - type: CP14MagicEffectVerbalAspect + - type: CP14ActionSpeaking startSpeech: "Vos adepto frigus..." - type: CP14MagicEffectCastingVisual proto: CP14RunePlantFreeze - - type: CP14MagicEffectPacifiedBlock + - type: CP14ActionDangerous - type: Action icon: sprite: _CP14/Actions/Spells/water.rsi diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_arrow.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_arrow.yml index 5b92e357df..ac2d47509f 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_arrow.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_arrow.yml @@ -7,10 +7,9 @@ - type: Sprite sprite: _CP14/Actions/Spells/water.rsi state: ice_arrow - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 7 - type: CP14MagicEffect - magicType: Water effects: - !type:CP14SpellSpawnEntityOnTarget spawns: @@ -18,10 +17,10 @@ - !type:CP14SpellSpawnInHandEntity spawns: - CP14IceArrow - - type: CP14MagicEffectVerbalAspect + - type: CP14ActionSpeaking startSpeech: "Sagitta glaciei..." endSpeech: "in manu mea" - - type: CP14MagicEffectSomaticAspect + - type: CP14ActionFreeHandsRequired - type: CP14MagicEffectCastingVisual proto: CP14RuneWaterCreation - type: Action diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_dagger.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_dagger.yml index 0d8a8fd280..111f15dc53 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_dagger.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_dagger.yml @@ -7,10 +7,9 @@ - type: Sprite sprite: _CP14/Actions/Spells/water.rsi state: ice_dagger - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 25 - type: CP14MagicEffect - magicType: Water effects: - !type:CP14SpellSpawnEntityOnTarget spawns: @@ -18,10 +17,10 @@ - !type:CP14SpellSpawnInHandEntity spawns: - CP14IceDagger - - type: CP14MagicEffectVerbalAspect + - type: CP14ActionSpeaking startSpeech: "Un pittore sulla..." endSpeech: "soglia della mano" - - type: CP14MagicEffectSomaticAspect + - type: CP14ActionFreeHandsRequired - type: CP14MagicEffectCastingVisual proto: CP14RuneWaterCreation - type: Action diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_shards.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_shards.yml index 135dcdb394..c6285335b5 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_shards.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_shards.yml @@ -9,21 +9,20 @@ state: ice_shards - type: CP14MagicEffectCastSlowdown speedMultiplier: 0.75 - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 5 - type: CP14MagicEffect - magicType: Water effects: - !type:CP14SpellProjectile prototype: CP14IceShard - !type:CP14SpellSpawnEntityOnUser spawns: - CP14ImpactEffectWaterCreation - - type: CP14MagicEffectVerbalAspect + - type: CP14ActionSpeaking endSpeech: "Glacies acus!" - type: CP14MagicEffectCastingVisual proto: CP14RuneIceShards - - type: CP14MagicEffectPacifiedBlock + - type: CP14ActionDangerous - type: Action icon: sprite: _CP14/Actions/Spells/water.rsi diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_trap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_trap.yml new file mode 100644 index 0000000000..1057f97ee1 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/ice_trap.yml @@ -0,0 +1,193 @@ +- type: entity + id: CP14ActionSpellIceTrap + parent: CP14ActionSpellBase + name: Ice trap + description: Creates a ice trap at the selected location. Don't forget to recharge it with mana. + components: + - type: Sprite + sprite: _CP14/Actions/Spells/water.rsi + state: ice_trap + - type: CP14MagicEffectCastSlowdown + speedMultiplier: 0.9 + - type: CP14ActionManaCost + manaCost: 40 + - type: CP14MagicEffect + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectIceTrap + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14SpawnMagicIceTrap + - type: CP14ActionSpeaking + startSpeech: "Signum glaciei..." + endSpeech: "hunc locum custodi" + - type: CP14MagicEffectCastingVisual + proto: CP14RuneIceTrap + - type: Action + icon: + sprite: _CP14/Actions/Spells/water.rsi + state: ice_trap + - type: TargetAction + range: 3 + - type: WorldTargetAction + event: !type:CP14DelayedWorldTargetActionEvent + cooldown: 4 + +- type: entity + id: CP14RuneIceTrap + parent: CP14BaseMagicTrap + categories: [ HideSpawnMenu ] + save: false + components: + - type: PointLight + color: "#eea911" + - type: Sprite + layers: + - state: small_circle + color: "#5eabeb" + shader: unshaded + - state: rune_ice + color: "#5eabeb" + shader: unshaded + +- type: entity + id: CP14ImpactEffectIceTrap + parent: CP14BaseMagicImpact + categories: [ HideSpawnMenu ] + save: false + components: + - type: Sprite + layers: + - state: particles_up + color: "#5eabeb" + shader: unshaded + +- type: entity + id: CP14SpawnMagicIceTrap + parent: CP14BaseMagicTrap + name: ice trap + description: A rune of ice drawn on the ground using magic — it's best not to step on it. + categories: [ ForkFiltered ] + components: + - type: Sprite + layers: + - state: small_circle + color: "#5eabeb" + shader: unshaded + - state: rune_ice + color: "#5eabeb" + shader: unshaded + - type: Fixtures + fixtures: + trap: + shape: + !type:PhysShapeAabb + bounds: "-0.2,-0.2,0.2,0.2" + hard: false + mask: + - MobMask + layer: + - SlipLayer + - type: CP14MagicEnergyExaminable + - type: CP14MagicEnergyContainer + maxEnergy: 42 + energy: 42 + unsafeSupport: true + - type: CP14MagicEnergyDraw + energy: -0.5 + delay: 5 + - type: CP14MagicUnsafeDamage + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 1 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: TriggerOnCollide + fixtureID: trap + - type: DeleteOnTrigger + - type: EmitSoundOnTrigger + sound: + collection: ToySqueak + - type: SpawnOnTrigger + proto: CP14ActionSpellIceTrapEffect + +- type: entity + id: CP14ActionSpellIceTrapEffect + name: ice circle + categories: [ HideSpawnMenu ] + save: false + components: + - type: Sprite + sprite: _CP14/Effects/Magic/cast_impact.rsi + drawdepth: Mobs + noRot: true + layers: + - state: circle_decrease + color: "#5eabeb" + shader: unshaded + - type: TimedDespawn + lifetime: 1 + - type: Tag + tags: + - HideContextMenu + - type: CP14AreaEntityEffect + range: 1 + effects: + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + ignoreResistances: false + damage: + types: + Cold: 10 + - !type:MovespeedModifier + walkSpeedModifier: 0.0 + sprintSpeedModifier: 0.0 + statusLifetime: 3 + - !type:AdjustTemperature + amount: -50000 + - !type:ExtinguishReaction + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14WindowMagicIceBlock + - type: EmitSoundOnTrigger + sound: + path: /Audio/Effects/balloon-pop.ogg + params: + variation: 0.1 + volume: -2 + - type: TriggerOnSpawn + +- type: entity + parent: CP14BaseSpellScrollWater + id: CP14SpellScrollIceTrap + name: ice trap spell scroll + components: + - type: CP14SpellStorage + spells: + - CP14ActionSpellIceTrap + +- type: entity + parent: CP14SpawnMagicIceTrap + id: CP14SpawnMagicIceTrapInvisible + suffix: Invisible. Permanent + components: + - type: Visibility + layer: 16 + - type: CP14MagicEnergyDraw + energy: 0 + delay: 0 + +- type: entity + parent: CP14SpawnMagicIceTrap + id: CP14SpawnMagicIceTrapPermanent + suffix: Permanent + components: + - type: CP14MagicEnergyDraw + energy: 0 + delay: 0 diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/water_creation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/water_creation.yml index 907fd21170..b2025b30f4 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/water_creation.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/water_creation.yml @@ -7,10 +7,9 @@ - type: Sprite sprite: _CP14/Actions/Spells/water.rsi state: water_creation - - type: CP14MagicEffectManaCost + - type: CP14ActionManaCost manaCost: 10 - type: CP14MagicEffect - magicType: Water effects: - !type:CP14SpellSpawnEntityOnTarget spawns: @@ -18,7 +17,7 @@ - !type:CP14SpellSpawnInHandEntity spawns: - CP14LiquidDropWater - - type: CP14MagicEffectSomaticAspect + - type: CP14ActionFreeHandsRequired - type: CP14MagicEffectCastingVisual proto: CP14RuneWaterCreation - type: Action diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/base.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/base.yml index 871eff01e8..d114e68d27 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/base.yml @@ -44,3 +44,20 @@ sprite: _CP14/Effects/Magic/cast_impact.rsi noRot: true +- type: entity + id: CP14BaseMagicTrap + name: magic trap + description: Manifestation of magical energy in the physical plane + abstract: true + components: + - type: Transform + anchored: false + - type: InteractionOutline + - type: Damageable + damageContainer: CP14Spectral + - type: Physics + bodyType: Static + - type: Sprite + noRot: true + drawDepth: FloorTiles + sprite: _CP14/Effects/Magic/magic_trap.rsi diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/scrolls.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/scrolls.yml index ee61ac2110..686fb602f8 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/scrolls.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/scrolls.yml @@ -150,3 +150,14 @@ shader: unshaded color: "#1c94d9" +- type: entity + abstract: true + id: CP14BaseSpellScrollElectric + parent: CP14BaseSpellScroll + components: + - type: Sprite + layers: + - state: paper_filled + - state: magic + shader: unshaded + color: "#e8ff4c" diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Masks/vampire_mask.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Masks/vampire_mask.yml index 085cf76239..1164b5598d 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Masks/vampire_mask.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Masks/vampire_mask.yml @@ -4,24 +4,16 @@ - CP14ClothingMaskBase - CP14BaseMajorContraband id: CP14ClothingMaskVampireVoiceBase - description: This mask reeks of blood. The spells inside it distort the speaker's voice. + description: This mask reeks of blood. Effectively conceals the identity of the wearer. suffix: Voice mask components: - type: HideLayerClothing slots: - Snout - type: IdentityBlocker - - type: VoiceMask - - type: UserInterface - interfaces: - enum.ChameleonUiKey.Key: - type: ChameleonBoundUserInterface - enum.VoiceMaskUIKey.Key: - type: VoiceMaskBoundUserInterface - type: PhysicalComposition materialComposition: CP14Leather: 10 - CP14BloodEssence: 1 - type: entity parent: CP14ClothingMaskVampireVoiceBase diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml index 880fc9104c..a78671bb54 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml @@ -48,6 +48,8 @@ - id: CP14BaseLockpick - id: CP14EnergyCrystalMediumEmpty - id: CP14ClothingCloakAmuletGold + - id: CP14SpellScrollElectricTrap + - id: CP14SpellScrollIceTrap # Rare standard village crates loot - !type:NestedSelector tableId: CP14StationCrateLoot @@ -84,6 +86,7 @@ weight: 2 #Temp (small amount T2 loot) - !type:GroupSelector children: + - id: CP14SpellScrollFireTrap - id: CP14SpellScrollShadowStep - id: CP14SpellScrollFireball - id: CP14SpellScrollBeerCreation diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/demiplane_rifts.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/demiplane_rifts.yml index 211a5488f7..902224dbb2 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/demiplane_rifts.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/demiplane_rifts.yml @@ -98,6 +98,20 @@ children: - id: CP14MobMonsterMosquito +- type: entity + parent: CP14BaseMobGroupSpawner + id: CP14MobGroupSpawnerSpineguard + suffix: 1-2 spineguards + components: + - type: EntityTableSpawner + deleteSpawnerAfterSpawn: false + offset: 1 + table: !type:GroupSelector + rolls: !type:RangeNumberSelector + range: 1, 2 + children: + - id: CP14MobMonsterSpineguard + - type: entity parent: CP14BaseMobGroupSpawner id: CP14MobGroupSpawnerRabbits diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml index b49d3c2320..6ca41be7d4 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml @@ -157,6 +157,22 @@ prototypes: - CP14MobMonsterMole +- type: entity + name: spineguard spawner + id: CP14SpawnMobMonsterSpineguard + parent: MarkerBase + categories: [ ForkFiltered ] + components: + - type: Sprite + layers: + - sprite: Markers/cross.rsi + state: green + - sprite: _CP14/Mobs/Monster/spineguard.rsi + state: live + - type: ConditionalSpawner + prototypes: + - CP14MobMonsterSpineguard + - type: entity name: bloodworm mosquitoes spawner id: CP14SpawnMobMonsterMosquito diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/spineguard.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/spineguard.yml new file mode 100644 index 0000000000..49efa3950b --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/spineguard.yml @@ -0,0 +1,117 @@ +- type: entity + id: CP14MobMonsterSpineguard + parent: CP14SimpleMobBase + name: spineguard + description: Makes its prey weaker letting other monsters do the kill. + categories: [ ForkFiltered ] + components: + - type: HTN + rootTask: + task: CP14MonsterCompound + blackboard: + NavSmash: !type:Bool + true + VisionRadius: !type:Single + 16 + AggroVisionRadius: !type:Single + 12 + - type: NpcFactionMember + factions: + - CP14Monster + - type: NPCUseActionOnTarget + actionId: CP14ActionVulnSpikes + - type: Sprite + drawdepth: Mobs + layers: + - map: ["enum.DamageStateVisualLayers.Base"] + sprite: _CP14/Mobs/Monster/spineguard.rsi + state: live + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeCircle + radius: 0.35 + density: 350 + mask: + - MobMask + layer: + - MobLayer + - type: ReplacementAccent + accent: xeno + - type: Appearance + - type: Body + prototype: Animal + - type: MobThresholds + thresholds: + 0: Alive + 100: Dead + - type: SlowOnDamage + speedModifierThresholds: + 50: 0.8 + 75: 0.5 + - type: PassiveDamage # Slight passive regen. Assuming one damage type, comes out to about 6 damage a minute from base.yml. + allowedStates: + - Alive + damageCap: 100 + damage: + types: + Poison: -0.1 + groups: + Brute: -0.1 + Burn: -0.1 + - type: Stamina + critThreshold: 200 + - type: CombatMode + - type: MeleeWeapon + angle: 0 + animation: WeaponArcBite + damage: + types: + Slash: 1 + Piercing: 3 + Structural: 3 + - type: MovementSpeedModifier + baseWalkSpeed: 2.5 + baseSprintSpeed: 2.5 + - type: DamageStateVisuals + states: + Alive: + Base: live + Dead: + Base: dead + - type: Butcherable + spawned: + - id: CP14FoodMeatMonster + amount: 3 + - id: CP14FoodMeatPig + amount: 1 + prob: 0.3 + - id: CP14FoodMeatMonsterLeg + amount: 1 + prob: 0.6 + - id: CP14RuggedLeather1 + amount: 1 + prob: 0.75 + - id: CP14Leather1 + amount: 1 + maxAmount: 3 + - id: CP14ScrapLeather + amount: 1 + maxAmount: 2 + prob: 0.5 + - id: CP14CheapFur + amount: 1 + prob: 0.25 + - type: Bloodstream + bloodMaxVolume: 200 + bloodReagent: CP14BloodMonster + - type: Grammar + attributes: + gender: epicene + - type: CP14MagicCasterSlowdown + - type: CP14MagicEnergyContainer + - type: Tag + tags: + - FootstepSound + - CP14Mosquito diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/Skeletons/T2.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/Skeletons/T2.yml index b57a08413f..3c333f2197 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/Skeletons/T2.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/Skeletons/T2.yml @@ -91,6 +91,7 @@ max: 1 freeLearnedSkills: - HydrosophistryT1 + - SwordMastery learnedSkills: - CP14ActionSpellIceArrow diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml index 49d11c6e0d..608cfc8041 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml @@ -195,6 +195,8 @@ type: HumanoidMarkingModifierBoundUserInterface enum.StrippingUiKey.Key: type: StrippableBoundUserInterface + enum.CP14RememberNameUiKey.Key: + type: CP14IdentityRecognitionBoundUserInterface - type: Puller - type: Speech speechSounds: Alto @@ -236,6 +238,7 @@ - MartialArts - Craftsmanship - type: CP14VampireEssenceHolder + - type: CP14UnknownIdentity - type: entity parent: diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml index d1dd0c4b0a..dbe8bca84a 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml @@ -116,6 +116,7 @@ components: - type: CP14SpellStorage spells: + - CP14ActionSpellElectricTrap - CP14ActionSpellLightningStrike - CP14ActionSpellLightningStrikeSmall - CP14ActionSpellLightningStrikeSmall diff --git a/Resources/Prototypes/_CP14/Entities/StatusEffects/misc.yml b/Resources/Prototypes/_CP14/Entities/StatusEffects/misc.yml index a4ab91798a..bf06c44edf 100644 --- a/Resources/Prototypes/_CP14/Entities/StatusEffects/misc.yml +++ b/Resources/Prototypes/_CP14/Entities/StatusEffects/misc.yml @@ -12,11 +12,11 @@ layers: - state: sphere shader: unshaded - color: "#5096d488" + color: "#5096d4" - state: circle_increase sprite: _CP14/Effects/Magic/cast_impact.rsi shader: unshaded - color: "#74eaf222" + color: "#74eaf2" - type: PointLight radius: 2.5 energy: 0.9 @@ -66,4 +66,26 @@ - type: StatusEffect - type: StatusEffectAlert alert: CP14ConfusedAura - - type: CP14HideMagicAuraStatusEffect \ No newline at end of file + - type: CP14HideMagicAuraStatusEffect + +- type: entity + id: CP14StatusEffectVuln + name: vulnerability + components: + - type: StatusEffect + - type: StatusEffectAlert + alert: CP14Vuln + - type: Sprite + drawdepth: Mobs + sprite: _CP14/Effects/Magic/cast_impact.rsi + noRot: true + layers: + - state: particles_down + shader: unshaded + color: "#a81e33" + - type: PointLight + radius: 2.5 + energy: 0.9 + color: "#a81e33" + - type: CP14DamageModifierStatusEffect + globalDefence: 1.4 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Furniture/barrel.yml b/Resources/Prototypes/_CP14/Entities/Structures/Furniture/barrel.yml index af40d910cb..5854f9c74b 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Furniture/barrel.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Furniture/barrel.yml @@ -67,7 +67,7 @@ mask: - MachineMask layer: - - WallLayer + - MachineLayer - type: Damageable damageContainer: Inorganic damageModifierSet: CP14Wood diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Storage/Crates/crates.yml b/Resources/Prototypes/_CP14/Entities/Structures/Storage/Crates/crates.yml index 9c34d97e69..1989e7a78b 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Storage/Crates/crates.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Storage/Crates/crates.yml @@ -60,7 +60,7 @@ mask: - MachineMask layer: - - WallLayer + - MachineLayer - type: Storage grid: - 0,0,5,5 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Windows/marblebrick.yml b/Resources/Prototypes/_CP14/Entities/Structures/Windows/marblebrick.yml index 53f0193978..0d4c261dd5 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Windows/marblebrick.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Windows/marblebrick.yml @@ -79,4 +79,3 @@ - type: Construction graph: CP14WindowMarbleBrick node: CP14WindowMarbleBrickBroken - diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Windows/misc.yml b/Resources/Prototypes/_CP14/Entities/Structures/Windows/misc.yml index 02652d0dfe..3fa691c0a7 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Windows/misc.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Windows/misc.yml @@ -32,3 +32,78 @@ params: variation: 0.03 +- type: entity + id: CP14WindowMagicIceBlock + name: magic ice block + description: Ice created by magic with a distinct purple hue. + categories: [ ForkFiltered ] + placement: + mode: SnapgridCenter + snap: + - Window + components: + - type: Sprite + drawdepth: Mobs + sprite: _CP14/Structures/Windows/ice_block.rsi + color: "#5eabeb" + - type: Icon + sprite: _CP14/Structures/Windows/ice_block.rsi + state: full + - type: IconSmooth + key: CP14window + base: window + - type: PlacementReplacement + key: walls + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Glass + - type: TriggerOnCollide + fixtureID: fix1 + - type: Appearance + - type: Transform + anchored: true + - type: Clickable + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + hard: false + shape: + !type:PhysShapeAabb + bounds: "-0.5,-0.5,0.5,0.5" + density: 1000 + mask: + - TableMask + layer: + - TableLayer + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 15 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: WindowShatter + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: MeleeSound + soundGroups: + Brute: + collection: GlassSmash + - type: SpeedModifierContacts + walkSpeedModifier: 0.1 + sprintSpeedModifier: 0.1 + - type: DamageOnAttacked + damage: + types: + Cold: 2 + - type: DamageOnInteract + damage: + types: + Cold: 2 + - type: DamageContacts + damage: + types: + Cold: 1 diff --git a/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml index 341d7f1bd6..e38f7295dc 100644 --- a/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml +++ b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml @@ -127,6 +127,23 @@ minGroupSize: 1 maxGroupSize: 3 +- type: cp14LocationModifier + id: EnemySpineguard + levels: + min: 3 + max: 7 + name: cp14-modifier-spineguard + categories: + Danger: 0.5 + requiredTags: + - CP14DemiplaneUnderground + layers: + - !type:CP14OreDunGen + entity: CP14MobMonsterSpineguard + count: 5 + minGroupSize: 1 + maxGroupSize: 2 + - type: cp14LocationModifier id: EnemyIceSpectre levels: diff --git a/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/trap.yml b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/trap.yml new file mode 100644 index 0000000000..0920493c14 --- /dev/null +++ b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/trap.yml @@ -0,0 +1,87 @@ +- type: cp14LocationModifier + id: IceTrapInvisible + levels: + min: 3 + max: 10 + categories: + Danger: 0.1 + blacklistTags: + - CP14DemiplaneHot + layers: + - !type:CP14OreDunGen + entity: CP14SpawnMagicIceTrapInvisible + count: 5 + minGroupSize: 1 + maxGroupSize: 1 + +- type: cp14LocationModifier + id: IceTrapPermanent + levels: + min: 3 + max: 10 + categories: + Danger: 0.1 + blacklistTags: + - CP14DemiplaneHot + layers: + - !type:CP14OreDunGen + entity: CP14SpawnMagicIceTrapPermanent + count: 10 + minGroupSize: 1 + maxGroupSize: 1 + +- type: cp14LocationModifier + id: FireTrapInvisible + levels: + min: 3 + max: 10 + categories: + Danger: 0.1 + layers: + - !type:CP14OreDunGen + entity: CP14SpawnMagicFireTrapInvisible + count: 5 + minGroupSize: 1 + maxGroupSize: 1 + +- type: cp14LocationModifier + id: FireTrapPermanent + levels: + min: 3 + max: 10 + categories: + Danger: 0.1 + layers: + - !type:CP14OreDunGen + entity: CP14SpawnMagicFireTrapPermanent + count: 10 + minGroupSize: 1 + maxGroupSize: 1 + +- type: cp14LocationModifier + id: ElectricTrapInvisible + levels: + min: 2 + max: 10 + categories: + Danger: 0.1 + layers: + - !type:CP14OreDunGen + entity: CP14SpawnMagicElectricTrapInvisible + count: 5 + minGroupSize: 1 + maxGroupSize: 1 + +- type: cp14LocationModifier + id: ElectricTrapPermanent + levels: + min: 2 + max: 10 + categories: + Danger: 0.1 + layers: + - !type:CP14OreDunGen + entity: CP14SpawnMagicElectricTrapPermanent + count: 10 + minGroupSize: 1 + maxGroupSize: 1 diff --git a/Resources/Prototypes/_CP14/Reagents/monster_toxins.yml b/Resources/Prototypes/_CP14/Reagents/monster_toxins.yml index 4c69891812..3583c04e83 100644 --- a/Resources/Prototypes/_CP14/Reagents/monster_toxins.yml +++ b/Resources/Prototypes/_CP14/Reagents/monster_toxins.yml @@ -50,3 +50,27 @@ types: Piercing: 1.5 pricePerUnit: 4.0 #arbitrary for now + +- type: reagent + id: CP14MonsterToxinVuln + name: cp14-reagent-name-toxin-vuln + desc: cp14-reagent-desc-toxin-vuln + group: CP14MonsterToxins + flavor: CP14Vomit + color: "#b545ff" + physicalDesc: reagent-physical-desc-nondescript + metabolisms: + Poison: + metabolismRate: 0.5 + effects: + - !type:ModifyStatusEffect + conditions: + - !type:ReagentThreshold + reagent: CP14MonsterToxinVuln + min: 2 + effectProto: CP14StatusEffectVuln + time: 5 + refresh: false + - !type:CP14StaminaChange + staminaDelta: -5 + pricePerUnit: 4.0 #arbitrary for now diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/devourers.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/devourers.yml index cd89d20844..47347e877a 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/devourers.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/devourers.yml @@ -9,9 +9,6 @@ - !type:StackResource stack: CP14ThinLeather count: 2 - - !type:StackResource - stack: CP14BloodEssence - count: 1 result: CP14ClothingMaskVampireVoiceDevourers resultCount: 1 diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/night_children.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/night_children.yml index a6601158e2..cb9e9c6165 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/night_children.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/night_children.yml @@ -9,9 +9,6 @@ - !type:StackResource stack: CP14ThinLeather count: 2 - - !type:StackResource - stack: CP14BloodEssence - count: 1 result: CP14ClothingMaskVampireVoiceNightChildrens resultCount: 1 diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/unnameable.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/unnameable.yml index 847582f168..9ec1f19145 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/unnameable.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/unnameable.yml @@ -9,9 +9,6 @@ - !type:StackResource stack: CP14ThinLeather count: 2 - - !type:StackResource - stack: CP14BloodEssence - count: 1 result: CP14ClothingMaskVampireVoiceUnnameable resultCount: 1 diff --git a/Resources/Prototypes/_CP14/Skill/Basic/electromancy.yml b/Resources/Prototypes/_CP14/Skill/Basic/electromancy.yml index ef3830d766..05a5a6432b 100644 --- a/Resources/Prototypes/_CP14/Skill/Basic/electromancy.yml +++ b/Resources/Prototypes/_CP14/Skill/Basic/electromancy.yml @@ -49,10 +49,6 @@ icon: sprite: _CP14/Actions/skill_tree.rsi state: electro2 - effects: - - !type:ModifyManacost - modifiers: - Energia: -0.25 restrictions: - !type:NeedPrerequisite prerequisite: ElectromancyT1 @@ -74,20 +70,16 @@ # T3 -- type: cp14Skill - id: ElectromancyT3 - skillUiPosition: 13, 0 - tree: Electromancy - name: cp14-skill-electric-t3-name - learnCost: 0.5 - icon: - sprite: _CP14/Actions/skill_tree.rsi - state: electro3 - effects: - - !type:ModifyManacost - modifiers: - Energia: -0.25 - restrictions: - - !type:NeedPrerequisite - prerequisite: ElectromancyT2 +#- type: cp14Skill +# id: ElectromancyT3 +# skillUiPosition: 13, 0 +# tree: Electromancy +# name: cp14-skill-electric-t3-name +# learnCost: 0.5 +# icon: +# sprite: _CP14/Actions/skill_tree.rsi +# state: electro3 +# restrictions: +# - !type:NeedPrerequisite +# prerequisite: ElectromancyT2 diff --git a/Resources/Prototypes/_CP14/Skill/Basic/healing.yml b/Resources/Prototypes/_CP14/Skill/Basic/healing.yml index 1433d7b28e..97cf53fd18 100644 --- a/Resources/Prototypes/_CP14/Skill/Basic/healing.yml +++ b/Resources/Prototypes/_CP14/Skill/Basic/healing.yml @@ -79,10 +79,6 @@ icon: sprite: _CP14/Actions/skill_tree.rsi state: heal2 - effects: - - !type:ModifyManacost - modifiers: - Life: -0.25 restrictions: - !type:NeedPrerequisite prerequisite: HealingT1 @@ -121,22 +117,18 @@ # T3 -- type: cp14Skill - id: HealingT3 - skillUiPosition: 13, 0 - tree: Healing - name: cp14-skill-life-t3-name - learnCost: 0.5 - icon: - sprite: _CP14/Actions/skill_tree.rsi - state: heal3 - effects: - - !type:ModifyManacost - modifiers: - Life: -0.25 - restrictions: - - !type:NeedPrerequisite - prerequisite: HealingT2 +#- type: cp14Skill +# id: HealingT3 +# skillUiPosition: 13, 0 +# tree: Healing +# name: cp14-skill-life-t3-name +# learnCost: 0.5 +# icon: +# sprite: _CP14/Actions/skill_tree.rsi +# state: heal3 +# restrictions: +# - !type:NeedPrerequisite +# prerequisite: HealingT2 #- type: cp14Skill # id: CP14ActionSpellResurrection diff --git a/Resources/Prototypes/_CP14/Skill/Basic/hydrosophistry.yml b/Resources/Prototypes/_CP14/Skill/Basic/hydrosophistry.yml index 19764f7c9e..142cc92304 100644 --- a/Resources/Prototypes/_CP14/Skill/Basic/hydrosophistry.yml +++ b/Resources/Prototypes/_CP14/Skill/Basic/hydrosophistry.yml @@ -80,10 +80,6 @@ icon: sprite: _CP14/Actions/skill_tree.rsi state: water2 - effects: - - !type:ModifyManacost - modifiers: - Water: -0.25 restrictions: - !type:NeedPrerequisite prerequisite: HydrosophistryT1 @@ -118,20 +114,16 @@ # T3 -- type: cp14Skill - id: HydrosophistryT3 - skillUiPosition: 13, 0 - tree: Hydrosophistry - name: cp14-skill-water-t3-name - learnCost: 0.5 - icon: - sprite: _CP14/Actions/skill_tree.rsi - state: water3 - effects: - - !type:ModifyManacost - modifiers: - Water: -0.25 - restrictions: - - !type:NeedPrerequisite - prerequisite: HydrosophistryT2 +#- type: cp14Skill +# id: HydrosophistryT3 +# skillUiPosition: 13, 0 +# tree: Hydrosophistry +# name: cp14-skill-water-t3-name +# learnCost: 0.5 +# icon: +# sprite: _CP14/Actions/skill_tree.rsi +# state: water3 +# restrictions: +# - !type:NeedPrerequisite +# prerequisite: HydrosophistryT2 diff --git a/Resources/Prototypes/_CP14/Skill/Basic/illusion.yml b/Resources/Prototypes/_CP14/Skill/Basic/illusion.yml index 73afc2ab3a..04222940be 100644 --- a/Resources/Prototypes/_CP14/Skill/Basic/illusion.yml +++ b/Resources/Prototypes/_CP14/Skill/Basic/illusion.yml @@ -50,10 +50,6 @@ icon: sprite: _CP14/Actions/skill_tree.rsi state: light2 - effects: - - !type:ModifyManacost - modifiers: - Light: -0.25 restrictions: - !type:NeedPrerequisite prerequisite: IllusionT1 @@ -88,20 +84,16 @@ # T3 -- type: cp14Skill - id: IllusionT3 - skillUiPosition: 13, 0 - tree: Illusion - name: cp14-skill-illusion-t3-name - learnCost: 0.5 - icon: - sprite: _CP14/Actions/skill_tree.rsi - state: light3 - effects: - - !type:ModifyManacost - modifiers: - Light: -0.25 - restrictions: - - !type:NeedPrerequisite - prerequisite: IllusionT2 +#- type: cp14Skill +# id: IllusionT3 +# skillUiPosition: 13, 0 +# tree: Illusion +# name: cp14-skill-illusion-t3-name +# learnCost: 0.5 +# icon: +# sprite: _CP14/Actions/skill_tree.rsi +# state: light3 +# restrictions: +# - !type:NeedPrerequisite +# prerequisite: IllusionT2 diff --git a/Resources/Prototypes/_CP14/Skill/Basic/pyrokinetic.yml b/Resources/Prototypes/_CP14/Skill/Basic/pyrokinetic.yml index 5f811e8597..dd43db1ca4 100644 --- a/Resources/Prototypes/_CP14/Skill/Basic/pyrokinetic.yml +++ b/Resources/Prototypes/_CP14/Skill/Basic/pyrokinetic.yml @@ -83,10 +83,6 @@ icon: sprite: _CP14/Actions/skill_tree.rsi state: pyro2 - effects: - - !type:ModifyManacost - modifiers: - Fire: -0.25 restrictions: - !type:NeedPrerequisite prerequisite: PyrokineticT1 @@ -123,20 +119,16 @@ # T3 -- type: cp14Skill - id: PyrokineticT3 - skillUiPosition: 13, 0 - tree: Pyrokinetic - name: cp14-skill-pyro-t3-name - learnCost: 0.5 - icon: - sprite: _CP14/Actions/skill_tree.rsi - state: pyro3 - effects: - - !type:ModifyManacost - modifiers: - Fire: -0.25 - restrictions: - - !type:NeedPrerequisite - prerequisite: PyrokineticT2 +#- type: cp14Skill +# id: PyrokineticT3 +# skillUiPosition: 13, 0 +# tree: Pyrokinetic +# name: cp14-skill-pyro-t3-name +# learnCost: 0.5 +# icon: +# sprite: _CP14/Actions/skill_tree.rsi +# state: pyro3 +# restrictions: +# - !type:NeedPrerequisite +# prerequisite: PyrokineticT2 diff --git a/Resources/Prototypes/_CP14/secret_weights.yml b/Resources/Prototypes/_CP14/secret_weights.yml index da43c6a6c5..74b1725535 100644 --- a/Resources/Prototypes/_CP14/secret_weights.yml +++ b/Resources/Prototypes/_CP14/secret_weights.yml @@ -1,6 +1,6 @@ - type: weightedRandom id: Secret weights: - CP14Peaceful: 1 - CP14GameRuleVampireClanBattleTriple: 1 - CP14GameRuleVampireClanBattleDouble: 1 \ No newline at end of file + CP14Peaceful: 0.2 + CP14VampireClansBattleDouble: 0.4 + CP14VampireClansBattleTriple: 0.4 diff --git a/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/electric_trap.png b/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/electric_trap.png new file mode 100644 index 0000000000..4c55f9b398 Binary files /dev/null and b/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/electric_trap.png differ diff --git a/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/meta.json b/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/meta.json index a5ee9b4feb..a172274a2a 100644 --- a/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/meta.json +++ b/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "All right reserved", - "copyright": "Created by TheShuEd", + "copyright": "Created by TheShuEd, electric_trap by nimfar11", "states": [ { "name": "lightning_strike" @@ -15,6 +15,9 @@ }, { "name": "speed_music" + }, + { + "name": "electric_trap" } ] } diff --git a/Resources/Textures/_CP14/Actions/Spells/fire.rsi/fire_trap.png b/Resources/Textures/_CP14/Actions/Spells/fire.rsi/fire_trap.png new file mode 100644 index 0000000000..723cbd4278 Binary files /dev/null and b/Resources/Textures/_CP14/Actions/Spells/fire.rsi/fire_trap.png differ diff --git a/Resources/Textures/_CP14/Actions/Spells/fire.rsi/meta.json b/Resources/Textures/_CP14/Actions/Spells/fire.rsi/meta.json index 8dee19ade6..0943f47ae6 100644 --- a/Resources/Textures/_CP14/Actions/Spells/fire.rsi/meta.json +++ b/Resources/Textures/_CP14/Actions/Spells/fire.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "All right reserved", - "copyright": "Created by .kreks., tiefling_revenge, fire_music, firewave by TheShuEd", + "copyright": "Created by .kreks., tiefling_revenge, fire_music, firewave by TheShuEd, fire_trap by nimfar11", "states": [ { "name": "fire_music" @@ -24,6 +24,9 @@ }, { "name": "firewave" + }, + { + "name": "fire_trap" } ] } diff --git a/Resources/Textures/_CP14/Actions/Spells/misc.rsi/meta.json b/Resources/Textures/_CP14/Actions/Spells/misc.rsi/meta.json index 692d3c9e5e..8b24b2033c 100644 --- a/Resources/Textures/_CP14/Actions/Spells/misc.rsi/meta.json +++ b/Resources/Textures/_CP14/Actions/Spells/misc.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "All right reserved", - "copyright": "Created by TheShuEd", + "copyright": "Created by TheShuEd, vulnerability by Sable", "states": [ { "name": "magical_acceleration" @@ -18,6 +18,9 @@ }, { "name": "skull_red" + }, + { + "name": "vulnerability" } ] } \ No newline at end of file diff --git a/Resources/Textures/_CP14/Actions/Spells/misc.rsi/vulnerability.png b/Resources/Textures/_CP14/Actions/Spells/misc.rsi/vulnerability.png new file mode 100644 index 0000000000..332d96981e Binary files /dev/null and b/Resources/Textures/_CP14/Actions/Spells/misc.rsi/vulnerability.png differ diff --git a/Resources/Textures/_CP14/Actions/Spells/water.rsi/ice_trap.png b/Resources/Textures/_CP14/Actions/Spells/water.rsi/ice_trap.png new file mode 100644 index 0000000000..d5a85a2c7c Binary files /dev/null and b/Resources/Textures/_CP14/Actions/Spells/water.rsi/ice_trap.png differ diff --git a/Resources/Textures/_CP14/Actions/Spells/water.rsi/meta.json b/Resources/Textures/_CP14/Actions/Spells/water.rsi/meta.json index 6e9909fd03..d83a8275e4 100644 --- a/Resources/Textures/_CP14/Actions/Spells/water.rsi/meta.json +++ b/Resources/Textures/_CP14/Actions/Spells/water.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "All right reserved", - "copyright": "Created by TheShuEd, ice dagger by .kreks.", + "copyright": "Created by TheShuEd, ice_dagger by .kreks., ice_trap by nimfar11", "states": [ { "name": "beer_creation" @@ -24,6 +24,9 @@ }, { "name": "water_creation" + }, + { + "name": "ice_trap" } ] } \ No newline at end of file diff --git a/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/meta.json b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/meta.json new file mode 100644 index 0000000000..b3b6a0a0c0 --- /dev/null +++ b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/meta.json @@ -0,0 +1,55 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-4.0", + "copyright": "Created by Nimfar11", + "states": [ + { + "name": "small_circle", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "rune_fire", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "rune_energia", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "rune_ice", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + } + ] +} diff --git a/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/rune_energia.png b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/rune_energia.png new file mode 100644 index 0000000000..87826b2d5f Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/rune_energia.png differ diff --git a/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/rune_fire.png b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/rune_fire.png new file mode 100644 index 0000000000..bfc287b2a3 Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/rune_fire.png differ diff --git a/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/rune_ice.png b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/rune_ice.png new file mode 100644 index 0000000000..678b17a3c3 Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/rune_ice.png differ diff --git a/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/small_circle.png b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/small_circle.png new file mode 100644 index 0000000000..ac6ae9682d Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Magic/magic_trap.rsi/small_circle.png differ diff --git a/Resources/Textures/_CP14/Mobs/Monster/spineguard.rsi/dead.png b/Resources/Textures/_CP14/Mobs/Monster/spineguard.rsi/dead.png new file mode 100644 index 0000000000..71ec4af8d7 Binary files /dev/null and b/Resources/Textures/_CP14/Mobs/Monster/spineguard.rsi/dead.png differ diff --git a/Resources/Textures/_CP14/Mobs/Monster/spineguard.rsi/live.png b/Resources/Textures/_CP14/Mobs/Monster/spineguard.rsi/live.png new file mode 100644 index 0000000000..a1c52985c4 Binary files /dev/null and b/Resources/Textures/_CP14/Mobs/Monster/spineguard.rsi/live.png differ diff --git a/Resources/Textures/_CP14/Mobs/Monster/spineguard.rsi/meta.json b/Resources/Textures/_CP14/Mobs/Monster/spineguard.rsi/meta.json new file mode 100644 index 0000000000..396612d5bf --- /dev/null +++ b/Resources/Textures/_CP14/Mobs/Monster/spineguard.rsi/meta.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "size": { + "x": 51, + "y": 51 + }, + "license": "CC-BY-SA-4.0", + "copyright": "Generated by ChatGPT, polished by TheShuEd and Omsoy", + "states": [ + { + "name": "live", + "directions": 4 + }, + { + "name": "dead" + } + ] +}