// 16.10.2001, MoNK: dyeable potion keg, i_skilltag_alchemy
// 14.10.2001, MoNK: swap tinkering and carpentry for kegs
// 10.10.2001, MoNK: fix for pseudo-filled potion kegs
// 04.10.2001, MoNK: FLIP=0 for potion keg
// 29.09.2001, MoNK: more2 for potions in potion keg
// 26.09.2001, MoNK: new potion keg
// 13.09.2001, MoNK: firestorm potion
// 26.08.2001, MoNK: transform Restoration into Heal, lower Steelskin and Stoneskin effect for dwarfs
// 18.08.2001, MoNK: test: disable Restoration drinking
// 17.08.2001, MoNK: invisibility color, Greate Restoration
// 18.06.2001, MoNK: stoneskin and steelskin effect is lowered

VERSION=0.54

[FUNCTION f_drink_venom]
	return 1
	src.spelleffect s_poison <eval(<argn>)>
	src.sfx snd_spell_poison
	return 1

[ITEMDEF i_keg_potion]
NAME=empty potion keg
ID=i_keg_wood
TYPE=t_container
VALUE={2000 3000}
WEIGHT=40
FLIP=0
DYE=1

RESOURCES=1 i_keg_small, 1 i_barrel_tap
SKILLMAKE=95.0 TINKERING, 80.0 CARPENTRY, t_tinker_tools

CATEGORY=Items by Professions
SUBSECTION=Alchemist
DESCRIPTION=potion keg

On=@Create
	morep = 0,0,0	// morex contains amount of potions stored in keg

On=@Pickup_pack
	if (!<findcont(0)>) && (<morex> != 0)
		name = empty potion keg
		morex = 0
	endif

On=@Pickup_ground
	if (!<findcont(0)>) && (<morex> != 0)
		name = empty potion keg
		morex = 0
	endif

On=@Click
	if <findcont(0)>
		if <morex> == 0
			Dirty potion keg with <findcont(0).name>...
			return 1
		endif
	else
		morex = 0
		name = empty potion keg
	endif
	message <name>
	return 1

On=@DClick
	if <findcont(0)>
		if <morex> == 0
			message This potion keg is too dirty to store potions. Shake it well and remove dirt...
			findcont(0).remove
			return 1
		endif
	else
		if <morex> !=0
			morex = 0
			name = empty potion keg
		endif
	endif
			
	target What potion would you like to fill the keg with?
	return 1

On=@Targon_item
	if <src.action> != 03ffff
		src.sysmessage You can't use this yet!
		return 1
	endif

	if <findcont(0)>
		if <findcont(0).type> != t_potion
			src.spelleffect s_explosion 1000
			src.sfx snd_spell_explosion
			src.message Potion keg is exploding in your hands!
			remove
			return 1
		endif
		// something here
		if <src.targ.baseid> == i_bottle_empty
			// put out one potion
			if <src.restest 1 i_bottle_empty>
				if (<findcont(1).baseid> != <findcont(0).baseid>) || (<findcont(1).type> != t_potion)
					src.message You see strange melted <findcont(1).name> in your keg
					findcont(1).remove
					name = <findcont(0).name> keg (<morex>)
				else
					src.consume 1 i_bottle_empty
					src.bounce <findcont(1).uid>
					src.sfx 0240
				endif
				morex = (<morex> - 1)
				if <morex> == 0
					// potion keg is empty
					name = empty potion keg
					findcont(0).remove
				else
					name = <findcont(0).name> keg (<morex>)
				endif
			else
				src.sysmessage The empty bottle should be in your backpack.
			endif
		else
			if <src.targ.baseid> == <findcont(0).baseid>
				if (<findcont(50)>) || (<morex> > 49)
					src.sysmessage There's no space for further potions.
					return 1
				endif

				src.newitem <src.targ.baseid>
				src.act.cont = <serial>
				src.act.timer = -1
				src.act.more2 = <src.targ.more2>
				src.targ.remove

				src.newitem i_bottle_empty
				src.act.timer = -1
				src.act.bounce
				morex = <morex> + 1
				name = <findcont(0).name> keg (<morex>)
				src.sfx 0240
				src.sysmessage You fill up the keg with a <src.targ.name> potion.
			else
				src.sysmessage You can't use <src.targ.name> on this <findcont(0).name> keg.
			endif
		endif
	else
		// empty potion keg
		if <src.targ.type> != t_potion
			src.sysmessage You can't use <src.targ.name> on this keg.
			return 1
		endif
		// put first potion into potion keg
		src.newitem <src.targ.baseid>
		src.act.cont = <serial>
		src.act.timer = -1
		src.act.more2 = <src.targ.more2>
		src.newitem <src.targ.baseid>
		src.act.cont = <serial>
		src.act.timer = -1
		src.targ.remove
		src.newitem i_bottle_empty
		src.act.timer = -1
		src.act.bounce
		morex = 1
		name = <findcont(0).name> keg (<morex>)
		src.sfx 0240
		src.sysmessage You fill up the keg with a <src.targ.name> potion.
	endif
	return 1

[ITEMDEF i_potion_Agility]
ID=i_bottle_blue
NAME=Agility
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_blood_moss, i_bottle_empty
SKILLMAKE=ALCHEMY 15.1

ON=@Create
	MORE1=s_Agility
	MORE2={ 15.1 60.0 }

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Agility

[ITEMDEF i_potion_AgilityGreat]
ID=i_bottle_BLUE
TYPE=T_POTION
NAME=Greater Agility
TDATA1=i_bottle_empty

RESOURCES=i_reag_blood_moss 3, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 35.1

ON=@Create
	MORE1=s_Agility
	MORE2={ 70.1 80.0 }

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Agility (Greater)

[ITEMDEF i_potion_CureLess]
ID=i_bottle_ORANGE
TYPE=T_POTION
NAME=Lesser Cure
TDATA1=i_bottle_empty

RESOURCES=i_reag_garlic, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 0.1

ON=@Create
	MORE1=s_Cure
	MORE2=40.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Cure (Less)

[ITEMDEF i_potion_Cure]
NAME=Cure
ID=i_bottle_ORANGE
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_garlic 3, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 25.1

ON=@Create
	MORE1=s_Cure
	MORE2=60.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Cure

[ITEMDEF i_potion_CureGreat]
NAME=Greater Cure
ID=i_bottle_ORANGE
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_garlic 6, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 65.1

ON=@Create
	MORE1=s_archcure
	MORE2=101.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Cure (Greater)

[ITEMDEF i_potion_ExplosionLess]
NAME=Lesser Explosion
ID=i_bottle_PURPLE
TYPE=T_POTION
TDATA1=0
RESOURCES=i_reag_sulfur_ash 3, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 5.1

ON=@Create
	MORE1=s_explosion
	MORE2=50.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Explosion (Less)

[ITEMDEF i_potion_Explosion]
NAME=Explosion
ID=i_bottle_PURPLE
TYPE=T_POTION
TDATA1=0
RESOURCES=i_reag_sulfur_ash 5, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 35.1

ON=@Create
	MORE1=s_explosion
	MORE2=80.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Explosion

[ITEMDEF i_potion_ExplosionGreat]
NAME=Greater Explosion
ID=i_bottle_PURPLE
TYPE=T_POTION
TDATA1=0
RESOURCES=i_reag_sulfur_ash 10, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 65.1

ON=@Create
	MORE1=s_explosion
	MORE2=130.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Explosion (Greater)

[ITEMDEF i_potion_HealLess]
NAME=Lesser Heal
ID=i_bottle_YELLOW
RESOURCES=i_reag_ginseng, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 0.1
TYPE=T_POTION
TDATA1=i_bottle_empty

ON=@Create
	MORE1=s_heal
	MORE2=50.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Heal (Less)

[ITEMDEF i_potion_Heal]
NAME=Heal
ID=i_bottle_YELLOW
RESOURCES=i_reag_ginseng 3, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 15.1
TYPE=T_POTION
TDATA1=i_bottle_empty

ON=@Create
	MORE1=s_greater_heal
	MORE2={40.0 60.0}

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Heal

[ITEMDEF i_potion_HealGreat]
NAME=Greater Heal
ID=i_bottle_YELLOW
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_ginseng 7, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 55.1

ON=@Create
	MORE1=s_greater_heal
	MORE2={80.0 100.0}

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Heal (Greater)

[ITEMDEF i_potion_Nightsight]
NAME=Nightsight
ID=i_bottle_BLACK
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_spider_silk 1, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 0.1

ON=@Create
	MORE1=s_night_sight
	MORE2=100.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Nightsight

[ITEMDEF i_potion_PoisonLess]
NAME=Lesser Poison
ID=i_bottle_GREEN
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_nightshade 1, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 0

ON=@Create
	MORE1=s_poison
	MORE2=40.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Poison (Less)

[ITEMDEF i_potion_Poison]
NAME=Poison
ID=i_bottle_GREEN
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_nightshade 2, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 15.1

ON=@Create
	MORE1=s_poison
	MORE2=50.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Poison

[ITEMDEF i_potion_PoisonGreat]
NAME=Greater Poison
ID=i_bottle_GREEN
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_nightshade 4, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 55.1

ON=@Create
	MORE1=s_poison
	MORE2=90.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Poison (Greater)

[ITEMDEF i_potion_PoisonDeadly]
NAME=Deadly Poison
ID=i_bottle_GREEN
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_nightshade 8, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 95.1

ON=@Create
	MORE1=s_poison
	MORE2=105.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Poison (Deadly)

[ITEMDEF i_potion_Refresh]
NAME=Refresh
ID=i_bottle_RED
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_black_pearl, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 0

ON=@Create
	MORE1=s_Refresh
	MORE2=50.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Refresh

[ITEMDEF i_potion_RefreshTotal]
ID=i_bottle_RED
NAME=Total Refresh
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_black_pearl 5, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 25.1

ON=@Create
	MORE1=s_Refresh
	MORE2=100.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Refresh (Total)

[ITEMDEF i_potion_Strength]
ID=i_bottle_WHITE
NAME=Strength
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_mandrake_root 2, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 25.1

ON=@Create
	MORE1=s_strength
	MORE2=60.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Strength

[ITEMDEF i_potion_StrengthGreat]
NAME=Greater Strength
ID=i_bottle_WHITE
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_mandrake_root 5, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 45.1

ON=@Create
	MORE1=s_strength
	MORE2=100.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Strength (Greater)

[ITEMDEF i_potion_Shrink]
ID=i_bottle_WHITE
NAME=Shrink
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_batwing 2, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 65.1

ON=@Create
	MORE1=s_shrink
	MORE2=100.0
	COLOR=color_gray_lt

On=@DClick
	f_drink_venom 1000
	return 1

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Shrink

[ITEMDEF i_potion_Invisibility]
ID=i_bottle_WHITE
NAME=Invisibility
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_worm_heart 4, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 65.1

ON=@Create
	MORE1=s_invisibility
	MORE2=100.0
	COLOR=96

On=@Dropon_ground
	color = 96
	update

On=@Pickup_pack
	color = 96
	update

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Invisibility

[ITEMDEF i_potion_Mana]
ID=i_bottle_WHITE
NAME=Mana Refresh
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_eye_of_newt 3, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 65.1

ON=@Create
	MORE1=s_mana
	MORE2=50.0
	COLOR=color_gray_lt

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Mana Refresh

[ITEMDEF i_potion_ManaTotal]
ID=i_bottle_WHITE
NAME=Total Mana Refresh
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_eye_of_newt 6, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 95.1

ON=@Create
	MORE1=s_mana
	MORE2=100.0
	COLOR=color_gray_lt

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Mana Refresh (Total)

[ITEMDEF i_potion_Beastform]
// This potion polymorphs you into an animal for a while.
// The animal it turns you into is determined when you make the potion (you can use taste id to determine which animal it does).
ID=i_bottle_WHITE
NAME=Beastform
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_blood_moss, i_reag_ginseng, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 95.1

ON=@Create
	MORE1=s_BeastForm
	MORE2={ 40.0 60.0 }
	COLOR=color_o_verite

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Beastform

[ITEMDEF i_potion_Chameleon]
// This potion makes your skin match the colors of whatever is behind you.
ID=i_bottle_WHITE
NAME=Chameleon skin
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_garlic, i_reag_spider_silk, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 95.1

ON=@Create
	MORE1=s_Chameleon
	MORE2={ 50.0 60.0 }
	COLOR=color_o_valorite

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Chameleon

[ITEMDEF i_potion_Clever]
// This potion gives a temporary boost to intelligence.
ID=i_bottle_WHITE
NAME=Cleverness
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_fertile_dirt, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 95.1

ON=@Create
	MORE1=s_Cunning
	MORE2={ 60.0 70.0 }
	COLOR=color_o_copper

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Cleverness

[ITEMDEF i_potion_Clever_Great]
// This potion gives a temporary boost to intelligence.
ID=i_bottle_WHITE
NAME=Great Cleverness
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=2 i_reag_fertile_dirt, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 95.1

ON=@Create
	MORE1=s_Cunning
	MORE2={ 80.0 100.0 }
	COLOR=color_o_copper

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Cleverness (Greater)

[ITEMDEF i_potion_Clumsiness]
// This potion lowers your dexterity temporarily.
ID=i_bottle_WHITE
NAME=Clumsiness
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_blood_moss, i_reag_blackmoor, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 95.1

ON=@Create
	MORE1=s_Clumsy
	MORE2={ 60.0 70.0 }
	COLOR=180

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Clumsiness

[ITEMDEF i_potion_Confusion]
// This potion lowers your intelligence temporarily.
ID=i_bottle_WHITE
NAME=Confusion
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_Nightshade, i_reag_fertile_dirt, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 95.1

ON=@Create
	MORE1=s_feeblemind
	MORE2={ 40.0 50.0 }
	COLOR=140

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Confusion

[ITEMDEF i_potion_Forget_Less]
ID=i_bottle_WHITE
NAME=Lesser Forgetfulness
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_blackmoor, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 15.1

ON=@Create
	MORE1=s_forget
	MORE2={ 30.0 40.0 }
	COLOR=120

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Forgetfulness (Lesser)

[ITEMDEF i_potion_Forget]
ID=i_bottle_WHITE
NAME=Forgetfulness
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_blackmoor, i_reag_blackmoor, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 30.1

ON=@Create
	MORE1=s_forget
	MORE2={ 50.0 60.0 }
	COLOR=120

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Forgetfulness

[ITEMDEF i_potion_Forget_Great]
// This potion permanently lowers one skill.
// You can tell which skill the potion lowers by tasting it.
ID=i_bottle_WHITE
NAME=Greater Forgetfulness
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_blackmoor, 2 i_reag_blackmoor, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 70.1

ON=@Create
	MORE1=s_forget
	MORE2={ 80.0 100.0 }
	COLOR=120

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Forgetfulness (Greater)

[ITEMDEF i_potion_Gender]
// This potion permanently changes your gender.
ID=i_bottle_WHITE
NAME=Gender swap
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_blood_moss, i_reag_ginseng, i_reag_mandrake_root, i_reag_blackmoor, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 15.1

ON=@Create
	MORE1=s_Gender_Swap
	MORE2=100.0
	COLOR=100

On=@DClick
	if <src.flags> & statf_polymorph
		src.message You can't do it in your current state.
		return 1
	endif

	if <src.obody>==c_man
		src.obody=c_woman
		src.body=c_woman
	elseif <src.obody>==c_woman
		src.obody=c_man
		src.body=c_man
	elseif <src.obody>==c_dwarf_male
		src.obody=c_dwarf_female
		src.body=c_dwarf_female
	elseif <src.obody>=c_dwarf_female
		src.obody=c_dwarf_male
		src.body=c_dwarf_male
	elseif <src.obody>==c_orc_male
		src.obody=c_orc_female
		src.body=c_orc_female
	elseif <src.obody>=c_orc_female
		src.obody=c_orc_male
		src.body=c_orc_male
	elseif <src.obody>==c_elf_male
		src.obody=c_elf_female
		src.body=c_elf_female
	elseif <src.obody>=c_elf_female
		src.obody=c_elf_male
		src.body=c_elf_male
	else
		src.message You can't do it in your current state.
		return 1
	endif

	remove

	src.newitem i_bottle_empty
	src.act.timer = -1
	src.act.bounce
	return 1

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Gender swap

[ITEMDEF i_potion_Trance]
// This potion temporarily increases your meditation skill.
ID=i_bottle_WHITE
NAME=Trance
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_black_pearl,  2 i_reag_blackmoor, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 55.1

ON=@Create
	MORE1=s_Trance
	MORE2={ 40.0 50.0 }
	COLOR=57

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Trance

[ITEMDEF i_potion_Trance_Great]
// This potion temporarily increases your meditation skill.
ID=i_bottle_WHITE
NAME=Greater Trance
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_black_pearl, i_reag_mandrake_root, 2 i_reag_blackmoor, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 85.1

ON=@Create
	MORE1=s_Trance
	MORE2={ 80.0 100.0 }
	COLOR=57

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Trance (Greater)

[ITEMDEF i_potion_Restore]
// This potion increases both your hit points and your stamina.
ID=i_bottle_WHITE
NAME=Restoration
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_black_pearl, i_reag_mandrake_root, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 55.1

ON=@Create
	MORE1=s_Restore
	MORE2={ 40.0 50.0 }
	COLOR=22

On=@Click
	id = i_potion_heal
	color = 0
	more1 = s_greater_heal
	more2 = {40.0 60.0}
	update

On=@DClick
	id = i_potion_heal
	color = 0
	more1 = s_greater_heal
	more2 = {40.0 60.0}
	update

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Restoration

[ITEMDEF i_potion_Restore_Great]
// This potion increases both your hit points and your stamina.
ID=i_bottle_WHITE
NAME=Greater Restoration
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_black_pearl, 2 i_reag_mandrake_root, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 85.1

ON=@Create
	MORE1=s_Restore
	MORE2={ 60.0 80.0 }
	COLOR=25

On=@Click
	id = i_potion_healGreat
	color = 0
	more1 = s_greater_heal
	more2 = {80.0 100.0}
	update

On=@DClick
	id = i_potion_healGreat
	color = 0
	more1 = s_greater_heal
	more2 = {80.0 100.0}
	update

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Restoration (Greater)

[ITEMDEF i_potion_Sustenance]
// This potion serves to fill you up. (Remember, healing rate depends on how well fed you are!)
// It comes in multiple strengths:
// Greater: RESOURCES=2 i_reag_ginseng, 2 i_reag_mandrake_root
NAME=Sustenance
ID=i_bottle_WHITE
TYPE=T_POTION
TDATA1=i_bottle_empty

RESOURCES=i_reag_ginseng, i_reag_mandrake_root, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 85.1

ON=@Create
	MORE1=s_Sustenance
	MORE2={ 50.0 60.0 }
	COLOR=52

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Sustenance

[ITEMDEF i_potion_Monster]
// This potion polymorphs you into a monster for a while.
// The monster it turns you into is determined when you make the potion (you can use taste id to determine which animal it does).
NAME=Monster form
ID=i_bottle_WHITE
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_blood_moss, i_reag_mandrake_root, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 85.1

ON=@Create
	MORE1=s_Monster_Form
	MORE2=100.0

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Monster form

[ITEMDEF i_potion_Particle]
// This potion turns you into an immobile, but untargetable particle system for a while.
NAME=Particle form
ID=i_bottle_WHITE
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_black_pearl, i_reag_blood_moss, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 85.1

ON=@Create
	MORE1=s_Particle_Form
	MORE2=60.0

ON=@DClick
	src.sysmessage You can't think of a way to use this item
	return 1

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Particle

[ITEMDEF i_potion_Shield]
// This potion erects a temporary force field around you. Nobody approaching will be able to get within 1 tile of you, though you can move close to them if you wish.
NAME=Shield
ID=i_bottle_WHITE
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_garlic, i_reag_sulfur_ash, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 85.1

ON=@Create
	MORE1=s_Shield
	MORE2={ 80.0 100.0 }
	COLOR=color_o_silver

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Shield

[ITEMDEF i_potion_Steelskin]
// This potion turns your skin into steel, giving a boost to your AR.
NAME=Steelskin
ID=i_bottle_WHITE
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_garlic, i_reag_ginseng, 2 i_reag_mandrake_root, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 85.1

ON=@Create
	MORE1=s_Steelskin
	MORE2={ 60.0 80.0 }
	COLOR=color_o_gold

On=@DClick
	if <src.plot1> & plotmask_dwarf
		if <more2> > 20.0
			more2 = (<more2> / 4)
		endif
	endif

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Steelskin

[ITEMDEF i_potion_Stoneskin]
// This potion turns your skin into stone, giving a boost to your AR.
NAME=Stoneskin
ID=i_bottle_WHITE
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_Garlic, i_reag_ginseng, i_reag_mandrake_root, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 85.1

ON=@Create
	MORE1=s_Stoneskin
	MORE2={ 40.0 60.0 }
	COLOR=color_o_gold

On=@DClick
	if <src.plot1> & plotmask_dwarf
		if <more2> > 15.0
			more2 = (<more2> / 4)
		endif
	endif

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Stoneskin

[ITEMDEF i_potion_Weakness]
// This potion temporarily lowers your strength.
NAME=Weakness
ID=i_bottle_WHITE
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_mandrake_root, i_reag_blackmoor, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 55.1

ON=@Create
	MORE1=s_weaken
	MORE2={ 80.0 100.0 }
	COLOR=color_o_agapite

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Weakness

[COMMENT ITEMDEF i_potion_FloatLess]
ID=i_bottle_WHITE
NAME=Lesser Float
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_pumice 1, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 35.1

ON=@Create
	MORE1=s_Float
	MORE2=30.0
	COLOR=COLOR_CYAN

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Float (Lesser)

[COMMENT ITEMDEF i_potion_Float]
ID=i_bottle_WHITE
NAME=Float
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_pumice 3, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 65.1

ON=@Create
	MORE1=s_Float
	MORE2=50.0
	COLOR=COLOR_CYAN

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Float

[COMMENT ITEMDEF i_potion_FloatGreat]
ID=i_bottle_WHITE
NAME=Greater Float
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_pumice 6, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 85.1

ON=@Create
	MORE1=s_Float
	MORE2=100.0
	COLOR=COLOR_CYAN

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Float (Greater)

[COMMENT ITEMDEF i_potion_Lava]
ID=i_bottle_RED
NAME=Lava Bomb
TYPE=T_POTION
TDATA1=0

RESOURCES=i_reag_volcanic_ash 6, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 95.1

ON=@Create
	MORE1=s_lava
	MORE2=50.0
	COLOR=color_o_magma

CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Potions
DESCRIPTION=Lava Bomb

//=============
// Firestorm potion
//=============

[ITEMDEF i_firestorm_fire]
NAME=fire
ID=i_fx_field_fire
TYPE=t_spell

On=@Create
	attr = attr_magic | attr_decay | attr_move_never
	color = color_o_magma
	morep = 28,2000,1
	more2 = 1

[ITEMDEF i_firestorm_explosion]
NAME=explosion
ID=i_fx_explode
TYPE=t_explosion

On=@Create
	attr = attr_magic | attr_decay | attr_move_never
	color = color_o_magma
	morep = 10,50,3

[ITEMDEF i_potion_firestorm]
NAME=Fire Storm Potion
ID=i_bottle_red
TYPE=t_potion
TDATA1=0

On=@Create
	more = s_explosion
	more2 = 200.0
	color = color_o_magma

On=@DClick
	link = <src.serial>

On=@Targon_ground
	morex = 1

On=@Timer
	if <morex> == 1
		link.newitem i_firestorm_explosion
		link.act.timer 0
		link.act.link = <link>
		link.act.p = <p>
		sfx snd_spell_explosion

		attr = <attr> | attr_invis
		update

		morex = 0
		more = 5
		timer = 1
		return 1	
	endif
	if <more> == 5
		link.newitem i_firestorm_fire
		link.act.timer 2
		morep = <p>
		morex = <morex> + 1
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_explosion
		link.act.timer 0
		link.act.p = <morep>
		link.act.link = <link>
		sfx snd_spell_explosion

		link.newitem i_firestorm_fire
		link.act.timer 2
		morex = (<morex> - 2)
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_explosion
		link.act.timer 0
		link.act.p = <morep>
		link.act.link = <link>
		sfx snd_spell_explosion

		link.newitem i_firestorm_fire
		link.act.timer 2
		morep = <p>
		morey = <morey> + 1
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_explosion
		link.act.timer 0
		link.act.p = <morep>
		link.act.link = <link>
		sfx snd_spell_explosion

		link.newitem i_firestorm_fire
		link.act.timer 2
		morey = (<morey> - 2)
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_explosion
		link.act.timer 0
		link.act.p = <morep>
		link.act.link = <link>
		sfx snd_spell_explosion

		link.newitem i_firestorm_fire
		link.act.timer 3
		morep = <p>
		morex = <morex> + 2
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morex = (<morex> - 4)
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morep = <p>
		morey = <morey> + 2
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morey = (<morey> - 4)
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morep = <p>
		morex = <morex> + 1
		morey = <morey> + 1
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morex = (<morex> - 2)
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morey = (<morey> - 2)
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morex = <morex> + 2
		link.act.p = <morep>
		link.act.link = <link>

		more = 4
		timer = 1
		return 1

	elseif <more> == 4
		link.newitem i_firestorm_fire
		link.act.timer 3
		morep = <p>
		morex = <morex> + 2
		morey = <morey> + 1
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morey = (<morey> - 2)
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morex = (<morex> - 4)
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morey = <morey> + 2
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morex = <morex> + 1
		morey = <morey> + 1
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morex = <morex> + 2
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morey = (<morey> - 4)
		link.act.p = <morep>
		link.act.link = <link>

		link.newitem i_firestorm_fire
		link.act.timer 3
		morex = (<morex> - 2)
		link.act.p = <morep>
		link.act.link = <link>

		more = 3
		timer = 1
		return 1
	endif
	remove
	return 1

//##################################
// New potions
//
// Lesser Regeneration	6 Bloodspawns, 3 Ginsengs, 2 Mandrake Roots
// Regeneration		9 Bloodspawns, 6 Ginsengs, 3 Mandrake Roots
// Greater Regeneration	12 Bloodspawns, 12 Ginsengs, 4 Mandrake Roots
//
// 
//##################################

[ITEMDEF i_skilltag_alchemy]
NAME=Alchemy Tag
ID=0dcc
WEIGHT=0

On=@Create
	attr = attr_newbie
	color = color_o_gold

[ITEMDEF i_tag_regeneration]
NAME=Regeneration tag
ID=i_bottle_9
TYPE=t_eq_script
LAYER=layer_special
WEIGHT=0

On=@Create
	attr = attr_invis | attr_newbie

On=@Timer
	if !<cont>
		remove
		return 1
	endif

	if !<cont.ischar>
		remove
		return 1
	endif

	if <cont.flags> & statf_dead
		remove
		return 1
	endif

	more2 = (<more2> - 1)
	if <more2> < 1
		cont.sfx 0203
		cont.sysmessage Regenration is out
		remove
		return 1
	endif
	if <cont.hits> < <cont.str>
		more = <eval({<morex> <morey>})>
		cont.hits = <cont.hits> + <more>
		if <cont.hits> > <cont.str>
			cont.hits = <cont.str>
		endif
	endif
	timer = 1
	return 1

[ITEMDEF i_potion_regenless]
NAME=Lesser Regeneration
ID=i_bottle_9
TYPE=t_potion
WEIGHT=1
TDATA1=i_bottle_empty
RESOURCES=i_reag_blood_spawn 6, i_reag_ginseng 3, i_reag_mandrake_root 2, i_bottle_empty
SKILLMAKE=ALCHEMY 100.0

On=@Create
	color = 0848
	more2 = {300 600}	// 5..10 min

On=@DClick
	if <src.findlayer(layer_flag_potionused)>
		if <src.findlayer(layer_flag_potionused).timer> > 0
			src.sysmessage You can't drink another potion yet
			return 1
		else
			src.findlayer(layer_flag_potionused).remove
		endif
	endif
	if <src.restest i_tag_regeneration>
		src.consume 10 i_tag_regeneration
	endif
	src.effect 3,0377a,10,15
	src.sfx 01e0
	src.newitem i_tag_regeneration
	src.act.name Lesser Regeneration Tag
	src.act.timer 1
	src.act.more2 = <more2>
	src.act.morex = 1	// min effect
	src.act.morey = 2	// max effect
	src.act.equip

[ITEMDEF i_potion_regen]
NAME=Regeneration
ID=i_bottle_9
TYPE=t_potion
WEIGHT=1
TDATA1=i_bottle_empty
RESOURCES=i_reag_blood_spawn 9, i_reag_ginseng 6, i_reag_mandrake_root 3, i_bottle_empty
SKILLMAKE=ALCHEMY 100.0

On=@Create
	color = 084a
	more2 = {300 600}	// 5..10 min

On=@DClick
	if <src.findlayer(layer_flag_potionused)>
		if <src.findlayer(layer_flag_potionused).timer> > 0
			src.sysmessage You can't drink another potion yet
			return 1
		else
			src.findlayer(layer_flag_potionused).remove
		endif
	endif
	if <src.restest i_tag_regeneration>
		src.consume 10 i_tag_regeneration
	endif
	src.effect 3,0377a,10,15
	src.sfx 01e0
	src.newitem i_tag_regeneration
	src.act.name Lesser Regeneration Tag
	src.act.timer 1
	src.act.more2 = <more2>
	src.act.morex = 1	// min effect
	src.act.morey = 3	// max effect
	src.act.equip

[ITEMDEF i_potion_regengreat]
NAME=Greater Regeneration
ID=i_bottle_9
TYPE=t_potion
WEIGHT=1
TDATA1=i_bottle_empty
RESOURCES=i_reag_blood_spawn 12, i_reag_ginseng 12, i_reag_mandrake_root 4, i_bottle_empty
SKILLMAKE=ALCHEMY 100.0

On=@Create
	color = 084b
	more2 = {300 600}	// 5..10 min

On=@DClick
	if <src.findlayer(layer_flag_potionused)>
		if <src.findlayer(layer_flag_potionused).timer> > 0
			src.sysmessage You can't drink another potion yet
			return 1
		else
			src.findlayer(layer_flag_potionused).remove
		endif
	endif
	if <src.restest i_tag_regeneration>
		src.consume 10 i_tag_regeneration
	endif
	src.effect 3,0377a,10,15
	src.sfx 01e0
	src.newitem i_tag_regeneration
	src.act.name Lesser Regeneration Tag
	src.act.timer 1
	src.act.more2 = <more2>
	src.act.morex = 2	// min effect
	src.act.morey = 4	// max effect
	src.act.equip

[EOF]