Hengband  2.2.1
マクロ定義 | 関数 | 変数
mspells3.c ファイル

青魔法の処理実装 / Blue magic [詳解]

#include "angband.h"
#include "core.h"
#include "util.h"
#include "floor.h"
#include "grid.h"
#include "spells-summon.h"
#include "avatar.h"
#include "spells-status.h"
#include "cmd-spell.h"
#include "player-status.h"
#include "monster-spell.h"
#include "monster-status.h"
#include "spells.h"
#include "cmd-basic.h"
#include "player-effects.h"
#include "targeting.h"
#include "view-mainwindow.h"
mspells3.c の依存先関係図:

マクロ定義

#define pseudo_plev()   (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130)
 モンスター魔法をプレイヤーが使用する場合の換算レベル [詳解]
 

関数

void set_bluemage_damage (int SPELL_NUM, PLAYER_LEVEL plev, concptr msg, char *tmp)
 文字列に青魔導師の呪文の攻撃力を加える [詳解]
 
static void learned_info (char *p, int power)
 受け取ったモンスター魔法のIDに応じて青魔法の効果情報をまとめたフォーマットを返す [詳解]
 
static bool get_learned_power (SPELL_IDX *sn)
 使用可能な青魔法を選択する / Allow user to choose a imitation. [詳解]
 
static bool cast_learned_spell (int spell, bool success)
 青魔法の発動 / do_cmd_cast calls this function if the player's class is 'blue-mage'. [詳解]
 
bool do_cmd_cast_learned (void)
 青魔法コマンドのメインルーチン / do_cmd_cast calls this function if the player's class is 'Blue-Mage'. [詳解]
 
void learn_spell (int monspell)
 青魔法のラーニング判定と成功した場合のラーニング処理 [詳解]
 
void set_rf_masks (BIT_FLAGS *f4, BIT_FLAGS *f5, BIT_FLAGS *f6, BIT_FLAGS mode)
 モンスター特殊能力のフラグ配列から特定条件の魔法だけを抜き出す処理 Extract monster spells mask for the given mode [詳解]
 

変数

const monster_power monster_powers [MAX_MONSPELLS]
 青魔法テーブル [詳解]
 
const concptr monster_powers_short [MAX_MONSPELLS]
 モンスター魔法名テーブル [詳解]
 

詳解

青魔法の処理実装 / 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.

マクロ定義詳解

◆ pseudo_plev

#define pseudo_plev ( )    (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130)

モンスター魔法をプレイヤーが使用する場合の換算レベル

関数詳解

◆ cast_learned_spell()

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
successTRUEは成功時、FALSEは失敗時の処理を行う
戻り値
処理を実行したらTRUE、キャンセルした場合FALSEを返す。
呼び出し関係図:
被呼び出し関係図:

◆ do_cmd_cast_learned()

bool do_cmd_cast_learned ( void  )

青魔法コマンドのメインルーチン / do_cmd_cast calls this function if the player's class is 'Blue-Mage'.

戻り値
処理を実行したらTRUE、キャンセルした場合FALSEを返す。
呼び出し関係図:

◆ get_learned_power()

static bool get_learned_power ( SPELL_IDX 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.

呼び出し関係図:
被呼び出し関係図:

◆ learn_spell()

void learn_spell ( int  monspell)

青魔法のラーニング判定と成功した場合のラーニング処理

引数
monspellラーニングを試みるモンスター攻撃のID
戻り値
なし
呼び出し関係図:

◆ learned_info()

static void learned_info ( char *  p,
int  power 
)
static

受け取ったモンスター魔法のIDに応じて青魔法の効果情報をまとめたフォーマットを返す

引数
p情報を返す文字列参照ポインタ
powerモンスター魔法のID
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ set_bluemage_damage()

void set_bluemage_damage ( int  SPELL_NUM,
PLAYER_LEVEL  plev,
concptr  msg,
char *  tmp 
)

文字列に青魔導師の呪文の攻撃力を加える

引数
SPELL_NUM呪文番号
plevプレイヤーレベル
msg表示する文字列
tmp返すメッセージを格納する配列
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ set_rf_masks()

void set_rf_masks ( BIT_FLAGS f4,
BIT_FLAGS f5,
BIT_FLAGS f6,
BIT_FLAGS  mode 
)

モンスター特殊能力のフラグ配列から特定条件の魔法だけを抜き出す処理 Extract monster spells mask for the given mode

引数
f4モンスター特殊能力の4番目のフラグ配列
f5モンスター特殊能力の5番目のフラグ配列
f6モンスター特殊能力の6番目のフラグ配列
mode抜き出したい条件
戻り値
なし

変数詳解

◆ monster_powers

const monster_power monster_powers[MAX_MONSPELLS]

青魔法テーブル

level, smana, fail, manedam, manefail, use_stat, name

◆ monster_powers_short

const concptr monster_powers_short[MAX_MONSPELLS]

モンスター魔法名テーブル