// Color Crossbows and Heavy crossbows
// Magic bows
// Superior and Exceptional bows, crossbows, heavy crossbows

// 10.11.2001, MoNK: i_bow_sup -> i_bow_superior
// 31.10.2001, MoNK: disable to orcs use elven bow
// 03.10.2001, MoNK: elven bow damage changed
// 30.05.2001, MoNK: critical hits is randomized
// 26.05.2001, MoNK: some changes in check for skills, correct damage functions for magic bows
// 16.05.2001, MoNK: f_damage_xbow, WEIGHT= for exc. and sup. bows removed
// 25.04.2001, MoNK: calculate of damage is on

//######################
// Color Heavy Crossbows
//######################
[ITEMDEF 068c2]
DEFNAME=i_h_xbow_gold
NAME=Hand of Flame
ID=i_crossbow_heavy
REPAIR=0
DAM=11,56
REQSTR=80
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_newgold, 1 i_wire_gold
SKILLMAKE=BOWCRAFT 95.0, BLACKSMITHING 60.0, magery 80.0

On=@Create
	HITPOINTS={41 49}
	color=color_o_gold

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Hand of Flame

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 80.0) || (<src.archery> < 90.0) || (<src.magery> < 70.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 5
	endif
	if <src.brain>==brain_dragon
		if rand(5)==1
			more2 = <eval(5 * <more2>)>
			src.effect 3,i_fx_curse,6,15,1
			src.sfx snd_spell_curse
		else
			more2 = <more2> + <more2>
		endif
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 066fc]
DEFNAME=i_h_xbow_silver
NAME=Hand of Holyness
ID=i_crossbow_heavy
REPAIR=0
DAM=6,62
REQSTR=85
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_newsilver, 1 i_wire_silver
SKILLMAKE=BOWCRAFT 105.0, BLACKSMITHING 75.0, magery 80.0

On=@Create
	HITPOINTS={31 39}
	color=color_o_silver

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Hand of Holyness

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 85.0) || (<src.archery> < 95.0) || (<src.magery> < 70.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d10+12
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 6
	endif
	if (<src.brain> == brain_undead) || (<src.plot1> & plotmask_vampire)
		if rand(7)==1
			more2 = <more2> + (<more2> / 2)
			src.sfx snd_spell_poison
			src.spelleffect s_poison 1000
		endif
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 068c0]
DEFNAME=i_h_xbow_verite
NAME=Verite Heavy crossbow
ID=i_crossbow_heavy
REPAIR=0
DAM=6,64
REQSTR=80
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_verite, i_wire_iron
SKILLMAKE=BOWCRAFT 96.0, BLACKSMITHING 62.5

On=@Create
	HITPOINTS = {31 39}
	color = color_o_verite

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Verite Heavy crossbow

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 80.0) || (<src.archery> < 90.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d10+14
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 8
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 068c1]
DEFNAME=i_h_xbow_valorite
NAME=Valorite Heavy crossbow
ID=i_crossbow_heavy
REPAIR=0

DAM=6,65
REQSTR=85
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_valorite, i_wire_iron
SKILLMAKE=BOWCRAFT 97.0, BLACKSMITHING 65.0

On=@Create
	HITPOINTS={31 39}
	color=color_o_valorite

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Valorite Heavy crossbow

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 82.5) || (<src.archery> < 92.5)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d10+15
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 9
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 066fb]
DEFNAME=i_h_xbow_dwarf
NAME=Dwarf Heavy crossbow
ID=i_crossbow_heavy
REPAIR=0

DAM=6,66
REQSTR=90
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_dwarf, 1 i_wire_iron
SKILLMAKE=BOWCRAFT 98.0, BLACKSMITHING 67.5

On=@Create
	color=color_o_dwarf
	HITPOINTS={31 39}

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Dwarf Heavy crossbow

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 85.0) || (<src.archery> < 95.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d10+16
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 10
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF i_h_xbow_crystal]
NAME=Hand of Iternity
ID=i_crossbow_heavy
REPAIR=0

DAM=6,66
REQSTR=90
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_crystal, 1 i_wire_copper
SKILLMAKE=BOWCRAFT 98.0, BLACKSMITHING 67.5

On=@Create
	color=color_o_crystal
	HITPOINTS={31 39}

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Hand of Iternity

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 85.0) || (<src.archery> < 95.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d10+16
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 10
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF i_h_xbow_shadow]
NAME=Hand of Shadows
ID=i_crossbow_heavy
REPAIR=0

DAM=6,67
REQSTR=95
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_shadow, 1 i_wire_copper
SKILLMAKE=BOWCRAFT 99.0, BLACKSMITHING 70.0

On=@Create
	color=color_o_shadow
	HITPOINTS={31 39}

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Hand of Shadows

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 87.5) || (<src.archery> < 97.5)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

	if <src.karma> > 0
		src.message Your cannot resist the touch of Shadows!
		src.damage {10 25}
		unequip
		return 1
	else
		src.message Welcome Lord of shadows!
		src.karma = (<src.karma> - 1)
		return 0
	endif

On=@Damage	// 5d10+17
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 11
		if <cont.isgm>
			cont.sysmessage Critical hit - damage is <eval(<more2>)>
		endif
	endif
	f_damage_xbow
	if rand(5)==1
		if <src.mana> >= <more2>
			src.mana = (<src.mana> - <more2>)
		else
			src.mana = 0
		endif
		src.sfx 0df
		return 1
	endif
	src.damage <more2>
	src.update
	more2 = 0
	return 1

[ITEMDEF 066fd]
DEFNAME=i_h_xbow_magma
NAME=Infernal Hand
ID=i_crossbow_heavy
REPAIR=0

DAM=6,68
REQSTR=125
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_magma, 1 i_wire_copper
SKILLMAKE=BOWCRAFT 115.0, BLACKSMITHING 90.0

On=@Create
	HITPOINTS={31 39}
	color = color_o_magma

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Infernal Hand

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.archery> < 100.0) || (<src.tactics> < 100.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

	if <src.magicresistance> < 50.0
		src.hits = {1 5}
		src.stamina = 0
		src.mana = 0
		src.message You feel the fire in your veins!
		unequip
		return 1
	elseif <src.magicresistance> < 100.0
		src.damage (100.0 - <src.magicresistance>)
		src.message You feel the touch of Infernal Hand!
		return 0
	else
		src.message You feel the power of Infernal Hand!
		return 0
	endif

On=@Damage	// 5d10+18
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 12
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 066fe]
DEFNAME=i_h_xbow_mytheril
NAME=Mythic Heavy crossbow
ID=i_crossbow_heavy
REPAIR=0

DAM=6,68
REQSTR=125
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_mytheril, 1 i_wire_iron
SKILLMAKE=BOWCRAFT 115.0, BLACKSMITHING 90.0

On=@Create
	HITPOINTS={31 39}
	color=color_o_mytheril

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Mythic Heavy crossbow

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 100.0) || (<src.archery> < 100.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

	if <src.magery> < 80.0
		src.stamina 0
		src.message You feel yourself terrible tiered... Some kind of strange magic...
	endif

On=@Damage	// 5d10+19
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 12
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 066ff]
DEFNAME=i_h_xbow_obsidian
NAME=Hand of Horror
ID=i_crossbow_heavy
REPAIR=0

DAM=6,68
REQSTR=125
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_obsidian, 1 i_wire_copper
SKILLMAKE=BOWCRAFT 115.0, BLACKSMITHING 90.0

On=@Create
	color=color_o_obsidian
	HITPOINTS={131 139}

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Hand of Horror

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 100.0) || (<src.archery> < 100.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

	if <src.fame> < 5000
		src.mana 0
		src.stamina 0
		src.message Your weak soul cannot resist the blow of Horror!
		src.flags=(<src.flags>|statf_freeze)
		src.update
		unequip
		return 1
	elseif <src.fame> < 7500
		src.mana=(<src.mana>-(<src.int>/2))
		src.stamina=(<src.stamina>-(<src.dex>/2)
		src.emote feel the blow of Horror...
		return 0
	else
		src.message Welcome Master of Horror!..
		return 0
	endif

On=@Damage	// 5d10+19
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 12
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF i_h_xbow_bloodrock]
NAME=Hand of Darkness
ID=i_crossbow_heavy
REPAIR=0

DAM=6,69
REQSTR=135
TWOHANDS=Y

RESOURCES=100 i_board, 25 i_ingot_bloodrock, 1 i_wire_copper, 1 i_dark_stone
SKILLMAKE=BOWCRAFT 115.0, BLACKSMITHING 90.0

On=@Create
	color=color_o_bloodrock
	HITPOINTS={131 139}

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Hand of Darkness

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 100.0) || (<src.archery> < 100.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

	if <src.dex> < 115
		src.message Thee cannot manage this <name>!
		src.flags=(<src.flags>|statf_freezed)
		src.update
		unequip
		return 1
	endif

On=@Damage	// 5d10+20
	more2 = {11 56}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 13
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

//#################
// Magic crossbows
//#################
[ITEMDEF 068d0]
DEFNAME=i_xbow_gold
NAME=Flame touch
ID=i_crossbow
DAM=8,48

REQSTR=90
TWOHANDS=Y
REPAIR=0

RESOURCES=80 i_board, 15 i_ingot_newgold, 1 i_wire_gold
SKILLMAKE=BOWCRAFT 85.0, BLACKSMITHING 45.0, magery 60.0

On=@Create
	HITPOINTS={31 80}
	color=color_o_gold

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Flame touch

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> <70.0) || (<src.archery> < 80.0) || (<src.magery> < 50.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d8+8
	more2 = {8 43}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 5
	endif
	if <src.brain>==brain_dragon
		if rand(5)==1
			more2 = <eval(5 * <more2>)>
			src.effect 3,i_fx_curse,6,15,1
			src.sfx snd_spell_curse
		else
			more2 = <more2> + <more2>
		endif
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 068d3]
DEFNAME=i_xbow_silver
NAME=Holy touch
ID=i_crossbow
DAM=8,49

REQSTR=90
TWOHANDS=Y
REPAIR=0

RESOURCES=80 i_board, 15 i_ingot_newsilver, 1 i_wire_silver
SKILLMAKE=BOWCRAFT 100.1, BLACKSMITHING 45.0, magery 60.0

On=@Create
	HITPOINTS={31 80}
	color=color_o_silver

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Holy touch

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 70.0) || (<src.archery> < 80.0) || (<src.magery> < 50.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d8+9
	more2 = {8 43}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 6
	endif
	if (<src.brain> == brain_undead) || (<src.plot1> & plotmask_vampire)
		if rand(5)==1
			more2 = <more2> + (<more2> / 2)
			src.sfx snd_spell_poison
			src.spelleffect s_poison 1000
		endif
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 068d1]
DEFNAME=i_xbow_verite
NAME=Verite crossbow
ID=i_crossbow
DAM=8,51

REQSTR=70
TWOHANDS=Y
REPAIR=0

RESOURCES=80 i_board, 15 i_ingot_verite, 1 i_wire_iron
SKILLMAKE=BOWCRAFT 85.0, BLACKSMITHING 45.0

On=@Create
	HITPOINTS={31 80}
	color=color_o_verite

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Verite crossbow

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 70.0) || (<src.archery> < 80.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d8+11
	more2 = {8 43}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 8
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 068d2]
DEFNAME=i_xbow_valorite
NAME=Valorite crossbow
ID=i_crossbow
DAM=8,52

REQSTR=70
TWOHANDS=Y
REPAIR=0

RESOURCES=80 i_board, 15 i_ingot_valorite, 1 i_wire_iron
SKILLMAKE=BOWCRAFT 87.5, BLACKSMITHING 47.5

On=@Create
	HITPOINTS={31 80}
	color=color_o_valorite

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Valorite crossbow

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 75.0) || (<src.archery> < 85.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d8+12
	more2 = {8 43}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 9
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF i_xbow_crystal]
NAME=Touch of Iternity
ID=i_crossbow
REPAIR=0

DAM=8,53
REQSTR=100
TWOHANDS=Y

RESOURCES=80 i_board, 15 i_ingot_crystal, 1 i_wire_copper
SKILLMAKE=BOWCRAFT 90.0, BLACKSMITHING 50.0

On=@Create
	HITPOINTS={31 39}
	color=color_o_crystal

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Touch of Iternity

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 85.0) || (<src.archery> < 92.5)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d8+13
	more2 = {8 43}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 10
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF i_xbow_shadow]
NAME=Touch of Shadows
ID=i_crossbow
REPAIR=0

DAM=8,54
REQSTR=95
TWOHANDS=Y

RESOURCES=80 i_board, 15 i_ingot_shadow, 1 i_wire_copper
SKILLMAKE=BOWCRAFT 92.5, BLACKSMITHING 55.0

On=@Create
	HITPOINTS={31 39}
	color=color_o_shadow

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Touch of Shadows

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 90.0) || (<src.archery> < 95.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

	if <src.karma> > 999
		src.message Your soul too weak to use this <name>.
		src.damage {5 25}
		unequip
		return 1
	else
		return 0
	endif

On=@Damage	// 5d8+14
	more2 = {8 43}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 11
	endif
	f_damage_xbow
	if rand(5)==1
		if <src.mana> >= <more2>
			src.mana = (<src.mana> - <more2>)
		else
			src.mana = 0
		endif
		src.sfx 0df
		return 1
	endif
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF i_xbow_bloodrock]
NAME=Touch of Darkness
ID=i_crossbow
REPAIR=0

DAM=8,56
REQSTR=100
TWOHANDS=Y

RESOURCES=80 i_board, 25 i_ingot_bloodrock, 1 i_wire_copper, 1 i_dark_stone
SKILLMAKE=BOWCRAFT 100.0, BLACKSMITHING 70.0

On=@Create
	HITPOINTS={31 39}
	color=color_o_bloodrock

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic crossbows
DESCRIPTION=Touch of Darkness

On=@Equip
	if <type>==t_weapon_bow
		type=t_weapon_xbow
	endif

	if (<src.tactics> < 95.0) || (<src.archery> < 100.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d8+16
	more2 = {8 43}
	if <eval(<cont.archery>)> > <eval(rand(1160))>
		more2 = <more2> + 12
	endif
	f_damage_xbow
	src.damage <more2>
	more2 = 0
	return 1

//############
// Magic bows
//############
[ITEMDEF 068e0]
DEFNAME=i_bow_rangers
NAME=Rangers bow
ID=i_bow
DAM=7,21

REQSTR=70
TWOHANDS=Y

WEIGHT=3.4

RESOURCES=20 i_board, 1 i_wire_silver
SKILLMAKE=BOWCRAFT 95.0

On=@Create
	HITPOINTS={31 60}
	color=color_o_verite

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic Bows
DESCRIPTION=Rangers bow

On=@Equip
	if (<src.archery> < 60.0) || (<src.magery> < 50.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 2d8+5 = 7-21
	more2 = {7 21}
	f_damage_bow
	if rand(10)==1
		src.say Got it!
		src.damage <eval(<more2> + <more2>)>
		src.effect 3,i_fx_curse,6,15,1
		src.sfx snd_spell_harm
	endif

[ITEMDEF 068e1]
DEFNAME=i_bow_barbarian
NAME=Barbarian bow
ID=i_bow
DAM=7,21

REQSTR=70
TWOHANDS=Y

WEIGHT=3.4

RESOURCES=20 i_board, 50 i_reag_nightshade, 1 i_wire_copper
SKILLMAKE=BOWCRAFT 95.0

On=@Create
	HITPOINTS={31 60}
	color=VAMPIRE_ARMOR_color

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic Bows
DESCRIPTION=Barbarian bow

On=@Equip
	if (<src.archery> < 60.0) || (<src.magery> < 50.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 2d8+5 = 7-21
	more2 = {7 21}
	f_damage_bow
	if rand(20)==1
		say Eeeeeehagh!
		more2 = <more2> + <more2>
		src.effect 3,i_fx_curse,6,15,1
		src.sfx snd_spell_harm
		if !(<src.flags> & statf_poisoned)
			src.sfx snd_spell_poison
			src.spelleffect s_poison 1000
		endif
	endif
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 068e2]
DEFNAME=i_bow_penetrator
NAME=Penetrator
ID=i_bow
DAM=8,48

REQSTR=105
TWOHANDS=Y

WEIGHT=7.2

RESOURCES=50 i_board, 50 i_ingot_iron, 1 i_wire_iron
SKILLMAKE=BOWCRAFT 100.0

On=@Create
	HITPOINTS={41 80}
	color=KNIGHT_ARMOR_color

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic Bows
DESCRIPTION=Penetrator

On=@Equip
	if (<src.plot1> & 6)
		src.message You can't use this heavy bow.
		unequip
		return 1
	elseif (<src.archery> < 90.0) || (<src.tactics> < 80.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif

On=@Damage	// 5d9+3 = 8-48
	more2 = {8 48}
	f_damage_bow
	src.damage <more2>
	sfx 0223
	src.sfx 0224
	more2 = 0
	return 1

[ITEMDEF 068e3]
DEFNAME=i_bow_pain
NAME=Bow of Pain
ID=i_bow
DAM=11,31

REQSTR=100
TWOHANDS=Y

WEIGHT=6.0

RESOURCES=100 i_board, 100 i_reag_sulfur_ash, 1 i_wire_copper
SKILLMAKE=BOWCRAFT 110.0, magery 80.0

On=@Create
	HITPOINTS={51 90}
	color=02b

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic Bows
DESCRIPTION=Bow of Pain

On=@Equip
	if (<src.tactics> < 90.0) || (<src.archery><95.0) || (<src.magery><70.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	elseif <src.KARMA> > 5000
		say Take your hand off you weak soul!
		src.damage {40 60}
		src.spelleffect 51 750
		src.sfx 015e
		unequip
		return 1
	elseif <src.karma> > 2000
		say Your way is too right. You can't use me!
		unequip
		return 1
	elseif <src.fame> < 2000
		src.message You must be more famous to use this bow!
		unequip
		return 1
	endif

On=@Damage	// 5d5+6 = 11-31
	more2 = {11 31}
	f_damage_bow
	if rand(7)==1
		more2 = <more2> + (<more2> / 3)
		src.effect 3,i_fx_curse,6,15,1
		src.sfx 0210
	endif
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 068e4]
DEFNAME=i_bow_glory
NAME=Bow of Glory
ID=i_bow
DAM=11,31

REQSTR=100
TWOHANDS=Y

WEIGHT=6.0

RESOURCES=100 i_board, 100 i_reag_black_pearl, 1 i_wire_silver
SKILLMAKE=BOWCRAFT 110.0, magery 80.0

On=@Create
	HITPOINTS={51 90}
	color=color_o_valorite

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic Bows
DESCRIPTION=Bow of Glory

On=@Equip
	if (<src.tactics> < 90.0) || (<src.archery> < 95.0) || (<src.magery> < 70.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	elseif <src.karma> < -1000
		src.message Get off, unclean!
		src.damage {40 60}
		src.sfx snd_SPELL_LIGHTNING
		unequip
		return 1
	elseif <src.karma> < 2000
		src.message Your soul is not good enough to follow the Heaven.
		unequip
		return 1
	elseif <src.fame> < 2000
		src.message You must be more famous to use this bow!
		unequip
		return 1
	endif

On=@Damage	// 5d5+6 = 11-31
	more2 = {11 31}
	f_damage_bow
	if rand(7)==1
		more2 = <more2> + (<more2> / 3)
		src.effect 3,i_fx_explode,6,15,1
		src.sfx 015f
	endif
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 068e5]
//Bow of Fire
DEFNAME=i_bow_fire
NAME=Bow of Fire
ID=i_bow
DAM=12,32	// 4d6+8

REQSTR=105
TWOHANDS=Y

TDATA4=036e4

WEIGHT=6.0

RESOURCES=150 i_board, 150 i_reag_sulfur_ash, 1 i_wire_copper
SKILLMAKE=BOWCRAFT 115.0, magery 90.0

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic Bows
DESCRIPTION=Bow of Fire

On=@Create
	HITPOINTS={31 60}
	color=color_o_bloodrock

On=@Equip
	if <src.tactics> < 100.0
		src.message Your tactics is too low to use this <name>.
		unequip
		return 1
	endif
	if <src.archery> < 105.0
		src.message Your archery skill is too low to use this <name>.
		unequip
		return 1
	endif
	if <src.magery> < 80.0
		src.message Your magery skill is too low to use this <name>.
		unequip
		return 1
	endif
	if <src.karma> > 2000
		say Take your hand off you weak soul!
		src.damage {40 60}
		src.effect 3,i_fire_column,6,15,1
		src.sfx 015e
		unequip
		return 1
	endif
	if <src.karma> > 0
		say Your way is too right. You can't use me!
		unequip
		return 1
	endif
	if <src.fame> < 5000
		src.message You must be more famous to use this bow!
		unequip
		return 1
	endif

	src.sfx 0227
	src.message Catch a flame!
	src.effect 3,03709,6,15,1

On=@Damage	// 4d6+8
	more2 = {8 32}
	f_damage_bow
	if rand(10)==1
		src.spelleffect 51 750
	else
		src.damage <more2>
	endif
	more2 = 0
	return 1

[ITEMDEF 068e6]
DEFNAME=i_bow_heaven
NAME=Bow of Heaven
ID=i_bow
DAM=1,2	//4d6+8

REQSTR=105
TWOHANDS=Y
TDATA4=03818

WEIGHT=6.0

RESOURCES=150 i_board, 150 i_reag_black_pearl, 1 i_wire_silver
SKILLMAKE=BOWCRAFT 115.0, magery 90.0

On=@Create
	HITPOINTS={31 60}
	color=color_o_silver

CATEGORY=Provisions - Weapons - Magic
SUBSECTION=Magic Bows
DESCRIPTION=Bow of Heaven

On=@Equip
	if (<src.tactics> < 100.0) || (<src.archery> < 105.0) || (<src.magery> < 80.0)
		src.message Thee too unexpirienced to use this <name>.
		unequip
		return 1
	endif
	if <src.karma> < 0
		src.message Get off, unclean!
		src.damage {40 60}
		src.spelleffect 30 750
		src.sfx snd_SPELL_LIGHTNING
		unequip
		return 1
	endif
	if <src.karma> < 5000
		src.message Your soul is not good enough to follow the Heaven.
		unequip
		return 1
	endif
	if <src.fame> < 5000
		src.message You must be more famous to use this bow!
		unequip
		return 1
	endif

	src.sfx 01ea
	src.effect 3,0377a,6,15,1
	return 0

On=@Damage
	more2 = {8 32}
	f_damage_bow
	if rand(10)==1
		src.spelleffect 30 500
		src.spelleffect 30 500
		dorand 2
			src.sfx 0206
			src.sfx 028
		enddo
	else
		src.damage <more2>
	endif
	more2 = 0
	return 1

//############################

[ITEMDEF 05000]
//Superior Bow
DEFNAME=i_bow_superior
ID=i_bow
NAME=Superior Bow
DAM=9,42

REQSTR=30
TWOHANDS=Y

SKILLMAKE=45.0 BOWCRAFT
RESOURCES=10 i_log, 1 i_thread

CATEGORY=Provisions - Weapons
SUBSECTION=Bows - Exceptional
DESCRIPTION=Superior Bow

On=@Create
	HITPOINTS={41 80}

On=@Damage	// 4d9+6
	more2 = {10 42}
	f_damage_bow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 05001]
//Superior Crossbow
DEFNAME=i_xbow_superior
NAME=Superior Crossbow
ID=i_crossbow
DAM=8,44

REQSTR=30
TWOHANDS=Y

VALUE={130 180}

RESOURCES=12 i_log, 1 i_thread
SKILLMAKE=55.0 BOWCRAFT

CATEGORY=Provisions - Weapons
SUBSECTION=Bows - Exceptional
DESCRIPTION=Superior Crossbow

On=@Create
	HITPOINTS={41 100}

On=@Damage	// 5d8+4
	more2 = {9 44}
	f_damage_bow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 05002]
//Superior Heavy Crossbow
DEFNAME=i_hxbow_superior
ID=i_crossbow_heavy
NAME=Superior Heavy Crossbow
DAM=6,58

REQSTR=40
TWOHANDS=Y

SKILLMAKE=65.0 BOWCRAFT
RESOURCES=15 i_log, i_wire_iron, 1 i_ingot_iron

CATEGORY=Provisions - Weapons
SUBSECTION=Bows - Exceptional
DESCRIPTION=Superior Heavy Crossbow

On=@Create
	HITPOINTS={41 120}

On=@Damage	// 5d10+7
	more2 = {12 57}
	f_damage_bow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 05003]
//Exceptional Bow
DEFNAME=i_bow_excep
ID=i_bow
NAME=Exceptional Bow
DAM=9,44

REQSTR=30
TWOHANDS=Y

RESOURCES=15 i_log, 1 i_thread
SKILLMAKE=75.5 BOWCRAFT

CATEGORY=Provisions - Weapons
SUBSECTION=Bows - Exceptional
DESCRIPTION=Exceptional Bow

On=@Create
	HITPOINTS={51 120}

On=@Damage	// 4d9+8
	more2 = {12 44}
	f_damage_bow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 05004]
//Exceptional Crossbow
DEFNAME=i_xbow_excep
ID=i_crossbow
NAME=Exceptional Crossbow
DAM=8,46

REQSTR=30
TWOHANDS=Y

RESOURCES=20 i_log, i_thread, 1 i_ingot_iron
SKILLMAKE=85.5 BOWCRAFT

CATEGORY=Provisions - Weapons
SUBSECTION=Bows - Exceptional
DESCRIPTION=Exceptional Crossbow

On=@Create
	HITPOINTS={51 140}

On=@Damage	// 5d8+6
	more2 = {11 36}
	f_damage_bow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 05005]
//Exceptional Heavy Crossbow
DEFNAME=i_hxbow_excep
ID=i_crossbow_heavy
NAME=Exceptional Heavy Crossbow
DAM=6,59

REQSTR=40
TWOHANDS=Y

SKILLMAKE=95.5 BOWCRAFT
RESOURCES=25 i_log, 1 i_wire_iron, 1 i_ingot_iron

CATEGORY=Provisions - Weapons
SUBSECTION=Bows - Exceptional
DESCRIPTION=Exceptional Heavy Crossbow

On=@Create
	HITPOINTS={71 150}

On=@Damage	// 5d10+9
	more2 = {14 59}
	f_damage_bow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF 05006]
DEFNAME=i_bow_elven
NAME=Elven Bow
ID=i_bow
DAM=9,41

REQSTR=50
TWOHANDS=Y

WEIGHT=3.9

RESOURCES=25 i_log, i_wire_silver
SKILLMAKE=100.1 BOWCRAFT, 50.0 magery

CATEGORY=Provisions - Weapons
SUBSECTION=Bows - Exceptional
DESCRIPTION=Elven Bow

On=@Create
	HITPOINTS = {71 120}
	color = 0237

On=@Equip
	src.tactics = (<src.tactics> + 15.0)
	src.archery = (<src.archery> + 10.0)
	if <src.plot1> & plotmask_orc
		unequip
		src.sysmessage You can't use this bow.
		return 1
	endif

On=@Unequip
	src.tactics = (<src.tactics> - 15.0)
	src.archery = (<src.archery> - 10.0)

On=@Damage
	more2 = {9 41}
	f_damage_bow
	src.damage <more2>
	more2 = 0
	return 1

[ITEMDEF i_dark_stone]
NAME=Eye of darkness
ID=i_reag_pumice
WEIGHT=1000.0

[EOF]