#include "object-enchant/smith-types.h"
#include "object-enchant/tr-types.h"
#include "object/object-flags.h"
+#include "sv-definition/sv-weapon-types.h"
#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
bool BasicSmithInfo::can_give_smith_effect_impl(const object_type *o_ptr) const
{
+ if (this->effect == SmithEffect::VORPAL) {
+ return (o_ptr->tval == TV_SWORD) && (o_ptr->sval != SV_POISON_NEEDLE);
+ }
if (this->category == SmithCategory::WEAPON_ATTR || this->category == SmithCategory::SLAYING) {
return o_ptr->is_melee_ammo();
}
make_basic_smith_info(SmithEffect::BRAND_ELEC, _("電撃", "electric brand"), SmithCategory::WEAPON_ATTR, { SmithEssence::BRAND_ELEC }, 20, { TR_BRAND_ELEC }),
make_basic_smith_info(SmithEffect::BRAND_FIRE, _("焼棄", "fire brand"), SmithCategory::WEAPON_ATTR, { SmithEssence::BRAND_FIRE }, 20, { TR_BRAND_FIRE }),
make_basic_smith_info(SmithEffect::BRAND_COLD, _("凍結", "cold brand"), SmithCategory::WEAPON_ATTR, { SmithEssence::BRAND_COLD }, 20, { TR_BRAND_COLD }),
+ make_basic_smith_info(SmithEffect::VORPAL, _("切れ味", "sharpness"), SmithCategory::WEAPON_ATTR, { SmithEssence::BRAND_ACID, SmithEssence::BRAND_ELEC, SmithEssence::BRAND_FIRE, SmithEssence::BRAND_COLD }, 10, { TR_VORPAL }),
make_basic_smith_info(SmithEffect::IM_ACID, _("酸免疫", "acid immunity"), SmithCategory::RESISTANCE, { SmithEssence::IMMUNITY }, 20, { TR_IM_ACID }),
make_basic_smith_info(SmithEffect::IM_ELEC, _("電撃免疫", "electric immunity"), SmithCategory::RESISTANCE, { SmithEssence::IMMUNITY }, 20, { TR_IM_ELEC }),