-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org

local Stats = require "engine.interface.ActorStats"
local Talents = require "engine.interface.ActorTalents"

--- Load additional artifacts
for def, e in pairs(game.state:getWorldArtifacts()) do
	importEntity(e)
	print("Importing "..e.name.." into world artifacts")
end

-- This file describes artifacts not bound to a special location, they can be found anywhere
newEntity{ base = "BASE_STAFF",
	power_source = {arcane=true},
	unique = true,
	name = "毁灭之杖（Staff of Destruction）",
	unided_name = "充满黑暗气息的法杖", image = "object/artifact/staff_of_destruction.png",
	level_range = {20, 25},
	color=colors.VIOLET,
	rarity = 170,
	desc = [[这个品相独特的法杖上刻印着毁灭符文。]],
	cost = 200,
	material_level = 3,

	require = { stat = { mag=24 }, },
	combat = {
		dam = 15,
		apr = 4,
		dammod = {mag=1.5},
		damtype = DamageType.ARCANE,
	},
	wielder = {
		combat_spellpower = 10,
		combat_spellcrit = 15,
		inc_damage={
			[DamageType.FIRE] = resolvers.mbonus(25, 8),
			[DamageType.LIGHTNING] = resolvers.mbonus(25, 8),
		},
	},
}

newEntity{ base = "BASE_STAFF",
	power_source = {arcane=true},
	unique = true,
	name = "忏悔（Penitence）",
	unided_name = "通红的法杖", image = "object/artifact/staff_penitence.png",
	level_range = {10, 18},
	color=colors.VIOLET,
	rarity = 200,
	desc = [[Shaloren密送到Angolwen，用以对抗Spellblaze之后灾难的强大法杖。]],
	cost = 200,
	material_level = 2,

	require = { stat = { mag=24 }, },
	combat = {
		dam = 10,
		apr = 4,
		dammod = {mag=1.2},
		damtype = DamageType.ARCANE,
	},
	wielder = {
		combat_spellpower = 15,
		combat_spellcrit = 10,
		resists = {
			[DamageType.BLIGHT] = 30,
		},
	},
	max_power = 60, power_regen = 1,
	use_power = { name = "治愈疾病", power = 10,
		use = function(self, who)
			local target = who
			local effs = {}
			local known = false

			-- Go through all spell effects
			for eff_id, p in pairs(target.tmp) do
				local e = target.tempeffect_def[eff_id]
				if e.subtype.disease then
					effs[#effs+1] = {"效果", eff_id}
				end
			end

			for i = 1, 3 + math.floor(who:getMag() / 10) do
				if #effs == 0 then break end
				local eff = rng.tableRemove(effs)

				if eff[1] == "效果" then
					target:removeEffect(eff[2])
					known = true
				end
			end
			game.logSeen(who, "%s 的疾病被治愈了！", who.name:capitalize())
			return {id=true, used=true}
		end
	},
}

newEntity{ base = "BASE_STAFF",
	power_source = {arcane=true},
	unique = true,
	name = "大法师Tarelion丢失的法杖(Lost Staff of Archmage Tarelion)", image = "object/artifact/staff_lost_staff_archmage_tarelion.png",
	unided_name = "闪光的法杖",
	level_range = {37, 50},
	color=colors.VIOLET,
	rarity = 250,
	desc = [[大法师Tarelion在他年轻的时候曾经环游世界。但是这个世界并不是那么美好以至于我们的大法师不得不飞速逃跑。]],
	cost = 400,
	material_level = 5,

	require = { stat = { mag=48 }, },
	combat = {
		dam = 38,
		apr = 4,
		dammod = {mag=1.5},
		damtype = DamageType.ARCANE,
	},
	wielder = {
		inc_stats = { [Stats.STAT_WIL] = 7, [Stats.STAT_MAG] = 8 },
		max_mana = 40,
		combat_spellpower = 40,
		combat_spellcrit = 25,
		inc_damage = { [DamageType.ARCANE] = 24, [DamageType.FIRE] = 24, [DamageType.COLD] = 24, [DamageType.LIGHTNING] = 24,  },
		silence_immune = 0.4,
		mana_on_crit = 12,
		talent_cd_reduction={
			[Talents.T_ICE_STORM] = 2,
			[Talents.T_FIREFLASH] = 2,
			[Talents.T_CHAIN_LIGHTNING] = 2,
		},
	},
}

newEntity{ base = "BASE_STAFF",
	power_source = {arcane=true},
	unique = true,
	name = "Bolbum的大门扣（Bolbum's Big Knocker）", image = "object/artifact/staff_bolbums_big_knocker.png",
	unided_name = "一根厚重的法杖",
	level_range = {20, 35},
	color=colors.UMBER,
	rarity = 220,
	desc = [[这是一根末端有着厚重门扣的沉重法杖。据说是炼金魔导师Bolbum在Allure时期使用的法杖。它之所以闻名于世，大部分来源于Bolbum的学生们对他的恐惧以及被它打伤脑袋的超高几率。Bolbum被7把匕首插在后背而死，那根被众人诅咒的法杖也从此消失不见。]],
	cost = 300,
	material_level = 4,

	require = { stat = { mag=38 }, },
	combat = {
		dam = 64,
		apr = 10,
		dammod = {mag=1.4},
		damtype = DamageType.PHYSICAL,
	},
	wielder = {
		combat_atk = 7,
		combat_spellpower = 12,
		combat_spellcrit = 18,
		inc_damage={
			[DamageType.PHYSICAL] = resolvers.mbonus(20, 8),
		},
		talents_types_mastery = {
			["spell/staff-combat"] = 0.2,
		}
	},
}

newEntity{ base = "BASE_RING",
	power_source = {nature=true},
	unique = true,
	name = "Vargh的救赎（Vargh Redemption）", color = colors.LIGHT_BLUE, image="object/artifact/ring_vargh_redemption.png",
	unided_name = "海蓝色的戒指",
	desc = [[这个海蓝色的戒指看上去总是水汪汪的。]],
	level_range = {10, 20},
	rarity = 150,
	cost = 500,
	material_level = 2,

	max_power = 60, power_regen = 1,
	use_power = { name = "召唤海啸", power = 60,
		use = function(self, who)
			local duration = 7
			local radius = 1
			local dam = 20
			-- Add a lasting map effect
			game.level.map:addEffect(who,
				who.x, who.y, duration,
				engine.DamageType.WAVE, {dam=dam, x=who.x, y=who.y},
				radius,
				5, nil,
				engine.Entity.new{alpha=100, display='', color_br=30, color_bg=60, color_bb=200},
				function(e)
					e.radius = e.radius + 0.4
					return true
				end,
				false
			)
			game.logSeen(who, "%s 挥舞着 %s, 在前方唤出一片汪洋", who.name:capitalize(), self:getName())
			return {id=true, used=true}
		end
	},
	wielder = {
		inc_stats = { [Stats.STAT_WIL] = 4, [Stats.STAT_CON] = 6 },
		max_mana = 20,
		max_stamina = 20,
		max_psi = 20,
		max_air = 50,
		resists = {
			[DamageType.COLD] = 25,
			[DamageType.NATURE] = 10,
		},
	},
}

newEntity{ base = "BASE_RING",
	power_source = {nature=true},
	unique = true,
	name = "亡者之戒（Ring of the Dead）", color = colors.DARK_GREY, image = "object/artifact/jewelry_ring_of_the_dead.png",
	unided_name = "黯淡的戒指",
	desc = [[这枚戒指充溢着坟墓的气息。据说佩戴者它的人会在走投无路的时候发现新的路径。]],
	level_range = {35, 42},
	rarity = 250,
	cost = 500,
	material_level = 4,

	wielder = {
		inc_stats = { [Stats.STAT_LCK] = 10, },
	},
	one_shot_life_saving = true,
}

newEntity{ base = "BASE_RING",
	power_source = {arcane=true},
	unique = true,
	name = "元素之怒（Elemental Fury）", color = colors.PURPLE, image = "object/artifact/ring_elemental_fury.png",
	unided_name = "混色戒指",
	desc = [[这枚戒指闪耀着多种不同的色彩。]],
	level_range = {15, 30},
	rarity = 200,
	cost = 200,
	material_level = 3,

	wielder = {
		inc_stats = { [Stats.STAT_MAG] = 3,[Stats.STAT_CUN] = 3, },
		inc_damage = {
			[DamageType.ARCANE]    = 12,
			[DamageType.FIRE]      = 12,
			[DamageType.COLD]      = 12,
			[DamageType.ACID]      = 12,
			[DamageType.LIGHTNING] = 12,
		},
	},
}

newEntity{ base = "BASE_AMULET",
	power_source = {arcane=true},
	unique = true,
	name = "战争回响（Spellblaze Echos）", color = colors.DARK_GREY, image = "object/artifact/amulet_spellblaze_echoes.png",
	unided_name = "深黑色的项链",
	desc = [[当你戴上这个古老的项链，似乎耳边仍回荡着第一次大战的战鼓声。]],
	level_range = {30, 39},
	rarity = 290,
	cost = 500,
	material_level = 4,

	wielder = {
		combat_armor = 6,
		combat_def = 6,
	},
	max_power = 300, power_regen = 1,
	use_power = { name = "释放充满毁灭性的战鼓声", power = 300,
		use = function(self, who)
			who:project({type="ball", range=0, selffire=false, radius=3}, who.x, who.y, engine.DamageType.DIG, 1)
			who:project({type="ball", range=0, selffire=false, radius=3}, who.x, who.y, engine.DamageType.DIG, 1)
			who:project({type="ball", range=0, selffire=false, radius=3}, who.x, who.y, engine.DamageType.DIG, 1)
			who:project({type="ball", range=0, selffire=false, radius=3}, who.x, who.y, engine.DamageType.DIG, 1)
			who:project({type="ball", range=0, selffire=false, radius=3}, who.x, who.y, engine.DamageType.PHYSICAL, 100 + who:getMag() * 2)
			game.logSeen(who, "%s 使用了 %s!", who.name:capitalize(), self:getName())
			return {id=true, used=true}
		end
	},
}

newEntity{ base = "BASE_AMULET",
	power_source = {technique=true},
	unique = true,
	name = "失重项链（Feathersteel Amulet）", color = colors.WHITE, image = "object/artifact/feathersteel_amulet.png",
	unided_name = "很轻的项链",
	desc = [[当你带着这个项链，似乎整个世界都轻飘飘的。]],
	level_range = {5, 15},
	rarity = 200,
	cost = 90,
	material_level = 2,

	wielder = {
		max_encumber = 20,
		fatigue = -20,
	},
}

newEntity{ base = "BASE_AMULET",
	power_source = {technique=true},
	unique = true,
	name = "Daneth的护颈（Daneth's Neckguard）", color = colors.STEEL_BLUE, image = "object/artifact/daneths_neckguard.png",
	unided_name = "一个沉重的钢制护颈",
	desc = [[一个厚重的钢护喉，旨在保护其穿着者颈部免受致命攻击。这个特殊的护喉是半身人General Daneth Tendermourn在pyre战争中穿戴过的，上面的各种伤痕表明其可能救过General不止一次。]],
	level_range = {20, 30},
	rarity = 300,
	cost = 300,
	encumber = 2,
	material_level = 2,
	wielder = {
		combat_armor = 10,
		fatigue = 2,
		inc_stats = {
			[Stats.STAT_STR] = 6,
			[Stats.STAT_CON] = 6,
		},
	},
	max_power = 60, power_regen = 1,
	use_talent = { id = Talents.T_JUGGERNAUT, level = 2, power = 30 },
}

newEntity{ base = "BASE_AMULET", define_as = "SET_GARKUL_TEETH",
	power_source = {technique=true},
	unique = true,
	name = "Garkul的牙齿（Garkul's Teeth）", color = colors.YELLOW, image = "object/artifact/amulet_garkuls_teeth.png",
	unided_name = "一个用牙齿串成的项链",
	desc = [[数以百计的人类牙齿被串在用多股皮革结成的绳索上，组成了这个部落项链。那些牙齿不是吞噬者Garkul自己的，而是来自于Garkul的食物。]],
	level_range = {40, 50},
	rarity = 300,
	cost = 1000,
	material_level = 4,
	wielder = {
		inc_stats = {
			[Stats.STAT_STR] = 10,
			[Stats.STAT_CON] = 6,
		},
		talents_types_mastery = {
			["technique/2hweapon-cripple"] = 0.1,
			["technique/2hweapon-offense"] = 0.1,
			["technique/warcries"] = 0.1,
			["technique/bloodthirst"] = 0.1,
		},
		combat_physresist = 18,
		combat_mentalresist = 18,
		pin_immune = 1,
	},
	max_power = 48, power_regen = 1,
	use_talent = { id = Talents.T_SHATTERING_SHOUT, level = 4, power = 10 },

	set_list = { {"define_as", "HELM_OF_GARKUL"} },
	on_set_complete = function(self, who)
		self:specialSetAdd({"wielder","die_at"}, -100)
		game.logSeen(who, "#CRIMSON#当你穿戴齐全Garkul的传家宝后，似乎有一股强大的战士之魂流过你的身体。")
	end,
	on_set_broken = function(self, who)
		game.logPlayer(who, "#CRIMSON#Garkul的战士之魂渐渐退去。")
	end,
}

newEntity{ base = "BASE_LITE",
	power_source = {nature=true},
	unique = true,
	name = "夏日之殇（Summertide Phial）", image="object/artifact/summertide_phial.png",
	unided_name = "通红的小药瓶",
	level_range = {1, 10},
	color=colors.YELLOW,
	encumber = 1,
	rarity = 100,
	desc = [[一个小水晶瓶里捕获了夏季的日光。]],
	cost = 200,

	max_power = 15, power_regen = 1,
	use_power = { name = "呼唤光亮", power = 10,
		use = function(self, who)
			who:project({type="ball", range=0, radius=20}, who.x, who.y, engine.DamageType.LITE, 100)
			game.logSeen(who, "%s 挥舞着 %s 驱散了一切阴影！", who.name:capitalize(), self:getName())
			return {id=true, used=true}
		end
	},
	wielder = {
		lite = 4,
	},
}

newEntity{ base = "BASE_LITE",
	power_source = {arcane=true},
	unique = true,
	name = "灼炎之星（Burning Star）", image = "object/artifact/jewel_gem_burning_star.png",
	unided_name = "燃烧着的宝石",
	level_range = {20, 30},
	color=colors.YELLOW,
	encumber = 1,
	rarity = 250,
	desc = [[第一个发现如何将日光捕获并注入宝石之中的人是Allure时代的一个半身人大法师。
这颗宝石是他们的工艺之大成。光芒从宝石那不断变幻着的黄色表面上放射出来。]],
	cost = 400,

	max_power = 150, power_regen = 1,
	use_power = { name = "map surroundings", power = 100,
		use = function(self, who)
			who:magicMap(20)
			game.logSeen(who, "%s 挥舞着 %s 照亮了四面八方！", who.name:capitalize(), self:getName())
			return {id=true, used=true}
		end
	},
	wielder = {
		lite = 5,
	},
}

newEntity{ base = "BASE_LITE",
	power_source = {arcane=true},
	unique = true,
	name = "Dúathedlen之心（Dúathedlen Heart）",
	unided_name = "一个暗红色的肉块", image = "object/artifact/dark_red_heart.png",
	level_range = {30, 40},
	color = colors.RED,
	encumber = 1,
	rarity = 300,
	desc = [[这颗暗红色的心脏虽然离开了它的主人，但仍在跳动着。它还会熄灭任何靠近它的光源。]],
	cost = 100,

	wielder = {
		lite = -1000,
		infravision = 7,
		resists_cap = { [DamageType.LIGHT] = 10 },
		resists = { [DamageType.LIGHT] = 30 },
	},

	max_power = 15, power_regen = 1,
	use_talent = { id = Talents.T_BLOOD_GRASP, level = 3, power = 10 },
}

newEntity{ base = "BASE_LITE",
	power_source = {nature=true, antimagic=true},
	unique = true,
	name = "指引者（Guidance）", image = "object/artifact/guidance.png",
	unided_name = "一颗发着柔和光芒的水晶",
	level_range = {38, 50},
	color = colors.YELLOW,
	encumber = 1,
	rarity = 300,
	desc = [[曾经于spellhunt中属于检察官Marcus Dunn。这个拳头大小的石英晶体不断散发出柔和的白光而且据说对冥想有相当大的帮助，不但可以帮助集中精神，身体，还有拥有者的灵魂，并且保护他们免于遭受邪恶的魔法。]],
	cost = 100,

	wielder = {
		lite = 4,
		inc_stats = { [Stats.STAT_WIL] = 6, [Stats.STAT_CUN] = 6,},
		combat_physresist = 12,
		combat_mentalresist = 12,
		combat_spellresist = 12,
		confusion_immune = 0.5,
		talents_types_mastery = { ["wild-gift/call"] = 0.2, ["wild-gift/antimagic"] = 0.1, },
		resists_cap = { [DamageType.BLIGHT] = 10, },
		resists = { [DamageType.BLIGHT] = 20, },
	},
}

newEntity{
	power_source = {nature=true},
	unique = true,
	type = "potion", subtype="potion",
	name = "生命之血（Blood of Life）",
	unided_name = "血红的药瓶",
	level_range = {1, 50},
	display = '!', color=colors.VIOLET, image="object/artifact/potion_blood_of_life.png",
	encumber = 0.4,
	rarity = 350,
	desc = [[生命之血！它可以把一个生物复活以防他英年早逝。 但是只能用一次！]],
	cost = 1000,

	use_simple = { name = "quaff the Blood of Life to grant an extra life", use = function(self, who)
		game.logSeen(who, "%s quaffs the %s!", who.name:capitalize(), self:getName())
		if not who:attr("undead") then
			who.blood_life = true
			game.logPlayer(who, "#LIGHT_RED#You feel the Blood of Life rushing through your veins.")
		else
			game.logPlayer(who, "The Blood of Life seems to have no effect on you.")
		end
		return {used=true, id=true, destroy=true}
	end},
}

newEntity{ base = "BASE_LONGBOW",
	power_source = {nature=true},
	name = "自然精灵之树长弓（Thaloren-Tree Longbow）", unided_name = "光辉的精灵木长弓", unique=true, image = "object/artifact/thaloren_tree_longbow.png",
	desc = [[在spellblaze的余波里，自然精灵不得不从敌人和大火之类的手中保卫他们的森林。尽管精灵们奋力的抢救它们，许多树还是死掉了。它们的遗体被打造成一张弓用来抵御黑暗的侵袭。]],
	level_range = {40, 50},
	rarity = 200,
	require = { stat = { dex=36 }, },
	cost = 800,
	material_level = 5,
	combat = {
		range = 10,
		physspeed = 0.7,
		apr = 12,
	},
	basic_ammo = {
		dam = 57,
		apr = 18,
		physcrit = 3,
		dammod = {dex=0.7, str=0.5},
	},
	wielder = {
		inc_damage={ [DamageType.PHYSICAL] = 12, },
		lite = 1,
		inc_stats = { [Stats.STAT_DEX] = 5, [Stats.STAT_WIL] = 4,  },
		ranged_project={[DamageType.LIGHT] = 30},
	},
}

newEntity{ base = "BASE_LONGBOW",
	power_source = {arcane=true, nature=true},
	name = "腐尸之弓（Corpsebow）", unided_name = "腐朽的长弓", unique=true, image = "object/artifact/bow_corpsebow.png",
	desc = [[一件Dusk时代遗失的武器，腐尸之弓满满缠绕着那个时代的瘟疫之精华。 那些人被腐朽弓弦射出的箭击中后发现他们被古老的疾病在体内的共鸣折磨着。]],
	level_range = {10, 20},
	rarity = 200,
	require = { stat = { dex=16 }, },
	cost = 50,
	material_level = 2,
	combat = {
		range = 7,
		physspeed = 0.8,
	},
	basic_ammo = {
		dam = 20,
		apr = 7,
		physcrit = 1.5,
		dammod = {dex=0.7, str=0.5},
	},
	wielder = {
		disease_immune = 0.5,
		ranged_project = {[DamageType.CORRUPTED_BLOOD] = 15},
	},
}

newEntity{ base = "BASE_SLING",
	power_source = {technique=true},
	unique = true,
	name = "Eldoral最后的手段（Eldoral Last Resort）", image = "object/artifact/sling_eldoral_last_resort.png",
	unided_name = "精良的投石器",
	desc = [[投石器的把手上有一段铭文：‘愿持有者于对抗黑暗之时被赐予神一般的机智'。]],
	level_range = {15, 25},
	rarity = 200,
	require = { stat = { dex=26 }, },
	cost = 350,
	material_level = 3,
	combat = {
		range = 10,
		physspeed = 0.7,
	},
	basic_ammo = {
		dam = 36,
		apr = 3,
		physcrit = 5,
		dammod = {dex=0.7, cun=0.5},
	},
	wielder = {
		inc_stats = { [Stats.STAT_DEX] = 4, [Stats.STAT_CUN] = 3,  },
		inc_damage={ [DamageType.PHYSICAL] = 15 },
		talent_cd_reduction={[Talents.T_STEADY_SHOT]=1, [Talents.T_EYE_SHOT]=2},
	},
}

newEntity{ base = "BASE_LONGSWORD",
	power_source = {arcane=true},
	unique = true,
	name = "大法师的魔刃的（Spellblade）", image = "object/artifact/weapon_spellblade.png",
	unided_name = "光辉的长剑",
	level_range = {40, 45},
	color=colors.AQUAMARINE,
	rarity = 250,
	desc = [[法师总是时不时的冒出古怪的点子。大法师Varil曾学会了怎样擎起一柄剑，同时发现自己对耍剑比玩法杖更感冒。]],
	on_id_lore = "spellblade",
	cost = 1000,

	require = { stat = { mag=28, str=28, dex=28 }, },
	material_level = 5,
	combat = {
		dam = 50,
		apr = 2,
		physcrit = 5,
		dammod = {str=1},
	},
	wielder = {
		lite = 1,
		combat_spellpower = 20,
		combat_spellcrit = 9,
		inc_damage={
			[DamageType.PHYSICAL] = 18,
			[DamageType.FIRE] = 18,
			[DamageType.LIGHT] = 18,
		},
		inc_stats = { [Stats.STAT_MAG] = 4, [Stats.STAT_STR] = 4, },
	},
}

newEntity{ base = "BASE_GREATSWORD",
	power_source = {nature=true, technique=true},
	unique = true,
	name = "种族灭绝-兽人的末日（Genocide）",
	unided_name = "漆黑的剑", image = "object/artifact/weapon_sword_genocide.png",
	level_range = {25, 35},
	color=colors.GRAY,
	rarity = 300,
	desc = [[Farian曾是Toknor国王的指挥官，在Last Hope的伟大战役中跟国王并肩作战。然而，当战争结束后他回来发现家乡正在被兽人的火焰焚烧的时候，狂怒吞噬了他。复仇的欲望使他离开军队孤身踏上了征程，身着轻甲外只带了一柄剑。大多数认为他已经死了。直到报告带回的一个毁灭性的身影正在撕裂兽人的营地，屠杀所有出现在他面前的兽人并残忍的肢解他们的尸体。据说他每天要用100个兽人的鲜血来祭刀直到最终在Maj'Eyal的兽人被彻底清洗。当最后一个兽人被杀死并且没有发现更多的时候，Farian最终把锋芒转向自己--用那把剑刺穿了他的胸膛。那些在附近目睹此事的人说当他这样做的时候身体伴随着痉挛颤抖，可是他们说不出他到底是在笑还是在哭。]],
	cost = 400,
	require = { stat = { str=40, wil=20 }, },
	material_level = 5,
	combat = {
		dam = 42,
		apr = 4,
		physcrit = 18,
		dammod = {str=1.2},
	},
	wielder = {
		stamina_regen = 1,
		life_regen = 0.5,
		inc_stats = { [Stats.STAT_STR] = 7, [Stats.STAT_DEX] = 7 },
		esp = {["humanoid/orc"]=1},
	},
}

newEntity{ base = "BASE_KNIFE",
	power_source = {technique=true},
	unique = true,
	name = "精准的解剖刀（Unerring Scalpel）", image = "object/artifact/unerring_scalpel.png",
	unided_name = "锋利的长解剖刀",
	desc = [[这把解剖刀曾经被可怕的男巫Kor'Pul在Dusk时代刚开始学习通灵术时使用。许多人,生物和尸体都成为了他那可怕实验的牺牲品。]],
	level_range = {1, 12},
	rarity = 200,
	require = { stat = { cun=16 }, },
	cost = 80,
	material_level = 3,
	combat = {
		dam = 15,
		apr = 10,
		physcrit = 0,
		dammod = {dex=0.55, str=0.45},
	},
	wielder = {combat_atk=20},
}

newEntity{ base = "BASE_LEATHER_BOOT",
	power_source = {technique=true},
	unique = true,
	name = "Eden的狡诈(Eden's Guile)", image = "object/artifact/boots_edens_guile.png",
	unided_name = "一双黄色的靴子",
	desc = [[这双靴子属于一位流浪的盗贼，他处理麻烦的方法就是躲的越快越好。]],
	on_id_lore = "eden-guile",
	color = colors.YELLOW,
	level_range = {1, 20},
	rarity = 200,
	cost = 100,
	material_level = 3,
	wielder = {
		combat_armor = 1,
		combat_def = 2,
		fatigue = 2,
		talents_types_mastery = { ["cunning/survival"] = 0.2 },
		inc_stats = { [Stats.STAT_CUN] = 3, },
	},

	max_power = 50, power_regen = 1,
	use_power = { name = "boost speed", power = 50,
		use = function(self, who)
			who:setEffect(who.EFF_SPEED, 8, {power=0.20 + who:getCun() / 80})
			return {id=true, used=true}
		end
	},
}

newEntity{ base = "BASE_SHIELD",
	power_source = {nature=true, technique=true},
	unique = true,
	name = "火龙之盾（Fire Dragon Shield）", image = "object/artifact/fire_dragon_shield.png",
	unided_name = "龙盾",
	desc = [[这个巨大的盾牌用了很多生活在Tar'Eyal失落之地的火龙的鳞片打造而成。]],
	color = colors.LIGHT_RED,
	metallic = false,
	level_range = {27, 35},
	rarity = 300,
	require = { stat = { str=28 }, },
	cost = 350,
	material_level = 5,
	special_combat = {
		dam = 58,
		physcrit = 4.5,
		dammod = {str=1},
		damtype = DamageType.FIRE,
	},
	wielder = {
		resists={[DamageType.FIRE] = 35},
		on_melee_hit={[DamageType.FIRE] = 17},
		combat_armor = 9,
		combat_def = 16,
		combat_def_ranged = 15,
		fatigue = 20,
	},
}

newEntity{ base = "BASE_SHIELD",
	power_source = {technique=true},
	unique = true,
	name = "提坦巨盾（Titanic）", image = "object/artifact/shield_titanic.png",
	unided_name = "巨型盾牌",
	desc = [[这面用最黑暗的蓝锆石打造的盾牌巨大，沉重并且相当坚固。]],
	color = colors.GREY,
	level_range = {20, 30},
	rarity = 270,
	require = { stat = { str=37 }, },
	cost = 300,
	material_level = 4,
	special_combat = {
		dam = 48,
		physcrit = 4.5,
		dammod = {str=1},
	},
	wielder = {
		combat_armor = 18,
		combat_def = 20,
		combat_def_ranged = 10,
		fatigue = 30,
		combat_armor_hardiness = 20,
	},
}

newEntity{ base = "BASE_LIGHT_ARMOR",
	power_source = {technique=true},
	unique = true,
	name = "盗贼的契约（Rogue Plight）", image = "object/artifact/armor_rogue_plight.png",
	unided_name = "破烂的轻皮护甲",
	desc = [[盗贼之刃将不能加于装备者之身。]],
	level_range = {25, 40},
	rarity = 270,
	cost = 200,
	require = { stat = { str=22 }, },
	material_level = 4,
	wielder = {
		combat_def = 6,
		combat_armor = 7,
		fatigue = 7,
		stun_immune = 0.3,
		combat_physresist = 35,
		inc_stats = { [Stats.STAT_WIL] = 5, [Stats.STAT_CON] = 4, },
		resists={[DamageType.BLIGHT] = 35},
	},
}

newEntity{
	power_source = {nature=true},
	unique = true,
	type = "misc", subtype="egg",
	unided_name = "黝黑的蛋",
	name = "Ungolë僵化的卵囊（Mummified Egg-sac of Ungolë）", image = "object/artifact/mummified_eggsack.png",
	level_range = {20, 35},
	rarity = 190,
	display = "*", color=colors.DARK_GREY,
	encumber = 2,
	not_in_stores = true,
	desc = [[摸起来又干又脏，它看起来仍旧保存着一些生命的气息。]],

	carrier = {
		lite = -2,
	},
	max_power = 100, power_regen = 1,
	use_power = { name = "summon spiders", power = 80, use = function(self, who)
		if not who:canBe("summon") then game.logPlayer(who, "You cannot summon; you are suppressed!") return end

		local NPC = require "mod.class.NPC"
		local list = NPC:loadList("/data/general/npcs/spider.lua")

		for i = 1, 2 do
			-- Find space
			local x, y = util.findFreeGrid(who.x, who.y, 5, true, {[engine.Map.ACTOR]=true})
			if not x then break end

			local e
			repeat e = rng.tableRemove(list)
			until not e.unique and e.rarity

			local spider = game.zone:finishEntity(game.level, "actor", e)
			spider.make_escort = nil
			spider.silent_levelup = true
			spider.faction = who.faction
			spider.ai = "summoned"
			spider.ai_real = "dumb_talented_simple"
			spider.summoner = who
			spider.summon_time = 10

			local setupSummon = getfenv(who:getTalentFromId(who.T_SPIDER).action).setupSummon
			setupSummon(who, spider, x, y)

			game:playSoundNear(who, "talents/slime")
		end
		return {id=true, used=true}
	end },
}

newEntity{ base = "BASE_HELM",
	power_source = {technique=true},
	unique = true,
	name = "矮人领主的头盔（Helm of the Dwarven Emperors）", image = "object/artifact/helm_of_the_dwarven_emperors.png",
	unided_name = "光辉的头盔",
	desc = [[镶嵌着一颗钻石的矮人头盔，这颗宝石的光辉可以驱散地下一切阴影。]],
	level_range = {20, 28},
	rarity = 240,
	cost = 700,
	material_level = 3,
	wielder = {
		lite = 1,
		combat_armor = 6,
		fatigue = 4,
		blind_immune = 0.3,
		confusion_immune = 0.3,
		inc_stats = { [Stats.STAT_WIL] = 3, [Stats.STAT_MAG] = 4, },
	},
	max_power = 30, power_regen = 1,
	use_talent = { id = Talents.T_SUN_FLARE, level = 3, power = 30 },
}

newEntity{ base = "BASE_KNIFE",
	power_source = {technique=true},
	unique = true,
	name = "兽人伐木机（Orc Feller）", image = "object/artifact/dagger_orc_feller.png",
	unided_name = "光辉的匕首",
	desc = [[在Eldoral战争中，据说半身人盗贼Herah在保卫一群难民的时候杀死了100多个兽人。]],
	level_range = {40, 50},
	rarity = 300,
	require = { stat = { dex=44 }, },
	cost = 550,
	material_level = 5,
	combat = {
		dam = 45,
		apr = 11,
		physcrit = 18,
		dammod = {dex=0.55,str=0.35},
	},
	wielder = {
		lite = 1,
		inc_damage={
			[DamageType.PHYSICAL] = 10,
			[DamageType.LIGHT] = 8,
		},
		pin_immune = 0.5,
		inc_stats = { [Stats.STAT_DEX] = 5, [Stats.STAT_CUN] = 4, },
		esp = {["humanoid/orc"]=1},
	},
}

newEntity{ base = "BASE_KNIFE",
	power_source = {technique=true},
	unique = true,
	name = "静寂之刃（Silent Blade）", image = "object/artifact/dagger_silent_blade.png",
	unided_name = "光辉的匕首",
	desc = [[一把飞薄，阴暗，完全融入了阴影中的匕首，。]],
	level_range = {23, 28},
	rarity = 200,
	require = { stat = { cun=25 }, },
	cost = 250,
	material_level = 3,
	combat = {
		dam = 25,
		apr = 10,
		physcrit = 8,
		dammod = {dex=0.55,str=0.35},
		no_stealth_break = true,
		melee_project={[DamageType.RANDOM_SILENCE] = 10},
	},
	wielder = {combat_atk = 10},
}

newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_MOON",
	power_source = {arcane=true},
	unique = true,
	name = "斜月（Moon）", image = "object/artifact/dagger_moon.png",
	unided_name = "新月之刃",
	desc = [[一把弧形邪恶的匕首，传说是用取自月亮的材料打造的。它吞噬了光芒，变得黯淡了。]],
	level_range = {20, 30},
	rarity = 200,
	require = { stat = { dex=24, cun=24 }, },
	cost = 300,
	material_level = 3,
	combat = {
		dam = 30,
		apr = 30,
		physcrit = 10,
		dammod = {dex=0.45,str=0.45},
		melee_project={[DamageType.DARKNESS] = 20},
	},
	wielder = {
		lite = -1,
		inc_damage={
			[DamageType.DARKNESS] = 10,
		},
	},
	set_list = { {"define_as","ART_PAIR_STAR"} },
	on_set_complete = function(self, who)
		self:specialSetAdd({"wielder","lite"}, 1)
		self:specialSetAdd({"combat","melee_project"}, {[engine.DamageType.RANDOM_CONFUSION]=3})
		self:specialSetAdd({"wielder","inc_damage"}, {[engine.DamageType.DARKNESS]=10})
		game.logSeen(who, "#ANTIQUE_WHITE#The two blades glow brightly as they are brought close together.")
	end,
	on_set_broken = function(self, who)
		game.logPlayer(who, "#ANTIQUE_WHITE#The light from the two blades fades as they are separated.")
	end,
}

newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_STAR",
	power_source = {arcane=true},
	unique = true,
	name = "晨星(Star)",
	unided_name = "锯齿之刃", image = "object/artifact/dagger_star.png",
	desc = [[传说之刃，闪耀如星。由取自陨星的材料锻造而成，它发着光。]],
	level_range = {20, 30},
	rarity = 200,
	require = { stat = { dex=24, cun=24 }, },
	cost = 300,
	material_level = 3,
	combat = {
		dam = 25,
		apr = 20,
		physcrit = 20,
		dammod = {dex=0.45,str=0.45},
		melee_project={[DamageType.LIGHT] = 20},
	},
	wielder = {
		lite = 1,
		inc_damage={
			[DamageType.LIGHT] = 10,
		},
	},
	set_list = { {"define_as","ART_PAIR_MOON"} },
	on_set_complete = function(self, who)
		self:specialSetAdd({"wielder","lite"}, 1)
		self:specialSetAdd({"combat","melee_project"}, {[engine.DamageType.RANDOM_BLIND]=3})
		self:specialSetAdd({"wielder","inc_damage"}, {[engine.DamageType.LIGHT]=10})
	end,

}

newEntity{ base = "BASE_RING",
	power_source = {technique=true},
	unique = true,
	name = "将领的戒指（Ring of the War Master）", color = colors.DARK_GREY, image = "object/artifact/ring_of_war_master.png",
	unided_name = "边缘锋利的戒指",
	desc = [[散发着能量边缘开刃的戒指。当你戴上它时，陌生的痛苦念头和毁灭的情景便闯入你的脑海。]],
	level_range = {15, 30},
	rarity = 200,
	cost = 500,
	material_level = 5,

	wielder = {
		inc_stats = { [Stats.STAT_STR] = 3, [Stats.STAT_DEX] = 3, [Stats.STAT_CON] = 3, },
		talents_types_mastery = {
			["technique/2hweapon-cripple"] = 0.3,
			["technique/2hweapon-offense"] = 0.3,
			["technique/archery-bow"] = 0.3,
			["technique/archery-sling"] = 0.3,
			["technique/archery-training"] = 0.3,
			["technique/archery-utility"] = 0.3,
			["technique/combat-techniques-active"] = 0.3,
			["technique/combat-techniques-passive"] = 0.3,
			["technique/combat-training"] = 0.3,
			["technique/dualweapon-attack"] = 0.3,
			["technique/dualweapon-training"] = 0.3,
			["technique/shield-defense"] = 0.3,
			["technique/shield-offense"] = 0.3,
			["technique/warcries"] = 0.3,
			["technique/superiority"] = 0.3,
			["technique/thuggery"] = 0.3,
		},
	},
}

newEntity{ base = "BASE_GREATMAUL",
	power_source = {technique=true, arcane=true},
	unique = true,
	name = "沃瑞钽的咆哮（Voratun Hammer of the Deep Bellow）", color = colors.LIGHT_RED, image = "object/artifact/voratun_hammer_of_the_deep_bellow.png",
	unided_name = "被火烧焦的沃瑞钽之锤",
	desc = [[矮人神匠的传奇铁锤。由于年复一年的在高温下打造强力的武器，自身也变的相当强力。]],
	level_range = {38, 50},
	rarity = 250,
	require = { stat = { str=48 }, },
	cost = 650,
	material_level = 5,
	combat = {
		dam = 82,
		apr = 7,
		physcrit = 4,
		dammod = {str=1.2},
		talent_on_hit = { [Talents.T_FLAMESHOCK] = {level=3, chance=10} },
		melee_project={[DamageType.FIRE] = 30},
	},
	wielder = {
		inc_damage={
			[DamageType.PHYSICAL] = 15,
		},
	},
}

newEntity{ base = "BASE_GREATMAUL",
	power_source = {technique=true},
	unique = true,
	name = "势不可当的大槌（Unstoppable Mauler）", color = colors.UMBER, image = "object/artifact/unstoppable_mauler.png",
	unided_name = "重槌",
	desc = [[拥有令人难以置信重量的巨型大槌。挥舞它让你感觉势不可当。]],
	level_range = {23, 30},
	rarity = 270,
	require = { stat = { str=40 }, },
	cost = 250,
	material_level = 3,
	combat = {
		dam = 48,
		apr = 15,
		physcrit = 3,
		dammod = {str=1.2},
		talent_on_hit = { [Talents.T_SUNDER_ARMOUR] = {level=3, chance=15} },
	},
	wielder = {
		combat_atk = 20,
		pin_immune = 1,
		knockback_immune = 1,
	},
}

newEntity{ base = "BASE_MACE",
	power_source = {technique=true},
	unique = true,
	name = "畸形法杖（Crooked Club）", color = colors.GREEN, image = "object/artifact/weapon_crooked_club.png",
	unided_name = "不可思议的棍子",
	desc = [[诡异扭曲的法杖，尾部异常沉重。]],
	level_range = {3, 12},
	rarity = 192,
	require = { stat = { str=20 }, },
	cost = 250,
	material_level = 2,
	combat = {
		dam = 25,
		apr = 4,
		physcrit = 10,
		dammod = {str=1},
		melee_project={[DamageType.RANDOM_CONFUSION] = 14},
	},
	wielder = {combat_atk=12,},
}

newEntity{ base = "BASE_MACE",
	power_source = {nature=true, antimagic=true},
	unique = true,
	name = "大自然的报复（Nature's Vengeance）", color = colors.BROWN, image = "object/artifact/mace_natures_vengeance.png",
	unided_name = "木质粗权杖",
	desc = [[这把加粗的权杖曾属于Spellhunter Vorlan，他从一棵在Spellblaze中被连根拔起的古老橡树取材制造了它。众多巫师和女巫倒在了这把武器脚下，他们对自然犯下的罪行得到了制裁。]],
	level_range = {20, 34},
	rarity = 340,
	require = { stat = { str=42 } },
	cost = 350,
	material_level = 4,
	combat = {
		dam = 40,
		apr = 4,
		physcrit = 9,
		dammod = {str=1},
		melee_project={[DamageType.RANDOM_SILENCE] = 10, [DamageType.NATURE] = 18},
	},
	wielder = {combat_atk=6},

	max_power = 25, power_regen = 1,
	use_talent = { id = Talents.T_RUSH, level = 3, power = 15 },
}

newEntity{ base = "BASE_CLOTH_ARMOR",
	power_source = {nature=true, arcane=true},
	unique = true,
	name = "Spydrë的蛛丝礼服（Spider-Silk Robe of Spydrë）", color = colors.DARK_GREEN, image = "object/artifact/robe_spider_silk_robe_spydre.png",
	unided_name = "蛛丝礼服",
	desc = [[这套礼服完全用蛛丝制成。它看起来充满异国风情，一些智者推测它来自另一个世界，很可能穿越了时空之门。]],
	level_range = {20, 30},
	rarity = 190,
	cost = 250,
	material_level = 3,
	wielder = {
		combat_def = 10,
		combat_armor = 10,
		inc_stats = { [Stats.STAT_CON] = 4, [Stats.STAT_WIL] = -2, },
		combat_spellresist = 10,
		combat_physresist = 10,
		resists={[DamageType.NATURE] = 30},
		on_melee_hit={[DamageType.POISON] = 20},
	},
}

newEntity{ base = "BASE_HELM",
	power_source = {technique=true},
	unique = true,
	name = "Kroltar的龙盔（Dragon-helm of Kroltar）", image = "object/artifact/dragon_helm_of_kroltar.png",
	unided_name = "龙盔",
	desc = [[一个钢铁全盔，装饰着黄金做的浮雕。Kroltar的头顶上昂立着最伟大的喷火龙作为装饰。]],
	require = { talent = { {Talents.T_ARMOUR_TRAINING,4} }, stat = { str=35 }, },
	level_range = {37, 45},
	rarity = 280,
	cost = 400,
	material_level = 5,
	wielder = {
		inc_stats = { [Stats.STAT_STR] = 5, [Stats.STAT_CON] = 5, [Stats.STAT_LCK] = -4, },
		combat_def = 5,
		combat_armor = 9,
		fatigue = 10,
	},
	max_power = 45, power_regen = 1,
	use_talent = { id = Talents.T_WARSHOUT, level = 2, power = 45 },
}

newEntity{ base = "BASE_HELM",
	power_source = {technique=true},
	unique = true,
	name = "领袖的皇冠(Crown of Command)", image = "object/artifact/crown_of_command.png",
	unided_name = "无瑕的纯银王冠",
	desc = [[半身人国王Roupar曾佩戴这顶王冠，他曾于Dusk时代统治着Nargol大陆。那是黑暗的年代，国王通过最残暴的手段执行他的命令和法律。任何偏离他的主义的人都受到了惩罚，任何反对他的人都被镇压了，这些人很多都了无痕迹的消失了——都被关进了他那不计其数的监狱里。所有人都必须表示忠诚或者付出昂贵的代价。他在没有子嗣的情况下死去（活该他绝后- -！），皇冠失踪同时他的国家陷入了混乱。]],
	require = { stat = { cun=25 } },
	level_range = {20, 35},
	rarity = 280,
	cost = 300,
	material_level = 5,
	wielder = {
		inc_stats = { [Stats.STAT_CON] = 3, [Stats.STAT_WIL] = 10, },
		combat_def = 3,
		combat_armor = 6,
		fatigue = 4,
		resists = { [DamageType.PHYSICAL] = 8},
		talents_types_mastery = { ["technique/superiority"] = 0.2, ["technique/field-control"] = 0.2 },
	},
}

newEntity{ base = "BASE_GLOVES",
	power_source = {technique=true},
	unique = true,
	name = "铁腕之手套（Gloves of the Firm Hand）", image = "object/artifact/gloves_of_the_firm_hand.png",
	unided_name = "沉重的手套",
	desc = [[这副手套让你觉得坚如磐石！这双有魔力的手套从里面摸起来感觉真的很松软。在外面，魔法石创造了一个不断转动的粗糙表面。当你振作起来，一束包含大地能量的魔法射线像是自动扎根到了地面上，赋予你更高的稳定性。]],
	level_range = {17, 27},
	rarity = 210,
	cost = 150,
	material_level = 3,
	wielder = {
		talent_cd_reduction={[Talents.T_CLINCH]=2},
		inc_stats = { [Stats.STAT_CON] = 4 },
		combat_armor = 8,
		disarm_immune=0.4,
		knockback_immune=0.3,
		combat = {
			dam = 18,
			apr = 1,
			physcrit = 7,
			physspeed = -0.4,
			dammod = {dex=0.4, str=-0.6, cun=0.4 },
		},
	},
}

newEntity{ base = "BASE_GAUNTLETS",
	power_source = {arcane=true, technique=true},
	unique = true,
	name = "Dakhtun的臂铠（Dakhtun's Gauntlets）", color = colors.STEEL_BLUE, image = "object/artifact/dakhtuns_gauntlets.png",
	unided_name = "精工打造之矮人钢护手",
	desc = [[Allure时代由大师铁匠打造而成。那些矮人钢臂铠镂刻着晦涩难懂的金色符文，据说可以赋予穿戴者无比的物理和魔法力量。]],
	level_range = {40, 50},
	rarity = 300,
	cost = 2000,
	material_level = 3,
	wielder = {
		inc_stats = { [Stats.STAT_STR] = 6, [Stats.STAT_MAG] = 6 },
		inc_damage = { [DamageType.PHYSICAL] = 10 },
		combat_physcrit = 10,
		combat_spellcrit = 10,
		combat_critical_power = 50,
		combat_armor = 6,
		combat = {
			dam = 35,
			apr = 10,
			physcrit = 10,
			physspeed = -0.2,
			dammod = {dex=0.4, str=-0.6, cun=0.4 },
			melee_project={[DamageType.ARCANE] = 20},
			damrange = 0.3,
		},
	},
}

newEntity{ base = "BASE_GLOVES",
	power_source = {nature=true},
	unique = true,
	name = "冰霜巨人护手（Snow Giant Wraps）", color = colors.SANDY_BROWN, image = "object/artifact/snow_giant_arm_wraps.png",
	unided_name = "毛衬里之皮护手",
	desc = [[两大块皮革被设计成包裹着手和前臂。这副独特的护手被附魔了，给予穿戴者巨大的力量。]],
	level_range = {15, 25},
	rarity = 200,
	cost = 500,
	material_level = 1,
	wielder = {
		inc_stats = { [Stats.STAT_STR] = 4, },
		resists = { [DamageType.COLD]= 10, [DamageType.LIGHTNING] = 10, },
		knockback_immune = 0.5,
		combat_armor = 2,
		max_life = 60,
		combat = {
			dam = 16,
			apr = 1,
			physcrit = 4,
			physspeed = -0.4,
			dammod = {dex=0.4, str=-0.6, cun=0.4 },
			melee_project={ [DamageType.COLD] = 10, [DamageType.LIGHTNING] = 10, },
		},
	},
	max_power = 6, power_regen = 1,
	use_talent = { id = Talents.T_THROW_BOULDER, level = 2, power = 6 },
}

newEntity{ base = "BASE_GAUNTLETS",
	power_source = {arcane=true},
	unique = true,
	name = "风暴使者的臂铠（Storm Bringer's Gauntlets）", color = colors.LIGHT_STEEL_BLUE, image = "object/artifact/storm_bringers_gauntlets.png",
	unided_name = "细孔臂铠",
	desc = [[这副细孔沃瑞钽臂铠被闪烁着蓝色能量的雕文覆盖着。这种金属柔软且轻盈，不会对施法造成阻碍。制造那些手套的时间和地点都是一个谜，但是可以确认的是，制造者对于魔法技术有一定的了解。]],
	level_range = {25, 35},
	rarity = 250,
	cost = 1000,
	material_level = 5,
	require = nil,
	wielder = {
		inc_stats = { [Stats.STAT_MAG] = 4, },
		resists = { [DamageType.LIGHTNING] = 15, },
		inc_damage = { [DamageType.LIGHTNING] = 10 },
		resists_cap = { [DamageType.LIGHTNING] = 5 },
		combat_spellcrit = 5,
		combat_critical_power = 20,
		combat_armor = 3,
		combat = {
			dam = 22,
			apr = 10,
			physcrit = 4,
			physspeed = -0.2,
			dammod = {dex=0.4, str=-0.6, cun=0.4 },
			melee_project={ [DamageType.LIGHTNING] = 20, },
			talent_on_hit = { [Talents.T_LIGHTNING] = {level=3, chance=10} },
			damrange = 0.3,
		},
	},
	max_power = 16, power_regen = 1,
	use_talent = { id = Talents.T_CHAIN_LIGHTNING, level = 3, power = 16 },
}

newEntity{ base = "BASE_CLOAK",
	power_source = {nature=true},
	unique = true,
	name = "蛇纹斗篷（Serpentine Cloak）", image = "object/artifact/serpentine_cloak.png",
	unided_name = "破碎的斗篷",
	desc = [[这件斗篷散发出恶毒和狡诈。]],
	level_range = {20, 29},
	rarity = 240,
	cost = 200,
	material_level = 3,
	wielder = {
		combat_def = 10,
		inc_stats = { [Stats.STAT_CUN] = 6, [Stats.STAT_CON] = 5, },
		resists_pen = { [DamageType.NATURE] = 15 },
		talents_types_mastery = { ["cunning/stealth"] = 0.1, },
	},
	max_power = 60, power_regen = 1,
	use_talent = { id = Talents.T_PHASE_DOOR, level = 2, power = 30 },
}

newEntity{ base = "BASE_CLOAK",
	power_source = {arcane=true},
	unique = true,
	name = "风之密语（Wind's Whisper）", image="object/artifact/cloak_winds_whisper.png",
	unided_name = "流彩斗篷",
	desc = [[当魔法师Razeen被Spellhunters在Daikara山隘逼入绝境，她用斗篷包裹着自己逃下了一条峡谷。猎手们接连不断的把箭射向她，但由于奇迹或者魔法，他们全部射空了。Razeen得以逃生并躲进了西部的隐秘之城。]],
	level_range = {15, 25},
	rarity = 400,
	cost = 250,
	material_level = 3,
	wielder = {
		inc_stats = { [Stats.STAT_DEX] = 3, },
		combat_def = 4,
		combat_ranged_def = 12,
		silence_immune = 0.3,
	},
	max_power = 50, power_regen = 1,
	use_talent = { id = Talents.T_EVASION, level = 2, power = 50 },
}

newEntity{ base = "BASE_CLOTH_ARMOR",
	power_source = {arcane=true},
	unique = true,
	name = "主教的礼服（Vestments of the Conclave）", color = colors.DARK_GREY, image = "object/artifact/robe_vestments_of_the_conclave.png",
	unided_name = "破烂的长袍",
	desc = [[这件古老的礼服从Allure保存了下来。早期的魔法力量占据了它。
它由人类专门为人类而制造；只有他们才能驾驭这件长袍的真正力量。]],
	level_range = {12, 22},
	rarity = 220,
	cost = 150,
	material_level = 3,
	wielder = {
		inc_damage = {[DamageType.ARCANE]=10},
		inc_stats = { [Stats.STAT_MAG] = 6 },
		combat_spellcrit = 15,
	},
	on_wear = function(self, who)
		if who.descriptor and who.descriptor.race == "Human" then
			local Stats = require "engine.interface.ActorStats"
			local DamageType = require "engine.DamageType"

			self:specialWearAdd({"wielder","inc_stats"}, { [Stats.STAT_MAG] = 3, [Stats.STAT_CUN] = 9, })
			self:specialWearAdd({"wielder","inc_damage"}, {[DamageType.ARCANE]=7})
			self:specialWearAdd({"wielder","combat_spellcrit"}, 2)
			game.logPlayer(who, "#LIGHT_BLUE#You feel as surge of power as you wear the vestments of the old Human Conclave!")
		end
	end,
}

newEntity{ base = "BASE_CLOTH_ARMOR",
	power_source = {arcane=true},
	unique = true,
	name = "蹈火者（Firewalker）", color = colors.RED, image = "object/artifact/robe_firewalker.png",
	unided_name = "燃烧的长袍",
	desc = [[这件炙热的长袍曾属于疯狂的纵火犯Halchot,他在Dusk时代威胁着很多城镇，正当人们努力从Spellblaze（战争）中恢复元气的时候对村镇烧杀抢掠。最终他被Ziguranth捕获了。Ziguranth割下他的舌头，砍掉他的脑袋，还把他的身体撕碎成小块。他的脑袋被封在一个大冰块里,并且在当地居民的欢庆中在附近的镇子里进行了游街。只有这件长袍从Halchot放的大火中保留了下来。]],
	level_range = {20, 30},
	rarity = 300,
	cost = 280,
	material_level = 4,
	wielder = {
		inc_damage = {[DamageType.FIRE]=20},
		combat_def = 8,
		combat_armor = 2,
		inc_stats = { [Stats.STAT_MAG] = 6, [Stats.STAT_CUN] = 6, },
		resists = {[DamageType.FIRE] = 20, [DamageType.COLD] = -10},
		resists_pen = { [DamageType.FIRE] = 20 },
		on_melee_hit = {[DamageType.FIRE] = 18},
	},
}

newEntity{ base = "BASE_CLOTH_ARMOR",
	power_source = {arcane=true},
	unique = true,
	name = "大法师的长袍（Robe of the Archmage）", color = colors.RED, image = "object/artifact/robe_of_the_archmage.png",
	unided_name = "闪闪发光的长袍",
	desc = [[朴素的精灵丝绸长袍。如果不是它放射出的惊人威力，它恐怕会默默无闻的。]],
	level_range = {30, 40},
	rarity = 290,
	cost = 550,
	material_level = 5,
	moddable_tile = "special/robe_of_the_archmage",
	moddable_tile_big = true,
	wielder = {
		lite = 1,
		inc_damage = {all=12},
		blind_immune = 0.4,
		combat_def = 10,
		combat_armor = 10,
		inc_stats = { [Stats.STAT_MAG] = 4, [Stats.STAT_WIL] = 4, [Stats.STAT_CUN] = 4, },
		combat_spellpower = 15,
		combat_spellresist = 18,
		combat_mentalresist = 15,
		resists={[DamageType.FIRE] = 10, [DamageType.COLD] = 10},
		on_melee_hit={[DamageType.ARCANE] = 15},
		mana_regen = 1,
	},
}

newEntity{ base = "BASE_CLOTH_ARMOR",
	power_source = {arcane=true},
	unique = true,
	name = "时空增益长袍--时尚设计（Temporal Augmentation Robe - Designed In-Style）", color = colors.BLACK, image = "object/artifact/robe_temporal_augmentation_robe.png",
	unided_name = "有领带的时髦长袍",
	desc = [[被有些古怪的时空法师设计出来，无论穿着者在哪个时代，这袍子都显得时髦。为协助时空法师冒险而制作。这件法袍对掌握时间多样性实质的人有着巨大的作用。有趣的是，由于它第四任主人参与了一场相当漫长的战斗，长袍上附带了一条很长的幻彩领带。]],
	level_range = {30, 40},
	rarity = 310,
	cost = 540,
	material_level = 5,
	wielder = {
		inc_damage = {[DamageType.TEMPORAL]=20},
		combat_def = 9,
		combat_armor = 3,
		inc_stats = { [Stats.STAT_MAG] = 5, [Stats.STAT_WIL] = 3, },
		resists={[DamageType.TEMPORAL] = 20},
		resists_pen = { [DamageType.TEMPORAL] = 20 },
		on_melee_hit={[DamageType.TEMPORAL] = 10},
	},
	max_power = 100, power_regen = 1,
	use_talent = { id = Talents.T_DAMAGE_SMEARING, level = 3, power = 100 },
}

newEntity{ base = "BASE_GEM",
	power_source = {arcane=true},
	unique = true,
	unided_name = "闪耀的白水晶",
	name = "Telos的法杖水晶（Telos's Staff Crystal）", subtype = "multi-hued", image = "object/artifact/telos_staff_crystal.png",
	color = colors.WHITE,
	level_range = {35, 45},
	desc = [[对这颗纯净的白水晶的近距离欣赏会发现很多种颜色在上面盘旋闪耀。]],
	rarity = 240,
	cost = 200,
	material_level = 5,
	carrier = {
		lite = 2,
	},
	wielder = {
		inc_stats = { [Stats.STAT_STR] = 5, [Stats.STAT_DEX] = 5, [Stats.STAT_MAG] = 5, [Stats.STAT_WIL] = 5, [Stats.STAT_CUN] = 5, [Stats.STAT_CON] = 5, },
		lite = 2,
		confusion_immune = 0.3,
		fear_immune = 0.3,
		resists={[DamageType.MIND] = 30,},
	},
	imbue_powers = {
		inc_stats = { [Stats.STAT_STR] = 5, [Stats.STAT_DEX] = 5, [Stats.STAT_MAG] = 5, [Stats.STAT_WIL] = 5, [Stats.STAT_CUN] = 5, [Stats.STAT_CON] = 5, },
		lite = 2,
		confusion_immune = 0.3,
		fear_immune = 0.3,
		resists={[DamageType.MIND] = 30,},
	},

	max_power = 1, power_regen = 1,
	use_power = { name = "combine with a staff", power = 1, use = function(self, who, gem_inven, gem_item)
		who:showInventory("Fuse with which staff?", who:getInven("INVEN"), function(o) return o.type == "weapon" and o.subtype == "staff" and not o.egoed and not o.unique end, function(o, item)
			local voice = game.zone:makeEntityByName(game.level, "object", "VOICE_TELOS")
			if voice then
				local oldname = o:getName{do_color=true}

				-- Remove the gem
				who:removeObject(gem_inven, gem_item)
				who:sortInven(gem_inven)

				-- Change the staff
				voice.combat = o.combat
				voice.combat.dam = voice.combat.dam * 1.4
				voice.combat.damtype = engine.DamageType.ARCANE
				voice:identify(true)
				o:replaceWith(voice)
				who:sortInven()

				who.changed = true
				game.logPlayer(who, "You fix the crystal on the %s and create the %s.", oldname, o:getName{do_color=true})
			else
				game.logPlayer(who, "The fusing fails!")
			end
		end)
		return {id=true, used=true}
	end },
}

-- The staff that goes with the crystal above, it will not be generated randomly it is created by the crystal
newEntity{ base = "BASE_STAFF", define_as = "VOICE_TELOS",
	power_source = {arcane=true},
	unique = true,
	name = "Telo之音(Voice of Telos)",
	unided_name = "闪耀的白色法杖", image="object/artifact/staff_voice_of_telos.png",
	color = colors.VIOLET,
	rarity = false,
	desc = [[对这颗纯净的白色法杖的近距离欣赏会发现很多种颜色在上面盘旋闪耀。]],
	cost = 500,
	material_level = 5,

	require = { stat = { mag=45 }, },
	-- This is replaced by the creation process
	combat = { dam = 1, },
	wielder = {
		combat_spellpower = 30,
		combat_spellcrit = 15,
		max_mana = 100,
		inc_stats = { [Stats.STAT_MAG] = 6, [Stats.STAT_WIL] = 5, [Stats.STAT_CUN] = 4 },
		lite = 1,

		inc_damage = { all=14 },
	},
}

newEntity{ base = "BASE_WAND",
	power_source = {arcane=true},
	unided_name = "炽热的魔杖",
	name = "Gwai燃烧的斗志（Gwai's Burninator）", color=colors.LIGHT_RED, unique=true, image = "object/artifact/wand_gwais_burninator.png",
	desc = [[Gwai，一个生活在Spellhunt时的火焰术士，被一群猎魔者逼入了绝境。她战斗到了最后一刻，据说在她流尽最后一滴血之前用这把魔杖干掉了至少十个人]],
	cost = 50,
	rarity = 220,
	level_range = {15, 30},
	elec_proof = true,
	add_name = false,

	material_level = 5,

	max_power = 75, power_regen = 1,
	use_power = { name = "shoot a cone of fire", power = 20,
		use = function(self, who)
			local tg = {type="cone", range=0, radius=5}
			local x, y = who:getTarget(tg)
			if not x or not y then return nil end
			who:project(tg, x, y, engine.DamageType.FIRE, 80 + who:getMag() * 2, {type="flame"})
			return {id=true, used=true}
		end
	},
}

newEntity{ base = "BASE_BATTLEAXE",
	power_source = {technique=true},
	unique = true,
	unided_name = "生铁战斧",
	name = "Kroll的生铁战斧（Crude Iron Battle Axe of Kroll）", color = colors.GREY, image = "object/artifact/crude_iron_battleaxe_of_kroll.png",
	desc = [[打造于矮人学会精巧工艺之前，外表的粗糙掩盖了这把斧头的强大威力。不过也只有矮人才能让它发挥出真正的力量。]],
	require = { stat = { str=50 }, },
	level_range = {39, 46},
	rarity = 300,
	material_level = 4,
	combat = {
		dam = 68,
		apr = 7,
		physcrit = 10,
		dammod = {str=1.3},
	},
	wielder = {
		inc_stats = { [Stats.STAT_CON] = 2, [Stats.STAT_DEX] = 2, },
		combat_def = 6, combat_armor = 6,
		inc_damage = { [DamageType.PHYSICAL]=10 },
		stun_immune = 0.3,
		knockback_immune = 0.3,
	},
	on_wear = function(self, who)
		if who.descriptor and who.descriptor.race == "Dwarf" then
			local Stats = require "engine.interface.ActorStats"

			self:specialWearAdd({"wielder","inc_stats"}, { [Stats.STAT_CON] = 7, [Stats.STAT_DEX] = 7, })
			self:specialWearAdd({"wielder","stun_immune"}, 0.7)
			self:specialWearAdd({"wielder","knockback_immune"}, 0.7)
			game.logPlayer(who, "#LIGHT_BLUE#You feel as surge of power as you wield the axe of your ancestors!")
		end
	end,
}

newEntity{ base = "BASE_BATTLEAXE",
	power_source = {technique=true},
	unique = true,
	unided_name = "凶猛的锋利战斧",
	name = "屠龙（Drake's Bane）", image = "object/artifact/axe_drakes_bane.png",
	color = colors.RED,
	desc = [[Kroltar的噩梦，最强大的龙，7个月时间带走了20，000矮人战士的生命。这条猛兽的力气最终被耗尽了，工匠大师Gruxim，站在同伴们尸体的顶端，用这把精工打造用来斩开龙的鳞甲的斧头，剖开了它的喉咙。]],
	require = { stat = { str=45 }, },
	rarity = 300,
	cost = 400,
	level_range = {20, 35},
	material_level = 4,
	combat = {
		dam = 52,
		apr = 21,
		physcrit = 2,
		dammod = {str=1.2},
		inc_damage_type = {dragon=25},
	},
	wielder = {
		inc_stats = { [Stats.STAT_STR] = 6, },
		stun_immune = 0.2,
		knockback_immune = 0.4,
		combat_physresist = 9,
	},
}

newEntity{ base = "BASE_WARAXE",
	power_source = {technique=true, nature=true},
	unique = true,
	name = "血字（Blood-Letter）", image = "object/artifact/weapon_axe_blood_letter.png",
	unided_name = "冰冷的手斧",
	desc = [[用北部荒原的寒冰之核雕成的手斧。]],
	level_range = {25, 35},
	rarity = 235,
	require = { stat = { str=40, dex=24 }, },
	cost = 330,
	material_level = 4,
	combat = {
		dam = 33,
		apr = 4.5,
		physcrit = 7,
		dammod = {str=1},
		melee_project={[DamageType.COLD] = 25},
	},
	wielder = {
		combat_atk = 15,
	},
}

newEntity{ base = "BASE_WHIP",
	power_source = {nature=true},
	unided_name = "合金鞭",
	name = "猩红毒针（Scorpion's Tail）", color=colors.GREEN, unique = true, image = "object/artifact/whip_scorpions_tail.png",
	desc = [[一条金属串接的长鞭，尾端锋利的邪恶倒刺会渗透出毒液。]],
	require = { stat = { dex=28 }, },
	cost = 150,
	material_level = 3,
	combat = {
		dam = 28,
		apr = 8,
		physcrit = 5,
		dammod = {dex=1},
		melee_project={[DamageType.POISON] = 22},
	},
	wielder = {
		combat_atk = 10,
		see_invisible = 9,
	},
}

newEntity{ base = "BASE_LEATHER_BELT",
	power_source = {technique=true},
	unique = true,
	name = "强力的腰带（Mighty Girdle）", image = "object/artifact/belt_mighty_girdle.png",
	unided_name = "结实的染色腰带",
	desc = [[这条腰带被赋予了强大的魔法来对抗膨胀的腰围。不管它令人惊讶的强度的源头是什么，它将会在负担沉重的旅途中提供强力的支持。]],
	color = colors.LIGHT_RED,
	level_range = {1, 25},
	rarity = 170,
	cost = 350,
	material_level = 5,
	wielder = {
		knockback_immune = 0.4,
		max_encumber = 70,
		combat_armor = 4,
	},
}


newEntity{ base = "BASE_LEATHER_BELT",
	power_source = {nature=true, arcane=true},
	unique = true,
	name = "自然精灵的绳索腰带(Rope Belt of the Thaloren)", image = "object/artifact/rope_belt_of_the_thaloren.png",
	unided_name = "一截短绳",
	desc = [[最朴素的腰带，被Nessilla在照看她的人民和森林的期间穿戴了几个世纪。这条腰带永久的保存了她的部分智慧和力量。]],
	color = colors.LIGHT_RED,
	level_range = {20, 30},
	rarity = 200,
	cost = 450,
	material_level = 5,
	wielder = {
		inc_stats = { [Stats.STAT_CUN] = 7, [Stats.STAT_WIL] = 8, },
		combat_mindpower = 12,
		talents_types_mastery = { ["wild-gift/harmony"] = 0.2 },
	},
}

newEntity{ base = "BASE_LEATHER_BELT",
	power_source = {nature=true},
	unique = true,
	name = "防腐腰带（Girdle of Preservation）", image = "object/artifact/belt_girdle_of_preservation.png",
	unided_name = "闪烁的，完美的腰带",
	desc = [[一条带着雕刻着沃瑞钽标志的皮带扣，用纯白色皮革制作的古朴的腰带。不论时间还是环境都不能对它造成任何损害。]],
	color = colors.WHITE,
	level_range = {45, 50},
	rarity = 400,
	cost = 750,
	material_level = 5,
	wielder = {
		inc_stats = { [Stats.STAT_CON] = 5, [Stats.STAT_WIL] = 5,  },
		resists = {
			[DamageType.ACID] = 15,
			[DamageType.LIGHTNING] = 15,
			[DamageType.FIRE] = 15,
			[DamageType.COLD] = 15,
			[DamageType.LIGHT] = 15,
			[DamageType.DARKNESS] = 15,
			[DamageType.BLIGHT] = 15,
			[DamageType.NATURE] = 15,
			[DamageType.PHYSICAL] = 10,
			[DamageType.ARCANE] = 10,
		},
		confusion_immune = 0.2,
		combat_physresist = 15,
		combat_mentalresist = 15,
		combat_spellresist = 15,
	},
}

newEntity{ base = "BASE_LEATHER_BELT",
	power_source = {nature=true},
	unique = true,
	name = "静水腰带（Girdle of the Calm Waters）", image = "object/artifact/girdle_of_the_calm_waters.png",
	unided_name = "金色腰带",
	desc = [[传说这条腰带曾被教会的医治者佩戴。]],
	color = colors.GOLD,
	level_range = {5, 14},
	rarity = 120,
	cost = 75,
	material_level = 3,
	wielder = {
		inc_stats = { [Stats.STAT_WIL] = 3,  },
		resists = {
			[DamageType.COLD] = 20,
			[DamageType.BLIGHT] = 20,
			[DamageType.NATURE] = 20,
		},
		healing_factor = 0.3,
	},
}

newEntity{ base = "BASE_LIGHT_ARMOR",
	power_source = {technique=true},
	unique = true,
	name = "巨兽之皮（Behemoth Hide）", image = "object/artifact/behemoth_skin.png",
	unided_name = "坚韧的风化兽皮",
	desc = [[一张取自一个巨型猛兽的粗制兽皮。鉴于它已经被风吹日晒了这么久还能凑合用用，没准会有一点特别的……]],
	color = colors.BROWN,
	level_range = {18, 23},
	rarity = 230,
	require = { stat = { str=22 }, },
	cost = 250,
	material_level = 3,
	wielder = {
		inc_stats = { [Stats.STAT_STR] = 2, [Stats.STAT_CON] = 2 },

		combat_armor = 6,
		combat_def = 4,
		combat_def_ranged = 8,

		max_encumber = 20,
		life_regen = 0.7,
		stamina_regen = 0.7,
		fatigue = 10,
		max_stamina = 43,
		max_life = 45,
		knockback_immune = 0.1,
		size_category = 1,
	},
}

newEntity{ base = "BASE_LIGHT_ARMOR",
	power_source = {technique=true},
	unique = true,
	name = "人皮（Skin of Many）", image = "object/artifact/robe_skin_of_many.png",
	unided_name = "缝制的皮甲",
	desc = [[缝在一起的许多人皮。有些眼睛和嘴巴依然待在这件袍子上，并且有一些仍然活着，在被酷刑折磨的痛苦中尖啸。]],
	color = colors.BROWN,
	level_range = {12, 22},
	rarity = 200,
	require = { stat = { str=16 }, },
	cost = 200,
	material_level = 2,
	wielder = {
		inc_stats = { [Stats.STAT_CON] = 4 },
		combat_armor = 6,
		combat_def = 12,
		fatigue = 7,
		max_life = 40,
		infravision = 6,
		talents_types_mastery = { ["cunning/stealth"] = -0.2, },
	},
}

newEntity{ base = "BASE_LIGHT_ARMOR",
	power_source = {nature=true, antimagic=true},
	unique = true,
	name = "大自然之赐福（Nature's Blessing）", image = "object/artifact/armor_natures_blessing.png",
	unided_name = "柔韧的皮甲被柳木条缠绕着",
	desc = [[曾被守护者Ardon穿著，他在魔法战争中首次于人类和半身人之间建立了Ziguranth。这件护甲被灌注了大自然的能量，并被用来对抗魔法破坏者。]],
	color = colors.BROWN,
	level_range = {15, 30},
	rarity = 350,
	require = { stat = { str=20 }, {wil=20} },
	cost = 350,
	material_level = 4,
	wielder = {
		inc_stats = { [Stats.STAT_WIL] = 3, [Stats.STAT_CON] = 4 },

		combat_armor = 6,
		combat_def = 8,
		combat_def_ranged = 4,

		life_regen = 1,
		fatigue = 8,
		stun_immune = 0.25,
		healing_factor = 0.2,
		combat_spellresist = 18,

		resists = {
			[DamageType.NATURE] = 20,
			[DamageType.ARCANE] = 25,
		},

		talents_types_mastery = { ["wild-gift/antimagic"] = 0.2},
	},
}

newEntity{ base = "BASE_HEAVY_ARMOR",
	power_source = {technique=true},
	unique = true,
	name = "嗜血铁甲(Iron Mail of Bloodletting)", image = "object/artifact/iron_mail_of_bloodletting.png",
	unided_name = "刺穿外壳之铁甲",
	desc = [[鲜血不断的从这套骇人的铁甲上滴落，几乎可以看得见黑魔法在围绕着它搅动。胆敢阻挡装备者的人会遭到血腥的毁灭。]],
	color = colors.RED,
	level_range = {15, 25},
	rarity = 190,
	require = { stat = { str=14 }, },
	cost = 200,
	material_level = 1,
	wielder = {
		inc_stats = { [Stats.STAT_CON] = 2, [Stats.STAT_STR] = 2 },
		resists = {
			[DamageType.ACID] = 10,
			[DamageType.DARKNESS] = 10,
			[DamageType.FIRE] = 10,
			[DamageType.BLIGHT] = 10,
		},
		talents_types_mastery = { ["technique/bloodthirst"] = 0.1 },
		life_regen = 0.5,
		healing_factor = 0.3,
		combat_def = 2,
		combat_armor = 4,
		fatigue = 12,
	},
}


newEntity{ base = "BASE_HEAVY_ARMOR",
	power_source = {technique=true, nature=true},
	unique = true,
	name = "Kroltar的龙鳞甲（Scale Mail of Kroltar）", image = "object/artifact/scale_mail_of_kroltar.png",
	unided_name = "用龙甲完美打造的正装",
	desc = [[一件用Kroltar的遗物打造的重衫，他的护甲有盾牌的十倍重。]],
	color = colors.LIGHT_RED,
	metallic = false,
	level_range = {38, 45},
	rarity = 300,
	require = { stat = { str=38 }, },
	cost = 500,
	material_level = 5,
	wielder = {
		inc_stats = { [Stats.STAT_CON] = 4, [Stats.STAT_STR] = 5, [Stats.STAT_DEX] = 3 },
		resists = {
			[DamageType.ACID] = 20,
			[DamageType.LIGHTNING] = 20,
			[DamageType.FIRE] = 20,
			[DamageType.BLIGHT] = 20,
			[DamageType.NATURE] = 20,
		},
		max_life=120,
		combat_def = 10,
		combat_armor = 14,
		fatigue = 16,
	},
	max_power = 80, power_regen = 1,
	use_talent = { id = Talents.T_INFERNO, level = 3, power = 50 },
}

newEntity{ base = "BASE_MASSIVE_ARMOR",
	power_source = {technique=true},
	unique = true,
	name = "国王的板甲（Plate Armor of the King）", image = "object/artifact/plate_armor_of_the_king.png",
	unided_name = "隐隐放光的沃瑞钽板甲",
	desc = [[精细描绘着国王为最后一丝希望浴血奋战的影像。即便是坏透顶的恶棍看到它，心底也会充满深深的绝望。]],
	color = colors.WHITE,
	level_range = {45, 50},
	rarity = 390,
	require = { stat = { str=48 }, },
	cost = 800,
	material_level = 5,
	wielder = {
		inc_stats = { [Stats.STAT_WIL] = 9, },
		resists = {
			[DamageType.ACID] = 25,
			[DamageType.ARCANE] = 10,
			[DamageType.FIRE] = 25,
			[DamageType.BLIGHT] = 25,
			[DamageType.DARKNESS] = 25,
		},
		max_stamina = 60,
		combat_def = 15,
		combat_armor = 20,
		stun_immune = 0.3,
		knockback_immune = 0.3,
		combat_mentalresist = 25,
		combat_spellresist = 25,
		combat_physresist = 15,
		lite = 1,
		fatigue = 26,
	},
}

newEntity{ base = "BASE_MASSIVE_ARMOR",
	power_source = {technique=true},
	unique = true,
	name = "Thronesmen之胸甲（Cuirass of the Thronesmen）", image = "object/artifact/armor_cuirass_of_the_thronesmen.png",
	unided_name = "重型矮人钢护甲",
	desc = [[这件沉重的矮人钢护甲打造于钢铁王座最深的熔炉。虽然它被赋予了举世无双的防护能力，但你必须得靠自己的力量使用它。]],
	color = colors.WHITE,
	level_range = {35, 40},
	rarity = 320,
	require = { stat = { str=44 }, },
	cost = 500,
	material_level = 4,
	wielder = {
		inc_stats = { [Stats.STAT_CON] = 6, },
		resists = {
			[DamageType.FIRE] = 25,
		},
		combat_def = 20,
		combat_armor = 29,
		stun_immune = 0.4,
		knockback_immune = 0.4,
		combat_physresist = 40,
		healing_factor = -0.4,
		fatigue = 15,
	},
}

newEntity{ base = "BASE_GREATSWORD",
	power_source = {technique=true},
	unique = true,
	name = "金色三棱剑“真理”（Golden Three-Edged Sword 'The Truth'）", image = "object/artifact/golden_3_edged_sword.png",
	unided_name = "三棱剑",
	desc = [[有些聪明人说真理是把三刃剑。也有些时候，“真理”是会伤到人的。]],
	level_range = {25, 32},
	require = { stat = { str=26, wil=26, cun=26 }, },
	color = colors.GOLD,
	encumber = 12,
	cost = 350,
	rarity = 240,
	material_level = 4,
	moddable_tile = "special/golden_sword_right",
	moddable_tile_big = true,
	combat = {
		dam = 40,
		apr = 1,
		physcrit = 7,
		dammod = {str=1.2},
		special_on_hit = {desc="9% chance to stun or confuse the target", fct=function(combat, who, target)
			if not rng.percent(9) then return end
			local eff = rng.table{"stun", "confusion"}
			if not target:canBe(eff) then return end
			if not target:checkHit(who:combatAttack(combat), target:combatPhysicalResist(), 15) then return end
			if eff == "stun" then target:setEffect(target.EFF_STUNNED, 3, {})
			elseif eff == "confusion" then target:setEffect(target.EFF_CONFUSED, 3, {power=75})
			end
		end},
		melee_project={[DamageType.LIGHT] = 40, [DamageType.DARKNESS] = 40},
	},
}

newEntity{ base = "BASE_MACE",
	power_source = {nature=true},
	name = "Ureslak的大腿（Ureslak's Femur）", define_as = "URESLAK_FEMUR", image="object/artifact/club_ureslaks_femur.png",
	unided_name = "染的稀奇古怪的骨头", unique = true,
	desc = [[强大的棱晶龙被截短的腿骨，这根奇怪的棍子仍然脉动着Ureslak的天性。]],
	level_range = {42, 50},
	require = { stat = { str=45, dex=30 }, },
	rarity = 400,
	cost = 300,
	material_level = 5,
	combat = {
		dam = 52,
		apr = 5,
		physcrit = 2.5,
		dammod = {str=1},
		special_on_hit = {desc="10% chance to shimer to a different hue and gain powers", fct=function(combat, who, target)
			if not rng.percent(10) then return end
			local o, item, inven_id = who:findInAllInventoriesBy("define_as", "URESLAK_FEMUR")
			if not o or not who:getInven(inven_id).worn then return end

			who:onTakeoff(o, true)
			local b = rng.table(o.ureslak_bonuses)
			o.name = "Ureslak's "..b.name.." Femur"
			o.combat.damtype = b.damtype
			o.wielder = b.wielder
			who:onWear(o, true)
			game.logSeen(who, "#GOLD#Ureslak's Femur glows and shimers!")
		end },
	},
	ureslak_bonuses = {
		{ name = "Flaming", damtype = DamageType.FIREBURN, wielder = {
			global_speed_add = 0.3,
			resists = { [DamageType.FIRE] = 45 },
			resists_pen = { [DamageType.FIRE] = 30 },
			inc_damage = { [DamageType.FIRE] = 30 },
		} },
		{ name = "Frozen", damtype = DamageType.ICE, wielder = {
			combat_armor = 15,
			resists = { [DamageType.COLD] = 45 },
			resists_pen = { [DamageType.COLD] = 30 },
			inc_damage = { [DamageType.COLD] = 30 },
		} },
		{ name = "Crackling", damtype = DamageType.LIGHTNING_DAZE, wielder = {
			inc_stats = { [Stats.STAT_STR] = 6, [Stats.STAT_DEX] = 6, [Stats.STAT_CON] = 6, [Stats.STAT_CUN] = 6, [Stats.STAT_WIL] = 6, [Stats.STAT_MAG] = 6, },
			resists = { [DamageType.LIGHTNING] = 45 },
			resists_pen = { [DamageType.LIGHTNING] = 30 },
			inc_damage = { [DamageType.LIGHTNING] = 30 },
		} },
		{ name = "Venomous", damtype = DamageType.POISON, wielder = {
			resists = { all = 15, [DamageType.NATURE] = 45 },
			resists_pen = { [DamageType.NATURE] = 30 },
			inc_damage = { [DamageType.NATURE] = 30 },
		} },
		{ name = "Starry", damtype = DamageType.DARKNESS_BLIND, wielder = {
			combat_spellresist = 15, combat_mentalresist = 15, combat_physresist = 15,
			resists = { [DamageType.DARKNESS] = 45 },
			resists_pen = { [DamageType.DARKNESS] = 30 },
			inc_damage = { [DamageType.DARKNESS] = 30 },
		} },
		{ name = "Eldritch", damtype = DamageType.ARCANE, wielder = {
			resists = { [DamageType.ARCANE] = 45 },
			resists_pen = { [DamageType.ARCANE] = 30 },
			inc_damage = { all = 12, [DamageType.ARCANE] = 30 },
		} },
	},
}

newEntity{ base = "BASE_WARAXE",
	power_source = {technique=true},
	unique = true,
	rarity = false, unided_name = "剃刀战斧",
	name = "剃刀，被诅咒的战斧（Razorblade, the Cursed Waraxe）", color = colors.LIGHT_BLUE, image = "object/artifact/razorblade_the_cursed_waraxe.png",
	desc = [[这把强力的斧头可以像剑一样劈开护甲，还能遮架重棍的打击。
据说持有者会慢慢变得疯狂。这个，不管怎样，从来没有被证实过--没有已知的持有者能活到揭开真相。]],
	require = { stat = { str=42 }, },
	level_range = {40, 50},
	rarity = 250,
	material_level = 5,
	combat = {
		dam = 58,
		apr = 16,
		physcrit = 7,
		dammod = {str=1},
		damrange = 1.4,
		damtype = DamageType.PHYSICALBLEED,
	},
	wielder = {
		inc_stats = { [Stats.STAT_STR] = 4, [Stats.STAT_DEX] = 4, },
		see_invisible = 5,
		inc_damage = { [DamageType.PHYSICAL]=10 },
	},
}

newEntity{ base = "BASE_LONGSWORD", define_as = "ART_PAIR_TWSWORD",
	power_source = {arcane=true},
	unique = true,
	name = "进化之剑（Sword of Potential Futures）", image = "object/artifact/sword_of_potential_futures.png",
	unided_name = "未完工的剑",
	desc = [[传说这把长剑是一对兵器中的一个；这对兵器打造于Wardens最初的年代。对于未经训练的持有者来说它还不是那么完善;对于守卫者来说，它将随时间展示出潜力。]],
	level_range = {20, 30},
	rarity = 250,
	require = { stat = { str=24, mag=24 }, },
	cost = 300,
	material_level = 3,
	combat = {
		dam = 28,
		apr = 10,
		physcrit = 8,
		dammod = {str=0.8,mag=0.2},
		melee_project={[DamageType.TEMPORAL] = 5},
	},
	wielder = {
		inc_damage={
			[DamageType.TEMPORAL] = 5, [DamageType.PHYSICAL] = -5,
		},
	},
	set_list = { {"define_as","ART_PAIR_TWDAG"} },
	on_set_complete = function(self, who)
		self.combat.special_on_hit = {desc="10% chance to reduce the target's resistances to all damage", fct=function(combat, who, target)
			if not rng.percent(10) then return end
			target:setEffect(target.EFF_FLAWED_DESIGN, 3, {power=20})
		end}
		self:specialSetAdd({"wielder","inc_damage"}, {[engine.DamageType.TEMPORAL]=5, [engine.DamageType.PHYSICAL]=10,})
		game.logSeen(who, "#CRIMSON#The echoes of time resound as the blades are reunited once more.")
	end,
	on_set_broken = function(self, who)
		self.combat.special_on_hit = nil
		game.logPlayer(who, "#CRIMSON#Time seems less perfect in your eyes as the blades are separated.")
	end,
}

newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_TWDAG",
	power_source = {arcane=true},
	unique = true,
	name = "历练之匕（Dagger of the Past）", image = "object/artifact/dagger_of_the_past.png",
	unided_name = "锈蚀的匕首",
	desc = [[传说这把匕首是一对兵器中的一个；这对兵器打造于Wardens最初的年代。对于未经训练的持有者来说它还不是那么完善;对于守卫者来说，它表示着从以前的失误中吸取教训的机会。]],
	level_range = {20, 30},
	rarity = 250,
	require = { stat = { dex=24, mag=24 }, },
	cost = 300,
	material_level = 3,
	combat = {
		dam = 25,
		apr = 20,
		physcrit = 20,
		dammod = {dex=0.5,mag=0.5},
		melee_project={[DamageType.TEMPORAL] = 5},
	},
	wielder = {
		inc_damage={
			[DamageType.TEMPORAL] = 5, [DamageType.PHYSICAL] = -10,
		},
	},
	set_list = { {"define_as","ART_PAIR_TWSWORD"} },
	on_set_complete = function(self, who)
		self.combat.special_on_hit = {desc="10% chance to return the target to a much youger state", fct=function(combat, who, target)
			if not rng.percent(10) then return end
			target:setEffect(target.EFF_TURN_BACK_THE_CLOCK, 3, {power=10})
		end}
		self:specialSetAdd({"wielder","inc_damage"}, {[engine.DamageType.TEMPORAL]=5, [engine.DamageType.PHYSICAL]=10,})
		self:specialSetAdd({"wielder","resists_pen"}, {[engine.DamageType.TEMPORAL]=15,})
	end,
	on_set_broken = function(self, who)
		self.combat.special_on_hit = nil
	end,
}

newEntity{ base = "BASE_LONGSWORD",
	power_source = {nature=true, antimagic=true},
	unique = true,
	name = "Witch-Bane", color = colors.LIGHT_STEEL_BLUE, image = "object/artifact/sword_witch_bane.png",
	unided_name = "象牙柄沃瑞钽长剑",
	desc = [[一把沃瑞钽长剑，象牙的剑柄被紫色的布包裹着。这把兵器的传奇性跟它上一任拥有者Marcus Dunn差不多了，人们认为这把剑已经在Spellhunt末期Marcus被害的时候被摧毁了。]],
	level_range = {38, 50},
	rarity = 250,
	require = { stat = { str=48 }, },
	cost = 650,
	material_level = 5,
	combat = {
		dam = 45,
		apr = 4,
		physcrit = 10,
		dammod = {str=1},
		talent_on_hit = { [Talents.T_MANA_CLASH] = {level=1, chance=25} },
	},
	wielder = {
		inc_stats = { [Stats.STAT_WIL] = 6, [Stats.STAT_CUN] = 6,},
		talent_cd_reduction={
			[Talents.T_AURA_OF_SILENCE] = 2,
			[Talents.T_MANA_CLASH] = 2,
		},
		resists = {
			all = 10,
			[DamageType.PHYSICAL] = - 10,
		},
	},
}


newEntity{ base = "BASE_GAUNTLETS",
	power_source = {arcane=true},
	unique = true,
	name = "Harkor'Zun的岩石臂铠（Stone Gauntlets of ）",
	unided_name = "黑石臂铠",
	desc = [[古时候由Harkor'Zun的狂热崇拜者制作，这副花岗岩臂铠被设计为可以保护穿戴者免于遭受黑暗之主的暴怒。]],
	level_range = {26, 31},
	rarity = 210,
	encumber = 7,
	metallic = false,
	cost = 150,
	material_level = 3,
	wielder = {
		talent_cd_reduction={
			[Talents.T_CLINCH]=2,
		},
		fatigue = 10,
		combat_armor = 7,
		inc_damage = { [DamageType.PHYSICAL]=5, [DamageType.ACID]=10, },
		resists = {[DamageType.ACID] = 20, [DamageType.PHYSICAL] = 10, },
		resists_cap = {[DamageType.ACID] = 10, [DamageType.PHYSICAL] = 5, },
		resists_pen = {[DamageType.ACID] = 15, [DamageType.PHYSICAL] = 15, },
		combat = {
			dam = 26,
			apr = 15,
			physcrit = 5,
			dammod = {dex=0.3, str=-0.4, cun=0.3 },
			melee_project={[DamageType.ACID] = 10},
			damrange = 0.3,
		},
	},
}

newEntity{ base = "BASE_AMULET",
	power_source = {arcane=true},
	unique = true,
	name = "Zemekkys的破沙漏（Zemekkys' Broken Hourglass）", color = colors.WHITE,
	unided_name = "坏掉的沙漏", image="object/artifact/amulet_zemekkys_broken_hourglass.png",
	desc = [[这个坏掉的小沙漏系在一根金子做的细链上。沙漏的玻璃被打破了，里面的沙子早就掉光了。]],
	level_range = {30, 40},
	rarity = 300,
	cost = 200,
	material_level = 4,
	metallic = false,
	wielder = {
		inc_stats = { [Stats.STAT_WIL] = 4, },
		inc_damage = { [DamageType.TEMPORAL]= 10 },
		resists = { [DamageType.TEMPORAL] = 20 },
		resists_cap = { [DamageType.TEMPORAL] = 5 },
	},
	max_power = 60, power_regen = 1,
	use_talent = { id = Talents.T_WORMHOLE, level = 2, power = 60 },
}

newEntity{ base = "BASE_AMULET",
	power_source = {arcane=true},
	unique = true,
	name = "怒视之眼（Unflinching Eye）", color = colors.WHITE, image = "object/artifact/amulet_unflinching_eye.png",
	unided_name = "充血的眼",
	desc = [[有人用一条黑色的粗线穿过这颗充血的眼球，把它挂在脖子上。你也应该这样做。]],
	level_range = {30, 40},
	rarity = 300,
	cost = 300,
	material_level = 4,
	metallic = false,
	wielder = {
		infravision = 5,
		resists = { [DamageType.LIGHT] = -25 },
		resists_cap = { [DamageType.LIGHT] = -25 },
		blind_immune = 1,
		confusion_immune = 0.5,
		esp = { horror = 1 }, esp_range = 10,
	},
	max_power = 60, power_regen = 1,
	use_talent = { id = Talents.T_ARCANE_EYE, level = 2, power = 60 },
}

newEntity{ base = "BASE_CLOAK",
	power_source = {nature=true},
	unique = true,
	name = "Ureslak之蜕（Ureslak's Molted Scales）", image = "object/artifact/ureslaks_molted_scales.png",
	unided_name = "多彩鳞甲",
	desc = [[这件长袍用某些大型爬行动物的鳞片制成。它看上去可以反射出彩虹的每种颜色。]],
	level_range = {40, 50},
	rarity = 400,
	cost = 300,
	material_level = 3,
	wielder = {
		resists_cap = {
			[DamageType.FIRE] = 5,
			[DamageType.COLD] = 5,
			[DamageType.LIGHTNING] = 5,
			[DamageType.NATURE] = 5,
			[DamageType.DARKNESS] = 5,
			[DamageType.ARCANE] = -30,
		},
		resists = {
			[DamageType.FIRE] = 20,
			[DamageType.COLD] = 20,
			[DamageType.LIGHTNING] = 20,
			[DamageType.NATURE] = 20,
			[DamageType.DARKNESS] = 20,
			[DamageType.ARCANE] = -30,
		},
	},
}

newEntity{ base = "BASE_DIGGER",
	power_source = {technique=true},
	unique = true,
	name = "矮人皇帝的十字镐（Pick of Dwarven Emperors）", color = colors.GREY, image = "object/artifact/pick_of_dwarven_emperors.png",
	unided_name = "生铁之十字镐",
	desc = [[这把古老的十字镐被用来一代代的往下传颂矮人的传奇。从镐头到镐把每一寸都覆盖着记述矮人故事的诗歌。]],
	level_range = {26, 35},
	rarity = 290,
	cost = 150,
	material_level = 3,
	digspeed = 12,
	wielder = {
		resists_pen = { [DamageType.PHYSICAL] = 10, },
		inc_stats = { [Stats.STAT_STR] = 3, [Stats.STAT_CON] = 3, },
		combat_mentalresist = 7,
		combat_physresist = 7,
		combat_spellresist = 7,
		max_life = 50,
	},
	on_wear = function(self, who)
		if who.descriptor and who.descriptor.race == "Dwarf" then
			local Stats = require "engine.interface.ActorStats"
			local DamageType = require "engine.DamageType"

			self:specialWearAdd({"wielder","inc_stats"}, { [Stats.STAT_STR] = 5, [Stats.STAT_CON] = 5, })
			self:specialWearAdd({"wielder","inc_damage"}, { [DamageType.PHYSICAL] = 10 })
			self:specialWearAdd({"wielder", "talents_types_mastery"}, { ["race/dwarf"] = 0.2 })

			game.logPlayer(who, "#LIGHT_BLUE#You feel the whisper of your ancestors as you wield this pickaxe!")
		end
	end,
}

--[=[
newEntity{
	unique = true,
	type = "jewelry", subtype="ankh",
	unided_name = "glowing ankh",
	name = "Anchoring Ankh",
	desc = [[As you lift the ankh you feel stable. The world around you feels stable.]],
	level_range = {15, 50},
	rarity = 400,
	display = "*", color=colors.YELLOW, image = "object/fireopal.png",
	encumber = 2,

	carrier = {

	},
}
]=]
