Simple resurrection spell (#575)

* resurrection spell

* Update spawners.yml
This commit is contained in:
Ed
2024-11-10 19:17:04 +03:00
committed by GitHub
parent 84e07c1ded
commit 6f0bb473d2
13 changed files with 144 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
using Content.Shared.EntityEffects;
using Content.Shared.Mind;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Systems;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellResurrectionEffect : CP14SpellEffect
{
[DataField(required: true, serverOnly: true)]
public List<EntityEffect> Effects = new();
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.Target is null)
return;
var targetEntity = args.Target.Value;
var mobState = entManager.System<MobStateSystem>();
if (mobState.IsDead(targetEntity))
mobState.ChangeMobState(targetEntity, MobState.Critical);
}
}

View File

@@ -6,6 +6,7 @@ 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-type-necro = Necromancy
cp14-magic-manacost = Manacost
cp14-magic-magic-type = Magic type

View File

@@ -6,6 +6,7 @@ cp14-magic-type-light-darkness = Свет и тьма
cp14-magic-type-meta = Метамагия
cp14-magic-type-gate = Пространство
cp14-magic-type-movement = Движение
cp14-magic-type-necro = Некромантия
cp14-magic-manacost = Затраты маны
cp14-magic-magic-type = Тип магии

View File

@@ -29,11 +29,10 @@
Cold: -10
Heat: -10
Shock: -10
Asphyxiation: -50
Bloodloss: -10
- !type:Jitter
- !type:ModifyBleedAmount
- !type:ModifyBloodLevel
amount: 5
- type: CP14MagicEffectVerbalAspect
startSpeech: "Et curabuntur..."
endSpeech: "vulnera tua"

View File

@@ -0,0 +1,91 @@
- type: entity
id: CP14ActionSpellResurrection
name: Resurrection
description: You're trying to put the soul back into the body.
components:
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.2
- type: CP14MagicEffect
magicType: Necromancy
manaCost: 100
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: -50
Bloodloss: -10
- !type:Jitter
- type: CP14MagicEffectVerbalAspect
startSpeech: "Redi animam meam..."
endSpeech: "Eu rezei por ti"
- type: CP14MagicEffectCastingVisual
proto: CP14RuneResurrection
- type: EntityTargetAction
whitelist:
components:
- MobState
range: 7
itemIconStyle: BigAction
interactOnMiss: false
canTargetSelf: false
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: resurrection
event: !type:CP14DelayedEntityTargetActionEvent
cooldown: 300
castDelay: 10
breakOnMove: true
- type: entity
id: CP14RuneResurrection
parent: CP14BaseMagicRune
categories: [ HideSpawnMenu ]
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 ]
components:
- type: Sprite
layers:
- state: wave_up
color: "#55877a"
shader: unshaded
- type: entity
parent: CP14BaseSpellScrollNecromancy
id: CP14SpellScrollResurrection
name: resurrection spell scroll
components:
- type: CP14SpellStorage
spells:
- CP14ActionSpellResurrection

View File

@@ -146,6 +146,18 @@
shader: unshaded
color: "#63ceff"
- type: entity
abstract: true
id: CP14BaseSpellScrollNecromancy
parent: CP14BaseSpellScroll
components:
- type: Sprite
layers:
- state: paper_filled
- state: magic
shader: unshaded
color: "#55877a"
- type: entity
abstract: true
id: CP14BaseSpellScrollWater

View File

@@ -89,6 +89,7 @@
- id: CP14ClothingRingManaGift
- id: CP14ClothingRingSphereOfLight
- id: CP14ClothingRingFlashLight
- id: CP14SpellScrollResurrection
- !type:GroupSelector
children:
- id: CP14ClothingCloakArmoredRed

View File

@@ -44,6 +44,7 @@
- type: CP14SpellStorage
spells:
- CP14ActionSpellCureWounds
- CP14ActionSpellResurrection
#- type: CP14MagicManacostModify
# modifiers:
# Healing: 1.1

View File

@@ -36,4 +36,9 @@
- type: magicType
id: Water
name: cp14-magic-type-water
color: "#1c94d9"
color: "#1c94d9"
- type: magicType
id: Necromancy
name: cp14-magic-type-necro
color: "#55877a"

View File

@@ -212,7 +212,7 @@
Medicine:
effects:
- !type:Emote
showInChat: true
showInChat: false
emote: Cough
probability: 0.3

View File

@@ -5,7 +5,7 @@
"y": 32
},
"license": "CLA",
"copyright": "Created by .kreks., mana_gift by TheShuEd",
"copyright": "Created by .kreks., mana_gift and resurrection by TheShuEd",
"states": [
{
"name": "cure_wounds"
@@ -31,6 +31,9 @@
{
"name": "mana_gift"
},
{
"name": "resurrection"
},
{
"name": "shadow_grab"
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B