// 19.12.2001, Nika: changed value of flyswatters
// 19.12.2001, Eidolon: snowball, Santa Claus, flyswatters changed
// 10.12.2001, Nika: flyswatter

VERSION=0.54

//=============
// fly swatter
//=============


[ITEMDEF i_flyswatter_light]
ID=i_light_source
tdata4=1

On=@Create
	morez = 1
	attr= attr_move_never

On=@Timer
	remove
	return 1


[ITEMDEF i_fly_1]
ID=i_fx_heal_effect

On=@Create
	color = {0486 1 0482 1 0489 1 048a 1 048c 1 048f 1 0495 1 0496 1 0497 1 035 1 053 1 026 1 0 1}
	attr = attr_decay | attr_move_never

On=@Timer
	if <morex>
		color = {0486 1 0482 1 0489 1 048a 1 048c 1 048f 1 0495 1 0496 1 0497 1 035 1 053 1 026 1 0 1}
		morex = <morex> - 1
		timer = <morey>
		update
		return 1
	else
		remove
		return 1
	endif

On=@Step
	return 1

[ITEMDEF i_flyswatter]
NAME=Fly Swatter T1
ID=014ee
TYPE=t_potion
TDATA1=0
LAYER=31
VALUE={400 600}

On=@Create
	more = s_explosion
	more2 = 2000
	color = {0486 1 0482 1 0489 1 048a 1 048c 1 048f 1 0495 1 0496 1 0497 1 035 1 053 1 026 1}
	morex = -1

On=@Dclick
	target Select target
	return 1

On=@Equip
	timer = 0

On=@Step
	return 1

On=@Targon_ground
	link = <src.serial>
	equip
	morex = 1
	morey = 3

On=@Timer
	if <morey>
		if !<morez>
			sfx = 41
			link.newitem i_flyswatter_light
			link.act.attr = attr_move_never
			link.act.timer 6
			link.act.p = <p>
			link.act.update
	
			link.newitem i_fly_1
			link.act.timer = 0
			link.act.morey = 1
			link.act.morex = 7
			link.act.p = <p>
			link.act.update
	
			morez = 1
		endif

		
		morey = <morey> - 1
		if <dispid>==i_fx_sparkle
			dispid=i_fx_bless_effect
		else
			dispid=i_fx_sparkle
		endif
		color = {0486 1 0482 1 0489 1 048a 1 048c 1 048f 1 0495 1 0496 1 0497 1 035 1 053 1 026 1 0 1}
		update
		timer = 2
		return 1	
	else
		remove
		return 1
	endif

[ITEMDEF i_flyswatter_2]
NAME=Fly Swatter U1
ID=014ed
TYPE=t_normal
VALUE={400 600}

On=@Create
	color = {0486 1 0482 1 0489 1 048a 1 048c 1 048f 1 0495 1 0496 1 0497 1 035 1 053 1 026 1}

On=@DClick
	dispid=i_fx_curse
	morep=<src.p>
	color = {0486 1 0482 1 0489 1 048a 1 048c 1 048f 1 0495 1 0496 1 0497 1 035 1 053 1 026 1}
	doswitch <src.dir>
		morey=<morey>+-1
		begin
			morex=<morex>+1
			morey=<morey>+-1
		end
		morex=<morex>+1
		begin
			morex=<morex>+1
			morey=<morey>+1
		end
		morey=<morey>+1
		begin
			morex=<morex>+-1
			morey=<morey>+1
		end
		morex=<morex>+-1
		begin
			morex=<morex>+-1
			morey=<morey>+-1
		end
	enddo
	p=<morep>
	src.newitem i_flyswatter_light
	src.act.attr = attr_move_never
	src.act.timer 2
	src.act.p = <morep>
	src.act.update
	sfx = 41
	timer = 2
	update
//	sfx = 0212
	return 1

On=@Timer
	remove
	return 1



[ITEMDEF i_snowball]
NAME=snow ball
ID=0186f
TYPE=t_potion
TDATA1=0
LAYER=31

On=@Create
	more = s_explosion
	more2 = 2000
	color = 0481

On=@Dclick
	target Select target
	return 1

On=@Equip
	timer = 1

On=@Step
	return 1

On=@Targon_ground
	link = <src.serial>
	equip
	morey = 1	

On=@Targon_char
	link = <src.serial>
	equip
	morey = 1

On=@Targon_item
	link = <src.serial>
	equip
	morey = 1

On=@Timer
	if <morey>
		more=0
		morey=0
		z=<eval(<z>-rand(5))>
		dispid=i_fx_curse
		update
		timer = 1
	else
		remove
		return 1
	endif

//#######################
//Santa events and speech
//#######################

[EVENTS e_santa]
On=@NPCSeeNewPlayer
	if !<src.tag.hny>
		face
		say Ho! Ho! Ho!
		say More new faces do i see
		say Come to me, let's dance and sing!
	endif

[SPEECH spk_santa]
On=*hi*
On=*hello*
On=*hail*
	face
	timer = 10
	say I'm greeting you, my little dish!
	say Step right up, tell me your wish!
	return 1

On=Happy New Year*
	face
	timer = 10
	if !<src.tag.hny>
		src.tag.hny=2002
		src.newitem i_lantern
		src.act.timer=-1
		src.act.attr=04
		src.act.name=Crhristmas lantern
		src.act.morep=0,100,1
		dorand 4
			src.act.color=0424
			src.act.color=08d0
			src.act.color=04e7
			src.act.color=0a10
		enddo
		src.act.bounce
		say Take this <src.act.name>, <src.name>!!             Here you go, now you enjoy
//		say Here you go, now you enjoy
		say Procrastinate and make a hoy
		say Just you make sure that you are being all that happy! 
	else
		say Happy New Year! Happy New Year!                    We won't be helped by Chip and Dale
	//	say We won't be helped by Chip and Dale
		say And that gold fish won't really do so much for us  But even so, we celibrate,
	//	say But even so, we celibrate,
		say Drinking away and showing our ass              And all the bad stuff will be left a year behind!
	//	say And all the bad stuff will be left a year behind!

	endif
	return 1


//#########################
// Christmas provisioner
//#########################

[CHARDEF C_H_CHRISTMAS_PROVIS]
NAME=#NAMES_HUMANMALE
ID=C_MAN
DESIRES=i_gold,e_notoriety
AVERSIONS=t_TRAP,t_eerie_stuff

TSPEECH=spk_human_prime
TSPEECH=spk_shopkeep
TSPEECH=spk_needs
TSPEECH=spk_rehello
TSPEECH=spk_human_default

TEVENTS=e_Human_HearUnk
TEVENTS=e_Human_Needs
TEVENTS=e_Human_ConvInit
TEVENTS=e_Human_Greet
TEVENTS=e_Human_Space
TEVENTS=e_Human_Refuse
TEVENTS=e_Human_Environ

ON=@Create
	NPC=brain_vendor
	COLOR=colors_skin
	STR={66 80}
	DEX={61 75}
	INT={66 80}

	ARMSLORE={15.0 38.0}
	ItemID={35.0 55.0}
	FENCING={15.0 38.0}
	SWORDSMANSHIP={15.0 38.0}
	WRESTLING={15.0 38.0}
	MACEFIGHTING={15.0 38.0}
	TACTICS={15.0 35.0}

	ITEM=equip_provis
	ITEM=loot_cityman

	SELL=VENDOR_S_CHRISTMAS

[CHARDEF C_H_CHRISTMAS_PROVIS_F]
//Female PROVISIONER
NAME=#NAMES_HUMANFEMALE
ID=C_WOMAN
DESIRES=i_gold,e_notoriety
AVERSIONS=t_TRAP,t_eerie_stuff

TSPEECH=spk_human_prime
TSPEECH=spk_shopkeep
TSPEECH=spk_needs
TSPEECH=spk_rehello
TSPEECH=spk_human_default

TEVENTS=e_Human_HearUnk
TEVENTS=e_Human_Needs
TEVENTS=e_Human_ConvInit
TEVENTS=e_Human_Greet
TEVENTS=e_Human_Space
TEVENTS=e_Human_Refuse
TEVENTS=e_Human_Environ

ON=@Create
	NPC=brain_vendor
	COLOR=colors_skin
	STR={66 80}
	DEX={61 75}
	INT={66 80}

	ARMSLORE={15.0 38.0}
	ItemID={35.0 55.0}
	FENCING={15.0 38.0}
	SWORDSMANSHIP={15.0 38.0}
	WRESTLING={15.0 38.0}
	MACEFIGHTING={15.0 38.0}
	TACTICS={15.0 35.0}

	ITEM=equip_provis_f
	ITEM=loot_cityman

	SELL=VENDOR_S_CHRISTMAS

[TEMPLATE VENDOR_S_CHRISTMAS]
SELL=i_flyswatter,{2 5}
SELL=i_flyswatter_2,{2 5}
SELL=i_flyswatter,{2 5}
SELL=i_flyswatter_2,{2 5}
SELL=i_flyswatter,{2 5}
SELL=i_flyswatter_2,{2 5}
SELL=i_flyswatter,{2 5}
SELL=i_flyswatter_2,{2 5}
SELL=i_flyswatter,{2 5}
SELL=i_flyswatter_2,{2 5}
SELL=i_flyswatter,{2 5}
SELL=i_flyswatter_2,{2 5}


[EOF]