// 07.06.2001, Infernal weapon damage calculation and all other functions

[DEFNAME INFERNAL_COLOR]
color_w_infernal	magma_armor_color

[FUNCTION f_destroy_dark]
	src.emote see the <name> is destroyed and turn in dust!
	remove
	src.update
	return 1

[ITEMDEF i_waraxe_infernal]
NAME=Infernal Axe
ID=013af
DAM=22,40

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Infernal Weapon
DESCRIPTION=Infernal War Axe

RESOURCES=32 i_ingot_magma
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={60 80}
	COLOR=color_w_infernal

On=@Damage
	if !<cont>
		return 1
	elseif !<cont.ischar>
		return 1
	elseif <cont.serial>==<src.serial>
		return 1
	endif
	more2 = {9 27}
	f_damage_waraxe
	if <eval(<cont.macefighting>)> > <eval(rand(1160))>
		more2 = <more2> + 13
	endif
	src.damage <more2>
	f_crash_axe
	return 1

On=@Equip
	if <src.plot1> & plotmask_paladin
		src.message You can't use this weapon of darkness!
		src.damage {22 40}
		src.sfx 0108
		unequip
		return 1
	endif
	src.sfx 0107

On=@Targon_ground
	if <src.account.plevel> > 1
		src.sysmessage Turn off GM Mode first!
		return 1
	endif

On=@Targon_item
	if <src.targ.type>==t_corpse
		if (<src.targ.region.flags> & 04000) && (<src.targ.link>!=04fffffff)
			src.sysmessage You can't carve <src.targ.name> here
			return 1
		end if
		return 0
	elseif <src.targ.type> == t_tree
		return 0
	end if
	return 1

[ITEMDEF i_thorn_infernal]
NAME=Infernal Thorn
ID=0f51
DAM=16,28

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Infernal Weapon
DESCRIPTION=Infernal Thorn

RESOURCES=6 i_ingot_magma
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={60 80}
	COLOR=color_w_infernal

On=@Damage
	if !<cont>
		return 1
	elseif !<cont.ischar>
		return 1
	elseif <cont.serial>==<src.serial>
		return 1
	endif
	more2 = {3 15}
	f_damage_fencing
	if <eval(<cont.fencing>)> > <eval(rand(1160))>
		more2 = <more2> + 13
	endif
	src.damage <more2>
	f_crash_fencing
	return 1

On=@Equip
	if <src.plot1> & plotmask_paladin
		src.message You can't use this weapon of darkness!
		src.damage {16 28}
		src.sfx 0108
		unequip
		return 1
	endif
	src.sfx 0107

On=@Targon_ground
	if <src.account.plevel> > 1
		src.sysmessage Turn off GM Mode first!
		return 1
	endif

On=@Targon_item
	if <src.targ.type>==t_corpse
		if (<src.targ.region.flags> & 04000) && (<src.targ.link>!=04fffffff)
			src.sysmessage You can't carve <src.targ.name>
			return 1
		endif
		return 0
	elseif (<src.targ.type> == t_tree) || (<src.targ.type> == t_log) || (<src.targ.type> == t_fish)
		return 0
	endif
	return 1

[ITEMDEF i_hammer_infernal]
NAME=Infernal Hammer
ID=0143c
DAM=19,46

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Infernal Weapon
DESCRIPTION=Infernal Hammer

RESOURCES=36 i_ingot_magma
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={60 80}
	COLOR=color_w_infernal

On=@Damage
	if !<cont>
		return 1
	endif
	if !<cont.ischar>
		return 1
	endif
	more2 = {6 33}
	f_damage_mace
	if <eval(<cont.macefighting>)> > <eval(rand(1160))>
		more2 = <more2> + 13
	endif
	src.damage <more2>
	f_crash_mace
	return 1

On=@Dclick
	equip
	return 1


On=@Equip
	if <src.plot1> & plotmask_paladin
		src.message You can't use this weapon of darkness!
		src.damage {19 46}
		src.sfx 0108
		unequip
		return 1
	endif
	src.sfx 0107

[ITEMDEF i_fork_infernal]
NAME=Infernal Fork
ID=01404
DAM=17,45

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Infernal Weapon
DESCRIPTION=Infernal Fork

RESOURCES=24 i_ingot_magma
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={60 80}
	COLOR=color_w_infernal

On=@Equip
	if <src.plot1> & plotmask_paladin
		src.message You can't use this weapon of darkness!
		src.damage {17 45}
		src.sfx 0108
		unequip
		return 1
	endif
	src.sfx 0107

On=@Damage	// 1d29+3 = 4-32
	if !<cont>
		return 1
	elseif !<cont.ischar>
		return 1
	elseif <cont.serial>==<src.serial>
		return 1
	endif
	more2 = {4 32}
	f_damage_fencing
	if <eval(<cont.fencing>)> > <eval(rand(1160))>
		more2 = <more2> + 13
	endif
	src.damage <more2>
	f_crash_spear
	return 1

On=@Targon_ground
	if <src.account.plevel> > 1
		src.sysmessage Turn off GM Mode first!
		return 1
	endif

On=@Targon_item
	if <src.targ.type>==t_corpse
		if !((<src.targ.region.flags> & 04000) && (<src.targ.link>!=04fffffff))
			return 0
		endif
		src.sysmessage You can't carve <src.targ.name>
	endif
	return 1

[ITEMDEF i_sword_infernal]
NAME=Infernal Sword
ID=0f60
DAM=18,46

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Infernal Weapon
DESCRIPTION=Infernal Sword

RESOURCES=24 i_ingot_magma
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={60 80}
	COLOR=color_w_infernal

On=@Damage	// 2d15+3 = 5-33
	if !<cont>
		return 1
	elseif !<cont.ischar>
		return 1
	elseif <cont.serial>==<src.serial>
		return 1
	endif
	more2 = {5 33}
	f_damage_sword
	if <eval(<cont.swordsmanship>)> > <eval(rand(1160))>
		more2 = <more2> + 13
	endif
	src.damage <more2>
	f_crash_sword
	return 1

On=@Equip
	if <src.plot1> & plotmask_paladin
		src.message You can't use this weapon of darkness!
		src.damage {18 46}
		src.sfx 0108
		unequip
		return 1
	endif
	src.sfx 0107

On=@Targon_ground
	return 1

On=@Targon_item
	if <src.targ.type>==t_corpse
		if !((<src.targ.region.flags> & 04000) && (<src.targ.link>!=04fffffff))
			return 0
		endif
		src.sysmessage You can't carve <src.targ.name>
	endif
	return 1

[ITEMDEF i_claw_infernal]
NAME=Infernal Claw
ID=013b5
DAM=17,43

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Infernal Weapon
DESCRIPTION=Infernal Claw

RESOURCES=20 i_ingot_magma
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={60 80}
	COLOR=color_w_infernal

On=@Damage	// 2d14+2 = 4-30
	if !<cont>
		return 1
	elseif !<cont.ischar>
		return 1
	elseif <cont.serial>==<src.serial>
		return 1
	endif
	more2 = {4 30}
	f_damage_sword
	if <eval(<cont.swordsmanship>)> > <eval(rand(1160))>
		more2 = <more2> + 13
	endif
	src.damage <more2>
	f_crash_sword
	return 1

On=@Equip
	if <src.plot1> & plotmask_paladin
		src.message You can't use this weapon of darkness!
		src.damage {17 43}
		src.sfx 0108
		unequip
		return 1
	endif
	src.sfx 0107

On=@Targon_ground
	return 1

On=@Targon_item
	if <src.targ.type>==t_corpse
		if !((<src.targ.region.flags> & 04000) && (<src.targ.link>!=04fffffff))
			return 0
		endif
		src.sysmessage You can't carve <src.targ.name>
	endif
	return 1

[ITEMDEF i_blade_infernal]
NAME=Infernal Blade
ID=013b9
DAM=19,47

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Infernal Weapon
DESCRIPTION=Infernal Blade

RESOURCES=28 i_ingot_magma
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={60 80}
	COLOR=color_w_infernal

On=@Damage	// 4d8+2 = 6-34
	if !<cont>
		return 1
	elseif !<cont.ischar>
		return 1
	elseif <cont.serial>==<src.serial>
		return 1
	endif
	more2 = {6 34}
	f_damage_sword
	if <eval(<cont.swordsmanship>)> > <eval(rand(1160))>
		more2 = <more2> + 13
	endif
	src.damage <more2>
	f_crash_axe
	return 1

On=@Equip
	if <src.plot1> & plotmask_paladin
		src.message You can't use this weapon of darkness!
		src.damage {19 47}
		src.sfx 0108
		unequip
		return 1
	endif
	src.sfx 0107

On=@Targon_ground
	return 1

On=@Targon_item
	if <src.targ.type>==t_corpse
		if !((<src.targ.region.flags> & 04000) && (<src.targ.link>!=04fffffff))
			return 0
		endif
		src.sysmessage You can't carve <src.targ.name>
	endif
	return 1

//##########
// Dark weapon
//##########

[ITEMDEF 06C4B]
//Dark Bad Axe
DEFNAME=DARK_BAD_AXE
NAME=Dark Bad Axe
ID=0f45
DAM=19,46

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Bad Axe

RESOURCES=32 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={190 460}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 32

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06C4C]
//Dark Slasher
DEFNAME=DARK_SLASHER
NAME=Dark Slasher
ID=013fa
DAM=19,51

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Slasher

RESOURCES=28 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={190 510}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 28

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06C4D]
//Dark Kibrid
DEFNAME=DARK_KIBRID
NAME=Dark Kibrid
ID=0f4b
DAM=18,48

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Kibrid

RESOURCES=24 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={180 480}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 24

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06C4E]
//Dark War Axe
DEFNAME=DARK_WAR_AXE
NAME=Dark War Axe
ID=013af
DAM=22,40

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark War Axe

RESOURCES=32 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={220 400}
	COLOR=color_w_dark


On=@Equip
	f_destroy_dark 32

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06668]
//Dark Thorn
DEFNAME=DARK_THORN
NAME=Dark Thorn
ID=0f51
DAM=16,28

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Thorn

RESOURCES=6 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={160 280}
	COLOR=color_w_dark


On=@Equip
	f_destroy_dark 6

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06C4F]
//Dark Hammer
DEFNAME=DARK_HAMMER
NAME=Dark Hammer
ID=0143c
DAM=19,46

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Hammer

RESOURCES=36 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={190 460}
	COLOR=color_w_dark

On=@Dclick
	equip
	return 1

On=@Equip
	f_destroy_dark 36

[ITEMDEF 06C50]
//Dark Mace
DEFNAME=DARK_MACE
NAME=Dark Mace
ID=0f5c
DAM=21,45

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Mace

RESOURCES=12 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={210 450}
	COLOR=color_w_dark

On=@Dclick
	equip
	return 1

On=@Equip
	f_destroy_dark 12

[ITEMDEF 06C51]
//Dark Maul
DEFNAME=DARK_MAUL
NAME=Dark Maul
ID=0143a
DAM=23,43

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Maul

RESOURCES=20 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={230 430}
	COLOR=color_w_dark

On=@Dclick
	equip
	return 1

On=@Equip
	f_destroy_dark 20

[ITEMDEF 06C52]
//Dark Ram
DEFNAME=DARK_RAM
NAME=Dark Ram
ID=01438
DAM=21,49

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Ram

RESOURCES=32 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={210 490}
	COLOR=color_w_dark

On=@Dclick
	equip
	return 1

On=@Equip
	f_destroy_dark 32

[ITEMDEF 06C53]
//Dark Stern
DEFNAME=DARK_STERN
NAME=Dark Stern
ID=01406
DAM=23,43

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Stern

RESOURCES=28 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={230 430}
	COLOR=color_w_dark

On=@Dclick
	equip
	return 1

On=@Equip
	f_destroy_dark 28

[ITEMDEF 06C54]
//Dark Fork
DEFNAME=DARK_FORK
NAME=Dark Fork
ID=01404
DAM=17,45

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Fork

RESOURCES=24 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={170 450}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 24

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06666]
//Dark Dirk
DEFNAME=DARK_DIRK
NAME=Dark Dirk
ID=0f5e
DAM=18,42

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Dirk

RESOURCES=20 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={180 420}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 20

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06667]
//Dark Cutlass
DEFNAME=DARK_CUTLASS
NAME=Dark Cutlass
ID=01440
DAM=19,41

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Cutlass

RESOURCES=16 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={190 410}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 16

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06665]
//Dark Katana
DEFNAME=DARK_KATANA
NAME=Dark Katana
ID=013fe
DAM=18,39

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Katana

RESOURCES=16 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={180 390}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 16

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06669]
//Dark Kryss
DEFNAME=DARK_KRYSS
NAME=Dark Kryss
ID=01400
DAM=16,41

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Kryss

RESOURCES=16 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={160 410}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 16

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06670]
//Dark Sword
DEFNAME=DARK_SWORD
NAME=Dark Sword
ID=0f60
DAM=18,46

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Sword

RESOURCES=24 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={180 460}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 24

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06671]
//Dark Claw
DEFNAME=DARK_CLAW
NAME=Dark Claw
ID=013b5
DAM=17,43

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Claw

RESOURCES=20 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={170 430}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 20

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[ITEMDEF 06672]
//Dark Blade
DEFNAME=DARK_BLADE
NAME=Dark Blade
ID=013b9
DAM=19,47

CATEGORY=Provisions - Weapons - Color Weapons
SUBSECTION=Dark Weapon
DESCRIPTION=Dark Blade

RESOURCES=28 i_ingot_bloodrock
SKILLMAKE=BLACKSMITHING 100.0, ARMSLORE 100.0

On=@Create
	HITPOINTS={190 470}
	COLOR=color_w_dark

On=@Equip
	f_destroy_dark 28

On=@Targon_ground
	return 1

On=@Targon_item
	return 1

[EOF]