diff --git a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellTeleportToCity.cs b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellTeleportToCity.cs new file mode 100644 index 0000000000..80ae23842e --- /dev/null +++ b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellTeleportToCity.cs @@ -0,0 +1,40 @@ +using System.Numerics; +using Content.Shared._CP14.Demiplane.Components; +using Content.Shared.Teleportation.Systems; +using Robust.Shared.Network; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; + +namespace Content.Shared._CP14.MagicSpell.Spells; + +public sealed partial class CP14SpellTeleportToCity : CP14SpellEffect +{ + [DataField] + public EntProtoId PortalProto = "CP14TempPortalToCity"; + public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args) + { + if (args.Position is null) + return; + + var net = IoCManager.Resolve(); + + if (net.IsClient) + return; + + var transform = entManager.System(); + var random = IoCManager.Resolve(); + var linkSys = entManager.System(); + var query = entManager.EntityQueryEnumerator(); + + var first = entManager.SpawnAtPosition(PortalProto, args.Position.Value); + + while (query.MoveNext(out var uid, out var map, out var xform)) + { + var randomOffset = new Vector2(random.Next(-1, 1), random.Next(-1, 1)); + var second = entManager.SpawnAtPosition(PortalProto, xform.Coordinates.Offset(randomOffset)); + + linkSys.TryLink(first, second, true); + return; + } + } +} 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 new file mode 100644 index 0000000000..70f760eb42 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/portal_to_city.yml @@ -0,0 +1,40 @@ +- type: entity + id: CP14ActionSpellPortalToCity + parent: CP14ActionSpellBase + name: Portal to city + description: You open a portal leading to a city that will last for one minute. + components: + - type: CP14MagicEffectCastSlowdown + speedMultiplier: 0.5 + - type: CP14MagicEffectManaCost + manaCost: 20 + - type: CP14MagicEffect + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectShadowStep + effects: + - !type:CP14SpellTeleportToCity + - type: CP14MagicEffectCastingVisual + proto: CP14ImpactEffectShadowStep + - type: CP14MagicEffectSomaticAspect + - type: Action + icon: + sprite: _CP14/Actions/Spells/dimension.rsi + state: demi_arrow + - type: TargetAction + range: 7 + - type: WorldTargetAction + event: !type:CP14DelayedWorldTargetActionEvent + cooldown: 30 + castDelay: 3 + breakOnMove: true + +- type: entity + parent: CP14BaseSpellScrollDimension + id: CP14BaseSpellScrollPortalToCity + name: city portal spell scroll + components: + - type: CP14SpellStorage + spells: + - CP14ActionSpellPortalToCity diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/T1_shadow_grab.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml similarity index 100% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/T1_shadow_grab.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_grab.yml diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/T2_shadow_step.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml similarity index 100% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/T2_shadow_step.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_step.yml diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/T1_shadow_swap.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml similarity index 100% rename from Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/T1_shadow_swap.yml rename to Resources/Prototypes/_CP14/Entities/Actions/Spells/Dimension/shadow_swap.yml diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml new file mode 100644 index 0000000000..668eb13304 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Life/resurrection.yml @@ -0,0 +1,100 @@ +- type: entity + id: CP14ActionSpellResurrection + parent: CP14ActionSpellBase + name: Resurrection + description: You're trying to put the soul back into the body. + components: + - type: CP14MagicEffectCastSlowdown + speedMultiplier: 0.2 + - type: CP14MagicEffectManaCost + manaCost: 100 + - type: CP14MagicEffectTargetMobStatusRequired + allowedStates: + - Dead + - type: CP14MagicEffect + magicType: Life + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectResurrection + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectResurrection + - !type:CP14SpellResurrectionEffect + - !type:CP14SpellApplyEntityEffect + effects: + - !type:ChemVomit + probability: 0.25 + - !type:Emote + showInChat: false + emote: Cough + probability: 0.3 + - !type:HealthChange + damage: + types: + Asphyxiation: -500 + Bloodloss: -100 + - !type:Jitter + - type: CP14MagicEffectVerbalAspect + startSpeech: "Redi animam meam..." + endSpeech: "Eu rezei por ti" + - type: CP14MagicEffectCastingVisual + proto: CP14RuneResurrection + - type: Action + icon: + sprite: _CP14/Actions/Spells/healing.rsi + state: resurrection + - type: TargetAction + range: 7 + interactOnMiss: false + - type: EntityTargetAction + canTargetSelf: false + whitelist: + components: + - MobState + event: !type:CP14DelayedEntityTargetActionEvent + cooldown: 300 + castDelay: 10 + breakOnMove: true + +- type: entity + id: CP14RuneResurrection + parent: CP14BaseMagicRune + categories: [ HideSpawnMenu ] + save: false + components: + - type: PointLight + color: "#328643" + - type: Sprite + layers: + - state: sun + color: "#366357" + shader: unshaded + - state: medium_circle + color: "#55877a" + shader: unshaded + +- type: entity + id: CP14ImpactEffectResurrection + parent: CP14BaseMagicImpact + categories: [ HideSpawnMenu ] + save: false + components: + - type: Sprite + layers: + - state: wave_up + color: "#55877a" + shader: unshaded + +- type: entity + parent: CP14BaseSpellScrollHealing + id: CP14SpellScrollResurrection + name: resurrection spell scroll + components: + - type: CP14SpellStorage + spells: + - CP14ActionSpellResurrection + - type: StaticPrice + price: 17 + diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Demiplanes/rifts.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Demiplanes/rifts.yml index 87cdf8aff0..654d2b1258 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Demiplanes/rifts.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Demiplanes/rifts.yml @@ -108,4 +108,43 @@ sound: path: /Audio/_CP14/Effects/ritual_end.ogg params: - variation: 0.3 \ No newline at end of file + variation: 0.3 + +- type: entity + id: CP14TempPortalToCity + parent: BasePortal + categories: [ ForkFiltered ] + name: temporary rift + description: A temporary portal leading directly to the city. You have about a minute to use it before it closes. + components: + - type: Sprite + noRot: true + drawdepth: Effects + sprite: /Textures/_CP14/Structures/Dungeon/demiplan_rift.rsi + layers: + - state: pulse + shader: unshaded + color: "#a1d1ff" + - type: PointLight + enabled: true + color: "#a590de" + energy: 1 + radius: 5 + - type: AmbientSound + volume: -3 + range: 7 + sound: + path: /Audio/Ambience/Objects/gravity_gen_hum.ogg + - type: Portal + canTeleportToOtherMaps: true + - type: EmitSoundOnSpawn + sound: + path: /Audio/_CP14/Effects/ritual_end.ogg + params: + variation: 0.3 + - type: TimedDespawn + lifetime: 80 + - type: ConditionalSpawner + prototypes: + - CP14SkyLightningPurple + \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml b/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml index 5ec045ec1a..d0a112c174 100644 --- a/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml +++ b/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml @@ -714,6 +714,7 @@ - CP14FluteInstrument - CP14LuteInstrument - CP14LyraInstrument + - CP14SpellScrollResurrection - type: loadout id: CP14ManaOperationGlove @@ -805,6 +806,12 @@ back: - CP14FluteInstrument +- type: loadout + id: CP14SpellScrollResurrection + storage: + back: + - CP14SpellScrollResurrection + # Keys - type: loadoutGroup diff --git a/Resources/Prototypes/_CP14/Skill/Basic/healing.yml b/Resources/Prototypes/_CP14/Skill/Basic/healing.yml index 15bbc85a02..f53439ee07 100644 --- a/Resources/Prototypes/_CP14/Skill/Basic/healing.yml +++ b/Resources/Prototypes/_CP14/Skill/Basic/healing.yml @@ -111,4 +111,37 @@ action: CP14ActionSpellCureWounds restrictions: - !type:NeedPrerequisite - prerequisite: HealingT2 \ No newline at end of file + prerequisite: HealingT2 + +# 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: CP14ActionSpellResurrection +# skillUiPosition: 12, 4 +# tree: Healing +# icon: +# sprite: _CP14/Actions/Spells/healing.rsi +# state: resurrection +# effects: +# - !type:AddAction +# action: CP14ActionSpellResurrection +# restrictions: +# - !type:NeedPrerequisite +# prerequisite: HealingT3 diff --git a/Resources/Prototypes/_CP14/Trading/BuyPositions/thaumaturgy.yml b/Resources/Prototypes/_CP14/Trading/BuyPositions/thaumaturgy.yml index b7861bd2f9..17805abda0 100644 --- a/Resources/Prototypes/_CP14/Trading/BuyPositions/thaumaturgy.yml +++ b/Resources/Prototypes/_CP14/Trading/BuyPositions/thaumaturgy.yml @@ -11,16 +11,6 @@ service: !type:CP14BuyItemsService product: CP14EnergyCrystalMediumEmpty -- type: cp14TradingPosition - id: CP14BrassBar5 - faction: Thaumaturgy - uiPosition: 1 - icon: - sprite: _CP14/Objects/Materials/brass_bar.rsi - state: bar_2 - service: !type:CP14BuyItemsService - product: CP14BrassBar5 - - type: cp14TradingPosition id: CP14Paper faction: Thaumaturgy @@ -55,6 +45,18 @@ service: !type:CP14BuyItemsService product: CP14SpellScrollShadowGrab +- type: cp14TradingPosition + id: CP14BaseSpellScrollPortalToCity + faction: Thaumaturgy + priceMarkup: 1 + reputationLevel: 0 + uiPosition: 7 + icon: + sprite: _CP14/Actions/Spells/dimension.rsi + state: demi_arrow + service: !type:CP14BuyItemsService + product: CP14BaseSpellScrollPortalToCity + - type: cp14TradingPosition id: CP14SpellScrollFlameCreation faction: Thaumaturgy @@ -190,6 +192,17 @@ service: !type:CP14BuyItemsService product: CP14SpellScrollFlashLight +- type: cp14TradingPosition + id: CP14SpellScrollResurrection + faction: Thaumaturgy + reputationLevel: 1 + uiPosition: 13 + icon: + sprite: _CP14/Actions/Spells/healing.rsi + state: resurrection + service: !type:CP14BuyItemsService + product: CP14SpellScrollResurrection + - type: cp14TradingPosition id: CP14SpellScrollIceShards faction: Thaumaturgy diff --git a/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/defib.png b/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/defib.png deleted file mode 100644 index 9742f2eb75..0000000000 Binary files a/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/defib.png and /dev/null differ diff --git a/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/meta.json b/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/meta.json index 5b64746ebc..a5ee9b4feb 100644 --- a/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/meta.json +++ b/Resources/Textures/_CP14/Actions/Spells/electromancy.rsi/meta.json @@ -15,9 +15,6 @@ }, { "name": "speed_music" - }, - { - "name": "defib" } ] } diff --git a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/meta.json b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/meta.json index 3d3eb574d4..622dd995de 100644 --- a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/meta.json +++ b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/meta.json @@ -27,6 +27,9 @@ }, { "name": "plant_growth" + }, + { + "name": "resurrection" } ] } \ No newline at end of file diff --git a/Resources/Textures/_CP14/Actions/Spells/healing.rsi/resurrection.png b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/resurrection.png new file mode 100644 index 0000000000..aece08cdfe Binary files /dev/null and b/Resources/Textures/_CP14/Actions/Spells/healing.rsi/resurrection.png differ