#include "cmd-magiceat.h"
#include "store.h"
#include "avatar.h"
+#include "cmd-spell.h"
+#include "rumor.h"
+#include "player-status.h"
#define MIN_STOCK 12
/*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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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,
- 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 },
};
bool old_stack_force_notes = stack_force_notes;
bool old_stack_force_costs = stack_force_costs;
- st_ptr = &town[1].store[store_num];
+ st_ptr = &town_info[1].store[store_num];
if (store_num != STORE_HOME)
{
stack_force_notes = FALSE;
if (i == STORE_MUSEUM) continue;
/* Check every item in the store */
- for (j = 0; j < town[p_ptr->town_num].store[i].stock_num; j++)
+ for (j = 0; j < town_info[p_ptr->town_num].store[i].stock_num; j++)
{
- object_type *j_ptr = &town[p_ptr->town_num].store[i].stock[j];
+ object_type *j_ptr = &town_info[p_ptr->town_num].store[i].stock[j];
/* Duplicate item "type", assume crappy */
if (o_ptr->k_idx == j_ptr->k_idx) return (TRUE);
if (st_ptr->stock_num > store_bottom)
{
/* Show "more" reminder (after the last item) */
-#ifdef JP
- prt("-続く-", k + 6, 3);
-#else
- prt("-more-", k + 6, 3);
-#endif
-
+ prt(_("-続く-", "-more-"), k + 6, 3);
/* Indicate the "current page" */
/* Trailing spaces are to display (Page xx) and (Page x) */
-#ifdef JP
- put_str(format("(%dページ) ", store_top/store_bottom + 1), 5, 20);
-#else
- put_str(format("(Page %d) ", store_top/store_bottom + 1), 5, 20);
-#endif
-
+ put_str(format(_("(%dページ) ", "(Page %d) "), store_top/store_bottom + 1), 5, 20);
}
if (cur_store_num == STORE_HOME || cur_store_num == STORE_MUSEUM)
{
char out_val[64];
-#ifdef JP
- prt("手持ちのお金: ", 19 + xtra_stock, 53);
-#else
- prt("Gold Remaining: ", 19 + xtra_stock, 53);
-#endif
-
-
+ prt(_("手持ちのお金: ", "Gold Remaining: "), 19 + xtra_stock, 53);
sprintf(out_val, "%9ld", (long)p_ptr->au);
prt(out_val, 19 + xtra_stock, 68);
}
static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
{
s32b i;
-
concptr p;
-
char buf[128];
char out_val[160];
-
/* Clear old increment if necessary */
if (!allow_inc) last_inc = 0L;
-
/* Final offer */
if (final)
{
-#ifdef JP
- sprintf(buf, "%s [承諾] ", pmt);
-#else
- sprintf(buf, "%s [accept] ", pmt);
-#endif
-
+ sprintf(buf, _("%s [承諾] ", "%s [accept] "), pmt);
}
/* Old (negative) increment, and not final */
else if (last_inc < 0)
{
-#ifdef JP
- sprintf(buf, "%s [-$%ld] ", pmt, (long)(ABS(last_inc)));
-#else
- sprintf(buf, "%s [-%ld] ", pmt, (long)(ABS(last_inc)));
-#endif
-
+ sprintf(buf, _("%s [-$%ld] ", "%s [-%ld] "), pmt, (long)(ABS(last_inc)));
}
/* Old (positive) increment, and not final */
else if (last_inc > 0)
{
-#ifdef JP
- sprintf(buf, "%s [+$%ld] ", pmt, (long)(ABS(last_inc)));
-#else
- sprintf(buf, "%s [+%ld] ", pmt, (long)(ABS(last_inc)));
-#endif
-
+ sprintf(buf, _("%s [+$%ld] ", "%s [+%ld] "), pmt, (long)(ABS(last_inc)));
}
/* Normal haggle */
sprintf(buf, "%s ", pmt);
}
-
/* Paranoia */
msg_print(NULL);
-
/* Ask until done */
while (TRUE)
{
}
/* Warning */
-#ifdef JP
- msg_print("値がおかしいです。");
-#else
- msg_print("Invalid response.");
-#endif
-
+ msg_print(_("値がおかしいです。", "Invalid response."));
msg_print(NULL);
}
s32b min_per, max_per;
int flag, loop_flag, noneed;
int annoyed = 0, final = FALSE;
-
bool cancel = FALSE;
-
-#ifdef JP
- concptr pmt = "提示価格";
-#else
- concptr pmt = "Asking";
-#endif
-
-
char out_val[160];
-
-
*price = 0;
+ concptr pmt = _("提示価格", "Asking");
/* Extract the starting offer and the final offer */
cur_ask = price_item(o_ptr, ot_ptr->max_inflate, FALSE);
if (noneed)
{
/* Message summary */
-#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);
}
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);
/* Apply Sales Tax */
cur_ask = final_ask;
/* Go to final offer */
-#ifdef JP
- pmt = "最終提示価格";
-#else
- pmt = "Final Offer";
-#endif
-
+ pmt = _("最終提示価格", "Final Offer");
final = TRUE;
}
{
(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 do you offer? ",
-#endif
-
- &offer, last_offer, 1, cur_ask, final);
-
+ cancel = receive_offer(_("提示する金額? ", "What do you offer? "), &offer, last_offer, 1, cur_ask, final);
if (cancel)
{
flag = TRUE;
{
final = TRUE;
cur_ask = final_ask;
-#ifdef JP
- pmt = "最終提示価格";
-#else
- pmt = "Final Offer";
-#endif
-
+ pmt = _("最終提示価格", "What do you offer? ");
annoyed++;
if (annoyed > 3)
{
last_offer = offer;
allow_inc = TRUE;
prt("", 1, 0);
-#ifdef JP
-(void)sprintf(out_val, "前回の提示金額: $%ld",
-#else
- (void)sprintf(out_val, "Your last offer: %ld",
-#endif
-
- (long)last_offer);
+ (void)sprintf(out_val, _("前回の提示金額: $%ld", "Your last offer: %ld"), (long)last_offer);
put_str(out_val, 1, 39);
say_comment_2(cur_ask, annoyed);
}
inner_town_num = p_ptr->town_num;
/* Hack -- Check the "locked doors" */
- if ((town[p_ptr->town_num].store[which].store_open >= turn) ||
+ if ((town_info[p_ptr->town_num].store[which].store_open >= turn) ||
(ironman_shops))
{
msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
}
/* Calculate the number of store maintainances since the last visit */
- maintain_num = (turn - town[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
+ maintain_num = (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;
store_maint(p_ptr->town_num, which);
/* Save the visit */
- town[p_ptr->town_num].store[which].last_visit = turn;
+ town_info[p_ptr->town_num].store[which].last_visit = turn;
}
forget_lite();
cur_store_feat = c_ptr->feat;
/* Save the store and owner pointers */
- st_ptr = &town[p_ptr->town_num].store[cur_store_num];
+ st_ptr = &town_info[p_ptr->town_num].store[cur_store_num];
ot_ptr = &owners[cur_store_num][st_ptr->owner];
/* Start at the beginning */
p_ptr->town_num = old_town_num;
- /* Free turn */
- p_ptr->energy_use = 100;
-
+ take_turn(p_ptr, 100);;
/* Hack -- Character is no longer in "icky" mode */
character_icky = FALSE;
-
/* Hack -- Cancel automatic command */
command_new = 0;
cur_store_num = which;
/* Activate that store */
- st_ptr = &town[p_ptr->town_num].store[cur_store_num];
+ st_ptr = &town_info[p_ptr->town_num].store[cur_store_num];
j = st_ptr->owner;
/* Pick a new owner */
for (i = 1;i < max_towns; i++)
{
if (i == p_ptr->town_num) continue;
- if (st_ptr->owner == town[i].store[cur_store_num].owner) break;
+ if (st_ptr->owner == town_info[i].store[cur_store_num].owner) break;
}
if (i == max_towns) break;
}
if (store_num == STORE_MUSEUM) return;
/* Activate that store */
- st_ptr = &town[town_num].store[store_num];
+ st_ptr = &town_info[town_num].store[store_num];
/* Activate the owner */
ot_ptr = &owners[store_num][st_ptr->owner];
cur_store_num = store_num;
/* Activate that store */
- st_ptr = &town[town_num].store[store_num];
+ st_ptr = &town_info[town_num].store[store_num];
/* Pick an owner */
for (i = 1;i < max_towns; i++)
{
if (i == town_num) continue;
- if (st_ptr->owner == town[i].store[store_num].owner) break;
+ if (st_ptr->owner == town_info[i].store[store_num].owner) break;
}
if (i == max_towns) break;
}
/* Not in town */
if (!p_ptr->town_num) return;
- st_ptr = &town[p_ptr->town_num].store[STORE_BLACK];
+ st_ptr = &town_info[p_ptr->town_num].store[STORE_BLACK];
o_ptr->ident |= IDENT_STORE;