魔法効果の実装/ Spell code (part 3) [詳細]
#include "angband.h"
マクロ定義 | |
#define | MAX_TRIES 100 |
テレポート先探索の試行数 / Maximum number of tries for teleporting [詳細] | |
#define | HURT_CHANCE 16 |
能力値現象の基本確率(1 / HURT_CHANCE) / 1/x chance of reducing stats (for elemental attacks) [詳細] | |
#define | MAX_TELEPORT_DISTANCE 200 |
テレポート最大距離 [詳細] | |
#define | MANA_CONST 2400 |
#define | MANA_DIV 4 |
#define | DEC_MANA_DIV 3 |
関数 | |
static bool | cave_monster_teleportable_bold (int m_idx, int y, int x, u32b mode) |
指定されたマスがモンスターのテレポート可能先かどうかを判定する。 [詳細] | |
bool | teleport_away (int m_idx, int dis, u32b mode) |
モンスターのテレポートアウェイ処理 / Teleport a monster, normally up to "dis" grids away. [詳細] | |
void | teleport_monster_to (int m_idx, int ty, int tx, int power, u32b mode) |
モンスターを指定された座標付近にテレポートする / Teleport monster next to a grid near the given location [詳細] | |
bool | cave_player_teleportable_bold (int y, int x, u32b mode) |
指定されたマスにプレイヤーがテレポート可能かどうかを判定する。 [詳細] | |
bool | teleport_player_aux (int dis, u32b mode) |
プレイヤーのテレポート先選定と移動処理 / Teleport the player to a location up to "dis" grids away. [詳細] | |
void | teleport_player (int dis, u32b mode) |
プレイヤーのテレポート処理メインルーチン [詳細] | |
void | teleport_player_away (int m_idx, int dis) |
プレイヤーのテレポートアウェイ処理 / [詳細] | |
void | teleport_player_to (int ny, int nx, u32b mode) |
プレイヤーを指定位置近辺にテレポートさせる Teleport player to a grid near the given location [詳細] | |
void | teleport_away_followable (int m_idx) |
void | teleport_level (int m_idx) |
プレイヤー及びモンスターをレベルテレポートさせる / Teleport the player one level up or down (random when legal) [詳細] | |
int | choose_dungeon (cptr note, int y, int x) |
これまでに入ったダンジョンの一覧を表示する [詳細] | |
bool | recall_player (int turns) |
プレイヤーの帰還発動及び中止処理 / Recall the player to town or dungeon [詳細] | |
bool | word_of_recall (void) |
帰還用メインルーチン [詳細] | |
bool | reset_recall (void) |
フロア・リセット処理 [詳細] | |
bool | apply_disenchant (int mode) |
プレイヤーの装備劣化処理 / Apply disenchantment to the player's stuff [詳細] | |
void | mutate_player (void) |
プレイヤーの突然変異処理 [詳細] | |
void | apply_nexus (monster_type *m_ptr) |
プレイヤーの因果混乱処理 / Apply Nexus [詳細] | |
void | phlogiston (void) |
寿命つき光源の燃素追加処理 / Charge a lite (torch or latern) [詳細] | |
void | brand_weapon (int brand_type) |
武器へのエゴ付加処理 / Brand the current weapon [詳細] | |
static bool | vanish_dungeon (void) |
虚無招来によるフロア中の全壁除去処理 / Vanish all walls in this floor [詳細] | |
void | call_the_ (void) |
虚無招来処理 / [詳細] | |
void | fetch (int dir, int wgt, bool require_los) |
アイテム引き寄せ処理 / Fetch an item (teleport it right underneath the caster) [詳細] | |
void | alter_reality (void) |
現実変容処理 [詳細] | |
bool | warding_glyph (void) |
守りのルーン設置処理 / Leave a "glyph of warding" which prevents monster movement [詳細] | |
bool | place_mirror (void) |
鏡設置処理 [詳細] | |
bool | explosive_rune (void) |
爆発のルーン設置処理 / Leave an "explosive rune" which prevents monster movement [詳細] | |
void | identify_pack (void) |
全所持アイテム鑑定処理 / Identify everything being carried. [詳細] | |
static int | remove_curse_aux (int all) |
装備の解呪処理 / Removes curses from items in inventory [詳細] | |
bool | remove_curse (void) |
装備の軽い呪い解呪処理 / Remove most curses [詳細] | |
bool | remove_all_curse (void) |
装備の重い呪い解呪処理 / Remove all curses [詳細] | |
bool | alchemy (void) |
アイテムの価値に応じた錬金術処理 / Turns an object into gold, gain some of its value in a shop [詳細] | |
static void | break_curse (object_type *o_ptr) |
呪いの打ち破り処理 / Break the curse of an item [詳細] | |
bool | enchant (object_type *o_ptr, int n, int eflag) |
装備修正強化処理 / Enchants a plus onto an item. [詳細] | |
bool | enchant_spell (int num_hit, int num_dam, int num_ac) |
装備修正強化処理のメインルーチン / Enchant an item (in the inventory or on the floor) [詳細] | |
static bool | item_tester_hook_nameless_weapon_armour (object_type *o_ptr) |
アイテムが並の価値のアイテムかどうか判定する / Check if an object is nameless weapon or armour [詳細] | |
bool | artifact_scroll (void) |
アーティファクト生成の巻物処理 / [詳細] | |
bool | identify_item (object_type *o_ptr) |
アイテム鑑定処理 / Identify an object [詳細] | |
static bool | item_tester_hook_identify (object_type *o_ptr) |
アイテムが鑑定済みかを判定する / [詳細] | |
static bool | item_tester_hook_identify_weapon_armour (object_type *o_ptr) |
アイテムが鑑定済みの武器防具かを判定する / [詳細] | |
bool | ident_spell (bool only_equip) |
アイテム鑑定のメインルーチン処理 / Identify an object in the inventory (or on the floor) [詳細] | |
bool | mundane_spell (bool only_equip) |
アイテム凡庸化のメインルーチン処理 / Identify an object in the inventory (or on the floor) [詳細] | |
static bool | item_tester_hook_identify_fully (object_type *o_ptr) |
アイテムが*鑑定*済みかを判定する / [詳細] | |
static bool | item_tester_hook_identify_fully_weapon_armour (object_type *o_ptr) |
アイテムが*鑑定*済みの武器防具かを判定する / [詳細] | |
bool | identify_fully (bool only_equip) |
アイテム*鑑定*のメインルーチン処理 / Identify an object in the inventory (or on the floor) [詳細] | |
bool | item_tester_hook_recharge (object_type *o_ptr) |
魔力充填が可能なアイテムかどうか判定する / Hook for "get_item()". [詳細] | |
bool | recharge (int power) |
魔力充填処理 / Recharge a wand/staff/rod from the pack or on the floor. [詳細] | |
bool | bless_weapon (void) |
武器の祝福処理 / Bless a weapon [詳細] | |
bool | pulish_shield (void) |
盾磨き処理 / pulish shield [詳細] | |
bool | potion_smash_effect (int who, int y, int x, int k_idx) |
薬の破損効果処理 / Potions "smash open" and cause an area effect when [詳細] | |
void | display_spell_list (void) |
プレイヤーの全既知呪文を表示する / Hack – Display all known spells in a window return なし [詳細] | |
s16b | experience_of_spell (int spell, int use_realm) |
呪文の経験値を返す / Returns experience of a spell [詳細] | |
int | mod_need_mana (int need_mana, int spell, int realm) |
呪文の消費MPを返す / Modify mana consumption rate using spell exp and p_ptr->dec_mana [詳細] | |
int | mod_spell_chance_1 (int chance) |
呪文の失敗率修正処理1(呪い、消費魔力減少、呪文簡易化) / Modify spell fail rate Using p_ptr->to_m_chance, p_ptr->dec_mana, p_ptr->easy_spell and p_ptr->heavy_spell [詳細] | |
int | mod_spell_chance_2 (int chance) |
呪文の失敗率修正処理2(消費魔力減少、呪い、負値修正) / Modify spell fail rate Using p_ptr->to_m_chance, p_ptr->dec_mana, p_ptr->easy_spell and p_ptr->heavy_spell [詳細] | |
s16b | spell_chance (int spell, int use_realm) |
呪文の失敗率計算メインルーチン / Returns spell chance of failure for spell -RAK- [詳細] | |
bool | spell_okay (int spell, bool learned, bool study_pray, int use_realm) |
魔法が利用可能かどうかを返す / Determine if a spell is "okay" for the player to cast or study The spell must be legible, not forgotten, and also, to cast, it must be known, and to study, it must not be known. [詳細] | |
void | print_spells (int target_spell, byte *spells, int num, int y, int x, int use_realm) |
呪文情報の表示処理 / Print a list of spells (for browsing or casting or viewing) [詳細] | |
bool | hates_acid (object_type *o_ptr) |
アイテムが酸で破損するかどうかを判定する [詳細] | |
bool | hates_elec (object_type *o_ptr) |
アイテムが電撃で破損するかどうかを判定する / Does a given object (usually) hate electricity? [詳細] | |
bool | hates_fire (object_type *o_ptr) |
アイテムが火炎で破損するかどうかを判定する / Does a given object (usually) hate fire? [詳細] | |
bool | hates_cold (object_type *o_ptr) |
アイテムが冷気で破損するかどうかを判定する / Does a given object (usually) hate cold? [詳細] | |
int | set_acid_destroy (object_type *o_ptr) |
アイテムが酸で破損するかどうかを判定する(メインルーチン) / Melt something [詳細] | |
int | set_elec_destroy (object_type *o_ptr) |
アイテムが電撃で破損するかどうかを判定する(メインルーチン) / Electrical damage [詳細] | |
int | set_fire_destroy (object_type *o_ptr) |
アイテムが火炎で破損するかどうかを判定する(メインルーチン) / Burn something [詳細] | |
int | set_cold_destroy (object_type *o_ptr) |
アイテムが冷気で破損するかどうかを判定する(メインルーチン) / Freeze things [詳細] | |
int | inven_damage (inven_func typ, int perc) |
アイテムが指定確率で破損するかどうかを判定する / Destroys a type of item on a given percent chance [詳細] | |
static int | minus_ac (void) |
酸攻撃による装備のAC劣化処理 / Acid has hit the player, attempt to affect some armor. [詳細] | |
int | acid_dam (int dam, cptr kb_str, int monspell, bool aura) |
酸属性によるプレイヤー損害処理 / Hurt the player with Acid [詳細] | |
int | elec_dam (int dam, cptr kb_str, int monspell, bool aura) |
電撃属性によるプレイヤー損害処理 / Hurt the player with electricity [詳細] | |
int | fire_dam (int dam, cptr kb_str, int monspell, bool aura) |
火炎属性によるプレイヤー損害処理 / Hurt the player with Fire [詳細] | |
int | cold_dam (int dam, cptr kb_str, int monspell, bool aura) |
冷気属性によるプレイヤー損害処理 / Hurt the player with Cold [詳細] | |
bool | rustproof (void) |
防具の錆止め防止処理 [詳細] | |
bool | curse_armor (void) |
防具呪縛処理 / Curse the players armor [詳細] | |
bool | curse_weapon_object (bool force, object_type *o_ptr) |
武器呪縛処理 / Curse the players weapon [詳細] | |
bool | curse_weapon (bool force, int slot) |
武器呪縛処理のメインルーチン / Curse the players weapon [詳細] | |
bool | brand_bolts (void) |
ボルトのエゴ化処理(火炎エゴのみ) / Enchant some bolts [詳細] | |
static s16b | poly_r_idx (int r_idx) |
変身処理向けにモンスターの近隣レベル帯モンスターを返す / Helper function – return a "nearby" race for polymorphing [詳細] | |
bool | polymorph_monster (int y, int x) |
指定座標にいるモンスターを変身させる / Helper function – return a "nearby" race for polymorphing [詳細] | |
static bool | dimension_door_aux (int x, int y) |
次元の扉処理 / Dimension Door [詳細] | |
bool | dimension_door (void) |
次元の扉処理のメインルーチン / Dimension Door [詳細] | |
bool | mirror_tunnel (void) |
鏡抜け処理のメインルーチン / Mirror Master's Dimension Door [詳細] | |
bool | eat_magic (int power) |
魔力食い処理 [詳細] | |
bool | summon_kin_player (int level, int y, int x, u32b mode) |
同族召喚(援軍)処理 [詳細] | |
void | massacre (int py, int px) |
皆殺し(全方向攻撃)処理 [詳細] | |
変数 | |
static int | enchant_table [16] |
装備強化処理の失敗率定数(千分率) / Used by the "enchant" function (chance of failure) (modified for Zangband, we need better stuff there...) – TY [詳細] | |
魔法効果の実装/ Spell code (part 3)
#define DEC_MANA_DIV 3 |
#define HURT_CHANCE 16 |
能力値現象の基本確率(1 / HURT_CHANCE) / 1/x chance of reducing stats (for elemental attacks)
#define MANA_CONST 2400 |
#define MANA_DIV 4 |
#define MAX_TELEPORT_DISTANCE 200 |
テレポート最大距離
#define MAX_TRIES 100 |
テレポート先探索の試行数 / Maximum number of tries for teleporting
酸属性によるプレイヤー損害処理 / Hurt the player with Acid
dam | 基本ダメージ量 |
kb_str | ダメージ原因記述 |
monspell | 原因となったモンスター特殊攻撃ID |
aura | オーラよるダメージが原因ならばTRUE |
bool alchemy | ( | void | ) |
アイテムの価値に応じた錬金術処理 / Turns an object into gold, gain some of its value in a shop
void alter_reality | ( | void | ) |
現実変容処理
bool apply_disenchant | ( | int | mode | ) |
プレイヤーの装備劣化処理 / Apply disenchantment to the player's stuff
mode | 最下位ビットが1ならば劣化処理が若干低減される |
void apply_nexus | ( | monster_type * | m_ptr | ) |
プレイヤーの因果混乱処理 / Apply Nexus
m_ptr | 因果混乱をプレイヤーに与えたモンスターの情報参照ポインタ |
bool artifact_scroll | ( | void | ) |
アーティファクト生成の巻物処理 /
bool bless_weapon | ( | void | ) |
武器の祝福処理 / Bless a weapon
bool brand_bolts | ( | void | ) |
ボルトのエゴ化処理(火炎エゴのみ) / Enchant some bolts
void brand_weapon | ( | int | brand_type | ) |
武器へのエゴ付加処理 / Brand the current weapon
brand_type | エゴ化ID(e_info.txtとは連動していない) |
|
static |
呪いの打ち破り処理 / Break the curse of an item
o_ptr | 呪い装備情報の参照ポインタ |
void call_the_ | ( | void | ) |
虚無招来処理 /
指定されたマスがモンスターのテレポート可能先かどうかを判定する。
m_idx | モンスターID |
y | 移動先Y座標 |
x | 移動先X座標 |
mode | オプション |
指定されたマスにプレイヤーがテレポート可能かどうかを判定する。
y | 移動先Y座標 |
x | 移動先X座標 |
mode | オプション |
int choose_dungeon | ( | cptr | note, |
int | y, | ||
int | x | ||
) |
これまでに入ったダンジョンの一覧を表示する
note | ダンジョンに施す処理記述 |
y | コンソールY座標 |
x | コンソールX座標 |
冷気属性によるプレイヤー損害処理 / Hurt the player with Cold
dam | 基本ダメージ量 |
kb_str | ダメージ原因記述 |
monspell | 原因となったモンスター特殊攻撃ID |
aura | オーラよるダメージが原因ならばTRUE |
bool curse_armor | ( | void | ) |
防具呪縛処理 / Curse the players armor
武器呪縛処理のメインルーチン / Curse the players weapon
force | 無条件に呪縛を行うならばTRUE |
slot | 呪縛する武器の装備スロット |
bool curse_weapon_object | ( | bool | force, |
object_type * | o_ptr | ||
) |
武器呪縛処理 / Curse the players weapon
force | 無条件に呪縛を行うならばTRUE |
o_ptr | 呪縛する武器のアイテム情報参照ポインタ |
bool dimension_door | ( | void | ) |
次元の扉処理のメインルーチン / Dimension Door
|
static |
次元の扉処理 / Dimension Door
x | テレポート先のX座標 |
y | テレポート先のY座標 |
void display_spell_list | ( | void | ) |
プレイヤーの全既知呪文を表示する / Hack – Display all known spells in a window return なし
XXX XXX XXX Need to analyze size of the window. XXX XXX XXX Need more color coding.
bool eat_magic | ( | int | power | ) |
魔力食い処理
power | 基本効力 |
電撃属性によるプレイヤー損害処理 / Hurt the player with electricity
dam | 基本ダメージ量 |
kb_str | ダメージ原因記述 |
monspell | 原因となったモンスター特殊攻撃ID |
aura | オーラよるダメージが原因ならばTRUE |
bool enchant | ( | object_type * | o_ptr, |
int | n, | ||
int | eflag | ||
) |
装備修正強化処理 / Enchants a plus onto an item.
-RAK-
o_ptr | 強化するアイテムの参照ポインタ |
n | 強化基本量 |
eflag | 強化オプション(命中/ダメージ/AC) |
Revamped! Now takes item pointer, number of times to try enchanting, and a flag of what to try enchanting. Artifacts resist enchantment some of the time, and successful enchantment to at least +0 might break a curse on the item. -CFT-
Note that an item can technically be enchanted all the way to +15 if you wait a very, very, long time. Going from +9 to +10 only works about 5% of the time, and from +10 to +11 only about 1% of the time.
Note that this function can now be used on "piles" of items, and the larger the pile, the lower the chance of success.
bool enchant_spell | ( | int | num_hit, |
int | num_dam, | ||
int | num_ac | ||
) |
装備修正強化処理のメインルーチン / Enchant an item (in the inventory or on the floor)
num_hit | 命中修正量 |
num_dam | ダメージ修正量 |
num_ac | AC修正量 |
Note that "num_ac" requires armour, else weapon Returns TRUE if attempted, FALSE if cancelled
s16b experience_of_spell | ( | int | spell, |
int | use_realm | ||
) |
呪文の経験値を返す / Returns experience of a spell
spell | 呪文ID |
use_realm | 魔法領域 |
bool explosive_rune | ( | void | ) |
爆発のルーン設置処理 / Leave an "explosive rune" which prevents monster movement
void fetch | ( | int | dir, |
int | wgt, | ||
bool | require_los | ||
) |
アイテム引き寄せ処理 / Fetch an item (teleport it right underneath the caster)
dir | 魔法の発動方向 |
wgt | 許容重量 |
require_los | 射線の通りを要求するならばTRUE |
火炎属性によるプレイヤー損害処理 / Hurt the player with Fire
dam | 基本ダメージ量 |
kb_str | ダメージ原因記述 |
monspell | 原因となったモンスター特殊攻撃ID |
aura | オーラよるダメージが原因ならばTRUE |
bool hates_acid | ( | object_type * | o_ptr | ) |
アイテムが酸で破損するかどうかを判定する
o_ptr | アイテムの情報参照ポインタ |
bool hates_cold | ( | object_type * | o_ptr | ) |
アイテムが冷気で破損するかどうかを判定する / Does a given object (usually) hate cold?
o_ptr | アイテムの情報参照ポインタ |
bool hates_elec | ( | object_type * | o_ptr | ) |
アイテムが電撃で破損するかどうかを判定する / Does a given object (usually) hate electricity?
o_ptr | アイテムの情報参照ポインタ |
bool hates_fire | ( | object_type * | o_ptr | ) |
アイテムが火炎で破損するかどうかを判定する / Does a given object (usually) hate fire?
o_ptr | アイテムの情報参照ポインタ |
Hafted/Polearm weapons have wooden shafts. Arrows/Bows are mostly wooden.
アイテム鑑定のメインルーチン処理 / Identify an object in the inventory (or on the floor)
only_equip | 装備品のみを対象とするならばTRUEを返す |
This routine does not automatically combine objects. Returns TRUE if something was identified, else FALSE.
アイテム*鑑定*のメインルーチン処理 / Identify an object in the inventory (or on the floor)
only_equip | 装備品のみを対象とするならばTRUEを返す |
Fully "identify" an object in the inventory -BEN- This routine returns TRUE if an item was identified.
bool identify_item | ( | object_type * | o_ptr | ) |
アイテム鑑定処理 / Identify an object
o_ptr | 鑑定されるアイテムの情報参照ポインタ |
void identify_pack | ( | void | ) |
全所持アイテム鑑定処理 / Identify everything being carried.
Done by a potion of "self knowledge".
int inven_damage | ( | inven_func | typ, |
int | perc | ||
) |
アイテムが指定確率で破損するかどうかを判定する / Destroys a type of item on a given percent chance
typ | 破損判定関数ポインタ |
perc | 基本確率 |
Note that missiles are no longer necessarily all destroyed Destruction taken from "melee.c" code for "stealing". New-style wands and rods handled correctly. -LM- Returns number of items destroyed.
|
static |
アイテムが鑑定済みかを判定する /
o_ptr | 判定するアイテムの情報参照ポインタ |
|
static |
アイテムが*鑑定*済みかを判定する /
o_ptr | 判定するアイテムの情報参照ポインタ |
|
static |
アイテムが*鑑定*済みの武器防具かを判定する /
o_ptr | 判定するアイテムの情報参照ポインタ |
|
static |
アイテムが鑑定済みの武器防具かを判定する /
o_ptr | 判定するアイテムの情報参照ポインタ |
|
static |
アイテムが並の価値のアイテムかどうか判定する / Check if an object is nameless weapon or armour
o_ptr | 判定するアイテムの情報参照ポインタ |
bool item_tester_hook_recharge | ( | object_type * | o_ptr | ) |
魔力充填が可能なアイテムかどうか判定する / Hook for "get_item()".
Determine if something is rechargable.
o_ptr | 判定するアイテムの情報参照ポインタ |
void massacre | ( | int | py, |
int | px | ||
) |
皆殺し(全方向攻撃)処理
py | プレイヤーY座標 |
px | プレイヤーX座標 |
|
static |
酸攻撃による装備のAC劣化処理 / Acid has hit the player, attempt to affect some armor.
Note that the "base armor" of an object never changes. If any armor is damaged (or resists), the player takes less damage.
bool mirror_tunnel | ( | void | ) |
鏡抜け処理のメインルーチン / Mirror Master's Dimension Door
int mod_need_mana | ( | int | need_mana, |
int | spell, | ||
int | realm | ||
) |
呪文の消費MPを返す / Modify mana consumption rate using spell exp and p_ptr->dec_mana
need_mana | 基本消費MP |
spell | 呪文ID |
realm | 魔法領域 |
int mod_spell_chance_1 | ( | int | chance | ) |
呪文の失敗率修正処理1(呪い、消費魔力減少、呪文簡易化) / Modify spell fail rate Using p_ptr->to_m_chance, p_ptr->dec_mana, p_ptr->easy_spell and p_ptr->heavy_spell
chance | 修正前失敗率 |
int mod_spell_chance_2 | ( | int | chance | ) |
呪文の失敗率修正処理2(消費魔力減少、呪い、負値修正) / Modify spell fail rate Using p_ptr->to_m_chance, p_ptr->dec_mana, p_ptr->easy_spell and p_ptr->heavy_spell
chance | 修正前失敗率 |
アイテム凡庸化のメインルーチン処理 / Identify an object in the inventory (or on the floor)
only_equip | 装備品のみを対象とするならばTRUEを返す |
Mundanify an object in the inventory (or on the floor) This routine does not automatically combine objects. Returns TRUE if something was mundanified, else FALSE.
void mutate_player | ( | void | ) |
プレイヤーの突然変異処理
void phlogiston | ( | void | ) |
寿命つき光源の燃素追加処理 / Charge a lite (torch or latern)
bool place_mirror | ( | void | ) |
鏡設置処理
|
static |
変身処理向けにモンスターの近隣レベル帯モンスターを返す / Helper function – return a "nearby" race for polymorphing
r_idx | 基準となるモンスター種族ID |
Note that this function is one of the more "dangerous" ones...
bool polymorph_monster | ( | int | y, |
int | x | ||
) |
指定座標にいるモンスターを変身させる / Helper function – return a "nearby" race for polymorphing
y | 指定のY座標 |
x | 指定のX座標 |
bool potion_smash_effect | ( | int | who, |
int | y, | ||
int | x, | ||
int | k_idx | ||
) |
薬の破損効果処理 / Potions "smash open" and cause an area effect when
who | 薬破損の主体ID(プレイヤー所持アイテムが壊れた場合0、床上のアイテムの場合モンスターID) |
y | 破壊時のY座標 |
x | 破壊時のX座標 |
k_idx | 破損した薬のアイテムID |
(1) they are shattered while in the player's inventory, due to cold (etc) attacks; (2) they are thrown at a monster, or obstacle; (3) they are shattered by a "cold ball" or other such spell while lying on the floor.
Arguments: who — who caused the potion to shatter (0=player) potions that smash on the floor are assumed to be caused by no-one (who = 1), as are those that shatter inside the player inventory. (Not anymore – I changed this; TY) y, x — coordinates of the potion (or player if the potion was in her inventory); o_ptr — pointer to the potion object.
void print_spells | ( | int | target_spell, |
byte * | spells, | ||
int | num, | ||
int | y, | ||
int | x, | ||
int | use_realm | ||
) |
呪文情報の表示処理 / Print a list of spells (for browsing or casting or viewing)
target_spell | 呪文ID |
spells | アクセス開始するスペルの参照ポイント |
num | 表示する |
y | 表示メッセージ左上Y座標 |
x | 表示メッセージ左上X座標 |
use_realm | 魔法領域ID |
bool pulish_shield | ( | void | ) |
盾磨き処理 / pulish shield
bool recall_player | ( | int | turns | ) |
プレイヤーの帰還発動及び中止処理 / Recall the player to town or dungeon
turns | 発動までのターン数 |
bool recharge | ( | int | power | ) |
魔力充填処理 / Recharge a wand/staff/rod from the pack or on the floor.
This function has been rewritten in Oangband and ZAngband.
power | 充填パワー |
Sorcery/Arcane – Recharge –> recharge(plev * 4) Chaos – Arcane Binding –> recharge(90)
Scroll of recharging –> recharge(130) Artifact activation/Thingol –> recharge(130)
It is harder to recharge high level, and highly charged wands, staffs, and rods. The more wands in a stack, the more easily and strongly they recharge. Staffs, however, each get fewer charges if stacked.
XXX XXX XXX Beware of "sliding index errors".
bool remove_all_curse | ( | void | ) |
装備の重い呪い解呪処理 / Remove all curses
bool remove_curse | ( | void | ) |
装備の軽い呪い解呪処理 / Remove most curses
|
static |
装備の解呪処理 / Removes curses from items in inventory
all | 軽い呪いまでの解除ならば0 |
Note that Items which are "Perma-Cursed" (The One Ring, The Crown of Morgoth) can NEVER be uncursed.
Note that if "all" is FALSE, then Items which are "Heavy-Cursed" (Mormegil, Calris, and Weapons of Morgul) will not be uncursed.
bool reset_recall | ( | void | ) |
フロア・リセット処理
bool rustproof | ( | void | ) |
防具の錆止め防止処理
int set_acid_destroy | ( | object_type * | o_ptr | ) |
アイテムが酸で破損するかどうかを判定する(メインルーチン) / Melt something
o_ptr | アイテムの情報参照ポインタ |
int set_cold_destroy | ( | object_type * | o_ptr | ) |
アイテムが冷気で破損するかどうかを判定する(メインルーチン) / Freeze things
o_ptr | アイテムの情報参照ポインタ |
int set_elec_destroy | ( | object_type * | o_ptr | ) |
アイテムが電撃で破損するかどうかを判定する(メインルーチン) / Electrical damage
o_ptr | アイテムの情報参照ポインタ |
int set_fire_destroy | ( | object_type * | o_ptr | ) |
アイテムが火炎で破損するかどうかを判定する(メインルーチン) / Burn something
o_ptr | アイテムの情報参照ポインタ |
s16b spell_chance | ( | int | spell, |
int | use_realm | ||
) |
呪文の失敗率計算メインルーチン / Returns spell chance of failure for spell -RAK-
spell | 呪文ID |
use_realm | 魔法領域ID |
魔法が利用可能かどうかを返す / Determine if a spell is "okay" for the player to cast or study The spell must be legible, not forgotten, and also, to cast, it must be known, and to study, it must not be known.
spell | 呪文ID |
learned | 使用可能な判定ならばTRUE、学習可能かどうかの判定ならばFALSE |
study_pray | 祈りの学習判定目的ならばTRUE |
use_realm | 魔法領域ID |
同族召喚(援軍)処理
level | 召喚基準レベル |
y | 召喚先Y座標 |
x | 召喚先X座標 |
mode | 召喚オプション |
モンスターのテレポートアウェイ処理 / Teleport a monster, normally up to "dis" grids away.
m_idx | モンスターID |
dis | テレポート距離 |
mode | オプション |
Attempt to move the monster at least "dis/2" grids away. But allow variation to prevent infinite loops.
void teleport_away_followable | ( | int | m_idx | ) |
void teleport_level | ( | int | m_idx | ) |
プレイヤー及びモンスターをレベルテレポートさせる / Teleport the player one level up or down (random when legal)
m_idx | テレポートの対象となるモンスターID(0ならばプレイヤー) / If m_idx <= 0, target is player. |
void teleport_monster_to | ( | int | m_idx, |
int | ty, | ||
int | tx, | ||
int | power, | ||
u32b | mode | ||
) |
モンスターを指定された座標付近にテレポートする / Teleport monster next to a grid near the given location
m_idx | モンスターID |
ty | 目安Y座標 |
tx | 目安X座標 |
power | テレポート成功確率 |
mode | オプション |
void teleport_player | ( | int | dis, |
u32b | mode | ||
) |
プレイヤーのテレポート処理メインルーチン
dis | 基本移動距離 |
mode | オプション |
プレイヤーのテレポート先選定と移動処理 / Teleport the player to a location up to "dis" grids away.
dis | 基本移動距離 |
mode | オプション |
If no such spaces are readily available, the distance may increase. Try very hard to move the player at least a quarter that distance.
There was a nasty tendency for a long time; which was causing the player to "bounce" between two or three different spots because these are the only spots that are "far enough" way to satisfy the algorithm.
But this tendency is now removed; in the new algorithm, a list of candidates is selected first, which includes at least 50% of all floor grids within the distance, and any single grid in this list of candidates has equal possibility to be choosen as a destination.
void teleport_player_away | ( | int | m_idx, |
int | dis | ||
) |
プレイヤーのテレポートアウェイ処理 /
m_idx | アウェイを試みたプレイヤーID |
dis | テレポート距離 |
void teleport_player_to | ( | int | ny, |
int | nx, | ||
u32b | mode | ||
) |
プレイヤーを指定位置近辺にテレポートさせる Teleport player to a grid near the given location
ny | 目標Y座標 |
nx | 目標X座標 |
mode | オプションフラグ |
This function is slightly obsessive about correctness. This function allows teleporting into vaults (!)
|
static |
虚無招来によるフロア中の全壁除去処理 / Vanish all walls in this floor
bool warding_glyph | ( | void | ) |
守りのルーン設置処理 / Leave a "glyph of warding" which prevents monster movement
bool word_of_recall | ( | void | ) |
帰還用メインルーチン
|
static |
装備強化処理の失敗率定数(千分率) / Used by the "enchant" function (chance of failure) (modified for Zangband, we need better stuff there...) – TY