refactor: use English IDs for desert card effects

Replace Chinese card names with English IDs in the desert card effect
CSV to ensure consistency with the card identifiers. Update tests to
verify the data import using the new English identifiers.
This commit is contained in:
hypercross 2026-04-20 00:23:41 +08:00
parent dda8f4cfe9
commit 08c6a67d16
2 changed files with 35 additions and 30 deletions

View File

@ -1,32 +1,32 @@
id,card,trigger,target,effects
string,@card,'onPlay'|'onDraw'|'onDiscard','self'|'target'|'all'|'random',[@effect;number][]
sword,,onPlay,target,[attack;2];[attack;2]
greataxe,长斧,onPlay,all,[attack;5]
spear,长枪,onPlay,target,[attack;2];[attack;2];[attack;2]
dagger,短刀,onPlay,target,[attack;3];[attack;3]
dart,飞镖,onPlay,target,[attack;1]
dart-draw,飞镖,onPlay,self,[draw;1]
crossbow,十字弩,onPlay,target,[attack;6]
crossbow-combo,十字弩,onPlay,self,[crossbow;0]
shield,,onPlay,self,[defend;3]
hat,斗笠,onPlay,self,[defend;8]
cape,披风,onPlay,self,[defend;2];[defendNext;2]
bracer,护腕,onPlay,self,[defend;1];[draw;1]
greatshield,大盾,onPlay,self,[defend;5]
chainmail,锁子甲,onPlay,self,[damageReduce;3]
bandage,绷带,onPlay,self,[removeWound;1]
poisonPotion,淬毒药剂,onPlay,self,[attackBuff;2]
fortifyPotion,强固药剂,onPlay,self,[defendBuff;2]
vitalityPotion,活力药剂,onPlay,self,[gainEnergy;1]
focusPotion,集中药剂,onPlay,self,[draw;2]
healingPotion,治疗药剂,onPlay,self,[removeWound;3]
waterBag,水袋,onPlay,self,[energyNext;1];[drawNext;2]
rope,绳索,onPlay,self,[defendBuffUntilPlay;2]
belt,腰带,onPlay,self,[drawChoice;1]
torch,火把,onPlay,self,[burnForEnergy;1]
whetstone,磨刀石,onPlay,self,[attackBuffUntilPlay;3]
blacksmithHammer,铁匠锤,onPlay,self,[transformRandom;1]
venom,蛇毒,onDiscard,self,[attack;3]
curse,诅咒,onDraw,self,[curse;1]
static,静电,onDraw,self,[static;1]
vultureEye,秃鹫之眼,onDraw,self,[expose;3]
sword,sword,onPlay,target,[attack;2];[attack;2]
greataxe,greataxe,onPlay,all,[attack;5]
spear,spear,onPlay,target,[attack;2];[attack;2];[attack;2]
dagger,dagger,onPlay,target,[attack;3];[attack;3]
dart,dart,onPlay,target,[attack;1]
dart-draw,dart,onPlay,self,[draw;1]
crossbow,crossbow,onPlay,target,[attack;6]
crossbow-combo,crossbow,onPlay,self,[crossbow;0]
shield,shield,onPlay,self,[defend;3]
hat,hat,onPlay,self,[defend;8]
cape,cape,onPlay,self,[defend;2];[defendNext;2]
bracer,bracer,onPlay,self,[defend;1];[draw;1]
greatshield,greatshield,onPlay,self,[defend;5]
chainmail,chainmail,onPlay,self,[damageReduce;3]
bandage,bandage,onPlay,self,[removeWound;1]
poisonPotion,poisonPotion,onPlay,self,[attackBuff;2]
fortifyPotion,fortifyPotion,onPlay,self,[defendBuff;2]
vitalityPotion,vitalityPotion,onPlay,self,[gainEnergy;1]
focusPotion,focusPotion,onPlay,self,[draw;2]
healingPotion,healingPotion,onPlay,self,[removeWound;3]
waterBag,waterBag,onPlay,self,[energyNext;1];[drawNext;2]
rope,rope,onPlay,self,[defendBuffUntilPlay;2]
belt,belt,onPlay,self,[drawChoice;1]
torch,torch,onPlay,self,[burnForEnergy;1]
whetstone,whetstone,onPlay,self,[attackBuffUntilPlay;3]
blacksmithHammer,blacksmithHammer,onPlay,self,[transformRandom;1]
venom,venom,onDiscard,self,[attack;3]
curse,curse,onDraw,self,[curse;1]
static,static,onDraw,self,[static;1]
vultureEye,vultureEye,onDraw,self,[expose;3]

1 id card trigger target effects
2 string @card 'onPlay'|'onDraw'|'onDiscard' 'self'|'target'|'all'|'random' [@effect;number][]
3 sword sword onPlay target [attack;2];[attack;2]
4 greataxe 长斧 greataxe onPlay all [attack;5]
5 spear 长枪 spear onPlay target [attack;2];[attack;2];[attack;2]
6 dagger 短刀 dagger onPlay target [attack;3];[attack;3]
7 dart 飞镖 dart onPlay target [attack;1]
8 dart-draw 飞镖 dart onPlay self [draw;1]
9 crossbow 十字弩 crossbow onPlay target [attack;6]
10 crossbow-combo 十字弩 crossbow onPlay self [crossbow;0]
11 shield shield onPlay self [defend;3]
12 hat 斗笠 hat onPlay self [defend;8]
13 cape 披风 cape onPlay self [defend;2];[defendNext;2]
14 bracer 护腕 bracer onPlay self [defend;1];[draw;1]
15 greatshield 大盾 greatshield onPlay self [defend;5]
16 chainmail 锁子甲 chainmail onPlay self [damageReduce;3]
17 bandage 绷带 bandage onPlay self [removeWound;1]
18 poisonPotion 淬毒药剂 poisonPotion onPlay self [attackBuff;2]
19 fortifyPotion 强固药剂 fortifyPotion onPlay self [defendBuff;2]
20 vitalityPotion 活力药剂 vitalityPotion onPlay self [gainEnergy;1]
21 focusPotion 集中药剂 focusPotion onPlay self [draw;2]
22 healingPotion 治疗药剂 healingPotion onPlay self [removeWound;3]
23 waterBag 水袋 waterBag onPlay self [energyNext;1];[drawNext;2]
24 rope 绳索 rope onPlay self [defendBuffUntilPlay;2]
25 belt 腰带 belt onPlay self [drawChoice;1]
26 torch 火把 torch onPlay self [burnForEnergy;1]
27 whetstone 磨刀石 whetstone onPlay self [attackBuffUntilPlay;3]
28 blacksmithHammer 铁匠锤 blacksmithHammer onPlay self [transformRandom;1]
29 venom 蛇毒 venom onDiscard self [attack;3]
30 curse 诅咒 curse onDraw self [curse;1]
31 static 静电 static onDraw self [static;1]
32 vultureEye 秃鹫之眼 vultureEye onDraw self [expose;3]

View File

@ -1,8 +1,13 @@
import { describe, it, expect } from "vitest";
import data from "@/samples/slay-the-spire-like/data";
import { CardData } from "@/samples/slay-the-spire-like";
describe("data import", () => {
it("should import properly", () => {
expect(data.desert.getEffects).toBeDefined();
expect(
data.desert.getCards().find((c: CardData) => c.id === "crossbow")?.effects
?.length,
).toBe(2);
});
});