Magic Items (#370)

* attuning to items start

* verbs attuning, forgot oldest attuning

* Update CP14SharedMagicAttuningSystem.cs

* some fixes

* add deattuning

* fix popups on owner

* file restructurization

* MORE FOLDER RENAMING GODD

* magic via holding yea!

* fix deattuning

* vfx bugfixs

* wearing magic items

* Cure wounds spell

* refactor spells

* more redo

* finish refactor
This commit is contained in:
Ed
2024-08-01 11:52:27 +03:00
committed by GitHub
parent 19365c0314
commit 56da23925f
40 changed files with 787 additions and 396 deletions

View File

@@ -0,0 +1,62 @@
- type: entity
id: CP14ActionSpellCureWounds
name: Cure wounds
description: You touch the creature, healing its body from physical damage
components:
- type: CP14MagicEffect
manaCost: 10
effects:
- !type:CP14SpellSpawnEntity
spawns:
- CP14CureWoundsImpactEffect
- !type:CP14SpellApplyEntityEffect
effects:
- !type:HealthChange
damage:
types:
Slash: -8
Blunt: -8
Piercing: -8
Heat: -8
- !type:Jitter
- type: CP14MagicEffectVerbalAspect
startSpeech: "Et curabuntur..."
endSpeech: "vulnera tua"
- type: CP14MagicEffectSomaticAspect
- type: CP14MagicEffectCastingVisual
proto: CP14CureWoundsRune
- type: EntityTargetAction
useDelay: 5
itemIconStyle: BigAction
interactOnMiss: false
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: cure_wounds
event: !type:CP14DelayedEntityTargetActionEvent
delay: 2
- type: entity
id: CP14CureWoundsRune
noSpawn: true
parent: CP14BaseMagicRune
components:
- type: PointLight
color: "#328643"
- type: Sprite
layers:
- state: sun
color: "#79b330"
shader: unshaded
- type: entity
id: CP14CureWoundsImpactEffect
parent: CP14BaseMagicImpact
noSpawn: true
components:
- type: Sprite
layers:
- state: particles_up
color: "#79b330"
shader: unshaded

View File

@@ -1,153 +0,0 @@
- 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

View File

@@ -5,6 +5,7 @@
abstract: true
components:
- type: Sprite
noRot: true
drawDepth: FloorTiles
sprite: _CP14/Effects/Magic/cast_rune.rsi
- type: Tag
@@ -16,16 +17,19 @@
netsync: false
- type: entity
id: CP14FireballRune
parent: CP14BaseMagicRune
id: CP14BaseMagicImpact
name: magic impact
description: manifestation of magical energy in the physical plane
abstract: true
components:
- type: PointLight
color: "#d47d26"
- type: TimedDespawn
lifetime: 1.6
- type: AnimationPlayer
- type: EffectVisuals
- type: Tag
tags:
- HideContextMenu
- type: Sprite
layers:
- state: medium_circle
color: "#d47d26"
shader: unshaded
- state: sun
color: "#d47d26"
shader: unshaded
drawdepth: Effects
sprite: _CP14/Effects/Magic/cast_impact.rsi
noRot: true

View File

@@ -7,4 +7,11 @@
sprite: Objects/Specific/Hydroponics/seeds.rsi
state: seed
- type: CP14Seed
plantProto: CP14PlantWheat
plantProto: CP14PlantWheat
- type: CP14MagicAttuningItem
focusTime: 1
- type: CP14SpellStorageAccessHolding
- type: CP14SpellStorage
spells:
- CP14ActionSpellCureWounds
- type: CP14SpellStorageRequireAttune

View File

@@ -211,10 +211,12 @@
maxEnergy: 100
energy: 100
- type: CP14MagicEnergyDraw
energy: 5
delay: 5
energy: 1
delay: 6 # 10m to full restore
- type: CP14MagicUnsafeDamage
- type: CP14MagicUnsafeSleep
- type: CP14MagicAttuningMind
autoCopyToMind: true
- type: entity

View File

@@ -5,25 +5,25 @@
minPlayers: 0
stations:
Empty:
stationProto: StandardNanotrasenStation
stationProto: StandardStationArena
components:
- type: StationNameSetup
mapNameTemplate: "Empty"
- type: StationJobs
availableJobs:
CP14Adventurer: [ -1, -1 ] #CrystallPunk Dev replacement
CP14Adventurer: [ -1, -1 ]
- type: gameMap
id: Dev
mapName: Dev
mapPath: /Maps/_CP14/dev_map.yml #CrystallPunk Dev replacement
mapPath: /Maps/_CP14/dev_map.yml
minPlayers: 0
stations:
Dev:
stationProto: StandardNanotrasenStation
stationProto: StandardStationArena
components:
- type: StationNameSetup
mapNameTemplate: "Dev"
- type: StationJobs
availableJobs:
CP14Adventurer: [ -1, -1 ] #CrystallPunk Dev replacement
CP14Adventurer: [ -1, -1 ]