|
static void | do_cmd_eat_food_aux (int item) |
| 食料を食べるコマンドのサブルーチン [詳細]
|
|
static bool | item_tester_hook_eatable (object_type *o_ptr) |
| オブジェクトをプレイヤーが食べることができるかを判定する / Hook to determine if an object is eatable [詳細]
|
|
void | do_cmd_eat_food (void) |
| 食料を食べるコマンドのメインルーチン / Eat some food (from the pack or floor) [詳細]
|
|
static void | do_cmd_quaff_potion_aux (int item) |
| 薬を飲むコマンドのサブルーチン / Quaff a potion (from the pack or the floor) [詳細]
|
|
static bool | item_tester_hook_quaff (object_type *o_ptr) |
| オブジェクトをプレイヤーが飲むことができるかを判定する / Hook to determine if an object can be quaffed [詳細]
|
|
void | do_cmd_quaff_potion (void) |
| 薬を飲むコマンドのメインルーチン / Quaff some potion (from the pack or floor) [詳細]
|
|
static void | do_cmd_read_scroll_aux (int item, bool known) |
| 巻物を読むコマンドのサブルーチン Read a scroll (from the pack or floor). [詳細]
|
|
static bool | item_tester_hook_readable (object_type *o_ptr) |
| オブジェクトをプレイヤーが読むことができるかを判定する / Hook to determine if an object is readable [詳細]
|
|
void | do_cmd_read_scroll (void) |
| 読むコマンドのメインルーチン / Eat some food (from the pack or floor) [詳細]
|
|
static int | staff_effect (int sval, bool *use_charge, bool powerful, bool magic, bool known) |
| 杖の効果を発動する [詳細]
|
|
static void | do_cmd_use_staff_aux (int item) |
| 杖を使うコマンドのサブルーチン / Use a staff. [詳細]
|
|
void | do_cmd_use_staff (void) |
| 杖を使うコマンドのメインルーチン / [詳細]
|
|
static int | wand_effect (int sval, int dir, bool powerful, bool magic) |
| 魔法棒の効果を発動する [詳細]
|
|
static void | do_cmd_aim_wand_aux (int item) |
| 魔法棒を使うコマンドのサブルーチン / Aim a wand (from the pack or floor). [詳細]
|
|
void | do_cmd_aim_wand (void) |
| 魔法棒を使うコマンドのメインルーチン / [詳細]
|
|
static int | rod_effect (int sval, int dir, bool *use_charge, bool powerful, bool magic) |
| ロッドの効果を発動する [詳細]
|
|
static void | do_cmd_zap_rod_aux (int item) |
| 魔法棒を使うコマンドのサブルーチン / Activate (zap) a Rod [詳細]
|
|
void | do_cmd_zap_rod (void) |
| ロッドを使うコマンドのメインルーチン / [詳細]
|
|
static bool | item_tester_hook_activate (object_type *o_ptr) |
| オブジェクトをプレイヤーが魔道具として発動できるかを判定する / Hook to determine if an object is activatable [詳細]
|
|
void | ring_of_power (int dir) |
| 『一つの指輪』の効果処理 / Hack – activate the ring of power [詳細]
|
|
static bool | ang_sort_comp_pet (vptr u, vptr v, int a, int b) |
| ペット入りモンスターボールをソートするための比較関数 [詳細]
|
|
static void | do_cmd_activate_aux (int item) |
| 装備を発動するコマンドのサブルーチン / Activate a wielded object. [詳細]
|
|
void | do_cmd_activate (void) |
| 装備を発動するコマンドのメインルーチン / [詳細]
|
|
static bool | item_tester_hook_use (object_type *o_ptr) |
| オブジェクトをプレイヤーが簡易使用コマンドで利用できるかを判定する / Hook to determine if an object is useable [詳細]
|
|
void | do_cmd_use (void) |
| アイテムを汎用的に「使う」コマンドのメインルーチン / Use an item [詳細]
|
|
static int | select_magic_eater (bool only_browse) |
| 魔道具術師の取り込んだ魔力一覧から選択/閲覧する / [詳細]
|
|
bool | do_cmd_magic_eater (bool only_browse, bool powerful) |
| 取り込んだ魔力を利用するコマンドのメインルーチン / Use eaten rod, wand or staff [詳細]
|
|
プレイヤーのアイテムに関するコマンドの実装2 / Spell/Prayer commands
- 日付
- 2014/01/27
- 作者
Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
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.
2014 Deskull rearranged comment for Doxygen.
This file includes code for eating food, drinking potions,
reading scrolls, aiming wands, using staffs, zapping rods,
and activating artifacts.
In all cases, if the player becomes "aware" of the item's use
by testing it, mark it as "aware" and reward some experience
based on the object's level, always rounding up. If the player
remains "unaware", mark that object "kind" as "tried".
This code now correctly handles the unstacking of wands, staffs,
and rods. Note the overly paranoid warning about potential pack
overflow, which allows the player to use and drop a stacked item.
In all "unstacking" scenarios, the "used" object is "carried" as if
the player had just picked it up. In particular, this means that if
the use of an item induces pack overflow, that item will be dropped.
For simplicity, these routines induce a full "pack reorganization"
which not only combines similar items, but also reorganizes various
items to obey the current "sorting" method. This may require about
400 item comparisons, but only occasionally.
There may be a BIG problem with any "effect" that can cause "changes"
to the inventory. For example, a "scroll of recharging" can cause
a wand/staff to "disappear", moving the inventory up. Luckily, the
scrolls all appear BEFORE the staffs/wands, so this is not a problem.
But, for example, a "staff of recharging" could cause MAJOR problems.
In such a case, it will be best to either (1) "postpone" the effect
until the end of the function, or (2) "change" the effect, say, into
giving a staff "negative" charges, or "turning a staff into a stick".
It seems as though a "rod of recharging" might in fact cause problems.
The basic problem is that the act of recharging (and destroying) an
item causes the inducer of that action to "move", causing "o_ptr" to
no longer point at the correct item, with horrifying results.
Note that food/potions/scrolls no longer use bit-flags for effects,
but instead use the "sval" (which is also used to sort the objects).