OSDN Git Service
(root)
/
hengband
/
hengband.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Refactor] #38997 forget_lite() に floor_type * 引数を追加. / Add floor_type * argument...
[hengband/hengband.git]
/
src
/
store.c
diff --git
a/src/store.c
b/src/store.c
index
7333c68
..
78494bc
100644
(file)
--- a/
src/store.c
+++ b/
src/store.c
@@
-11,15
+11,40
@@
*/
#include "angband.h"
*/
#include "angband.h"
+#include "core.h"
+#include "util.h"
+#include "term.h"
+
+#include "floor.h"
+#include "cmd-basic.h"
+#include "cmd-dump.h"
#include "cmd-item.h"
#include "cmd-item.h"
+#include "cmd-smith.h"
#include "cmd-zapwand.h"
#include "cmd-magiceat.h"
#include "cmd-zapwand.h"
#include "cmd-magiceat.h"
+#include "spells.h"
#include "store.h"
#include "avatar.h"
#include "cmd-spell.h"
#include "rumor.h"
#include "player-status.h"
#include "store.h"
#include "avatar.h"
#include "cmd-spell.h"
#include "rumor.h"
#include "player-status.h"
+#include "player-class.h"
+#include "player-inventory.h"
+#include "object-flavor.h"
#include "object-hook.h"
#include "object-hook.h"
+#include "floor-events.h"
+#include "snipe.h"
+#include "files.h"
+#include "player-effects.h"
+#include "player-race.h"
+#include "mind.h"
+#include "world.h"
+#include "objectkind.h"
+#include "autopick.h"
+#include "floor-town.h"
+#include "japanese.h"
+#include "view-mainwindow.h"
+#include "wild.h"
#define MIN_STOCK 12
#define MIN_STOCK 12
@@
-1868,8
+1893,8
@@
static void purchase_analyze(PRICE price, PRICE value, PRICE guess)
if ((value <= 0) && (price > value))
{
msg_print(comment_7a[randint0(MAX_COMMENT_7A)]);
if ((value <= 0) && (price > value))
{
msg_print(comment_7a[randint0(MAX_COMMENT_7A)]);
- chg_virtue(V_HONOUR, -1);
- chg_virtue(V_JUSTICE, -1);
+ chg_virtue(
p_ptr,
V_HONOUR, -1);
+ chg_virtue(
p_ptr,
V_JUSTICE, -1);
sound(SOUND_STORE1);
}
sound(SOUND_STORE1);
}
@@
-1877,8
+1902,8
@@
static void purchase_analyze(PRICE price, PRICE value, PRICE guess)
else if ((value < guess) && (price > value))
{
msg_print(comment_7b[randint0(MAX_COMMENT_7B)]);
else if ((value < guess) && (price > value))
{
msg_print(comment_7b[randint0(MAX_COMMENT_7B)]);
- chg_virtue(V_JUSTICE, -1);
- if (one_in_(4)) chg_virtue(V_HONOUR, -1);
+ chg_virtue(
p_ptr,
V_JUSTICE, -1);
+ if (one_in_(4)) chg_virtue(
p_ptr,
V_HONOUR, -1);
sound(SOUND_STORE2);
}
sound(SOUND_STORE2);
}
@@
-1886,8
+1911,8
@@
static void purchase_analyze(PRICE price, PRICE value, PRICE guess)
else if ((value > guess) && (value < (4 * guess)) && (price < value))
{
msg_print(comment_7c[randint0(MAX_COMMENT_7C)]);
else if ((value > guess) && (value < (4 * guess)) && (price < value))
{
msg_print(comment_7c[randint0(MAX_COMMENT_7C)]);
- if (one_in_(4)) chg_virtue(V_HONOUR, -1);
- else if (one_in_(4)) chg_virtue(V_HONOUR, 1);
+ if (one_in_(4)) chg_virtue(
p_ptr,
V_HONOUR, -1);
+ else if (one_in_(4)) chg_virtue(
p_ptr,
V_HONOUR, 1);
sound(SOUND_STORE3);
}
sound(SOUND_STORE3);
}
@@
-1895,9
+1920,9
@@
static void purchase_analyze(PRICE price, PRICE value, PRICE guess)
else if ((value > guess) && (price < value))
{
msg_print(comment_7d[randint0(MAX_COMMENT_7D)]);
else if ((value > guess) && (price < value))
{
msg_print(comment_7d[randint0(MAX_COMMENT_7D)]);
- if (one_in_(2)) chg_virtue(V_HONOUR, -1);
- if (one_in_(4)) chg_virtue(V_HONOUR, 1);
- if (10 * price < value) chg_virtue(V_SACRIFICE, 1);
+ if (one_in_(2)) chg_virtue(
p_ptr,
V_HONOUR, -1);
+ if (one_in_(4)) chg_virtue(
p_ptr,
V_HONOUR, 1);
+ if (10 * price < value) chg_virtue(
p_ptr,
V_SACRIFICE, 1);
sound(SOUND_STORE4);
}
}
sound(SOUND_STORE4);
}
}
@@
-1919,229
+1944,235
@@
static byte rgold_adj[MAX_RACES][MAX_RACES] =
/*Hum, HfE, Elf, Hal, Gno, Dwa, HfO, HfT, Dun, HiE, Barbarian,
HfOg, HGn, HTn, Cyc, Yek, Klc, Kbd, Nbl, DkE, Drc, Mind Flayer,
Imp, Glm, Skl, Zombie, Vampire, Spectre, Fairy, Beastman, Ent,
/*Hum, HfE, Elf, Hal, Gno, Dwa, HfO, HfT, Dun, HiE, Barbarian,
HfOg, HGn, HTn, Cyc, Yek, Klc, Kbd, Nbl, DkE, Drc, Mind Flayer,
Imp, Glm, Skl, Zombie, Vampire, Spectre, Fairy, Beastman, Ent,
- Angel, Demon, Kutar */
+ Angel, Demon, Kutar
, Android, Merfolk
*/
/* Human */
{ 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
/* Human */
{ 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
- 100, 120, 110, 105 },
+ 100, 120, 110, 105
, 110
},
/* Half-Elf */
{ 110, 100, 100, 105, 110, 120, 125, 130, 110, 100, 110,
120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
120, 110, 110, 110, 120, 110, 100, 125, 100, 95, 140,
/* Half-Elf */
{ 110, 100, 100, 105, 110, 120, 125, 130, 110, 100, 110,
120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
120, 110, 110, 110, 120, 110, 100, 125, 100, 95, 140,
- 110, 115, 110, 110 },
+ 110, 115, 110, 110
, 110
},
/* Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
/* Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
- 110, 110, 105, 110 },
+ 110, 110, 105, 110
, 110
},
/* Halfling */
{ 115, 110, 105, 95, 105, 110, 115, 130, 115, 105, 115,
125, 120, 120, 125, 115, 110, 120, 120, 120, 115, 115,
120, 110, 120, 120, 130, 110, 110, 130, 110, 95, 140,
/* Halfling */
{ 115, 110, 105, 95, 105, 110, 115, 130, 115, 105, 115,
125, 120, 120, 125, 115, 110, 120, 120, 120, 115, 115,
120, 110, 120, 120, 130, 110, 110, 130, 110, 95, 140,
- 115, 120, 105, 115 },
+ 115, 120, 105, 115
, 105
},
/* Gnome */
{ 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
120, 101, 110, 110, 120, 120, 115, 130, 115, 95, 140,
/* Gnome */
{ 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
120, 101, 110, 110, 120, 120, 115, 130, 115, 95, 140,
- 115, 110, 110, 115 },
+ 115, 110, 110, 115
, 110
},
/* Dwarf */
{ 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
120, 105, 115, 115, 115, 115, 120, 130, 120, 95, 140,
/* Dwarf */
{ 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
120, 105, 115, 115, 115, 115, 120, 130, 120, 95, 140,
- 115, 110, 115, 115 },
+ 115, 110, 115, 115
, 120
},
/* Half-Orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 115, 120, 125, 115, 125, 95, 140,
/* Half-Orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 115, 120, 125, 115, 125, 95, 140,
- 115, 110, 115, 115 },
+ 115, 110, 115, 115
, 125
},
/* Half-Troll */
{ 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
/* Half-Troll */
{ 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
- 110, 110, 115, 110 },
+ 110, 110, 115, 110
, 130
},
/* Amberite */
{ 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
120, 120, 105, 120, 115, 105, 115, 120, 110, 105, 105,
120, 105, 120, 120, 125, 120, 105, 135, 105, 95, 140,
/* Amberite */
{ 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
120, 120, 105, 120, 115, 105, 115, 120, 110, 105, 105,
120, 105, 120, 120, 125, 120, 105, 135, 105, 95, 140,
- 100, 110, 110, 100 },
+ 100, 110, 110, 100
, 110
},
/* High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 125, 120, 100, 125, 100, 95, 140,
/* High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 125, 120, 100, 125, 100, 95, 140,
- 110, 110, 105, 110 },
+ 110, 110, 105, 110
, 110
},
/* Human / Barbarian (copied from human) */
{ 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
115, 105, 125, 125, 130, 125, 115, 120, 115, 95, 140,
/* Human / Barbarian (copied from human) */
{ 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
115, 105, 125, 125, 130, 125, 115, 120, 115, 95, 140,
- 100, 120, 110, 100 },
+ 100, 120, 110, 100
, 110
},
/* Half-Ogre: theoretical, copied from half-troll */
{ 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
/* Half-Ogre: theoretical, copied from half-troll */
{ 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
- 110, 110, 115, 110 },
+ 110, 110, 115, 110
, 120
},
/* Half-Giant: theoretical, copied from half-troll */
{ 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
110, 115, 112, 112, 115, 112, 130, 120, 130, 95, 140,
/* Half-Giant: theoretical, copied from half-troll */
{ 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
110, 115, 112, 112, 115, 112, 130, 120, 130, 95, 140,
- 110, 110, 115, 110 },
+ 110, 110, 115, 110
, 115
},
/* Half-Titan: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
/* Half-Titan: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
- 110, 110, 115, 110 },
+ 110, 110, 115, 110
, 108
},
/* Cyclops: theoretical, copied from half-troll */
{ 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
110, 115, 112, 112, 115, 112, 130, 130, 130, 95, 140,
/* Cyclops: theoretical, copied from half-troll */
{ 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
110, 115, 112, 112, 115, 112, 130, 130, 130, 95, 140,
- 110, 110, 115, 110 },
+ 110, 110, 115, 110
, 115
},
/* Yeek: theoretical, copied from Half-Orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
/* Yeek: theoretical, copied from Half-Orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
- 115, 110, 115, 115 },
+ 115, 110, 115, 115
, 110
},
/* Klackon: theoretical, copied from Gnome */
{ 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
120, 101, 110, 110, 120, 120, 130, 130, 130, 95, 140,
/* Klackon: theoretical, copied from Gnome */
{ 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
120, 101, 110, 110, 120, 120, 130, 130, 130, 95, 140,
- 115, 110, 115, 115 },
+ 115, 110, 115, 115
, 110
},
/* Kobold: theoretical, copied from Half-Orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
/* Kobold: theoretical, copied from Half-Orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
- 115, 110, 115, 115 },
+ 115, 110, 115, 115
, 120
},
/* Nibelung: theoretical, copied from Dwarf */
{ 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
120, 105, 115, 115, 120, 120, 130, 130, 130, 95, 140,
/* Nibelung: theoretical, copied from Dwarf */
{ 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
120, 105, 115, 115, 120, 120, 130, 130, 130, 95, 140,
- 115, 135, 115, 115 },
+ 115, 135, 115, 115
, 120
},
/* Dark Elf */
{ 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
/* Dark Elf */
{ 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
- 110, 101, 115, 110 },
+ 110, 101, 115, 110
, 115
},
/* Draconian: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
/* Draconian: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
- 110, 110, 115, 110 },
+ 110, 110, 115, 110
, 115
},
/* Mind Flayer: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
/* Mind Flayer: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
- 110, 110, 115, 110 },
+ 110, 110, 115, 110
, 110
},
/* Imp: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 120, 120,
/* Imp: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 120, 120,
- 110, 110, 115, 110 },
+ 110, 110, 115, 110
, 120
},
/* Golem: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
/* Golem: theoretical, copied from High_Elf */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
- 110, 110, 115, 110 },
+ 110, 110, 115, 110
, 110
},
/* Skeleton: theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
/* Skeleton: theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
- 115, 110, 125, 115 },
+ 115, 110, 125, 115
, 110
},
/* Zombie: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
/* Zombie: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
- 115, 110, 125, 115 },
+ 115, 110, 125, 115
, 110
},
/* Vampire: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
/* Vampire: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
- 115, 110, 125, 115 },
+ 115, 110, 125, 115
, 120
},
/* Spectre: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
/* Spectre: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
- 115, 110, 125, 115 },
+ 115, 110, 125, 115
, 110
},
/* Sprite: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
/* Sprite: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
- 115, 110, 105, 115 },
+ 115, 110, 105, 115
, 110
},
/* Beastman: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
/* Beastman: Theoretical, copied from half-orc */
{ 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
- 115, 110, 115, 115 },
+ 115, 110, 115, 115
, 125
},
/* Ent */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
/* Ent */
{ 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
- 110, 110, 105, 110 },
+ 110, 110, 105, 110
, 110
},
/* Angel */
{ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 160,
/* Angel */
{ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 160,
- 95, 95, 95, 95 },
+ 95, 95, 95, 95
, 95
},
/* Demon */
{ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 160, 120,
/* Demon */
{ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 160, 120,
- 140, 140, 140, 140 },
+ 140, 140, 140, 140
, 140
},
/* Dunadan */
{ 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
/* Dunadan */
{ 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
- 100, 120, 110, 100 },
+ 100, 120, 110, 100
, 110
},
/* Shadow Fairy */
{ 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
/* Shadow Fairy */
{ 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
- 110, 101, 115, 110 },
+ 110, 101, 115, 110
, 115
},
/* Kutar */
{ 110, 110, 105, 105, 110, 115, 115, 115, 110, 105, 110,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 125, 125, 125, 125, 105, 115, 105, 95, 140,
/* Kutar */
{ 110, 110, 105, 105, 110, 115, 115, 115, 110, 105, 110,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 125, 125, 125, 125, 105, 115, 105, 95, 140,
- 110, 115, 100, 110 },
+ 110, 115, 100, 110
, 110
},
/* Android */
{ 105, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
/* Android */
{ 105, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
- 100, 120, 110, 100 },
+ 100, 120, 110, 100, 110 },
+
+ /* Merfolk */
+ { 110, 110, 110, 105, 110, 120, 125, 130, 110, 110, 110,
+ 120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
+ 120, 110, 110, 110, 120, 110, 110, 125, 110, 95, 140,
+ 110, 115, 110, 110, 100 },
};
};
@@
-2152,7
+2183,7
@@
static byte rgold_adj[MAX_RACES][MAX_RACES] =
* @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
* @param greed 店主の強欲度
* @param flip TRUEならば店主にとっての買取価格、FALSEなら売出価格を計算
* @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
* @param greed 店主の強欲度
* @param flip TRUEならば店主にとっての買取価格、FALSEなら売出価格を計算
- * @return ã
\81
ªã
\81
\97
+ * @return ã
\82
¢ã
\82
¤ã
\83
\86
ã
\83
ã
\81
®åº
\97
è
\88
\97
ä¾¡æ ¼
* @details
* <pre>
* This function takes into account the player's charisma, and the
* @details
* <pre>
* This function takes into account the player's charisma, and the
@@
-2168,12
+2199,11
@@
static byte rgold_adj[MAX_RACES][MAX_RACES] =
* "greed" value is always something (?).
* </pre>
*/
* "greed" value is always something (?).
* </pre>
*/
-static
s32b
price_item(object_type *o_ptr, int greed, bool flip)
+static
PRICE
price_item(object_type *o_ptr, int greed, bool flip)
{
{
- int factor;
- int adjust;
- s32b price;
-
+ int factor;
+ int adjust;
+ PRICE price;
/* Get the value of one of the items */
price = object_value(o_ptr);
/* Get the value of one of the items */
price = object_value(o_ptr);
@@
-2181,7
+2211,6
@@
static s32b price_item(object_type *o_ptr, int greed, bool flip)
/* Worthless items */
if (price <= 0) return (0L);
/* Worthless items */
if (price <= 0) return (0L);
-
/* Compute the racial factor */
factor = rgold_adj[ot_ptr->owner_race][p_ptr->prace];
/* Compute the racial factor */
factor = rgold_adj[ot_ptr->owner_race][p_ptr->prace];
@@
-2248,7
+2277,7
@@
static void mass_produce(object_type *o_ptr)
int size = 1;
DISCOUNT_RATE discount = 0;
int size = 1;
DISCOUNT_RATE discount = 0;
-
s32b
cost = object_value(o_ptr);
+
PRICE
cost = object_value(o_ptr);
/* Analyze the type */
/* Analyze the type */
@@
-2517,7
+2546,7
@@
static void store_object_absorb(object_type *o_ptr, object_type *j_ptr)
*/
static int store_check_num(object_type *o_ptr)
{
*/
static int store_check_num(object_type *o_ptr)
{
- int
i;
+ int i;
object_type *j_ptr;
/* The "home" acts like the player */
object_type *j_ptr;
/* The "home" acts like the player */
@@
-2987,7
+3016,7
@@
bool combine_and_reorder_home(int store_num)
/*!
* @brief 我が家にオブジェクトを加える /
/*!
* @brief 我が家にオブジェクトを加える /
- * Add the item "o_ptr" to the
inventory
of the "Home"
+ * Add the item "o_ptr" to the
p_ptr->inventory_list
of the "Home"
* @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
* @return 収めた先のID
* @details
* @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
* @return 収めた先のID
* @details
@@
-3000,9
+3029,9
@@
bool combine_and_reorder_home(int store_num)
*/
static int home_carry(object_type *o_ptr)
{
*/
static int home_carry(object_type *o_ptr)
{
- int
slot;
-
s32b
value;
- int
i;
+ int slot;
+
PRICE
value;
+ int i;
object_type *j_ptr;
bool old_stack_force_notes = stack_force_notes;
bool old_stack_force_costs = stack_force_costs;
object_type *j_ptr;
bool old_stack_force_notes = stack_force_notes;
bool old_stack_force_costs = stack_force_costs;
@@
-3081,7
+3110,7
@@
static int home_carry(object_type *o_ptr)
/* Insert the new item */
st_ptr->stock[slot] = *o_ptr;
/* Insert the new item */
st_ptr->stock[slot] = *o_ptr;
- chg_virtue(V_SACRIFICE, -1);
+ chg_virtue(
p_ptr,
V_SACRIFICE, -1);
(void)combine_and_reorder_home(cur_store_num);
(void)combine_and_reorder_home(cur_store_num);
@@
-3092,7
+3121,7
@@
static int home_carry(object_type *o_ptr)
/*!
* @brief 店舗にオブジェクトを加える /
/*!
* @brief 店舗にオブジェクトを加える /
- * Add the item "o_ptr" to a real stores
inventory
.
+ * Add the item "o_ptr" to a real stores
p_ptr->inventory_list
.
* @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
* @return 収めた先のID
* @details
* @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
* @return 収めた先のID
* @details
@@
-3105,8
+3134,8
@@
static int home_carry(object_type *o_ptr)
*/
static int store_carry(object_type *o_ptr)
{
*/
static int store_carry(object_type *o_ptr)
{
- int
i, slot;
-
s32b
value, j_value;
+ int i, slot;
+
PRICE
value, j_value;
object_type *j_ptr;
object_type *j_ptr;
@@
-3197,7
+3226,7
@@
static int store_carry(object_type *o_ptr)
/*!
* @brief 店舗のオブジェクト数を増やす /
/*!
* @brief 店舗のオブジェクト数を増やす /
- * Add the item "o_ptr" to a real stores
inventory
.
+ * Add the item "o_ptr" to a real stores
p_ptr->inventory_list
.
* @param item 増やしたいアイテムのID
* @param num 増やしたい数
* @return なし
* @param item 増やしたいアイテムのID
* @param num 増やしたい数
* @return なし
@@
-3271,7
+3300,7
@@
static void store_item_optimize(INVENTORY_IDX item)
*/
static bool black_market_crap(object_type *o_ptr)
{
*/
static bool black_market_crap(object_type *o_ptr)
{
- int
i, j;
+ int i, j;
/* Ego items are never crap */
if (object_is_ego(o_ptr)) return (FALSE);
/* Ego items are never crap */
if (object_is_ego(o_ptr)) return (FALSE);
@@
-3363,11
+3392,9
@@
static void store_create(void)
object_type forge;
object_type *q_ptr;
object_type forge;
object_type *q_ptr;
-
/* Paranoia -- no room left */
if (st_ptr->stock_num >= st_ptr->stock_size) return;
/* Paranoia -- no room left */
if (st_ptr->stock_num >= st_ptr->stock_size) return;
-
/* Hack -- consider up to four items */
for (tries = 0; tries < 4; tries++)
{
/* Hack -- consider up to four items */
for (tries = 0; tries < 4; tries++)
{
@@
-3378,7
+3405,7
@@
static void store_create(void)
level = 25 + randint0(25);
/* Random item (usually of given level) */
level = 25 + randint0(25);
/* Random item (usually of given level) */
- i = get_obj_num(level);
+ i = get_obj_num(level
, 0x00000000
);
/* Handle failure */
if (!i) continue;
/* Handle failure */
if (!i) continue;
@@
-3463,8
+3490,8
@@
static void store_create(void)
*/
static bool noneedtobargain(PRICE minprice)
{
*/
static bool noneedtobargain(PRICE minprice)
{
-
s32b
good = st_ptr->good_buy;
-
s32b
bad = st_ptr->bad_buy;
+
PRICE
good = st_ptr->good_buy;
+
PRICE
bad = st_ptr->bad_buy;
/* Cheap items are "boring" */
if (minprice < 10L) return (TRUE);
/* Cheap items are "boring" */
if (minprice < 10L) return (TRUE);
@@
-3526,12
+3553,12
@@
static void updatebargain(PRICE price, PRICE minprice, int num)
*/
static void display_entry(int pos)
{
*/
static void display_entry(int pos)
{
- int
i, cur_col;
+ int i, cur_col;
object_type *o_ptr;
object_type *o_ptr;
- s32b
x;
+ s32b x;
GAME_TEXT o_name[MAX_NLEN];
GAME_TEXT o_name[MAX_NLEN];
- char
out_val[160];
+ char out_val[160];
int maxwid = 75;
int maxwid = 75;
@@
-3621,11
+3648,10
@@
static void display_entry(int pos)
/* Actually draw the price (not fixed) */
#ifdef JP
/* Actually draw the price (not fixed) */
#ifdef JP
-(void)sprintf(out_val, "%9ld固", (long)x);
+
(void)sprintf(out_val, "%9ld固", (long)x);
#else
(void)sprintf(out_val, "%9ld F", (long)x);
#endif
#else
(void)sprintf(out_val, "%9ld F", (long)x);
#endif
-
put_str(out_val, i+6, 68);
}
put_str(out_val, i+6, 68);
}
@@
-3659,7
+3685,7
@@
static void display_entry(int pos)
/*!
* @brief 店の商品リストを表示する /
/*!
* @brief 店の商品リストを表示する /
- * Displays a store's
inventory
-RAK-
+ * Displays a store's
p_ptr->inventory_list
-RAK-
* @return なし
* @details
* All prices are listed as "per individual object". -BEN-
* @return なし
* @details
* All prices are listed as "per individual object". -BEN-
@@
-3805,7
+3831,7
@@
static void display_store(void)
/* Display the current gold */
store_prt_gold();
/* Display the current gold */
store_prt_gold();
- /* Draw in the
inventory
*/
+ /* Draw in the
p_ptr->inventory_list
*/
display_inventory();
}
display_inventory();
}
@@
-3836,8
+3862,6
@@
static int get_stock(COMMAND_CODE *com_val, concptr pmt, int i, int j)
return (TRUE);
}
}
return (TRUE);
}
}
-
- /* Paranoia */
msg_print(NULL);
/* Assume failure */
msg_print(NULL);
/* Assume failure */
@@
-3916,7
+3940,7
@@
static int increase_insults(void)
st_ptr->bad_buy = 0;
/* Open tomorrow */
st_ptr->bad_buy = 0;
/* Open tomorrow */
- st_ptr->store_open = turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
+ st_ptr->store_open =
current_world_ptr->game_
turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
/* Closed */
return (TRUE);
/* Closed */
return (TRUE);
@@
-3979,10
+4003,10
@@
static s32b last_inc = 0L;
*/
static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
{
*/
static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
{
- s32b
i;
- concptr
p;
-
char
buf[128];
-
char
out_val[160];
+ s32b i;
+ concptr p;
+
GAME_TEXT
buf[128];
+
GAME_TEXT
out_val[160];
/* Clear old increment if necessary */
if (!allow_inc) last_inc = 0L;
/* Clear old increment if necessary */
if (!allow_inc) last_inc = 0L;
@@
-4010,8
+4034,6
@@
static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
{
sprintf(buf, "%s ", pmt);
}
{
sprintf(buf, "%s ", pmt);
}
-
- /* Paranoia */
msg_print(NULL);
/* Ask until done */
msg_print(NULL);
/* Ask until done */
@@
-4325,18
+4347,12
@@
static bool sell_haggle(object_type *o_ptr, s32b *price)
int flag, loop_flag, noneed;
int annoyed = 0, final = FALSE;
bool cancel = FALSE;
int flag, loop_flag, noneed;
int annoyed = 0, final = FALSE;
bool cancel = FALSE;
-#ifdef JP
- concptr pmt = "提示金額";
-#else
- concptr pmt = "Offer";
-#endif
+ concptr pmt = _("提示金額", "Offer");
char out_val[160];
char out_val[160];
-
*price = 0;
*price = 0;
-
/* Obtain the starting offer and the final offer */
cur_ask = price_item(o_ptr, ot_ptr->max_inflate, TRUE);
final_ask = price_item(o_ptr, ot_ptr->min_inflate, TRUE);
/* Obtain the starting offer and the final offer */
cur_ask = price_item(o_ptr, ot_ptr->max_inflate, TRUE);
final_ask = price_item(o_ptr, ot_ptr->min_inflate, TRUE);
@@
-4359,12
+4375,7
@@
static bool sell_haggle(object_type *o_ptr, s32b *price)
/* No reason to haggle */
if (final_ask >= purse)
{
/* No reason to haggle */
if (final_ask >= purse)
{
-#ifdef JP
- msg_print("即座にこの金額にまとまった。");
-#else
- msg_print("You instantly agree upon the price.");
-#endif
-
+ msg_print(_("即座にこの金額にまとまった。", "You instantly agree upon the price."));
msg_print(NULL);
/* Offer full purse */
msg_print(NULL);
/* Offer full purse */
@@
-4374,12
+4385,7
@@
static bool sell_haggle(object_type *o_ptr, s32b *price)
/* No need to haggle */
else if (noneed)
{
/* No need to haggle */
else if (noneed)
{
-#ifdef JP
- msg_print("結局この金額にまとまった。");
-#else
- msg_print("You eventually agree upon the price.");
-#endif
-
+ msg_print(_("結局この金額にまとまった。", "You eventually agree upon the price."));
msg_print(NULL);
}
msg_print(NULL);
}
@@
-4387,12
+4393,7
@@
static bool sell_haggle(object_type *o_ptr, s32b *price)
else
{
/* Message summary */
else
{
/* Message summary */
-#ifdef JP
- msg_print("すんなりとこの金額にまとまった。");
-#else
- msg_print("You quickly agree upon the price.");
-#endif
-
+ msg_print(_("すんなりとこの金額にまとまった。", "You quickly agree upon the price."));
msg_print(NULL);
}
msg_print(NULL);
}
@@
-4401,12
+4402,7
@@
static bool sell_haggle(object_type *o_ptr, s32b *price)
/* Final offer */
final = TRUE;
/* Final offer */
final = TRUE;
-#ifdef JP
- pmt = "最終提示金額";
-#else
- pmt = "Final Offer";
-#endif
-
+ pmt = _("最終提示金額", "Final Offer");
}
/* Haggle for the whole pile */
}
/* Haggle for the whole pile */
@@
-4439,12
+4435,7
@@
static bool sell_haggle(object_type *o_ptr, s32b *price)
(void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
put_str(out_val, 1, 0);
(void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
put_str(out_val, 1, 0);
-#ifdef JP
- cancel = receive_offer("提示する価格? ",
-#else
- cancel = receive_offer("What price do you ask? ",
-#endif
-
+ cancel = receive_offer(_("提示する価格? ", "What price do you ask? "),
&offer, last_offer, -1, cur_ask, final);
if (cancel)
&offer, last_offer, -1, cur_ask, final);
if (cancel)
@@
-4497,11
+4488,7
@@
static bool sell_haggle(object_type *o_ptr, s32b *price)
{
cur_ask = final_ask;
final = TRUE;
{
cur_ask = final_ask;
final = TRUE;
-#ifdef JP
- pmt = "最終提示金額";
-#else
- pmt = "Final Offer";
-#endif
+ pmt = _("最終提示金額", "Final Offer");
annoyed++;
if (annoyed > 3)
annoyed++;
if (annoyed > 3)
@@
-4526,12
+4513,7
@@
static bool sell_haggle(object_type *o_ptr, s32b *price)
allow_inc = TRUE;
prt("", 1, 0);
(void)sprintf(out_val,
allow_inc = TRUE;
prt("", 1, 0);
(void)sprintf(out_val,
-#ifdef JP
- "前回の提示価格 $%ld", (long)last_offer);
-#else
- "Your last bid %ld", (long)last_offer);
-#endif
-
+ _("前回の提示価格 $%ld", "Your last bid %ld"), (long)last_offer);
put_str(out_val, 1, 39);
say_comment_3(cur_ask, annoyed);
}
put_str(out_val, 1, 39);
say_comment_3(cur_ask, annoyed);
}
@@
-4572,11
+4554,7
@@
static void store_purchase(void)
if (cur_store_num == STORE_MUSEUM)
{
if (cur_store_num == STORE_MUSEUM)
{
-#ifdef JP
- msg_print("博物館から取り出すことはできません。");
-#else
- msg_print("Museum.");
-#endif
+ msg_print(_("博物館から取り出すことはできません。", "Museum."));
return;
}
return;
}
@@
-4584,23
+4562,12
@@
static void store_purchase(void)
if (st_ptr->stock_num <= 0)
{
if (cur_store_num == STORE_HOME)
if (st_ptr->stock_num <= 0)
{
if (cur_store_num == STORE_HOME)
-#ifdef JP
- msg_print("我が家には何も置いてありません。");
-#else
- msg_print("Your home is empty.");
-#endif
-
+ msg_print(_("我が家には何も置いてありません。", "Your home is empty."));
else
else
-#ifdef JP
- msg_print("現在商品の在庫を切らしています。");
-#else
- msg_print("I am currently out of stock.");
-#endif
-
+ msg_print(_("現在商品の在庫を切らしています。", "I am currently out of stock."));
return;
}
return;
}
-
/* Find the number of objects on this and following pages */
i = (st_ptr->stock_num - store_top);
/* Find the number of objects on this and following pages */
i = (st_ptr->stock_num - store_top);
@@
-4677,11
+4644,7
@@
static void store_purchase(void)
{
msg_format(_("一つにつき $%ldです。", "That costs %ld gold per item."), (long)(best));
}
{
msg_format(_("一つにつき $%ldです。", "That costs %ld gold per item."), (long)(best));
}
-
- /* Get a quantity */
amt = get_quantity(NULL, o_ptr->number);
amt = get_quantity(NULL, o_ptr->number);
-
- /* Allow user abort */
if (amt <= 0) return;
}
j_ptr = &forge;
if (amt <= 0) return;
}
j_ptr = &forge;
@@
-4730,7
+4693,7
@@
static void store_purchase(void)
choice = purchase_haggle(j_ptr, &price);
/* Hack -- Got kicked out */
choice = purchase_haggle(j_ptr, &price);
/* Hack -- Got kicked out */
- if (st_ptr->store_open >= turn) return;
+ if (st_ptr->store_open >=
current_world_ptr->game_
turn) return;
}
/* Player wants it */
}
/* Player wants it */
@@
-4746,9
+4709,9
@@
static void store_purchase(void)
say_comment_1();
if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
say_comment_1();
if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
- chg_virtue(V_JUSTICE, -1);
+ chg_virtue(
p_ptr,
V_JUSTICE, -1);
if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
- chg_virtue(V_NATURE, -1);
+ chg_virtue(
p_ptr,
V_NATURE, -1);
/* Make a sound */
sound(SOUND_BUY);
/* Make a sound */
sound(SOUND_BUY);
@@
-4774,12
+4737,12
@@
static void store_purchase(void)
msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price);
strcpy(record_o_name, o_name);
msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price);
strcpy(record_o_name, o_name);
- record_turn = turn;
+ record_turn =
current_world_ptr->game_
turn;
- if (record_buy)
do_cmd_write_nikki(
NIKKI_BUY, 0, o_name);
+ if (record_buy)
exe_write_diary(p_ptr,
NIKKI_BUY, 0, o_name);
object_desc(o_name, o_ptr, OD_NAME_ONLY);
if(record_rand_art && o_ptr->art_name)
object_desc(o_name, o_ptr, OD_NAME_ONLY);
if(record_rand_art && o_ptr->art_name)
-
do_cmd_write_nikki(
NIKKI_ART, 0, o_name);
+
exe_write_diary(p_ptr,
NIKKI_ART, 0, o_name);
/* Erase the inscription */
j_ptr->inscription = 0;
/* Erase the inscription */
j_ptr->inscription = 0;
@@
-4791,7
+4754,7
@@
static void store_purchase(void)
item_new = inven_carry(j_ptr);
/* Describe the final result */
item_new = inven_carry(j_ptr);
/* Describe the final result */
- object_desc(o_name, &
inventory
[item_new], 0);
+ object_desc(o_name, &
p_ptr->inventory_list
[item_new], 0);
msg_format(_("%s(%c)を手に入れた。", "You have %s (%c)."), o_name, index_to_label(item_new));
/* Auto-inscription */
msg_format(_("%s(%c)を手に入れた。", "You have %s (%c)."), o_name, index_to_label(item_new));
/* Auto-inscription */
@@
-4838,7
+4801,7
@@
static void store_purchase(void)
msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock."));
}
msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock."));
}
- /* New
inventory
*/
+ /* New
p_ptr->inventory_list
*/
for (i = 0; i < 10; i++)
{
/* Maintain the store */
for (i = 0; i < 10; i++)
{
/* Maintain the store */
@@
-4887,7
+4850,7
@@
static void store_purchase(void)
item_new = inven_carry(j_ptr);
/* Describe just the result */
item_new = inven_carry(j_ptr);
/* Describe just the result */
- object_desc(o_name, &
inventory
[item_new], 0);
+ object_desc(o_name, &
p_ptr->inventory_list
[item_new], 0);
msg_format(_("%s(%c)を取った。", "You have %s (%c)."), o_name, index_to_label(item_new));
handle_stuff();
msg_format(_("%s(%c)を取った。", "You have %s (%c)."), o_name, index_to_label(item_new));
handle_stuff();
@@
-4920,7
+4883,7
@@
static void store_purchase(void)
else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
display_inventory();
else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
display_inventory();
- chg_virtue(V_SACRIFICE, 1);
+ chg_virtue(
p_ptr,
V_SACRIFICE, 1);
}
}
}
}
@@
-4945,7
+4908,6
@@
static void store_sell(void)
object_type forge;
object_type *q_ptr;
object_type forge;
object_type *q_ptr;
-
object_type *o_ptr;
concptr q, s;
object_type *o_ptr;
concptr q, s;
@@
-4980,7
+4942,7
@@
static void store_sell(void)
s = _("欲しい物がないですねえ。", "You have nothing that I want.");
}
s = _("欲しい物がないですねえ。", "You have nothing that I want.");
}
- o_ptr = choose_object(
&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT)
);
+ o_ptr = choose_object(
p_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0
);
if (!o_ptr) return;
/* Hack -- Cannot remove cursed items */
if (!o_ptr) return;
/* Hack -- Cannot remove cursed items */
@@
-4993,13
+4955,9
@@
static void store_sell(void)
/* Assume one item */
amt = 1;
/* Assume one item */
amt = 1;
- /* Find out how many the player wants (letter means "all") */
if (o_ptr->number > 1)
{
if (o_ptr->number > 1)
{
- /* Get a quantity */
amt = get_quantity(NULL, o_ptr->number);
amt = get_quantity(NULL, o_ptr->number);
-
- /* Allow user abort */
if (amt <= 0) return;
}
q_ptr = &forge;
if (amt <= 0) return;
}
q_ptr = &forge;
@@
-5057,7
+5015,7
@@
static void store_sell(void)
choice = sell_haggle(q_ptr, &price);
/* Kicked out */
choice = sell_haggle(q_ptr, &price);
/* Kicked out */
- if (st_ptr->store_open >= turn) return;
+ if (st_ptr->store_open >=
current_world_ptr->game_
turn) return;
/* Sold... */
if (choice == 0)
/* Sold... */
if (choice == 0)
@@
-5070,10
+5028,10
@@
static void store_sell(void)
/* Be happy */
if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
/* Be happy */
if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
- chg_virtue(V_JUSTICE, -1);
+ chg_virtue(
p_ptr,
V_JUSTICE, -1);
if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
- chg_virtue(V_NATURE, 1);
+ chg_virtue(
p_ptr,
V_NATURE, 1);
decrease_insults();
/* Get some money */
decrease_insults();
/* Get some money */
@@
-5115,7
+5073,7
@@
static void store_sell(void)
/* Describe the result (in message buffer) */
msg_format(_("%sを $%ldで売却しました。", "You sold %s for %ld gold."), o_name, (long)price);
/* Describe the result (in message buffer) */
msg_format(_("%sを $%ldで売却しました。", "You sold %s for %ld gold."), o_name, (long)price);
- if (record_sell)
do_cmd_write_nikki(
NIKKI_SELL, 0, o_name);
+ if (record_sell)
exe_write_diary(p_ptr,
NIKKI_SELL, 0, o_name);
if (!((o_ptr->tval == TV_FIGURINE) && (value > 0)))
{
if (!((o_ptr->tval == TV_FIGURINE) && (value > 0)))
{
@@
-5180,7
+5138,7
@@
static void store_sell(void)
msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
choice = 0;
msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
choice = 0;
- /* Take it from the players
inventory
*/
+ /* Take it from the players
p_ptr->inventory_list
*/
inven_item_increase(item, -amt);
inven_item_describe(item);
inven_item_optimize(item);
inven_item_increase(item, -amt);
inven_item_describe(item);
inven_item_optimize(item);
@@
-5205,7
+5163,7
@@
static void store_sell(void)
choice = 0;
choice = 0;
- /* Take it from the players
inventory
*/
+ /* Take it from the players
p_ptr->inventory_list
*/
inven_item_increase(item, -amt);
inven_item_describe(item);
inven_item_optimize(item);
inven_item_increase(item, -amt);
inven_item_describe(item);
inven_item_optimize(item);
@@
-5224,8
+5182,8
@@
static void store_sell(void)
if ((choice == 0) && (item >= INVEN_RARM))
{
if ((choice == 0) && (item >= INVEN_RARM))
{
- calc_android_exp();
-
kamaenaoshi(
item);
+ calc_android_exp(
p_ptr
);
+
verify_equip_slot(p_ptr,
item);
}
}
}
}
@@
-5364,6
+5322,7
@@
static bool leave_store = FALSE;
/*!
* @brief 店舗処理コマンド選択のメインルーチン /
* Process a command in a store
/*!
* @brief 店舗処理コマンド選択のメインルーチン /
* Process a command in a store
+ * @param client_ptr 顧客となるクリーチャーの参照ポインタ
* @return なし
* @note
* <pre>
* @return なし
* @note
* <pre>
@@
-5373,7
+5332,7
@@
static bool leave_store = FALSE;
* but not in the stores, to prevent chaos.
* </pre>
*/
* but not in the stores, to prevent chaos.
* </pre>
*/
-static void store_process_command(
void
)
+static void store_process_command(
player_type *client_ptr
)
{
/* Handle repeating the last command */
repeat_check();
{
/* Handle repeating the last command */
repeat_check();
@@
-5398,7
+5357,7
@@
static void store_process_command(void)
case '-':
{
if (st_ptr->stock_num <= store_bottom) {
case '-':
{
if (st_ptr->stock_num <= store_bottom) {
- msg_print(_("これで全部です。", "Entire
inventory
is shown."));
+ msg_print(_("これで全部です。", "Entire
client_ptr->inventory_list
is shown."));
}
else{
store_top -= store_bottom;
}
else{
store_top -= store_bottom;
@@
-5416,7
+5375,7
@@
static void store_process_command(void)
{
if (st_ptr->stock_num <= store_bottom)
{
{
if (st_ptr->stock_num <= store_bottom)
{
- msg_print(_("これで全部です。", "Entire
inventory
is shown."));
+ msg_print(_("これで全部です。", "Entire
client_ptr->inventory_list
is shown."));
}
else
{
}
else
{
@@
-5446,7
+5405,7
@@
static void store_process_command(void)
case KTRL('R'):
{
case KTRL('R'):
{
- do_cmd_redraw();
+ do_cmd_redraw(
client_ptr
);
display_store();
break;
}
display_store();
break;
}
@@
-5483,35
+5442,35
@@
static void store_process_command(void)
/* Wear/wield equipment */
case 'w':
{
/* Wear/wield equipment */
case 'w':
{
- do_cmd_wield();
+ do_cmd_wield(
client_ptr
);
break;
}
/* Take off equipment */
case 't':
{
break;
}
/* Take off equipment */
case 't':
{
- do_cmd_takeoff();
+ do_cmd_takeoff(
client_ptr
);
break;
}
/* Destroy an item */
case 'k':
{
break;
}
/* Destroy an item */
case 'k':
{
- do_cmd_destroy();
+ do_cmd_destroy(
client_ptr
);
break;
}
/* Equipment list */
case 'e':
{
break;
}
/* Equipment list */
case 'e':
{
- do_cmd_equip();
+ do_cmd_equip(
client_ptr
);
break;
}
/* Inventory list */
case 'i':
{
break;
}
/* Inventory list */
case 'i':
{
- do_cmd_inven();
+ do_cmd_inven(
client_ptr
);
break;
}
break;
}
@@
-5521,14
+5480,13
@@
static void store_process_command(void)
/* Identify an object */
case 'I':
{
/* Identify an object */
case 'I':
{
- do_cmd_observe();
+ do_cmd_observe(
client_ptr
);
break;
}
break;
}
- /* Hack -- toggle windows */
case KTRL('I'):
{
case KTRL('I'):
{
- toggle_inven_equip();
+ toggle_inven_equip(
client_ptr
);
break;
}
break;
}
@@
-5537,32
+5495,32
@@
static void store_process_command(void)
/* Browse a book */
case 'b':
{
/* Browse a book */
case 'b':
{
- if ( (
p
_ptr->pclass == CLASS_MINDCRAFTER) ||
- (
p
_ptr->pclass == CLASS_BERSERKER) ||
- (
p
_ptr->pclass == CLASS_NINJA) ||
- (
p
_ptr->pclass == CLASS_MIRROR_MASTER)
+ if ( (
client
_ptr->pclass == CLASS_MINDCRAFTER) ||
+ (
client
_ptr->pclass == CLASS_BERSERKER) ||
+ (
client
_ptr->pclass == CLASS_NINJA) ||
+ (
client
_ptr->pclass == CLASS_MIRROR_MASTER)
) do_cmd_mind_browse();
) do_cmd_mind_browse();
- else if (
p
_ptr->pclass == CLASS_SMITH)
- do_cmd_kaji(TRUE);
- else if (
p
_ptr->pclass == CLASS_MAGIC_EATER)
- do_cmd_magic_eater(TRUE, FALSE);
- else if (
p
_ptr->pclass == CLASS_SNIPER)
- do_cmd_snipe_browse();
- else do_cmd_browse();
+ else if (
client
_ptr->pclass == CLASS_SMITH)
+ do_cmd_kaji(
client_ptr,
TRUE);
+ else if (
client
_ptr->pclass == CLASS_MAGIC_EATER)
+ do_cmd_magic_eater(
client_ptr,
TRUE, FALSE);
+ else if (
client
_ptr->pclass == CLASS_SNIPER)
+ do_cmd_snipe_browse(
client_ptr
);
+ else do_cmd_browse(
client_ptr
);
break;
}
/* Inscribe an object */
case '{':
{
break;
}
/* Inscribe an object */
case '{':
{
- do_cmd_inscribe();
+ do_cmd_inscribe(
client_ptr
);
break;
}
/* Uninscribe an object */
case '}':
{
break;
}
/* Uninscribe an object */
case '}':
{
- do_cmd_uninscribe();
+ do_cmd_uninscribe(
client_ptr
);
break;
}
break;
}
@@
-5587,9
+5545,9
@@
static void store_process_command(void)
/* Character description */
case 'C':
{
/* Character description */
case 'C':
{
-
p
_ptr->town_num = old_town_num;
- do_cmd_
change_name(
);
-
p
_ptr->town_num = inner_town_num;
+
client
_ptr->town_num = old_town_num;
+ do_cmd_
player_status(client_ptr
);
+
client
_ptr->town_num = inner_town_num;
display_store();
break;
}
display_store();
break;
}
@@
-5607,36
+5565,36
@@
static void store_process_command(void)
/* Single line from a pref file */
case '"':
{
/* Single line from a pref file */
case '"':
{
-
p
_ptr->town_num = old_town_num;
+
client
_ptr->town_num = old_town_num;
do_cmd_pref();
do_cmd_pref();
-
p
_ptr->town_num = inner_town_num;
+
client
_ptr->town_num = inner_town_num;
break;
}
/* Interact with macros */
case '@':
{
break;
}
/* Interact with macros */
case '@':
{
-
p
_ptr->town_num = old_town_num;
- do_cmd_macros();
-
p
_ptr->town_num = inner_town_num;
+
client
_ptr->town_num = old_town_num;
+ do_cmd_macros(
client_ptr
);
+
client
_ptr->town_num = inner_town_num;
break;
}
/* Interact with visuals */
case '%':
{
break;
}
/* Interact with visuals */
case '%':
{
-
p
_ptr->town_num = old_town_num;
- do_cmd_visuals();
-
p
_ptr->town_num = inner_town_num;
+
client
_ptr->town_num = old_town_num;
+ do_cmd_visuals(
client_ptr
);
+
client
_ptr->town_num = inner_town_num;
break;
}
/* Interact with colors */
case '&':
{
break;
}
/* Interact with colors */
case '&':
{
-
p
_ptr->town_num = old_town_num;
- do_cmd_colors();
-
p
_ptr->town_num = inner_town_num;
+
client
_ptr->town_num = old_town_num;
+ do_cmd_colors(
client_ptr
);
+
client
_ptr->town_num = inner_town_num;
break;
}
break;
}
@@
-5645,7
+5603,7
@@
static void store_process_command(void)
{
do_cmd_options();
(void)combine_and_reorder_home(STORE_HOME);
{
do_cmd_options();
(void)combine_and_reorder_home(STORE_HOME);
- do_cmd_redraw();
+ do_cmd_redraw(
client_ptr
);
display_store();
break;
}
display_store();
break;
}
@@
-5669,7
+5627,7
@@
static void store_process_command(void)
/* Repeat level feeling */
case KTRL('F'):
{
/* Repeat level feeling */
case KTRL('F'):
{
- do_cmd_feeling();
+ do_cmd_feeling(
client_ptr
);
break;
}
break;
}
@@
-5762,7
+5720,7
@@
void do_cmd_store(void)
store_bottom = MIN_STOCK + xtra_stock;
/* Access the player grid */
store_bottom = MIN_STOCK + xtra_stock;
/* Access the player grid */
- g_ptr = &grid_array[p_ptr->y][p_ptr->x];
+ g_ptr = &
current_floor_ptr->
grid_array[p_ptr->y][p_ptr->x];
/* Verify a store */
if (!cave_have_flag_grid(g_ptr, FF_STORE))
/* Verify a store */
if (!cave_have_flag_grid(g_ptr, FF_STORE))
@@
-5776,11
+5734,11
@@
void do_cmd_store(void)
old_town_num = p_ptr->town_num;
if ((which == STORE_HOME) || (which == STORE_MUSEUM)) p_ptr->town_num = 1;
old_town_num = p_ptr->town_num;
if ((which == STORE_HOME) || (which == STORE_MUSEUM)) p_ptr->town_num = 1;
- if (dun_level) p_ptr->town_num = NO_TOWN;
+ if (
current_floor_ptr->
dun_level) p_ptr->town_num = NO_TOWN;
inner_town_num = p_ptr->town_num;
/* Hack -- Check the "locked doors" */
inner_town_num = p_ptr->town_num;
/* Hack -- Check the "locked doors" */
- if ((town_info[p_ptr->town_num].store[which].store_open >= turn) ||
+ if ((town_info[p_ptr->town_num].store[which].store_open >=
current_world_ptr->game_
turn) ||
(ironman_shops))
{
msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
(ironman_shops))
{
msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
@@
-5789,7
+5747,7
@@
void do_cmd_store(void)
}
/* Calculate the number of store maintainances since the last visit */
}
/* Calculate the number of store maintainances since the last visit */
- maintain_num = (turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
+ maintain_num = (
current_world_ptr->game_
turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
/* Maintain the store max. 10 times */
if (maintain_num > 10) maintain_num = 10;
/* Maintain the store max. 10 times */
if (maintain_num > 10) maintain_num = 10;
@@
-5801,14
+5759,14
@@
void do_cmd_store(void)
store_maint(p_ptr->town_num, which);
/* Save the visit */
store_maint(p_ptr->town_num, which);
/* Save the visit */
- town_info[p_ptr->town_num].store[which].last_visit = turn;
+ town_info[p_ptr->town_num].store[which].last_visit =
current_world_ptr->game_
turn;
}
}
- forget_lite();
+ forget_lite(
current_floor_ptr
);
forget_view();
/* Hack -- Character is in "icky" mode */
forget_view();
/* Hack -- Character is in "icky" mode */
- character_icky = TRUE;
+ c
urrent_world_ptr->c
haracter_icky = TRUE;
/* command reset */
command_arg = 0;
/* command reset */
command_arg = 0;
@@
-5843,8
+5801,6
@@
void do_cmd_store(void)
{
/* Hack -- Clear line 1 */
prt("", 1, 0);
{
/* Hack -- Clear line 1 */
prt("", 1, 0);
-
- /* Clear */
clear_from(20 + xtra_stock);
/* Basic commands */
clear_from(20 + xtra_stock);
/* Basic commands */
@@
-5899,7
+5855,7
@@
void do_cmd_store(void)
request_command(TRUE);
/* Process the command */
request_command(TRUE);
/* Process the command */
- store_process_command();
+ store_process_command(
p_ptr
);
/*
* Hack -- To redraw missiles damage and prices in store
/*
* Hack -- To redraw missiles damage and prices in store
@@
-5908,16
+5864,16
@@
void do_cmd_store(void)
need_redraw_store_inv = (p_ptr->update & PU_BONUS) ? TRUE : FALSE;
/* Hack -- Character is still in "icky" mode */
need_redraw_store_inv = (p_ptr->update & PU_BONUS) ? TRUE : FALSE;
/* Hack -- Character is still in "icky" mode */
- character_icky = TRUE;
+ c
urrent_world_ptr->c
haracter_icky = TRUE;
handle_stuff();
/* Pack Overflow */
handle_stuff();
/* Pack Overflow */
- if (
inventory
[INVEN_PACK].k_idx)
+ if (
p_ptr->inventory_list
[INVEN_PACK].k_idx)
{
INVENTORY_IDX item = INVEN_PACK;
{
INVENTORY_IDX item = INVEN_PACK;
- object_type *o_ptr = &
inventory
[item];
+ object_type *o_ptr = &
p_ptr->inventory_list
[item];
/* Hack -- Flee from the store */
if (cur_store_num != STORE_HOME)
/* Hack -- Flee from the store */
if (cur_store_num != STORE_HOME)
@@
-5959,7
+5915,7
@@
void do_cmd_store(void)
msg_format(_("%sが落ちた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
msg_format(_("%sが落ちた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
- /* Remove it from the players
inventory
*/
+ /* Remove it from the players
p_ptr->inventory_list
*/
inven_item_increase(item, -255);
inven_item_describe(item);
inven_item_optimize(item);
inven_item_increase(item, -255);
inven_item_describe(item);
inven_item_optimize(item);
@@
-5982,17
+5938,17
@@
void do_cmd_store(void)
if (need_redraw_store_inv) display_inventory();
/* Hack -- get kicked out of the store */
if (need_redraw_store_inv) display_inventory();
/* Hack -- get kicked out of the store */
- if (st_ptr->store_open >= turn) leave_store = TRUE;
+ if (st_ptr->store_open >=
current_world_ptr->game_
turn) leave_store = TRUE;
}
}
- select_floor_music();
+ select_floor_music(
p_ptr
);
p_ptr->town_num = old_town_num;
p_ptr->town_num = old_town_num;
- take_turn(p_ptr, 100);
;
+ take_turn(p_ptr, 100);
/* Hack -- Character is no longer in "icky" mode */
/* Hack -- Character is no longer in "icky" mode */
- character_icky = FALSE;
+ c
urrent_world_ptr->c
haracter_icky = FALSE;
/* Hack -- Cancel automatic command */
command_new = 0;
/* Hack -- Cancel automatic command */
command_new = 0;
@@
-6089,7
+6045,7
@@
void store_shuffle(int which)
/*!
* @brief 店の品揃えを変化させる /
/*!
* @brief 店の品揃えを変化させる /
- * Maintain the
inventory
at the stores.
+ * Maintain the
p_ptr->inventory_list
at the stores.
* @param town_num 町のID
* @param store_num 店舗種類のID
* @return なし
* @param town_num 町のID
* @param store_num 店舗種類のID
* @return なし