esim-cli 2026.1201.197 → 2026.1201.199

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/esim.js +40 -49
  2. package/dist/index.js +40 -49
  3. package/package.json +1 -1
package/dist/esim.js CHANGED
@@ -7281,11 +7281,11 @@ description: 在 open-esim 游戏中解释战斗、生产交易和装备成长
7281
7281
 
7282
7282
  \`esim docs\` 离线列出全部规则和教程。\`esim --help\` 列出命令分组,\`esim help me\` 解释个人命令,\`esim battle show --help\` 说明某个动作的参数。命令默认输出文本,\`--json\` 返回结构化数据。
7283
7283
  `,
7284
- "tutorials/buying.md": "# 买东西:看含税报价、设限价和换外汇\n\n本篇演示在市场买一件商品:找报价、预览含税总价、设置能接受的最高单价,以及钱不够时换外汇。规则细节见[经济](../wiki/economy.md)。\n\n## 1. 先看自己在哪、有什么钱\n\n- `esim region` 显示你所在的地区和它的控制国。**只能在所在地区控制国的市场买东西**;浏览报价不受地点限制。\n- `esim wallet` 列出金币和各国货币的余额。商品用挂牌国的货币计价。\n\n## 2. 找报价\n\n- `esim market list` 汇总全球各商品:有报价的国家数、卖单数、库存和最低折合金币单价。\n- `esim market list snack` 列出零食的逐条报价,默认按折合金币单价从低到高;加 `--country Poland` 只看一个国家的市场,加 `--min-qty 10` 只看余量够 10 件的报价。\n- 每行有报价 ID、品质、余量、卖家、挂牌国、单价和创建时间。列表末尾的 `next` 会提示买入预览,以及挂牌货币的外汇报价。\n\n产品写服务端的产品代码,大小写不限,例如 `snack`、`meal`、`small_drink`、`ticket_economy`、`iron`;药水带品级,例如 `lucky:q2`。\n\n## 3. 预览含税总价\n\n运行 `esim market buy 5 snack --dry-run`。预览给出:\n\n- 单价、小计(`subtotal`)、增值税(`vat`)和含税总价(`total`)。增值税由买家在成交额之外支付,按挂牌国和商品类别计算。\n- 卖家、报价 ID、你当前所在地区。\n- 本次最多付出的金额(`max payment`),以及余额和库存的之前→之后。\n\n不指定报价时,默认选你能买的、余量足够的最低价报价。要买某一条报价,加 `--offer <报价ID>`;要指定市场,加 `--country <国家>`。\n\n## 4. 设置最高单价\n\n`--max-price` 是你能接受的**税前单价**,用挂牌国货币写。CLI 据此换算出含税的付款上限。例如在增值税 10% 的市场:\n\n```\nesim market buy 1 snack --max-price 1.50 --dry-run\n```\n\n预览中的 `max payment` 是 1.65(1 × 1.50 × 1.10)。所选报价的单价高于上限时,命令以 `price_limit` 拒绝,写出报价单价和你的上限;提交时报价若已变动、实付会超过 `max payment`,服务端同样拒绝,不会按更高的价格成交。不写 `--max-price` 时,上限取所选报价的单价。\n\n## 5. 钱不够时换外汇\n\n预览发现挂牌货币不够时,会列出需要、持有和缺口(`need`/`have`/`short`),并在 `next` 给出外汇列表;有一条金币报价能补齐缺口时,还会给出兑换预览。\n\n1. `esim exchange list PLN --pay GOLD` 列出用金币买 PLN 的报价,默认按汇率从低到高。\n2. `esim exchange buy <报价ID> <支付金额> --dry-run` 预览付出多少金币、最少能收到多少 PLN。\n3. 确认后去掉 `--dry-run`。结果写出付出、收到和汇率。外汇可以在旅行前换好。\n\n## 6. 下单和核对\n\n确认预览后,去掉 `--dry-run` 正式购买。结果写出买到的商品、品质、数量、单价、小计、增值税、含税总价和卖家,`changed` 写出余额和库存的之前→之后。之后可以用 `esim inventory --product snack` 看库存,用 `esim wallet history --kind trade --since 1d` 看这笔支出。\n\n## 7. 在别国市场买\n\n要买的东西只在别国有报价时:\n\n1. 用 `esim country regions <国家>` 找那个国家控制的地区。\n2. 用 `esim travel <地区> --dry-run` 预览行程,到达后再预览购买。见[出门旅行](travel.md)。\n\n## 8. 挂单卖出\n\n- `esim market sell 5 snack --price 1.50 --dry-run` 预览挂单。`--price` 是挂牌国货币的单价,`--country` 指定挂牌市场,默认是你的国籍国。挂单会托管货物。\n- 卖家国籍与挂牌国不同时,进口税从卖家收入里扣除。\n- `esim market` 列出你的在售挂单,`esim market cancel <挂单>` 撤单,余货退回。\n",
7285
- "tutorials/first-day.md": "# 第一天:看状态、上班、训练和领奖\n\n本篇带你走完一个游戏日的日常:读状态、找工作、上班、训练、补能量和领取每日任务奖励。规则细节见[游戏日与成长](../wiki/day.md)。\n\n## 1. 看今天有什么事\n\n运行 `esim today`。重点看这几行:\n\n- `citizen`:等级、经验、能量、力量、经济技能和余额。\n- `location`:你所在的地区和它的控制国。上班、买东西都和所在地有关。\n- `day`:当前游戏日和换日时间。游戏日按北京时间 00:00 切换,新的一天恢复 30 点能量。\n- `routine`:今天是否已工作、已训练,食品和饮品各还能用几次,以及是否受雇(`job employed`)。\n- `missions`:每日任务、进度和奖励;`tutorial`:新手教程当前这一步。\n\n想看周围在发生什么,再运行 `esim home`。\n\n## 2. 跟着新手教程走\n\n`esim tutorial` 给出当前步骤、进度和奖励,`esim tutorial --all` 列出完整路线。某一步显示 `complete` 时,用 `esim tutorial claim` 领取这一步的奖励。领取失败需要重试时,可以按输出给出的命令加 `--task <步骤>` 指定步骤。\n\n## 3. 找一份工作\n\n`routine` 显示未受雇时,先找职位:\n\n1. `esim job list --eligible --sort wage --limit 5` 列出你的经济技能够得上的职位,按工资从高到低。每行写明公司、雇主、产品、地区、工资、最低经济技能,以及能否申请;不能申请时写原因。\n2. 选中一行后运行 `esim job apply <招聘> --dry-run`,核对公司、工资和地区。接受职位须身处公司所在国家,地点不符时错误会给出当前地区、公司所在地区和前往那里的旅行预览,见[出门旅行](travel.md)。\n3. 确认后去掉 `--dry-run` 再运行一次。每人同时只保留一份工作,换工作前用 `esim job quit` 离开当前的。\n\n## 4. 上班和训练\n\n- `esim work --dry-run` 预览这一班的公司、产品和工资;`esim work` 正式上班,结果写出产量、税前工资、所得税、到手工资,以及经验和经济技能的增长。每个游戏日只能工作一次,当天已工作时结果标出 `alreadyDone` 和下次可做的时间。\n- `esim train` 每个游戏日训练一次,结果写出力量增长和当前力量。\n\n## 5. 补能量\n\n能量最多 100 点,出手和经济舱旅行会消耗能量。\n\n- `esim inventory --product snack` 查看零食库存。\n- `esim eat` 默认吃一份零食(SNACK),`esim eat meal` 吃餐食,`esim eat small_drink` 或 `esim eat large_drink` 喝饮品。零食和小饮品恢复 20 点,餐食和大饮品恢复 50 点,最多到 100 点。\n- 食品和饮品各有每日次数,`esim today` 的 `meals` 显示剩余次数。库存不够时,可以去市场买,见[买东西](buying.md)。\n\n## 6. 领取每日任务奖励\n\n完成一项每日任务后,`esim today` 的 `next` 会给出领取命令:\n\n- `esim claim routine` 领取\"工作并训练\"这一项;其他任务换成对应的名字(`market`、`spar`、`battle`、`drill`)。裸 `esim claim` 不领取任何东西,只列出当前可领的奖励。\n- 领满 3 项后,用 `esim claim --chest` 开当天的宝箱。\n- 不想做某项未完成的任务,可以用 `esim claim --reroll <任务>` 换掉,每个游戏日一次。\n\n## 7. 核对这一天的收支\n\n`esim wallet` 显示各币种余额,`esim wallet history --since 1d` 列出最近一天的工资、交易、税和奖励等收支。\n",
7284
+ "tutorials/buying.md": "# 买东西:看含税报价、设限价和换外汇\n\n本篇演示在市场买一件商品:找报价、预览含税总价、设置能接受的最高单价,以及钱不够时换外汇。规则细节见[经济](../wiki/economy.md)。\n\n## 1. 先看自己在哪、有什么钱\n\n- `esim region` 显示你所在的地区和它的控制国。**在哪都能买任何国家市场的商品,不用旅行**;不写 `--country` 时,默认在所在地区控制国的市场买。\n- `esim wallet` 列出金币和各国货币的余额。商品用挂牌国的货币计价,所以买别国的商品要先有那国的货币。\n\n## 2. 找报价\n\n- `esim market list` 汇总全球各商品:有报价的国家数、卖单数、库存和最低折合金币单价。\n- `esim market list snack` 列出零食的逐条报价,默认按折合金币单价从低到高;加 `--country Poland` 只看一个国家的市场,加 `--min-qty 10` 只看余量够 10 件的报价。\n- 每行有报价 ID、品质、余量、卖家、挂牌国、单价和创建时间。列表末尾的 `next` 会提示买入预览,以及挂牌货币的外汇报价。\n\n产品写服务端的产品代码,大小写不限,例如 `snack`、`meal`、`small_drink`、`ticket_economy`、`iron`;药水带品级,例如 `lucky:q2`。\n\n## 3. 预览含税总价\n\n运行 `esim market buy 5 snack --dry-run`。预览给出:\n\n- 单价、小计(`subtotal`)、增值税(`vat`)和含税总价(`total`)。增值税由买家在成交额之外支付,按挂牌国和商品类别计算。\n- 卖家、报价 ID 和报价所在的市场(`market`)。\n- 本次最多付出的金额(`max payment`),以及余额和库存的之前→之后。\n\n不指定报价时,默认选你能买的、余量足够的最低价报价。要买某一条报价,加 `--offer <报价ID>`,命令自动在这条报价所在的市场买;要指定市场,加 `--country <国家>`。`--offer` 和 `--country` 指向不同国家时,命令以 `offer_market` 拒绝。\n\n## 4. 设置最高单价\n\n`--max-price` 是你能接受的**税前单价**,用挂牌国货币写。CLI 据此换算出含税的付款上限。例如在增值税 10% 的市场:\n\n```\nesim market buy 1 snack --max-price 1.50 --dry-run\n```\n\n预览中的 `max payment` 是 1.65(1 × 1.50 × 1.10)。所选报价的单价高于上限时,命令以 `price_limit` 拒绝,写出报价单价和你的上限;提交时报价若已变动、实付会超过 `max payment`,服务端同样拒绝,不会按更高的价格成交。不写 `--max-price` 时,上限取所选报价的单价。\n\n## 5. 钱不够时换外汇\n\n预览发现挂牌货币不够时,会列出需要、持有和缺口(`need`/`have`/`short`),并在 `next` 给出外汇列表;有一条金币报价能补齐缺口时,还会给出兑换预览。\n\n1. `esim exchange list PLN --pay GOLD` 列出用金币买 PLN 的报价,默认按汇率从低到高。\n2. `esim exchange buy <报价ID> <支付金额> --dry-run` 预览付出多少金币、最少能收到多少 PLN。\n3. 确认后去掉 `--dry-run`。结果写出付出、收到和汇率。\n\n## 6. 下单和核对\n\n确认预览后,去掉 `--dry-run` 正式购买。结果写出买到的商品、品质、数量、单价、小计、增值税、含税总价和卖家,`changed` 写出余额和库存的之前→之后。之后可以用 `esim inventory --product snack` 看库存,用 `esim wallet history --kind trade --since 1d` 看这笔支出。\n\n## 7. 在别国市场买\n\nPrimera 11.10.4(2022 年 10 月)起,商品市场可以全球购买,不用旅行:\n\n1. `esim market list snack` 不带 `--country` 时比较各国报价;折合金币单价便于跨币种比较。\n2. `esim market buy 5 snack --country Germany --dry-run` 预览在德国市场买。价格、VAT 和进口税都按挂牌国算,用挂牌国的货币付;钱不够时按第 5 步换外汇。\n3. 也可以直接 `esim market buy 5 snack --offer <报价ID> --dry-run`,不用再写国家。\n\n失去全部领土的国家,市场暂停成交:挂单保留,恢复领土后才能买。这时命令以 `market_listing_country_unavailable` 拒绝,`next` 给出不限国家的报价列表。\n\n## 8. 挂单卖出\n\n- `esim market sell 5 snack --price 1.50 --dry-run` 预览挂单。`--price` 是挂牌国货币的单价,`--country` 指定挂牌市场,默认是你的国籍国。挂单会托管货物。\n- 卖家国籍与挂牌国不同时,进口税从卖家收入里扣除。\n- `esim market` 列出你的在售挂单,`esim market cancel <挂单>` 撤单,余货退回。\n",
7285
+ "tutorials/first-day.md": "# 第一天:看状态、上班、训练和领奖\n\n本篇带你走完一个游戏日的日常:读状态、找工作、上班、训练、补能量和领取每日任务奖励。规则细节见[游戏日与成长](../wiki/day.md)。\n\n## 1. 看今天有什么事\n\n运行 `esim today`。重点看这几行:\n\n- `citizen`:等级、经验、能量、力量、经济技能和余额。\n- `location`:你所在的地区和它的控制国。上班和所在地有关;买东西在哪都能买,所在地只决定默认打开哪国的市场。\n- `day`:当前游戏日和换日时间。游戏日按北京时间 00:00 切换,新的一天恢复 30 点能量。\n- `routine`:今天是否已工作、已训练,食品和饮品各还能用几次,以及是否受雇(`job employed`)。\n- `missions`:每日任务、进度和奖励;`tutorial`:新手教程当前这一步。\n\n想看周围在发生什么,再运行 `esim home`。\n\n## 2. 跟着新手教程走\n\n`esim tutorial` 给出当前步骤、进度和奖励,`esim tutorial --all` 列出完整路线。某一步显示 `complete` 时,用 `esim tutorial claim` 领取这一步的奖励。领取失败需要重试时,可以按输出给出的命令加 `--task <步骤>` 指定步骤。\n\n## 3. 找一份工作\n\n`routine` 显示未受雇时,先找职位:\n\n1. `esim job list --eligible --sort wage --limit 5` 列出你的经济技能够得上的职位,按工资从高到低。每行写明公司、雇主、产品、地区、工资、最低经济技能,以及能否申请;不能申请时写原因。\n2. 选中一行后运行 `esim job apply <招聘> --dry-run`,核对公司、工资和地区。接受职位须身处公司所在国家,地点不符时错误会给出当前地区、公司所在地区和前往那里的旅行预览,见[出门旅行](travel.md)。\n3. 确认后去掉 `--dry-run` 再运行一次。每人同时只保留一份工作,换工作前用 `esim job quit` 离开当前的。\n\n## 4. 上班和训练\n\n- `esim work --dry-run` 预览这一班的公司、产品和工资;`esim work` 正式上班,结果写出产量、税前工资、所得税、到手工资,以及经验和经济技能的增长。每个游戏日只能工作一次,当天已工作时结果标出 `alreadyDone` 和下次可做的时间。\n- `esim train` 每个游戏日训练一次,结果写出力量增长和当前力量。\n\n## 5. 补能量\n\n能量最多 100 点,出手和经济舱旅行会消耗能量。\n\n- `esim inventory --product snack` 查看零食库存。\n- `esim eat` 默认吃一份零食(SNACK),`esim eat meal` 吃餐食,`esim eat small_drink` 或 `esim eat large_drink` 喝饮品。零食和小饮品恢复 20 点,餐食和大饮品恢复 50 点,最多到 100 点。\n- 食品和饮品各有每日次数,`esim today` 的 `meals` 显示剩余次数。库存不够时,可以去市场买,见[买东西](buying.md)。\n\n## 6. 领取每日任务奖励\n\n完成一项每日任务后,`esim today` 的 `next` 会给出领取命令:\n\n- `esim claim routine` 领取\"工作并训练\"这一项;其他任务换成对应的名字(`market`、`spar`、`battle`、`drill`)。裸 `esim claim` 不领取任何东西,只列出当前可领的奖励。\n- 领满 3 项后,用 `esim claim --chest` 开当天的宝箱。\n- 不想做某项未完成的任务,可以用 `esim claim --reroll <任务>` 换掉,每个游戏日一次。\n\n## 7. 核对这一天的收支\n\n`esim wallet` 显示各币种余额,`esim wallet history --since 1d` 列出最近一天的工资、交易、税和奖励等收支。\n",
7286
7286
  "tutorials/organizations.md": '# 加入组织:军团、政党和好友\n\n本篇演示怎样浏览和加入军团、政党,以及怎样找人加好友。规则细节见[组织与好友](../wiki/groups.md)和[政治](../wiki/politics.md)。\n\n## 1. 军团\n\n1. `esim unit list` 列出你国籍国的军团,含等级、成员数和容量。加 `--sort members` 按成员数排序,加 `--search <名字>` 按名字查找。\n2. `esim unit show <军团>` 查看军团详情和招募信息。\n3. `esim unit apply <军团> --message "<留言>"` 提交申请。只能申请本国军团,且你当前没有军团。申请由团长审批,批准也受军团容量限制。\n4. `esim unit` 查看你的军团身份、待审申请、军团资金、日配给和战令。\n5. 入团后,`esim unit supply` 查看当天配给,`esim unit supply claim` 领取。有指定工作条件时,须先完成当日指定公司的工作;同一公民一个游戏日最多领一次。\n6. `esim unit leave` 退团。团长须先用 `esim unit leader <公民>` 交接领导权。\n\n## 2. 政党\n\n1. `esim party list` 列出本国政党,默认按成员数排序;`--sort prestige|congress|presidents|laws` 换排序键,`--search <名字>` 按名字查找。\n2. `esim party show <政党>` 查看主席、声望、纲领和成员。\n3. `esim party join <政党>` 加入本国政党,新成员是学徒。\n4. `esim party leave --dry-run` 预览退党,确认后去掉 `--dry-run`。\n\n本国没有政党时,列表为空,`next` 给出建党命令的帮助和建党条件。\n\n## 3. 好友\n\n1. `esim profile search <名字>` 按名字查找公民,`esim profile <公民>` 查看对方资料;资料末尾给出加好友、发私信、送礼等命令。\n2. `esim friend add <公民>` 发送好友申请。\n3. `esim friend` 查看好友和双向的待审申请。收到申请时,用 `esim friend accept <公民>` 接受或 `esim friend decline <公民>` 拒绝。\n4. `esim friend remove <公民>` 删除好友关系,删除后可以重新申请。\n\n## 4. 在组织里说话\n\n加入军团或政党后,可以用 `esim shout list --unit` 或 `esim shout list --party` 阅读组织频道,用 `esim shout post "<内容>" --channel unit` 发言。频道只有现任成员能看。详见[发布内容](publishing.md)。\n',
7287
7287
  "tutorials/publishing.md": '# 发布内容:喊话、私信、报纸和文章\n\n本篇演示怎样发喊话和私信、创办报纸、发表和修改文章。规则细节见[通信与出版](../wiki/media.md)。\n\n## 1. 喊话\n\n1. `esim shout` 打开本国频道;`esim shout list --global` 看全球频道,`--unit`、`--party`、`--friends` 看你的军团、政党和好友频道。\n2. `esim shout post "<内容>"` 发到本国频道。`--channel world|country|unit|party|friends` 换频道,`--also <频道>` 可重复,同时发到其他频道,每个频道各成一条。喊话最多 201 个字符,超长时错误给出上限和实际长度。\n3. `esim shout show <喊话>` 阅读线程,`esim shout comment <喊话> "<内容>"` 发表评论。\n4. `esim shout delete <喊话> --dry-run` 查看删除会影响哪些内容;删除后,这条喊话的回复入口也会隐藏。确认后去掉 `--dry-run` 提交。\n\n## 2. 私信\n\n- `esim dm` 列出对话,未读的排在前面;`esim dm show <公民>` 打开对话。\n- `esim dm send <公民> "<内容>"` 发送私信;长正文写进文件后用 `@文件名`,或用 `-` 从标准输入读;`--subject <主题>` 加标题。\n- 批量删除收到的私信前,先运行 `esim dm delete 12 13 --dry-run`,将示例编号替换为消息编号。预览会列出本次提交的不同编号;归属在提交时核查。\n\n## 3. 创办报纸\n\n1. `esim paper create "<报名>" --dry-run` 预览:费用 2 金币、余额变化、报名是否已被占用。报名 3–32 个字符,不区分大小写不能重名。\n2. 确认后去掉 `--dry-run`。`esim paper` 查看你的报纸和订阅。\n\n## 4. 发表文章\n\n1. 把正文写进文件,例如 `article.txt`。\n2. `esim article publish --title "<标题>" --body @article.txt --category economical` 发表。只有一份报纸时默认发在这份报纸上,有多份时用 `--paper <报纸>` 指定;`--no-comments` 关闭评论。标题 1–100 字,正文 1–10000 字。\n3. 每位作者每个 UTC 整点小时只能发一篇文章;被拒时 `retry` 给出到下一个整点的时间。\n4. 结果给出文章编号,`esim article show <文章>` 阅读正文、评论和投票。\n\n在正文、喊话和私信里可以用 `[[kind:id]]` 引用游戏对象,例如 `[[company:12]]`、`[[article:1]]`,种类和数量限制见[通信与出版](../wiki/media.md)。\n\n## 5. 修改和删除文章\n\n- `esim article edit <文章> --title "<新标题>"` 改标题;`--body @文件` 改正文,`--category` 改分类,`--no-comments` 或 `--comments` 关闭或打开评论。结果写出改动字段的之前→之后。\n- `esim article delete <文章> --reason "<理由>" --dry-run` 查文章编号、当前评论数与删除影响。核对理由(1–500 字)后去掉 `--dry-run` 提交。文章连同评论、点赞和投票一起消失,当小时的发文额度不退。\n\n## 6. 阅读别人的文章\n\n- `esim article` 查看订阅报纸的最新文章;没有订阅时显示本国热门文章。\n- `esim article list --category economical` 按分类浏览,`--search <关键词>` 按标题或正文查找,`--country <国家>` 按发行国筛选。\n- `esim article like <文章>` 点赞,`esim article comment <文章> "<内容>"` 评论;`esim paper subscribe <报纸>` 订阅报纸。\n',
7288
- "tutorials/travel.md": '# 出门旅行:查地区、预览行程和确认抵达\n\n本篇演示怎样查地图、预览一次旅行、准备机票和能量,并在抵达后核对位置。规则细节见[地图与旅行](../wiki/map.md)。\n\n## 1. 弄清自己在哪\n\n- `esim region` 显示当前地区、控制国、原属国、相邻地区及其资源,以及附近开放的战役。\n- `esim region "Warsaw"` 查看其他地区。\n- 国籍和位置是两回事:旅行只改变你所在的地区,不改变国籍。\n\n## 2. 找目的地\n\n- `esim country regions Poland` 列出某国当前控制的地区。\n- `esim region list --country Poland --occupied` 按原属国筛出被占领的地区;`--controller` 按当前控制国筛选,`--resource iron` 按资源筛选,`--battle` 只看有开放战役的地区。\n- 目的地可以和当前位置不相邻。\n\n## 3. 预览行程\n\n运行 `esim travel <地区> --dry-run`,例如 `esim travel 169 --dry-run`。预览给出:\n\n- 出发地和目的地;\n- 所选机票,以及库存里的经济舱票和商务舱票数量;\n- 所需能量和当前能量;经济舱票消耗 40 点能量,商务舱票不消耗能量;\n- 能否出发(`can travel`),不能时给出原因。\n\n库存里有商务舱票时默认用商务舱票;要指定,加 `--ticket economy` 或 `--ticket business`。\n\n## 4. 准备机票和能量\n\n- 没有机票时,用 `esim market list ticket_economy` 找报价,按[买东西](buying.md)的步骤预览和购买。\n- 能量不够时,预览会写出缺口、当天食品和饮品的剩余次数,以及下个游戏日恢复能量的时间。用 `esim eat` 或 `esim eat meal` 补能量,见[第一天](first-day.md#5-补能量)。\n\n## 5. 出发并核对\n\n去掉 `--dry-run` 正式出发。结果的 `changed` 写出位置、能量、经验和机票库存的之前→之后。抵达时可能掉落一件装备,结果会写出它的名字、部位和品质,`next` 给出查看或穿戴的命令;也可以用 `esim gear` 查看。\n\n再运行 `esim region` 确认已经在目的地。\n\n## 6. 哪些事和所在地有关\n\n- 接受职位和上班:须在公司所在国家。\n- 在市场买东西:须在挂牌国控制的地区。\n- 建厂、迁厂、创办股份公司:使用你当前所在的地区。\n- 发起和参加抵抗战:须在对应的地区或战场。\n\n完整说明见[地图与旅行](../wiki/map.md#哪些操作取决于所在地)。\n',
7288
+ "tutorials/travel.md": '# 出门旅行:查地区、预览行程和确认抵达\n\n本篇演示怎样查地图、预览一次旅行、准备机票和能量,并在抵达后核对位置。规则细节见[地图与旅行](../wiki/map.md)。\n\n## 1. 弄清自己在哪\n\n- `esim region` 显示当前地区、控制国、原属国、相邻地区及其资源,以及附近开放的战役。\n- `esim region "Warsaw"` 查看其他地区。\n- 国籍和位置是两回事:旅行只改变你所在的地区,不改变国籍。\n\n## 2. 找目的地\n\n- `esim country regions Poland` 列出某国当前控制的地区。\n- `esim region list --country Poland --occupied` 按原属国筛出被占领的地区;`--controller` 按当前控制国筛选,`--resource iron` 按资源筛选,`--battle` 只看有开放战役的地区。\n- 目的地可以和当前位置不相邻。\n\n## 3. 预览行程\n\n运行 `esim travel <地区> --dry-run`,例如 `esim travel 169 --dry-run`。预览给出:\n\n- 出发地和目的地;\n- 所选机票,以及库存里的经济舱票和商务舱票数量;\n- 所需能量和当前能量;经济舱票消耗 40 点能量,商务舱票不消耗能量;\n- 能否出发(`can travel`),不能时给出原因。\n\n库存里有商务舱票时默认用商务舱票;要指定,加 `--ticket economy` 或 `--ticket business`。\n\n## 4. 准备机票和能量\n\n- 没有机票时,用 `esim market list ticket_economy` 找报价,按[买东西](buying.md)的步骤预览和购买。\n- 能量不够时,预览会写出缺口、当天食品和饮品的剩余次数,以及下个游戏日恢复能量的时间。用 `esim eat` 或 `esim eat meal` 补能量,见[第一天](first-day.md#5-补能量)。\n\n## 5. 出发并核对\n\n去掉 `--dry-run` 正式出发。结果的 `changed` 写出位置、能量、经验和机票库存的之前→之后。抵达时可能掉落一件装备,结果会写出它的名字、部位和品质,`next` 给出查看或穿戴的命令;也可以用 `esim gear` 查看。\n\n再运行 `esim region` 确认已经在目的地。\n\n## 6. 哪些事和所在地有关\n\n- 接受职位和上班:须在公司所在国家。\n- 在市场买东西:不用到当地,在哪都能买别国市场的商品;所在地只决定默认打开的市场。\n- 建厂、迁厂、创办股份公司:使用你当前所在的地区。\n- 发起和参加抵抗战:须在对应的地区或战场。\n\n完整说明见[地图与旅行](../wiki/map.md#哪些操作取决于所在地)。\n',
7289
7289
  "wiki/battle.md": `# 战斗系统
7290
7290
 
7291
7291
  战役分回合。你每击造成的伤害都加进本轮己方总分,每轮结束时伤害高的一方得一胜,平手归防守方。先拿到八胜的一方赢下战役。领土战决定地区控制权,练习战让你在任何地区试用同一套武器和伤害规则。
@@ -7572,7 +7572,7 @@ P = 基础 × (1 + B) × G × H × C
7572
7572
  ## 商品市场与税
7573
7573
 
7574
7574
  - **挂单**:卖家选挂牌国、产品、单价和数量,货物立即托管。可以部分成交,剩下的继续挂着;撤单退回剩余的货。可以挂到任何还有领土的国家。
7575
- - **购买**:浏览报价不限地点,但购买时必须身处挂牌国控制的地区,与国籍无关。买家可以设最高实付额,超出就拒绝成交。
7575
+ - **购买**:在任何地区都能买任何国家市场的商品,不用旅行,与国籍无关(Primera 11.10.4,2022 年 10 月起商品可以全球购买)。所在地只决定不写 \`--country\` 时默认打开哪个市场:所在地区的控制国。用挂牌国的货币付款,按挂牌国的 VAT 计税。失去全部领土的国家,市场暂停成交,恢复领土后恢复。买家可以设最高实付额,超出就拒绝成交。
7576
7576
  - **成交额** = 单价 × 数量。
7577
7577
  - **VAT** = ⌊成交额 × VAT 税率⌋,由买家另外支付。税率先看挂牌国对这种产品设的 VAT,没有设就用国家税率。
7578
7578
  - **进口税** = ⌊成交额 × 进口税率⌋,只在卖家国籍与挂牌国不同时收,从卖家货款中扣。没有设进口税率时为 0。股份公司卖家的「国籍」是公司所在国。
@@ -7979,7 +7979,7 @@ P = 基础 × (1 + B) × G × H × C
7979
7979
 
7980
7980
  - 建厂、迁厂和创办股份公司使用你当前所在地区,原料厂还要求匹配的 HIGH 资源。见[经济](economy.md#建厂流程)。
7981
7981
  - 接受职位和上班均须身处公司所在国家,以所在地区的当前控制国判断。未就业时,\`work\` 会提示找职位或预览赴任旅行。见[游戏日与成长](day.md#写命令的结果)。
7982
- - 买商品须身处控制国与市场所属国相符的地区。见[经济](economy.md)。
7982
+ - 买商品不受所在地限制,可以直接买别国市场的报价;所在地只决定 \`esim market buy\` 默认打开的市场(所在地区的控制国)。见[经济](economy.md#商品市场与税)。
7983
7983
  - 发起抵抗战须身处被占地区,参加国战或抵抗战须身处该场战役的战场,出手没有额外的地利加伤。见[战斗](battle.md)。
7984
7984
  - \`esim region npcs\` 默认查当前位置,也可以指定其他地区。见[经济](economy.md)。
7985
7985
 
@@ -15041,6 +15041,7 @@ var catalog = [
15041
15041
  { operationId: "createQuickEquipmentAuction", name: "create-quick-equipment-auction", method: "POST", path: "/api/auctions/quick-equipment", spec: "civic.yaml", write: true, retry: "unsafe", description: "快捷挂牌装备", parameters: [{ name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["equipmentId"], properties: { equipmentId: { type: "integer", format: "int64", minimum: 1 } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } } }, responseFields: ["systemSeller", "minNextBid", "sellerName", "sellerNation", "bidderName", "bidderNation", "id", "seller", "qty", "equipment", "specialItem", "company", "minimum", "endsAt", "bidder", "bid", "bidCount", "status"] },
15042
15042
  { operationId: "listOwnAuctions", name: "list-own-auctions", method: "GET", path: "/api/auctions/mine", spec: "civic.yaml", write: false, retry: "unsafe", description: "读取本人挂单", parameters: [{ name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "status", in: "query", schema: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } }, { name: "page", in: "query", description: "页码从 1 开始,默认第 1 页。", schema: { type: "integer", format: "int32", minimum: 1 } }, { name: "sort", in: "query", description: "time 按截止时间升序,price 按公开展示价降序(无人出价使用起拍价),bids 按成功出价次数降序。相同值时 ID 降序。不传时按 ID 降序。", schema: { type: "string", enum: ["time", "price", "bids"] } }, { name: "order", in: "query", description: "省略时使用排序键默认方向。", schema: { type: "string", enum: ["asc", "desc"] } }, { name: "seller", in: "query", schema: { type: "string", enum: ["system", "players"] } }, { name: "minPrice", in: "query", description: "公开展示价的下限(含),单位为金币的分。", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "maxPrice", in: "query", description: "公开展示价的上限(含),单位为金币的分。", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "noBids", in: "query", schema: { type: "boolean" } }, { name: "kind", in: "query", schema: { type: "string", enum: ["equipment", "special", "company"] } }, { name: "quality", in: "query", description: "重复参数表示任一品质。本条件只匹配装备。", schema: { type: "array", items: { type: "integer", minimum: 1, maximum: 8 } } }, { name: "slot", in: "query", description: "重复参数表示任一槽位。本条件只匹配装备。", schema: { type: "array", items: { type: "string", enum: ["head", "body", "legs", "offHand", "footwear", "accessory", "charm", "eye"] } } }, { name: "stat", in: "query", description: "重复参数表示任一属性值大于零。本条件只匹配仍有属性记录的装备。品质、槽位、属性三组条件同时满足。", schema: { type: "array", items: { type: "string", enum: ["baseHit", "strength", "missChanceReduction", "damagePercent", "criticalChance", "maxDamagePercent", "avoidEnergyChance", "morningDamagePercent", "noonDamagePercent", "eveningDamagePercent", "nightDamagePercent", "saveWeaponChance", "findWeaponChance", "economySkillHundredths", "freeFlightChance", "ironProductionPercent", "woodProductionPercent", "grainProductionPercent", "oilProductionPercent", "diamondProductionPercent", "foodProductionPercent", "weaponProductionPercent", "ticketProductionPercent", "improvedSplitChance", "saveAmmunitionChance", "restorationChance", "bonusMergeChance", "otherParametersPercent", "mergePriceReduction", "hitMinBonus", "hitMaxBonus", "accuracy", "endurance", "guard", "agility", "impact"] } } }, { name: "specialItem", in: "query", schema: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] } }, { name: "companyLevel", in: "query", schema: { type: "array", items: { type: "integer", minimum: 0, maximum: 21 } } }, { name: "companyProduct", in: "query", schema: { type: "array", items: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "page", "total"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } }, page: { type: "integer", format: "int32", minimum: 1, description: "当前页码。" }, total: { type: "integer", format: "int64", minimum: 0, description: "所有符合筛选条件的拍卖数量。" } } } } }, responseFields: ["items", "page", "total"] },
15043
15043
  { operationId: "listOwnBidAuctions", name: "list-own-bid-auctions", method: "GET", path: "/api/auctions/my-bids", spec: "civic.yaml", write: false, retry: "unsafe", description: "读取本人曾成功出价的拍卖(含被超价及已结束)", parameters: [{ name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "status", in: "query", schema: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } }, { name: "page", in: "query", description: "页码从 1 开始,默认第 1 页。", schema: { type: "integer", format: "int32", minimum: 1 } }, { name: "sort", in: "query", description: "time 按截止时间升序,price 按公开展示价降序(无人出价使用起拍价),bids 按成功出价次数降序。相同值时 ID 降序。不传时按 ID 降序。", schema: { type: "string", enum: ["time", "price", "bids"] } }, { name: "order", in: "query", description: "省略时使用排序键默认方向。", schema: { type: "string", enum: ["asc", "desc"] } }, { name: "seller", in: "query", schema: { type: "string", enum: ["system", "players"] } }, { name: "minPrice", in: "query", description: "公开展示价的下限(含),单位为金币的分。", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "maxPrice", in: "query", description: "公开展示价的上限(含),单位为金币的分。", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "noBids", in: "query", schema: { type: "boolean" } }, { name: "kind", in: "query", schema: { type: "string", enum: ["equipment", "special", "company"] } }, { name: "quality", in: "query", description: "重复参数表示任一品质。本条件只匹配装备。", schema: { type: "array", items: { type: "integer", minimum: 1, maximum: 8 } } }, { name: "slot", in: "query", description: "重复参数表示任一槽位。本条件只匹配装备。", schema: { type: "array", items: { type: "string", enum: ["head", "body", "legs", "offHand", "footwear", "accessory", "charm", "eye"] } } }, { name: "stat", in: "query", description: "重复参数表示任一属性值大于零。本条件只匹配仍有属性记录的装备。品质、槽位、属性三组条件同时满足。", schema: { type: "array", items: { type: "string", enum: ["baseHit", "strength", "missChanceReduction", "damagePercent", "criticalChance", "maxDamagePercent", "avoidEnergyChance", "morningDamagePercent", "noonDamagePercent", "eveningDamagePercent", "nightDamagePercent", "saveWeaponChance", "findWeaponChance", "economySkillHundredths", "freeFlightChance", "ironProductionPercent", "woodProductionPercent", "grainProductionPercent", "oilProductionPercent", "diamondProductionPercent", "foodProductionPercent", "weaponProductionPercent", "ticketProductionPercent", "improvedSplitChance", "saveAmmunitionChance", "restorationChance", "bonusMergeChance", "otherParametersPercent", "mergePriceReduction", "hitMinBonus", "hitMaxBonus", "accuracy", "endurance", "guard", "agility", "impact"] } } }, { name: "specialItem", in: "query", schema: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] } }, { name: "companyLevel", in: "query", schema: { type: "array", items: { type: "integer", minimum: 0, maximum: 21 } } }, { name: "companyProduct", in: "query", schema: { type: "array", items: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "page", "total"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } }, page: { type: "integer", format: "int32", minimum: 1, description: "当前页码。" }, total: { type: "integer", format: "int64", minimum: 0, description: "所有符合筛选条件的拍卖数量。" } } } } }, responseFields: ["items", "page", "total"] },
15044
+ { operationId: "listOwnAuctionBidMaximums", name: "list-own-auction-bid-maximums", method: "GET", path: "/api/auctions/my-bid-maximums", spec: "civic.yaml", write: false, retry: "unsafe", description: "批量读取本人的拍卖委托上限", parameters: [{ name: "id", in: "query", required: true, style: "form", explode: true, schema: { type: "array", minItems: 1, maxItems: 20, items: { type: "integer", format: "int64", minimum: 1 } } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "array", items: { type: "object", additionalProperties: false, required: ["auctionId", "bid"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, bid: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "本人的委托上限,以金币的分计。" } } } } } }, responseFields: [] },
15044
15045
  { operationId: "getAuction", name: "get-auction", method: "GET", path: "/api/auctions/{id}", spec: "civic.yaml", write: false, retry: "unsafe", description: "公开读取拍卖详情", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } } }, responseFields: ["systemSeller", "minNextBid", "sellerName", "sellerNation", "bidderName", "bidderNation", "id", "seller", "qty", "equipment", "specialItem", "company", "minimum", "endsAt", "bidder", "bid", "bidCount", "status"] },
15045
15046
  { operationId: "cancelAuction", name: "cancel-auction", method: "DELETE", path: "/api/auctions/{id}", spec: "civic.yaml", write: true, retry: "natural", description: "卖家取消尚无出价的拍卖", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } } }, responseFields: ["systemSeller", "minNextBid", "sellerName", "sellerNation", "bidderName", "bidderNation", "id", "seller", "qty", "equipment", "specialItem", "company", "minimum", "endsAt", "bidder", "bid", "bidCount", "status"] },
15046
15047
  { operationId: "getOwnAuctionBid", name: "get-own-auction-bid", method: "GET", path: "/api/auctions/{id}/my-bid", spec: "civic.yaml", write: false, retry: "unsafe", description: "读取本人的出价上限", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { description: "委托上限只对出价者本人开放。金额以分计。", type: "object", additionalProperties: false, required: ["bid"], properties: { bid: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" } } } } }, responseFields: ["bid"] },
@@ -24102,7 +24103,7 @@ function reject2(code, message, context, next) {
24102
24103
  // commands/market.ts
24103
24104
  var command5 = define("economy");
24104
24105
  var countryFlag2 = flag("country", string2().trim().min(1), { source: "Country name, code or ID whose market to browse; all (the default) browses every market" });
24105
- var buyCountry = flag("country", string2().trim().min(1), { source: "Country name, code or ID of the market; you can only buy where the country controls your region (the default)" });
24106
+ var buyCountry = flag("country", string2().trim().min(1), { source: "Country name, code or ID of the market to buy in, from anywhere; default: the offer's market with --offer, else the country controlling your region" });
24106
24107
  var quantity = { ...positional("quantity", true, exports_coerce.number().pipe(int().positive())), source: "Number of units" };
24107
24108
  var product = { ...positional("product"), source: productHelp };
24108
24109
  var dryRun2 = flag("dry-run", boolean2());
@@ -24264,8 +24265,8 @@ function tradeView(data) {
24264
24265
  total: facts.total ?? result.total,
24265
24266
  seller: refText2(facts.seller ?? offer?.seller),
24266
24267
  "seller country": refText2(facts.sellerCountry ?? offer?.sellerCountry ?? undefined),
24268
+ market: refText2(offer?.country ?? undefined),
24267
24269
  offer: facts.order !== undefined ? `#${String(facts.order)} remaining ${String(facts.remaining ?? "")}`.trim() : offer ? `#${String(offer.id)}` : undefined,
24268
- "current region": dry ? result.currentRegion : undefined,
24269
24270
  "max payment": dry ? result.maxPayment : undefined,
24270
24271
  shortfall: result.shortfall,
24271
24272
  balance: moneyLines(changed.money),
@@ -24466,8 +24467,8 @@ var market = [
24466
24467
  const market = first?.country ? row2(first.country) : undefined;
24467
24468
  const run = first && market ? `esim market buy 1 ${shellWord(input)} --country ${market.id} --dry-run` : undefined;
24468
24469
  const next = run && first ? [
24469
- { run, note: "Buying requires a region controlled by the listing country." },
24470
- { run: browseExchange(first.price.currency), note: "Find offers for the listing currency before traveling." }
24470
+ { run, note: `You can buy from any region; you pay in ${first.price.currency}, the listing country's currency.` },
24471
+ { run: browseExchange(first.price.currency), note: "Find offers for the listing currency." }
24471
24472
  ] : await noOffers(viewer, item, input, country !== undefined, world);
24472
24473
  return listHeader(header, { ...page, ...next.length ? { next } : {} }, marketCountry ? { country: marketCountry } : {});
24473
24474
  }
@@ -24475,7 +24476,7 @@ var market = [
24475
24476
  command5({
24476
24477
  path: ["market", "buy"],
24477
24478
  session: true,
24478
- summary: "Buy from the market of the country controlling your current region",
24479
+ summary: "Buy from any country's market without traveling; default: the country controlling your region",
24479
24480
  args: [
24480
24481
  quantity,
24481
24482
  product,
@@ -24484,10 +24485,9 @@ var market = [
24484
24485
  buyCountry,
24485
24486
  dryRun2
24486
24487
  ],
24487
- examples: ["esim market buy 5 snack --max-price 1.50 --dry-run", "esim market buy 2 lucky:q2 --dry-run"],
24488
+ examples: ["esim market buy 5 snack --max-price 1.50 --dry-run", "esim market buy 2 lucky:q2 --dry-run", "esim market buy 3 snack --country Germany --dry-run"],
24488
24489
  output: {
24489
- offer: "Current eligible quote",
24490
- currentRegion: "Your region when quoting the purchase",
24490
+ offer: "Current eligible quote, with its market country",
24491
24491
  quantity: "Requested quantity",
24492
24492
  subtotal: "Quoted price before tax",
24493
24493
  vat: "Estimated VAT",
@@ -24525,46 +24525,40 @@ var market = [
24525
24525
  const citizen = account.citizen;
24526
24526
  const world = await geography(ctx);
24527
24527
  const name = textArg(args, "country");
24528
- const current = await location(ctx, citizen, Promise.resolve(world));
24529
- const controller = current.country?.id;
24530
- const country = name ? choose(world.countries, name, "country").id : typeof controller === "number" ? controller : undefined;
24531
- const input = shellWord(string4(args.product));
24532
- const browse = (where = country) => `esim market list ${input}${where === undefined ? "" : ` --country ${where}`}`;
24533
- const wrongMarket = async (market, code = "market_location", here = current) => {
24534
- const controls = market === undefined ? [] : await observe(() => ctx.call("list-lands"));
24535
- const controlled = new Set("error" in controls ? [] : controls.filter((land) => land.owner === market).map((land) => land.id));
24536
- const candidates = rankedRegions(world, world.lands.find((land) => land.id === here.region.id), (land) => controlled.has(land.id));
24537
- return refuse3(code, "You can only buy in the market of the country that controls your region.", {
24538
- currentRegion: here.region,
24539
- hereCountry: here.country ?? undefined,
24540
- market: countryRef(world, market) ?? undefined,
24541
- requiredRegions: candidates.map(({ id, name }) => ({ id, name }))
24542
- }, ...candidates.slice(0, 3).map(({ id }) => travelPreview(id)), market === undefined ? "esim region" : `esim country regions ${market}`, here.country ? `esim market buy ${qty} ${input} --dry-run` : undefined);
24543
- };
24544
- if (country === undefined || country !== current.country?.id)
24545
- return wrongMarket(country);
24528
+ const named = name ? choose(world.countries, name, "country").id : undefined;
24546
24529
  const offerId = intArg(args, "offer");
24547
24530
  const pid = string4(citizen.pid);
24548
- let order;
24549
- if (offerId === undefined) {
24531
+ const input = shellWord(string4(args.product));
24532
+ let order = offerId === undefined ? undefined : await ctx.call("get-market-order", { id: offerId });
24533
+ const home = async () => {
24534
+ const here = await observe(() => location(ctx, citizen, Promise.resolve(world)));
24535
+ const id = "error" in here ? undefined : here.country?.id;
24536
+ return typeof id === "number" ? id : number4(citizen.nation);
24537
+ };
24538
+ const country = named ?? order?.country ?? await home();
24539
+ const market = countryRef(world, country) ?? { id: country, name: `#${String(country)}` };
24540
+ const browse = () => `esim market list ${input} --country ${country}`;
24541
+ const browseAll = `esim market list ${input}`;
24542
+ if (order && order.country !== country) {
24543
+ return refuse3("offer_market", `Offer #${String(offerId)} is in the ${countryRef(world, order.country)?.name ?? `#${String(order.country)}`} market, not ${market.name}.`, { offer: listing(order, world), market }, `esim market buy ${qty} ${input} --offer ${String(offerId)} --dry-run`, browse());
24544
+ }
24545
+ const closed = () => refuse3("market_listing_country_unavailable", `${market.name} controls no regions, so its market is closed until it regains territory.`, { market }, browseAll);
24546
+ const lands = await observe(() => ctx.call("list-lands"));
24547
+ if (!("error" in lands) && !lands.some((land) => land.owner === country))
24548
+ return closed();
24549
+ if (order === undefined) {
24550
24550
  const found = await quote2(ctx, { country, ...product }, qty, pid);
24551
24551
  if (!found.match) {
24552
24552
  const best = found.seen.reduce((top, entry) => !top || number4(entry.qty) > number4(top.qty) ? entry : top, undefined);
24553
24553
  const skipped = found.own ? ` (${found.own === 1 ? "your own offer is" : `your ${found.own} own offers are`} not counted; you cannot buy from yourself)` : "";
24554
- return refuse3("no_offer", `No single offer in ${countryRef(world, country)?.name ?? "this market"} has ${qty} units${best ? `; the largest has ${String(best.qty)}` : ""}${skipped}.`, {
24554
+ return refuse3("no_offer", `No single offer in ${market.name} has ${qty} units${best ? `; the largest has ${String(best.qty)}` : ""}${skipped}.`, {
24555
24555
  requested: qty,
24556
24556
  ...found.own ? { ownOffers: found.own } : {},
24557
24557
  offers: offerRows(found.seen, world)
24558
- }, best ? `esim market buy ${String(best.qty)} ${input} --offer ${String(best.id)} --dry-run` : undefined, browse());
24558
+ }, best ? `esim market buy ${String(best.qty)} ${input} --offer ${String(best.id)} --dry-run` : undefined, browse(), browseAll);
24559
24559
  }
24560
24560
  order = found.match;
24561
24561
  } else {
24562
- order = await ctx.call("get-market-order", { id: offerId });
24563
- }
24564
- if (offerId !== undefined) {
24565
- if (order.country !== country) {
24566
- return wrongMarket(order.country);
24567
- }
24568
24562
  const selected = string4(order.item);
24569
24563
  const matches = selected === product.item && (product.quality === undefined || product.quality === number4(order.quality));
24570
24564
  if (!matches) {
@@ -24605,10 +24599,11 @@ var market = [
24605
24599
  ...balance < totals.total ? { shortfall: money(totals.total - balance) } : {}
24606
24600
  };
24607
24601
  const exchange = asset.startsWith("cur:") ? browseExchange(currency) : undefined;
24602
+ const orderId = order.id;
24608
24603
  const fundsContext = (total, unit) => ({
24609
24604
  payment: shortfall2(money(total), money(balance)),
24610
24605
  lowestPrice: money(unit),
24611
- offer: number4(order.id)
24606
+ offer: number4(orderId)
24612
24607
  });
24613
24608
  if (args["dry-run"]) {
24614
24609
  if (balance < totals.total) {
@@ -24617,7 +24612,6 @@ var market = [
24617
24612
  return {
24618
24613
  ...preview,
24619
24614
  dryRun: true,
24620
- currentRegion: current.region,
24621
24615
  changed: {},
24622
24616
  context: fundsContext(totals.total, price),
24623
24617
  ...next.length ? { next } : {}
@@ -24626,7 +24620,6 @@ var market = [
24626
24620
  return {
24627
24621
  ...preview,
24628
24622
  dryRun: true,
24629
- currentRegion: current.region,
24630
24623
  changed: { money: { [currency]: change(money(balance).value, money(balance - totals.total).value) }, stock: change(before, before + qty) }
24631
24624
  };
24632
24625
  }
@@ -24637,10 +24630,8 @@ var market = [
24637
24630
  try {
24638
24631
  purchase = row2(offerId === undefined ? await ctx.call("purchase-lowest-market-order", {}, { country, item: string4(order.item), quality: number4(order.quality), qty, maxPayment }) : await ctx.call("purchase-market-order", { id: offerId }, { qty, maxPayment }));
24639
24632
  } catch (error) {
24640
- if (error instanceof CommandError && error.error === "market_purchase_location_required") {
24641
- const latest = await observe(async () => location(ctx, (await ctx.call("me")).citizen, Promise.resolve(world)));
24642
- return wrongMarket(order.country, error.error, "error" in latest ? current : latest);
24643
- }
24633
+ if (error instanceof CommandError && error.error === "market_listing_country_unavailable")
24634
+ return closed();
24644
24635
  if (error instanceof CommandError && error.error === "insufficient_funds") {
24645
24636
  const funds = marketFunds.safeParse(error.details.context);
24646
24637
  if (funds.success) {
@@ -38080,7 +38071,7 @@ function saveCredentials(store, credentials) {
38080
38071
  }
38081
38072
 
38082
38073
  // version.ts
38083
- var version2 = "2026.1201.197";
38074
+ var version2 = "2026.1201.199";
38084
38075
  var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
38085
38076
  var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
38086
38077
  var releaseUrl = (release) => `https://github.com/CorrectRoadH/open-esim/releases/download/cli-v${release}`;
package/dist/index.js CHANGED
@@ -7277,11 +7277,11 @@ description: 在 open-esim 游戏中解释战斗、生产交易和装备成长
7277
7277
 
7278
7278
  \`esim docs\` 离线列出全部规则和教程。\`esim --help\` 列出命令分组,\`esim help me\` 解释个人命令,\`esim battle show --help\` 说明某个动作的参数。命令默认输出文本,\`--json\` 返回结构化数据。
7279
7279
  `,
7280
- "tutorials/buying.md": "# 买东西:看含税报价、设限价和换外汇\n\n本篇演示在市场买一件商品:找报价、预览含税总价、设置能接受的最高单价,以及钱不够时换外汇。规则细节见[经济](../wiki/economy.md)。\n\n## 1. 先看自己在哪、有什么钱\n\n- `esim region` 显示你所在的地区和它的控制国。**只能在所在地区控制国的市场买东西**;浏览报价不受地点限制。\n- `esim wallet` 列出金币和各国货币的余额。商品用挂牌国的货币计价。\n\n## 2. 找报价\n\n- `esim market list` 汇总全球各商品:有报价的国家数、卖单数、库存和最低折合金币单价。\n- `esim market list snack` 列出零食的逐条报价,默认按折合金币单价从低到高;加 `--country Poland` 只看一个国家的市场,加 `--min-qty 10` 只看余量够 10 件的报价。\n- 每行有报价 ID、品质、余量、卖家、挂牌国、单价和创建时间。列表末尾的 `next` 会提示买入预览,以及挂牌货币的外汇报价。\n\n产品写服务端的产品代码,大小写不限,例如 `snack`、`meal`、`small_drink`、`ticket_economy`、`iron`;药水带品级,例如 `lucky:q2`。\n\n## 3. 预览含税总价\n\n运行 `esim market buy 5 snack --dry-run`。预览给出:\n\n- 单价、小计(`subtotal`)、增值税(`vat`)和含税总价(`total`)。增值税由买家在成交额之外支付,按挂牌国和商品类别计算。\n- 卖家、报价 ID、你当前所在地区。\n- 本次最多付出的金额(`max payment`),以及余额和库存的之前→之后。\n\n不指定报价时,默认选你能买的、余量足够的最低价报价。要买某一条报价,加 `--offer <报价ID>`;要指定市场,加 `--country <国家>`。\n\n## 4. 设置最高单价\n\n`--max-price` 是你能接受的**税前单价**,用挂牌国货币写。CLI 据此换算出含税的付款上限。例如在增值税 10% 的市场:\n\n```\nesim market buy 1 snack --max-price 1.50 --dry-run\n```\n\n预览中的 `max payment` 是 1.65(1 × 1.50 × 1.10)。所选报价的单价高于上限时,命令以 `price_limit` 拒绝,写出报价单价和你的上限;提交时报价若已变动、实付会超过 `max payment`,服务端同样拒绝,不会按更高的价格成交。不写 `--max-price` 时,上限取所选报价的单价。\n\n## 5. 钱不够时换外汇\n\n预览发现挂牌货币不够时,会列出需要、持有和缺口(`need`/`have`/`short`),并在 `next` 给出外汇列表;有一条金币报价能补齐缺口时,还会给出兑换预览。\n\n1. `esim exchange list PLN --pay GOLD` 列出用金币买 PLN 的报价,默认按汇率从低到高。\n2. `esim exchange buy <报价ID> <支付金额> --dry-run` 预览付出多少金币、最少能收到多少 PLN。\n3. 确认后去掉 `--dry-run`。结果写出付出、收到和汇率。外汇可以在旅行前换好。\n\n## 6. 下单和核对\n\n确认预览后,去掉 `--dry-run` 正式购买。结果写出买到的商品、品质、数量、单价、小计、增值税、含税总价和卖家,`changed` 写出余额和库存的之前→之后。之后可以用 `esim inventory --product snack` 看库存,用 `esim wallet history --kind trade --since 1d` 看这笔支出。\n\n## 7. 在别国市场买\n\n要买的东西只在别国有报价时:\n\n1. 用 `esim country regions <国家>` 找那个国家控制的地区。\n2. 用 `esim travel <地区> --dry-run` 预览行程,到达后再预览购买。见[出门旅行](travel.md)。\n\n## 8. 挂单卖出\n\n- `esim market sell 5 snack --price 1.50 --dry-run` 预览挂单。`--price` 是挂牌国货币的单价,`--country` 指定挂牌市场,默认是你的国籍国。挂单会托管货物。\n- 卖家国籍与挂牌国不同时,进口税从卖家收入里扣除。\n- `esim market` 列出你的在售挂单,`esim market cancel <挂单>` 撤单,余货退回。\n",
7281
- "tutorials/first-day.md": "# 第一天:看状态、上班、训练和领奖\n\n本篇带你走完一个游戏日的日常:读状态、找工作、上班、训练、补能量和领取每日任务奖励。规则细节见[游戏日与成长](../wiki/day.md)。\n\n## 1. 看今天有什么事\n\n运行 `esim today`。重点看这几行:\n\n- `citizen`:等级、经验、能量、力量、经济技能和余额。\n- `location`:你所在的地区和它的控制国。上班、买东西都和所在地有关。\n- `day`:当前游戏日和换日时间。游戏日按北京时间 00:00 切换,新的一天恢复 30 点能量。\n- `routine`:今天是否已工作、已训练,食品和饮品各还能用几次,以及是否受雇(`job employed`)。\n- `missions`:每日任务、进度和奖励;`tutorial`:新手教程当前这一步。\n\n想看周围在发生什么,再运行 `esim home`。\n\n## 2. 跟着新手教程走\n\n`esim tutorial` 给出当前步骤、进度和奖励,`esim tutorial --all` 列出完整路线。某一步显示 `complete` 时,用 `esim tutorial claim` 领取这一步的奖励。领取失败需要重试时,可以按输出给出的命令加 `--task <步骤>` 指定步骤。\n\n## 3. 找一份工作\n\n`routine` 显示未受雇时,先找职位:\n\n1. `esim job list --eligible --sort wage --limit 5` 列出你的经济技能够得上的职位,按工资从高到低。每行写明公司、雇主、产品、地区、工资、最低经济技能,以及能否申请;不能申请时写原因。\n2. 选中一行后运行 `esim job apply <招聘> --dry-run`,核对公司、工资和地区。接受职位须身处公司所在国家,地点不符时错误会给出当前地区、公司所在地区和前往那里的旅行预览,见[出门旅行](travel.md)。\n3. 确认后去掉 `--dry-run` 再运行一次。每人同时只保留一份工作,换工作前用 `esim job quit` 离开当前的。\n\n## 4. 上班和训练\n\n- `esim work --dry-run` 预览这一班的公司、产品和工资;`esim work` 正式上班,结果写出产量、税前工资、所得税、到手工资,以及经验和经济技能的增长。每个游戏日只能工作一次,当天已工作时结果标出 `alreadyDone` 和下次可做的时间。\n- `esim train` 每个游戏日训练一次,结果写出力量增长和当前力量。\n\n## 5. 补能量\n\n能量最多 100 点,出手和经济舱旅行会消耗能量。\n\n- `esim inventory --product snack` 查看零食库存。\n- `esim eat` 默认吃一份零食(SNACK),`esim eat meal` 吃餐食,`esim eat small_drink` 或 `esim eat large_drink` 喝饮品。零食和小饮品恢复 20 点,餐食和大饮品恢复 50 点,最多到 100 点。\n- 食品和饮品各有每日次数,`esim today` 的 `meals` 显示剩余次数。库存不够时,可以去市场买,见[买东西](buying.md)。\n\n## 6. 领取每日任务奖励\n\n完成一项每日任务后,`esim today` 的 `next` 会给出领取命令:\n\n- `esim claim routine` 领取\"工作并训练\"这一项;其他任务换成对应的名字(`market`、`spar`、`battle`、`drill`)。裸 `esim claim` 不领取任何东西,只列出当前可领的奖励。\n- 领满 3 项后,用 `esim claim --chest` 开当天的宝箱。\n- 不想做某项未完成的任务,可以用 `esim claim --reroll <任务>` 换掉,每个游戏日一次。\n\n## 7. 核对这一天的收支\n\n`esim wallet` 显示各币种余额,`esim wallet history --since 1d` 列出最近一天的工资、交易、税和奖励等收支。\n",
7280
+ "tutorials/buying.md": "# 买东西:看含税报价、设限价和换外汇\n\n本篇演示在市场买一件商品:找报价、预览含税总价、设置能接受的最高单价,以及钱不够时换外汇。规则细节见[经济](../wiki/economy.md)。\n\n## 1. 先看自己在哪、有什么钱\n\n- `esim region` 显示你所在的地区和它的控制国。**在哪都能买任何国家市场的商品,不用旅行**;不写 `--country` 时,默认在所在地区控制国的市场买。\n- `esim wallet` 列出金币和各国货币的余额。商品用挂牌国的货币计价,所以买别国的商品要先有那国的货币。\n\n## 2. 找报价\n\n- `esim market list` 汇总全球各商品:有报价的国家数、卖单数、库存和最低折合金币单价。\n- `esim market list snack` 列出零食的逐条报价,默认按折合金币单价从低到高;加 `--country Poland` 只看一个国家的市场,加 `--min-qty 10` 只看余量够 10 件的报价。\n- 每行有报价 ID、品质、余量、卖家、挂牌国、单价和创建时间。列表末尾的 `next` 会提示买入预览,以及挂牌货币的外汇报价。\n\n产品写服务端的产品代码,大小写不限,例如 `snack`、`meal`、`small_drink`、`ticket_economy`、`iron`;药水带品级,例如 `lucky:q2`。\n\n## 3. 预览含税总价\n\n运行 `esim market buy 5 snack --dry-run`。预览给出:\n\n- 单价、小计(`subtotal`)、增值税(`vat`)和含税总价(`total`)。增值税由买家在成交额之外支付,按挂牌国和商品类别计算。\n- 卖家、报价 ID 和报价所在的市场(`market`)。\n- 本次最多付出的金额(`max payment`),以及余额和库存的之前→之后。\n\n不指定报价时,默认选你能买的、余量足够的最低价报价。要买某一条报价,加 `--offer <报价ID>`,命令自动在这条报价所在的市场买;要指定市场,加 `--country <国家>`。`--offer` 和 `--country` 指向不同国家时,命令以 `offer_market` 拒绝。\n\n## 4. 设置最高单价\n\n`--max-price` 是你能接受的**税前单价**,用挂牌国货币写。CLI 据此换算出含税的付款上限。例如在增值税 10% 的市场:\n\n```\nesim market buy 1 snack --max-price 1.50 --dry-run\n```\n\n预览中的 `max payment` 是 1.65(1 × 1.50 × 1.10)。所选报价的单价高于上限时,命令以 `price_limit` 拒绝,写出报价单价和你的上限;提交时报价若已变动、实付会超过 `max payment`,服务端同样拒绝,不会按更高的价格成交。不写 `--max-price` 时,上限取所选报价的单价。\n\n## 5. 钱不够时换外汇\n\n预览发现挂牌货币不够时,会列出需要、持有和缺口(`need`/`have`/`short`),并在 `next` 给出外汇列表;有一条金币报价能补齐缺口时,还会给出兑换预览。\n\n1. `esim exchange list PLN --pay GOLD` 列出用金币买 PLN 的报价,默认按汇率从低到高。\n2. `esim exchange buy <报价ID> <支付金额> --dry-run` 预览付出多少金币、最少能收到多少 PLN。\n3. 确认后去掉 `--dry-run`。结果写出付出、收到和汇率。\n\n## 6. 下单和核对\n\n确认预览后,去掉 `--dry-run` 正式购买。结果写出买到的商品、品质、数量、单价、小计、增值税、含税总价和卖家,`changed` 写出余额和库存的之前→之后。之后可以用 `esim inventory --product snack` 看库存,用 `esim wallet history --kind trade --since 1d` 看这笔支出。\n\n## 7. 在别国市场买\n\nPrimera 11.10.4(2022 年 10 月)起,商品市场可以全球购买,不用旅行:\n\n1. `esim market list snack` 不带 `--country` 时比较各国报价;折合金币单价便于跨币种比较。\n2. `esim market buy 5 snack --country Germany --dry-run` 预览在德国市场买。价格、VAT 和进口税都按挂牌国算,用挂牌国的货币付;钱不够时按第 5 步换外汇。\n3. 也可以直接 `esim market buy 5 snack --offer <报价ID> --dry-run`,不用再写国家。\n\n失去全部领土的国家,市场暂停成交:挂单保留,恢复领土后才能买。这时命令以 `market_listing_country_unavailable` 拒绝,`next` 给出不限国家的报价列表。\n\n## 8. 挂单卖出\n\n- `esim market sell 5 snack --price 1.50 --dry-run` 预览挂单。`--price` 是挂牌国货币的单价,`--country` 指定挂牌市场,默认是你的国籍国。挂单会托管货物。\n- 卖家国籍与挂牌国不同时,进口税从卖家收入里扣除。\n- `esim market` 列出你的在售挂单,`esim market cancel <挂单>` 撤单,余货退回。\n",
7281
+ "tutorials/first-day.md": "# 第一天:看状态、上班、训练和领奖\n\n本篇带你走完一个游戏日的日常:读状态、找工作、上班、训练、补能量和领取每日任务奖励。规则细节见[游戏日与成长](../wiki/day.md)。\n\n## 1. 看今天有什么事\n\n运行 `esim today`。重点看这几行:\n\n- `citizen`:等级、经验、能量、力量、经济技能和余额。\n- `location`:你所在的地区和它的控制国。上班和所在地有关;买东西在哪都能买,所在地只决定默认打开哪国的市场。\n- `day`:当前游戏日和换日时间。游戏日按北京时间 00:00 切换,新的一天恢复 30 点能量。\n- `routine`:今天是否已工作、已训练,食品和饮品各还能用几次,以及是否受雇(`job employed`)。\n- `missions`:每日任务、进度和奖励;`tutorial`:新手教程当前这一步。\n\n想看周围在发生什么,再运行 `esim home`。\n\n## 2. 跟着新手教程走\n\n`esim tutorial` 给出当前步骤、进度和奖励,`esim tutorial --all` 列出完整路线。某一步显示 `complete` 时,用 `esim tutorial claim` 领取这一步的奖励。领取失败需要重试时,可以按输出给出的命令加 `--task <步骤>` 指定步骤。\n\n## 3. 找一份工作\n\n`routine` 显示未受雇时,先找职位:\n\n1. `esim job list --eligible --sort wage --limit 5` 列出你的经济技能够得上的职位,按工资从高到低。每行写明公司、雇主、产品、地区、工资、最低经济技能,以及能否申请;不能申请时写原因。\n2. 选中一行后运行 `esim job apply <招聘> --dry-run`,核对公司、工资和地区。接受职位须身处公司所在国家,地点不符时错误会给出当前地区、公司所在地区和前往那里的旅行预览,见[出门旅行](travel.md)。\n3. 确认后去掉 `--dry-run` 再运行一次。每人同时只保留一份工作,换工作前用 `esim job quit` 离开当前的。\n\n## 4. 上班和训练\n\n- `esim work --dry-run` 预览这一班的公司、产品和工资;`esim work` 正式上班,结果写出产量、税前工资、所得税、到手工资,以及经验和经济技能的增长。每个游戏日只能工作一次,当天已工作时结果标出 `alreadyDone` 和下次可做的时间。\n- `esim train` 每个游戏日训练一次,结果写出力量增长和当前力量。\n\n## 5. 补能量\n\n能量最多 100 点,出手和经济舱旅行会消耗能量。\n\n- `esim inventory --product snack` 查看零食库存。\n- `esim eat` 默认吃一份零食(SNACK),`esim eat meal` 吃餐食,`esim eat small_drink` 或 `esim eat large_drink` 喝饮品。零食和小饮品恢复 20 点,餐食和大饮品恢复 50 点,最多到 100 点。\n- 食品和饮品各有每日次数,`esim today` 的 `meals` 显示剩余次数。库存不够时,可以去市场买,见[买东西](buying.md)。\n\n## 6. 领取每日任务奖励\n\n完成一项每日任务后,`esim today` 的 `next` 会给出领取命令:\n\n- `esim claim routine` 领取\"工作并训练\"这一项;其他任务换成对应的名字(`market`、`spar`、`battle`、`drill`)。裸 `esim claim` 不领取任何东西,只列出当前可领的奖励。\n- 领满 3 项后,用 `esim claim --chest` 开当天的宝箱。\n- 不想做某项未完成的任务,可以用 `esim claim --reroll <任务>` 换掉,每个游戏日一次。\n\n## 7. 核对这一天的收支\n\n`esim wallet` 显示各币种余额,`esim wallet history --since 1d` 列出最近一天的工资、交易、税和奖励等收支。\n",
7282
7282
  "tutorials/organizations.md": '# 加入组织:军团、政党和好友\n\n本篇演示怎样浏览和加入军团、政党,以及怎样找人加好友。规则细节见[组织与好友](../wiki/groups.md)和[政治](../wiki/politics.md)。\n\n## 1. 军团\n\n1. `esim unit list` 列出你国籍国的军团,含等级、成员数和容量。加 `--sort members` 按成员数排序,加 `--search <名字>` 按名字查找。\n2. `esim unit show <军团>` 查看军团详情和招募信息。\n3. `esim unit apply <军团> --message "<留言>"` 提交申请。只能申请本国军团,且你当前没有军团。申请由团长审批,批准也受军团容量限制。\n4. `esim unit` 查看你的军团身份、待审申请、军团资金、日配给和战令。\n5. 入团后,`esim unit supply` 查看当天配给,`esim unit supply claim` 领取。有指定工作条件时,须先完成当日指定公司的工作;同一公民一个游戏日最多领一次。\n6. `esim unit leave` 退团。团长须先用 `esim unit leader <公民>` 交接领导权。\n\n## 2. 政党\n\n1. `esim party list` 列出本国政党,默认按成员数排序;`--sort prestige|congress|presidents|laws` 换排序键,`--search <名字>` 按名字查找。\n2. `esim party show <政党>` 查看主席、声望、纲领和成员。\n3. `esim party join <政党>` 加入本国政党,新成员是学徒。\n4. `esim party leave --dry-run` 预览退党,确认后去掉 `--dry-run`。\n\n本国没有政党时,列表为空,`next` 给出建党命令的帮助和建党条件。\n\n## 3. 好友\n\n1. `esim profile search <名字>` 按名字查找公民,`esim profile <公民>` 查看对方资料;资料末尾给出加好友、发私信、送礼等命令。\n2. `esim friend add <公民>` 发送好友申请。\n3. `esim friend` 查看好友和双向的待审申请。收到申请时,用 `esim friend accept <公民>` 接受或 `esim friend decline <公民>` 拒绝。\n4. `esim friend remove <公民>` 删除好友关系,删除后可以重新申请。\n\n## 4. 在组织里说话\n\n加入军团或政党后,可以用 `esim shout list --unit` 或 `esim shout list --party` 阅读组织频道,用 `esim shout post "<内容>" --channel unit` 发言。频道只有现任成员能看。详见[发布内容](publishing.md)。\n',
7283
7283
  "tutorials/publishing.md": '# 发布内容:喊话、私信、报纸和文章\n\n本篇演示怎样发喊话和私信、创办报纸、发表和修改文章。规则细节见[通信与出版](../wiki/media.md)。\n\n## 1. 喊话\n\n1. `esim shout` 打开本国频道;`esim shout list --global` 看全球频道,`--unit`、`--party`、`--friends` 看你的军团、政党和好友频道。\n2. `esim shout post "<内容>"` 发到本国频道。`--channel world|country|unit|party|friends` 换频道,`--also <频道>` 可重复,同时发到其他频道,每个频道各成一条。喊话最多 201 个字符,超长时错误给出上限和实际长度。\n3. `esim shout show <喊话>` 阅读线程,`esim shout comment <喊话> "<内容>"` 发表评论。\n4. `esim shout delete <喊话> --dry-run` 查看删除会影响哪些内容;删除后,这条喊话的回复入口也会隐藏。确认后去掉 `--dry-run` 提交。\n\n## 2. 私信\n\n- `esim dm` 列出对话,未读的排在前面;`esim dm show <公民>` 打开对话。\n- `esim dm send <公民> "<内容>"` 发送私信;长正文写进文件后用 `@文件名`,或用 `-` 从标准输入读;`--subject <主题>` 加标题。\n- 批量删除收到的私信前,先运行 `esim dm delete 12 13 --dry-run`,将示例编号替换为消息编号。预览会列出本次提交的不同编号;归属在提交时核查。\n\n## 3. 创办报纸\n\n1. `esim paper create "<报名>" --dry-run` 预览:费用 2 金币、余额变化、报名是否已被占用。报名 3–32 个字符,不区分大小写不能重名。\n2. 确认后去掉 `--dry-run`。`esim paper` 查看你的报纸和订阅。\n\n## 4. 发表文章\n\n1. 把正文写进文件,例如 `article.txt`。\n2. `esim article publish --title "<标题>" --body @article.txt --category economical` 发表。只有一份报纸时默认发在这份报纸上,有多份时用 `--paper <报纸>` 指定;`--no-comments` 关闭评论。标题 1–100 字,正文 1–10000 字。\n3. 每位作者每个 UTC 整点小时只能发一篇文章;被拒时 `retry` 给出到下一个整点的时间。\n4. 结果给出文章编号,`esim article show <文章>` 阅读正文、评论和投票。\n\n在正文、喊话和私信里可以用 `[[kind:id]]` 引用游戏对象,例如 `[[company:12]]`、`[[article:1]]`,种类和数量限制见[通信与出版](../wiki/media.md)。\n\n## 5. 修改和删除文章\n\n- `esim article edit <文章> --title "<新标题>"` 改标题;`--body @文件` 改正文,`--category` 改分类,`--no-comments` 或 `--comments` 关闭或打开评论。结果写出改动字段的之前→之后。\n- `esim article delete <文章> --reason "<理由>" --dry-run` 查文章编号、当前评论数与删除影响。核对理由(1–500 字)后去掉 `--dry-run` 提交。文章连同评论、点赞和投票一起消失,当小时的发文额度不退。\n\n## 6. 阅读别人的文章\n\n- `esim article` 查看订阅报纸的最新文章;没有订阅时显示本国热门文章。\n- `esim article list --category economical` 按分类浏览,`--search <关键词>` 按标题或正文查找,`--country <国家>` 按发行国筛选。\n- `esim article like <文章>` 点赞,`esim article comment <文章> "<内容>"` 评论;`esim paper subscribe <报纸>` 订阅报纸。\n',
7284
- "tutorials/travel.md": '# 出门旅行:查地区、预览行程和确认抵达\n\n本篇演示怎样查地图、预览一次旅行、准备机票和能量,并在抵达后核对位置。规则细节见[地图与旅行](../wiki/map.md)。\n\n## 1. 弄清自己在哪\n\n- `esim region` 显示当前地区、控制国、原属国、相邻地区及其资源,以及附近开放的战役。\n- `esim region "Warsaw"` 查看其他地区。\n- 国籍和位置是两回事:旅行只改变你所在的地区,不改变国籍。\n\n## 2. 找目的地\n\n- `esim country regions Poland` 列出某国当前控制的地区。\n- `esim region list --country Poland --occupied` 按原属国筛出被占领的地区;`--controller` 按当前控制国筛选,`--resource iron` 按资源筛选,`--battle` 只看有开放战役的地区。\n- 目的地可以和当前位置不相邻。\n\n## 3. 预览行程\n\n运行 `esim travel <地区> --dry-run`,例如 `esim travel 169 --dry-run`。预览给出:\n\n- 出发地和目的地;\n- 所选机票,以及库存里的经济舱票和商务舱票数量;\n- 所需能量和当前能量;经济舱票消耗 40 点能量,商务舱票不消耗能量;\n- 能否出发(`can travel`),不能时给出原因。\n\n库存里有商务舱票时默认用商务舱票;要指定,加 `--ticket economy` 或 `--ticket business`。\n\n## 4. 准备机票和能量\n\n- 没有机票时,用 `esim market list ticket_economy` 找报价,按[买东西](buying.md)的步骤预览和购买。\n- 能量不够时,预览会写出缺口、当天食品和饮品的剩余次数,以及下个游戏日恢复能量的时间。用 `esim eat` 或 `esim eat meal` 补能量,见[第一天](first-day.md#5-补能量)。\n\n## 5. 出发并核对\n\n去掉 `--dry-run` 正式出发。结果的 `changed` 写出位置、能量、经验和机票库存的之前→之后。抵达时可能掉落一件装备,结果会写出它的名字、部位和品质,`next` 给出查看或穿戴的命令;也可以用 `esim gear` 查看。\n\n再运行 `esim region` 确认已经在目的地。\n\n## 6. 哪些事和所在地有关\n\n- 接受职位和上班:须在公司所在国家。\n- 在市场买东西:须在挂牌国控制的地区。\n- 建厂、迁厂、创办股份公司:使用你当前所在的地区。\n- 发起和参加抵抗战:须在对应的地区或战场。\n\n完整说明见[地图与旅行](../wiki/map.md#哪些操作取决于所在地)。\n',
7284
+ "tutorials/travel.md": '# 出门旅行:查地区、预览行程和确认抵达\n\n本篇演示怎样查地图、预览一次旅行、准备机票和能量,并在抵达后核对位置。规则细节见[地图与旅行](../wiki/map.md)。\n\n## 1. 弄清自己在哪\n\n- `esim region` 显示当前地区、控制国、原属国、相邻地区及其资源,以及附近开放的战役。\n- `esim region "Warsaw"` 查看其他地区。\n- 国籍和位置是两回事:旅行只改变你所在的地区,不改变国籍。\n\n## 2. 找目的地\n\n- `esim country regions Poland` 列出某国当前控制的地区。\n- `esim region list --country Poland --occupied` 按原属国筛出被占领的地区;`--controller` 按当前控制国筛选,`--resource iron` 按资源筛选,`--battle` 只看有开放战役的地区。\n- 目的地可以和当前位置不相邻。\n\n## 3. 预览行程\n\n运行 `esim travel <地区> --dry-run`,例如 `esim travel 169 --dry-run`。预览给出:\n\n- 出发地和目的地;\n- 所选机票,以及库存里的经济舱票和商务舱票数量;\n- 所需能量和当前能量;经济舱票消耗 40 点能量,商务舱票不消耗能量;\n- 能否出发(`can travel`),不能时给出原因。\n\n库存里有商务舱票时默认用商务舱票;要指定,加 `--ticket economy` 或 `--ticket business`。\n\n## 4. 准备机票和能量\n\n- 没有机票时,用 `esim market list ticket_economy` 找报价,按[买东西](buying.md)的步骤预览和购买。\n- 能量不够时,预览会写出缺口、当天食品和饮品的剩余次数,以及下个游戏日恢复能量的时间。用 `esim eat` 或 `esim eat meal` 补能量,见[第一天](first-day.md#5-补能量)。\n\n## 5. 出发并核对\n\n去掉 `--dry-run` 正式出发。结果的 `changed` 写出位置、能量、经验和机票库存的之前→之后。抵达时可能掉落一件装备,结果会写出它的名字、部位和品质,`next` 给出查看或穿戴的命令;也可以用 `esim gear` 查看。\n\n再运行 `esim region` 确认已经在目的地。\n\n## 6. 哪些事和所在地有关\n\n- 接受职位和上班:须在公司所在国家。\n- 在市场买东西:不用到当地,在哪都能买别国市场的商品;所在地只决定默认打开的市场。\n- 建厂、迁厂、创办股份公司:使用你当前所在的地区。\n- 发起和参加抵抗战:须在对应的地区或战场。\n\n完整说明见[地图与旅行](../wiki/map.md#哪些操作取决于所在地)。\n',
7285
7285
  "wiki/battle.md": `# 战斗系统
7286
7286
 
7287
7287
  战役分回合。你每击造成的伤害都加进本轮己方总分,每轮结束时伤害高的一方得一胜,平手归防守方。先拿到八胜的一方赢下战役。领土战决定地区控制权,练习战让你在任何地区试用同一套武器和伤害规则。
@@ -7568,7 +7568,7 @@ P = 基础 × (1 + B) × G × H × C
7568
7568
  ## 商品市场与税
7569
7569
 
7570
7570
  - **挂单**:卖家选挂牌国、产品、单价和数量,货物立即托管。可以部分成交,剩下的继续挂着;撤单退回剩余的货。可以挂到任何还有领土的国家。
7571
- - **购买**:浏览报价不限地点,但购买时必须身处挂牌国控制的地区,与国籍无关。买家可以设最高实付额,超出就拒绝成交。
7571
+ - **购买**:在任何地区都能买任何国家市场的商品,不用旅行,与国籍无关(Primera 11.10.4,2022 年 10 月起商品可以全球购买)。所在地只决定不写 \`--country\` 时默认打开哪个市场:所在地区的控制国。用挂牌国的货币付款,按挂牌国的 VAT 计税。失去全部领土的国家,市场暂停成交,恢复领土后恢复。买家可以设最高实付额,超出就拒绝成交。
7572
7572
  - **成交额** = 单价 × 数量。
7573
7573
  - **VAT** = ⌊成交额 × VAT 税率⌋,由买家另外支付。税率先看挂牌国对这种产品设的 VAT,没有设就用国家税率。
7574
7574
  - **进口税** = ⌊成交额 × 进口税率⌋,只在卖家国籍与挂牌国不同时收,从卖家货款中扣。没有设进口税率时为 0。股份公司卖家的「国籍」是公司所在国。
@@ -7975,7 +7975,7 @@ P = 基础 × (1 + B) × G × H × C
7975
7975
 
7976
7976
  - 建厂、迁厂和创办股份公司使用你当前所在地区,原料厂还要求匹配的 HIGH 资源。见[经济](economy.md#建厂流程)。
7977
7977
  - 接受职位和上班均须身处公司所在国家,以所在地区的当前控制国判断。未就业时,\`work\` 会提示找职位或预览赴任旅行。见[游戏日与成长](day.md#写命令的结果)。
7978
- - 买商品须身处控制国与市场所属国相符的地区。见[经济](economy.md)。
7978
+ - 买商品不受所在地限制,可以直接买别国市场的报价;所在地只决定 \`esim market buy\` 默认打开的市场(所在地区的控制国)。见[经济](economy.md#商品市场与税)。
7979
7979
  - 发起抵抗战须身处被占地区,参加国战或抵抗战须身处该场战役的战场,出手没有额外的地利加伤。见[战斗](battle.md)。
7980
7980
  - \`esim region npcs\` 默认查当前位置,也可以指定其他地区。见[经济](economy.md)。
7981
7981
 
@@ -15037,6 +15037,7 @@ var catalog = [
15037
15037
  { operationId: "createQuickEquipmentAuction", name: "create-quick-equipment-auction", method: "POST", path: "/api/auctions/quick-equipment", spec: "civic.yaml", write: true, retry: "unsafe", description: "快捷挂牌装备", parameters: [{ name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["equipmentId"], properties: { equipmentId: { type: "integer", format: "int64", minimum: 1 } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } } }, responseFields: ["systemSeller", "minNextBid", "sellerName", "sellerNation", "bidderName", "bidderNation", "id", "seller", "qty", "equipment", "specialItem", "company", "minimum", "endsAt", "bidder", "bid", "bidCount", "status"] },
15038
15038
  { operationId: "listOwnAuctions", name: "list-own-auctions", method: "GET", path: "/api/auctions/mine", spec: "civic.yaml", write: false, retry: "unsafe", description: "读取本人挂单", parameters: [{ name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "status", in: "query", schema: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } }, { name: "page", in: "query", description: "页码从 1 开始,默认第 1 页。", schema: { type: "integer", format: "int32", minimum: 1 } }, { name: "sort", in: "query", description: "time 按截止时间升序,price 按公开展示价降序(无人出价使用起拍价),bids 按成功出价次数降序。相同值时 ID 降序。不传时按 ID 降序。", schema: { type: "string", enum: ["time", "price", "bids"] } }, { name: "order", in: "query", description: "省略时使用排序键默认方向。", schema: { type: "string", enum: ["asc", "desc"] } }, { name: "seller", in: "query", schema: { type: "string", enum: ["system", "players"] } }, { name: "minPrice", in: "query", description: "公开展示价的下限(含),单位为金币的分。", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "maxPrice", in: "query", description: "公开展示价的上限(含),单位为金币的分。", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "noBids", in: "query", schema: { type: "boolean" } }, { name: "kind", in: "query", schema: { type: "string", enum: ["equipment", "special", "company"] } }, { name: "quality", in: "query", description: "重复参数表示任一品质。本条件只匹配装备。", schema: { type: "array", items: { type: "integer", minimum: 1, maximum: 8 } } }, { name: "slot", in: "query", description: "重复参数表示任一槽位。本条件只匹配装备。", schema: { type: "array", items: { type: "string", enum: ["head", "body", "legs", "offHand", "footwear", "accessory", "charm", "eye"] } } }, { name: "stat", in: "query", description: "重复参数表示任一属性值大于零。本条件只匹配仍有属性记录的装备。品质、槽位、属性三组条件同时满足。", schema: { type: "array", items: { type: "string", enum: ["baseHit", "strength", "missChanceReduction", "damagePercent", "criticalChance", "maxDamagePercent", "avoidEnergyChance", "morningDamagePercent", "noonDamagePercent", "eveningDamagePercent", "nightDamagePercent", "saveWeaponChance", "findWeaponChance", "economySkillHundredths", "freeFlightChance", "ironProductionPercent", "woodProductionPercent", "grainProductionPercent", "oilProductionPercent", "diamondProductionPercent", "foodProductionPercent", "weaponProductionPercent", "ticketProductionPercent", "improvedSplitChance", "saveAmmunitionChance", "restorationChance", "bonusMergeChance", "otherParametersPercent", "mergePriceReduction", "hitMinBonus", "hitMaxBonus", "accuracy", "endurance", "guard", "agility", "impact"] } } }, { name: "specialItem", in: "query", schema: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] } }, { name: "companyLevel", in: "query", schema: { type: "array", items: { type: "integer", minimum: 0, maximum: 21 } } }, { name: "companyProduct", in: "query", schema: { type: "array", items: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "page", "total"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } }, page: { type: "integer", format: "int32", minimum: 1, description: "当前页码。" }, total: { type: "integer", format: "int64", minimum: 0, description: "所有符合筛选条件的拍卖数量。" } } } } }, responseFields: ["items", "page", "total"] },
15039
15039
  { operationId: "listOwnBidAuctions", name: "list-own-bid-auctions", method: "GET", path: "/api/auctions/my-bids", spec: "civic.yaml", write: false, retry: "unsafe", description: "读取本人曾成功出价的拍卖(含被超价及已结束)", parameters: [{ name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "status", in: "query", schema: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } }, { name: "page", in: "query", description: "页码从 1 开始,默认第 1 页。", schema: { type: "integer", format: "int32", minimum: 1 } }, { name: "sort", in: "query", description: "time 按截止时间升序,price 按公开展示价降序(无人出价使用起拍价),bids 按成功出价次数降序。相同值时 ID 降序。不传时按 ID 降序。", schema: { type: "string", enum: ["time", "price", "bids"] } }, { name: "order", in: "query", description: "省略时使用排序键默认方向。", schema: { type: "string", enum: ["asc", "desc"] } }, { name: "seller", in: "query", schema: { type: "string", enum: ["system", "players"] } }, { name: "minPrice", in: "query", description: "公开展示价的下限(含),单位为金币的分。", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "maxPrice", in: "query", description: "公开展示价的上限(含),单位为金币的分。", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "noBids", in: "query", schema: { type: "boolean" } }, { name: "kind", in: "query", schema: { type: "string", enum: ["equipment", "special", "company"] } }, { name: "quality", in: "query", description: "重复参数表示任一品质。本条件只匹配装备。", schema: { type: "array", items: { type: "integer", minimum: 1, maximum: 8 } } }, { name: "slot", in: "query", description: "重复参数表示任一槽位。本条件只匹配装备。", schema: { type: "array", items: { type: "string", enum: ["head", "body", "legs", "offHand", "footwear", "accessory", "charm", "eye"] } } }, { name: "stat", in: "query", description: "重复参数表示任一属性值大于零。本条件只匹配仍有属性记录的装备。品质、槽位、属性三组条件同时满足。", schema: { type: "array", items: { type: "string", enum: ["baseHit", "strength", "missChanceReduction", "damagePercent", "criticalChance", "maxDamagePercent", "avoidEnergyChance", "morningDamagePercent", "noonDamagePercent", "eveningDamagePercent", "nightDamagePercent", "saveWeaponChance", "findWeaponChance", "economySkillHundredths", "freeFlightChance", "ironProductionPercent", "woodProductionPercent", "grainProductionPercent", "oilProductionPercent", "diamondProductionPercent", "foodProductionPercent", "weaponProductionPercent", "ticketProductionPercent", "improvedSplitChance", "saveAmmunitionChance", "restorationChance", "bonusMergeChance", "otherParametersPercent", "mergePriceReduction", "hitMinBonus", "hitMaxBonus", "accuracy", "endurance", "guard", "agility", "impact"] } } }, { name: "specialItem", in: "query", schema: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] } }, { name: "companyLevel", in: "query", schema: { type: "array", items: { type: "integer", minimum: 0, maximum: 21 } } }, { name: "companyProduct", in: "query", schema: { type: "array", items: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "page", "total"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } }, page: { type: "integer", format: "int32", minimum: 1, description: "当前页码。" }, total: { type: "integer", format: "int64", minimum: 0, description: "所有符合筛选条件的拍卖数量。" } } } } }, responseFields: ["items", "page", "total"] },
15040
+ { operationId: "listOwnAuctionBidMaximums", name: "list-own-auction-bid-maximums", method: "GET", path: "/api/auctions/my-bid-maximums", spec: "civic.yaml", write: false, retry: "unsafe", description: "批量读取本人的拍卖委托上限", parameters: [{ name: "id", in: "query", required: true, style: "form", explode: true, schema: { type: "array", minItems: 1, maxItems: 20, items: { type: "integer", format: "int64", minimum: 1 } } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "array", items: { type: "object", additionalProperties: false, required: ["auctionId", "bid"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, bid: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "本人的委托上限,以金币的分计。" } } } } } }, responseFields: [] },
15040
15041
  { operationId: "getAuction", name: "get-auction", method: "GET", path: "/api/auctions/{id}", spec: "civic.yaml", write: false, retry: "unsafe", description: "公开读取拍卖详情", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } } }, responseFields: ["systemSeller", "minNextBid", "sellerName", "sellerNation", "bidderName", "bidderNation", "id", "seller", "qty", "equipment", "specialItem", "company", "minimum", "endsAt", "bidder", "bid", "bidCount", "status"] },
15041
15042
  { operationId: "cancelAuction", name: "cancel-auction", method: "DELETE", path: "/api/auctions/{id}", spec: "civic.yaml", write: true, retry: "natural", description: "卖家取消尚无出价的拍卖", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "seller", "minimum", "endsAt", "bid", "bidCount", "status", "systemSeller", "minNextBid"], properties: { systemSeller: { type: "boolean" }, minNextBid: { type: ["integer", "null"], format: "int64", minimum: 1, description: "最低公开领先出价,单位为金币的分。已结束时为 null。" }, sellerName: { type: "string", description: "卖家的公民姓名,系统装备拍卖的卖家为 Item vendor。" }, sellerNation: { type: "integer", minimum: 0 }, bidderName: { type: "string" }, bidderNation: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, seller: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, qty: { type: "integer", minimum: 1, maximum: 999 }, equipment: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", minLength: 1 }, quality: { type: "integer", minimum: 1, maximum: 8 }, set: { type: "string", minLength: 1, description: "挂牌时公开的装备套装。" } } }, specialItem: { type: "string", enum: ["medkit", "steroids", "extra_vacations", "extra_spa", "tank", "bunker", "sewer_guide"] }, company: { type: "object", additionalProperties: false, required: ["id", "name", "item"], properties: { level: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } }, minimum: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, endsAt: { type: "string", format: "date-time" }, bidder: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, bid: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "公开的当前价或成交价,以分计。无人出价为 0,仅一位出价时为起拍价,其余为不同竞买人的第二高委托价。" }, bidCount: { type: "integer", format: "int64", minimum: 0, description: "已入账的有效出价次数,含提高上限及被即时超价的委托。同额重试不重复计数。" }, status: { type: "string", enum: ["open", "sold", "unsold", "cancelled"], "x-enum-varnames": ["AuctionStatusOpen", "AuctionStatusSold", "AuctionStatusUnsold", "AuctionStatusCancelled"] } } } } }, responseFields: ["systemSeller", "minNextBid", "sellerName", "sellerNation", "bidderName", "bidderNation", "id", "seller", "qty", "equipment", "specialItem", "company", "minimum", "endsAt", "bidder", "bid", "bidCount", "status"] },
15042
15043
  { operationId: "getOwnAuctionBid", name: "get-own-auction-bid", method: "GET", path: "/api/auctions/{id}/my-bid", spec: "civic.yaml", write: false, retry: "unsafe", description: "读取本人的出价上限", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { description: "委托上限只对出价者本人开放。金额以分计。", type: "object", additionalProperties: false, required: ["bid"], properties: { bid: { type: "integer", minimum: 1, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" } } } } }, responseFields: ["bid"] },
@@ -24098,7 +24099,7 @@ function reject2(code, message, context, next) {
24098
24099
  // commands/market.ts
24099
24100
  var command5 = define("economy");
24100
24101
  var countryFlag2 = flag("country", string2().trim().min(1), { source: "Country name, code or ID whose market to browse; all (the default) browses every market" });
24101
- var buyCountry = flag("country", string2().trim().min(1), { source: "Country name, code or ID of the market; you can only buy where the country controls your region (the default)" });
24102
+ var buyCountry = flag("country", string2().trim().min(1), { source: "Country name, code or ID of the market to buy in, from anywhere; default: the offer's market with --offer, else the country controlling your region" });
24102
24103
  var quantity = { ...positional("quantity", true, exports_coerce.number().pipe(int().positive())), source: "Number of units" };
24103
24104
  var product = { ...positional("product"), source: productHelp };
24104
24105
  var dryRun2 = flag("dry-run", boolean2());
@@ -24260,8 +24261,8 @@ function tradeView(data) {
24260
24261
  total: facts.total ?? result.total,
24261
24262
  seller: refText2(facts.seller ?? offer?.seller),
24262
24263
  "seller country": refText2(facts.sellerCountry ?? offer?.sellerCountry ?? undefined),
24264
+ market: refText2(offer?.country ?? undefined),
24263
24265
  offer: facts.order !== undefined ? `#${String(facts.order)} remaining ${String(facts.remaining ?? "")}`.trim() : offer ? `#${String(offer.id)}` : undefined,
24264
- "current region": dry ? result.currentRegion : undefined,
24265
24266
  "max payment": dry ? result.maxPayment : undefined,
24266
24267
  shortfall: result.shortfall,
24267
24268
  balance: moneyLines(changed.money),
@@ -24462,8 +24463,8 @@ var market = [
24462
24463
  const market = first?.country ? row2(first.country) : undefined;
24463
24464
  const run = first && market ? `esim market buy 1 ${shellWord(input)} --country ${market.id} --dry-run` : undefined;
24464
24465
  const next = run && first ? [
24465
- { run, note: "Buying requires a region controlled by the listing country." },
24466
- { run: browseExchange(first.price.currency), note: "Find offers for the listing currency before traveling." }
24466
+ { run, note: `You can buy from any region; you pay in ${first.price.currency}, the listing country's currency.` },
24467
+ { run: browseExchange(first.price.currency), note: "Find offers for the listing currency." }
24467
24468
  ] : await noOffers(viewer, item, input, country !== undefined, world);
24468
24469
  return listHeader(header, { ...page, ...next.length ? { next } : {} }, marketCountry ? { country: marketCountry } : {});
24469
24470
  }
@@ -24471,7 +24472,7 @@ var market = [
24471
24472
  command5({
24472
24473
  path: ["market", "buy"],
24473
24474
  session: true,
24474
- summary: "Buy from the market of the country controlling your current region",
24475
+ summary: "Buy from any country's market without traveling; default: the country controlling your region",
24475
24476
  args: [
24476
24477
  quantity,
24477
24478
  product,
@@ -24480,10 +24481,9 @@ var market = [
24480
24481
  buyCountry,
24481
24482
  dryRun2
24482
24483
  ],
24483
- examples: ["esim market buy 5 snack --max-price 1.50 --dry-run", "esim market buy 2 lucky:q2 --dry-run"],
24484
+ examples: ["esim market buy 5 snack --max-price 1.50 --dry-run", "esim market buy 2 lucky:q2 --dry-run", "esim market buy 3 snack --country Germany --dry-run"],
24484
24485
  output: {
24485
- offer: "Current eligible quote",
24486
- currentRegion: "Your region when quoting the purchase",
24486
+ offer: "Current eligible quote, with its market country",
24487
24487
  quantity: "Requested quantity",
24488
24488
  subtotal: "Quoted price before tax",
24489
24489
  vat: "Estimated VAT",
@@ -24521,46 +24521,40 @@ var market = [
24521
24521
  const citizen = account.citizen;
24522
24522
  const world = await geography(ctx);
24523
24523
  const name = textArg(args, "country");
24524
- const current = await location(ctx, citizen, Promise.resolve(world));
24525
- const controller = current.country?.id;
24526
- const country = name ? choose(world.countries, name, "country").id : typeof controller === "number" ? controller : undefined;
24527
- const input = shellWord(string4(args.product));
24528
- const browse = (where = country) => `esim market list ${input}${where === undefined ? "" : ` --country ${where}`}`;
24529
- const wrongMarket = async (market, code = "market_location", here = current) => {
24530
- const controls = market === undefined ? [] : await observe(() => ctx.call("list-lands"));
24531
- const controlled = new Set("error" in controls ? [] : controls.filter((land) => land.owner === market).map((land) => land.id));
24532
- const candidates = rankedRegions(world, world.lands.find((land) => land.id === here.region.id), (land) => controlled.has(land.id));
24533
- return refuse3(code, "You can only buy in the market of the country that controls your region.", {
24534
- currentRegion: here.region,
24535
- hereCountry: here.country ?? undefined,
24536
- market: countryRef(world, market) ?? undefined,
24537
- requiredRegions: candidates.map(({ id, name }) => ({ id, name }))
24538
- }, ...candidates.slice(0, 3).map(({ id }) => travelPreview(id)), market === undefined ? "esim region" : `esim country regions ${market}`, here.country ? `esim market buy ${qty} ${input} --dry-run` : undefined);
24539
- };
24540
- if (country === undefined || country !== current.country?.id)
24541
- return wrongMarket(country);
24524
+ const named = name ? choose(world.countries, name, "country").id : undefined;
24542
24525
  const offerId = intArg(args, "offer");
24543
24526
  const pid = string4(citizen.pid);
24544
- let order;
24545
- if (offerId === undefined) {
24527
+ const input = shellWord(string4(args.product));
24528
+ let order = offerId === undefined ? undefined : await ctx.call("get-market-order", { id: offerId });
24529
+ const home = async () => {
24530
+ const here = await observe(() => location(ctx, citizen, Promise.resolve(world)));
24531
+ const id = "error" in here ? undefined : here.country?.id;
24532
+ return typeof id === "number" ? id : number4(citizen.nation);
24533
+ };
24534
+ const country = named ?? order?.country ?? await home();
24535
+ const market = countryRef(world, country) ?? { id: country, name: `#${String(country)}` };
24536
+ const browse = () => `esim market list ${input} --country ${country}`;
24537
+ const browseAll = `esim market list ${input}`;
24538
+ if (order && order.country !== country) {
24539
+ return refuse3("offer_market", `Offer #${String(offerId)} is in the ${countryRef(world, order.country)?.name ?? `#${String(order.country)}`} market, not ${market.name}.`, { offer: listing(order, world), market }, `esim market buy ${qty} ${input} --offer ${String(offerId)} --dry-run`, browse());
24540
+ }
24541
+ const closed = () => refuse3("market_listing_country_unavailable", `${market.name} controls no regions, so its market is closed until it regains territory.`, { market }, browseAll);
24542
+ const lands = await observe(() => ctx.call("list-lands"));
24543
+ if (!("error" in lands) && !lands.some((land) => land.owner === country))
24544
+ return closed();
24545
+ if (order === undefined) {
24546
24546
  const found = await quote2(ctx, { country, ...product }, qty, pid);
24547
24547
  if (!found.match) {
24548
24548
  const best = found.seen.reduce((top, entry) => !top || number4(entry.qty) > number4(top.qty) ? entry : top, undefined);
24549
24549
  const skipped = found.own ? ` (${found.own === 1 ? "your own offer is" : `your ${found.own} own offers are`} not counted; you cannot buy from yourself)` : "";
24550
- return refuse3("no_offer", `No single offer in ${countryRef(world, country)?.name ?? "this market"} has ${qty} units${best ? `; the largest has ${String(best.qty)}` : ""}${skipped}.`, {
24550
+ return refuse3("no_offer", `No single offer in ${market.name} has ${qty} units${best ? `; the largest has ${String(best.qty)}` : ""}${skipped}.`, {
24551
24551
  requested: qty,
24552
24552
  ...found.own ? { ownOffers: found.own } : {},
24553
24553
  offers: offerRows(found.seen, world)
24554
- }, best ? `esim market buy ${String(best.qty)} ${input} --offer ${String(best.id)} --dry-run` : undefined, browse());
24554
+ }, best ? `esim market buy ${String(best.qty)} ${input} --offer ${String(best.id)} --dry-run` : undefined, browse(), browseAll);
24555
24555
  }
24556
24556
  order = found.match;
24557
24557
  } else {
24558
- order = await ctx.call("get-market-order", { id: offerId });
24559
- }
24560
- if (offerId !== undefined) {
24561
- if (order.country !== country) {
24562
- return wrongMarket(order.country);
24563
- }
24564
24558
  const selected = string4(order.item);
24565
24559
  const matches = selected === product.item && (product.quality === undefined || product.quality === number4(order.quality));
24566
24560
  if (!matches) {
@@ -24601,10 +24595,11 @@ var market = [
24601
24595
  ...balance < totals.total ? { shortfall: money(totals.total - balance) } : {}
24602
24596
  };
24603
24597
  const exchange = asset.startsWith("cur:") ? browseExchange(currency) : undefined;
24598
+ const orderId = order.id;
24604
24599
  const fundsContext = (total, unit) => ({
24605
24600
  payment: shortfall2(money(total), money(balance)),
24606
24601
  lowestPrice: money(unit),
24607
- offer: number4(order.id)
24602
+ offer: number4(orderId)
24608
24603
  });
24609
24604
  if (args["dry-run"]) {
24610
24605
  if (balance < totals.total) {
@@ -24613,7 +24608,6 @@ var market = [
24613
24608
  return {
24614
24609
  ...preview,
24615
24610
  dryRun: true,
24616
- currentRegion: current.region,
24617
24611
  changed: {},
24618
24612
  context: fundsContext(totals.total, price),
24619
24613
  ...next.length ? { next } : {}
@@ -24622,7 +24616,6 @@ var market = [
24622
24616
  return {
24623
24617
  ...preview,
24624
24618
  dryRun: true,
24625
- currentRegion: current.region,
24626
24619
  changed: { money: { [currency]: change(money(balance).value, money(balance - totals.total).value) }, stock: change(before, before + qty) }
24627
24620
  };
24628
24621
  }
@@ -24633,10 +24626,8 @@ var market = [
24633
24626
  try {
24634
24627
  purchase = row2(offerId === undefined ? await ctx.call("purchase-lowest-market-order", {}, { country, item: string4(order.item), quality: number4(order.quality), qty, maxPayment }) : await ctx.call("purchase-market-order", { id: offerId }, { qty, maxPayment }));
24635
24628
  } catch (error) {
24636
- if (error instanceof CommandError && error.error === "market_purchase_location_required") {
24637
- const latest = await observe(async () => location(ctx, (await ctx.call("me")).citizen, Promise.resolve(world)));
24638
- return wrongMarket(order.country, error.error, "error" in latest ? current : latest);
24639
- }
24629
+ if (error instanceof CommandError && error.error === "market_listing_country_unavailable")
24630
+ return closed();
24640
24631
  if (error instanceof CommandError && error.error === "insufficient_funds") {
24641
24632
  const funds = marketFunds.safeParse(error.details.context);
24642
24633
  if (funds.success) {
@@ -38086,7 +38077,7 @@ function saveCredentials(store, credentials) {
38086
38077
  }
38087
38078
 
38088
38079
  // version.ts
38089
- var version2 = "2026.1201.197";
38080
+ var version2 = "2026.1201.199";
38090
38081
  var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
38091
38082
  var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
38092
38083
  var releaseVersion = /^\d+\.\d+\.\d+$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esim-cli",
3
- "version": "2026.1201.197",
3
+ "version": "2026.1201.199",
4
4
  "description": "Command-line client and agent project for Open E-Sim",
5
5
  "type": "module",
6
6
  "license": "MIT",