*/
#include "cmd-item/cmd-smith.h"
+#include "action/action-limited.h"
#include "autopick/autopick.h"
-#include "cmd/cmd-basic.h"
#include "core/asking-player.h"
#include "core/player-update-types.h"
#include "core/window-redrawer.h"
#else
static essence_type essence_info[] = { { TR_STR, "strength", 4, TR_STR, 20 }, { TR_INT, "intelligence", 4, TR_INT, 20 }, { TR_WIS, "wisdom", 4, TR_WIS, 20 },
{ TR_DEX, "dexterity", 4, TR_DEX, 20 }, { TR_CON, "constitution", 4, TR_CON, 20 }, { TR_CHR, "charisma", 4, TR_CHR, 20 },
- { TR_MAGIC_MASTERY, "magic mastery", 4, TR_MAGIC_MASTERY, 20 }, { TR_STEALTH, "stealth", 4, TR_STEALTH, 40 }, { TR_SEARCH, "serching", 4, TR_SEARCH, 15 },
+ { TR_MAGIC_MASTERY, "magic mastery", 4, TR_MAGIC_MASTERY, 20 }, { TR_STEALTH, "stealth", 4, TR_STEALTH, 40 }, { TR_SEARCH, "searching", 4, TR_SEARCH, 15 },
{ TR_INFRA, "infravision", 4, TR_INFRA, 15 }, { TR_TUNNEL, "digging", 4, TR_TUNNEL, 15 }, { TR_SPEED, "speed", 4, TR_SPEED, 12 },
{ TR_BLOWS, "extra attack", 1, TR_BLOWS, 20 }, { TR_CHAOTIC, "chaos brand", 1, TR_CHAOTIC, 15 }, { TR_VAMPIRIC, "vampiric brand", 1, TR_VAMPIRIC, 60 },
{ TR_IMPACT, "quake activation", 7, TR_IMPACT, 15 }, { TR_BRAND_POIS, "poison brand", 1, TR_BRAND_POIS, 20 },
{ TR_TELEPATHY, "telepathy", 6, TR_TELEPATHY, 15 }, { TR_SLOW_DIGEST, "slow digestion", 3, TR_SLOW_DIGEST, 15 },
{ TR_REGEN, "regeneration", 3, TR_REGEN, 20 }, { TR_TELEPORT, "teleport", 3, TR_TELEPORT, 25 },
- { TR_SLAY_EVIL, "slay evil", 5, TR_SLAY_EVIL, 100 }, { TR_SLAY_ANIMAL, "slay animal", 5, TR_SLAY_ANIMAL, 20 },
- { TR_KILL_ANIMAL, "kill animal", 5, TR_SLAY_ANIMAL, 60 }, { TR_KILL_EVIL, "kill evil", 0, TR_SLAY_EVIL, 60 },
+ { TR_SLAY_EVIL, "slay evil", 5, TR_SLAY_EVIL, 100 }, { TR_KILL_EVIL, "kill evil", 0, TR_SLAY_EVIL, 60 },
+ { TR_SLAY_ANIMAL, "slay animal", 5, TR_SLAY_ANIMAL, 20 }, { TR_KILL_ANIMAL, "kill animal", 5, TR_SLAY_ANIMAL, 60 },
{ TR_SLAY_UNDEAD, "slay undead", 5, TR_SLAY_UNDEAD, 20 }, { TR_KILL_UNDEAD, "kill undead", 5, TR_SLAY_UNDEAD, 60 },
{ TR_SLAY_DEMON, "slay demon", 5, TR_SLAY_DEMON, 20 }, { TR_KILL_DEMON, "kill demon", 5, TR_SLAY_DEMON, 60 },
{ TR_SLAY_ORC, "slay orc", 5, TR_SLAY_ORC, 15 }, { TR_KILL_ORC, "kill orc", 5, TR_SLAY_ORC, 60 }, { TR_SLAY_TROLL, "slay troll", 5, TR_SLAY_TROLL, 15 },
#else
-concptr essence_name[] = { "strength", "intelligen.", "wisdom", "dexterity", "constitut.", "charisma", "magic mast.", "", "stealth", "serching", "infravision",
+concptr essence_name[] = { "strength", "intelligen.", "wisdom", "dexterity", "constitut.", "charisma", "magic mast.", "", "stealth", "searching", "infravision",
"digging", "speed", "extra atk", "chaos brand", "vampiric", "slay animal", "slay evil", "slay undead", "slay demon", "slay orc", "slay troll", "slay giant",
"slay dragon", "", "", "quake", "pois. brand", "acid brand", "elec. brand", "fire brand", "cold brand", "sustain", "", "", "", "", "", "", "", "immunity",
"", "", "", "", "reflection", "free action", "hold exp", "res. acid", "res. elec.", "res. fire", "res. cold", "res. poison", "res. fear", "res. light",
"Extract essences from an item. The item become non magical.",
"Remove added essences from an equipment which was improved before. The removed essence will be ruined.",
"Add essences to an item. The improved items or artifacts cannot be reimprove.",
- "Enchant an equipment or make an equiment element-proofed. The improved items and artifacts can be enchanted too.",
+ "Enchant an item or make an item element-proofed. Improved items and artifacts can be enchanted too.",
#endif
};
byte marked;
ITEM_NUMBER number;
OBJECT_IDX next_o_idx;
- WEIGHT weight;
for (i = 0; i < sizeof(drain_value) / sizeof(int); i++)
drain_value[i] = 0;
take_turn(creature_ptr, 100);
object_flags(creature_ptr, o_ptr, old_flgs);
- if (have_flag(old_flgs, TR_KILL_DRAGON))
+ if (has_flag(old_flgs, TR_KILL_DRAGON))
add_flag(old_flgs, TR_SLAY_DRAGON);
- if (have_flag(old_flgs, TR_KILL_ANIMAL))
+ if (has_flag(old_flgs, TR_KILL_ANIMAL))
add_flag(old_flgs, TR_SLAY_ANIMAL);
- if (have_flag(old_flgs, TR_KILL_EVIL))
+ if (has_flag(old_flgs, TR_KILL_EVIL))
add_flag(old_flgs, TR_SLAY_EVIL);
- if (have_flag(old_flgs, TR_KILL_UNDEAD))
+ if (has_flag(old_flgs, TR_KILL_UNDEAD))
add_flag(old_flgs, TR_SLAY_UNDEAD);
- if (have_flag(old_flgs, TR_KILL_DEMON))
+ if (has_flag(old_flgs, TR_KILL_DEMON))
add_flag(old_flgs, TR_SLAY_DEMON);
- if (have_flag(old_flgs, TR_KILL_ORC))
+ if (has_flag(old_flgs, TR_KILL_ORC))
add_flag(old_flgs, TR_SLAY_ORC);
- if (have_flag(old_flgs, TR_KILL_TROLL))
+ if (has_flag(old_flgs, TR_KILL_TROLL))
add_flag(old_flgs, TR_SLAY_TROLL);
- if (have_flag(old_flgs, TR_KILL_GIANT))
+ if (has_flag(old_flgs, TR_KILL_GIANT))
add_flag(old_flgs, TR_SLAY_GIANT);
- if (have_flag(old_flgs, TR_KILL_HUMAN))
+ if (has_flag(old_flgs, TR_KILL_HUMAN))
add_flag(old_flgs, TR_SLAY_HUMAN);
old_to_a = o_ptr->to_a;
old_timeout = o_ptr->timeout;
if (o_ptr->curse_flags & (TRC_CURSED | TRC_HEAVY_CURSE | TRC_PERMA_CURSE))
dec--;
- if (have_flag(old_flgs, TR_ADD_L_CURSE))
+ if (has_flag(old_flgs, TR_ADD_L_CURSE))
dec--;
- if (have_flag(old_flgs, TR_ADD_H_CURSE))
+ if (has_flag(old_flgs, TR_ADD_H_CURSE))
dec--;
- if (have_flag(old_flgs, TR_AGGRAVATE))
+ if (has_flag(old_flgs, TR_AGGRAVATE))
dec--;
- if (have_flag(old_flgs, TR_NO_TELE))
+ if (has_flag(old_flgs, TR_NO_TELE))
dec--;
- if (have_flag(old_flgs, TR_DRAIN_EXP))
+ if (has_flag(old_flgs, TR_DRAIN_EXP))
dec--;
- if (have_flag(old_flgs, TR_DRAIN_HP))
+ if (has_flag(old_flgs, TR_DRAIN_HP))
dec--;
- if (have_flag(old_flgs, TR_DRAIN_MANA))
+ if (has_flag(old_flgs, TR_DRAIN_MANA))
dec--;
- if (have_flag(old_flgs, TR_CALL_ANIMAL))
+ if (has_flag(old_flgs, TR_CALL_ANIMAL))
dec--;
- if (have_flag(old_flgs, TR_CALL_DEMON))
+ if (has_flag(old_flgs, TR_CALL_DEMON))
dec--;
- if (have_flag(old_flgs, TR_CALL_DRAGON))
+ if (has_flag(old_flgs, TR_CALL_DRAGON))
dec--;
- if (have_flag(old_flgs, TR_CALL_UNDEAD))
+ if (has_flag(old_flgs, TR_CALL_UNDEAD))
dec--;
- if (have_flag(old_flgs, TR_COWARDICE))
+ if (has_flag(old_flgs, TR_COWARDICE))
dec--;
- if (have_flag(old_flgs, TR_LOW_MELEE))
+ if (has_flag(old_flgs, TR_LOW_MELEE))
dec--;
- if (have_flag(old_flgs, TR_LOW_AC))
+ if (has_flag(old_flgs, TR_LOW_AC))
dec--;
- if (have_flag(old_flgs, TR_LOW_MAGIC))
+ if (has_flag(old_flgs, TR_LOW_MAGIC))
dec--;
- if (have_flag(old_flgs, TR_FAST_DIGEST))
+ if (has_flag(old_flgs, TR_FAST_DIGEST))
dec--;
- if (have_flag(old_flgs, TR_SLOW_REGEN))
+ if (has_flag(old_flgs, TR_SLOW_REGEN))
dec--;
- if (have_flag(old_flgs, TR_TY_CURSE))
+ if (has_flag(old_flgs, TR_TY_CURSE))
dec--;
iy = o_ptr->iy;
ix = o_ptr->ix;
next_o_idx = o_ptr->next_o_idx;
marked = o_ptr->marked;
- weight = o_ptr->weight;
number = o_ptr->number;
object_prep(creature_ptr, o_ptr, o_ptr->k_idx);
o_ptr->number = number;
if (o_ptr->tval == TV_DRAG_ARMOR)
o_ptr->timeout = old_timeout;
- if (item >= 0)
- creature_ptr->total_weight += (o_ptr->weight * o_ptr->number - weight * number);
o_ptr->ident |= (IDENT_FULL_KNOWN);
object_aware(creature_ptr, o_ptr);
object_known(o_ptr);
PARAMETER_VALUE pval = 0;
if (es_ptr->add < TR_FLAG_MAX && is_pval_flag(es_ptr->add) && old_pval)
- pval = (have_flag(new_flgs, es_ptr->add)) ? old_pval - o_ptr->pval : old_pval;
+ pval = (has_flag(new_flgs, es_ptr->add)) ? old_pval - o_ptr->pval : old_pval;
- if (es_ptr->add < TR_FLAG_MAX && (!have_flag(new_flgs, es_ptr->add) || pval) && have_flag(old_flgs, es_ptr->add)) {
+ if (es_ptr->add < TR_FLAG_MAX && (!has_flag(new_flgs, es_ptr->add) || pval) && has_flag(old_flgs, es_ptr->add)) {
if (pval) {
drain_value[es_ptr->essence] += 10 * pval;
} else if (es_ptr->essence != -2) {
}
}
- if ((have_flag(old_flgs, TR_FORCE_WEAPON)) && !(have_flag(new_flgs, TR_FORCE_WEAPON))) {
+ if ((has_flag(old_flgs, TR_FORCE_WEAPON)) && !(has_flag(new_flgs, TR_FORCE_WEAPON))) {
drain_value[TR_INT] += 5;
drain_value[TR_WIS] += 5;
}
- if ((have_flag(old_flgs, TR_VORPAL)) && !(have_flag(new_flgs, TR_VORPAL))) {
+ if ((has_flag(old_flgs, TR_VORPAL)) && !(has_flag(new_flgs, TR_VORPAL))) {
drain_value[TR_BRAND_POIS] += 5;
drain_value[TR_BRAND_ACID] += 5;
drain_value[TR_BRAND_ELEC] += 5;
drain_value[TR_BRAND_FIRE] += 5;
drain_value[TR_BRAND_COLD] += 5;
}
- if ((have_flag(old_flgs, TR_DEC_MANA)) && !(have_flag(new_flgs, TR_DEC_MANA))) {
+ if ((has_flag(old_flgs, TR_DEC_MANA)) && !(has_flag(new_flgs, TR_DEC_MANA))) {
drain_value[TR_INT] += 10;
}
- if ((have_flag(old_flgs, TR_XTRA_MIGHT)) && !(have_flag(new_flgs, TR_XTRA_MIGHT))) {
+ if ((has_flag(old_flgs, TR_XTRA_MIGHT)) && !(has_flag(new_flgs, TR_XTRA_MIGHT))) {
drain_value[TR_STR] += 10;
}
- if ((have_flag(old_flgs, TR_XTRA_SHOTS)) && !(have_flag(new_flgs, TR_XTRA_SHOTS))) {
+ if ((has_flag(old_flgs, TR_XTRA_SHOTS)) && !(has_flag(new_flgs, TR_XTRA_SHOTS))) {
drain_value[TR_DEX] += 10;
}
if (old_name2 == EGO_2WEAPON) {
char tmp_val[160];
/* Prompt */
- (void)strnfmt(tmp_val, 78, _("%sを付加しますか? ", "Add the abilitiy of %s? "), essence_info[num[i]].add_name);
+ (void)strnfmt(tmp_val, 78, _("%sを付加しますか? ", "Add the ability of %s? "), essence_info[num[i]].add_name);
/* Belay that order */
if (!get_check(tmp_val))
item_tester_hook = object_is_smith;
q = _("どのアイテムのエッセンスを消去しますか?", "Remove from which item? ");
- s = _("エッセンスを付加したアイテムがありません。", "You have nothing to remove essence.");
+ s = _("エッセンスを付加したアイテムがありません。", "You have nothing with added essence to remove.");
o_ptr = choose_object(creature_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0);
if (!o_ptr)
}
o_ptr->xtra3 = 0;
object_flags(creature_ptr, o_ptr, flgs);
- if (!(have_pval_flags(flgs)))
+ if (!(has_pval_flags(flgs)))
o_ptr->pval = 0;
msg_print(_("エッセンスを取り去った。", "You removed all essence you have added."));
creature_ptr->update |= (PU_COMBINE | PU_REORDER);
int line, j;
/* Clear lines, position cursor (really should use strlen here) */
- Term_erase(14, 21, 255);
- Term_erase(14, 20, 255);
- Term_erase(14, 19, 255);
- Term_erase(14, 18, 255);
- Term_erase(14, 17, 255);
- Term_erase(14, 16, 255);
+ term_erase(14, 21, 255);
+ term_erase(14, 20, 255);
+ term_erase(14, 19, 255);
+ term_erase(14, 18, 255);
+ term_erase(14, 17, 255);
+ term_erase(14, 16, 255);
shape_buffer(kaji_tips[mode - 1], 62, temp, sizeof(temp));
for (j = 0, line = 17; temp[j]; j += (1 + strlen(&temp[j]))) {