青魔法の処理実装 / Blue magic
[詳細]
青魔法の処理実装 / Blue magic
- 日付
- 2014/01/15
- 作者
- 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.
#define pseudo_plev |
( |
| ) |
(((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130) |
モンスター魔法をプレイヤーが使用する場合の換算レベル
static bool cast_learned_spell |
( |
int |
spell, |
|
|
bool |
success |
|
) |
| |
|
static |
青魔法の発動 / do_cmd_cast calls this function if the player's class is 'blue-mage'.
- 引数
-
spell | 発動するモンスター攻撃のID |
success | TRUEは成功時、FALSEは失敗時の処理を行う |
- 戻り値
- 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
bool do_cmd_cast_learned |
( |
void |
| ) |
|
青魔法コマンドのメインルーチン / do_cmd_cast calls this function if the player's class is 'Blue-Mage'.
- 戻り値
- 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
static int get_learned_power |
( |
int * |
sn | ) |
|
|
static |
使用可能な青魔法を選択する / Allow user to choose a imitation.
- 引数
-
sn | 選択したモンスター攻撃ID、キャンセルの場合-1、不正な選択の場合-2を返す |
- 戻り値
- 発動可能な魔法を選択した場合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.
void learn_spell |
( |
int |
monspell | ) |
|
青魔法のラーニング判定と成功した場合のラーニング処理
- 引数
-
monspell | ラーニングを試みるモンスター攻撃のID |
- 戻り値
- なし
static void learned_info |
( |
char * |
p, |
|
|
int |
power |
|
) |
| |
|
static |
受け取ったモンスター魔法のIDに応じて青魔法の効果情報をまとめたフォーマットを返す
- 引数
-
p | 情報を返す文字列参照ポインタ |
power | モンスター魔法のID |
- 戻り値
- なし
void set_bluemage_damage |
( |
int |
SPELL_NUM, |
|
|
int |
plev, |
|
|
cptr |
msg, |
|
|
char * |
tmp |
|
) |
| |
文字列に青魔導師の呪文の攻撃力を加える
- 引数
-
SPELL_NUM | 呪文番号 |
plev | プレイヤーレベル |
msg | 表示する文字列 |
tmp | 返すメッセージを格納する配列 |
- 戻り値
- なし
void set_rf_masks |
( |
s32b * |
f4, |
|
|
s32b * |
f5, |
|
|
s32b * |
f6, |
|
|
int |
mode |
|
) |
| |
モンスター特殊能力のフラグ配列から特定条件の魔法だけを抜き出す処理 Extract monster spells mask for the given mode
- 引数
-
f4 | モンスター特殊能力の4番目のフラグ配列 |
f5 | モンスター特殊能力の5番目のフラグ配列 |
f6 | モンスター特殊能力の6番目のフラグ配列 |
mode | 抜き出したい条件 |
- 戻り値
- なし