搜索
简体中文
设置
搜索
全部结果 →

开发者

DomiAtlas 以静态文件发布资料。没有服务进程、API 密钥或速率限制:下面每个地址都是同一主机上的文件。

数据布局

每个条目一个 JSON 文件。表格在“columns”里只列一次列名,“rows”的每一项按同样顺序给出一行。缺失值是 null,不是 0。每个表格带自己来源的游戏版本。

{
  "id": "general-cleopatra",
  "name": {"en": "Cleopatra", "zh": "埃及艳后"},
  "tables": [{
    "columns": ["level", "health"],
    "rows": [[1, 12000], [2, 12250]],
    "version": "13.1610"
  }]
}

表格列

同一个列名在所有条目里含义相同。每张表只列它用到的列,所以不是每个条目都有全部列。

列名内容
level等级序号。
age时代序号;对应时代数据里的“order”。
health基础生命值,不含加成。
damage每次攻击的基础伤害,不含加成。
attack_interval两次攻击之间的秒数。
range攻击范围,使用游戏配置单位。
cost升级费用,[资源, 数量] 对;空列表表示免费或不适用。
build_upgrade_time建造或升级时间(秒)。

null 表示客户端没有数值,绝不是 0。

静态 API

先读索引,确认“schemaVersion”,再读列表或单个条目。各语言的名称是单独的文件。

地址内容
/api/v1/index.jsonSchema、数量和端点列表
/api/v1/entities.json全部条目,每行一个摘要
/api/v1/entities/{id}.json单个条目及其表格和关系
/api/v1/names/{locale}.json某一语言的条目名称
/search.{locale}.json某一语言的搜索索引

每张表也有 CSV(适合表格软件),每个分类还有一个 JSON 文件。 数据下载 →

示例

const index = await fetch('https://domiatlas.top/api/v1/index.json').then(r => r.json());
if (index.schemaVersion !== 1) throw new Error('Unsupported schema');
const list = await fetch('https://domiatlas.top/api/v1/entities.json').then(r => r.json());
const id = list.entities.find(e => e.id === 'general-cleopatra').id;
const detail = await fetch(`https://domiatlas.top/api/v1/entities/${id}.json`).then(r => r.json());

规则与限制