Hengband  2.2.1
データ構造 | マクロ定義 | 型定義 | 関数 | 変数
snipe.c ファイル

スナイパー技能の実装 / Sniping [詳解]

#include "angband.h"
#include "core.h"
#include "util.h"
#include "term.h"
#include "player-status.h"
#include "cmd-basic.h"
#include "snipe.h"
#include "monsterrace.h"
#include "view-mainwindow.h"
snipe.c の依存先関係図:

データ構造

struct  snipe_power
 スナイパー技能情報の構造体 [詳解]
 

マクロ定義

#define MAX_SNIPE_POWERS   16
 

型定義

typedef struct snipe_power snipe_power
 スナイパー技能情報のtypedef [詳解]
 

関数

static bool snipe_concentrate (player_type *creature_ptr)
 スナイパーの集中度加算 [詳解]
 
void reset_concentration (player_type *creature_ptr, bool msg)
 スナイパーの集中度リセット [詳解]
 
int boost_concentration_damage (player_type *creature_ptr, int tdam)
 スナイパーの集中度によるダメージボーナスを加算する [詳解]
 
void display_snipe_list (player_type *sniper_ptr)
 スナイパーの技能リストを表示する [詳解]
 
static int get_snipe_power (player_type *sniper_ptr, COMMAND_CODE *sn, bool only_browse)
 スナイパー技能を選択する [詳解]
 
MULTIPLY tot_dam_aux_snipe (player_type *sniper_ptr, MULTIPLY mult, monster_type *m_ptr, SPELL_IDX snipe_type)
 スナイバー技能のスレイ倍率計算を行う / Calcurate magnification of snipe technics [詳解]
 
static bool cast_sniper_spell (player_type *sniper_ptr, int spell)
 スナイパー技能の発動 / do_cmd_cast calls this function if the player's class is 'snipe'. [詳解]
 
void do_cmd_snipe (player_type *sniper_ptr)
 スナイパー技能コマンドのメインルーチン / [詳解]
 
void do_cmd_snipe_browse (player_type *sniper_ptr)
 スナイパー技能コマンドの表示 / [詳解]
 

変数

static concptr const snipe_tips [MAX_SNIPE_POWERS]
 スナイパー技能の解説メッセージ [詳解]
 
static snipe_power const snipe_powers [MAX_SNIPE_POWERS]
 スナイパー技能テーブル [詳解]
 

詳解

スナイパー技能の実装 / Sniping

日付
2014/01/18
著者
2014 Deskull rearranged comment for Doxygen.

マクロ定義詳解

◆ MAX_SNIPE_POWERS

#define MAX_SNIPE_POWERS   16

型定義詳解

◆ snipe_power

typedef struct snipe_power snipe_power

スナイパー技能情報のtypedef

関数詳解

◆ boost_concentration_damage()

int boost_concentration_damage ( player_type creature_ptr,
int  tdam 
)

スナイパーの集中度によるダメージボーナスを加算する

引数
tdam算出中のダメージ
戻り値
集中度修正を加えたダメージ

◆ cast_sniper_spell()

static bool cast_sniper_spell ( player_type sniper_ptr,
int  spell 
)
static

スナイパー技能の発動 / do_cmd_cast calls this function if the player's class is 'snipe'.

引数
spell発動する特殊技能のID
戻り値
処理を実行したらTRUE、キャンセルした場合FALSEを返す。
呼び出し関係図:
被呼び出し関係図:

◆ display_snipe_list()

void display_snipe_list ( player_type sniper_ptr)

スナイパーの技能リストを表示する

戻り値
なし
呼び出し関係図:

◆ do_cmd_snipe()

void do_cmd_snipe ( player_type sniper_ptr)

スナイパー技能コマンドのメインルーチン /

戻り値
なし
呼び出し関係図:

◆ do_cmd_snipe_browse()

void do_cmd_snipe_browse ( player_type sniper_ptr)

スナイパー技能コマンドの表示 /

戻り値
なし
呼び出し関係図:

◆ get_snipe_power()

static int get_snipe_power ( player_type sniper_ptr,
COMMAND_CODE sn,
bool  only_browse 
)
static

スナイパー技能を選択する

引数
sn選択した特殊技能ID、キャンセルの場合-1、不正な選択の場合-2を返す
only_browse一覧を見るだけの場合TRUEを返す
戻り値
発動可能な魔法を選択した場合TRUE、キャンセル処理か不正な選択が行われた場合FALSEを返す。 Allow user to choose a mindcrafter power.

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.
呼び出し関係図:
被呼び出し関係図:

◆ reset_concentration()

void reset_concentration ( player_type creature_ptr,
bool  msg 
)

スナイパーの集中度リセット

引数
msgTRUEならばメッセージを表示する
戻り値
なし
呼び出し関係図:

◆ snipe_concentrate()

static bool snipe_concentrate ( player_type creature_ptr)
static

スナイパーの集中度加算

戻り値
常にTRUEを返す
呼び出し関係図:
被呼び出し関係図:

◆ tot_dam_aux_snipe()

MULTIPLY tot_dam_aux_snipe ( player_type sniper_ptr,
MULTIPLY  mult,
monster_type m_ptr,
SPELL_IDX  snipe_type 
)

スナイバー技能のスレイ倍率計算を行う / Calcurate magnification of snipe technics

引数
multスナイバー技能のスレイ効果以前に算出している多要素の倍率(/10倍)
m_ptr目標となるモンスターの構造体参照ポインタ
戻り値
スレイの倍率(/10倍)

変数詳解

◆ snipe_powers

snipe_power const snipe_powers[MAX_SNIPE_POWERS]
static

スナイパー技能テーブル

◆ snipe_tips

concptr const snipe_tips[MAX_SNIPE_POWERS]
static

スナイパー技能の解説メッセージ