refactor: self-referencing intent table!
This commit is contained in:
parent
09148f5b13
commit
e77e2d0737
|
|
@ -6,8 +6,8 @@
|
||||||
# nextIntents: 下一个意图id, 多个意图则从中随机
|
# nextIntents: 下一个意图id, 多个意图则从中随机
|
||||||
# brokenIntent: 防御被打空后改变的意图id,多个意图则从中随机
|
# brokenIntent: 防御被打空后改变的意图id,多个意图则从中随机
|
||||||
# effects:技能效果,目标+buff/debuff/攻击/防御+数值/层数
|
# effects:技能效果,目标+buff/debuff/攻击/防御+数值/层数
|
||||||
enemy,intent,nextIntents,brokenIntent,effects
|
enemy,id,nextIntents,brokenIntent,effects
|
||||||
@enemyDesert,string,string[],string[],['self' | 'opponent';@effectDesert;number][]
|
@enemyDesert,string,@enemyIntentDesert[],@enemyIntentDesert[],['self' | 'opponent';@effectDesert;number][]
|
||||||
|
|
||||||
仙人掌怪,boost,boost;defend;defend,,[self;spike;1];[self;defend;4]
|
仙人掌怪,boost,boost;defend;defend,,[self;spike;1];[self;defend;4]
|
||||||
仙人掌怪,defend,attack,,[self;defend;8]
|
仙人掌怪,defend,attack,,[self;defend;8]
|
||||||
|
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ import type { EffectDesert } from './effectDesert.csv';
|
||||||
|
|
||||||
type EnemyIntentDesertTable = readonly {
|
type EnemyIntentDesertTable = readonly {
|
||||||
readonly enemy: EnemyDesert;
|
readonly enemy: EnemyDesert;
|
||||||
readonly intent: string;
|
readonly id: string;
|
||||||
readonly nextIntents: readonly string[];
|
readonly nextIntents: readonly EnemyIntentDesert[];
|
||||||
readonly brokenIntent: readonly string[];
|
readonly brokenIntent: readonly EnemyIntentDesert[];
|
||||||
readonly effects: readonly ["self" | "opponent", EffectDesert, number];
|
readonly effects: readonly ["self" | "opponent", EffectDesert, number];
|
||||||
}[];
|
}[];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ describe('enemyIntentDesert.csv import', () => {
|
||||||
it('should have correct fields for each intent', () => {
|
it('should have correct fields for each intent', () => {
|
||||||
for (const intent of enemyIntentDesertData) {
|
for (const intent of enemyIntentDesertData) {
|
||||||
expect(intent).toHaveProperty('enemy');
|
expect(intent).toHaveProperty('enemy');
|
||||||
expect(intent).toHaveProperty('intent');
|
expect(intent).toHaveProperty('id');
|
||||||
expect(intent).toHaveProperty('nextIntents');
|
expect(intent).toHaveProperty('nextIntents');
|
||||||
expect(intent).toHaveProperty('brokenIntent');
|
expect(intent).toHaveProperty('brokenIntent');
|
||||||
expect(intent).toHaveProperty('effects');
|
expect(intent).toHaveProperty('effects');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue