ものまねの処理実装 / Imitation code
- 日付
- 2014/01/14
- 作者
- 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.
ものまねコマンドのメインルーチン / do_cmd_cast calls this function if the player's class is 'imitator'.
- 引数
-
baigaesi | TRUEならば倍返し上の処理として行う |
- 戻り値
- 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
If a valid spell is chosen, saves it in '*sn' and returns TRUE If the user hits escape, returns FALSE, and set '*sn' to -1 If there are no legal choices, returns FALSE, and sets '*sn' to -2
The "prompt" should be "cast", "recite", or "study" The "known" should be TRUE for cast/pray, FALSE for study
nb: This function has a (trivial) display bug which will be obvious when you run it. It's probably easy to fix but I haven't tried, sorry.
static int get_mane_power |
( |
int * |
sn, |
|
|
bool |
baigaesi |
|
) |
| |
|
static |
どのものまねを発動するか選択する処理 / Allow user to choose a imitation.
- 引数
-
sn | 実行したものまねのIDを返す参照ポインタ(キャンセルなどの場合-1を返す) |
baigaesi | TRUEならば倍返し上の処理として行う |
- 戻り値
- 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
If a valid spell is chosen, saves it in '*sn' and returns TRUE If the user hits escape, returns FALSE, and set '*sn' to -1 If there are no legal choices, returns FALSE, and sets '*sn' to -2
The "prompt" should be "cast", "recite", or "study" The "known" should be TRUE for cast/pray, FALSE for study
nb: This function has a (trivial) display bug which will be obvious when you run it. It's probably easy to fix but I haven't tried, sorry.