wip: data reorg

This commit is contained in:
hypercross 2026-04-17 00:52:47 +08:00
parent c0fa0e91b2
commit f8c008b67d
15 changed files with 111 additions and 206 deletions

View File

@ -0,0 +1,41 @@
# 文件结构
## 系统实现
- `system/`:系统实现。
- `combat/`:管理一次战斗内的战斗状态、流程、触发。
- `progress/`:管理一次冒险的进度。
- `map/`:管理地图生成。
- `grid-inventory/`:管理背包状态。
- `deck/`:管理卡组状态。
## 数据
- `data/`:所有的数据文件
- `desert/`:游戏的测试模组,沙漠区域的内容。
- `card.csv`:所有的卡牌定义。
- `effect.csv`:所有的效应定义。
- `encounter.csv`:所有的遭遇定义。
- `enemy.csv`:所有的敌人和意图定义。
- `item.csv`:所有的玩家物品定义。
- `dialogues/`yarn对话项目目录
- `dialogues.yarnproject`yarn对话项目入口
- `**.yarn`具体的yarn对话文件代码不关心
- `index.ts`:统一导出所有的数据。
- `trigger.ts`:额外的触发器脚本,用于实现测试模组中涉及的效果。
## 开发流程
### SRD / 系统设计
首先编写srd文档。srd文档描述游戏系统和规则并提供少量内联的基础游戏数据。
SRD是系统实现的基础系统实现只能基于SRD不能依赖具体的游戏内容。
### Setting / 环境设定
使用SRD提供的特性来设计环境内容
- 效应:效应在技术上不依赖其他类型内容,可以首先确定。但在创意上可能不会直接设计效应,而是从若干创意中提取共性,并创建一个效应来作为主题。
- 卡牌:部分效应会创建卡牌或修改卡牌。在设计时需要注意。
- 敌人和意图:结合效应与主题表达设计敌人。通常需要为每个敌人设计独特的效应。
- 玩家物品:结合效应与主题表达设计物品。常见物品的效应容易找到替代,不常见物品则有特殊的效应。

View File

@ -1,41 +0,0 @@
# 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 # cardDesert: unified card definitions for item cards and status cards
2 # type: 'item' = inventory item card, 'status' = status effect card
3 # costType: 'energy' = costs energy per turn, 'uses' = limited uses, 'none' = free
4 # targetType: 'single' = target one enemy, 'none' = no target
5 # unplayable: true for status cards that cannot be played
6 # onPlay: effects triggered when card is played
7 # onDraw: effects triggered when card enters hand
8 # onDiscard: effects triggered when card is discarded
9 id,name,desc,type,costType,costCount,targetType,unplayable,onPlay,onDraw,onDiscard
10 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][]
11 sword,剑,【攻击2】【攻击2】,item,energy,1,single,false,[target;attack;2];[target;attack;2],,
12 greataxe,长斧,对全体【攻击5】,item,energy,2,none,false,[all;attack;5],,
13 spear,长枪,【攻击2】【攻击2】【攻击2】,item,energy,1,single,false,[target;attack;2];[target;attack;2];[target;attack;2],,
14 dagger,短刀,【攻击3】【攻击3】,item,energy,1,single,false,[target;attack;3];[target;attack;3],,
15 dart,飞镖,【攻击1】抓一张牌,item,energy,0,single,false,[target;attack;1];[self;draw;1],,
16 crossbow,十字弩,【攻击6】对同一目标打出其他十字弩,item,energy,2,single,false,[target;attack;6];[self;crossbow;0],,
17 shield,盾,【防御3】,item,energy,1,none,false,[self;defend;3],,
18 hat,斗笠,【防御8】,item,energy,2,none,false,[self;defend;8],,
19 cape,披风,【防御2】下回合【防御2】,item,energy,1,none,false,[self;defend;2];[self;defendNext;2],,
20 bracer,护腕,【防御1】抓1张牌,item,energy,0,none,false,[self;defend;1];[self;draw;1],,
21 greatshield,大盾,【防御5】,item,energy,1,none,false,[self;defend;5],,
22 chainmail,锁子甲,本回合受到伤害-3,item,energy,1,none,false,[self;damageReduce;3],,
23 bandage,绷带,从牌堆或弃牌堆随机移除1张伤口,item,uses,3,none,false,[self;removeWound;1],,
24 poisonPotion,淬毒药剂,周围物品的【攻击】+2,item,uses,3,none,false,[self;attackBuff;2],,
25 fortifyPotion,强固药剂,周围物品的【防御】+2,item,uses,3,none,false,[self;defendBuff;2],,
26 vitalityPotion,活力药剂,获得1点能量,item,uses,3,none,false,[self;gainEnergy;1],,
27 focusPotion,集中药剂,抓2张牌,item,uses,3,none,false,[self;draw;2],,
28 healingPotion,治疗药剂,从牌堆或弃牌堆移除3张伤口,item,uses,3,none,false,[self;removeWound;3],,
29 waterBag,水袋,下回合开始时获得1能量抓2张牌,item,energy,1,none,false,[self;energyNext;1];[self;drawNext;2],,
30 rope,绳索,周围物品的牌【防御】+2直到打出,item,energy,1,none,false,[self;defendBuffUntilPlay;2],,
31 belt,腰带,从牌堆周围物品的牌当中选择一张加入手牌,item,energy,0,none,false,[self;drawChoice;1],,
32 torch,火把,下次打出周围物品的牌时将其消耗并获得1能量,item,energy,1,none,false,[self;burnForEnergy;1],,
33 whetstone,磨刀石,周围物品的牌【攻击】+3直到打出,item,energy,1,none,false,[self;attackBuffUntilPlay;3],,
34 blacksmithHammer,铁匠锤,从牌堆/弃牌堆选择一张牌随机变为一张周围物品的牌,item,energy,1,none,false,[self;transformRandom;1],,
35 wound,伤口,无效果占用手牌和牌堆,status,none,0,none,true,,,
36 venom,蛇毒,弃掉时受到3点伤害,status,none,0,none,true,,,[self;attack;3]
37 curse,诅咒,受攻击时物品攻击-1直到弃掉一张该物品的牌,status,none,0,none,true,,[self;curse;1],
38 static,静电,在手里时受电击伤害+1,status,none,0,none,true,,[self;static;1],
39 fatigue,疲劳,占用手牌,status,none,0,none,true,,,
40 vultureEye,秃鹫之眼,抓到时获得3层暴露,status,none,0,none,true,,[self;expose;3],

View File

@ -1,20 +0,0 @@
import type { EffectDesert } from './effectDesert.csv';
type CardDesertTable = readonly {
readonly id: string;
readonly name: string;
readonly desc: string;
readonly type: "item" | "status";
readonly costType: "energy" | "uses" | "none";
readonly costCount: number;
readonly targetType: "single" | "none";
readonly unplayable: boolean;
readonly onPlay: readonly ["self" | "target" | "all" | "random" | "player", EffectDesert, number];
readonly onDraw: readonly ["self" | "target" | "all" | "random" | "player", EffectDesert, number];
readonly onDiscard: readonly ["self" | "target" | "all" | "random" | "player", EffectDesert, number];
}[];
export type CardDesert = CardDesertTable[number];
declare function getData(): CardDesertTable;
export default getData;

View File

@ -0,0 +1,40 @@
# 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
# 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,onPlay,onDraw,onDiscard
string,string,string,'item'|'status','energy'|'uses'|'none',int,'single'|'none',['self'|'target'|'all'|'random';@effect;number][],['self'|'target'|'all'|'random';@effect;number][],['self'|'target'|'all'|'random';@effect;number][]
sword,剑,【攻击2】【攻击2】,item,energy,1,single,[target;attack;2];[target;attack;2],,
greataxe,长斧,对全体【攻击5】,item,energy,2,none,[all;attack;5],,
spear,长枪,【攻击2】【攻击2】【攻击2】,item,energy,1,single,[target;attack;2];[target;attack;2];[target;attack;2],,
dagger,短刀,【攻击3】【攻击3】,item,energy,1,single,[target;attack;3];[target;attack;3],,
dart,飞镖,【攻击1】抓一张牌,item,energy,0,single,[target;attack;1];[self;draw;1],,
crossbow,十字弩,【攻击6】对同一目标打出其他十字弩,item,energy,2,single,[target;attack;6];[self;crossbow;0],,
shield,盾,【防御3】,item,energy,1,none,[self;defend;3],,
hat,斗笠,【防御8】,item,energy,2,none,[self;defend;8],,
cape,披风,【防御2】下回合【防御2】,item,energy,1,none,[self;defend;2];[self;defendNext;2],,
bracer,护腕,【防御1】抓1张牌,item,energy,0,none,[self;defend;1];[self;draw;1],,
greatshield,大盾,【防御5】,item,energy,1,none,[self;defend;5],,
chainmail,锁子甲,本回合受到伤害-3,item,energy,1,none,[self;damageReduce;3],,
bandage,绷带,从牌堆或弃牌堆随机移除1张伤口,item,uses,3,none,[self;removeWound;1],,
poisonPotion,淬毒药剂,周围物品的【攻击】+2,item,uses,3,none,[self;attackBuff;2],,
fortifyPotion,强固药剂,周围物品的【防御】+2,item,uses,3,none,[self;defendBuff;2],,
vitalityPotion,活力药剂,获得1点能量,item,uses,3,none,[self;gainEnergy;1],,
focusPotion,集中药剂,抓2张牌,item,uses,3,none,[self;draw;2],,
healingPotion,治疗药剂,从牌堆或弃牌堆移除3张伤口,item,uses,3,none,[self;removeWound;3],,
waterBag,水袋,下回合开始时获得1能量抓2张牌,item,energy,1,none,[self;energyNext;1];[self;drawNext;2],,
rope,绳索,周围物品的牌【防御】+2直到打出,item,energy,1,none,[self;defendBuffUntilPlay;2],,
belt,腰带,从牌堆周围物品的牌当中选择一张加入手牌,item,energy,0,none,[self;drawChoice;1],,
torch,火把,下次打出周围物品的牌时将其消耗并获得1能量,item,energy,1,none,[self;burnForEnergy;1],,
whetstone,磨刀石,周围物品的牌【攻击】+3直到打出,item,energy,1,none,[self;attackBuffUntilPlay;3],,
blacksmithHammer,铁匠锤,从牌堆/弃牌堆选择一张牌随机变为一张周围物品的牌,item,energy,1,none,[self;transformRandom;1],,
wound,伤口,无效果占用手牌和牌堆,status,none,0,none,,,
venom,蛇毒,弃掉时受到3点伤害,status,none,0,none,,,[self;attack;3]
curse,诅咒,受攻击时物品攻击-1直到弃掉一张该物品的牌,status,none,0,none,,[self;curse;1],
static,静电,在手里时受电击伤害+1,status,none,0,none,,[self;static;1],
fatigue,疲劳,占用手牌,status,none,0,none,,,
vultureEye,秃鹫之眼,抓到时获得3层暴露,status,none,0,none,,[self;expose;3],
1 # cardDesert: unified card definitions for item cards and status cards
2 # type: 'item' = inventory item card, 'status' = status effect card
3 # costType: 'energy' = costs energy per turn, 'uses' = limited uses, 'none' = free
4 # targetType: 'single' = target one enemy, 'none' = no target
5 # onPlay: effects triggered when card is played
6 # onDraw: effects triggered when card enters hand
7 # onDiscard: effects triggered when card is discarded
8 id,name,desc,type,costType,costCount,targetType,onPlay,onDraw,onDiscard
9 string,string,string,'item'|'status','energy'|'uses'|'none',int,'single'|'none',['self'|'target'|'all'|'random';@effect;number][],['self'|'target'|'all'|'random';@effect;number][],['self'|'target'|'all'|'random';@effect;number][]
10 sword,剑,【攻击2】【攻击2】,item,energy,1,single,[target;attack;2];[target;attack;2],,
11 greataxe,长斧,对全体【攻击5】,item,energy,2,none,[all;attack;5],,
12 spear,长枪,【攻击2】【攻击2】【攻击2】,item,energy,1,single,[target;attack;2];[target;attack;2];[target;attack;2],,
13 dagger,短刀,【攻击3】【攻击3】,item,energy,1,single,[target;attack;3];[target;attack;3],,
14 dart,飞镖,【攻击1】抓一张牌,item,energy,0,single,[target;attack;1];[self;draw;1],,
15 crossbow,十字弩,【攻击6】对同一目标打出其他十字弩,item,energy,2,single,[target;attack;6];[self;crossbow;0],,
16 shield,盾,【防御3】,item,energy,1,none,[self;defend;3],,
17 hat,斗笠,【防御8】,item,energy,2,none,[self;defend;8],,
18 cape,披风,【防御2】下回合【防御2】,item,energy,1,none,[self;defend;2];[self;defendNext;2],,
19 bracer,护腕,【防御1】抓1张牌,item,energy,0,none,[self;defend;1];[self;draw;1],,
20 greatshield,大盾,【防御5】,item,energy,1,none,[self;defend;5],,
21 chainmail,锁子甲,本回合受到伤害-3,item,energy,1,none,[self;damageReduce;3],,
22 bandage,绷带,从牌堆或弃牌堆随机移除1张伤口,item,uses,3,none,[self;removeWound;1],,
23 poisonPotion,淬毒药剂,周围物品的【攻击】+2,item,uses,3,none,[self;attackBuff;2],,
24 fortifyPotion,强固药剂,周围物品的【防御】+2,item,uses,3,none,[self;defendBuff;2],,
25 vitalityPotion,活力药剂,获得1点能量,item,uses,3,none,[self;gainEnergy;1],,
26 focusPotion,集中药剂,抓2张牌,item,uses,3,none,[self;draw;2],,
27 healingPotion,治疗药剂,从牌堆或弃牌堆移除3张伤口,item,uses,3,none,[self;removeWound;3],,
28 waterBag,水袋,下回合开始时获得1能量抓2张牌,item,energy,1,none,[self;energyNext;1];[self;drawNext;2],,
29 rope,绳索,周围物品的牌【防御】+2直到打出,item,energy,1,none,[self;defendBuffUntilPlay;2],,
30 belt,腰带,从牌堆周围物品的牌当中选择一张加入手牌,item,energy,0,none,[self;drawChoice;1],,
31 torch,火把,下次打出周围物品的牌时将其消耗并获得1能量,item,energy,1,none,[self;burnForEnergy;1],,
32 whetstone,磨刀石,周围物品的牌【攻击】+3直到打出,item,energy,1,none,[self;attackBuffUntilPlay;3],,
33 blacksmithHammer,铁匠锤,从牌堆/弃牌堆选择一张牌随机变为一张周围物品的牌,item,energy,1,none,[self;transformRandom;1],,
34 wound,伤口,无效果占用手牌和牌堆,status,none,0,none,,,
35 venom,蛇毒,弃掉时受到3点伤害,status,none,0,none,,,[self;attack;3]
36 curse,诅咒,受攻击时物品攻击-1直到弃掉一张该物品的牌,status,none,0,none,,[self;curse;1],
37 static,静电,在手里时受电击伤害+1,status,none,0,none,,[self;static;1],
38 fatigue,疲劳,占用手牌,status,none,0,none,,,
39 vultureEye,秃鹫之眼,抓到时获得3层暴露,status,none,0,none,,[self;expose;3],

View File

@ -1,16 +1,22 @@
# instant: 不施加buff瞬间生效 # instant: 不施加buff瞬间生效
# temporary: 施加buff下回合开始时失效 # temporary: 施加buff下回合开始时失效
# lingering: 施加buff下回合开始时失去1层 # lingering: 施加buff下回合开始时失去1层
# permanent: 施加buff # permanent: 施加buff
# posture: 施加buff每受到1点伤害移除1层 # posture: 施加buff每受到1点伤害移除1层
# card: 不施加buff对玩家时在玩家弃牌堆创建同名卡牌对敌人无效敌人没有牌堆 # card: 不施加buff对玩家时在玩家弃牌堆创建同名卡牌对敌人无效敌人没有牌堆
# cardDraw: 不施加buff在抓牌堆洗入同名卡牌 # cardDraw: 不施加buff在抓牌堆洗入同名卡牌
# cardHand不施加buff在玩家手牌中创建同名卡牌 # cardHand不施加buff在玩家手牌中创建同名卡牌
# item: 施加buff到周围物品永久生效 # item: 施加buff到周围物品永久生效
# itemUntilPlayed: 施加buff到周围物品物品被打出后失效 # itemTemporary: 施加buff到周围物品持续到下次buff更新
# itemUntilPlay: 施加buff到周围物品物品被打出后失效
# itemUntilDiscard: 施加buff到周围物品物品被弃掉后失效
# itemPermanent: 施加buff到周围物品持续整场冒险
id, name, description, timing id, name, description, timing
string, string, string, 'instant'|'temporary'|'lingering'|'permanent'|'posture'|'card'|'cardDraw'|'cardHand'|'item'|'itemUntilPlayed' string, string, string, 'instant'|'temporary'|'lingering'|'permanent'|'posture'|'card'|'cardDraw'|'cardHand'|'item'|'itemTemporary'|'itemUntilPlay'|'itemUntilDiscard'|'itemPermanent'
attack, 攻击, 对对手造成伤害, instant attack, 攻击, 对对手造成伤害, instant
defend, 防御, 抵消下次行动前受到的伤害, posture defend, 防御, 抵消下次行动前受到的伤害, posture
spike, 尖刺, 对攻击者造成X点伤害, permanent spike, 尖刺, 对攻击者造成X点伤害, permanent
Can't render this file because it has a wrong number of fields in line 18.

View File

@ -4,23 +4,24 @@
# 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 # enemies: array of [enemyId; hp; buffs[]]
# TODO: add a column for id
type,name,description,enemies,dialogue type,name,description,enemies,dialogue
'minion'|'elite'|'event'|'shop'|'camp'|'curio',string,string,[string; int; int][],string 'minion'|'elite'|'event'|'shop'|'camp'|'curio',string,string,[@enemy; int; [effect: @effect;stacks: int]][],string
minion,仙人掌怪,概念:防+强化。【尖刺X】对攻击者造成X点伤害。,[仙人掌怪;20;0];[仙人掌怪;20;0], minion,仙人掌怪,概念:防+强化。【尖刺X】对攻击者造成X点伤害。,[仙人掌怪;20;[]];[仙人掌怪;20;[]],
minion,蛇,概念:攻+强化。给玩家塞入蛇毒牌1费打出时移除此牌。弃掉时受到3点伤害。,[蛇;14;0];[蛇;14;0], minion,蛇,概念:攻+强化。给玩家塞入蛇毒牌1费打出时移除此牌。弃掉时受到3点伤害。,[蛇;14;[]];[蛇;14;[]],
minion,木乃伊,概念:攻+防。【诅咒】:受攻击时物品【攻击】-1直到弃掉一张该物品的牌。,[木乃伊;18;0];[仙人掌怪;20;0], minion,木乃伊,概念:攻+防。【诅咒】:受攻击时物品【攻击】-1直到弃掉一张该物品的牌。,[木乃伊;18;[]];[仙人掌怪;20;[]],
minion,枪手,概念单回高攻。【瞄准X】造成双倍伤害。受伤时失去等量【瞄准】,[枪手;16;0], minion,枪手,概念单回高攻。【瞄准X】造成双倍伤害。受伤时失去等量【瞄准】,[枪手;16;[]],
minion,风卷草,概念:防+强化。【滚动X】攻击时每消耗10点【滚动】造成等量伤害。,[风卷草;22;0];[风卷草;22;0], minion,风卷草,概念:防+强化。【滚动X】攻击时每消耗10点【滚动】造成等量伤害。,[风卷草;22;[]];[风卷草;22;[]],
minion,秃鹫,概念:攻+防。若造成伤害玩家获得秃鹫之眼0费状态牌打出时移除。抓到时获得3层暴露。,[秃鹫;16;0];[仙人掌怪;20;0], minion,秃鹫,概念:攻+防。若造成伤害玩家获得秃鹫之眼0费状态牌打出时移除。抓到时获得3层暴露。,[秃鹫;16;[]];[仙人掌怪;20;[]],
minion,沙蝎,概念:攻+强化。【尾刺X】姿态buff攻击时伤害提升X。,[沙蝎;14;0];[蛇;14;0], minion,沙蝎,概念:攻+强化。【尾刺X】姿态buff攻击时伤害提升X。,[沙蝎;14;[]];[蛇;14;[]],
minion,幼沙虫,概念:防+强化。每回合第一次受伤时玩家失去1点能量。,[幼沙虫;24;0], minion,幼沙虫,概念:防+强化。每回合第一次受伤时玩家失去1点能量。,[幼沙虫;24;[]],
minion,蜥蜴,概念:攻+防+逃跑。【脱皮】:若脱皮达到生命上限,则怪物逃跑,玩家不能获得战斗奖励。,[蜥蜴;20;0];[蜥蜴;20;0], minion,蜥蜴,概念:攻+防+逃跑。【脱皮】:若脱皮达到生命上限,则怪物逃跑,玩家不能获得战斗奖励。,[蜥蜴;20;[]];[蜥蜴;20;[]],
minion,沙匪,概念弱化玩家。【劫掠】对玩家施加的延时debuff。回合开始时随机弃掉一张手牌。,[沙匪;16;0];[枪手;16;0], minion,沙匪,概念弱化玩家。【劫掠】对玩家施加的延时debuff。回合开始时随机弃掉一张手牌。,[沙匪;16;[]];[枪手;16;[]],
elite,风暴之灵,【风暴X】攻击时玩家获得1张静电。受伤时失去等量【风暴】。静电在手里时受【电击】伤害+1,[风暴之灵;44;0], elite,风暴之灵,【风暴X】攻击时玩家获得1张静电。受伤时失去等量【风暴】。静电在手里时受【电击】伤害+1,[风暴之灵;44;[]],
elite,骑马枪手,【冲锋X】受到或造成的伤害翻倍并消耗等量的冲锋。,[骑马枪手;50;0];[枪手;20;4], elite,骑马枪手,【冲锋X】受到或造成的伤害翻倍并消耗等量的冲锋。,[骑马枪手;50;[]];[枪手;20;[]],
elite,沙虫王,召唤幼体沙虫每当玩家弃掉一张牌恢复1生命。,[沙虫王;55;0], elite,沙虫王,召唤幼体沙虫每当玩家弃掉一张牌恢复1生命。,[沙虫王;55;[]],
elite,沙漠守卫,召唤木乃伊会复活木乃伊2次。,[沙漠守卫;48;0];[木乃伊;20;0], elite,沙漠守卫,召唤木乃伊会复活木乃伊2次。,[沙漠守卫;48;[]];[木乃伊;20;[]],
shop,沙漠商人,商店:可以恢复生命、出售装备、附魔物品。,, shop,沙漠商人,商店:可以恢复生命、出售装备、附魔物品。,,
shop,游牧商队,商队:出售稀有物品、移除牌组中一张牌。,, shop,游牧商队,商队:出售稀有物品、移除牌组中一张牌。,,
camp,绿洲篝火,篝火可以恢复生命、补充药水使用次数、获得下次战斗Buff。,, camp,绿洲篝火,篝火可以恢复生命、补充药水使用次数、获得下次战斗Buff。,,
1 # minion (10): minor enemies
4 # shop (2): merchant who sells different stuff
5 # camp (2): consumable restock and heal
6 # curio (8): random pickup of treasure or resources
7 # enemies: array of [enemyId; hp; bonusHp] - bonusHp for scaling # enemies: array of [enemyId; hp; buffs[]]
8 # TODO: add a column for id
9 type,name,description,enemies,dialogue
10 'minion'|'elite'|'event'|'shop'|'camp'|'curio',string,string,[string; int; int][],string 'minion'|'elite'|'event'|'shop'|'camp'|'curio',string,string,[@enemy; int; [effect: @effect;stacks: int]][],string
11 minion,仙人掌怪,概念:防+强化。【尖刺X】:对攻击者造成X点伤害。,[仙人掌怪;20;0];[仙人掌怪;20;0], minion,仙人掌怪,概念:防+强化。【尖刺X】:对攻击者造成X点伤害。,[仙人掌怪;20;[]];[仙人掌怪;20;[]],
12 minion,蛇,概念:攻+强化。给玩家塞入蛇毒牌(1费:打出时移除此牌。弃掉时受到3点伤害)。,[蛇;14;0];[蛇;14;0], minion,蛇,概念:攻+强化。给玩家塞入蛇毒牌(1费:打出时移除此牌。弃掉时受到3点伤害)。,[蛇;14;[]];[蛇;14;[]],
13 minion,木乃伊,概念:攻+防。【诅咒】:受攻击时物品【攻击】-1,直到弃掉一张该物品的牌。,[木乃伊;18;0];[仙人掌怪;20;0], minion,木乃伊,概念:攻+防。【诅咒】:受攻击时物品【攻击】-1,直到弃掉一张该物品的牌。,[木乃伊;18;[]];[仙人掌怪;20;[]],
14 minion,枪手,概念:单回高攻。【瞄准X】:造成双倍伤害。受伤时失去等量【瞄准】,[枪手;16;0], minion,枪手,概念:单回高攻。【瞄准X】:造成双倍伤害。受伤时失去等量【瞄准】,[枪手;16;[]],
15 minion,风卷草,概念:防+强化。【滚动X】:攻击时,每消耗10点【滚动】,造成等量伤害。,[风卷草;22;0];[风卷草;22;0], minion,风卷草,概念:防+强化。【滚动X】:攻击时,每消耗10点【滚动】,造成等量伤害。,[风卷草;22;[]];[风卷草;22;[]],
16 minion,秃鹫,概念:攻+防。若造成伤害,玩家获得秃鹫之眼(0费状态牌:打出时移除。抓到时获得3层暴露)。,[秃鹫;16;0];[仙人掌怪;20;0], minion,秃鹫,概念:攻+防。若造成伤害,玩家获得秃鹫之眼(0费状态牌:打出时移除。抓到时获得3层暴露)。,[秃鹫;16;[]];[仙人掌怪;20;[]],
17 minion,沙蝎,概念:攻+强化。【尾刺X】:姿态buff,攻击时,伤害提升X。,[沙蝎;14;0];[蛇;14;0], minion,沙蝎,概念:攻+强化。【尾刺X】:姿态buff,攻击时,伤害提升X。,[沙蝎;14;[]];[蛇;14;[]],
18 minion,幼沙虫,概念:防+强化。每回合第一次受伤时,玩家失去1点能量。,[幼沙虫;24;0], minion,幼沙虫,概念:防+强化。每回合第一次受伤时,玩家失去1点能量。,[幼沙虫;24;[]],
19 minion,蜥蜴,概念:攻+防+逃跑。【脱皮】:若脱皮达到生命上限,则怪物逃跑,玩家不能获得战斗奖励。,[蜥蜴;20;0];[蜥蜴;20;0], minion,蜥蜴,概念:攻+防+逃跑。【脱皮】:若脱皮达到生命上限,则怪物逃跑,玩家不能获得战斗奖励。,[蜥蜴;20;[]];[蜥蜴;20;[]],
20 minion,沙匪,概念:弱化玩家。【劫掠】:对玩家施加的延时debuff。回合开始时,随机弃掉一张手牌。,[沙匪;16;0];[枪手;16;0], minion,沙匪,概念:弱化玩家。【劫掠】:对玩家施加的延时debuff。回合开始时,随机弃掉一张手牌。,[沙匪;16;[]];[枪手;16;[]],
21 elite,风暴之灵,【风暴X】:攻击时,玩家获得1张静电。受伤时失去等量【风暴】。(静电:在手里时受【电击】伤害+1),[风暴之灵;44;0], elite,风暴之灵,【风暴X】:攻击时,玩家获得1张静电。受伤时失去等量【风暴】。(静电:在手里时受【电击】伤害+1),[风暴之灵;44;[]],
22 elite,骑马枪手,【冲锋X】:受到或造成的伤害翻倍并消耗等量的冲锋。,[骑马枪手;50;0];[枪手;20;4], elite,骑马枪手,【冲锋X】:受到或造成的伤害翻倍并消耗等量的冲锋。,[骑马枪手;50;[]];[枪手;20;[]],
23 elite,沙虫王,召唤幼体沙虫;每当玩家弃掉一张牌,恢复1生命。,[沙虫王;55;0], elite,沙虫王,召唤幼体沙虫;每当玩家弃掉一张牌,恢复1生命。,[沙虫王;55;[]],
24 elite,沙漠守卫,召唤木乃伊;会复活木乃伊2次。,[沙漠守卫;48;0];[木乃伊;20;0], elite,沙漠守卫,召唤木乃伊;会复活木乃伊2次。,[沙漠守卫;48;[]];[木乃伊;20;[]],
25 shop,沙漠商人,商店:可以恢复生命、出售装备、附魔物品。,,
26 shop,游牧商队,商队:出售稀有物品、移除牌组中一张牌。,,
27 camp,绿洲篝火,篝火:可以恢复生命、补充药水使用次数、获得下次战斗Buff。,,

View File

@ -0,0 +1,2 @@
# TODO fill with data from intent.csv
id,name,description
1 # TODO fill with data from intent.csv
2 id,name,description

View File

@ -8,7 +8,7 @@
# effects: effects executed when this intent is active # effects: effects executed when this intent is active
enemy,intentId,initialIntent,nextIntents,brokenIntent,initBuffs,effects enemy,intentId,initialIntent,nextIntents,brokenIntent,initBuffs,effects
string,string,boolean,string[],string[],[@effectDesert;stacks: int][],['self'|'player'|'team';@effectDesert;number][] @enemy,string,boolean,string[],string[],[@effect;stacks: int][],['self'|'player'|'team';@effect;number][]
仙人掌怪,boost,true,boost;defend;defend,,[spike;1],[self;spike;1];[self;defend;4] 仙人掌怪,boost,true,boost;defend;defend,,[spike;1],[self;spike;1];[self;defend;4]
仙人掌怪,defend,false,attack,,[spike;1],[self;defend;8] 仙人掌怪,defend,false,attack,,[spike;1],[self;defend;8]
仙人掌怪,attack,false,boost,,[spike;1],[player;attack;5] 仙人掌怪,attack,false,boost,,[spike;1],[player;attack;5]
1 # enemyDesert: enemy templates and their intent state machines
8 # effects: effects executed when this intent is active
9 enemy,intentId,initialIntent,nextIntents,brokenIntent,initBuffs,effects
10 string,string,boolean,string[],string[],[@effectDesert;stacks: int][],['self'|'player'|'team';@effectDesert;number][] @enemy,string,boolean,string[],string[],[@effect;stacks: int][],['self'|'player'|'team';@effect;number][]
11 仙人掌怪,boost,true,boost;defend;defend,,[spike;1],[self;spike;1];[self;defend;4]
12 仙人掌怪,defend,false,attack,,[spike;1],[self;defend;8]
13 仙人掌怪,attack,false,boost,,[spike;1],[player;attack;5]
14 蛇,poison,true,attack;attack,,,,[player;venom;1];[player;attack;4]

View File

@ -1,5 +1,6 @@
# TODO: add id and description
type,name,shape,card,price type,name,shape,card,price
string,string,string,@cardDesert,int string,string,string,@card,int
weapon,剑,oee,sword,50 weapon,剑,oee,sword,50
weapon,长斧,oees,greataxe,80 weapon,长斧,oees,greataxe,80
weapon,长枪,oeee,spear,75 weapon,长枪,oeee,spear,75
1 type # TODO: add id and description name shape card price
1 # TODO: add id and description
2 type type,name,shape,card,price name shape card price
3 string string,string,string,@card,int string string @cardDesert int
4 weapon weapon,剑,oee,sword,50 oee sword 50
5 weapon weapon,长斧,oees,greataxe,80 长斧 oees greataxe 80
6 weapon weapon,长枪,oeee,spear,75 长枪 oeee spear 75

View File

@ -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;

View File

@ -1,12 +0,0 @@
type EncounterDesertTable = readonly {
readonly type: "minion" | "elite" | "event" | "shop" | "camp" | "curio";
readonly name: string;
readonly description: string;
readonly enemies: readonly [string, number, number];
readonly dialogue: string;
}[];
export type EncounterDesert = EncounterDesertTable[number];
declare function getData(): EncounterDesertTable;
export default getData;

View File

@ -1,16 +0,0 @@
import type { EffectDesert } from './effectDesert.csv';
type EnemyDesertTable = readonly {
readonly enemy: string;
readonly intentId: string;
readonly initialIntent: boolean;
readonly nextIntents: readonly string[];
readonly brokenIntent: readonly string[];
readonly initBuffs: readonly [EffectDesert, readonly stacks: number];
readonly effects: readonly ["self" | "player" | "team", EffectDesert, number];
}[];
export type EnemyDesert = EnemyDesertTable[number];
declare function getData(): EnemyDesertTable;
export default getData;

View File

@ -1,14 +0,0 @@
import type { CardDesert } from './cardDesert.csv';
type HeroItemFighter1Table = readonly {
readonly type: string;
readonly name: string;
readonly shape: string;
readonly card: CardDesert;
readonly price: number;
}[];
export type HeroItemFighter1 = HeroItemFighter1Table[number];
declare function getData(): HeroItemFighter1Table;
export default getData;

View File

@ -1,72 +0,0 @@
# 战斗规则
## 战斗状态
角色表:
- 敌方角色表
- 我方角色表
角色状态:
- hp/最大hp
- buff表名称->层数同名buff合并叠加
战利品表:
- 类型
- 数量
触发规则表:
- 类型
- 层数
## 战斗开始
战斗开始时,首先进行敌方角色的战斗开始结算,然后进行玩家的战斗开始结算。
战斗开始会让玩家抓5张起始手牌让敌方角色初始化意图。
## 回合
进行一个玩家回合,然后进行一个敌方回合,以此重复,直到不存在玩家或敌方角色存活。
玩家回合包含以下阶段:
- buff更新temporary buff清空lingering buff层数-1。
- 回合开始:触发回合开始结算的效果。
- 玩家行动:玩家可以花费能量打出手牌。点结束来结束行动。
- 回合结束:触发回合结束结算的效果。
- 重置手牌弃掉剩余的手牌重新抓5张手牌。
- 重置能量重置到3点能量。
敌人回合包含以下阶段:
- buff更新每个敌人的temporary buff清空lingering buff层数-1。
- 回合开始:触发回合开始结算的效果。
- 敌人行动:每个敌人的意图依次生效,然后更新下一个意图。
- 回合结束:触发回合结束结算的效果。
## 效果
效果结算时,具有以下上下文:
- name: 效果名称
- stacks: 层数
- target: 目标角色,如果有
- source来源角色如果有
- card来源卡牌如果有
效果有以下类型:
- Instant: 立即结算。
- Buff: 施加为buff持续整场战斗。
- BuffTemporary: 施加为buff下次buff更新时清空。
- BuffLingering: 施加为buff下次buff更新时层数-1。
- BuffPosture: 施加为buff受到伤害时扣除等量层数。
- Item: 施加为物品buff对来源卡牌对应的物品周围的物品生效。
- ItemUntilPlayed施加为物品buff对来源卡牌对应的物品生效生效一次后失效。
- ItemTemporary: 施加为物品buff对来源卡牌对应的物品生效下次buff更新时清空。
- ItemPermanent: 施加为物品buff对来源卡牌对应的物品生效战斗结束后依然有效。
- Card: 施加为状态卡牌,洗入玩家弃牌堆。对敌人无效。
- CardDraw洗入抓牌堆。
- CardHand加入手牌。