diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd3.cc | 125 | ||||
-rw-r--r-- | src/cmd3.hpp | 3 | ||||
-rw-r--r-- | src/defines.h | 2 | ||||
-rw-r--r-- | src/skills.cc | 3 |
4 files changed, 0 insertions, 133 deletions
diff --git a/src/cmd3.cc b/src/cmd3.cc index 6f2d67e9..06300982 100644 --- a/src/cmd3.cc +++ b/src/cmd3.cc @@ -1859,131 +1859,6 @@ bool_ do_cmd_sense_grid_mana() /* - * Calculate the weight of the portable holes - */ -s32b portable_hole_weight(void) -{ - s32b weight, i; - - store_type *st_ptr = &town_info[TOWN_RANDOM].store[STORE_HOME]; - - - /* Sum the objects in the appropriate home */ - for (i = 0, weight = 0; i < st_ptr->stock_num; i++) - { - object_type *o_ptr = &st_ptr->stock[i]; - - weight += (o_ptr->weight * o_ptr->number); - } - - /* Multiply the sum with 1.5 */ - weight = (weight * 3) / 2 + 2; - - return (weight); -} - - -/* - * Calculate and set the weight of the portable holes - */ -void set_portable_hole_weight(void) -{ - s32b weight, i, j; - - /* Calculate the weight of items in home */ - weight = portable_hole_weight(); - - /* Set the weight of portable holes in the shops, ... */ - for (i = 1; i < max_towns; i++) - { - for (j = 0; j < max_st_idx; j++) - { - store_type *st_ptr = &town_info[i].store[j]; - int k; - - for (k = 0; k < st_ptr->stock_num; k++) - { - object_type *o_ptr = &st_ptr->stock[k]; - - if ((o_ptr->tval == TV_TOOL) && - (o_ptr->sval == SV_PORTABLE_HOLE)) - o_ptr->weight = weight; - } - } - } - - /* ... in the object list, ... */ - for (i = 1; i < o_max; i++) - { - object_type *o_ptr = &o_list[i]; - - if ((o_ptr->tval == TV_TOOL) && - (o_ptr->sval == SV_PORTABLE_HOLE)) o_ptr->weight = weight; - } - - /* ... and in the p_ptr->inventory to the appropriate value */ - for (i = 0; i < INVEN_TOTAL; i++) - { - object_type *o_ptr = &p_ptr->inventory[i]; - - /* Skip non-objects */ - if ((o_ptr->tval == TV_TOOL) && - (o_ptr->sval == SV_PORTABLE_HOLE)) o_ptr->weight = weight; - } -} - - -/* - * Use a portable hole - */ -void do_cmd_portable_hole(void) -{ - cave_type *c_ptr = &cave[p_ptr->py][p_ptr->px]; - - int feat, special, town_num; - - /* Is it currently wielded? */ - if (!p_ptr->inventory[INVEN_TOOL].k_idx || - (p_ptr->inventory[INVEN_TOOL].tval != TV_TOOL) || - (p_ptr->inventory[INVEN_TOOL].sval != SV_PORTABLE_HOLE)) - { - /* No, it isn't */ - msg_print("You have to wield a portable hole to use your abilities"); - return; - } - - /* Mega-hack: Saving the old values, and then... */ - feat = c_ptr->feat; - special = c_ptr->special; - town_num = p_ptr->town_num; - - /* ... change the current grid to the home in town #1 */ - /* DG -- use the first random town, since random towns cannot have houses */ - /* - * pelpel -- This doesn't affect LoS, so we can manipulate - * terrain feature without calling cave_set_feat() - */ - c_ptr->feat = FEAT_SHOP; - c_ptr->special = STORE_HOME; - p_ptr->town_num = TOWN_RANDOM; - - /* Now use the portable hole */ - do_cmd_store(); - - /* Mega-hack part II: change the current grid to the original value */ - c_ptr->feat = feat; - c_ptr->special = special; - p_ptr->town_num = town_num; - - set_portable_hole_weight(); - - /* Recalculate bonuses */ - p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER); - p_ptr->update |= (PU_BONUS); -} - - -/* * Try to add a CLI action. */ void cli_add(cptr active, cptr trigger, cptr descr) diff --git a/src/cmd3.hpp b/src/cmd3.hpp index a496a42d..48677b77 100644 --- a/src/cmd3.hpp +++ b/src/cmd3.hpp @@ -22,6 +22,3 @@ extern void do_cmd_locate(void); extern void do_cmd_query_symbol(void); extern bool_ do_cmd_sense_grid_mana(void); extern bool_ research_mon(void); -extern s32b portable_hole_weight(void); -extern void set_portable_hole_weight(void); -extern void do_cmd_portable_hole(void); diff --git a/src/defines.h b/src/defines.h index 72acb003..7021609f 100644 --- a/src/defines.h +++ b/src/defines.h @@ -441,7 +441,6 @@ #define MKEY_RUNE 9 #define MKEY_FORGING 10 #define MKEY_INCARNATION 11 -#define MKEY_TELEKINESIS 12 #define MKEY_SUMMON 13 #define MKEY_TRAP 14 #define MKEY_STEAL 15 @@ -1257,7 +1256,6 @@ /* The "sval" codes for TV_TOOL */ #define SV_TOOL_CLIMB 0 -#define SV_PORTABLE_HOLE 1 /* The "sval" codes for TV_MSTAFF */ #define SV_MSTAFF 1 diff --git a/src/skills.cc b/src/skills.cc index a5808b37..330aa9ba 100644 --- a/src/skills.cc +++ b/src/skills.cc @@ -1028,9 +1028,6 @@ void do_cmd_activate_skill() case MKEY_INCARNATION: do_cmd_possessor(); break; - case MKEY_TELEKINESIS: - do_cmd_portable_hole(); - break; case MKEY_SUMMON: do_cmd_summoner(); break; |