プレイヤーのコマンド処理2 / Movement commands (part 2) [詳細]
#include "angband.h"
関数 | |
bool | confirm_leave_level (bool down_stair) |
フロア脱出時に出戻りが不可能だった場合に警告を加える処理 [詳細] | |
void | do_cmd_go_up (void) |
階段を使って階層を昇る処理 / Go up one level [詳細] | |
void | do_cmd_go_down (void) |
階段を使って階層を降りる処理 / Go down one level [詳細] | |
void | do_cmd_search (void) |
探索コマンドのメインルーチン / Simple command to "search" for one turn [詳細] | |
static s16b | chest_check (int y, int x, bool trapped) |
該当のマスに存在している箱のオブジェクトIDを返す。 [詳細] | |
static void | chest_death (bool scatter, int y, int x, s16b o_idx) |
箱からアイテムを引き出す / Allocates objects upon opening a chest -BEN- [詳細] | |
static void | chest_trap (int y, int x, s16b o_idx) |
箱のトラップ処理 / Chests have traps too. [詳細] | |
static bool | do_cmd_open_chest (int y, int x, s16b o_idx) |
箱を開けるコマンドのメインルーチン / Attempt to open the given chest at the given location [詳細] | |
static bool | is_open (int feat) |
地形は開くものであって、かつ開かれているかを返す / Attempt to open the given chest at the given location [詳細] | |
static int | count_dt (int *y, int *x, bool(*test)(int feat), bool under) |
プレイヤーの周辺9マスに該当する地形がいくつあるかを返す / Attempt to open the given chest at the given location [詳細] | |
static int | count_chests (int *y, int *x, bool trapped) |
プレイヤーの周辺9マスに箱のあるマスがいくつあるかを返す / Return the number of chests around (or under) the character. [詳細] | |
static int | coords_to_dir (int y, int x) |
プレイヤーから指定の座標がどの方角にあるかを返す / Convert an adjacent location to a direction. [詳細] | |
static bool | do_cmd_open_aux (int y, int x) |
「開ける」動作コマンドのサブルーチン / Perform the basic "open" command on doors [詳細] | |
void | do_cmd_open (void) |
「開ける」コマンドのメインルーチン / Open a closed/locked/jammed door or a closed/locked chest. [詳細] | |
static bool | do_cmd_close_aux (int y, int x) |
「閉じる」動作コマンドのサブルーチン / Perform the basic "close" command [詳細] | |
void | do_cmd_close (void) |
「閉じる」コマンドのメインルーチン / Close an open door. [詳細] | |
static bool | do_cmd_tunnel_test (int y, int x) |
「掘る」コマンドを該当のマスに行えるかの判定と結果メッセージの表示 / Determine if a given grid may be "tunneled" [詳細] | |
static bool | do_cmd_tunnel_aux (int y, int x) |
「掘る」動作コマンドのサブルーチン / Perform the basic "tunnel" command [詳細] | |
void | do_cmd_tunnel (void) |
「掘る」動作コマンドのメインルーチン / Tunnels through "walls" (including rubble and closed doors) [詳細] | |
bool | easy_open_door (int y, int x) |
移動処理による簡易な「開く」処理 / easy_open_door – [詳細] | |
static bool | do_cmd_disarm_chest (int y, int x, s16b o_idx) |
箱のトラップを解除するコマンドのメインルーチン / Perform the basic "disarm" command [詳細] | |
bool | do_cmd_disarm_aux (int y, int x, int dir) |
箱のトラップを解除するコマンドのサブルーチン / Perform the basic "disarm" command [詳細] | |
void | do_cmd_disarm (void) |
箱、床のトラップ解除処理双方の統合メインルーチン / Disarms a trap, or chest [詳細] | |
static bool | do_cmd_bash_aux (int y, int x, int dir) |
「打ち破る」動作コマンドのサブルーチン / Perform the basic "bash" command [詳細] | |
void | do_cmd_bash (void) |
「打ち破る」動作コマンドのメインルーチン / Bash open a door, success based on character strength [詳細] | |
void | do_cmd_alter (void) |
特定のマスに影響を及ぼすための汎用的コマンド [詳細] | |
static bool | get_spike (int *ip) |
「くさびを打つ」ために必要なオブジェクトがあるかどうかの判定を返す / Find the index of some "spikes", if possible. [詳細] | |
void | do_cmd_spike (void) |
「くさびを打つ」動作コマンドのメインルーチン / Jam a closed door with a spike [詳細] | |
void | do_cmd_walk (bool pickup) |
「歩く」動作コマンドのメインルーチン / Support code for the "Walk" and "Jump" commands [詳細] | |
void | do_cmd_run (void) |
「走る」動作コマンドのメインルーチン / Start running. [詳細] | |
void | do_cmd_stay (bool pickup) |
「留まる」動作コマンドのメインルーチン / Stay still. [詳細] | |
void | do_cmd_rest (void) |
「休む」動作コマンドのメインルーチン / Resting allows a player to safely restore his hp -RAK- [詳細] | |
static int | breakage_chance (object_type *o_ptr) |
矢弾を射撃した場合の破損確率を返す / Determines the odds of an object breaking when thrown at a monster [詳細] | |
static s16b | tot_dam_aux_shot (object_type *o_ptr, int tdam, monster_type *m_ptr) |
矢弾を射撃した際のスレイ倍率をかけた結果を返す / Determines the odds of an object breaking when thrown at a monster [詳細] | |
void | do_cmd_fire_aux (int item, object_type *j_ptr) |
射撃処理のサブルーチン / Fire an object from the pack or floor. [詳細] | |
void | do_cmd_fire (void) |
射撃処理のメインルーチン [詳細] | |
static bool | item_tester_hook_boomerang (object_type *o_ptr) |
オブジェクトが投射可能な武器かどうかを返す。 [詳細] | |
bool | do_cmd_throw_aux (int mult, bool boomerang, int shuriken) |
投射処理のサブルーチン / Throw an object from the pack or floor. [詳細] | |
void | do_cmd_throw (void) |
投射処理のメインルーチン / Throw an object from the pack or floor. [詳細] | |
プレイヤーのコマンド処理2 / Movement commands (part 2)
This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.
|
static |
矢弾を射撃した場合の破損確率を返す / Determines the odds of an object breaking when thrown at a monster
o_ptr | 矢弾のオブジェクト構造体参照ポインタ |
Note that artifacts never break, see the "drop_near()" function.
該当のマスに存在している箱のオブジェクトIDを返す。
y | 走査対象にしたいマスのY座標 |
x | 走査対象にしたいマスのX座標 |
trapped | TRUEならばトラップが存在する箱のみ、FALSEならば空でない箱全てを対象にする |
箱からアイテムを引き出す / Allocates objects upon opening a chest -BEN-
scatter | TRUEならばトラップによるアイテムの拡散処理 |
y | 箱の存在するマスのY座標 |
x | 箱の存在するマスのX座標 |
o_idx | 箱のオブジェクトID |
Disperse treasures from the given chest, centered at (x,y).
Small chests often contain "gold", while Large chests always contain items. Wooden chests contain 2 items, Iron chests contain 4 items, and Steel chests contain 6 items. The "value" of the items in a chest is based on the "power" of the chest, which is in turn based on the level on which the chest is generated.
|
static |
箱のトラップ処理 / Chests have traps too.
y | 箱の存在するマスのY座標 |
x | 箱の存在するマスのX座標 |
o_idx | 箱のオブジェクトID |
Exploding chest destroys contents (and traps). Note that the chest itself is never destroyed.
フロア脱出時に出戻りが不可能だった場合に警告を加える処理
down_stair | TRUEならば階段を降りる処理、FALSEなら階段を昇る処理による内容 |
|
static |
プレイヤーから指定の座標がどの方角にあるかを返す / Convert an adjacent location to a direction.
y | 方角を確認したY座標 |
x | 方角を確認したX座標 |
|
static |
プレイヤーの周辺9マスに箱のあるマスがいくつあるかを返す / Return the number of chests around (or under) the character.
y | 該当するマスの中から1つのY座標を返す参照ポインタ |
x | 該当するマスの中から1つのX座標を返す参照ポインタ |
trapped | TRUEならばトラップの存在が判明している箱のみ対象にする |
If requested, count only trapped chests.
プレイヤーの周辺9マスに該当する地形がいくつあるかを返す / Attempt to open the given chest at the given location
y | 該当する地形の中から1つのY座標を返す参照ポインタ |
x | 該当する地形の中から1つのX座標を返す参照ポインタ |
test | 地形条件を判定するための関数ポインタ |
under | TRUEならばプレイヤーの直下の座標も走査対象にする |
Return the number of features around (or under) the character. Usually look for doors and floor traps.
void do_cmd_alter | ( | void | ) |
特定のマスに影響を及ぼすための汎用的コマンド
Manipulate an adjacent grid in some way
Attack monsters, tunnel through walls, disarm traps, open doors.
Consider confusion XXX XXX XXX
This command must always take a turn, to prevent free detection of invisible monsters.
void do_cmd_bash | ( | void | ) |
「打ち破る」動作コマンドのメインルーチン / Bash open a door, success based on character strength
For a closed door, pval is positive if locked; negative if stuck.
For an open door, pval is positive for a broken door.
A closed door can be opened - harder if locked. Any door might be bashed open (and thereby broken). Bashing a door is (potentially) faster! You move into the door way. To open a stuck door, it must be bashed. A closed door can be jammed (see do_cmd_spike()).
Creatures can also open or bash doors, see elsewhere.
|
static |
「打ち破る」動作コマンドのサブルーチン / Perform the basic "bash" command
y | 対象を行うマスのY座標 |
x | 対象を行うマスのX座標 |
dir | プレイヤーから見たターゲットの方角ID |
Assume destination is a closed/locked/jammed door Assume there is no monster blocking the destination Returns TRUE if repeated commands may continue
void do_cmd_close | ( | void | ) |
「閉じる」コマンドのメインルーチン / Close an open door.
Unlocking a locked door/chest is worth one experience point.
|
static |
「閉じる」動作コマンドのサブルーチン / Perform the basic "close" command
y | 対象を行うマスのY座標 |
x | 対象を行うマスのX座標 |
Assume destination is an open/broken door Assume there is no monster blocking the destination Returns TRUE if repeated commands may continue
void do_cmd_disarm | ( | void | ) |
箱、床のトラップ解除処理双方の統合メインルーチン / Disarms a trap, or chest
bool do_cmd_disarm_aux | ( | int | y, |
int | x, | ||
int | dir | ||
) |
箱のトラップを解除するコマンドのサブルーチン / Perform the basic "disarm" command
y | 解除を行うマスのY座標 |
x | 解除を行うマスのX座標 |
dir | プレイヤーからみた方向ID |
Assume destination is a visible trap Assume there is no monster blocking the destination Returns TRUE if repeated commands may continue
箱のトラップを解除するコマンドのメインルーチン / Perform the basic "disarm" command
y | 解除を行うマスのY座標 |
x | 解除を行うマスのX座標 |
o_idx | 箱のオブジェクトID |
Assume destination is a visible trap Assume there is no monster blocking the destination Returns TRUE if repeated commands may continue
void do_cmd_fire | ( | void | ) |
射撃処理のメインルーチン
void do_cmd_fire_aux | ( | int | item, |
object_type * | j_ptr | ||
) |
射撃処理のサブルーチン / Fire an object from the pack or floor.
item | 射撃するオブジェクトの所持ID |
j_ptr | 射撃武器のオブジェクト参照ポインタ |
You may only fire items that "match" your missile launcher.
You must use slings + pebbles/shots, bows + arrows, xbows + bolts.
See "calc_bonuses()" for more calculations and such.
Note that "firing" a missile is MUCH better than "throwing" it.
Note: "unseen" monsters are very hard to hit.
Objects are more likely to break if they "attempt" to hit a monster.
Rangers (with Bows) and Anyone (with "Extra Shots") get extra shots.
The "extra shot" code works by decreasing the amount of energy required to make each shot, spreading the shots out over time.
Note that when firing missiles, the launcher multiplier is applied after all the bonuses are added in, making multipliers very useful.
Note that Bows of "Extra Might" get extra range and an extra bonus for the damage multiplier.
Note that Bows of "Extra Shots" give an extra shot.
void do_cmd_go_down | ( | void | ) |
階段を使って階層を降りる処理 / Go down one level
void do_cmd_go_up | ( | void | ) |
階段を使って階層を昇る処理 / Go up one level
void do_cmd_open | ( | void | ) |
「開ける」コマンドのメインルーチン / Open a closed/locked/jammed door or a closed/locked chest.
Unlocking a locked door/chest is worth one experience point.
|
static |
「開ける」動作コマンドのサブルーチン / Perform the basic "open" command on doors
y | 対象を行うマスのY座標 |
x | 対象を行うマスのX座標 |
Assume destination is a closed/locked/jammed door Assume there is no monster blocking the destination Returns TRUE if repeated commands may continue
箱を開けるコマンドのメインルーチン / Attempt to open the given chest at the given location
y | 箱の存在するマスのY座標 |
x | 箱の存在するマスのX座標 |
o_idx | 箱のオブジェクトID |
Assume there is no monster blocking the destination
void do_cmd_rest | ( | void | ) |
「休む」動作コマンドのメインルーチン / Resting allows a player to safely restore his hp -RAK-
void do_cmd_run | ( | void | ) |
「走る」動作コマンドのメインルーチン / Start running.
void do_cmd_search | ( | void | ) |
探索コマンドのメインルーチン / Simple command to "search" for one turn
void do_cmd_spike | ( | void | ) |
「くさびを打つ」動作コマンドのメインルーチン / Jam a closed door with a spike
This command may NOT be repeated
void do_cmd_stay | ( | bool | pickup | ) |
「留まる」動作コマンドのメインルーチン / Stay still.
Search. Enter stores. Pick up treasure if "pickup" is true.
pickup | アイテムの自動拾いを行うならTRUE |
void do_cmd_throw | ( | void | ) |
投射処理のメインルーチン / Throw an object from the pack or floor.
投射処理のサブルーチン / Throw an object from the pack or floor.
mult | 威力の倍率 |
boomerang | ブーメラン処理ならばTRUE |
shuriken | 忍者の手裏剣処理ならばTRUE |
Note: "unseen" monsters are very hard to hit.
Should throwing a weapon do full damage? Should it allow the magic to hit bonus of the weapon to have an effect? Should it ever cause the item to be destroyed? Should it do any damage at all?
void do_cmd_tunnel | ( | void | ) |
「掘る」動作コマンドのメインルーチン / Tunnels through "walls" (including rubble and closed doors)
Note that you must tunnel in order to hit invisible monsters in walls, though moving into walls still takes a turn anyway.
Digging is very difficult without a "digger" weapon, but can be accomplished by strong players using heavy weapons.
|
static |
「掘る」動作コマンドのサブルーチン / Perform the basic "tunnel" command
y | 対象を行うマスのY座標 |
x | 対象を行うマスのX座標 |
Assumes that no monster is blocking the destination Do not use twall anymore Returns TRUE if repeated commands may continue
|
static |
「掘る」コマンドを該当のマスに行えるかの判定と結果メッセージの表示 / Determine if a given grid may be "tunneled"
y | 対象を行うマスのY座標 |
x | 対象を行うマスのX座標 |
void do_cmd_walk | ( | bool | pickup | ) |
「歩く」動作コマンドのメインルーチン / Support code for the "Walk" and "Jump" commands
pickup | アイテムの自動拾いを行うならTRUE |
bool easy_open_door | ( | int | y, |
int | x | ||
) |
移動処理による簡易な「開く」処理 / easy_open_door –
If there is a jammed/closed/locked door at the given location, then attempt to unlock/open it. Return TRUE if an attempt was made (successful or not), otherwise return FALSE.
The code here should be nearly identical to that in do_cmd_open_test() and do_cmd_open_aux().
|
static |
「くさびを打つ」ために必要なオブジェクトがあるかどうかの判定を返す / Find the index of some "spikes", if possible.
ip | くさびとして打てるオブジェクトのID |
XXX XXX XXX Let user choose a pile of spikes, perhaps?
|
static |
地形は開くものであって、かつ開かれているかを返す / Attempt to open the given chest at the given location
feat | 地形ID |
|
static |
オブジェクトが投射可能な武器かどうかを返す。
o_ptr | 判定するオブジェクトの構造体参照ポインタ |
|
static |
矢弾を射撃した際のスレイ倍率をかけた結果を返す / Determines the odds of an object breaking when thrown at a monster
o_ptr | 矢弾のオブジェクト構造体参照ポインタ |
tdam | 計算途中のダメージ量 |
m_ptr | 目標モンスターの構造体参照ポインタ |