Make magical vision drain Mana (#1832)
* added generic Entity Effects status effect component * added Magic Vision Statuseffect component * renamed visionmask to Visibilitymask and added StatusEffectComponent notice comment * added two event listeners on MagicVisonStatusEffect applied and removed * moved changes to server side * moved Component serverside * removed Overlay Property * Added magic vison status effect prototype and applying * cleaned upnew lines * added new prototype * moved Magic vision status effect component to shared again * fixed applying mask * cleaned new lines * Moved to components folder * marked MagicVisionComponent obsolete and changed protoid name * Added parent MobStatusEffectBase * added mana cost to Magical vision spell * removed unneeded constructor * Added the system * added statuseffect eventlistners for applied and removed also removed old event listners * removed old magic vision component check * Removed Data field attribute * added back Data field attribute * added access atribute * moved Status effect update to server * removed shared System moved all to server side * Update Content.Shared/_CP14/StatusEffect/Components/CP14EntityEffectsStatusEffectComponent.cs Co-authored-by: Red <96445749+TheShuEd@users.noreply.github.com> * Fix typo in DataField attribute for Effects list * Obliterated CP14MagicVisionComponent from existence * Fix comment capitalization in CP14EntityEffectsStatusEffectComponent * Fix summary capitalization in CP14EntityEffectsStatusEffectComponent * Refactor CP14MagicVisionSystem.cs by removing blank lines Removed unnecessary blank lines for cleaner code. * Remove status effect event handlers Removed event subscription and related methods for status effects. * Remove empty line in OnExamined method * Added a Spell toggle status effect * fixed datfields shouldnt be static * imlpemented status applying in yml * cleaned white space :3 * changed toggle to has status effect * fix leftover * added check for firsttime predict so it doesnt get applied twice * added getvismaskevent to statuseffect relay * changed event lisnter to use CP14MagicVisionStatusEffectComponent to prevent future conflicts * removed unneeded _status property * added check for if its the last status effect on remove * added check if Status effect is already present if applied * changed check to component instead of entity * changed ent target to player.localEntity * fix: removed has effect check as it already has the effect when first apllied * changed event to on player attached * removed first time predicted check * changed cooldown to 0.5 seconds * made Spell mana change effect not save * added status efect applied event listner back and moved apply and remove overlay to separete methods * removed replaced action event * added fix to let nextupdate catch up to CurTime * fix: status effect not beeing removed when crit or dead * fix: Action beeing able to be used while dead * fix: added prediction check to applied back for double apply and remove bug --------- Co-authored-by: Red <96445749+TheShuEd@users.noreply.github.com>
This commit is contained in:
@@ -5,16 +5,20 @@
|
||||
description: You focus on magical flows to track recent events and scan the aura imprints of other living beings.
|
||||
components:
|
||||
- type: Action
|
||||
useDelay: 5
|
||||
useDelay: 0.5
|
||||
itemIconStyle: BigAction
|
||||
checkCanInteract: false
|
||||
checkConsciousness: true
|
||||
sound: !type:SoundPathSpecifier
|
||||
path: /Audio/Magic/rumble.ogg
|
||||
icon:
|
||||
sprite: _CP14/Actions/Spells/meta.rsi
|
||||
state: magic_vision
|
||||
- type: InstantAction
|
||||
event: !type:CP14MagicVisionToggleActionEvent
|
||||
event: !type:CP14InstantModularEffectEvent
|
||||
effects:
|
||||
- !type:CP14SpellToggleStatusEffect
|
||||
statusEffect: CP14MetaMagicVisionSpellStatusEffect
|
||||
|
||||
- type: entity
|
||||
id: CP14ManaVisionPointer
|
||||
@@ -51,4 +55,4 @@
|
||||
color: "#42a4f5"
|
||||
- type: Clickable
|
||||
- type: Visibility
|
||||
layer: 16 #magic vision only
|
||||
layer: 16 #magic vision only
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
- type: entity
|
||||
id: CP14MagicVisionStatusEffect
|
||||
parent: MobStatusEffectBase
|
||||
name: Magical vision
|
||||
components:
|
||||
- type: StatusEffect
|
||||
- type: CP14MagicVisionStatusEffect
|
||||
|
||||
- type: entity
|
||||
id: CP14MetaMagicVisionSpellStatusEffect
|
||||
parent: CP14MagicVisionStatusEffect
|
||||
name: Magical vision spell
|
||||
components:
|
||||
- type: CP14EntityEffectsStatusEffect
|
||||
effects:
|
||||
- !type:CP14ManaChange
|
||||
manaDelta: -5
|
||||
safe: false
|
||||
Reference in New Issue
Block a user