Magic spells backend (#358)
* add EntityEffect aability support * delayed actions * renaming * delayed projectile spells * spawn on self + entityEffect on self spells * spawn on point spell * rename * clean up base species components * magic alert * move magic energy to Shared, add manacost to spells * magic recoil * improve magic recoil * verbal aspect * somatic aspect * add simple vfx proto and sprites * add casting VFX * add TODO
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
id: BaseAlertOrder
|
||||
order:
|
||||
- category: Health
|
||||
- alertType: CP14MagicEnergy
|
||||
- category: Stamina
|
||||
- alertType: SuitPower
|
||||
- category: Internals
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
id: MobRespirator
|
||||
abstract: true
|
||||
components:
|
||||
- type: Internals
|
||||
#- type: Internals #CP14 dont need this
|
||||
- type: Respirator
|
||||
damage:
|
||||
types:
|
||||
|
||||
29
Resources/Prototypes/_CP14/Alerts/alerts.yml
Normal file
29
Resources/Prototypes/_CP14/Alerts/alerts.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
- type: alert
|
||||
id: CP14MagicEnergy
|
||||
icons:
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_0
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_1
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_2
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_3
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_4
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_5
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_6
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_7
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_8
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_9
|
||||
- sprite: /Textures/_CP14/Interface/Alerts/magic_energy.rsi
|
||||
state: mana_10
|
||||
name: cp14-alerts-magic-energy-name
|
||||
description: cp14-alerts-magic-energy-desc
|
||||
minSeverity: 0
|
||||
maxSeverity: 10
|
||||
153
Resources/Prototypes/_CP14/Entities/Actions/test_spell.yml
Normal file
153
Resources/Prototypes/_CP14/Entities/Actions/test_spell.yml
Normal file
@@ -0,0 +1,153 @@
|
||||
- type: entity
|
||||
id: CP14ActionSpellHealingWord
|
||||
name: Healing word
|
||||
description: bruh
|
||||
components:
|
||||
- type: CP14MagicEffect
|
||||
manaCost: 10
|
||||
- type: EntityTargetAction
|
||||
useDelay: 1
|
||||
itemIconStyle: BigAction
|
||||
interactOnMiss: true
|
||||
sound: !type:SoundPathSpecifier
|
||||
path: /Audio/Magic/rumble.ogg
|
||||
icon:
|
||||
sprite: Objects/Magic/magicactions.rsi
|
||||
state: gib
|
||||
event: !type:CP14DelayedEntityTargetActionEvent
|
||||
- type: CP14DelayedApplyEntityEffectsSpell
|
||||
effects:
|
||||
- !type:HealthChange
|
||||
damage:
|
||||
types:
|
||||
Slash: -5
|
||||
Blunt: -5
|
||||
Piercing: -5
|
||||
Heat: -10
|
||||
- !type:Jitter
|
||||
|
||||
- type: entity
|
||||
id: CP14ActionSpellFireball
|
||||
name: Fireball
|
||||
description: Fires an explosive fireball towards the clicked location.
|
||||
components:
|
||||
- type: CP14MagicEffect
|
||||
manaCost: 70
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
startSpeech: "O tenebrae, ubi lux non penetrat..."
|
||||
endSpeech: "Quaeso, quemdam inter vos quaero!"
|
||||
- type: CP14MagicEffectSomaticAspect
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14FireballRune
|
||||
- type: WorldTargetAction
|
||||
useDelay: 3
|
||||
itemIconStyle: BigAction
|
||||
checkCanAccess: false
|
||||
raiseOnUser: true
|
||||
range: 60
|
||||
sound: !type:SoundPathSpecifier
|
||||
path: /Audio/Magic/fireball.ogg
|
||||
icon:
|
||||
sprite: Objects/Magic/magicactions.rsi
|
||||
state: fireball
|
||||
event: !type:CP14DelayedWorldTargetActionEvent
|
||||
delay: 3
|
||||
- type: CP14DelayedProjectileSpell
|
||||
prototype: ProjectileFireball
|
||||
|
||||
- type: entity
|
||||
id: CP14ActionSpellSelfHeal
|
||||
name: Self Heal
|
||||
description: Toggles your suit's phase cloak. Beware that if you are hit, all abilities are disabled for 5 seconds, including your cloak!
|
||||
components:
|
||||
- type: InstantAction
|
||||
# have to plan (un)cloaking ahead of time
|
||||
useDelay: 5
|
||||
priority: -9
|
||||
event: !type:CP14DelayedInstantActionEvent
|
||||
- type: CP14DelayedSelfEntityEffectSpell
|
||||
effects:
|
||||
- !type:HealthChange
|
||||
damage:
|
||||
types:
|
||||
Slash: -5
|
||||
Blunt: -5
|
||||
Piercing: -5
|
||||
Heat: -10
|
||||
- !type:Jitter
|
||||
|
||||
- type: entity
|
||||
id: CP14ActionSpelldaggerSpawn
|
||||
name: Gravity well
|
||||
description: Toggles your suit's phase cloak. Beware that if you are hit, all abilities are disabled for 5 seconds, including your cloak!
|
||||
components:
|
||||
- type: CP14MagicEffect
|
||||
manaCost: 20
|
||||
- type: WorldTargetAction
|
||||
useDelay: 1
|
||||
itemIconStyle: BigAction
|
||||
checkCanAccess: false
|
||||
raiseOnUser: true
|
||||
range: 4
|
||||
sound: !type:SoundPathSpecifier
|
||||
path: /Audio/Magic/fireball.ogg
|
||||
icon:
|
||||
sprite: Objects/Magic/magicactions.rsi
|
||||
state: fireball
|
||||
event: !type:CP14DelayedWorldTargetActionEvent
|
||||
- type: CP14DelayedSpawnOnWorldTargetSpell
|
||||
spawns:
|
||||
- AdminInstantEffectGravityWell
|
||||
|
||||
- type: listing
|
||||
id: CP14SpellbookJutter
|
||||
name: jit
|
||||
description: jit
|
||||
productAction: CP14ActionSpellHealingWord
|
||||
cost:
|
||||
WizCoin: 1
|
||||
categories:
|
||||
- SpellbookOffensive
|
||||
conditions:
|
||||
- !type:ListingLimitedStockCondition
|
||||
stock: 1
|
||||
|
||||
|
||||
- type: listing
|
||||
id: CP14SpellbookFireball
|
||||
name: fifire
|
||||
description: fifire
|
||||
productAction: CP14ActionSpellFireball
|
||||
cost:
|
||||
WizCoin: 1
|
||||
categories:
|
||||
- SpellbookOffensive
|
||||
conditions:
|
||||
- !type:ListingLimitedStockCondition
|
||||
stock: 1
|
||||
|
||||
- type: listing
|
||||
id: CP14SpellbookFireball3
|
||||
name: selfheal
|
||||
description: selfheal
|
||||
productAction: CP14ActionSpellSelfHeal
|
||||
cost:
|
||||
WizCoin: 1
|
||||
categories:
|
||||
- SpellbookOffensive
|
||||
conditions:
|
||||
- !type:ListingLimitedStockCondition
|
||||
stock: 1
|
||||
|
||||
- type: listing
|
||||
id: CP14SpellbookFireball33
|
||||
name: Gravity Well
|
||||
description: well...
|
||||
productAction: CP14ActionSpelldaggerSpawn
|
||||
cost:
|
||||
WizCoin: 1
|
||||
categories:
|
||||
- SpellbookOffensive
|
||||
conditions:
|
||||
- !type:ListingLimitedStockCondition
|
||||
stock: 1
|
||||
31
Resources/Prototypes/_CP14/Entities/Effects/cast_vfx.yml
Normal file
31
Resources/Prototypes/_CP14/Entities/Effects/cast_vfx.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
- type: entity
|
||||
id: CP14BaseMagicRune
|
||||
name: magic rune
|
||||
description: manifestation of magical energy in the physical plane
|
||||
abstract: true
|
||||
components:
|
||||
- type: Sprite
|
||||
drawDepth: FloorTiles
|
||||
sprite: _CP14/Effects/Magic/cast_rune.rsi
|
||||
- type: Tag
|
||||
tags:
|
||||
- HideContextMenu
|
||||
- type: PointLight
|
||||
radius: 1.5
|
||||
energy: 2.5
|
||||
netsync: false
|
||||
|
||||
- type: entity
|
||||
id: CP14FireballRune
|
||||
parent: CP14BaseMagicRune
|
||||
components:
|
||||
- type: PointLight
|
||||
color: "#d47d26"
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: medium_circle
|
||||
color: "#d47d26"
|
||||
shader: unshaded
|
||||
- state: sun
|
||||
color: "#d47d26"
|
||||
shader: unshaded
|
||||
@@ -54,10 +54,6 @@
|
||||
sprite: Objects/Misc/handcuffs.rsi
|
||||
state: body-overlay-2
|
||||
visible: false
|
||||
- map: [ "clownedon" ] # Dynamically generated
|
||||
sprite: "Effects/creampie.rsi"
|
||||
state: "creampie_human"
|
||||
visible: false
|
||||
- type: DamageVisuals
|
||||
thresholds: [ 10, 20, 30, 50, 70, 100 ]
|
||||
targetLayers:
|
||||
@@ -144,9 +140,7 @@
|
||||
prototype: CP14Human
|
||||
requiredLegs: 2
|
||||
- type: Identity
|
||||
- type: IdExaminable
|
||||
- type: Hands
|
||||
- type: Internals
|
||||
- type: Inventory
|
||||
- type: InventorySlots
|
||||
- type: FloatingVisuals
|
||||
@@ -171,8 +165,6 @@
|
||||
- type: SleepEmitSound
|
||||
- type: SSDIndicator
|
||||
- type: StandingState
|
||||
- type: Fingerprint
|
||||
- type: Dna
|
||||
- type: MindContainer
|
||||
showExamineInfo: true
|
||||
- type: InteractionPopup
|
||||
@@ -180,11 +172,9 @@
|
||||
interactSuccessString: hugging-success-generic
|
||||
interactSuccessSound: /Audio/Effects/thudswoosh.ogg
|
||||
messagePerceivedByOthers: hugging-success-generic-others
|
||||
- type: CanHostGuardian
|
||||
- type: NpcFactionMember
|
||||
factions:
|
||||
- NanoTrasen
|
||||
- type: CreamPied
|
||||
- type: Stripping
|
||||
- type: Strippable
|
||||
- type: UserInterface
|
||||
@@ -215,9 +205,16 @@
|
||||
deathPenalty: 0.01 # However they really ought to be living and intact, otherwise they're worth 100x less.
|
||||
- type: Tag
|
||||
tags:
|
||||
- CanPilot
|
||||
- FootstepSound
|
||||
- DoorBumpOpener
|
||||
- type: CP14MagicEnergyContainer
|
||||
magicAlert: CP14MagicEnergy
|
||||
maxEnergy: 100
|
||||
energy: 100
|
||||
- type: CP14MagicEnergyDraw
|
||||
energy: 5
|
||||
delay: 5
|
||||
- type: CP14MagicUnsafeDamage
|
||||
- type: CP14MagicUnsafeSleep
|
||||
|
||||
|
||||
- type: entity
|
||||
@@ -342,10 +339,6 @@
|
||||
sprite: Objects/Misc/handcuffs.rsi
|
||||
state: body-overlay-2
|
||||
visible: false
|
||||
- map: [ "clownedon" ] # Dynamically generated
|
||||
sprite: "Effects/creampie.rsi"
|
||||
state: "creampie_human"
|
||||
visible: false
|
||||
- type: Appearance
|
||||
- type: HumanoidAppearance
|
||||
species: CP14Human
|
||||
|
||||
@@ -77,4 +77,3 @@
|
||||
32:
|
||||
sprite: _CP14/Mobs/Species/Human/displacement.rsi
|
||||
state: female_shirt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user