Resurrection spell returns (#1642)

* resurrection

* resurrection

* loadout

* city portal spell scroll

* Update thaumaturgy.yml
This commit is contained in:
Red
2025-08-08 22:42:08 +03:00
committed by GitHub
parent 9ad759b56d
commit a808bf521c
14 changed files with 287 additions and 15 deletions

View File

@@ -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<INetManager>();
if (net.IsClient)
return;
var transform = entManager.System<SharedTransformSystem>();
var random = IoCManager.Resolve<IRobustRandom>();
var linkSys = entManager.System<LinkedEntitySystem>();
var query = entManager.EntityQueryEnumerator<CP14DemiplaneNavigationMapComponent, TransformComponent>();
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;
}
}
}

View File

@@ -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

View File

@@ -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

View File

@@ -108,4 +108,43 @@
sound:
path: /Audio/_CP14/Effects/ritual_end.ogg
params:
variation: 0.3
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

View File

@@ -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

View File

@@ -111,4 +111,37 @@
action: CP14ActionSpellCureWounds
restrictions:
- !type:NeedPrerequisite
prerequisite: HealingT2
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

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

View File

@@ -15,9 +15,6 @@
},
{
"name": "speed_music"
},
{
"name": "defib"
}
]
}

View File

@@ -27,6 +27,9 @@
},
{
"name": "plant_growth"
},
{
"name": "resurrection"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B