# Abilities
This page documents the different ability types and the attributes
which may be set for each type.
Abilities are mainly used to describe private company powers, but may
also apply to other entities such as corporations. Examples of how
their use can be seen in the [game configuration
directory](../config/game).
## Generic attributes
These attributes may be set for all ability types
- `type`: The name of the ability type
- `owner_type`: The company must be owned by this type of entity in
order for the ability to be active. Either "player" or
"corporation".
- `remove`: Game phase when this ability is removed
- `count`: The number of times the ability may be used
- `count_per_or`: The number of times the ability may be used in each OR; the
property `count_this_or` is reset to 0 at the start of each OR and increments
each time the ability is used
- `on_phase`: The phase when this ability is active
- `when`: (string or array of strings) The game steps or special time descriptor
when this ability is active. If no values are provided, this ability is
considered to be "passive", i.e., its effect applies without the user needinng
to click on the abilities button to activate it. For an ability to be included
in an `abilities()` call, either a `time` kwarg or the name of the current
game phase class must match (one of) the ability's `when` string(s). Examples:
- `any`: usable at any time during the game
- `buying_train`: train buying step
- `Track`, `TrackAndToken`: track-laying step; if normal track lays are used
up, but there is still a `Track` ability, then the active step will not
pass on to the next step automatically
- `special_track`: make the ability available to the SpecialTrack step
- `sold`: when the company is bought from a player by a corporation
- `bought_train`: when the owning corporation has bought a train; generally
used with `close` abilities
- `other_or`: usable during the OR turn of another corporation
- `owning_corp_or_turn`: usable at any point during the owning corporation's OR turn
- `never`: use with `close` abilities to prevent a company from closing
- `has_train`: when the owning corporation owns at least one train
## additional_token
Adds 'count' additional tokens to a purchasing company (1817)
## assign_corporation
Designate a specific corporation to be the beneficiary of the ability,
for example Steamboat Company in 1846.
When a company with this ability is sold to a corporation, the company is
automatically assigned to the new owning corporation. With this configuration,
the automatic assignment will happen and the company cannot be further
reassigned:
```
{
"type": "assign_corporation",
"when": "sold",
"count": 1,
"owner_type": "corporation"
}
```
## assign_hexes
Designate a hex to the ability. Usually simulates placement of a
special power token.
- `hexes`: An array of hex coordinates where this ability may be used.
## blocks_hexes
Designate hexes which are blocked by this ability. Use the
`owner_type: "player"` to specify that the blocking ends when the
company is bought in by a corporation.
- `hexes`: An array of hex coordinates that are blocked
## blocks_partition
Designate a type of partition which this ability disallows crossing.
A partition separates an hex in 2 halves. Use the `owner_type: "player"`
to specify that the blocking ends when the company is bought in by a
corporation.
- `partition_type`: The name of the partition type that is to be
blocked, akin to terrain and border types.
## close
Describe when the company closes, using the `when` attribute.
- `corporation'`: If `when` is set to `"train"`, this value is the name
of the corporation whose train purchase closes this company.
## description
Provide a description for an ability that is implemented outside of the ability framework.
- `description`: Description of the ability.
## exchange
This company may be exchanged for a single share of a specified corporation during a step
that allows exchange.
- `corporations`: An array with corporation names, whose share may be exchanged.
Use a simple `"any"` (no array) to allow for any corporation.
- `from`: Where the share may be take from, either `"ipo"`,
`"market"`, or an array containing both.
## hex_bonus
Give a route bonus if at least one of the hexes are included in the route.
- `hexes`: Name of hexes that gives a bonus.
- `amount`: Revenue bonus.
## no_buy
This company may not be bought in.
## reservation
Reserve a token slot
- `hex`: Hex coordinate
- `slot`: A specific token slot to designate
- `city`: Which city to reserve, if multiple cities are on one hex
## return_token
Take a station token off the board and place back on the charter
in the most expensive open location
- `reimburse`: If true, the corporation is reimbursed the token cost
of the location where the token is placed
## revenue_change
The revenue for this company changes when the conditions set by `when`
and `owner_type` are satisfied.
- `revenue`: The new revenue value
## shares
This company comes with a share of a corporation when acquired.
- `share`: If a string in the form of `sym_x`, where `sym` is a
corporation symbol, and `x` is a numeric index, gives the
certificate of the corporation at index `x` (`x = 0` is the
president's certificate). If `"random_president"`, gives a
president's certificate randomly selected at game setup. Gives one
ordinary share of one the corporations listed in `corporations`,
randomly selected at game setup.
- `corporations`: A list of corporations to be used with `"share": "random_share"`
## teleport
Lay a tile and place a station token without connectivity
- `hexes`: An array of hex coordinates that can be used as the
teleport destination.
- `tiles`: An array of tile numbers which may be placed at the
teleport destination.
- `cost`: Cost to use the teleport ability.
- `free_tile_lay`: If true, the tile is laid with 0 cost. Default false.
## tile_discount
Discount the cost for laying tiles in the specified terrain type
- `discount`: Discount amount
- `terrain`: If set, type of terrain for which discount is provided, otherwise the discount is off the total cost
- `hexes`: If not specified, all applicable hexes qualifies for
the discount. If specified, only specified hexes qualify
## tile_income
Generate extra revenue when tiles are laid on specified terrain types.
- `terrain`: Terrain type for this ability
- `income`: Extra income per tile lay
- `owner_only`: Does this income apply to any tile lay (1882 Tresle Bridge) or just the owner (1817 Mountain Engineers)
## tile_lay
Lay or upgrade one or more track tiles without connectivity, in addition to
normal tile lay actions.
- `hexes`: Array of hex coordinates where tiles may be laid.
- `tiles`: Array of tile numbers which may be laid.
- `cost`: Cost to use the ability.
- `closed_when_used_up`: This ability has a count that is decreased each time it is used. If this attribute is true the private is closed when count reaches zero, if false the private
remains open but the discount can no longer be used. Default false.
- `free`: If true, the tiles are laid with 0 cost. Default false.
- `discount`: Discount the cost of laying the tile by the given
amount. Default 0.
- `special`: If true, do not check that the tile upgrade preserves
labels and city count. Default true.
- `connect`: If true, and `count` is greater than 1, tiles laid must
connect to each other. Default true.
- `blocks`: If true and `when` is `sold`, then the step
`TrackLayWhenCompanySold` will require a tile lay. Default false.
- `reachable`: If true, when tile layed, a check is done if one of the
controlling corporation's station tokens are reachable; if not a game
error is triggered. Default false.
- `must_lay_together`: If true and `count` is greater than 1, all the tile lays
must happen at the same time. Default
没有合适的资源?快使用搜索试试~ 我知道了~
18xx:在线玩18xx游戏的平台!
共1479个文件
rb:715个
svg:636个
json:55个
5星 · 超过95%的资源 需积分: 50 3 下载量 168 浏览量
2021-02-13
13:30:06
上传
评论
收藏 2.27MB ZIP 举报
温馨提示
18xx。游戏 关于 是一个免费的开放源代码网站,可用于玩游戏。 所有游戏均在其各自的设计师和/或发行商的许可下发布。 贡献者 特别感谢所有帮助使该项目真正成功的! 发展 请提交并。 有关开发的大多数讨论都发生在#18xxgames和#18xxgamesdev频道中的18xx 上。 如果您想将游戏添加到该站点,请通过Slack与我们联系。 有关更多信息,请参见 。
资源推荐
资源详情
资源评论
收起资源包目录
18xx:在线玩18xx游戏的平台! (1479个子文件)
postgresql.conf 26KB
18xx.conf 2KB
nginx.conf 645B
status.conf 119B
config 33B
main.css 6KB
Dockerfile 371B
Dockerfile 352B
Dockerfile 84B
Dockerfile 18B
.dockerignore 46B
.editorconfig 118B
fixtures 16B
Gemfile 486B
.gitignore 309B
favicon.ico 15KB
.ignore 10B
big.js 22KB
message-bus.js 14KB
message-bus-ajax.js 1KB
polyfill.js 963B
15528.json 323KB
23366.json 299KB
23459.json 296KB
hs_wuveadew_21268.json 289KB
21268.json 289KB
20584.json 281KB
26037.json 232KB
21769.json 222KB
22032.json 219KB
5236.json 212KB
5585.json 165KB
19.json 164KB
16852.json 155KB
16281.json 151KB
19354.json 142KB
3099.json 142KB
2593.json 139KB
19926.json 139KB
9222.json 134KB
7818.json 126KB
9487.json 125KB
3055.json 125KB
hs_srwgrtvq_1602711223.json 121KB
1905.json 120KB
13315.json 118KB
22071.json 108KB
26036.json 103KB
11181.json 98KB
2851.json 95KB
1446.json 94KB
12666.json 94KB
962.json 92KB
hs_ymymwsiv_16134.json 92KB
2809.json 91KB
19962.json 85KB
17510.json 82KB
14375.json 80KB
11098.json 76KB
1277.json 76KB
10526.json 71KB
20758.json 71KB
hs_pzdxtics_1601680033.json 70KB
314.json 70KB
17849.json 70KB
hs_gcumggit_1595777670.json 65KB
10264.json 64KB
14377.json 60KB
4714.json 58KB
hs_ahjzadkh_19792.json 53KB
26232.json 53KB
tutorial.json 27KB
22383.json 21KB
hs_sudambau_1600037415.json 15KB
21422.json 11KB
hs_cvjhogoy_1599504419.json 9KB
.keep 1B
.keep 0B
.keep 0B
LICENSE 1KB
Gemfile.lock 3KB
Makefile 2KB
README.md 11KB
TILES.md 8KB
DEVELOPMENT.md 4KB
bug_report.md 2KB
README.md 886B
interface_or_site_problem.md 681B
feature_request.md 627B
tile_anatomy_pointy.png 28KB
lane_widths.png 17KB
android-chrome-512x512.png 15KB
lanes_small.png 14KB
tile_18Chesapeake_A3_B2.png 11KB
tile_18MEX_485MC.png 11KB
tile_18Chesapeake_H6.png 9KB
tile_18MEX_485P.png 8KB
tile_1.png 7KB
tile_18Chesapeake_K3.png 6KB
tile_1889_439.png 6KB
共 1479 条
- 1
- 2
- 3
- 4
- 5
- 6
- 15
Compass宁
- 粉丝: 30
- 资源: 4643
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- STM8L101F3P6单片机+CC1100模块433M遥控器设计硬件(原理图+PCB)工程文件.zip
- 上传下载铁人下载系统 Liuxing 1.0-liuxing1.0.rar
- 南京邮电大学数学实验实力雄厚,凭借其优秀的师资力量、丰富的实践教学资源和卓越的科研成果,成为国内一流的数学实验教学和科研基地
- 【火爆朋友圈的今天吃什么源码 v1.0】随机的为用户带来每一天的用餐选择和推荐.rar
- MPU6050中文版数据手册
- 上传下载手机电影下载-mobiledy.rar
- 响应式旅游网站源码下载 马尔代夫旅游网站.rar
- CMS小涴熊漫画连载系统漫画网站源码 带采集API.rar
- 福袋点点.apk
- 基于STM32的电子秤采用0.96寸OLED显示UI界面源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页