Skip to content

Commit

Permalink
Simple resurrection spell (#575)
Browse files Browse the repository at this point in the history
* resurrection spell

* Update spawners.yml
  • Loading branch information
TheShuEd authored Nov 10, 2024
1 parent 84e07c1 commit 6f0bb47
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 5 deletions.
25 changes: 25 additions & 0 deletions Content.Shared/_CP14/MagicSpell/Spells/CP14SpellResurrection.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_CP14/magicTypes/magic.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/_CP14/magicTypes/magic.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = Тип магии
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions Resources/Prototypes/_CP14/Entities/Actions/Spells/scrolls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
- id: CP14ClothingRingManaGift
- id: CP14ClothingRingSphereOfLight
- id: CP14ClothingRingFlashLight
- id: CP14SpellScrollResurrection
- !type:GroupSelector
children:
- id: CP14ClothingCloakArmoredRed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- type: CP14SpellStorage
spells:
- CP14ActionSpellCureWounds
- CP14ActionSpellResurrection
#- type: CP14MagicManacostModify
# modifiers:
# Healing: 1.1
Expand Down
7 changes: 6 additions & 1 deletion Resources/Prototypes/_CP14/MagicTypes/magic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion Resources/Prototypes/_CP14/Reagents/basic-effects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
Medicine:
effects:
- !type:Emote
showInChat: true
showInChat: false
emote: Cough
probability: 0.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -31,6 +31,9 @@
{
"name": "mana_gift"
},
{
"name": "resurrection"
},
{
"name": "shadow_grab"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6f0bb47

Please sign in to comment.