summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/edit/ba_info.txt12
-rw-r--r--lib/edit/ow_info.txt2
-rw-r--r--lib/edit/st_info.txt6
-rw-r--r--lib/edit/t_bree.txt5
-rw-r--r--lib/edit/t_gondol.txt5
-rw-r--r--lib/edit/t_minas.txt5
-rw-r--r--lib/help/c_merch.txt29
-rw-r--r--lib/mods/theme/edit/ba_info.txt12
-rw-r--r--lib/mods/theme/edit/ow_info.txt5
-rw-r--r--lib/mods/theme/edit/st_info.txt6
-rw-r--r--lib/mods/theme/edit/t_gondol.txt5
-rw-r--r--lib/mods/theme/help/c_merch.txt29
-rw-r--r--src/birth.cc2
-rw-r--r--src/bldg.cc97
-rw-r--r--src/defines.h4
-rw-r--r--src/dungeon.cc86
-rw-r--r--src/externs.h1
-rw-r--r--src/loadsave.cc5
-rw-r--r--src/powers.cc193
-rw-r--r--src/store.cc62
-rw-r--r--src/tables.cc10
-rw-r--r--src/types.h2
22 files changed, 14 insertions, 569 deletions
diff --git a/lib/edit/ba_info.txt b/lib/edit/ba_info.txt
index 8156fd2f..6612185b 100644
--- a/lib/edit/ba_info.txt
+++ b/lib/edit/ba_info.txt
@@ -257,18 +257,6 @@ N:55:Get an item
C:0:0:0
I:44:0:g:p
-N:56:Request an item
-C:0:0:0
-I:51:2:r
-
-N:57:Ask for loan
-C:0:0:0
-I:52:2:a
-
-N:58:Pay back loan
-C:0:0:0
-I:53:2:p
-
N:59:Donate an item
C:0:0:0
I:43:0:d
diff --git a/lib/edit/ow_info.txt b/lib/edit/ow_info.txt
index 4bd7c41a..333113ce 100644
--- a/lib/edit/ow_info.txt
+++ b/lib/edit/ow_info.txt
@@ -437,8 +437,6 @@ H:Orc | Troll | Half-Ogre | Beorning | Kobold |
N:68:Kanris(Human)
I:5000:140
C:120:100:80
-#L:Merchant
-#H:Rogue
N:69:Barliman Butterbur(Human)
I:100:120
diff --git a/lib/edit/st_info.txt b/lib/edit/st_info.txt
index 3762d0c5..45b1f0e2 100644
--- a/lib/edit/st_info.txt
+++ b/lib/edit/st_info.txt
@@ -692,12 +692,6 @@ F:RANDOM | MEDIUM_LEVEL | DEPEND_LEVEL
F:RARE
W:24
-N:56:Merchants Guild
-A:0:0:56:57:58:0
-O:68:68:68:68
-G:+:g
-W:0
-
N:57:The Mathom-house
A:0:0:59:0:3:0
O:0:0:0:0
diff --git a/lib/edit/t_bree.txt b/lib/edit/t_bree.txt
index c74fd58a..3ea29922 100644
--- a/lib/edit/t_bree.txt
+++ b/lib/edit/t_bree.txt
@@ -44,9 +44,6 @@ F:a:74:3:0:0:0:0:0:58
# Soothsayer
F:c:74:3:0:0:0:0:0:12
-# Merchant Guild
-F:d:74:3:0:0:0:0:0:56
-
# The Mathom-house
F:e:74:3:0:0:0:0:0:57
@@ -93,7 +90,7 @@ D:# ---- ---- ,,CT--.B#.-SStSS-
D:# ------- ---- ,,CTT-....-sssss--,,,,,,-------------OO-,--SSSSSt-ss-,-,---...-T^^ ^ ^ -, OOOO #
D:# ------- ------ ,,CCTT---..#2###-,sssss,-SSSSSSSS-----OO,--ssssss-tS--,.....---^^ ^^ ^^^ -, OOOOOOOO #
D:# ----- ----- ,,CCT----..,,,,,-StSSS,-ssssssss------OOO-#1##a#-ss....-----T^^ ^^ -,- OOOOO #
-D:# ---- -------- ,,CCTT----..----,sssss,-##7###d#--------OO,.,,.,-##.----TTTT^^ ^ ^^ -, OOOOO #
+D:# ---- -------- ,,CCTT----..----,sssss,-##7#####--------OO,.,,.,-##.----TTTT^^ ^ ^^ -, OOOOO #
D:# --------------- ,,,CCTTTT--..---,##3##-,--,,,---------...OOOOOOOOOOOTTTTTCC^^^ ^^ ^^ ,- OOO #
D:# -------- ,,,CCCC --..........,-,,---,--.......-------TTTTTOCCCCC,,^^^^^^^^^^^ -.- OOOOO #
D:# ---------- ,, ,,CCCTT----------.....-......-------TTTTTTTCCCCO,,,,, ^^^^^^^ -.- O #
diff --git a/lib/edit/t_gondol.txt b/lib/edit/t_gondol.txt
index 779c4fbb..51cf4b39 100644
--- a/lib/edit/t_gondol.txt
+++ b/lib/edit/t_gondol.txt
@@ -123,9 +123,6 @@ F:m:74:3:0:0:0:0:0:37
# Thunderlord's Hide
F:n:74:3:0:0:0:0:0:22
-# Merchant guild
-F:o:74:3:0:0:0:0:0:56
-
# Force elven monsters
f:ELVEN
@@ -178,7 +175,7 @@ D:######$$$$$$$$$$$$$$$$$### ...
D:######$$$$$$$$$$$$$$$$$$## ... C##T.V#######V...........TTTT#######TTTT..................TT####C----,--TTT##TTT----TTT##TTTTTT------,,,,,^^^^###
D:#####$$$$$$$$$$$$$$$$$$$## ######### ... ############# CC#T.VV#####VV.............................................TTT#CC----,---TT#TT--------TT##T-T-TT------,,,,^^^^###
D:#####$$$$$$$#####$$$$$$$## ######### ... ############# C#T..VV###VV.....TTTTTTTTTTT.......TTTTTTTTTTT..............T#C-----,,,,,,,,,,,,,,,,,,,e#TT-TTT------,,,,^^^^###
-D:####$$$$#############$$$$# ########o.........7############ C#T...VVVVV....TTT#########TTT...TTT#########TTT............T#C----------T#TT--------TT##TTT-------,,,,^^^^^^###
+D:####$$$$#############$$$$# #########.........7############ C#T...VVVVV....TTT#########TTT...TTT#########TTT............T#C----------T#TT--------TT##TTT-------,,,,^^^^^^###
D:####$###################$# ######### ... ############# C#TT..........TT###VVVVVV####TT.TT####WWWWWW###TT..........TT#C--------TTT##TTT----TTT##TTTTT-----,,,,^^^^^^^###
D:########################## ######### ... ############# C##T..........T##VVV....VVV###TTT###WWW....WWW##T..........T##C-------TTTTT###TTTTTT###TTTTT-----,,,,,^^^^^^^###
D:########################### ... CC#T..........T#VV........VV#######WW........WW#T..........T#CC -----TTTT-TTT########TTTTTT------,,,,,,,^^^^^###
diff --git a/lib/edit/t_minas.txt b/lib/edit/t_minas.txt
index 51c74da3..9f6ae669 100644
--- a/lib/edit/t_minas.txt
+++ b/lib/edit/t_minas.txt
@@ -64,9 +64,6 @@ F:l:74:3:0:0:0:0:0:22
# Castle: Plot Minas Anor
F:B:75:3:0:0:0:0:0:5
-# Merchant guild
-F:m:74:3:0:0:0:0:0:56
-
# Library Quest
F:x:63:3
@@ -84,7 +81,7 @@ D:#^^----ssss-----###--------####------ ^^^^^^
D:#^^^---StSS-------###--#ssss--###------- ^^^^^^^^ @@VVVVVVVV@VVV@@@@@@@@ @@@V@@ @@@@VV@@@@ , #
D:#^^----ssss----OO---##--#StSS---####------ ^^^^^^^^ @@V@V,@@@@@@VVVVVVVV@@@VVV@ @@VVVV@@ ,, #
D:#^^----x#a#-----OOO--##--#sssss----###------ ^^^^^^^^ @@@@@ @@@@@@@@VVVVV@@@ @@@@VV@@@ ,,, #
-D:#^ ---------------OO--###-#m#7#------###----- ^^^^^^^^^^ @VVV@@ @@VVV@@ ,O, #
+D:#^ ---------------OO--###-###7#------###----- ^^^^^^^^^^ @VVV@@ @@VVV@@ ,O, #
D:#^ StSSSS-----ss---OO---##-----OOOOO---###---- ^^^^^^^^^^^ @@@ @@VVV@@ OO #
D:#^^ssssss----Ssss---OOO--##---OOOOOOOO---##---- ^l^^^^^^^ @@VVV@ OO #
D:#^ ####9#---sstSss---OOO--##-OOOOOOOOOOO--##---- ^^^^^ @@VVV@@ OO #
diff --git a/lib/help/c_merch.txt b/lib/help/c_merch.txt
deleted file mode 100644
index 31fb60dd..00000000
--- a/lib/help/c_merch.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-#####R=== Merchants ===
-
-#####GDescription
-A Merchant is neither a warrior nor a spellcaster. They still have some great
-advantages, they can use chests to warp items into other items, they can
-indentify items, they soon learn to detect all objects in the area, and
-at higher level they can see all monsters carrying objects. They will also
-get the power to appraise items and to turn them into gold. A merchant will
-naturraly get better prices in shops and get access to the merchant guild
-services, loan and item request.
-
-#####GPrimary Stats
-Charisma
-Intelligence (Ability stat)
-
-#####GMagic Usage
-Merchants can use portable holes to carry more stuff than other classes but
-at the cost of an increased weight. To do that they must wear a portable hole
-and use it with 'm'.
-They also can use their merchants abilities and midas touch in the 'U' menu.
-
-#####GStarting Equipment
-A merchant begins the game with:
- A portable hole
- A small steel chest containing gold and items
- A long sword
- A wand of tame monsters
-
-
diff --git a/lib/mods/theme/edit/ba_info.txt b/lib/mods/theme/edit/ba_info.txt
index b76f79dd..1a695f75 100644
--- a/lib/mods/theme/edit/ba_info.txt
+++ b/lib/mods/theme/edit/ba_info.txt
@@ -257,18 +257,6 @@ N:55:Get an item
C:0:0:0
I:44:0:g:p
-N:56:Request an item
-C:0:0:0
-I:51:2:r
-
-N:57:Ask for loan
-C:0:0:0
-I:52:2:a
-
-N:58:Pay back loan
-C:0:0:0
-I:53:2:p
-
N:59:Donate an item
C:0:0:0
I:43:0:d
diff --git a/lib/mods/theme/edit/ow_info.txt b/lib/mods/theme/edit/ow_info.txt
index 92f0076a..ce9e526e 100644
--- a/lib/mods/theme/edit/ow_info.txt
+++ b/lib/mods/theme/edit/ow_info.txt
@@ -1412,8 +1412,3 @@ I:20000:130
C:110:100:80
L:Human | RohanKnight | Dunadan | High-Elf
H:Dragon | Demon | Beorning | Orc | Half-Ogre | Troll | Easterling
-
-### For the Merchants' Guild ###
-N:211:Worm(Human)
-I:30000:130
-C:110:100:90 \ No newline at end of file
diff --git a/lib/mods/theme/edit/st_info.txt b/lib/mods/theme/edit/st_info.txt
index 29ca49fc..8a9ea75b 100644
--- a/lib/mods/theme/edit/st_info.txt
+++ b/lib/mods/theme/edit/st_info.txt
@@ -793,12 +793,6 @@ F:RANDOM | MEDIUM_LEVEL | DEPEND_LEVEL
F:RARE
W:24
-N:56:Merchants Guild
-A:0:0:56:57:58:0
-O:211:211:211:211
-G:+:g
-W:0
-
N:57:The Museum
A:0:0:59:0:3:0
O:0:0:0:0
diff --git a/lib/mods/theme/edit/t_gondol.txt b/lib/mods/theme/edit/t_gondol.txt
index 6b0a32cd..66807868 100644
--- a/lib/mods/theme/edit/t_gondol.txt
+++ b/lib/mods/theme/edit/t_gondol.txt
@@ -123,9 +123,6 @@ F:m:74:3:0:0:0:0:0:37
# Thunderlord's Hide
F:n:74:3:0:0:0:0:0:22
-# Merchant guild
-F:o:74:3:0:0:0:0:0:56
-
# Force elven monsters
f:ELVEN
@@ -178,7 +175,7 @@ D:######$$$$$$$$$$$$$$$$$### ...
D:######$$$$$$$$$$$$$$$$$$## ... OC##T.V#######V...........TTTT#######TTTT..................TT####CO---,--TTT##TTT----TTT##TTTTTT------,,,,,^^^^###
D:#####$$$$$$$$$$$$$$$$$$$## ######### ... ############# OCC#T.VV#####VV.............................................TTT#CCO---,---TT#TT--------TT##T-T-TT------,,,,^^^^###
D:#####$$$$$$$#####$$$$$$$## ######### ... ############# OOC#T..VV###VV.....TTTTTTTTTTT.......TTTTTTTTTTT..............T#COO---,,,,,,,,,,,,,,,,,,,e#TT-TTT------,,,,^^^^###
-D:####$$$$#############$$$$# ########o.........7############ OC#T...VVVVV....TTT#########TTT...TTT#########TTT............T#CO---------T#TT--------TT##TTT-------,,,,^^^^^^###
+D:####$$$$#############$$$$# #########.........7############ OC#T...VVVVV....TTT#########TTT...TTT#########TTT............T#CO---------T#TT--------TT##TTT-------,,,,^^^^^^###
D:####$###################$# ######### ... ############# OC#TT..........TT###VVVVVV####TT.TT####WWWWWW###TT..........TT#CO-------TTT##TTT----TTT##TTTTT-----,,,,^^^^^^^###
D:########################## ######### ... ############# OC##T..........T##VVV....VVV###TTT###WWW....WWW##T..........T##CO------TTTTT###TTTTTT###TTTTT-----,,,,,^^^^^^^###
D:########################### ... OCC#T..........T#VV........VV#######WW........WW#T..........T#CCO-----TTTT-TTT########TTTTTT------,,,,,,,^^^^^###
diff --git a/lib/mods/theme/help/c_merch.txt b/lib/mods/theme/help/c_merch.txt
deleted file mode 100644
index 31fb60dd..00000000
--- a/lib/mods/theme/help/c_merch.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-#####R=== Merchants ===
-
-#####GDescription
-A Merchant is neither a warrior nor a spellcaster. They still have some great
-advantages, they can use chests to warp items into other items, they can
-indentify items, they soon learn to detect all objects in the area, and
-at higher level they can see all monsters carrying objects. They will also
-get the power to appraise items and to turn them into gold. A merchant will
-naturraly get better prices in shops and get access to the merchant guild
-services, loan and item request.
-
-#####GPrimary Stats
-Charisma
-Intelligence (Ability stat)
-
-#####GMagic Usage
-Merchants can use portable holes to carry more stuff than other classes but
-at the cost of an increased weight. To do that they must wear a portable hole
-and use it with 'm'.
-They also can use their merchants abilities and midas touch in the 'U' menu.
-
-#####GStarting Equipment
-A merchant begins the game with:
- A portable hole
- A small steel chest containing gold and items
- A long sword
- A wand of tame monsters
-
-
diff --git a/src/birth.cc b/src/birth.cc
index 0c98f160..d0074e0e 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -976,8 +976,6 @@ static void player_wipe(void)
/* Initialize allow_one_death */
p_ptr->allow_one_death = 0;
- p_ptr->loan = p_ptr->loan_time = 0;
-
/* Wipe the power list */
for (i = 0; i < POWER_MAX; i++)
{
diff --git a/src/bldg.cc b/src/bldg.cc
index 77aafe19..1685eece 100644
--- a/src/bldg.cc
+++ b/src/bldg.cc
@@ -100,12 +100,10 @@ void show_building(store_type *s_ptr)
store_info_type *st_ptr = &st_info[s_ptr->st_idx];
- store_action_type *ba_ptr;
-
for (i = 0; i < 6; i++)
{
- ba_ptr = &ba_info[st_ptr->actions[i]];
+ store_action_type *ba_ptr = &ba_info[st_ptr->actions[i]];
if (ba_ptr->letter != '.')
{
@@ -1648,22 +1646,6 @@ bool_ bldg_process_command(store_type *s_ptr, int i)
return FALSE;
}
- /* If player has loan and the time is out, few things work in stores */
- if (p_ptr->loan && !p_ptr->loan_time)
- {
- if ((bact != BACT_SELL) && (bact != BACT_VIEW_BOUNTIES) &&
- (bact != BACT_SELL_CORPSES) &&
- (bact != BACT_VIEW_QUEST_MON) &&
- (bact != BACT_SELL_QUEST_MON) &&
- (bact != BACT_EXAMINE) && (bact != BACT_STEAL) &&
- (bact != BACT_PAY_BACK_LOAN))
- {
- msg_print("You are not allowed to do that until you have paid back your loan.");
- msg_print(NULL);
- return FALSE;
- }
- }
-
/* check gold */
if (bcost > p_ptr->au)
{
@@ -1963,83 +1945,6 @@ bool_ bldg_process_command(store_type *s_ptr, int i)
break;
}
- case BACT_REQUEST_ITEM:
- {
- store_request_item();
- paid = TRUE;
- break;
- }
-
- case BACT_GET_LOAN:
- {
- s32b i, req;
- char prompt[80];
-
- if (p_ptr->loan)
- {
- msg_print("You already have a loan!");
- break;
- }
-
- req = p_ptr->au;
-
- for (i = 0; i < INVEN_TOTAL; i++)
- req += object_value_real(&p_ptr->inventory[i]);
-
- if (req > 100000) req = 100000;
- if ((req + p_ptr->au) > PY_MAX_GOLD) req = PY_MAX_GOLD - p_ptr->au;
-
- strnfmt(prompt, sizeof (prompt),
- "How much would you like to get (0-%ld) ?", req);
-
- req = get_quantity(prompt, req);
-
- if (req)
- {
- p_ptr->loan += req;
- p_ptr->au += req;
- p_ptr->loan_time += req;
-
- msg_format("You receive %i gold pieces", req);
-
- paid = TRUE;
- }
- else
- msg_format("You did not request any money!");
-
- break;
- }
-
- case BACT_PAY_BACK_LOAN:
- {
- s32b req;
- char prompt[80];
-
- if (p_ptr->loan)
- {
- msg_format("You have nothing to payback!");
- break;
- }
-
- msg_format("You have a loan of %i.", p_ptr->loan);
-
- req = ((p_ptr->loan + bcost) > p_ptr->au) ? p_ptr->au - bcost : p_ptr->loan;
-
- strnfmt(prompt, sizeof (prompt),
- "How much would you like to pay back (0-%ld) ?", req);
-
- req = get_quantity(prompt, req);
-
- p_ptr->loan -= req;
- p_ptr->au -= req;
-
- if (!p_ptr->loan) p_ptr->loan_time = 0;
-
- msg_format("You pay back %i gold pieces", req);
- paid = TRUE;
- break;
- }
-
case BACT_DROP_ITEM:
{
quest_bounty_drop_item();
diff --git a/src/defines.h b/src/defines.h
index c61d603d..52412eda 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -3911,9 +3911,6 @@
#define BACT_QUEST3 48
#define BACT_QUEST4 49
#define BACT_STAR_HEAL 50
-#define BACT_REQUEST_ITEM 51
-#define BACT_GET_LOAN 52
-#define BACT_PAY_BACK_LOAN 53
#define BACT_DROP_ITEM 54
#define BACT_GET_ITEM 55
#define BACT_FIREPROOF_QUEST 56
@@ -4197,7 +4194,6 @@
#define PWR_INCARNATE 54
#define PWR_MAGIC_MAP 55
#define PWR_LAY_TRAP 56
-#define PWR_MERCHANT 57
#define PWR_COMPANION 58
#define PWR_BEAR 59
#define PWR_DODGE 60
diff --git a/src/dungeon.cc b/src/dungeon.cc
index 7fd5e7e9..9f3c137f 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -1468,92 +1468,6 @@ static void process_world(void)
if (magik(20)) select_bounties();
}
- /* Modify loan */
- if (p_ptr->loan)
- {
- if (p_ptr->loan_time) p_ptr->loan_time--;
-
- if (((turn % 5000) == 0) && !p_ptr->loan_time)
- {
- cmsg_print(TERM_RED, "You should pay your loan...");
-
- p_ptr->loan += p_ptr->loan / 12;
-
- if (p_ptr->loan > PY_MAX_GOLD) p_ptr->loan = PY_MAX_GOLD;
-
- /* Do a nasty stuff */
- if (p_ptr->wild_mode && rand_int(2))
- {
- /* Discount player items */
- int z = 0, tries = 200;
- object_type *o_ptr = NULL;
-
- while (tries--)
- {
- z = rand_int(INVEN_TOTAL);
- o_ptr = &p_ptr->inventory[z];
-
- if (!o_ptr->k_idx) continue;
-
- if (o_ptr->discount >= 100) continue;
-
- break;
- }
-
- if (tries)
- {
- o_ptr->discount += 70;
- if (o_ptr->discount >= 100) o_ptr->discount = 100;
-
- inven_item_optimize(z);
- inven_item_describe(z);
-
- p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
- }
- }
-
- else
- {
- int merc = test_monster_name("Mean-looking mercenary");
- int agent = test_monster_name("Agent of the black market");
- int num = 5 + (p_ptr->lev / 3), z;
-
- for (z = 0; z < num; z++)
- {
- int yy, xx, attempts = 200, m_idx;
-
- /* Summon */
- while (1)
- {
- scatter(&yy, &xx, p_ptr->py, p_ptr->px, 6);
-
- /* Accept an empty grid within the boundary */
- if (in_bounds(yy, xx) && cave_floor_bold(yy, xx)) break;
-
- /* Max number of retries reached */
- if (--attempts == 0) break;
- }
-
- /* All the attempts failed */
- if (attempts == 0) continue;
-
- /* Summon a monster */
- m_idx = place_monster_one(yy, xx, magik(80) ? merc : agent,
- 0, FALSE, MSTATUS_ENEMY);
-
- /* Level it */
- if (m_idx)
- {
- monster_type *m_ptr = &m_list[m_idx];
-
- m_ptr->exp = monster_exp(p_ptr->lev * 2);
- monster_check_experience(m_idx, TRUE);
- }
- }
- }
- }
- }
-
/*** Process the monsters ***/
/* Check for creature generation. */
diff --git a/src/externs.h b/src/externs.h
index b13323ce..c574bb26 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -1386,7 +1386,6 @@ extern void store_purchase(void);
extern void store_examine(void);
extern void store_stole(void);
extern void store_prt_gold(void);
-extern void store_request_item(void);
/* bldg.c -KMW- */
extern bool_ bldg_process_command(store_type *s_ptr, int i);
diff --git a/src/loadsave.cc b/src/loadsave.cc
index 8cdbfe5e..b997e4c4 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -239,6 +239,7 @@ static bool_ do_extra(int flag)
byte tmp8u = 0;
s16b tmp16s = 0;
u32b tmp32u = 0;
+ s32b tmp32s = 0;
u16b tmp16b = 0;
u32b dummy32u = 0;
@@ -587,8 +588,8 @@ static bool_ do_extra(int flag)
do_s16b(&p_ptr->disrupt_shield, flag);
do_s16b(&p_ptr->parasite, flag);
do_s16b(&p_ptr->parasite_r_idx, flag);
- do_s32b(&p_ptr->loan, flag);
- do_s32b(&p_ptr->loan_time, flag);
+ do_s32b(&tmp32s, flag);
+ do_s32b(&tmp32s, flag);
do_s16b(&p_ptr->absorb_soul, flag);
do_s32b(&p_ptr->inertia_controlled_spell, flag);
do_s16b(&p_ptr->last_rewarded_level, flag);
diff --git a/src/powers.cc b/src/powers.cc
index 662d535a..ae7afbcd 100644
--- a/src/powers.cc
+++ b/src/powers.cc
@@ -171,199 +171,6 @@ static void power_activate(int power)
}
}
break;
- case PWR_MERCHANT:
- /* Select power to use */
- while (TRUE)
- {
- if (!get_com("[A]ppraise item, [W]arp item or [I]dentify item? ", &ch))
- {
- amber_power = 0;
- break;
- }
-
- if (ch == 'A' || ch == 'a')
- {
- amber_power = 1;
- break;
- }
-
- if (ch == 'W' || ch == 'w')
- {
- amber_power = 2;
- break;
- }
-
- if (ch == 'I' || ch == 'i')
- {
- amber_power = 3;
- break;
- }
- }
-
- if (amber_power == 1)
- {
- x_ptr_foo.level = 5;
- x_ptr_foo.cost = 5;
- x_ptr_foo.stat = A_INT;
- x_ptr_foo.diff = 5;
- if (power_chance(&x_ptr_foo))
- {
- /* Appraise an object */
- int idx;
- cptr q, s;
-
- /* Get the item */
- q = "Appraise which item? ";
- s = "You have nothing to appraise.";
- if (get_item(&idx, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR)))
- {
- object_type *o_ptr;
- char out_val[80], value[16];
-
- /* The item is in the pack */
- if (idx >= 0) o_ptr = &p_ptr->inventory[idx];
- /* The item is on the floor */
- else o_ptr = &o_list[0 - idx];
-
- /* Appraise it */
- sprintf(value, FMTs32b " au", object_value(o_ptr));
-
- /* Inscribe the value */
- /* Get the original inscription */
- if (o_ptr->note)
- {
- strcpy(out_val, quark_str(o_ptr->note));
- strcat(out_val, " ");
- }
- else
- out_val[0] = '\0';
-
- strcat(out_val, value);
-
- /* Save the new inscription */
- o_ptr->note = quark_add(out_val);
-
- /* Combine the pack */
- p_ptr->notice |= (PN_COMBINE);
-
- /* Window stuff */
- p_ptr->window |= (PW_INVEN | PW_EQUIP);
- }
- }
- }
- if (amber_power == 2)
- {
- x_ptr_foo.level = 15;
- x_ptr_foo.cost = 10;
- x_ptr_foo.stat = A_INT;
- x_ptr_foo.diff = 7;
- if (power_chance(&x_ptr_foo))
- {
- int chest, item;
- cptr q1, s1, q2, s2;
- u32b flag = (USE_EQUIP | USE_INVEN | USE_FLOOR);
- object_type *o1_ptr = &p_ptr->inventory[0], *o2_ptr = &p_ptr->inventory[1];
- int ok = 0;
-
- q1 = "Select a chest! ";
- s1 = "You need a chest to warp items.";
-
- q2 = "Warp which item? ";
- s2 = "You have nothing to warp.";
-
- item_tester_tval = TV_CHEST;
-
- /* Get the chest */
- if (get_item(&chest, q1, s1, flag))
- {
- if (chest >= 0) o1_ptr = &p_ptr->inventory[chest];
- else o1_ptr = &o_list[0 - chest];
-
- /* Is the chest disarmed? */
- if (o1_ptr->pval > 0)
- msg_print("This chest may be trapped.");
-
- /* Is it ruined? */
- else if (k_info[o1_ptr->k_idx].level <= 0)
- msg_print("This chest is broken.");
-
- /* Is it empty? */
- else if (o1_ptr->pval2 >= (o1_ptr->sval % SV_CHEST_MIN_LARGE) * 2)
- msg_print("This chest is full.");
-
- else ok = 1;
- }
-
- /* Get the item */
- if (ok && get_item(&item, q2, s2, flag))
- {
- ok = 0;
-
- o2_ptr = get_object(item);
-
- /* Is the item cursed? */
- if ((item >= INVEN_WIELD) && cursed_p(o2_ptr))
- msg_print("Hmmm, it seems to be cursed.");
-
- /* Is it the same chest? */
- if (item == chest)
- msg_print("You can't put a chest into itself.");
-
- /* Is it another chest? */
- if (o2_ptr->tval == TV_CHEST)
- msg_print("You can't put a chest into another one.");
-
- /* Try to use the power */
- else ok = 1;
- }
-
- if (ok)
- {
- int tmp, level;
-
- /* Calculate the level of objects */
- tmp = o1_ptr->pval;
-
- /* Get the level of the current object */
- /* Cursed items/cheap items always break */
- if (k_info[o2_ptr->k_idx].cost < 20) level = 0;
- /* Not-so-cheap items break 90% of the time */
- else if (k_info[o2_ptr->k_idx].cost < 100) level = 1;
- else level = k_info[o2_ptr->k_idx].level;
-
- /* Break some items */
- if (randint(10) > level)
- msg_print("The item disappeared!");
- else
- {
- level /= (o1_ptr->sval % SV_CHEST_MIN_LARGE) * 2;
-
- /* Increase the number of objects in
- * the chest */
- o1_ptr->pval2++;
-
- /* Set the level of chest */
- tmp = tmp - level;
- o1_ptr->pval = tmp;
- }
-
- /* Destroy item */
- inc_stack_size(item, -1);
- }
- }
- }
- if (amber_power == 3)
- {
- x_ptr_foo.level = 30;
- x_ptr_foo.cost = 20;
- x_ptr_foo.stat = A_INT;
- x_ptr_foo.diff = 7;
- if (power_chance(&x_ptr_foo))
- {
- ident_spell();
- }
- }
- break;
case PWR_LAY_TRAP:
{
do_cmd_set_trap();
diff --git a/src/store.cc b/src/store.cc
index aaffb708..aeec0069 100644
--- a/src/store.cc
+++ b/src/store.cc
@@ -3853,65 +3853,3 @@ void do_cmd_home_trump(void)
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
}
-
-static void pay_for_requested_item(int value, object_type *q_ptr)
-{
- msg_format("It'll cost %i gold pieces. ", value);
-
- if (get_check("Do you wish to pay?"))
- {
- if (p_ptr->au < value)
- msg_print("You don't have enough money for it.");
- else
- {
- if (store_carry(q_ptr) != -1)
- {
- msg_print("The item has arrived in the Black Market.");
- p_ptr->au -= value;
-
- p_ptr->redraw |= PR_FRAME;
- }
- else
- msg_print("There isn't enough room for it.");
- }
- }
-}
-
-/*
- * Request item for merchants
- */
-void store_request_item(void)
-{
- char buf[80], name[80];
- object_type forge, *q_ptr = &forge;
- store_type *ost_ptr = st_ptr;
-
- /* Get the Black Market */
- st_ptr = &town_info[p_ptr->town_num].store[6];
-
- /* Make an empty string */
- buf[0] = 0;
-
- /* Ask for the wish */
- if (!get_string("Request what? ", buf, 80))
- {
- st_ptr = ost_ptr;
- return;
- }
-
- clean_wish_name(buf, name);
-
- if (test_object_wish(name, q_ptr, &forge, "request"))
- {
- int value = object_value_real(q_ptr) * 5;
-
- /* Pay for the delivery */
- pay_for_requested_item(value, q_ptr);
-
- /* Don't search any more */
- st_ptr = ost_ptr;
- return;
- }
-
- st_ptr = ost_ptr;
-}
diff --git a/src/tables.cc b/src/tables.cc
index 904b3230..63ea61fe 100644
--- a/src/tables.cc
+++ b/src/tables.cc
@@ -3395,10 +3395,12 @@ power_type powers_type[POWER_MAX] =
1, 1, A_DEX, 1,
},
{
- "Merchant abilities",
- "You can request items and get loans.",
- "From now on you can use the merchant abilities.",
- "You can no longer use the merchant abilities.",
+ "notused", /* Merchant abilities; no longer used, but want to
+ * avoid having to move all potential places where
+ * we're indexing into this table. */
+ "notused",
+ "notused",
+ "notused",
0, 0, 0, 0,
},
{
diff --git a/src/types.h b/src/types.h
index cbd9196b..7d7dfce6 100644
--- a/src/types.h
+++ b/src/types.h
@@ -1514,8 +1514,6 @@ struct player_type
s16b disrupt_shield;/* Timed disruption shield */
s16b parasite; /* Timed parasite */
s16b parasite_r_idx;/* Timed parasite monster */
- s32b loan; /* Amount of loan */
- s32b loan_time; /* Timer -- time to payback loan */
s16b absorb_soul; /* Timed soul absordtion */
s16b tim_magic_breath; /* Magical breathing -- can breath anywhere */
s16b tim_water_breath; /* Water breathing -- can breath underwater */