diff --git a/Content.Shared/_CP14/MagicWeakness/CP14MagicWeaknessSystem.cs b/Content.Shared/_CP14/MagicWeakness/CP14MagicWeaknessSystem.cs index 857281d14e..86bb5cf63a 100644 --- a/Content.Shared/_CP14/MagicWeakness/CP14MagicWeaknessSystem.cs +++ b/Content.Shared/_CP14/MagicWeakness/CP14MagicWeaknessSystem.cs @@ -1,6 +1,7 @@ using Content.Shared._CP14.MagicEnergy; using Content.Shared.Bed.Sleep; using Content.Shared.Damage; +using Content.Shared.IdentityManagement; using Content.Shared.Popups; using Content.Shared.StatusEffect; @@ -26,11 +27,15 @@ public partial class CP14MagicWeaknessSystem : EntitySystem SubscribeLocalEvent(OnMagicEnergyOverloadSleep); } - private void OnMagicEnergyBurnOutSleep(Entity ent, ref CP14MagicEnergyBurnOutEvent args) + private void OnMagicEnergyBurnOutSleep(Entity ent, + ref CP14MagicEnergyBurnOutEvent args) { if (args.BurnOutEnergy > ent.Comp.SleepThreshold) { - _popup.PopupEntity(Loc.GetString("cp14-magic-energy-damage-burn-out-fall"), ent, ent, PopupType.LargeCaution); + _popup.PopupEntity(Loc.GetString("cp14-magic-energy-damage-burn-out-fall"), + ent, + ent, + PopupType.LargeCaution); _statusEffects.TryAddStatusEffect(ent, StatusEffectKey, TimeSpan.FromSeconds(ent.Comp.SleepPerEnergy * (float)args.BurnOutEnergy), @@ -38,11 +43,15 @@ public partial class CP14MagicWeaknessSystem : EntitySystem } } - private void OnMagicEnergyOverloadSleep(Entity ent, ref CP14MagicEnergyOverloadEvent args) + private void OnMagicEnergyOverloadSleep(Entity ent, + ref CP14MagicEnergyOverloadEvent args) { if (args.OverloadEnergy > ent.Comp.SleepThreshold) { - _popup.PopupEntity(Loc.GetString("cp14-magic-energy-damage-burn-out-fall"), ent, ent, PopupType.LargeCaution); + _popup.PopupEntity(Loc.GetString("cp14-magic-energy-damage-burn-out-fall"), + ent, + ent, + PopupType.LargeCaution); _statusEffects.TryAddStatusEffect(ent, StatusEffectKey, TimeSpan.FromSeconds(ent.Comp.SleepPerEnergy * (float)args.OverloadEnergy), @@ -50,15 +59,43 @@ public partial class CP14MagicWeaknessSystem : EntitySystem } } - private void OnMagicEnergyBurnOutDamage(Entity ent, ref CP14MagicEnergyBurnOutEvent args) + private void OnMagicEnergyBurnOutDamage(Entity ent, + ref CP14MagicEnergyBurnOutEvent args) { - _popup.PopupEntity(Loc.GetString("cp14-magic-energy-damage-burn-out"), ent, ent, PopupType.LargeCaution); + //TODO: Idk why this dont popup recipient + //Others popup + _popup.PopupPredicted(Loc.GetString("cp14-magic-energy-damage-burn-out"), + Loc.GetString("cp14-magic-energy-damage-burn-out-other", ("name", Identity.Name(ent, EntityManager))), + ent, + ent); + + //Local self popup + _popup.PopupEntity( + Loc.GetString("cp14-magic-energy-damage-burn-out"), + ent, + ent, + PopupType.LargeCaution); + _damageable.TryChangeDamage(ent, ent.Comp.DamagePerEnergy * args.BurnOutEnergy, interruptsDoAfters: false); } - private void OnMagicEnergyOverloadDamage(Entity ent, ref CP14MagicEnergyOverloadEvent args) + private void OnMagicEnergyOverloadDamage(Entity ent, + ref CP14MagicEnergyOverloadEvent args) { - _popup.PopupEntity(Loc.GetString("cp14-magic-energy-damage-overload"), ent, ent, PopupType.LargeCaution); + //TODO: Idk why this dont popup recipient + //Others popup + _popup.PopupPredicted(Loc.GetString("cp14-magic-energy-damage-overload"), + Loc.GetString("cp14-magic-energy-damage-overload-other", ("name", Identity.Name(ent, EntityManager))), + ent, + ent); + + //Local self popup + _popup.PopupEntity( + Loc.GetString("cp14-magic-energy-damage-overload"), + ent, + ent, + PopupType.LargeCaution); + _damageable.TryChangeDamage(ent, ent.Comp.DamagePerEnergy * args.OverloadEnergy, interruptsDoAfters: false); } } diff --git a/Resources/Locale/en-US/_CP14/magicEnergy/magic-energy.ftl b/Resources/Locale/en-US/_CP14/magicEnergy/magic-energy.ftl index bef1cb2c38..b581af6dcd 100644 --- a/Resources/Locale/en-US/_CP14/magicEnergy/magic-energy.ftl +++ b/Resources/Locale/en-US/_CP14/magicEnergy/magic-energy.ftl @@ -6,4 +6,10 @@ cp14-magic-energy-no-crystal = No energy crystal! cp14-magic-energy-insufficient = Not enough energy! cp14-magic-energy-insufficient-unsafe = Crystal cracks from lack of energy! -cp14-magic-scanner = Polarity of ley lines: {$power} +cp14-magic-energy-damage-burn-out = From the lack of mana, pain pierces your body! +cp14-magic-energy-damage-burn-out-other = {$name} is destroying itself from lack of mana! + +cp14-magic-energy-damage-overload = You can't hold that much mana! +cp14-magic-energy-damage-overload-other = {$name} is destroying itself from excess mana! + +cp14-magic-energy-damage-burn-out-fall = You pass out from the intense pain! \ No newline at end of file diff --git a/Resources/Locale/en-US/_CP14/magicEnergy/magic-spells.ftl b/Resources/Locale/en-US/_CP14/magicEnergy/magic-spells.ftl index 99263c8569..448ad01d34 100644 --- a/Resources/Locale/en-US/_CP14/magicEnergy/magic-spells.ftl +++ b/Resources/Locale/en-US/_CP14/magicEnergy/magic-spells.ftl @@ -8,10 +8,6 @@ cp14-magic-spell-not-enough-mana-cast-warning-2 = Your hands are shaking... cp14-magic-spell-not-enough-mana-cast-warning-3 = Your throat starts to lump... cp14-magic-spell-not-enough-mana-cast-warning-4 = Your head becomes heavy... -cp14-magic-energy-damage-burn-out = From the lack of mana, pain pierces your body! -cp14-magic-energy-damage-overload = You can't hold that much mana! -cp14-magic-energy-damage-burn-out-fall = You pass out from the intense pain! - cp14-magic-spell-need-verbal-component = You can't cast the spell out loud. cp14-magic-spell-need-somatic-component = You don't have your hands free. diff --git a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-energy.ftl b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-energy.ftl index 0ec10efb30..a1df4dac86 100644 --- a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-energy.ftl +++ b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-energy.ftl @@ -6,4 +6,10 @@ cp14-magic-energy-no-crystal = Отсутствует энергокристал cp14-magic-energy-insufficient = Не достаточно энергии! cp14-magic-energy-insufficient-unsafe = Кристалл трескается от нехватки энергии! -cp14-magic-scanner = Полярность лей-линий: {$power} +cp14-magic-energy-damage-burn-out = От нехватки маны боль пронзает ваше тело! +cp14-magic-energy-damage-burn-out-other = {$name} разрушается от недостатка маны! + +cp14-magic-energy-damage-overload = Вы не можете удержать столько маны! +cp14-magic-energy-damage-overload-other = {$name} разрушается от переизбытка маны! + +cp14-magic-energy-damage-burn-out-fall = Вы теряете сознание от сильной боли! \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-spells.ftl b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-spells.ftl index 3744ca5f90..1c26aa2d7a 100644 --- a/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-spells.ftl +++ b/Resources/Locale/ru-RU/_CP14/magicEnergy/magic-spells.ftl @@ -8,10 +8,6 @@ cp14-magic-spell-not-enough-mana-cast-warning-2 = Ваши руки дрожат cp14-magic-spell-not-enough-mana-cast-warning-3 = К горлу подступает ком... cp14-magic-spell-not-enough-mana-cast-warning-4 = Голова наливается свинцом... -cp14-magic-energy-damage-burn-out = От нехватки маны боль пронзает ваше тело! -cp14-magic-energy-damage-overload = Вы не можете удержать столько маны! -cp14-magic-energy-damage-burn-out-fall = Вы теряете сознание от сильной боли! - cp14-magic-spell-need-verbal-component = Вы не можете произнести заклинание вслух. cp14-magic-spell-need-somatic-component = Вам не хватает свободных рук. diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_consume.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_consume.yml index 93ff668929..a6e2274d92 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_consume.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_consume.yml @@ -41,7 +41,7 @@ id: CP14ActionSpellManaConsumeElf parent: CP14ActionSpellManaConsume name: Carefull mana consume - description: You absorb a small amount of mana from the target neatly and without loss. + description: You absorb mana at a tremendous rate without dealing damage to the mana holder. components: - type: CP14MagicEffect effects: @@ -49,7 +49,8 @@ spawns: - CP14ImpactEffectManaConsume - !type:CP14SpellConsumeManaEffect - mana: 10 + safe: true + mana: 20 lossMultiplier: 1 - type: entity