From 9bda0c85e20069b4a5e8c09c471fad37864e646d Mon Sep 17 00:00:00 2001 From: Red <96445749+TheShuEd@users.noreply.github.com> Date: Sat, 23 Aug 2025 15:03:33 +0300 Subject: [PATCH] Magic vision nerf (#1697) * Update ShowHealthBarsComponent.cs * mana split now can destroy mana trace * delete aura examine * Add aura confusion status effect and concealment reagent Introduces the Confused Aura status effect, which causes entities to leave randomized magical aura imprints. Adds the CP14HideMagicAuraStatusEffectComponent, new localization strings, alert, and reagent (Aura concealment solution) that applies the effect. Updates magic vision logic to support the new effect, and adds related icons and prototype definitions. * vampire market * easy vampire clothing craft * obscure magic trace --- .../AuraImprint/CP14AuraImprintSystem.cs | 20 +++- .../Overlays/ShowHealthBarsComponent.cs | 2 +- .../_CP14/MagicSpell/CP14SharedMagicSystem.cs | 2 +- .../CP14SharedMagicVisionSystem.cs | 101 +++++++++++++++--- .../CP14HideMagicAuraStatusEffectComponent.cs | 16 +++ .../CP14MagicVisionComponent.cs | 0 .../_CP14/Vampire/CP14SharedVampireSystem.cs | 7 ++ .../Locale/en-US/_CP14/alerts/alerts.ftl | 5 +- .../meta/thaumaturgy/target_effects.ftl | 5 +- .../Locale/en-US/_CP14/trading/factions.ftl | 3 +- .../Locale/ru-RU/_CP14/alerts/alerts.ftl | 5 +- .../meta/thaumaturgy/target_effects.ftl | 5 +- .../Locale/ru-RU/_CP14/trading/factions.ftl | 3 +- .../Prototypes/_CP14/Alerts/status_effect.yml | 10 +- .../Actions/Spells/Meta/mana_vision.yml | 1 + .../Entities/Clothing/Cloak/vampire_cloak.yml | 1 - .../Entities/Clothing/Masks/vampire_mask.yml | 2 +- .../Objects/Materials/blood_essence.yml | 4 +- .../Specific/Alchemy/vials_filled_potions.yml | 15 +++ .../_CP14/Entities/StatusEffects/misc.yml | 14 ++- .../Specific/Vampire/portal_glyph.yml | 12 +-- .../Prototypes/_CP14/Entities/spectral.yml | 30 ++++++ .../_CP14/Reagents/target_effects.yml | 21 +++- .../Recipes/Workbench/Vampire/devourers.yml | 5 +- .../Workbench/Vampire/night_children.yml | 5 +- .../Recipes/Workbench/Vampire/unnameable.yml | 5 +- .../Trading/BuyPositions/black_market.yml | 9 ++ .../Prototypes/_CP14/Trading/factions.yml | 7 +- .../Spells/meta.rsi/magic_vision_shuffled.png | Bin 0 -> 943 bytes .../_CP14/Actions/Spells/meta.rsi/meta.json | 3 + 30 files changed, 258 insertions(+), 60 deletions(-) create mode 100644 Content.Shared/_CP14/MagicVision/Components/CP14HideMagicAuraStatusEffectComponent.cs rename Content.Shared/_CP14/MagicVision/{ => Components}/CP14MagicVisionComponent.cs (100%) create mode 100644 Resources/Prototypes/_CP14/Entities/spectral.yml create mode 100644 Resources/Prototypes/_CP14/Trading/BuyPositions/black_market.yml create mode 100644 Resources/Textures/_CP14/Actions/Spells/meta.rsi/magic_vision_shuffled.png diff --git a/Content.Server/_CP14/AuraImprint/CP14AuraImprintSystem.cs b/Content.Server/_CP14/AuraImprint/CP14AuraImprintSystem.cs index 98fef18151..3ae3601acf 100644 --- a/Content.Server/_CP14/AuraImprint/CP14AuraImprintSystem.cs +++ b/Content.Server/_CP14/AuraImprint/CP14AuraImprintSystem.cs @@ -1,6 +1,8 @@ using Content.Shared._CP14.AuraDNA; using Content.Shared._CP14.MagicVision; +using Content.Shared._CP14.MagicVision.Components; using Content.Shared.Mobs; +using Content.Shared.StatusEffectNew; using Robust.Shared.Random; using Robust.Shared.Utility; @@ -18,17 +20,27 @@ public sealed partial class CP14AuraImprintSystem : CP14SharedAuraImprintSystem base.Initialize(); SubscribeLocalEvent(OnMapInit); + SubscribeLocalEvent(OnShuffleStatusApplied); SubscribeLocalEvent(OnMobStateChanged); } + private void OnShuffleStatusApplied(Entity ent, ref StatusEffectAppliedEvent args) + { + ent.Comp.Imprint = GenerateAuraImprint(args.Target); + Dirty(ent); + } + private void OnMapInit(Entity ent, ref MapInitEvent args) { - ent.Comp.Imprint = GenerateAuraImprint(ent); + ent.Comp.Imprint = GenerateAuraImprint((ent.Owner, ent.Comp)); Dirty(ent); } - public string GenerateAuraImprint(Entity ent) + public string GenerateAuraImprint(Entity ent) { + if (!Resolve(ent, ref ent.Comp)) + return string.Empty; + var letters = new[] { "ä", "ã", "ç", "ø", "ђ", "œ", "Ї", "Ћ", "ў", "ž", "Ћ", "ö", "є", "þ"}; var imprint = string.Empty; @@ -46,7 +58,7 @@ public sealed partial class CP14AuraImprintSystem : CP14SharedAuraImprintSystem { case MobState.Critical: { - _vision.SpawnMagicVision( + _vision.SpawnMagicTrace( Transform(ent).Coordinates, new SpriteSpecifier.Rsi(new ResPath("_CP14/Actions/Spells/misc.rsi"), "skull"), Loc.GetString("cp14-magic-vision-crit"), @@ -56,7 +68,7 @@ public sealed partial class CP14AuraImprintSystem : CP14SharedAuraImprintSystem } case MobState.Dead: { - _vision.SpawnMagicVision( + _vision.SpawnMagicTrace( Transform(ent).Coordinates, new SpriteSpecifier.Rsi(new ResPath("_CP14/Actions/Spells/misc.rsi"), "skull_red"), Loc.GetString("cp14-magic-vision-dead"), diff --git a/Content.Shared/Overlays/ShowHealthBarsComponent.cs b/Content.Shared/Overlays/ShowHealthBarsComponent.cs index 3f27885db1..4450a1fbd7 100644 --- a/Content.Shared/Overlays/ShowHealthBarsComponent.cs +++ b/Content.Shared/Overlays/ShowHealthBarsComponent.cs @@ -19,7 +19,7 @@ public sealed partial class ShowHealthBarsComponent : Component [AutoNetworkedField] public List> DamageContainers = new() { - "Biological" + "CP14Biological" //CP14 variant }; [DataField] diff --git a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs index e669907304..46b4cfaaff 100644 --- a/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs +++ b/Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.cs @@ -151,7 +151,7 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem && TryComp(ent, out var actionComp) && TryComp(ent, out var manaCost)) { - _magicVision.SpawnMagicVision( + _magicVision.SpawnMagicTrace( Transform(args.User.Value).Coordinates, actionComp.Icon, Loc.GetString("cp14-magic-vision-used-spell", ("name", MetaData(ent).EntityName)), diff --git a/Content.Shared/_CP14/MagicVision/CP14SharedMagicVisionSystem.cs b/Content.Shared/_CP14/MagicVision/CP14SharedMagicVisionSystem.cs index b8d5d64481..3e15d27d17 100644 --- a/Content.Shared/_CP14/MagicVision/CP14SharedMagicVisionSystem.cs +++ b/Content.Shared/_CP14/MagicVision/CP14SharedMagicVisionSystem.cs @@ -1,7 +1,10 @@ +using System.Linq; using System.Text; using Content.Shared._CP14.AuraDNA; +using Content.Shared._CP14.MagicVision.Components; using Content.Shared.Actions; using Content.Shared.Examine; +using Content.Shared.StatusEffectNew; using Robust.Shared.Map; using Robust.Shared.Network; using Robust.Shared.Prototypes; @@ -15,6 +18,7 @@ public abstract class CP14SharedMagicVisionSystem : EntitySystem [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly MetaDataSystem _meta = default!; [Dependency] private readonly INetManager _net = default!; + [Dependency] private readonly StatusEffectsSystem _statusEffects = default!; public readonly EntProtoId MagicTraceProto = "CP14MagicVisionMarker"; @@ -23,15 +27,6 @@ public abstract class CP14SharedMagicVisionSystem : EntitySystem base.Initialize(); SubscribeLocalEvent(OnExamined); - SubscribeLocalEvent(OnAuraHolderExamine); - } - - private void OnAuraHolderExamine(Entity ent, ref ExaminedEvent args) - { - if (!HasComp(args.Examiner)) - return; - - args.PushMarkup($"{Loc.GetString("cp14-magic-vision-aura")} {ent.Comp.Imprint}"); } protected virtual void OnExamined(Entity ent, ref ExaminedEvent args) @@ -39,16 +34,85 @@ public abstract class CP14SharedMagicVisionSystem : EntitySystem var sb = new StringBuilder(); var timePassed = _timing.CurTime - ent.Comp.SpawnTime; - sb.Append($"{Loc.GetString("cp14-magic-vision-timed-past")} {timePassed.Minutes}:{(timePassed.Seconds < 10 ? "0" : "")}{timePassed.Seconds}\n"); + var timeRemaining = ent.Comp.EndTime - _timing.CurTime; + var totalDuration = ent.Comp.EndTime - ent.Comp.SpawnTime; - if (ent.Comp.AuraImprint is not null) + sb.Append($"{Loc.GetString("cp14-magic-vision-timed-past")} {timePassed.Minutes}:{timePassed.Seconds:D2}\n"); + + if (string.IsNullOrEmpty(ent.Comp.AuraImprint)) { - sb.Append($"{Loc.GetString("cp14-magic-vision-aura")} {ent.Comp.AuraImprint}"); + args.AddMarkup(sb.ToString()); + return; } + var imprint = ent.Comp.AuraImprint; + + // Try to extract the content between [color=...] and [/color] + var startTag = imprint.IndexOf(']') + 1; + var endTag = imprint.LastIndexOf('['); + if (startTag <= 0 || endTag <= startTag) + { + sb.Append($"{Loc.GetString("cp14-magic-vision-aura")} {imprint}"); + args.AddMarkup(sb.ToString()); + return; + } + + var content = imprint[startTag..endTag]; + var obscuredContent = new StringBuilder(content.Length); + + // Progress goes from 0 (fresh) to 1 (completely faded) + var progress = Math.Clamp(1.0 - (timeRemaining.TotalSeconds / totalDuration.TotalSeconds), 0.0, 1.0); + + // Number of characters to obscure + var charsToObscure = (int)Math.Round(content.Length * progress); + + // Deterministic pseudo-random based on content + entity id + var hash = (content + ent.Owner.Id).GetHashCode(); + + var obscuredCount = 0; + for (var i = 0; i < content.Length; i++) + { + // Pick bits from hash + index to ensure distribution + var mask = ((hash >> (i % 32)) ^ i) & 1; + var shouldObscure = obscuredCount < charsToObscure && mask == 1; + + obscuredContent.Append(shouldObscure ? '~' : content[i]); + if (shouldObscure) + obscuredCount++; + } + + // If we still didn't obscure enough (due to unlucky bit pattern), obscure remaining from the start + while (obscuredCount < charsToObscure && obscuredCount < obscuredContent.Length) + { + for (var i = 0; i < obscuredContent.Length && obscuredCount < charsToObscure; i++) + { + if (obscuredContent[i] != '~') + { + obscuredContent[i] = '~'; + obscuredCount++; + } + } + } + + var obscuredImprint = imprint.Substring(0, startTag) + obscuredContent + imprint.Substring(endTag); + sb.Append($"{Loc.GetString("cp14-magic-vision-aura")} {obscuredImprint}"); + args.AddMarkup(sb.ToString()); } + public string? GetAuraImprint(Entity ent) + { + if (!Resolve(ent, ref ent.Comp)) + return null; + + if (_statusEffects.TryEffectsWithComp(ent, out var hideComps)) + { + return hideComps.First().Comp1.Imprint; + } + + return ent.Comp.Imprint; + } + /// /// Creates an invisible “magical trace” entity that can be seen with magical vision. /// @@ -58,7 +122,12 @@ public abstract class CP14SharedMagicVisionSystem : EntitySystem /// Duration of the magical trace /// Optional: The direction in which this trace “faces.” When studying the trace, /// this direction can be seen in order to understand, for example, in which direction the spell was used. - public void SpawnMagicVision(EntityCoordinates position, SpriteSpecifier? icon, string description, TimeSpan duration, EntityUid? aura = null, EntityCoordinates? target = null) + public void SpawnMagicTrace(EntityCoordinates position, + SpriteSpecifier? icon, + string description, + TimeSpan duration, + EntityUid? aura = null, + EntityCoordinates? target = null) { if (_net.IsClient) return; @@ -71,10 +140,8 @@ public abstract class CP14SharedMagicVisionSystem : EntitySystem markerComp.TargetCoordinates = target; markerComp.Icon = icon; - if (aura is not null && TryComp(aura, out var auraImprint)) - { - markerComp.AuraImprint = auraImprint.Imprint; - } + if (aura is not null) + markerComp.AuraImprint = GetAuraImprint(aura.Value); _meta.SetEntityDescription(ent, description); diff --git a/Content.Shared/_CP14/MagicVision/Components/CP14HideMagicAuraStatusEffectComponent.cs b/Content.Shared/_CP14/MagicVision/Components/CP14HideMagicAuraStatusEffectComponent.cs new file mode 100644 index 0000000000..c4ca17afe9 --- /dev/null +++ b/Content.Shared/_CP14/MagicVision/Components/CP14HideMagicAuraStatusEffectComponent.cs @@ -0,0 +1,16 @@ +using Content.Shared._CP14.AuraDNA; +using Content.Shared.StatusEffectNew.Components; +using Robust.Shared.GameStates; + +namespace Content.Shared._CP14.MagicVision.Components; + +/// +/// Makes you leave random imprints of magical aura instead of the original +/// Use only in conjunction with , on the status effect entity. +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(CP14SharedAuraImprintSystem))] +public sealed partial class CP14HideMagicAuraStatusEffectComponent : Component +{ + [DataField, AutoNetworkedField] + public string Imprint = string.Empty; +} diff --git a/Content.Shared/_CP14/MagicVision/CP14MagicVisionComponent.cs b/Content.Shared/_CP14/MagicVision/Components/CP14MagicVisionComponent.cs similarity index 100% rename from Content.Shared/_CP14/MagicVision/CP14MagicVisionComponent.cs rename to Content.Shared/_CP14/MagicVision/Components/CP14MagicVisionComponent.cs diff --git a/Content.Shared/_CP14/Vampire/CP14SharedVampireSystem.cs b/Content.Shared/_CP14/Vampire/CP14SharedVampireSystem.cs index dd5f88d192..72cad0ad44 100644 --- a/Content.Shared/_CP14/Vampire/CP14SharedVampireSystem.cs +++ b/Content.Shared/_CP14/Vampire/CP14SharedVampireSystem.cs @@ -1,6 +1,8 @@ using Content.Shared._CP14.Skill; using Content.Shared._CP14.Skill.Components; using Content.Shared._CP14.Skill.Prototypes; +using Content.Shared._CP14.Trading.Prototypes; +using Content.Shared._CP14.Trading.Systems; using Content.Shared._CP14.Vampire.Components; using Content.Shared.Actions; using Content.Shared.Body.Systems; @@ -27,9 +29,11 @@ public abstract partial class CP14SharedVampireSystem : EntitySystem [Dependency] private readonly CP14SharedSkillSystem _skill = default!; [Dependency] protected readonly IPrototypeManager Proto = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; + [Dependency] private readonly CP14SharedTradingPlatformSystem _trade = default!; private readonly ProtoId _skillPointType = "Blood"; private readonly ProtoId _memorySkillPointType = "Memory"; + private readonly ProtoId _tradeFaction = "VampireMarket"; public override void Initialize() { @@ -85,6 +89,9 @@ public abstract partial class CP14SharedVampireSystem : EntitySystem essenceHolder.Essence = 0; Dirty(ent, essenceHolder); } + + //Additional trade faction + _trade.AddReputation(ent.Owner, _tradeFaction, 1); } private void OnVampireRemove(Entity ent, ref ComponentRemove args) diff --git a/Resources/Locale/en-US/_CP14/alerts/alerts.ftl b/Resources/Locale/en-US/_CP14/alerts/alerts.ftl index 276cbe7a4e..e29a52a191 100644 --- a/Resources/Locale/en-US/_CP14/alerts/alerts.ftl +++ b/Resources/Locale/en-US/_CP14/alerts/alerts.ftl @@ -2,4 +2,7 @@ cp14-alerts-magic-energy-name = Magic energy cp14-alerts-magic-energy-desc = A reserve of your internal magic power that allows you to use spells. cp14-alerts-health-name = Health -cp14-alerts-health-desc = Vitality reserve. The less, the worse. Try to survive, please. \ No newline at end of file +cp14-alerts-health-desc = Vitality reserve. The less, the worse. Try to survive, please. + +cp14-alerts-confused-aura-name = Confused aura +cp14-alerts-confused-aura-desc = Your magical aura is altered, and you leave false traces when using magic spells. \ No newline at end of file diff --git a/Resources/Locale/en-US/_CP14/reagents/meta/thaumaturgy/target_effects.ftl b/Resources/Locale/en-US/_CP14/reagents/meta/thaumaturgy/target_effects.ftl index 0ee625b336..496b8fd9a0 100644 --- a/Resources/Locale/en-US/_CP14/reagents/meta/thaumaturgy/target_effects.ftl +++ b/Resources/Locale/en-US/_CP14/reagents/meta/thaumaturgy/target_effects.ftl @@ -86,4 +86,7 @@ cp14-reagent-name-basic-sleep = Sleeping solution cp14-reagent-desc-basic-sleep = Dangerous substance, even in small doses, that sends you to sleep. cp14-reagent-name-basic-unsleep = Awakening solution -cp14-reagent-desc-basic-unsleep = A substance that stimulates the body and instantly brings it out of any sleep. \ No newline at end of file +cp14-reagent-desc-basic-unsleep = A substance that stimulates the body and instantly brings it out of any sleep. + +cp14-reagent-name-basic-confuse-aura = Aura concealment solution +cp14-reagent-desc-basic-confuse-aura = A substance that temporarily alters your magical aura. \ No newline at end of file diff --git a/Resources/Locale/en-US/_CP14/trading/factions.ftl b/Resources/Locale/en-US/_CP14/trading/factions.ftl index 3822603724..f2098794a9 100644 --- a/Resources/Locale/en-US/_CP14/trading/factions.ftl +++ b/Resources/Locale/en-US/_CP14/trading/factions.ftl @@ -8,4 +8,5 @@ cp14-trade-faction-horticulture = Horticulture Consortium cp14-trade-faction-butchers = Master Butchers Union cp14-trade-faction-dairy = Golden Udder Dairy cp14-trade-faction-tailors = Silk & Needle Tailors Guild -cp14-trade-faction-guard = Imperial Guard \ No newline at end of file +cp14-trade-faction-guard = Imperial Guard +cp14-trade-faction-vampire-market = Vampire's lair \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/alerts/alerts.ftl b/Resources/Locale/ru-RU/_CP14/alerts/alerts.ftl index 16eb2fcf39..f7af492022 100644 --- a/Resources/Locale/ru-RU/_CP14/alerts/alerts.ftl +++ b/Resources/Locale/ru-RU/_CP14/alerts/alerts.ftl @@ -2,4 +2,7 @@ cp14-alerts-magic-energy-name = Магическая энергия cp14-alerts-magic-energy-desc = Запас вашей внутренней магической силы, позволяющий вам использовать заклинания. cp14-alerts-health-name = Здоровье -cp14-alerts-health-desc = Запас жизненных сил. Чем меньше, тем хуже. Постарайтесь выжить, пожалуйста. \ No newline at end of file +cp14-alerts-health-desc = Запас жизненных сил. Чем меньше, тем хуже. Постарайтесь выжить, пожалуйста. + +cp14-alerts-confused-aura-name = Спутанная аура +cp14-alerts-confused-aura-desc = Ваша магическая аура изменена, и вы оставляете ненастоящие следы, используя магические заклинания. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/reagents/meta/thaumaturgy/target_effects.ftl b/Resources/Locale/ru-RU/_CP14/reagents/meta/thaumaturgy/target_effects.ftl index 42911e7ae6..e261b7a9dd 100644 --- a/Resources/Locale/ru-RU/_CP14/reagents/meta/thaumaturgy/target_effects.ftl +++ b/Resources/Locale/ru-RU/_CP14/reagents/meta/thaumaturgy/target_effects.ftl @@ -83,4 +83,7 @@ cp14-reagent-name-basic-sleep = Усыпляющий раствор cp14-reagent-desc-basic-sleep = Опасное вещество, даже в малых дозах оправляющее в сон. cp14-reagent-name-basic-unsleep = Пробуждающий раствор -cp14-reagent-desc-basic-unsleep = Вещество, стимулирующее организм, и моментально выводящее из любого сна. \ No newline at end of file +cp14-reagent-desc-basic-unsleep = Вещество, стимулирующее организм, и моментально выводящее из любого сна. + +cp14-reagent-name-basic-confuse-aura = Раствор сокрытия ауры +cp14-reagent-desc-basic-confuse-aura = Вещество, изменяющее вашу магическую ауру на некоторое время. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/trading/factions.ftl b/Resources/Locale/ru-RU/_CP14/trading/factions.ftl index 33bb08107a..ea25bed796 100644 --- a/Resources/Locale/ru-RU/_CP14/trading/factions.ftl +++ b/Resources/Locale/ru-RU/_CP14/trading/factions.ftl @@ -8,4 +8,5 @@ cp14-trade-faction-horticulture = Консорциум садоводов cp14-trade-faction-butchers = Союз мастеровых мясников cp14-trade-faction-dairy = Молочная ферма 'Златовымя' cp14-trade-faction-tailors = Гильдия портных 'Шелк и игла' -cp14-trade-faction-guard = Имперская стража \ No newline at end of file +cp14-trade-faction-guard = Имперская стража +cp14-trade-faction-vampire-market = Вампирское логово \ 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 a04e725f0d..82f6d5c521 100644 --- a/Resources/Prototypes/_CP14/Alerts/status_effect.yml +++ b/Resources/Prototypes/_CP14/Alerts/status_effect.yml @@ -14,4 +14,12 @@ id: CP14VampireSleeping icons: - sprite: _CP14/Actions/Spells/vampire.rsi - state: blood_moon \ No newline at end of file + state: blood_moon + +- type: alert + id: CP14ConfusedAura + name: cp14-alerts-confused-aura-name + description: cp14-alerts-confused-aura-desc + icons: + - sprite: _CP14/Actions/Spells/meta.rsi + state: magic_vision_shuffled \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_vision.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_vision.yml index 9ba923d68e..20e80d8515 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_vision.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/mana_vision.yml @@ -37,6 +37,7 @@ - type: entity id: CP14MagicVisionMarker + parent: CP14SpectralBase categories: [ HideSpawnMenu ] name: mana trace components: diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Cloak/vampire_cloak.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Cloak/vampire_cloak.yml index 066abbd2ea..4e633c581a 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Cloak/vampire_cloak.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Cloak/vampire_cloak.yml @@ -23,7 +23,6 @@ - type: PhysicalComposition materialComposition: CP14Cloth: 40 - CP14Mithril: 10 CP14BloodEssence: 1 - type: entity diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Masks/vampire_mask.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Masks/vampire_mask.yml index 82e0fd670d..085cf76239 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Masks/vampire_mask.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Masks/vampire_mask.yml @@ -20,8 +20,8 @@ type: VoiceMaskBoundUserInterface - type: PhysicalComposition materialComposition: - CP14Iron: 10 CP14Leather: 10 + CP14BloodEssence: 1 - type: entity parent: CP14ClothingMaskVampireVoiceBase diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Materials/blood_essence.yml b/Resources/Prototypes/_CP14/Entities/Objects/Materials/blood_essence.yml index c109e52401..19a61bff24 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Materials/blood_essence.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Materials/blood_essence.yml @@ -1,5 +1,7 @@ - type: entity - parent: BaseItem + parent: + - BaseItem + - CP14SpectralBase id: CP14BloodEssence name: blood essence description: The essence of life, extracted by force. Only true vampires know how to use it. diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/vials_filled_potions.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/vials_filled_potions.yml index 24fe8bbc6f..f4c01891a6 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/vials_filled_potions.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/vials_filled_potions.yml @@ -120,3 +120,18 @@ Quantity: 9 - ReagentId: CP14BasicEffectHealManaDepletion Quantity: 1 + +- type: entity + id: CP14BasicEffectConfuseAura + parent: CP14VialSmall + name: "brad's aura confusion potion" + suffix: Aura confusion 10% + components: + - type: SolutionContainerManager + solutions: + vial: + reagents: + - ReagentId: CP14BasicEffectEmpty + Quantity: 8 + - ReagentId: CP14BasicEffectConfuseAura + Quantity: 2 diff --git a/Resources/Prototypes/_CP14/Entities/StatusEffects/misc.yml b/Resources/Prototypes/_CP14/Entities/StatusEffects/misc.yml index 4028193c6f..a4ab91798a 100644 --- a/Resources/Prototypes/_CP14/Entities/StatusEffects/misc.yml +++ b/Resources/Prototypes/_CP14/Entities/StatusEffects/misc.yml @@ -30,6 +30,7 @@ - type: entity id: CP14StatusEffectGlowing + name: glowing components: - type: StatusEffect - type: StatusEffectAlert @@ -50,10 +51,19 @@ - type: entity parent: MobStatusEffectDebuff id: CP14StatusEffectVampireForceSleep - name: vampire forced sleep + name: forced sleep components: - type: StatusEffectAlert alert: CP14VampireSleeping - type: ForcedSleepingStatusEffect - type: StunnedStatusEffect - - type: KnockdownStatusEffect \ No newline at end of file + - type: KnockdownStatusEffect + +- type: entity + id: MobStatusEffectMagicAuraConfused + name: confused aura + components: + - type: StatusEffect + - type: StatusEffectAlert + alert: CP14ConfusedAura + - type: CP14HideMagicAuraStatusEffect \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Vampire/portal_glyph.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Vampire/portal_glyph.yml index 92231f0490..981d527a81 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Vampire/portal_glyph.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Vampire/portal_glyph.yml @@ -26,6 +26,7 @@ id: CP14BaseVampirePortalGlyph categories: [ ForkFiltered ] abstract: true + parent: CP14SpectralBase name: portal glyph description: A teleportation glyph imbued with bloody magic. Any vampire from the owner clan can teleport here at any moment! To destroy a glyph, suck all the magical energy out of it. components: @@ -57,17 +58,6 @@ property: Energy isLooped: true enabled: true - - type: CP14MagicEnergyContainer - magicAlert: CP14MagicEnergy - maxEnergy: 1 - energy: 1 - unsafeSupport: true - - type: CP14MagicUnsafeDamage - damagePerEnergy: - types: - CP14ManaDepletion: 1 - - type: Damageable - damageContainer: CP14Spectral - type: Destructible thresholds: - trigger: diff --git a/Resources/Prototypes/_CP14/Entities/spectral.yml b/Resources/Prototypes/_CP14/Entities/spectral.yml new file mode 100644 index 0000000000..4029896068 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/spectral.yml @@ -0,0 +1,30 @@ +# Entities that are entirely magical and can be destroyed by dispelling magic. +- type: entity + id: CP14SpectralBase + categories: [ ForkFiltered ] + abstract: true + components: + - type: CP14MagicEnergyContainer + magicAlert: CP14MagicEnergy + maxEnergy: 1 + energy: 1 + unsafeSupport: true + - type: CP14MagicUnsafeDamage + damagePerEnergy: + types: + CP14ManaDepletion: 1 + - type: Damageable + damageContainer: CP14Spectral + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 10 + behaviors: + - !type:PlaySoundBehavior + sound: + path: /Audio/Effects/eye_close.ogg + params: + volume: 6 + - !type:DoActsBehavior + acts: [ "Destruction" ] \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Reagents/target_effects.yml b/Resources/Prototypes/_CP14/Reagents/target_effects.yml index 253e2b55ce..7574d1982a 100644 --- a/Resources/Prototypes/_CP14/Reagents/target_effects.yml +++ b/Resources/Prototypes/_CP14/Reagents/target_effects.yml @@ -601,4 +601,23 @@ metabolismRate: 0.05 effects: - !type:Jitter - pricePerUnit: 0.3 # Weakest negative effect \ No newline at end of file + pricePerUnit: 0.3 # Weakest negative effect + +- type: reagent + id: CP14BasicEffectConfuseAura + name: cp14-reagent-name-basic-confuse-aura + desc: cp14-reagent-desc-basic-confuse-aura + group: CP14BasicEffect + flavor: CP14Vomit + color: "#eb34b7" + physicalDesc: cp14-reagent-physical-desc-colorless + metabolisms: + Food: + metabolismRate: 0.05 + effects: + - !type:ModifyStatusEffect + effectProto: MobStatusEffectMagicAuraConfused + type: Add + time: 2 + refresh: false + pricePerUnit: 0.6 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/devourers.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/devourers.yml index 97b010fca6..cd89d20844 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/devourers.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/devourers.yml @@ -10,7 +10,7 @@ stack: CP14ThinLeather count: 2 - !type:StackResource - stack: CP14IronBar + stack: CP14BloodEssence count: 1 result: CP14ClothingMaskVampireVoiceDevourers resultCount: 1 @@ -26,9 +26,6 @@ - !type:StackResource stack: CP14Cloth count: 4 - - !type:StackResource - stack: CP14MithrilBar - count: 1 - !type:StackResource stack: CP14BloodEssence count: 1 diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/night_children.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/night_children.yml index 5f75b0853d..a6601158e2 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/night_children.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/night_children.yml @@ -10,7 +10,7 @@ stack: CP14ThinLeather count: 2 - !type:StackResource - stack: CP14IronBar + stack: CP14BloodEssence count: 1 result: CP14ClothingMaskVampireVoiceNightChildrens resultCount: 1 @@ -26,9 +26,6 @@ - !type:StackResource stack: CP14Cloth count: 4 - - !type:StackResource - stack: CP14MithrilBar - count: 1 - !type:StackResource stack: CP14BloodEssence count: 1 diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/unnameable.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/unnameable.yml index 7e0ab1a85d..847582f168 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/unnameable.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/Vampire/unnameable.yml @@ -10,7 +10,7 @@ stack: CP14ThinLeather count: 2 - !type:StackResource - stack: CP14IronBar + stack: CP14BloodEssence count: 1 result: CP14ClothingMaskVampireVoiceUnnameable resultCount: 1 @@ -26,9 +26,6 @@ - !type:StackResource stack: CP14Cloth count: 4 - - !type:StackResource - stack: CP14MithrilBar - count: 1 - !type:StackResource stack: CP14BloodEssence count: 1 diff --git a/Resources/Prototypes/_CP14/Trading/BuyPositions/black_market.yml b/Resources/Prototypes/_CP14/Trading/BuyPositions/black_market.yml new file mode 100644 index 0000000000..7bea91229c --- /dev/null +++ b/Resources/Prototypes/_CP14/Trading/BuyPositions/black_market.yml @@ -0,0 +1,9 @@ +- type: cp14TradingPosition + id: CP14BasicEffectConfuseAura + faction: VampireMarket + uiPosition: 0 + icon: + sprite: _CP14/Objects/Specific/Alchemy/vial_small.rsi + state: vial + service: !type:CP14BuyItemsService + product: CP14BasicEffectConfuseAura \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Trading/factions.yml b/Resources/Prototypes/_CP14/Trading/factions.yml index 710cba49f1..78952f47e6 100644 --- a/Resources/Prototypes/_CP14/Trading/factions.yml +++ b/Resources/Prototypes/_CP14/Trading/factions.yml @@ -51,4 +51,9 @@ - type: cp14TradingFaction id: Guards color: "#385573" - name: cp14-trade-faction-guard \ No newline at end of file + name: cp14-trade-faction-guard + +- type: cp14TradingFaction + id: VampireMarket + color: "#6b1934" + name: cp14-trade-faction-vampire-market \ No newline at end of file diff --git a/Resources/Textures/_CP14/Actions/Spells/meta.rsi/magic_vision_shuffled.png b/Resources/Textures/_CP14/Actions/Spells/meta.rsi/magic_vision_shuffled.png new file mode 100644 index 0000000000000000000000000000000000000000..0b16f7be497de388fa852a52653a6b17d191a6e1 GIT binary patch literal 943 zcmV;g15o^lP)Px&X-PyuR9J=WS8HrbVHkc+wQGgVghZD3C5VIxA(QbNiCB>6QqdL7HpMcO#jGmxEP@bmnQbz9d;MTb*PXSqG;ztEU*Gq>&wKg4 z_q=bu0}KH?&zpu~H;kx&=Xp~!OCXDuqdx{m1)u+?b3o-OJ5?RE7Y@ZXDkboDc7yri zRSkw4@%uScUA;eeZ*)3~2jW`tx6;X+?ZjuA%!A5Q0!%oi(djJq0V7H@nygTrHD?|9 zy1Jlx`{DAs+UqHi0`;6+r_=2VmdnE#u^P>0DS1uS64$5BkMMVW1>@-$9VvL!Am-{g z`yL|!fZ4E&?(Ei4v34n07OglB0Ja@030k)NcYKB|0RT8w=T>w~@UB@fXDSq<6qvqT z&j3Kp`h^!JC(c@4?|uotEDnmcPcFli^XmJh7fBuyi-wkFw09^fbF7B7LrOqQW%-VY zfwZI9-vb}u@pmEsF9-n!0Olr7kv!l*y}n;5dnaKLcl>~) z)i02z8^F&_@VCE%_sw(Q{VR-7euGLr5;06HcB$(Z1AvSP+uePJTWpkJM+q_ z+!rLTudeBm+C#Zpst{^FZ?j z0H77K%8hmtS)0%HOGGS4xAd%C#uTBpAVmn}R5>?VLS>hl-DKi8(upD$svEEkQ^ocC z#Ln?)2zbC|9EmtDq+lyDQ@31(cPb^jFGIIYiWAZCYG-DW|0n-i`~YsyVlB%^ RkGTK<002ovPDHLkV1gE-wFLkG literal 0 HcmV?d00001 diff --git a/Resources/Textures/_CP14/Actions/Spells/meta.rsi/meta.json b/Resources/Textures/_CP14/Actions/Spells/meta.rsi/meta.json index 08186a4bf0..5214a3818a 100644 --- a/Resources/Textures/_CP14/Actions/Spells/meta.rsi/meta.json +++ b/Resources/Textures/_CP14/Actions/Spells/meta.rsi/meta.json @@ -33,6 +33,9 @@ }, { "name": "magic_vision" + }, + { + "name": "magic_vision_shuffled" } ] } \ No newline at end of file