From eae0bdb1f76e9db4503d8669ff0393ddfa2dbdf1 Mon Sep 17 00:00:00 2001 From: Damnae Date: Thu, 19 Oct 2023 15:58:56 +0200 Subject: [PATCH] Display auto skill weights and character AI tags. --- src/common/hashstore.ts | 15 ++++++ src/sources/character.ts | 45 ++++++++++------- src/views/aside/AvatarAI.vue | 85 +++++++++++++++++++++++++++++++++ src/views/aside/CommitAside.vue | 4 ++ 4 files changed, 132 insertions(+), 17 deletions(-) create mode 100644 src/views/aside/AvatarAI.vue diff --git a/src/common/hashstore.ts b/src/common/hashstore.ts index 1784350..a797c5a 100644 --- a/src/common/hashstore.ts +++ b/src/common/hashstore.ts @@ -1,10 +1,25 @@ import { reactive, } from 'vue' import { getHash } from './translate' +//console.log(`"${getHash('BPHealingSkill')}": "BPHealingSkill",`) + const defaultHashes:{[key:number]:string} = { + // Expression functions "1776456860": "floor", "-1226284721": "int", + // AI Tags + "-833189093": "BPHealingSkill", + "-1649595214": "BPSkillForFree", + "-1351158859": "AlwaysNeedBP", + "-447313187": "BPSkillPriority", + "762466": "DamageCarry", + "-1570322415": "DamageNeedAttack", + "1646294870": "DamageNeedDef", + "1692650493": "DamageNeedHP", + "-2136914891": "DamageIncreaseTypeBP", + "-731068780": "AggroNeed", + // "2612209": "DebuffNumber", "2621308": "Hana", "14492765": "MyHPRatio", diff --git a/src/sources/character.ts b/src/sources/character.ts index 202adf0..5be2ea2 100644 --- a/src/sources/character.ts +++ b/src/sources/character.ts @@ -4,29 +4,33 @@ import { Monster } from './monster'; import { DynamicValues } from './gamecore'; import { BattleEvent } from './battleevent'; +export interface CharacterSkillAIWeightData +{ + SkillBasicPower?: + { + Value: number + } + Groups: + [ + { + GroupName:string + Weight?: + { + Value: number + } + } + ] +} + export interface CharacterSkill { Name: string SkillType: string EntryAbility: string PrepareAbility?: string - ComplexSkillAI?: - { - SkillBasicPower?: - { - Value: number - } - Groups: - [ - { - GroupName:string - Weight?: - { - Value: number - } - } - ] - } + ComplexSkillAIPreCheck?:CharacterSkillAIWeightData + ComplexSkillAI?:CharacterSkillAIWeightData + ChildSkillList?: string[] // used by Phys MC's ult } @@ -46,6 +50,13 @@ export interface Character [key: string]: number } DynamicValues?: DynamicValues + AITagList?: + { + Values: + { + [hash: number]: {} + } + } } export async function getCharacterByAvatar(commitId:string, avatar:Avatar) : Promise diff --git a/src/views/aside/AvatarAI.vue b/src/views/aside/AvatarAI.vue new file mode 100644 index 0000000..b59da35 --- /dev/null +++ b/src/views/aside/AvatarAI.vue @@ -0,0 +1,85 @@ + + + \ No newline at end of file diff --git a/src/views/aside/CommitAside.vue b/src/views/aside/CommitAside.vue index fec5859..60d1e8d 100644 --- a/src/views/aside/CommitAside.vue +++ b/src/views/aside/CommitAside.vue @@ -2,6 +2,7 @@ import { shallowRef, watch } from 'vue'; import { useRoute } from 'vue-router'; + import AvatarAI from './AvatarAI.vue'; import MonsterAI from './MonsterAI.vue'; const component = shallowRef() @@ -11,6 +12,9 @@ { switch (route.name) { + case 'avatar': + component.value = AvatarAI + break; case 'monster': case 'monsterAbility': case 'monsterModifier':