Event Driven Broker working
This commit is contained in:
parent
f67c28fe96
commit
592a55cecc
8
Assets/--2025/Prefabs.meta
Normal file
8
Assets/--2025/Prefabs.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c66a065b0cc34174380bf1111aa72616
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/--2025/Prefabs/BrokerSubs.meta
Normal file
8
Assets/--2025/Prefabs/BrokerSubs.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6543c8250c403db4b8b8535b3d1be177
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
490
Assets/--2025/Prefabs/BrokerSubs/BrokerSubscribers.prefab
Normal file
490
Assets/--2025/Prefabs/BrokerSubs/BrokerSubscribers.prefab
Normal file
@ -0,0 +1,490 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &249077042724776013
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1695802727639733595}
|
||||
m_Layer: 0
|
||||
m_Name: BrokerSubscribers
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1695802727639733595
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 249077042724776013}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2853615639420944899}
|
||||
- {fileID: 1232807570145535296}
|
||||
- {fileID: 6120897361266337676}
|
||||
- {fileID: 1697226282428441736}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1733137101069889769
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5990858872549904705}
|
||||
- component: {fileID: 2494219991902293302}
|
||||
m_Layer: 0
|
||||
m_Name: DodgeInterceptor
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5990858872549904705
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1733137101069889769}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1232807570145535296}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2494219991902293302
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1733137101069889769}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8d39f28a2e6c02142bc8324864197f17, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::DodgeInterceptor
|
||||
--- !u!1 &2318014710392499544
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1232807570145535296}
|
||||
m_Layer: 0
|
||||
m_Name: Defensive
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1232807570145535296
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2318014710392499544}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6328867119063477148}
|
||||
- {fileID: 5990858872549904705}
|
||||
- {fileID: 6088225706018485977}
|
||||
- {fileID: 5849716072256962441}
|
||||
- {fileID: 8352337540601452143}
|
||||
m_Father: {fileID: 1695802727639733595}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2724019130660558827
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6328867119063477148}
|
||||
- component: {fileID: 5855006294068340926}
|
||||
m_Layer: 0
|
||||
m_Name: Invulnerability Interceptor
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6328867119063477148
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2724019130660558827}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1232807570145535296}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5855006294068340926
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2724019130660558827}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 70d74dc17186ed945a577a1128c5abcf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::InvulnerabilityInterceptor
|
||||
--- !u!1 &4243324413299554944
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6088225706018485977}
|
||||
- component: {fileID: 8776386938783335057}
|
||||
m_Layer: 0
|
||||
m_Name: BlockInterceptor
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6088225706018485977
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4243324413299554944}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1232807570145535296}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8776386938783335057
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4243324413299554944}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: de50151b619d6514ab411a712451bceb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::BlockInterceptor
|
||||
--- !u!1 &5545969874706421989
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3145042774550608289}
|
||||
- component: {fileID: 7287908039399585062}
|
||||
m_Layer: 0
|
||||
m_Name: OnProcInterceptor
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3145042774550608289
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5545969874706421989}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2853615639420944899}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7287908039399585062
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5545969874706421989}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 64dc3a191522d6a419b6c81e6124b294, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::OnProcInterceptor
|
||||
--- !u!1 &6223985906228516018
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 670601208020570842}
|
||||
- component: {fileID: 7962962154595671713}
|
||||
m_Layer: 0
|
||||
m_Name: Stat Amplification Calculator
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &670601208020570842
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6223985906228516018}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2853615639420944899}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7962962154595671713
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6223985906228516018}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7c7b2480158261a438df4665d65f6dad, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::DamageStatInfluenceCalculator
|
||||
--- !u!1 &6616939419038775985
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5849716072256962441}
|
||||
- component: {fileID: 7027586121535414508}
|
||||
m_Layer: 0
|
||||
m_Name: Stat Mitigation Calculator
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5849716072256962441
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6616939419038775985}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1232807570145535296}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7027586121535414508
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6616939419038775985}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1c1e936b3b0b3bb4ebb8f7712f4a9519, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::MitigationStatInfluenceCalculator
|
||||
--- !u!1 &6704403151289934996
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2853615639420944899}
|
||||
m_Layer: 0
|
||||
m_Name: Offensive
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2853615639420944899
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6704403151289934996}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 670601208020570842}
|
||||
- {fileID: 3145042774550608289}
|
||||
m_Father: {fileID: 1695802727639733595}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &8090521145083935055
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1697226282428441736}
|
||||
- component: {fileID: 8950652633152938477}
|
||||
m_Layer: 0
|
||||
m_Name: ScrollingText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1697226282428441736
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8090521145083935055}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1695802727639733595}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8950652633152938477
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8090521145083935055}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d2e114c4f93ba174094e346fbcc13b35, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::ScrollingTextInterceptor
|
||||
scrollingTextPrefab: {fileID: 677595231222924942, guid: abe5cfbb1d6d9454aa835afceb136dcf, type: 3}
|
||||
--- !u!1 &8129443511885267172
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6120897361266337676}
|
||||
- component: {fileID: 5941911214416994426}
|
||||
m_Layer: 0
|
||||
m_Name: debugger
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6120897361266337676
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8129443511885267172}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1695802727639733595}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5941911214416994426
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8129443511885267172}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c8f1bcfcc537b724790bed2579b95d27, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::DebugBroker
|
||||
--- !u!1 &8299296301867067610
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8352337540601452143}
|
||||
m_Layer: 0
|
||||
m_Name: AbsorbInterceptor
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8352337540601452143
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8299296301867067610}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1232807570145535296}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5af9cc65c5861e64389b48c310b2a507
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -78,7 +78,7 @@ Material:
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Rotation: 44.39648
|
||||
- _Rotation: 4.523739
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
|
||||
@ -181,6 +181,7 @@ Transform:
|
||||
- {fileID: 3432148482415062284}
|
||||
- {fileID: 3750971928869404957}
|
||||
- {fileID: 7838257382413254639}
|
||||
- {fileID: 3836317520712105059}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2278116590711127941
|
||||
@ -302,14 +303,12 @@ MonoBehaviour:
|
||||
onResourceChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
scrollingTextPrefab: {fileID: 677595231222924942, guid: abe5cfbb1d6d9454aa835afceb136dcf, type: 3}
|
||||
onMaxHealthChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
onDeath:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
invulnerable: 0
|
||||
OnInvulnerabilityStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@ -2719,6 +2718,68 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 4924407620164273521, guid: 2e56f69e0872f744daa6c9080ecf3040, type: 3}
|
||||
m_PrefabInstance: {fileID: 2278116590852655140}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &2501157974374623544
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 2278116590711127942}
|
||||
m_Modifications:
|
||||
- target: {fileID: 249077042724776013, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: BrokerSubscribers
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
--- !u!4 &3836317520712105059 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
m_PrefabInstance: {fileID: 2501157974374623544}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &2530550917352013872
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -210,6 +210,7 @@ GameObject:
|
||||
- component: {fileID: 1708233211970282804}
|
||||
- component: {fileID: 3548758441599693011}
|
||||
- component: {fileID: 1708233211970282803}
|
||||
- component: {fileID: 891689845601428566}
|
||||
- component: {fileID: 1708233211970282801}
|
||||
- component: {fileID: 1708233211970282802}
|
||||
- component: {fileID: 1708233211970282800}
|
||||
@ -260,6 +261,7 @@ Transform:
|
||||
- {fileID: 4934109709913625504}
|
||||
- {fileID: 5407316254601908039}
|
||||
- {fileID: 4530741588054097262}
|
||||
- {fileID: 7974138968714045337}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1040714684719195971
|
||||
@ -380,6 +382,18 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
targetTag:
|
||||
- {fileID: 11400000, guid: 3ac5bfbf7e1fbdd4baec1c17bd3d874c, type: 2}
|
||||
--- !u!114 &891689845601428566
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1040714684719195968}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 45e09b6617beed447a13265764139f69, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::EntityEventBroker
|
||||
--- !u!114 &1708233211970282801
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -402,14 +416,12 @@ MonoBehaviour:
|
||||
onResourceChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
scrollingTextPrefab: {fileID: 677595231222924942, guid: abe5cfbb1d6d9454aa835afceb136dcf, type: 3}
|
||||
onMaxHealthChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
onDeath:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
invulnerable: 0
|
||||
OnInvulnerabilityStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@ -12637,3 +12649,65 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4117085477522148337, guid: 71f8f31539e61b84bb2fa8ad6759aaae, type: 3}
|
||||
m_PrefabInstance: {fileID: 8225954557497083062}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &8728370511498064578
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1040714684719195969}
|
||||
m_Modifications:
|
||||
- target: {fileID: 249077042724776013, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: BrokerSubscribers
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
--- !u!4 &7974138968714045337 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
m_PrefabInstance: {fileID: 8728370511498064578}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@ -341,6 +341,7 @@ GameObject:
|
||||
- component: {fileID: 8509861251009166870}
|
||||
- component: {fileID: 4486792688999778717}
|
||||
- component: {fileID: 8867901703884003658}
|
||||
- component: {fileID: 7730173163958082525}
|
||||
- component: {fileID: 8273564744905798527}
|
||||
- component: {fileID: 9176951908243474339}
|
||||
- component: {fileID: 9115515025738910048}
|
||||
@ -406,6 +407,7 @@ Transform:
|
||||
- {fileID: 4176597637354617670}
|
||||
- {fileID: 5787010535312454557}
|
||||
- {fileID: 6063186782999826210}
|
||||
- {fileID: 7193893066637267766}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &489555198890004946
|
||||
@ -582,6 +584,18 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
targetTag:
|
||||
- {fileID: 11400000, guid: 9e6b298c2ce2856418b205442417a433, type: 2}
|
||||
--- !u!114 &7730173163958082525
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 480331571121010796}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 45e09b6617beed447a13265764139f69, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::EntityEventBroker
|
||||
--- !u!114 &8273564744905798527
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -658,14 +672,12 @@ MonoBehaviour:
|
||||
onResourceChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
scrollingTextPrefab: {fileID: 677595231222924942, guid: abe5cfbb1d6d9454aa835afceb136dcf, type: 3}
|
||||
onMaxHealthChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
onDeath:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
invulnerable: 0
|
||||
OnInvulnerabilityStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@ -5251,6 +5263,68 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 492420, guid: 3eb967bebaa6eb94ba9b9730e57ba98d, type: 3}
|
||||
m_PrefabInstance: {fileID: 7855196656215761319}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &8384968279408871021
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 8785094005405139760}
|
||||
m_Modifications:
|
||||
- target: {fileID: 249077042724776013, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: BrokerSubscribers
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
--- !u!4 &7193893066637267766 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 1695802727639733595, guid: 5af9cc65c5861e64389b48c310b2a507, type: 3}
|
||||
m_PrefabInstance: {fileID: 8384968279408871021}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &8519582500096383220
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -8,7 +8,7 @@ public class BaseEffect : ScriptableObject
|
||||
public List<GameTag> tags = new List<GameTag>();
|
||||
public List<StatInfluence> influencingStats = new List<StatInfluence>();
|
||||
|
||||
public virtual void ApplyEffect(Taggable user, List<Taggable> targets) { }
|
||||
public virtual void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source) { }
|
||||
|
||||
public virtual BaseEffect CreateRuntimeInstance()
|
||||
{
|
||||
|
||||
@ -7,7 +7,7 @@ public enum DamageType
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public enum DamageApplicationMethod
|
||||
public enum EffectApplicationMethod
|
||||
{
|
||||
Hit,
|
||||
Tick
|
||||
|
||||
@ -12,9 +12,9 @@ public class AbsorbEffect : StatusEffect
|
||||
|
||||
AbsorbEffectInstance targetAbsorbEffect;
|
||||
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets)
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(user, targets);
|
||||
base.ApplyEffect(user, targets, source);
|
||||
|
||||
if(applyToTargetsHit)
|
||||
{
|
||||
@ -23,14 +23,14 @@ public class AbsorbEffect : StatusEffect
|
||||
if (IsAlliedTarget(user, target))
|
||||
{
|
||||
targetAbsorbEffect = target.GetComponent<AbsorbEffectInstance>();
|
||||
targetAbsorbEffect.ApplyEffect(this, CalculateFinalAmount(user));
|
||||
targetAbsorbEffect.ApplyEffect(this, CalculateFinalAmount(user), source);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (applyToSelf)
|
||||
{
|
||||
targetAbsorbEffect = user.GetComponent<AbsorbEffectInstance>();
|
||||
targetAbsorbEffect.ApplyEffect(this, CalculateFinalAmount(user));
|
||||
targetAbsorbEffect.ApplyEffect(this, CalculateFinalAmount(user), source);
|
||||
//targetAbsorbEffect.owner.RPC(nameof(targetAbsorbEffect.RPC_ApplyAbsorbEffect), targetAbsorbEffect.owner.Owner, StatusEffectIndexer.Instance.StatusEffects.IndexOf(this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,9 +52,9 @@ public class AbsorbEffectInstance : StatusEffectInstance
|
||||
return highestAmount;
|
||||
}
|
||||
|
||||
public override void ApplyEffect(StatusEffect effect, float value)
|
||||
public override void ApplyEffect(StatusEffect effect, float value, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(effect, value);
|
||||
base.ApplyEffect(effect, value, source);
|
||||
}
|
||||
|
||||
protected override void AddStack(StatusEffect addedEffect, float value)
|
||||
|
||||
@ -14,9 +14,9 @@ public class DamageIncomeModifierEffect : StatusEffect
|
||||
|
||||
DamageIncomeModifierEffectInstance targetDamageIncomeModifierEffect;
|
||||
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets)
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(user, targets);
|
||||
base.ApplyEffect(user, targets, source);
|
||||
|
||||
if (applyToTargetsHit)
|
||||
{
|
||||
@ -27,13 +27,13 @@ public class DamageIncomeModifierEffect : StatusEffect
|
||||
if (user.AlliedTagsContains(target.targetTag)) continue;
|
||||
}
|
||||
targetDamageIncomeModifierEffect = target.GetComponent<DamageIncomeModifierEffectInstance>();
|
||||
targetDamageIncomeModifierEffect.ApplyEffect(this, CalculateFinalAmount(user));
|
||||
targetDamageIncomeModifierEffect.ApplyEffect(this, CalculateFinalAmount(user), source);
|
||||
}
|
||||
}
|
||||
if(applyToSelf)
|
||||
{
|
||||
targetDamageIncomeModifierEffect = user.GetComponent<DamageIncomeModifierEffectInstance>();
|
||||
targetDamageIncomeModifierEffect.ApplyEffect(this, CalculateFinalAmount(user));
|
||||
targetDamageIncomeModifierEffect.ApplyEffect(this, CalculateFinalAmount(user), source);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,9 +27,9 @@ public class DamageIncomeModifierEffectInstance : StatusEffectInstance
|
||||
return highestAmount;
|
||||
}
|
||||
|
||||
public override void ApplyEffect(StatusEffect effect, float value)
|
||||
public override void ApplyEffect(StatusEffect effect, float value, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(effect, value);
|
||||
base.ApplyEffect(effect, value, source);
|
||||
}
|
||||
|
||||
protected override void AddStack(StatusEffect addedEffect, float value)
|
||||
|
||||
@ -14,9 +14,9 @@ public class DamageOutputModifierEffect : StatusEffect
|
||||
|
||||
DamageOutputModifierEffectInstance targetDamageOutputModifierEffect;
|
||||
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets)
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(user, targets);
|
||||
base.ApplyEffect(user, targets, source);
|
||||
|
||||
if (applyToTargetsHit)
|
||||
{
|
||||
@ -27,13 +27,13 @@ public class DamageOutputModifierEffect : StatusEffect
|
||||
if (!user.AlliedTagsContains(target.targetTag)) continue;
|
||||
}
|
||||
targetDamageOutputModifierEffect = target.GetComponent<DamageOutputModifierEffectInstance>();
|
||||
targetDamageOutputModifierEffect.ApplyEffect(this, CalculateFinalAmount(user));
|
||||
targetDamageOutputModifierEffect.ApplyEffect(this, CalculateFinalAmount(user), source);
|
||||
}
|
||||
}
|
||||
if(applyToSelf)
|
||||
{
|
||||
targetDamageOutputModifierEffect = user.GetComponent<DamageOutputModifierEffectInstance>();
|
||||
targetDamageOutputModifierEffect.ApplyEffect(this, CalculateFinalAmount(user));
|
||||
targetDamageOutputModifierEffect.ApplyEffect(this, CalculateFinalAmount(user), source);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -28,9 +28,9 @@ public class DamageOutputModifierEffectInstance : StatusEffectInstance
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyEffect(StatusEffect effect, float value)
|
||||
public override void ApplyEffect(StatusEffect effect, float value, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(effect, value);
|
||||
base.ApplyEffect(effect, value, source);
|
||||
}
|
||||
|
||||
protected override void AddStack(StatusEffect addedEffect, float value)
|
||||
|
||||
@ -15,9 +15,9 @@ public class DamageOverTimeEffect : StatusEffect
|
||||
private CharacterStats stats;
|
||||
private DamageOutputModifierEffectInstance damageOutputModifier;
|
||||
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets)
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(user, targets);
|
||||
base.ApplyEffect(user, targets, source);
|
||||
|
||||
finalTickValue = CalculateFinalDamage(user);
|
||||
|
||||
@ -26,13 +26,13 @@ public class DamageOverTimeEffect : StatusEffect
|
||||
foreach (Taggable target in targets)
|
||||
{
|
||||
BaseDamageOverTimeEffectInstance dotInstance = GetOrAddCorrectInstance(target);
|
||||
dotInstance.ApplyEffect(this, finalTickValue);
|
||||
dotInstance.ApplyEffect(this, finalTickValue, source);
|
||||
}
|
||||
}
|
||||
if (applyToSelf)
|
||||
{
|
||||
BaseDamageOverTimeEffectInstance dotInstance = GetOrAddCorrectInstance(user);
|
||||
dotInstance.ApplyEffect(this, finalTickValue);
|
||||
dotInstance.ApplyEffect(this, finalTickValue, source);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -22,13 +22,17 @@ public class InstantValueEffect : BaseEffect
|
||||
ClassResource classResource;
|
||||
|
||||
private float finalValue;
|
||||
private EntityEventBroker userBroker;
|
||||
private CharacterStats stats;
|
||||
private DamageOutputModifierEffectInstance damageOutputModifier;
|
||||
private bool isCrit;
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets)
|
||||
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source)
|
||||
{
|
||||
if (user == null) return;
|
||||
|
||||
userBroker = user.GetComponent<EntityEventBroker>();
|
||||
|
||||
foreach (Taggable target in targets)
|
||||
{
|
||||
if (target == null) continue;
|
||||
@ -56,12 +60,72 @@ public class InstantValueEffect : BaseEffect
|
||||
{
|
||||
targetHealth = target.GetComponent<Health>();
|
||||
if (targetHealth != null)
|
||||
targetHealth.ChangeValue(GetCorrectValueSign(user, target), (int)damageType, isCrit);
|
||||
{
|
||||
ApplyEffect(user, target, source, targets.Count);
|
||||
//targetHealth.ChangeValue(GetCorrectValueSign(user, target), (int)damageType, isCrit);
|
||||
}
|
||||
//targetHealth.ChangeValue(target.targetTag == TargettingTag.Enemy ? -value : value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyEffect(Taggable user, Taggable target, BaseAbility source, int totalTargetsHit)
|
||||
{
|
||||
if (user == null)
|
||||
{
|
||||
Debug.LogError("ApplyEffect user is null");
|
||||
return;
|
||||
}
|
||||
if (target == null)
|
||||
{
|
||||
Debug.LogError("ApplyEffect target is null");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (user.AlliedTagsContains(target.targetTag))
|
||||
{
|
||||
HealArgs args = new HealArgs()
|
||||
{
|
||||
source = source,
|
||||
effect = this,
|
||||
user = user,
|
||||
target = target,
|
||||
currentValue = baseValue,
|
||||
isCrit = false,
|
||||
applicationMethod = EffectApplicationMethod.Hit,
|
||||
totalTargetsHit = totalTargetsHit
|
||||
};
|
||||
userBroker.OnOutgoingHeal.Invoke(args);
|
||||
|
||||
userBroker.OnOutgoingHealProcessed.Invoke(args);
|
||||
|
||||
targetHealth.ApplyHeal(args);
|
||||
}
|
||||
else
|
||||
{
|
||||
DamageArgs args = new DamageArgs()
|
||||
{
|
||||
source = source,
|
||||
effect = this,
|
||||
user = user,
|
||||
target = target,
|
||||
currentValue = -baseValue,
|
||||
isCrit = false,
|
||||
targetDead = false,
|
||||
applicationMethod = EffectApplicationMethod.Hit,
|
||||
totalTargetsHit = totalTargetsHit
|
||||
};
|
||||
|
||||
userBroker.OnOutgoingDamage.Invoke(args);
|
||||
|
||||
userBroker.OnOutgoingDamageProcessed.Invoke(args);
|
||||
|
||||
targetHealth.ApplyDamage(args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private float GetCorrectValueSign(Taggable user, Taggable target)
|
||||
{
|
||||
if (user == null) return 0;
|
||||
@ -75,14 +139,14 @@ public class InstantValueEffect : BaseEffect
|
||||
|
||||
|
||||
|
||||
if(user.AlliedTagsContains(target.targetTag))
|
||||
if (user.AlliedTagsContains(target.targetTag))
|
||||
{
|
||||
if (target.IsFriendlyNPC())
|
||||
if (target.IsFriendlyNPC())
|
||||
return (finalValue * FriendlyNPCTargetMultiplier);
|
||||
else
|
||||
return (finalValue * AlliedTargetMultiplier);
|
||||
}
|
||||
else
|
||||
else
|
||||
return (-finalValue * EnemyTargetMultiplier);
|
||||
}
|
||||
|
||||
|
||||
@ -11,9 +11,9 @@ public class MovementSpeedModifierEffect : StatusEffect
|
||||
|
||||
MovementSpeedModifierEffectInstance targetMovementSpeedModifierEffect;
|
||||
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets)
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(user, targets);
|
||||
base.ApplyEffect(user, targets, source);
|
||||
|
||||
if (applyToTargetsHit)
|
||||
{
|
||||
@ -22,14 +22,14 @@ public class MovementSpeedModifierEffect : StatusEffect
|
||||
//if (IsAlliedTarget(user, target))
|
||||
//{
|
||||
targetMovementSpeedModifierEffect = target.GetComponent<MovementSpeedModifierEffectInstance>();
|
||||
targetMovementSpeedModifierEffect.ApplyEffect(this, GetCorrectValueSign(user, target));
|
||||
targetMovementSpeedModifierEffect.ApplyEffect(this, GetCorrectValueSign(user, target), source);
|
||||
//}
|
||||
}
|
||||
}
|
||||
if (applyToSelf)
|
||||
{
|
||||
targetMovementSpeedModifierEffect = user.GetComponent<MovementSpeedModifierEffectInstance>();
|
||||
targetMovementSpeedModifierEffect.ApplyEffect(this, GetCorrectValueSign(user, user));
|
||||
targetMovementSpeedModifierEffect.ApplyEffect(this, GetCorrectValueSign(user, user), source);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -59,9 +59,9 @@ public class MovementSpeedModifierEffectInstance : StatusEffectInstance
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyEffect(StatusEffect effect, float value)
|
||||
public override void ApplyEffect(StatusEffect effect, float value, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(effect, value);
|
||||
base.ApplyEffect(effect, value, source);
|
||||
UpdateNavMeshAgentSpeed();
|
||||
}
|
||||
public void ToggleCastPenalty(bool isOn)
|
||||
|
||||
@ -9,7 +9,7 @@ public class OverTimeValueEffect : BaseEffect
|
||||
public float duration;
|
||||
public float tickRate;
|
||||
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets)
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source)
|
||||
{
|
||||
foreach (Taggable target in targets)
|
||||
{
|
||||
|
||||
@ -11,9 +11,9 @@ public class StatusEffect : BaseEffect
|
||||
[Header("Should be toggled only when you want to apply the effect ONLY to yourself")]
|
||||
public bool applyToSelf;
|
||||
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets)
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source)
|
||||
{
|
||||
base.ApplyEffect(user, targets);
|
||||
base.ApplyEffect(user, targets, source);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ public class StatusEffectInstance : MonoBehaviour
|
||||
taggable = GetComponentInParent<Taggable>();
|
||||
}
|
||||
|
||||
public virtual void ApplyEffect(StatusEffect effect, float value)
|
||||
public virtual void ApplyEffect(StatusEffect effect, float value, BaseAbility source)
|
||||
{
|
||||
if (CanAddStack())
|
||||
{
|
||||
|
||||
@ -9,7 +9,7 @@ public class TauntEffect : BaseEffect
|
||||
{
|
||||
BasicEnemyNPCController enemyNPCController;
|
||||
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets)
|
||||
public override void ApplyEffect(Taggable user, List<Taggable> targets, BaseAbility source)
|
||||
{
|
||||
foreach (Taggable target in targets)
|
||||
{
|
||||
|
||||
8
Assets/Scripts/EntityBroker.meta
Normal file
8
Assets/Scripts/EntityBroker.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c03ab3a39f232d45a604da2da1597d2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
13
Assets/Scripts/EntityBroker/AbsorbInterceptor.cs
Normal file
13
Assets/Scripts/EntityBroker/AbsorbInterceptor.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class AbsorbInterceptor : BrokerInterceptor
|
||||
{
|
||||
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
2
Assets/Scripts/EntityBroker/AbsorbInterceptor.cs.meta
Normal file
2
Assets/Scripts/EntityBroker/AbsorbInterceptor.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6de99a6f4bb244b4f98a4f762ad5c485
|
||||
@ -0,0 +1,54 @@
|
||||
using Kryz.CharacterStats;
|
||||
using Kryz.CharacterStats.Examples;
|
||||
using UnityEngine;
|
||||
|
||||
public class BasicStatAmplificationCalculator : BrokerInterceptor
|
||||
{
|
||||
float finalValue;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
broker.OnOutgoingDamage.Subscribe(CalculateDamageModsBasedOnStats, GameConstants.BrokerEventPriority.BasicStatAmplification);
|
||||
}
|
||||
|
||||
private void CalculateDamageModsBasedOnStats(DamageArgs args)
|
||||
{
|
||||
finalValue = args.currentValue;
|
||||
|
||||
if (stats == null)
|
||||
{
|
||||
Debug.LogError("character stat influence calculator: stats null");
|
||||
return;
|
||||
}
|
||||
foreach (var statInfluence in args.effect.influencingStats)
|
||||
{
|
||||
if (stats.primaryStatsDictionary.TryGetValue(statInfluence.statTag.name.ToLower(), out CharacterStat stat))
|
||||
{
|
||||
finalValue += stat.Value * statInfluence.percentInfluence;
|
||||
}
|
||||
else if (stats.secondaryStatsDictionary.TryGetValue(statInfluence.statTag.name.ToLower(), out CharacterStat secondaryStat))
|
||||
{
|
||||
finalValue += secondaryStat.Value * statInfluence.percentInfluence;
|
||||
}
|
||||
if (statInfluence.statTag.name.ToLower().Contains("Attack")) args.damageType = DamageType.Attack;
|
||||
else if (statInfluence.statTag.name.ToLower().Contains("Spell")) args.damageType = DamageType.Spell;
|
||||
}
|
||||
if (IsCrit(stats))
|
||||
{
|
||||
finalValue *= (1 + stats.GetStat("critdamage").Value / 100f);
|
||||
args.isCrit = true;
|
||||
}
|
||||
else
|
||||
args.isCrit = false;
|
||||
|
||||
args.currentValue = finalValue;
|
||||
}
|
||||
|
||||
private bool IsCrit(CharacterStats stats)
|
||||
{
|
||||
return MathHelpers.RollChancePercent(stats.GetStat("critchance").Value);
|
||||
//return Random.Range(0, 100) < stats.CritChance.Value;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c7b2480158261a438df4665d65f6dad
|
||||
46
Assets/Scripts/EntityBroker/BasicStatMitigationCalculator.cs
Normal file
46
Assets/Scripts/EntityBroker/BasicStatMitigationCalculator.cs
Normal file
@ -0,0 +1,46 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class BasicStatMitigationCalculator : BrokerInterceptor
|
||||
{
|
||||
float percentStatMitigation;
|
||||
float reducedDamage;
|
||||
float finalValue;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
broker.OnIncomingDamage.Subscribe(HandleStatMitigation, GameConstants.BrokerEventPriority.BasicStatMitigation);
|
||||
}
|
||||
|
||||
private void HandleStatMitigation(DamageArgs args)
|
||||
{
|
||||
if (args.currentValue >= 0) return;
|
||||
|
||||
finalValue = args.currentValue;
|
||||
|
||||
switch (args.damageType)
|
||||
{
|
||||
case DamageType.Attack:
|
||||
default:
|
||||
{
|
||||
percentStatMitigation = Mathf.Clamp((stats.GetStat("armor").Value * GameConstants.CharacterStatsBalancing.PercentArmorIntoDamageReduction), 0, GameConstants.CharacterStatsBalancing.MaximumPercentDamageReductionFromArmor);
|
||||
}
|
||||
break;
|
||||
case DamageType.Spell:
|
||||
{
|
||||
percentStatMitigation = Mathf.Clamp((stats.GetStat("magicresistance").Value * GameConstants.CharacterStatsBalancing.PercentMagicResistanceIntoDamageReduction), 0, GameConstants.CharacterStatsBalancing.MaximumPercentDamageReductionFromMagicResistance);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
reducedDamage = args.currentValue * percentStatMitigation;
|
||||
finalValue += Mathf.Abs(reducedDamage);
|
||||
//Debug.Log(gameObject.name + " receiving dmg = " + incomingValue + $" after mitigations from {(dmgType == DamageType.Attack ? nameof(character.Armor) : nameof(character.MagicResistance))}");
|
||||
|
||||
if (finalValue > 0) //avoid damage ultra mitigated turning into healing
|
||||
finalValue = 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c1e936b3b0b3bb4ebb8f7712f4a9519
|
||||
55
Assets/Scripts/EntityBroker/BlockInterceptor.cs
Normal file
55
Assets/Scripts/EntityBroker/BlockInterceptor.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using Kryz.CharacterStats.Examples;
|
||||
using UnityEngine;
|
||||
|
||||
public class BlockInterceptor : BrokerInterceptor
|
||||
{
|
||||
float percentStatMitigation;
|
||||
float finalValue;
|
||||
float reducedDamage;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
broker.OnIncomingDamage.Subscribe(HandleBlockMitigation, GameConstants.BrokerEventPriority.Block);
|
||||
}
|
||||
|
||||
|
||||
protected void HandleBlockMitigation(DamageArgs args)
|
||||
{
|
||||
if (args.currentValue >= 0) return;
|
||||
|
||||
BlockArgs blockArgs = new BlockArgs()
|
||||
{
|
||||
user = user,
|
||||
blockedSuccessfully = false
|
||||
};
|
||||
|
||||
if(HasBlocked())
|
||||
{
|
||||
Debug.Log("Blocked!");
|
||||
|
||||
percentStatMitigation = MathHelpers.NormalizePercentageDecimal(stats.GetStat("blockeffectiveness").Value);
|
||||
|
||||
percentStatMitigation = Mathf.Clamp(percentStatMitigation, 0, GameConstants.CharacterStatsBalancing.MaximumPercentDamageReductionFromBlock);
|
||||
|
||||
reducedDamage = args.currentValue * percentStatMitigation;
|
||||
finalValue += Mathf.Abs(reducedDamage);
|
||||
|
||||
if (finalValue > 0) //avoid damage ultra mitigated turning into healing
|
||||
finalValue = 0;
|
||||
|
||||
blockArgs.blockedSuccessfully = true;
|
||||
|
||||
args.currentValue = finalValue;
|
||||
}
|
||||
|
||||
broker.OnBlock.Invoke(blockArgs);
|
||||
}
|
||||
|
||||
|
||||
protected bool HasBlocked()
|
||||
{
|
||||
return MathHelpers.RollChancePercent(stats.GetStat("blockchance").Value);
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/EntityBroker/BlockInterceptor.cs.meta
Normal file
2
Assets/Scripts/EntityBroker/BlockInterceptor.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de50151b619d6514ab411a712451bceb
|
||||
17
Assets/Scripts/EntityBroker/BrokerInterceptor.cs
Normal file
17
Assets/Scripts/EntityBroker/BrokerInterceptor.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Kryz.CharacterStats.Examples;
|
||||
using UnityEngine;
|
||||
|
||||
public class BrokerInterceptor : MonoBehaviour
|
||||
{
|
||||
protected EntityEventBroker broker;
|
||||
protected CharacterStats stats;
|
||||
protected Taggable user;
|
||||
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
user = GetComponentInParent<Taggable>();
|
||||
broker = GetComponentInParent<EntityEventBroker>();
|
||||
stats = GetComponentInParent<CharacterStats>();
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/EntityBroker/BrokerInterceptor.cs.meta
Normal file
2
Assets/Scripts/EntityBroker/BrokerInterceptor.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5dd87999338696648828a2b8640e8d5b
|
||||
23
Assets/Scripts/EntityBroker/DebugBroker.cs
Normal file
23
Assets/Scripts/EntityBroker/DebugBroker.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class DebugBroker : MonoBehaviour
|
||||
{
|
||||
EntityEventBroker broker;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
broker = GetComponentInParent<EntityEventBroker>();
|
||||
|
||||
broker.OnIncomingDamage.Subscribe((x) => DebugDamageArgs("dealing damage to", x));
|
||||
broker.OnIncomingDamageProcessed.Subscribe((x) => DebugDamageArgs("dealing damage to", x));
|
||||
|
||||
broker.OnOutgoingDamage.Subscribe((x) => DebugDamageArgs("dealing damage to", x));
|
||||
broker.OnOutgoingDamageProcessed.Subscribe((x) => DebugDamageArgs("dealing damage to", x));
|
||||
}
|
||||
|
||||
|
||||
private void DebugDamageArgs(string prefix, DamageArgs args)
|
||||
{
|
||||
Debug.Log($"Broker Debugger: {args.user}'s {args.effect.name} {prefix}: {args.target} => {args.currentValue}, isCrit? {args.isCrit}, dmgType={args.damageType}, targets hit total ={args.totalTargetsHit}");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/EntityBroker/DebugBroker.cs.meta
Normal file
2
Assets/Scripts/EntityBroker/DebugBroker.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8f1bcfcc537b724790bed2579b95d27
|
||||
38
Assets/Scripts/EntityBroker/DodgeInterceptor.cs
Normal file
38
Assets/Scripts/EntityBroker/DodgeInterceptor.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using Kryz.CharacterStats.Examples;
|
||||
using UnityEngine;
|
||||
|
||||
public class DodgeInterceptor : BrokerInterceptor
|
||||
{
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
broker.OnIncomingDamage.Subscribe(HandleDodge, GameConstants.BrokerEventPriority.Dodge);
|
||||
}
|
||||
|
||||
private void HandleDodge(DamageArgs args)
|
||||
{
|
||||
DodgeArgs dodgeArgs = new DodgeArgs()
|
||||
{
|
||||
user = user,
|
||||
dodgedSuccessfully = false
|
||||
};
|
||||
|
||||
if (HasDodged())
|
||||
{
|
||||
Debug.Log("Dodged!");
|
||||
|
||||
|
||||
dodgeArgs.dodgedSuccessfully = true;
|
||||
|
||||
args.currentValue = 0f;
|
||||
}
|
||||
|
||||
broker.OnDodge.Invoke(dodgeArgs);
|
||||
}
|
||||
|
||||
protected bool HasDodged()
|
||||
{
|
||||
return MathHelpers.RollChancePercent(stats.GetStat("dodgechance").Value);
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/EntityBroker/DodgeInterceptor.cs.meta
Normal file
2
Assets/Scripts/EntityBroker/DodgeInterceptor.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d39f28a2e6c02142bc8324864197f17
|
||||
33
Assets/Scripts/EntityBroker/InvulnerabilityInterceptor.cs
Normal file
33
Assets/Scripts/EntityBroker/InvulnerabilityInterceptor.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class InvulnerabilityInterceptor : BrokerInterceptor
|
||||
{
|
||||
Health health;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
health = GetComponentInParent<Health>();
|
||||
|
||||
broker.OnIncomingDamage.Subscribe(HandleInvulnerability, GameConstants.BrokerEventPriority.Invulnerability);
|
||||
}
|
||||
|
||||
|
||||
private void HandleInvulnerability(DamageArgs args)
|
||||
{
|
||||
InvulnerabilityArgs invulnerabilityArgs = new InvulnerabilityArgs()
|
||||
{
|
||||
user = user,
|
||||
isImmune = false
|
||||
};
|
||||
|
||||
if(health.Invulnerable)
|
||||
{
|
||||
args.currentValue = 0;
|
||||
invulnerabilityArgs.isImmune = true;
|
||||
}
|
||||
|
||||
broker.OnInvulnerable.Invoke(invulnerabilityArgs);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70d74dc17186ed945a577a1128c5abcf
|
||||
30
Assets/Scripts/EntityBroker/OnProcInterceptor.cs
Normal file
30
Assets/Scripts/EntityBroker/OnProcInterceptor.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class OnProcInterceptor : BrokerInterceptor
|
||||
{
|
||||
EntityEventBroker sourceBroker;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
broker.OnIncomingDamageProcessed.Subscribe(HandlePossibleProcs, GameConstants.BrokerEventPriority.Procs);
|
||||
}
|
||||
|
||||
private void HandlePossibleProcs(DamageArgs args)
|
||||
{
|
||||
if (args.currentValue <= 0) return;
|
||||
|
||||
sourceBroker = args.user.GetComponent<EntityEventBroker>();
|
||||
|
||||
if (args.isCrit)
|
||||
sourceBroker.OnCrit.Invoke(args);
|
||||
else if (args.applicationMethod == EffectApplicationMethod.Hit)
|
||||
sourceBroker.OnHit.Invoke(args);
|
||||
else
|
||||
sourceBroker.OnTick.Invoke(args);
|
||||
|
||||
if (args.targetDead)
|
||||
sourceBroker.OnKill.Invoke(args);
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/EntityBroker/OnProcInterceptor.cs.meta
Normal file
2
Assets/Scripts/EntityBroker/OnProcInterceptor.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64dc3a191522d6a419b6c81e6124b294
|
||||
78
Assets/Scripts/EntityBroker/ScrollingTextInterceptor.cs
Normal file
78
Assets/Scripts/EntityBroker/ScrollingTextInterceptor.cs
Normal file
@ -0,0 +1,78 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class ScrollingTextInterceptor : BrokerInterceptor
|
||||
{
|
||||
public ScrollingText scrollingTextPrefab;
|
||||
protected ScrollingText scrollingText;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
broker.OnInvulnerable.Subscribe(OnInvulnerable);
|
||||
broker.OnDodge.Subscribe(OnDodge);
|
||||
broker.OnBlock.Subscribe(OnBlock);
|
||||
broker.OnIncomingDamageProcessed.Subscribe(OnDamage);
|
||||
broker.OnIncomingHealProcessed.Subscribe(OnHeal);
|
||||
}
|
||||
|
||||
private void OnInvulnerable(InvulnerabilityArgs args)
|
||||
{
|
||||
if (!args.isImmune) return;
|
||||
|
||||
if (scrollingTextPrefab != null)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
scrollingText.Show("Invulnerable", Color.gray, 1.5f);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDodge(DodgeArgs args)
|
||||
{
|
||||
if (!args.dodgedSuccessfully) return;
|
||||
|
||||
|
||||
if (scrollingTextPrefab != null)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
scrollingText.ShowDodge("Dodge!");
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBlock(BlockArgs args)
|
||||
{
|
||||
if (!args.blockedSuccessfully) return;
|
||||
|
||||
if (scrollingTextPrefab != null)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
scrollingText.ShowBlock("Blocked!");
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDamage(DamageArgs args)
|
||||
{
|
||||
if (scrollingTextPrefab != null && args.currentValue < 0)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
if (args.isCrit)
|
||||
scrollingText.ShowCrit(args.currentValue.ToString("0.0"));
|
||||
else
|
||||
scrollingText.ShowHit(args.currentValue.ToString("0.0"));
|
||||
|
||||
}
|
||||
}
|
||||
private void OnHeal(HealArgs args)
|
||||
{
|
||||
if (scrollingTextPrefab != null && args.currentValue > 0)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
scrollingText.ShowHeal(args.currentValue.ToString("0.0"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2e114c4f93ba174094e346fbcc13b35
|
||||
@ -5,9 +5,26 @@ using UnityEngine.Events;
|
||||
|
||||
public class EntityEventBroker : MonoBehaviour
|
||||
{
|
||||
public OrderedEvent<HealArgs> OnOutgoingHeal = new OrderedEvent<HealArgs>();
|
||||
public OrderedEvent<HealArgs> OnOutgoingHealProcessed = new OrderedEvent<HealArgs>();
|
||||
|
||||
public OrderedEvent<HealArgs> OnIncomingHeal = new OrderedEvent<HealArgs>();
|
||||
public OrderedEvent<HealArgs> OnIncomingHealProcessed = new OrderedEvent<HealArgs>();
|
||||
|
||||
public OrderedEvent<DamageArgs> OnOutgoingDamage = new OrderedEvent<DamageArgs>();
|
||||
public OrderedEvent<DamageArgs> OnOutgoingDamageProcessed = new OrderedEvent<DamageArgs>();
|
||||
|
||||
public OrderedEvent<DamageArgs> OnHit = new OrderedEvent<DamageArgs>();
|
||||
public OrderedEvent<DamageArgs> OnTick = new OrderedEvent<DamageArgs>();
|
||||
public OrderedEvent<DamageArgs> OnCrit = new OrderedEvent<DamageArgs>();
|
||||
public OrderedEvent<DamageArgs> OnKill = new OrderedEvent<DamageArgs>();
|
||||
|
||||
public OrderedEvent<DamageArgs> OnIncomingDamage = new OrderedEvent<DamageArgs>();
|
||||
public OrderedEvent<DamageArgs> OnIncomingDamageProcessed = new OrderedEvent<DamageArgs>();
|
||||
|
||||
public OrderedEvent<InvulnerabilityArgs> OnInvulnerable = new OrderedEvent<InvulnerabilityArgs>();
|
||||
public OrderedEvent<DodgeArgs> OnDodge = new OrderedEvent<DodgeArgs>();
|
||||
public OrderedEvent<BlockArgs> OnBlock = new OrderedEvent<BlockArgs>();
|
||||
}
|
||||
|
||||
|
||||
@ -44,6 +61,8 @@ public class OrderedEvent<T>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//Example usage:
|
||||
|
||||
/*public class FireHelmetEffect : MonoBehaviour
|
||||
|
||||
@ -5,10 +5,44 @@ using UnityEngine.Events;
|
||||
|
||||
public class DamageArgs
|
||||
{
|
||||
public BaseAbility source;
|
||||
public BaseEffect effect;
|
||||
public Taggable user;
|
||||
public List<Taggable> targets;
|
||||
public Taggable target;
|
||||
public float currentValue;
|
||||
public DamageType damageType;
|
||||
public DamageApplicationMethod applicationMethod;
|
||||
public EffectApplicationMethod applicationMethod;
|
||||
public bool isCrit;
|
||||
public int totalTargetsHit;
|
||||
public bool targetDead;
|
||||
}
|
||||
|
||||
public class HealArgs
|
||||
{
|
||||
public BaseAbility source;
|
||||
public BaseEffect effect;
|
||||
public Taggable user;
|
||||
public Taggable target;
|
||||
public float currentValue;
|
||||
public EffectApplicationMethod applicationMethod;
|
||||
public bool isCrit;
|
||||
public int totalTargetsHit;
|
||||
}
|
||||
|
||||
public class InvulnerabilityArgs
|
||||
{
|
||||
public Taggable user;
|
||||
public bool isImmune;
|
||||
}
|
||||
|
||||
public class DodgeArgs
|
||||
{
|
||||
public Taggable user;
|
||||
public bool dodgedSuccessfully;
|
||||
}
|
||||
|
||||
public class BlockArgs
|
||||
{
|
||||
public Taggable user;
|
||||
public bool blockedSuccessfully;
|
||||
}
|
||||
@ -81,6 +81,23 @@ public static class GameConstants
|
||||
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public static class BrokerEventPriority
|
||||
{
|
||||
public const int BasicStatAmplification = 0;
|
||||
public const int PassiveEffects = 5;
|
||||
public const int TemporaryAmplificationMods = 10;
|
||||
|
||||
|
||||
public const int Invulnerability = 0;
|
||||
public const int Dodge = 2;
|
||||
public const int Block = 3;
|
||||
public const int BasicStatMitigation = 5;
|
||||
public const int TemporaryMitigationMods = 10;
|
||||
public const int Absorb = 15;
|
||||
public const int Procs = 30;
|
||||
}
|
||||
|
||||
public static class Input
|
||||
{
|
||||
// Movement
|
||||
|
||||
@ -7,9 +7,7 @@ using UnityEngine.Events;
|
||||
public class Health : Resource
|
||||
{
|
||||
protected CharacterStats character;
|
||||
|
||||
public ScrollingText scrollingTextPrefab;
|
||||
protected ScrollingText scrollingText;
|
||||
protected EntityEventBroker broker;
|
||||
|
||||
protected AbsorbEffectInstance absorbEffectInstance;
|
||||
protected DamageIncomeModifierEffectInstance damageIncomeModifierEffectInstance;
|
||||
@ -20,7 +18,7 @@ public class Health : Resource
|
||||
private bool noCost = false;
|
||||
public bool NoCost => noCost;
|
||||
|
||||
public bool invulnerable = false;
|
||||
protected bool invulnerable = false;
|
||||
public bool Invulnerable => invulnerable;
|
||||
|
||||
float incomingValue;
|
||||
@ -40,6 +38,7 @@ public class Health : Resource
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
broker = GetComponent<EntityEventBroker>();
|
||||
character = GetComponent<CharacterStats>();
|
||||
absorbEffectInstance = GetComponent<AbsorbEffectInstance>();
|
||||
damageIncomeModifierEffectInstance = GetComponent<DamageIncomeModifierEffectInstance>();
|
||||
@ -90,70 +89,6 @@ public class Health : Resource
|
||||
}
|
||||
}
|
||||
|
||||
protected bool HasDodged()
|
||||
{
|
||||
return MathHelpers.RollChancePercent(character.GetStat("dodgechance").Value);
|
||||
}
|
||||
protected bool HasBlocked()
|
||||
{
|
||||
return MathHelpers.RollChancePercent(character.GetStat("blockchance").Value);
|
||||
}
|
||||
|
||||
protected void HandleBlockMitigation()
|
||||
{
|
||||
if (incomingValue >= 0) return;
|
||||
|
||||
Debug.Log("Blocked!");
|
||||
|
||||
if (scrollingTextPrefab != null)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
scrollingText.ShowBlock("Blocked!");
|
||||
}
|
||||
|
||||
percentStatMitigation = MathHelpers.NormalizePercentageDecimal(character.GetStat("blockeffectiveness").Value);
|
||||
|
||||
percentStatMitigation = Mathf.Clamp(percentStatMitigation, 0, GameConstants.CharacterStatsBalancing.MaximumPercentDamageReductionFromBlock);
|
||||
|
||||
reducedDamage = incomingValue * percentStatMitigation;
|
||||
incomingValue += Mathf.Abs(reducedDamage);
|
||||
|
||||
if (incomingValue > 0) //avoid damage ultra mitigated turning into healing
|
||||
incomingValue = 0;
|
||||
|
||||
}
|
||||
|
||||
protected void HandleStatMitigation(DamageType dmgType)
|
||||
{
|
||||
if (incomingValue < 0)
|
||||
{
|
||||
switch (dmgType)
|
||||
{
|
||||
case DamageType.Attack:
|
||||
default:
|
||||
{
|
||||
percentStatMitigation = Mathf.Clamp((character.GetStat("armor").Value * GameConstants.CharacterStatsBalancing.PercentArmorIntoDamageReduction), 0,GameConstants.CharacterStatsBalancing.MaximumPercentDamageReductionFromArmor);
|
||||
}
|
||||
break;
|
||||
case DamageType.Spell:
|
||||
{
|
||||
percentStatMitigation = Mathf.Clamp((character.GetStat("magicresistance").Value * GameConstants.CharacterStatsBalancing.PercentMagicResistanceIntoDamageReduction), 0, GameConstants.CharacterStatsBalancing.MaximumPercentDamageReductionFromMagicResistance);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//Debug.Log(gameObject.name + " mitigating = " + percentStatMitigation + " percent");
|
||||
reducedDamage = incomingValue * percentStatMitigation;
|
||||
incomingValue += Mathf.Abs(reducedDamage);
|
||||
//Debug.Log(gameObject.name + " receiving dmg = " + incomingValue + $" after mitigations from {(dmgType == DamageType.Attack ? nameof(character.Armor) : nameof(character.MagicResistance))}");
|
||||
|
||||
if (incomingValue > 0) //avoid damage ultra mitigated turning into healing
|
||||
incomingValue = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected void HandleAbsorbEffects()
|
||||
{
|
||||
if (incomingValue < 0)
|
||||
@ -171,7 +106,48 @@ public class Health : Resource
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void ApplyDamage(DamageArgs args)
|
||||
{
|
||||
if (isDead) return;
|
||||
|
||||
broker.OnIncomingDamage.Invoke(args);
|
||||
|
||||
UpdateValue(args.currentValue);
|
||||
|
||||
CheckForDeath(args);
|
||||
|
||||
broker.OnIncomingDamageProcessed.Invoke(args);
|
||||
}
|
||||
public void ApplyHeal(HealArgs args)
|
||||
{
|
||||
if (isDead) return;
|
||||
|
||||
broker.OnIncomingHeal.Invoke(args);
|
||||
|
||||
UpdateValue(args.currentValue);
|
||||
|
||||
broker.OnIncomingHealProcessed.Invoke(args);
|
||||
}
|
||||
|
||||
private void UpdateValue(float incomingValue)
|
||||
{
|
||||
currentValue += incomingValue;
|
||||
|
||||
currentValue = Mathf.Clamp(currentValue, 0, maxValue);
|
||||
|
||||
//Debug.Log("CurrentHealth: " + currentValue);
|
||||
onResourceChanged.Invoke(currentValue);
|
||||
}
|
||||
private void CheckForDeath(DamageArgs args)
|
||||
{
|
||||
if (currentValue == 0)
|
||||
{
|
||||
//dead;
|
||||
isDead = true;
|
||||
args.targetDead = true;
|
||||
onDeath.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ChangeValue(float value)
|
||||
{
|
||||
@ -233,12 +209,6 @@ public class Health : Resource
|
||||
|
||||
if (invulnerable && incomingValue < 0)
|
||||
{
|
||||
if (scrollingTextPrefab != null)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
scrollingText.Show("Invulnerable", Color.gray, 1.5f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -256,27 +226,9 @@ public class Health : Resource
|
||||
{
|
||||
if (incomingValue >= 0) return;
|
||||
|
||||
if (HasDodged())
|
||||
{
|
||||
Debug.Log("Dodged!");
|
||||
|
||||
if (scrollingTextPrefab != null)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
scrollingText.ShowDodge("Dodge!");
|
||||
}
|
||||
|
||||
OnDodgedSuccessfully.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
HandleDamageIncomeModifierEffects();
|
||||
|
||||
if (HasBlocked())
|
||||
HandleBlockMitigation();
|
||||
|
||||
HandleStatMitigation((DamageType)dmgType);
|
||||
|
||||
HandleAbsorbEffects();
|
||||
|
||||
@ -284,16 +236,7 @@ public class Health : Resource
|
||||
|
||||
currentValue = Mathf.Clamp(currentValue, 0, maxValue);
|
||||
|
||||
if (scrollingTextPrefab != null)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
if (isCrit)
|
||||
scrollingText.ShowCrit(incomingValue.ToString("0.0"));
|
||||
else
|
||||
scrollingText.ShowHit(incomingValue.ToString("0.0"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (currentValue == 0)
|
||||
{
|
||||
@ -310,12 +253,6 @@ public class Health : Resource
|
||||
|
||||
currentValue = Mathf.Clamp(currentValue, 0, maxValue);
|
||||
|
||||
if (scrollingTextPrefab != null && incomingValue != 0)
|
||||
{
|
||||
scrollingText = GameObjectPoolManager.Instance.Get(scrollingTextPrefab.gameObject, this.transform.position + new Vector3(Random.Range(-0.5f, 0.5f), 2f, Random.Range(-0.5f, 0.5f)), Quaternion.identity).GetComponent<ScrollingText>();
|
||||
|
||||
scrollingText.ShowHeal(incomingValue.ToString("0.0"));
|
||||
}
|
||||
|
||||
if (currentValue == 0)
|
||||
{
|
||||
|
||||
@ -122,7 +122,7 @@ public class NetworkedAreaOfEffect : MonoBehaviour
|
||||
|
||||
foreach (BaseEffect effect in ability.abilityEffects)
|
||||
{
|
||||
effect.ApplyEffect(ownerTag, targets);
|
||||
effect.ApplyEffect(ownerTag, targets, ability);
|
||||
}
|
||||
|
||||
waitingForDestroy = true;
|
||||
|
||||
@ -131,7 +131,7 @@ public class NetworkedAreaOfEffectOverTime : NetworkedAreaOfEffect
|
||||
|
||||
foreach (BaseEffect effect in ability.abilityEffects)
|
||||
{
|
||||
effect.ApplyEffect(ownerTag, targets);
|
||||
effect.ApplyEffect(ownerTag, targets, ability);
|
||||
}
|
||||
|
||||
OnTickPerformed();
|
||||
|
||||
@ -74,7 +74,7 @@ public class NetworkedBaseAbility : MonoBehaviour
|
||||
{
|
||||
foreach (BaseEffect effect in ability.abilityEffects)
|
||||
{
|
||||
effect.ApplyEffect(ownerTag, targets);
|
||||
effect.ApplyEffect(ownerTag, targets, ability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ public class NetworkedChanneling : MonoBehaviour
|
||||
|
||||
foreach (BaseEffect effect in ability.abilityEffects)
|
||||
{
|
||||
effect.ApplyEffect(ownerTag, targets);
|
||||
effect.ApplyEffect(ownerTag, targets, ability);
|
||||
}
|
||||
|
||||
OnTickPerformed();
|
||||
|
||||
@ -58,7 +58,7 @@ public class NetworkedDrainProjectile : MonoBehaviour
|
||||
|
||||
foreach (BaseEffect effect in ability.abilityEffects)
|
||||
{
|
||||
effect.ApplyEffect(ownerTag, new List<Taggable> { target });
|
||||
effect.ApplyEffect(ownerTag, new List<Taggable> { target }, ability);
|
||||
}
|
||||
|
||||
waitingForDestroy = true;
|
||||
|
||||
@ -132,7 +132,7 @@ public class NetworkedProjectile : MonoBehaviour
|
||||
|
||||
foreach (BaseEffect effect in ability.abilityEffects)
|
||||
{
|
||||
effect.ApplyEffect(ownerTag, new List<Taggable> { target });
|
||||
effect.ApplyEffect(ownerTag, new List<Taggable> { target }, ability);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ public class NetworkedProjectileAreaOfEffectOverTimeWithTickEvent : NetworkedAre
|
||||
foreach (BaseEffect effect in projectileAbility.abilityEffects)
|
||||
{
|
||||
//Debug.Log($"TT[{Time.frameCount}] Applying effect: {effect.name}");
|
||||
effect.ApplyEffect(ownerTag, projectileTargets);
|
||||
effect.ApplyEffect(ownerTag, projectileTargets, ability);
|
||||
}
|
||||
|
||||
if(projectileTargets.Count > 0)
|
||||
|
||||
@ -118,7 +118,7 @@ public class NetworkedSlash : MonoBehaviour
|
||||
|
||||
foreach (BaseEffect effect in ability.abilityEffects)
|
||||
{
|
||||
effect.ApplyEffect(ownerTag, targets);
|
||||
effect.ApplyEffect(ownerTag, targets, ability);
|
||||
}
|
||||
|
||||
if (regenHealthOnHit)
|
||||
|
||||
@ -32,7 +32,7 @@ public class NetworkedSlashWithOnHitEvent : NetworkedSlash
|
||||
|
||||
foreach (BaseEffect effect in ability.abilityEffects)
|
||||
{
|
||||
effect.ApplyEffect(ownerTag, targets);
|
||||
effect.ApplyEffect(ownerTag, targets, ability);
|
||||
}
|
||||
|
||||
if (regenHealthOnHit)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user