diff --git a/Content.Server/Traits/TraitSystem.cs b/Content.Server/Traits/TraitSystem.cs
index e19f736f06..600555b37b 100644
--- a/Content.Server/Traits/TraitSystem.cs
+++ b/Content.Server/Traits/TraitSystem.cs
@@ -1,4 +1,6 @@
+using Content.Server.Actions;
using Content.Server.GameTicking;
+using Content.Shared.Actions;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Roles;
@@ -14,6 +16,7 @@ public sealed class TraitSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly SharedHandsSystem _sharedHandsSystem = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
+ [Dependency] private readonly ActionsSystem _action = default!; //CP14
public override void Initialize()
{
@@ -45,8 +48,16 @@ public sealed class TraitSystem : EntitySystem
_whitelistSystem.IsBlacklistPass(traitPrototype.Blacklist, args.Mob))
continue;
+ // CP14 start - add all spells to player mind
+ foreach (var spell in traitPrototype.Actions)
+ {
+ _action.AddAction(args.Mob, spell);
+ }
+ //CP14 end
+
// Add all components required by the prototype
- EntityManager.AddComponents(args.Mob, traitPrototype.Components, false);
+ if (traitPrototype.Components.Count > 0) //CP14 added check
+ EntityManager.AddComponents(args.Mob, traitPrototype.Components, false);
// Add item required by the trait
if (traitPrototype.TraitGear == null)
diff --git a/Content.Shared/Traits/TraitPrototype.cs b/Content.Shared/Traits/TraitPrototype.cs
index c79d3cbf30..f699b80b15 100644
--- a/Content.Shared/Traits/TraitPrototype.cs
+++ b/Content.Shared/Traits/TraitPrototype.cs
@@ -41,7 +41,7 @@ public sealed partial class TraitPrototype : IPrototype
/// The components that get added to the player, when they pick this trait.
///
[DataField]
- public ComponentRegistry Components { get; private set; } = default!;
+ public ComponentRegistry Components { get; private set; } = new(); //CP14 new()
///
/// Gear that is given to the player, when they pick this trait.
@@ -60,4 +60,10 @@ public sealed partial class TraitPrototype : IPrototype
///
[DataField]
public ProtoId? Category;
+
+ ///
+ /// CP14 - adding permanent spells into players mind
+ ///
+ [DataField]
+ public List Actions = new();
}
diff --git a/Content.Shared/_CP14/MagicClothing/CP14MagicClothingManacostModifyComponent.cs b/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifyComponent.cs
similarity index 65%
rename from Content.Shared/_CP14/MagicClothing/CP14MagicClothingManacostModifyComponent.cs
rename to Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifyComponent.cs
index 1af9dc95fd..688957520e 100644
--- a/Content.Shared/_CP14/MagicClothing/CP14MagicClothingManacostModifyComponent.cs
+++ b/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifyComponent.cs
@@ -2,13 +2,13 @@ using Content.Shared._CP14.MagicRitual.Prototypes;
using Content.Shared.FixedPoint;
using Robust.Shared.Prototypes;
-namespace Content.Shared._CP14.MagicClothing;
+namespace Content.Shared._CP14.MagicManacostModify;
///
/// Changes the manacost of spells for the bearer
///
-[RegisterComponent, Access(typeof(CP14MagicClothingSystem))]
-public sealed partial class CP14MagicClothingManacostModifyComponent : Component
+[RegisterComponent, Access(typeof(CP14MagicManacostModifySystem))]
+public sealed partial class CP14MagicManacostModifyComponent : Component
{
[DataField]
public Dictionary, FixedPoint2> Modifiers = new();
diff --git a/Content.Shared/_CP14/MagicClothing/CP14MagicClothingSystem.cs b/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifySystem.cs
similarity index 59%
rename from Content.Shared/_CP14/MagicClothing/CP14MagicClothingSystem.cs
rename to Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifySystem.cs
index d2e7b80a57..b0398d586b 100644
--- a/Content.Shared/_CP14/MagicClothing/CP14MagicClothingSystem.cs
+++ b/Content.Shared/_CP14/MagicManacostModify/CP14MagicManacostModifySystem.cs
@@ -2,15 +2,14 @@
using Content.Shared._CP14.MagicRitual.Prototypes;
using Content.Shared._CP14.MagicSpell.Events;
using Content.Shared.Examine;
-using Content.Shared.FixedPoint;
using Content.Shared.Inventory;
using Content.Shared.Verbs;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
-namespace Content.Shared._CP14.MagicClothing;
+namespace Content.Shared._CP14.MagicManacostModify;
-public sealed partial class CP14MagicClothingSystem : EntitySystem
+public sealed partial class CP14MagicManacostModifySystem : EntitySystem
{
[Dependency] private readonly ExamineSystemShared _examine = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
@@ -18,11 +17,12 @@ public sealed partial class CP14MagicClothingSystem : EntitySystem
{
base.Initialize();
- SubscribeLocalEvent>(OnCalculateManacost);
- SubscribeLocalEvent>(OnVerbExamine);
+ SubscribeLocalEvent>(OnCalculateManacost);
+ SubscribeLocalEvent(OnCalculateManacost);
+ SubscribeLocalEvent>(OnVerbExamine);
}
- private void OnVerbExamine(Entity ent, ref GetVerbsEvent args)
+ private void OnVerbExamine(Entity ent, ref GetVerbsEvent args)
{
if (!args.CanInteract || !args.CanAccess)
return;
@@ -37,7 +37,7 @@ public sealed partial class CP14MagicClothingSystem : EntitySystem
Loc.GetString("armor-examinable-verb-message"));
}
- private FormattedMessage GetMagicClothingExamine(CP14MagicClothingManacostModifyComponent comp)
+ private FormattedMessage GetMagicClothingExamine(CP14MagicManacostModifyComponent comp)
{
var msg = new FormattedMessage();
msg.AddMarkupOrThrow(Loc.GetString("cp14-clothing-magic-examine"));
@@ -65,13 +65,18 @@ public sealed partial class CP14MagicClothingSystem : EntitySystem
return msg;
}
- private void OnCalculateManacost(Entity ent, ref InventoryRelayedEvent args)
+ private void OnCalculateManacost(Entity ent, ref InventoryRelayedEvent args)
{
- args.Args.Multiplier += (float)ent.Comp.GlobalModifier;
+ OnCalculateManacost(ent, ref args.Args);
+ }
- if (args.Args.MagicType is not null && ent.Comp.Modifiers.TryGetValue(args.Args.MagicType.Value, out var modifier))
+ 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.Args.Multiplier *= (float)modifier;
+ args.Multiplier *= (float)modifier;
}
}
}
diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs
index bb56d5fc9c..35d3ddeb56 100644
--- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs
+++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs
@@ -4,7 +4,9 @@ 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.MagicSpellStorage;
using Content.Shared.DoAfter;
+using Content.Shared.FixedPoint;
using Content.Shared.Hands.Components;
using Content.Shared.Popups;
using Content.Shared.Speech.Muting;
@@ -50,7 +52,6 @@ public partial class CP14SharedMagicSystem : EntitySystem
private void OnMagicEffectInit(Entity ent, ref MapInitEvent args)
{
-
var meta = MetaData(ent);
var sb = new StringBuilder();
@@ -62,6 +63,16 @@ public partial class CP14SharedMagicSystem : EntitySystem
sb.Append($"\n {Loc.GetString("cp14-magic-magic-type")}: [color={indexedMagic.Color.ToHex()}]{Loc.GetString(indexedMagic.Name)}[/color]");
}
+ if (TryComp(ent, out var verbal))
+ {
+ sb.Append("\n" + Loc.GetString("cp14-magic-verbal-aspect"));
+ }
+
+ if (TryComp(ent, out var somatic))
+ {
+ sb.Append("\n" + Loc.GetString("cp14-magic-somatic-aspect") + " " + somatic.FreeHandRequired);
+ }
+
_meta.SetEntityDescription(ent, sb.ToString());
}
@@ -73,14 +84,7 @@ public partial class CP14SharedMagicSystem : EntitySystem
return;
}
- var manaCost = ent.Comp.ManaCost;
-
- if (ent.Comp.CanModifyManacost)
- {
- var manaEv = new CP14CalculateManacostEvent(args.Caster, ent.Comp.ManaCost, ent.Comp.MagicType);
- RaiseLocalEvent(args.Caster, manaEv);
- manaCost = manaEv.GetManacost();
- }
+ var manaCost = CalculateManacost(ent, args.Caster);
if (!_magicEnergy.HasEnergy(args.Caster, manaCost, magicContainer, ent.Comp.Safe))
{
@@ -283,15 +287,25 @@ public partial class CP14SharedMagicSystem : EntitySystem
return;
+ var manaCost = CalculateManacost(ent, args.Caster.Value);
+ _magicEnergy.TryConsumeEnergy(args.Caster.Value, manaCost, safe: ent.Comp.Safe);
+ }
+
+ private FixedPoint2 CalculateManacost(Entity ent, EntityUid caster)
+ {
var manaCost = ent.Comp.ManaCost;
if (ent.Comp.CanModifyManacost)
{
- var manaEv = new CP14CalculateManacostEvent(args.Caster.Value, ent.Comp.ManaCost, ent.Comp.MagicType);
- RaiseLocalEvent(args.Caster.Value, manaEv);
+ var manaEv = new CP14CalculateManacostEvent(caster, ent.Comp.ManaCost, ent.Comp.MagicType);
+ RaiseLocalEvent(caster, manaEv);
+
+ if (TryComp(ent, out var provided) && provided.SpellStorage is not null)
+ RaiseLocalEvent(provided.SpellStorage.Value, manaEv);
+
manaCost = manaEv.GetManacost();
}
- _magicEnergy.TryConsumeEnergy(args.Caster.Value, manaCost, safe: ent.Comp.Safe);
+ return manaCost;
}
}
diff --git a/Content.Shared/_CP14/MagicSpellStorage/CP14ProvidedBySpellStorageComponent.cs b/Content.Shared/_CP14/MagicSpellStorage/CP14ProvidedBySpellStorageComponent.cs
new file mode 100644
index 0000000000..4d3ded7f47
--- /dev/null
+++ b/Content.Shared/_CP14/MagicSpellStorage/CP14ProvidedBySpellStorageComponent.cs
@@ -0,0 +1,11 @@
+namespace Content.Shared._CP14.MagicSpellStorage;
+
+///
+/// Located on the action entity, stores a reference to the object from which the action was created.
+///
+[RegisterComponent, Access(typeof(CP14SpellStorageSystem))]
+public sealed partial class CP14ProvidedBySpellStorageComponent : Component
+{
+ [DataField]
+ public Entity? SpellStorage;
+}
diff --git a/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs b/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs
index 1dcdf4fbba..2ff59c9e93 100644
--- a/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs
+++ b/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs
@@ -5,6 +5,7 @@ using Content.Shared.Clothing.Components;
using Content.Shared.Hands;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Mind;
+using Robust.Shared.Network;
namespace Content.Shared._CP14.MagicSpellStorage;
@@ -18,10 +19,12 @@ public sealed partial class CP14SpellStorageSystem : EntitySystem
[Dependency] private readonly SharedMindSystem _mind = default!;
[Dependency] private readonly CP14SharedMagicAttuningSystem _attuning = default!;
[Dependency] private readonly SharedHandsSystem _hands = default!;
+ [Dependency] private readonly INetManager _net = default!;
public override void Initialize()
{
SubscribeLocalEvent(OnMagicStorageInit);
+ SubscribeLocalEvent(OnMagicStorageShutdown);
SubscribeLocalEvent(OnEquippedHand);
SubscribeLocalEvent(OnHandAddedAttune);
@@ -38,16 +41,33 @@ public sealed partial class CP14SpellStorageSystem : EntitySystem
///
private void OnMagicStorageInit(Entity mStorage, ref MapInitEvent args)
{
+ if (_net.IsClient)
+ return;
+
foreach (var spell in mStorage.Comp.Spells)
{
var spellEnt = _actionContainer.AddAction(mStorage, spell);
if (spellEnt is null)
continue;
+ var provided = EntityManager.EnsureComponent(spellEnt.Value);
+ provided.SpellStorage = mStorage;
+
mStorage.Comp.SpellEntities.Add(spellEnt.Value);
}
}
+ private void OnMagicStorageShutdown(Entity mStorage, ref ComponentShutdown args)
+ {
+ if (_net.IsClient)
+ return;
+
+ foreach (var spell in mStorage.Comp.SpellEntities)
+ {
+ QueueDel(spell);
+ }
+ }
+
private void OnEquippedHand(Entity ent, ref GotEquippedHandEvent args)
{
if (!TryComp(ent, out var spellStorage))
diff --git a/CrystallPunk14.sln.DotSettings b/CrystallPunk14.sln.DotSettings
index cdf8b7469c..f37cec1427 100644
--- a/CrystallPunk14.sln.DotSettings
+++ b/CrystallPunk14.sln.DotSettings
@@ -710,6 +710,7 @@ public $TYPE$ $NAME$;
True
True
True
+ True
True
True
True
diff --git a/Resources/Locale/en-US/_CP14/magicTypes/magic.ftl b/Resources/Locale/en-US/_CP14/magicTypes/magic.ftl
index 22a556b92d..f74e1399c3 100644
--- a/Resources/Locale/en-US/_CP14/magicTypes/magic.ftl
+++ b/Resources/Locale/en-US/_CP14/magicTypes/magic.ftl
@@ -1,11 +1,14 @@
-cp14-magic-type-abjuration = Abjuration
-cp14-magic-type-conjuration = Conjuration
-cp14-magic-type-divination = Divination
-cp14-magic-type-enchantment = Enchantment
-cp14-magic-type-evocation = Evocation
-cp14-magic-type-illusion = Illusion
-cp14-magic-type-necromancy = Necromancy
-cp14-magic-type-transmutation = Transmutation
+cp14-magic-type-fire = Fire
+cp14-magic-type-water = Water
+cp14-magic-type-earth = Earth
+cp14-magic-type-healing = Healing
+cp14-magic-type-light-darkness = Light and darkness
+cp14-magic-type-meta = Metamagic
+cp14-magic-type-gate = Gate
+cp14-magic-type-movement = Movement
cp14-magic-manacost = Manacost
-cp14-magic-magic-type = Magic type
\ No newline at end of file
+cp14-magic-magic-type = Magic type
+
+cp14-magic-verbal-aspect = Requires the ability to speak
+cp14-magic-somatic-aspect = Requires a free hand:
\ No newline at end of file
diff --git a/Resources/Locale/en-US/_CP14/traits/trait.ftl b/Resources/Locale/en-US/_CP14/traits/trait.ftl
index 2a51faf76f..fc2d30dcf9 100644
--- a/Resources/Locale/en-US/_CP14/traits/trait.ftl
+++ b/Resources/Locale/en-US/_CP14/traits/trait.ftl
@@ -1,6 +1,7 @@
cp14-trait-category-physical = Physical features
cp14-trait-category-background = Background
cp14-trait-category-speech = Speech peculiarities
+cp14-trait-category-magic = Known spells
# Physical
@@ -19,6 +20,14 @@ cp14-trait-muted-desc = All you can do is mumble incoherently. The benefits of v
cp14-trait-snoring-name = Loud snoring
cp14-trait-snoring-desc = It is simply impossible to sleep next to you because you snore terribly loudly at everything.
+# Magic spells
+
+cp14-trait-spell-flamecreation-name = flame creation
+cp14-trait-spell-flamecreation-desc = A artificial flame forms in your hand, illuminating your surroundings. You can throw it to use it as a disposable weapon.
+
+cp14-trait-spell-managift-name = mana gift
+cp14-trait-spell-managift-desc = You can transfer a small amount of your magical energy to a target entity or magical object.
+
# Backgrounds
cp14-trait-bg-entertainer-name = Entertainer
diff --git a/Resources/Locale/ru-RU/_CP14/magicTypes/magic.ftl b/Resources/Locale/ru-RU/_CP14/magicTypes/magic.ftl
index 5cd8146f36..0fe2218a30 100644
--- a/Resources/Locale/ru-RU/_CP14/magicTypes/magic.ftl
+++ b/Resources/Locale/ru-RU/_CP14/magicTypes/magic.ftl
@@ -1,11 +1,14 @@
-cp14-magic-type-abjuration = Ограждение
-cp14-magic-type-conjuration = Призыв
-cp14-magic-type-divination = Прорицание
-cp14-magic-type-enchantment = Очарование
-cp14-magic-type-evocation = Воплощение
-cp14-magic-type-illusion = Иллюзии
-cp14-magic-type-necromancy = Некромантия
-cp14-magic-type-transmutation = Трансмутация
+cp14-magic-type-fire = Огонь
+cp14-magic-type-water = Вода
+cp14-magic-type-earth = Земля
+cp14-magic-type-healing = Исцеление
+cp14-magic-type-light-darkness = Свет и тьма
+cp14-magic-type-meta = Метамагия
+cp14-magic-type-gate = Пространство
+cp14-magic-type-movement = Движение
cp14-magic-manacost = Затраты маны
-cp14-magic-magic-type = Тип магии
\ No newline at end of file
+cp14-magic-magic-type = Тип магии
+
+cp14-magic-verbal-aspect = Требуется возможность говорить
+cp14-magic-somatic-aspect = Требуются свободные руки:
\ No newline at end of file
diff --git a/Resources/Locale/ru-RU/_CP14/traits/trait.ftl b/Resources/Locale/ru-RU/_CP14/traits/trait.ftl
index 0a88a8f988..4ef41e864c 100644
--- a/Resources/Locale/ru-RU/_CP14/traits/trait.ftl
+++ b/Resources/Locale/ru-RU/_CP14/traits/trait.ftl
@@ -1,6 +1,7 @@
cp14-trait-category-physical = Физические особенности
cp14-trait-category-background = Предыстория
cp14-trait-category-speech = Особенности речи
+cp14-trait-category-magic = Известные заклинания
# Physical
@@ -19,6 +20,14 @@ cp14-trait-muted-desc = Все что вы можете - бессвязно м
cp14-trait-snoring-name = Громкий храп
cp14-trait-snoring-desc = Спать рядом с вами просто невозможно, потому что во все вы жутко громко храпите.
+# Magic spells
+
+cp14-trait-spell-flamecreation-name = создание пламени
+cp14-trait-spell-flamecreation-desc = A artificial flame forms in your hand, illuminating your surroundings. You can throw it to use it as a disposable weapon.
+
+cp14-trait-spell-managift-name = передача маны
+cp14-trait-spell-managift-desc = You can transfer a small amount of your magical energy to a target entity or magical object.
+
# Backgrounds
cp14-trait-bg-entertainer-name = Артист
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/earth_wall.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml
similarity index 98%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/earth_wall.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml
index abfe0ae370..4d4f9d542a 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/earth_wall.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Earth/T1_earth_wall.yml
@@ -6,7 +6,7 @@
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.9
- type: CP14MagicEffect
- magicType: Evocation
+ magicType: Earth
manaCost: 15
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/flame_creation.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T0_flame_creation.yml
similarity index 99%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/flame_creation.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T0_flame_creation.yml
index 2056b796ef..838899ff5e 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/flame_creation.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T0_flame_creation.yml
@@ -4,7 +4,7 @@
description: A artificial flame forms in your hand, illuminating your surroundings. You can throw it to use it as a disposable weapon.
components:
- type: CP14MagicEffect
- magicType: Conjuration
+ magicType: Fire
manaCost: 5
effects:
- !type:CP14SpellSpawnEntityOnTarget
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/fireball.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fireball.yml
similarity index 98%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/fireball.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fireball.yml
index e3933d35f4..2b1aa00def 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/fireball.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Fire/T1_fireball.yml
@@ -6,7 +6,7 @@
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.7
- type: CP14MagicEffect
- magicType: Evocation
+ magicType: Fire
manaCost: 20
effects:
- !type:CP14SpellSpawnEntityOnUser
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_step.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Gate/T2_shadow_step.yml
similarity index 97%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_step.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Gate/T2_shadow_step.yml
index 68b48029ff..86d7205702 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_step.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Gate/T2_shadow_step.yml
@@ -6,7 +6,7 @@
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.4
- type: CP14MagicEffect
- magicType: Conjuration
+ magicType: Gate
manaCost: 20
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/cure_wounds.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T1_cure_wounds.yml
similarity index 98%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/cure_wounds.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T1_cure_wounds.yml
index e7e776fe1f..cdd78018c4 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/cure_wounds.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T1_cure_wounds.yml
@@ -6,7 +6,7 @@
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.5
- type: CP14MagicEffect
- magicType: Evocation
+ magicType: Healing
manaCost: 20
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/flash_light.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/LightDarkness/T1_flash_light.yml
similarity index 98%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/flash_light.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/LightDarkness/T1_flash_light.yml
index 54881697b2..d270860fa9 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/flash_light.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/LightDarkness/T1_flash_light.yml
@@ -4,7 +4,7 @@
description: Creates a flash of bright, blinding light.
components:
- type: CP14MagicEffect
- magicType: Abjuration
+ magicType: LightDarkness
manaCost: 10
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/sphere_of_light.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/LightDarkness/T1_sphere_of_light.yml
similarity index 98%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/sphere_of_light.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/LightDarkness/T1_sphere_of_light.yml
index d4f6395d0c..33eaa042ae 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/sphere_of_light.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/LightDarkness/T1_sphere_of_light.yml
@@ -4,7 +4,7 @@
description: Materialization of a bright and safe light source.
components:
- type: CP14MagicEffect
- magicType: Conjuration
+ magicType: LightDarkness
manaCost: 10
effects:
- !type:CP14SpellSpawnEntityOnTarget
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/mana_gift.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_gift.yml
similarity index 98%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/mana_gift.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_gift.yml
index bcd47e7175..f8f6686b54 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/mana_gift.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_gift.yml
@@ -4,7 +4,7 @@
description: You can transfer a small amount of your magical energy to a target entity or magical object.
components:
- type: CP14MagicEffect
- magicType: Necromancy
+ magicType: Meta
manaCost: 12
canModifyManacost: false
telegraphyEffects:
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_grab.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Movement/T1_shadow_grab.yml
similarity index 97%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_grab.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Movement/T1_shadow_grab.yml
index 0ffd0920eb..85db4b8e7e 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/shadow_grab.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Movement/T1_shadow_grab.yml
@@ -4,7 +4,7 @@
description: You attract a ghostly hand that draws an object or entity to you
components:
- type: CP14MagicEffect
- magicType: Transmutation
+ magicType: Movement
manaCost: 10
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_dagger.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_dagger.yml
similarity index 98%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_dagger.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_dagger.yml
index 205ae9422a..35a41104a1 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_dagger.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_dagger.yml
@@ -4,7 +4,7 @@
description: Materialization of a temporary sharp ice throwing dagger
components:
- type: CP14MagicEffect
- magicType: Evocation
+ magicType: Water
manaCost: 15
effects:
- !type:CP14SpellSpawnEntityOnTarget
diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_shards.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_shards.yml
similarity index 98%
rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_shards.yml
rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_shards.yml
index 0fbdd9a146..8e55ebeab9 100644
--- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/ice_shards.yml
+++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Water/T1_ice_shards.yml
@@ -6,7 +6,7 @@
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.25
- type: CP14MagicEffect
- magicType: Evocation
+ magicType: Water
manaCost: 5
effects:
- !type:CP14SpellProjectile
diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Head/Roles/general.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Head/Roles/general.yml
index 230c416409..f5f2ea643a 100644
--- a/Resources/Prototypes/_CP14/Entities/Clothing/Head/Roles/general.yml
+++ b/Resources/Prototypes/_CP14/Entities/Clothing/Head/Roles/general.yml
@@ -125,7 +125,7 @@
sprite: _CP14/Clothing/Head/Roles/General/triangularhat.rsi
- type: Clothing
sprite: _CP14/Clothing/Head/Roles/General/triangularhat.rsi
- - type: CP14MagicClothingManacostModify
+ - type: CP14MagicManacostModify
globalModifier: 0.8
- type: entity
@@ -138,5 +138,5 @@
sprite: _CP14/Clothing/Head/Roles/General/triangularhat_golden.rsi
- type: Clothing
sprite: _CP14/Clothing/Head/Roles/General/triangularhat_golden.rsi
- - type: CP14MagicClothingManacostModify
+ - type: CP14MagicManacostModify
globalModifier: 0.8
\ No newline at end of file
diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/monster.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/monster.yml
index b9f75b0df9..8b8adfdcec 100644
--- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/monster.yml
+++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/monster.yml
@@ -103,7 +103,6 @@
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -1.0
- type: CP14MagicEffect
- magicType: Conjuration
manaCost: 5
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml
index cd7acf2285..5d51ff666f 100644
--- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml
+++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Magic/twoHandedStaffs.yml
@@ -43,4 +43,7 @@
- type: CP14SpellStorageAccessHolding
- type: CP14SpellStorage
spells:
- - CP14ActionSpellCureWounds
\ No newline at end of file
+ - CP14ActionSpellCureWounds
+ - type: CP14MagicManacostModify
+ modifiers:
+ Healing: 1.1
\ No newline at end of file
diff --git a/Resources/Prototypes/_CP14/MagicTypes/magic.yml b/Resources/Prototypes/_CP14/MagicTypes/magic.yml
index 42dcd422f7..fd7d3a5d2c 100644
--- a/Resources/Prototypes/_CP14/MagicTypes/magic.yml
+++ b/Resources/Prototypes/_CP14/MagicTypes/magic.yml
@@ -1,39 +1,39 @@
- type: magicType
- id: Abjuration
- name: cp14-magic-type-abjuration #Ограждение
- color: "#c94328"
+ id: Fire
+ name: cp14-magic-type-fire
+ color: "#d9741c"
- type: magicType
- id: Conjuration
- name: cp14-magic-type-conjuration #Призыв
- color: "#8e28c9"
+ id: Water
+ name: cp14-magic-type-water
+ color: "#1c94d9"
- type: magicType
- id: Divination
- name: cp14-magic-type-divination #Прорицание
- color: "#81d3e3"
+ id: Earth
+ name: cp14-magic-type-earth
+ color: "#70533f"
- type: magicType
- id: Enchantment
- name: cp14-magic-type-enchantment #Очарование
- color: "#7147a1"
+ id: Healing
+ name: cp14-magic-type-healing
+ color: "#89e04f"
- type: magicType
- id: Evocation
- name: cp14-magic-type-evocation #Воплощение
- color: "#47a14a"
+ id: LightDarkness
+ name: cp14-magic-type-light-darkness
+ color: "#ba97b8"
- type: magicType
- id: Illusion
- name: cp14-magic-type-illusion #Иллюзия
- color: "#cc1275"
+ id: Meta
+ name: cp14-magic-type-meta
+ color: "#dcffdb"
- type: magicType
- id: Necromancy
- name: cp14-magic-type-necromancy #Некромантия
- color: "#4dc4a4"
+ id: Gate
+ name: cp14-magic-type-gate
+ color: "#32597d"
- type: magicType
- id: Transmutation
- name: cp14-magic-type-transmutation #Трансмутация
- color: "#3333d4"
\ No newline at end of file
+ id: Movement
+ name: cp14-magic-type-movement
+ color: "#63ceff"
\ No newline at end of file
diff --git a/Resources/Prototypes/_CP14/Traits/categories.yml b/Resources/Prototypes/_CP14/Traits/categories.yml
index 187f0f3722..cd2ef80ba1 100644
--- a/Resources/Prototypes/_CP14/Traits/categories.yml
+++ b/Resources/Prototypes/_CP14/Traits/categories.yml
@@ -1,3 +1,8 @@
+- type: traitCategory
+ id: CP14Magic
+ name: cp14-trait-category-magic
+ maxTraitPoints: 1
+
- type: traitCategory
id: CP14PhysicalTraits
name: cp14-trait-category-physical
diff --git a/Resources/Prototypes/_CP14/Traits/spells.yml b/Resources/Prototypes/_CP14/Traits/spells.yml
new file mode 100644
index 0000000000..f0b8d4e169
--- /dev/null
+++ b/Resources/Prototypes/_CP14/Traits/spells.yml
@@ -0,0 +1,17 @@
+- type: trait
+ id: CP14MagicFlameCreation
+ name: cp14-trait-spell-flamecreation-name
+ description: cp14-trait-spell-flamecreation-desc
+ cost: 1
+ category: CP14Magic
+ actions:
+ - CP14ActionSpellFlameCreation
+
+- type: trait
+ id: CP14MagicManaGift
+ name: cp14-trait-spell-managift-name
+ description: cp14-trait-spell-managift-desc
+ cost: 1
+ category: CP14Magic
+ actions:
+ - CP14ActionSpellManaGift
\ No newline at end of file
diff --git a/Resources/Textures/_CP14/Effects/Magic/spells_icons_monster.rsi/meta.json b/Resources/Textures/_CP14/Effects/Magic/spells_icons_monster.rsi/meta.json
index 9fe9c941c1..df26d46c13 100644
--- a/Resources/Textures/_CP14/Effects/Magic/spells_icons_monster.rsi/meta.json
+++ b/Resources/Textures/_CP14/Effects/Magic/spells_icons_monster.rsi/meta.json
@@ -5,7 +5,7 @@
"y": 32
},
"license": "CLA",
- "copyright": "Created by Nimfar11 (github)",
+ "copyright": "Created by TheShuEd (github)",
"states": [
{
"name": "subterranean_leap"
diff --git a/Resources/Textures/_CP14/Effects/Magic/spells_icons_monster.rsi/subterranean_leap.png b/Resources/Textures/_CP14/Effects/Magic/spells_icons_monster.rsi/subterranean_leap.png
index c3fbf1ff96..8a249a7ecd 100644
Binary files a/Resources/Textures/_CP14/Effects/Magic/spells_icons_monster.rsi/subterranean_leap.png and b/Resources/Textures/_CP14/Effects/Magic/spells_icons_monster.rsi/subterranean_leap.png differ