refactor: reorganize csv data
This commit is contained in:
parent
b18e232cc8
commit
b28ec823a7
|
|
@ -0,0 +1,41 @@
|
||||||
|
# cardDesert: unified card definitions for item cards and status cards
|
||||||
|
# type: 'item' = inventory item card, 'status' = status effect card
|
||||||
|
# costType: 'energy' = costs energy per turn, 'uses' = limited uses, 'none' = free
|
||||||
|
# targetType: 'single' = target one enemy, 'none' = no target
|
||||||
|
# unplayable: true for status cards that cannot be played
|
||||||
|
# onPlay: effects triggered when card is played
|
||||||
|
# onDraw: effects triggered when card enters hand
|
||||||
|
# onDiscard: effects triggered when card is discarded
|
||||||
|
|
||||||
|
id,name,desc,type,costType,costCount,targetType,unplayable,onPlay,onDraw,onDiscard
|
||||||
|
string,string,string,'item'|'status','energy'|'uses'|'none',int,'single'|'none',boolean,['self'|'target'|'all'|'random'|'player';@effectDesert;number][],['self'|'target'|'all'|'random'|'player';@effectDesert;number][],['self'|'target'|'all'|'random'|'player';@effectDesert;number][]
|
||||||
|
sword,剑,【攻击2】【攻击2】,item,energy,1,single,false,[target;attack;2];[target;attack;2],,
|
||||||
|
greataxe,长斧,对全体【攻击5】,item,energy,2,none,false,[all;attack;5],,
|
||||||
|
spear,长枪,【攻击2】【攻击2】【攻击2】,item,energy,1,single,false,[target;attack;2];[target;attack;2];[target;attack;2],,
|
||||||
|
dagger,短刀,【攻击3】【攻击3】,item,energy,1,single,false,[target;attack;3];[target;attack;3],,
|
||||||
|
dart,飞镖,【攻击1】抓一张牌,item,energy,0,single,false,[target;attack;1];[self;draw;1],,
|
||||||
|
crossbow,十字弩,【攻击6】对同一目标打出其他十字弩,item,energy,2,single,false,[target;attack;6];[self;crossbow;0],,
|
||||||
|
shield,盾,【防御3】,item,energy,1,none,false,[self;defend;3],,
|
||||||
|
hat,斗笠,【防御8】,item,energy,2,none,false,[self;defend;8],,
|
||||||
|
cape,披风,【防御2】下回合【防御2】,item,energy,1,none,false,[self;defend;2];[self;defendNext;2],,
|
||||||
|
bracer,护腕,【防御1】抓1张牌,item,energy,0,none,false,[self;defend;1];[self;draw;1],,
|
||||||
|
greatshield,大盾,【防御5】,item,energy,1,none,false,[self;defend;5],,
|
||||||
|
chainmail,锁子甲,本回合受到伤害-3,item,energy,1,none,false,[self;damageReduce;3],,
|
||||||
|
bandage,绷带,从牌堆或弃牌堆随机移除1张伤口,item,uses,3,none,false,[self;removeWound;1],,
|
||||||
|
poisonPotion,淬毒药剂,周围物品的【攻击】+2,item,uses,3,none,false,[self;attackBuff;2],,
|
||||||
|
fortifyPotion,强固药剂,周围物品的【防御】+2,item,uses,3,none,false,[self;defendBuff;2],,
|
||||||
|
vitalityPotion,活力药剂,获得1点能量,item,uses,3,none,false,[self;gainEnergy;1],,
|
||||||
|
focusPotion,集中药剂,抓2张牌,item,uses,3,none,false,[self;draw;2],,
|
||||||
|
healingPotion,治疗药剂,从牌堆或弃牌堆移除3张伤口,item,uses,3,none,false,[self;removeWound;3],,
|
||||||
|
waterBag,水袋,下回合开始时获得1能量抓2张牌,item,energy,1,none,false,[self;energyNext;1];[self;drawNext;2],,
|
||||||
|
rope,绳索,周围物品的牌【防御】+2直到打出,item,energy,1,none,false,[self;defendBuffUntilPlay;2],,
|
||||||
|
belt,腰带,从牌堆周围物品的牌当中选择一张加入手牌,item,energy,0,none,false,[self;drawChoice;1],,
|
||||||
|
torch,火把,下次打出周围物品的牌时将其消耗并获得1能量,item,energy,1,none,false,[self;burnForEnergy;1],,
|
||||||
|
whetstone,磨刀石,周围物品的牌【攻击】+3直到打出,item,energy,1,none,false,[self;attackBuffUntilPlay;3],,
|
||||||
|
blacksmithHammer,铁匠锤,从牌堆/弃牌堆选择一张牌随机变为一张周围物品的牌,item,energy,1,none,false,[self;transformRandom;1],,
|
||||||
|
wound,伤口,无效果占用手牌和牌堆,status,none,0,none,true,,,
|
||||||
|
venom,蛇毒,弃掉时受到3点伤害,status,none,0,none,true,,,[self;attack;3]
|
||||||
|
curse,诅咒,受攻击时物品攻击-1直到弃掉一张该物品的牌,status,none,0,none,true,,[self;curse;1],
|
||||||
|
static,静电,在手里时受电击伤害+1,status,none,0,none,true,,[self;static;1],
|
||||||
|
fatigue,疲劳,占用手牌,status,none,0,none,true,,,
|
||||||
|
vultureEye,秃鹫之眼,抓到时获得3层暴露,status,none,0,none,true,,[self;expose;3],
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
type EffectDesertTable = readonly {
|
|
||||||
readonly id: string;
|
|
||||||
readonly name: string;
|
|
||||||
readonly description: string;
|
|
||||||
readonly timing: "instant" | "temporary" | "lingering" | "permanent" | "posture" | "card" | "cardDraw" | "cardHand" | "item" | "itemUntilPlayed";
|
|
||||||
}[];
|
|
||||||
|
|
||||||
export type EffectDesert = EffectDesertTable[number];
|
|
||||||
|
|
||||||
declare function getData(): EffectDesertTable;
|
|
||||||
export default getData;
|
|
||||||
|
|
@ -4,22 +4,23 @@
|
||||||
# shop (2): merchant who sells different stuff
|
# shop (2): merchant who sells different stuff
|
||||||
# camp (2): consumable restock and heal
|
# camp (2): consumable restock and heal
|
||||||
# curio (8): random pickup of treasure or resources
|
# curio (8): random pickup of treasure or resources
|
||||||
|
# enemies: array of [enemyId; hp; bonusHp] - bonusHp for scaling
|
||||||
type,name,description,enemies,dialogue
|
type,name,description,enemies,dialogue
|
||||||
'minion'|'elite'|'event'|'shop'|'camp'|'curio',string,string,[enemy: @enemyDesert;bonusHp: number][],string
|
'minion'|'elite'|'event'|'shop'|'camp'|'curio',string,string,[string; int; int][],string
|
||||||
minion,仙人掌怪,概念:防+强化。【尖刺X】:对攻击者造成X点伤害。,[仙人掌怪;0];[仙人掌怪;0],
|
minion,仙人掌怪,概念:防+强化。【尖刺X】:对攻击者造成X点伤害。,[仙人掌怪;20;0];[仙人掌怪;20;0],
|
||||||
minion,蛇,概念:攻+强化。给玩家塞入蛇毒牌(1费:打出时移除此牌。弃掉时受到3点伤害)。,[蛇;0];[蛇;0],
|
minion,蛇,概念:攻+强化。给玩家塞入蛇毒牌(1费:打出时移除此牌。弃掉时受到3点伤害)。,[蛇;14;0];[蛇;14;0],
|
||||||
minion,木乃伊,概念:攻+防。【诅咒】:受攻击时物品【攻击】-1,直到弃掉一张该物品的牌。,[木乃伊;0];[仙人掌怪;0],
|
minion,木乃伊,概念:攻+防。【诅咒】:受攻击时物品【攻击】-1,直到弃掉一张该物品的牌。,[木乃伊;18;0];[仙人掌怪;20;0],
|
||||||
minion,枪手,概念:单回高攻。【瞄准X】:造成双倍伤害。受伤时失去等量【瞄准】,[枪手;0],
|
minion,枪手,概念:单回高攻。【瞄准X】:造成双倍伤害。受伤时失去等量【瞄准】,[枪手;16;0],
|
||||||
minion,风卷草,概念:防+强化。【滚动X】:攻击时,每消耗10点【滚动】,造成等量伤害。,[风卷草;0];[风卷草;0],
|
minion,风卷草,概念:防+强化。【滚动X】:攻击时,每消耗10点【滚动】,造成等量伤害。,[风卷草;22;0];[风卷草;22;0],
|
||||||
minion,秃鹫,概念:攻+防。若造成伤害,玩家获得秃鹫之眼(0费状态牌:打出时移除。抓到时获得3层暴露)。,[秃鹫;0];[仙人掌怪;0],
|
minion,秃鹫,概念:攻+防。若造成伤害,玩家获得秃鹫之眼(0费状态牌:打出时移除。抓到时获得3层暴露)。,[秃鹫;16;0];[仙人掌怪;20;0],
|
||||||
minion,沙蝎,概念:攻+强化。【尾刺X】:姿态buff,攻击时,伤害提升X。,[沙蝎;0];[蛇;0],
|
minion,沙蝎,概念:攻+强化。【尾刺X】:姿态buff,攻击时,伤害提升X。,[沙蝎;14;0];[蛇;14;0],
|
||||||
minion,幼沙虫,概念:防+强化。每回合第一次受伤时,玩家失去1点能量。,[幼沙虫;0],
|
minion,幼沙虫,概念:防+强化。每回合第一次受伤时,玩家失去1点能量。,[幼沙虫;24;0],
|
||||||
minion,蜥蜴,概念:攻+防+逃跑。【脱皮】:若脱皮达到生命上限,则怪物逃跑,玩家不能获得战斗奖励。,[蜥蜴;0];[蜥蜴;0],
|
minion,蜥蜴,概念:攻+防+逃跑。【脱皮】:若脱皮达到生命上限,则怪物逃跑,玩家不能获得战斗奖励。,[蜥蜴;20;0];[蜥蜴;20;0],
|
||||||
minion,沙匪,概念:弱化玩家。【劫掠】:对玩家施加的延时debuff。回合开始时,随机弃掉一张手牌。,[沙匪;0];[枪手;0],
|
minion,沙匪,概念:弱化玩家。【劫掠】:对玩家施加的延时debuff。回合开始时,随机弃掉一张手牌。,[沙匪;16;0];[枪手;16;0],
|
||||||
elite,风暴之灵,【风暴X】:攻击时,玩家获得1张静电。受伤时失去等量【风暴】。(静电:在手里时受【电击】伤害+1),[风暴之灵;0],
|
elite,风暴之灵,【风暴X】:攻击时,玩家获得1张静电。受伤时失去等量【风暴】。(静电:在手里时受【电击】伤害+1),[风暴之灵;44;0],
|
||||||
elite,骑马枪手,【冲锋X】:受到或造成的伤害翻倍并消耗等量的冲锋。,[骑马枪手;0];[枪手;4],
|
elite,骑马枪手,【冲锋X】:受到或造成的伤害翻倍并消耗等量的冲锋。,[骑马枪手;50;0];[枪手;20;4],
|
||||||
elite,沙虫王,召唤幼体沙虫;每当玩家弃掉一张牌,恢复1生命。,[沙虫王;0],
|
elite,沙虫王,召唤幼体沙虫;每当玩家弃掉一张牌,恢复1生命。,[沙虫王;55;0],
|
||||||
elite,沙漠守卫,召唤木乃伊;会复活木乃伊2次。,[沙漠守卫;0];[木乃伊;2],
|
elite,沙漠守卫,召唤木乃伊;会复活木乃伊2次。,[沙漠守卫;48;0];[木乃伊;20;0],
|
||||||
shop,沙漠商人,商店:可以恢复生命、出售装备、附魔物品。,,
|
shop,沙漠商人,商店:可以恢复生命、出售装备、附魔物品。,,
|
||||||
shop,游牧商队,商队:出售稀有物品、移除牌组中一张牌。,,
|
shop,游牧商队,商队:出售稀有物品、移除牌组中一张牌。,,
|
||||||
camp,绿洲篝火,篝火:可以恢复生命、补充药水使用次数、获得下次战斗Buff。,,
|
camp,绿洲篝火,篝火:可以恢复生命、补充药水使用次数、获得下次战斗Buff。,,
|
||||||
|
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
import type { EnemyDesert } from './enemyDesert.csv';
|
|
||||||
|
|
||||||
type EncounterDesertTable = readonly {
|
|
||||||
readonly type: "minion" | "elite" | "event" | "shop" | "camp" | "curio";
|
|
||||||
readonly name: string;
|
|
||||||
readonly description: string;
|
|
||||||
readonly enemies: readonly [readonly enemy: EnemyDesert, readonly bonusHp: number];
|
|
||||||
readonly dialogue: string;
|
|
||||||
}[];
|
|
||||||
|
|
||||||
export type EncounterDesert = EncounterDesertTable[number];
|
|
||||||
|
|
||||||
declare function getData(): EncounterDesertTable;
|
|
||||||
export default getData;
|
|
||||||
|
|
@ -1,16 +1,52 @@
|
||||||
id,initHp,initBuffs,initialIntent
|
# enemyDesert: enemy templates and their intent state machines
|
||||||
string, int, [effect: @effectDesert; stacks: int][], string
|
# enemy: enemy template ID (unique identifier for this enemy type)
|
||||||
仙人掌怪,20,[spike;1],boost
|
# intentId: intent state ID (unique within each enemy)
|
||||||
蛇,14,,poison
|
# initialIntent: true if this is the enemy's starting intent
|
||||||
木乃伊,18,,attack
|
# nextIntents: possible next intent IDs after this intent resolves
|
||||||
枪手,16,,aim
|
# brokenIntent: possible intent IDs when defend is broken
|
||||||
风卷草,22,,boost
|
# initBuffs: initial buffs for this enemy type (applied to all instances)
|
||||||
秃鹫,16,,attack
|
# effects: effects executed when this intent is active
|
||||||
沙蝎,14,[tailSting;1],boost
|
|
||||||
幼沙虫,24,[energyDrain;1],defend
|
enemy,intentId,initialIntent,nextIntents,brokenIntent,initBuffs,effects
|
||||||
蜥蜴,20,,attack
|
string,string,boolean,string[],string[],[@effectDesert;stacks: int][],['self'|'player'|'team';@effectDesert;number][]
|
||||||
沙匪,16,,attack
|
仙人掌怪,boost,true,boost;defend;defend,,[spike;1],[self;spike;1];[self;defend;4]
|
||||||
风暴之灵,44,,storm
|
仙人掌怪,defend,false,attack,,[spike;1],[self;defend;8]
|
||||||
骑马枪手,50,,charge
|
仙人掌怪,attack,false,boost,,[spike;1],[player;attack;5]
|
||||||
沙虫王,55,,summon
|
蛇,poison,true,attack;attack,,,,[player;venom;1];[player;attack;4]
|
||||||
沙漠守卫,48,,summon
|
蛇,attack,false,poison;boost,,,,[player;attack;6]
|
||||||
|
蛇,boost,false,poison;attack,,,,[self;defend;3];[player;venom;1]
|
||||||
|
木乃伊,attack,true,defend;curse,,,,[player;attack;6]
|
||||||
|
木乃伊,defend,false,attack,,,,[self;defend;6]
|
||||||
|
木乃伊,curse,false,defend;attack,attack,,[player;curse;1]
|
||||||
|
枪手,aim,true,attack,,,,[self;aim;2]
|
||||||
|
枪手,attack,false,aim;defend,aim,,[player;attack;8]
|
||||||
|
枪手,defend,false,aim,aim,,[self;defend;5]
|
||||||
|
风卷草,boost,true,defend;defend;boost,,,,[self;roll;5];[self;defend;4]
|
||||||
|
风卷草,defend,false,boost;attack,,,,[self;defend;8]
|
||||||
|
风卷草,attack,false,boost,,,,[player;rollDamage;0]
|
||||||
|
秃鹫,attack,true,defend;defend,,,,[player;attack;6];[player;vultureEye;1]
|
||||||
|
秃鹫,defend,false,attack;attack,,,,[self;defend;5]
|
||||||
|
沙蝎,boost,true,attack;attack,,[tailSting;1],[self;tailSting;2]
|
||||||
|
沙蝎,attack,false,boost;attack,,[tailSting;1],[player;attack;6]
|
||||||
|
幼沙虫,defend,true,defend;boost,,[energyDrain;1],[self;defend;6]
|
||||||
|
幼沙虫,boost,false,attack;defend,,[energyDrain;1],[self;energyDrain;1];[self;defend;4]
|
||||||
|
幼沙虫,attack,false,defend;defend,,[energyDrain;1],[player;attack;5]
|
||||||
|
蜥蜴,attack,true,defend;molt,,,,[player;attack;5]
|
||||||
|
蜥蜴,defend,false,attack;attack,,,,[self;defend;6]
|
||||||
|
蜥蜴,molt,false,defend;attack,,,,[self;molt;3]
|
||||||
|
沙匪,attack,true,attack;heavyAttack,,,,[player;attack;6]
|
||||||
|
沙匪,heavyAttack,false,attack;attack;debuff,,,,[player;attack;10]
|
||||||
|
沙匪,debuff,false,attack;attack,,,,[player;discard;1]
|
||||||
|
风暴之灵,storm,true,attack;storm,,,,[self;storm;2];[self;defend;3]
|
||||||
|
风暴之灵,attack,false,storm;defend,,,,[player;attack;8];[player;static;1]
|
||||||
|
风暴之灵,defend,false,storm;attack,,,,[self;defend;8]
|
||||||
|
骑马枪手,charge,true,attack,,,,[self;charge;2]
|
||||||
|
骑马枪手,attack,false,charge;defend,charge,,[player;attack;6]
|
||||||
|
骑马枪手,defend,false,charge;attack,charge,,[self;defend;5]
|
||||||
|
沙虫王,summon,true,attack;defend,,,,[self;summonSandwormLarva;1]
|
||||||
|
沙虫王,attack,false,summon;defend,,,,[player;attack;9]
|
||||||
|
沙虫王,defend,false,attack;summon,,,,[self;defend;6]
|
||||||
|
沙漠守卫,summon,true,attack;defend,,,,[self;summonMummy;1]
|
||||||
|
沙漠守卫,attack,false,defend;summon,,,,[player;attack;8]
|
||||||
|
沙漠守卫,defend,false,attack;revive,,,,[self;defend;8]
|
||||||
|
沙漠守卫,revive,false,attack;summon,,,,[self;reviveMummy;1]
|
||||||
|
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
import type { EffectDesert } from './effectDesert.csv';
|
|
||||||
|
|
||||||
type EnemyDesertTable = readonly {
|
|
||||||
readonly id: string;
|
|
||||||
readonly initHp: number;
|
|
||||||
readonly initBuffs: readonly [readonly effect: EffectDesert, readonly stacks: number];
|
|
||||||
readonly initialIntent: string;
|
|
||||||
}[];
|
|
||||||
|
|
||||||
export type EnemyDesert = EnemyDesertTable[number];
|
|
||||||
|
|
||||||
declare function getData(): EnemyDesertTable;
|
|
||||||
export default getData;
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
# 敌人行动状态机,敌人行动时会执行当前的意图,然后将意图变为下一个意图
|
|
||||||
# 若敌人防御值被打空,则将意图变为brokenIntent,除非brokenIntent为空
|
|
||||||
|
|
||||||
# enemy: 敌人id
|
|
||||||
# intent: 意图id
|
|
||||||
# nextIntents: 下一个意图id, 多个意图则从中随机
|
|
||||||
# brokenIntent: 防御被打空后改变的意图id,多个意图则从中随机
|
|
||||||
# effects:技能效果,目标+buff/debuff/攻击/防御+数值/层数
|
|
||||||
enemy,id,nextIntents,brokenIntent,effects
|
|
||||||
@enemyDesert,string,@enemyIntentDesert[],@enemyIntentDesert[],['self' | 'player' | 'team';@effectDesert;number][]
|
|
||||||
|
|
||||||
仙人掌怪,boost,boost;defend;defend,,[self;spike;1];[self;defend;4]
|
|
||||||
仙人掌怪,defend,attack,,[self;defend;8]
|
|
||||||
仙人掌怪,attack,boost,,[player;attack;5]
|
|
||||||
蛇,poison,attack;attack,,[player;venom;1];[player;attack;4]
|
|
||||||
蛇,attack,poison;boost,,[player;attack;6]
|
|
||||||
蛇,boost,poison;attack,,[self;defend;3];[player;venom;1]
|
|
||||||
木乃伊,attack,defend;curse,,[player;attack;6]
|
|
||||||
木乃伊,defend,attack,,[self;defend;6]
|
|
||||||
木乃伊,curse,defend;attack,attack,[player;curse;1]
|
|
||||||
枪手,aim,attack,,[self;aim;2]
|
|
||||||
枪手,attack,aim;defend,aim,[player;attack;8]
|
|
||||||
枪手,defend,aim,aim,[self;defend;5]
|
|
||||||
风卷草,boost,defend;defend;boost,,[self;roll;5];[self;defend;4]
|
|
||||||
风卷草,defend,boost;attack,,[self;defend;8]
|
|
||||||
风卷草,attack,boost,,[player;rollDamage;0]
|
|
||||||
秃鹫,attack,defend;defend,,[player;attack;6];[player;vultureEye;1]
|
|
||||||
秃鹫,defend,attack;attack,,[self;defend;5]
|
|
||||||
沙蝎,boost,attack;attack,,[self;tailSting;2]
|
|
||||||
沙蝎,attack,boost;attack,,[player;attack;6]
|
|
||||||
幼沙虫,defend,defend;boost,,[self;defend;6]
|
|
||||||
幼沙虫,boost,attack;defend,,[self;energyDrain;1];[self;defend;4]
|
|
||||||
幼沙虫,attack,defend;defend,,[player;attack;5]
|
|
||||||
蜥蜴,attack,defend;molt,,[player;attack;5]
|
|
||||||
蜥蜴,defend,attack;attack,,[self;defend;6]
|
|
||||||
蜥蜴,molt,defend;attack,,[self;molt;3]
|
|
||||||
沙匪,attack,attack;heavyAttack,,[player;attack;6]
|
|
||||||
沙匪,heavyAttack,attack;attack;debuff,,[player;attack;10]
|
|
||||||
沙匪,debuff,attack;attack,,[player;discard;1]
|
|
||||||
风暴之灵,storm,attack;storm,,[self;storm;2];[self;defend;3]
|
|
||||||
风暴之灵,attack,storm;defend,,[player;attack;8];[player;static;1]
|
|
||||||
风暴之灵,defend,storm;attack,,[self;defend;8]
|
|
||||||
骑马枪手,charge,attack,,[self;charge;2]
|
|
||||||
骑马枪手,attack,charge;defend,charge,[player;attack;6]
|
|
||||||
骑马枪手,defend,charge;attack,charge,[self;defend;5]
|
|
||||||
沙虫王,summon,attack;defend,,[self;summonSandwormLarva;1]
|
|
||||||
沙虫王,attack,summon;defend,,[player;attack;9]
|
|
||||||
沙虫王,defend,attack;summon,,[self;defend;6]
|
|
||||||
沙漠守卫,summon,attack;defend,,[self;summonMummy;1]
|
|
||||||
沙漠守卫,attack,defend;summon,,[player;attack;8]
|
|
||||||
沙漠守卫,defend,attack;revive,,[self;defend;8]
|
|
||||||
沙漠守卫,revive,attack;summon,,[self;reviveMummy;1]
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
import type { EnemyDesert } from './enemyDesert.csv';
|
|
||||||
import type { EffectDesert } from './effectDesert.csv';
|
|
||||||
|
|
||||||
type EnemyIntentDesertTable = readonly {
|
|
||||||
readonly enemy: EnemyDesert;
|
|
||||||
readonly id: string;
|
|
||||||
readonly nextIntents: readonly EnemyIntentDesert[];
|
|
||||||
readonly brokenIntent: readonly EnemyIntentDesert[];
|
|
||||||
readonly effects: readonly ["self" | "player" | "team", EffectDesert, number];
|
|
||||||
}[];
|
|
||||||
|
|
||||||
export type EnemyIntentDesert = EnemyIntentDesertTable[number];
|
|
||||||
|
|
||||||
declare function getData(): EnemyIntentDesertTable;
|
|
||||||
export default getData;
|
|
||||||
|
|
@ -1,36 +1,26 @@
|
||||||
# type can be one of: weapon, armor, consumable, tool
|
type,name,shape,card,price
|
||||||
#
|
string,string,string,@cardDesert,int
|
||||||
# shape represents a tetris-like shape, consult ../utils/parse-shape.ts
|
weapon,剑,oee,sword,50
|
||||||
# n
|
weapon,长斧,oees,greataxe,80
|
||||||
# w o e
|
weapon,长枪,oeee,spear,75
|
||||||
# s
|
weapon,短刀,oe,dagger,40
|
||||||
# costType can be one of: energy, uses
|
weapon,飞镖,o,dart,30
|
||||||
#
|
weapon,十字弩,onrersrw,crossbow,120
|
||||||
# targetType can be one of: single, none
|
armor,盾,oesw,shield,50
|
||||||
|
armor,斗笠,oerwrn,hat,90
|
||||||
type,name,shape,costType,costCount,targetType,price,desc,effects
|
armor,披风,oers,cape,45
|
||||||
string,string,string,'energy'|'uses',int,'single'|'none',int,string,['self'|'target'|'all'|'random'; @effectDesert; number][]
|
armor,护腕,o,bracer,25
|
||||||
weapon,剑,oee,energy,1,single,50,【攻击2】【攻击2】,[target;attack;2];[target;attack;2]
|
armor,大盾,oesswn,greatshield,70
|
||||||
weapon,长斧,oees,energy,2,none,80,对全体【攻击5】,[all;attack;5]
|
armor,锁子甲,oesw,chainmail,60
|
||||||
weapon,长枪,oeee,energy,1,single,75,【攻击2】【攻击2】【攻击2】,[target;attack;2];[target;attack;2];[target;attack;2]
|
consumable,绷带,o,bandage,20
|
||||||
weapon,短刀,oe,energy,1,single,40,【攻击3】【攻击3】,[target;attack;3];[target;attack;3]
|
consumable,淬毒药剂,o,poisonPotion,30
|
||||||
weapon,飞镖,o,energy,0,single,30,【攻击1】,抓一张牌,[target;attack;1];[self;draw;1]
|
consumable,强固药剂,o,fortifyPotion,30
|
||||||
weapon,十字弩,onrersrw,energy,2,single,120,【攻击6】。对同一目标打出其他十字弩,[target;attack;6];[self;crossbow;0]
|
consumable,活力药剂,o,vitalityPotion,25
|
||||||
armor,盾,oesw,energy,1,none,50,【防御3】,[self;defend;3]
|
consumable,集中药剂,o,focusPotion,25
|
||||||
armor,斗笠,oerwrn,energy,2,none,90,【防御8】,[self;defend;8]
|
consumable,治疗药剂,o,healingPotion,35
|
||||||
armor,披风,oers,energy,1,none,45,【防御2】,下回合【防御2】,[self;defend;2];[self;defendNext;2]
|
tool,水袋,os,waterBag,35
|
||||||
armor,护腕,o,energy,0,none,25,【防御1】,抓1张牌,[self;defend;1];[self;draw;1]
|
tool,绳索,ose,rope,30
|
||||||
armor,大盾,oesswn,energy,1,none,70,【防御5】,[self;defend;5]
|
tool,腰带,owre,belt,40
|
||||||
armor,锁子甲,oesw,energy,1,none,60,本回合受到伤害-3,[self;damageReduce;3]
|
tool,火把,on,torch,25
|
||||||
consumable,绷带,o,uses,3,none,20,从牌堆或弃牌堆随机移除1张伤口,[self;removeWound;1]
|
tool,磨刀石,o,whetstone,30
|
||||||
consumable,淬毒药剂,o,uses,3,none,30,周围物品的【攻击】+2,[self;attackBuff;2]
|
tool,铁匠锤,oerwrs,blacksmithHammer,45
|
||||||
consumable,强固药剂,o,uses,3,none,30,周围物品的【防御】+2,[self;defendBuff;2]
|
|
||||||
consumable,活力药剂,o,uses,3,none,25,获得1点能量,[self;gainEnergy;1]
|
|
||||||
consumable,集中药剂,o,uses,3,none,25,抓2张牌,[self;draw;2]
|
|
||||||
consumable,治疗药剂,o,uses,3,none,35,从牌堆或弃牌堆移除3张伤口,[self;removeWound;3]
|
|
||||||
tool,水袋,os,energy,1,none,35,下回合开始时,获得1能量,抓2张牌,[self;energyNext;1];[self;drawNext;2]
|
|
||||||
tool,绳索,ose,energy,1,none,30,周围物品的牌【防御】+2直到打出,[self;defendBuffUntilPlay;2]
|
|
||||||
tool,腰带,owre,energy,0,none,40,从牌堆周围物品的牌当中选择一张加入手牌,[self;drawChoice;1]
|
|
||||||
tool,火把,on,energy,1,none,25,下次打出周围物品的牌时,将其消耗并获得1能量,[self;burnForEnergy;1]
|
|
||||||
tool,磨刀石,o,energy,1,none,30,周围物品的牌【攻击】+3直到打出,[self;attackBuffUntilPlay;3]
|
|
||||||
tool,铁匠锤,oerwrs,energy,1,none,45,从牌堆/弃牌堆选择一张牌,随机变为一张周围物品的牌,[self;transformRandom;1]
|
|
||||||
|
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
import type { EffectDesert } from './effectDesert.csv';
|
|
||||||
|
|
||||||
type HeroItemFighter1Table = readonly {
|
|
||||||
readonly type: string;
|
|
||||||
readonly name: string;
|
|
||||||
readonly shape: string;
|
|
||||||
readonly costType: "energy" | "uses";
|
|
||||||
readonly costCount: number;
|
|
||||||
readonly targetType: "single" | "none";
|
|
||||||
readonly price: number;
|
|
||||||
readonly desc: string;
|
|
||||||
readonly effects: readonly ["self" | "target" | "all" | "random", EffectDesert, number];
|
|
||||||
}[];
|
|
||||||
|
|
||||||
export type HeroItemFighter1 = HeroItemFighter1Table[number];
|
|
||||||
|
|
||||||
declare function getData(): HeroItemFighter1Table;
|
|
||||||
export default getData;
|
|
||||||
|
|
@ -1,19 +1,16 @@
|
||||||
import heroItemFighter1Csv from './heroItemFighter1.csv';
|
import heroItemFighter1Csv from './heroItemFighter1.csv';
|
||||||
import encounterDesertCsv from './encounterDesert.csv';
|
import encounterDesertCsv from './encounterDesert.csv';
|
||||||
import enemyDesertCsv from './enemyDesert.csv';
|
import enemyDesertCsv from './enemyDesert.csv';
|
||||||
import enemyIntentDesertCsv from './enemyIntentDesert.csv';
|
|
||||||
import effectDesertCsv from './effectDesert.csv';
|
import effectDesertCsv from './effectDesert.csv';
|
||||||
import statusCardDesertCsv from './statusCardDesert.csv';
|
import cardDesertCsv from './cardDesert.csv';
|
||||||
|
|
||||||
export const heroItemFighter1Data = heroItemFighter1Csv();
|
export const heroItemFighter1Data = heroItemFighter1Csv();
|
||||||
export const encounterDesertData = encounterDesertCsv();
|
export const encounterDesertData = encounterDesertCsv();
|
||||||
export const enemyDesertData = enemyDesertCsv();
|
export const enemyDesertData = enemyDesertCsv();
|
||||||
export const enemyIntentDesertData = enemyIntentDesertCsv();
|
|
||||||
export const effectDesertData = effectDesertCsv();
|
export const effectDesertData = effectDesertCsv();
|
||||||
export const statusCardDesertData = statusCardDesertCsv();
|
export const cardDesertData = cardDesertCsv();
|
||||||
|
|
||||||
export { default as encounterDesertCsv, type EncounterDesert } from './encounterDesert.csv';
|
export { default as encounterDesertCsv, type EncounterDesert } from './encounterDesert.csv';
|
||||||
export { default as enemyDesertCsv, type EnemyDesert } from './enemyDesert.csv';
|
export { default as enemyDesertCsv, type EnemyDesert } from './enemyDesert.csv';
|
||||||
export { default as enemyIntentDesertCsv, type EnemyIntentDesert } from './enemyIntentDesert.csv';
|
|
||||||
export { default as effectDesertCsv, type EffectDesert } from './effectDesert.csv';
|
export { default as effectDesertCsv, type EffectDesert } from './effectDesert.csv';
|
||||||
export { default as statusCardDesertCsv, type StatusCardDesert } from './statusCardDesert.csv';
|
export { default as cardDesertCsv, type CardDesert } from './cardDesert.csv';
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# 状态牌:由某些效果创建,洗入玩家牌堆或手牌
|
|
||||||
# unplayable: 是否不可打出
|
|
||||||
# effects: 状态牌在场时施加的效果
|
|
||||||
|
|
||||||
id, name, desc, unplayable, effects
|
|
||||||
string, string, string, boolean, ['self'; @effectDesert; number][]
|
|
||||||
wound, 伤口, 无效果,占用手牌和牌堆, true,
|
|
||||||
venom, 蛇毒, 1费:打出时移除此牌。弃掉时受到3点伤害, true,
|
|
||||||
curse, 诅咒, 受攻击时物品攻击-1,直到弃掉一张该物品的牌, true, [self; curse; 1]
|
|
||||||
static, 静电, 在手里时受电击伤害+1, true, [self; static; 1]
|
|
||||||
fatigue, 疲劳, 1费/消耗,占用手牌, true,
|
|
||||||
vultureEye, 秃鹫之眼, 0费:打出时移除。抓到时获得3层暴露, true, [self; expose; 3]
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
import type { EffectDesert } from './effectDesert.csv';
|
|
||||||
|
|
||||||
type StatusCardDesertTable = readonly {
|
|
||||||
readonly id: string;
|
|
||||||
readonly name: string;
|
|
||||||
readonly desc: string;
|
|
||||||
readonly unplayable: boolean;
|
|
||||||
readonly effects: readonly ["self", EffectDesert, number];
|
|
||||||
}[];
|
|
||||||
|
|
||||||
export type StatusCardDesert = StatusCardDesertTable[number];
|
|
||||||
|
|
||||||
declare function getData(): StatusCardDesertTable;
|
|
||||||
export default getData;
|
|
||||||
|
|
@ -2,6 +2,7 @@ import type { CellKey, GridInventory, InventoryItem } from '../grid-inventory/ty
|
||||||
import type { GameItemMeta } from '../progress/types';
|
import type { GameItemMeta } from '../progress/types';
|
||||||
import { createRegion, createRegionAxis } from '@/core/region';
|
import { createRegion, createRegionAxis } from '@/core/region';
|
||||||
import type { GameCard, GameCardMeta, PlayerDeck, DeckRegions } from './types';
|
import type { GameCard, GameCardMeta, PlayerDeck, DeckRegions } from './types';
|
||||||
|
import { cardDesertData } from '../data';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a unique card ID for a cell within an item.
|
* Generates a unique card ID for a cell within an item.
|
||||||
|
|
@ -70,11 +71,6 @@ function getItemCells(item: InventoryItem<GameItemMeta>): CellKey[] {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a single card from an inventory item.
|
* Creates a single card from an inventory item.
|
||||||
*
|
|
||||||
* @param itemId - The inventory item instance ID
|
|
||||||
* @param itemData - The CSV item data
|
|
||||||
* @param cellKey - The cell key ("x,y") this card represents
|
|
||||||
* @param cellIndex - Index of the cell for unique ID generation
|
|
||||||
*/
|
*/
|
||||||
function createItemCard(
|
function createItemCard(
|
||||||
itemId: string,
|
itemId: string,
|
||||||
|
|
@ -83,26 +79,23 @@ function createItemCard(
|
||||||
cellIndex: number
|
cellIndex: number
|
||||||
): GameCard {
|
): GameCard {
|
||||||
const cardId = generateCardId(itemId, cellIndex);
|
const cardId = generateCardId(itemId, cellIndex);
|
||||||
|
const cardData = cardDesertData.find(c => c.id === itemData.card.id);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: cardId,
|
id: cardId,
|
||||||
regionId: '',
|
regionId: '',
|
||||||
position: [],
|
position: [],
|
||||||
sourceItemId: itemId,
|
sourceItemId: itemId,
|
||||||
itemData,
|
itemData: cardData ?? null,
|
||||||
cellKey,
|
cellKey,
|
||||||
displayName: itemData.name,
|
displayName: cardData?.name ?? itemData.name,
|
||||||
description: itemData.desc,
|
description: cardData?.desc ?? '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a status card that does not correspond to any inventory item.
|
* Creates a status card that does not correspond to any inventory item.
|
||||||
* Status cards represent temporary effects like wounds, stuns, etc.
|
* Status cards represent temporary effects like wounds, stuns, etc.
|
||||||
*
|
|
||||||
* @param id - Unique identifier for the card instance
|
|
||||||
* @param displayName - Display name (e.g. "伤口", "眩晕")
|
|
||||||
* @param description - Card description / ability text
|
|
||||||
*/
|
*/
|
||||||
function createStatusCard(
|
function createStatusCard(
|
||||||
id: string,
|
id: string,
|
||||||
|
|
@ -123,14 +116,6 @@ function createStatusCard(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a complete player deck from the current inventory state.
|
* Generates a complete player deck from the current inventory state.
|
||||||
*
|
|
||||||
* For each item in the inventory, N cards are generated where N is the
|
|
||||||
* number of cells the item occupies (shape.count).
|
|
||||||
*
|
|
||||||
* All generated cards are placed in the draw pile initially.
|
|
||||||
*
|
|
||||||
* @param inventory - The player's grid inventory
|
|
||||||
* @returns A PlayerDeck with all cards in the draw pile
|
|
||||||
*/
|
*/
|
||||||
function generateDeckFromInventory(inventory: GridInventory<GameItemMeta>): PlayerDeck {
|
function generateDeckFromInventory(inventory: GridInventory<GameItemMeta>): PlayerDeck {
|
||||||
const cards: Record<string, GameCard> = {};
|
const cards: Record<string, GameCard> = {};
|
||||||
|
|
@ -163,12 +148,11 @@ function generateDeckFromInventory(inventory: GridInventory<GameItemMeta>): Play
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates region definitions for deck management.
|
* Creates region definitions for deck management.
|
||||||
* Returns regions for draw pile, hand, discard pile, and exhaust pile.
|
|
||||||
*/
|
*/
|
||||||
function createDeckRegions(): DeckRegions {
|
function createDeckRegions(): DeckRegions {
|
||||||
return {
|
return {
|
||||||
drawPile: createRegion('drawPile', [
|
drawPile: createRegion('drawPile', [
|
||||||
createRegionAxis('index', 0, 0), // unbounded
|
createRegionAxis('index', 0, 0),
|
||||||
]),
|
]),
|
||||||
hand: createRegion('hand', [
|
hand: createRegion('hand', [
|
||||||
createRegionAxis('index', 0, 0),
|
createRegionAxis('index', 0, 0),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import type { Part } from '@/core/part';
|
import type { Part } from '@/core/part';
|
||||||
import type { Region } from '@/core/region';
|
import type { Region } from '@/core/region';
|
||||||
import type { HeroItemFighter1 } from '../data/heroItemFighter1.csv';
|
import type { HeroItemFighter1 } from '../data/heroItemFighter1.csv';
|
||||||
|
import type { CardDesert } from '../data/cardDesert.csv';
|
||||||
import type { CellKey } from '../grid-inventory/types';
|
import type { CellKey } from '../grid-inventory/types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -14,9 +15,9 @@ export interface GameCardMeta {
|
||||||
*/
|
*/
|
||||||
sourceItemId: string | null;
|
sourceItemId: string | null;
|
||||||
/**
|
/**
|
||||||
* Original CSV item data. `null` for status cards.
|
* Original card data from cardDesert.csv. `null` for status cards not in the CSV.
|
||||||
*/
|
*/
|
||||||
itemData: HeroItemFighter1 | null;
|
itemData: CardDesert | null;
|
||||||
/**
|
/**
|
||||||
* The cell key ("x,y") this card represents within the source item's shape.
|
* The cell key ("x,y") this card represents within the source item's shape.
|
||||||
* `null` for status cards.
|
* `null` for status cards.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue