/*
===========================================================================
Copyright (C) 2009-2011 Zack "ZTurtleMan" Middleton

This file is part of Turtle Arena source code.

Turtle Arena source code 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 2 of the License,
or (at your option) any later version.

Turtle Arena source code 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 Turtle Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
===========================================================================
*/

//
// Gauntlet (Done)
//

weapon "w_gauntlet"
{
	weapontype WT_GAUNTLET
	model "models/weapons2/gauntlet/gauntlet.md3"
	mod MOD_GAUNTLET
	attackDelay 400
	// In Quake III Arena the Gauntlet didn't leave a wallmark
	//impactMarkName "gfx/damage/hole_lg_mrk"
	//impactMarkRadius 12
	continuousFlash 1
	flashColor 0.6 0.6 1.0
	flashSound0 "sound/weapons/melee/fstatck.wav"
	//barrelSpin BS_PITCH

	blade 0
	{
		damage 50
		origin 0 -5 0
		tip 5 20 0
		trailStyle none
	}
}

weapongroup "wp_gauntlet"
{
	randomSpawn 0 // Don't want this in weapon_random entity...
	itemName "weapon_gauntlet"
	pickupName "Gauntlet"
	pickupModel "models/weapons2/gauntlet/gauntlet.md3"
	iconName "icons/iconw_gauntlet"
	firingSound "sound/weapons/melee/fstrun.wav"
	weapon_primary "w_gauntlet"

	normalAnims
	{
		standAnim "TORSO_STAND2"
		attackAnim "TORSO_ATTACK2"
	}
	primaryAnims
	{
		standAnim "TORSO_STAND2"
		attackAnim "TORSO_ATTACK2"
	}
}

//
// Machine Gun (Done)
// ZTM: FIXME: Machine Gun should only do 5 damage in Team DM.
//

projectile "p_machinegun"
{
	instantDamage 1
	damage 7
	trailType PT_BULLET
	deathType PD_BULLET
	explosionType "PE_NONE"
	hitMarkName "gfx/damage/bullet_mrk"
	hitMarkRadius 8
	spread 200
}

weapon "w_machinegun"
{
	weapontype WT_GUN
	model "models/weapons2/machinegun/machinegun.md3"
	mod MOD_MACHINEGUN
	attackDelay 100
	ejectBrass 1
	flashColor 1 1 0
	flashSound0 "sound/weapons/machinegun/machgf1b.wav"
	flashSound1 "sound/weapons/machinegun/machgf2b.wav"
	flashSound2 "sound/weapons/machinegun/machgf3b.wav"
	flashSound3 "sound/weapons/machinegun/machgf4b.wav"
	//barrelSpin BS_ROLL
	projectile "p_machinegun"
}

weapongroup "wp_machinegun"
{
	itemName "weapon_machinegun"
	pickupName "Machine Gun"
	pickupModel "models/weapons2/machinegun/machinegun.md3"
	iconName "icons/iconw_machinegun"
	pickupAmmo 40
	weapon_primary "w_machinegun"
}

//
// Shotgun (Done)
//

projectile "p_shotgun"
{
	instantDamage 1
	damage 10
	deathType PD_BULLET
	explosionType "PE_NONE"
	hitMarkName "gfx/damage/bullet_mrk"
	hitMarkRadius 8
	spread 700
	numprojectiles 11
}

weapon "w_shotgun"
{
	weapontype WT_GUN
	model "models/weapons2/shotgun/shotgun.md3"
	mod MOD_SHOTGUN
	attackDelay 1000
	ejectBrass2 1
	ejectSmoke2 1
	splashMod MOD_SHOTGUN
	flashColor 1 1 0
	flashSound0 "sound/weapons/shotgun/sshotf1b.wav"
	projectile "p_shotgun"
}

weapongroup "wp_shotgun"
{
	itemName "weapon_shotgun"
	pickupName "Shotgun"
	pickupModel "models/weapons2/shotgun/shotgun.md3"
	iconName "icons/iconw_shotgun"
	pickupAmmo 10
	weapon_primary "w_shotgun"
}

//
// Grenade Launcher (Done)
//

projectile "p_grenade"
{
	model "models/ammo/grenade1.md3"
	damage 100
	splashDamage 100
	splashRadius 150
	speed 700
	timetolive 2500
	shootable 0
	trailType PT_GRENADE
	deathType PD_GRENADE
	spinType PS_ROLL
	hitMarkName "gfx/damage/burn_med_mrk"
	hitMarkRadius 64
	bounceType "PB_HALF"
	useGravity 1
	impactSound0 "sound/weapons/grenade/hgrenb1a.wav"
	impactSound1 "sound/weapons/grenade/hgrenb2a.wav"
}

weapon "w_grenadel"
{
	weapontype WT_GUN
	model "models/weapons2/grenadel/grenadel.md3"
	mod MOD_GRENADE
	attackDelay 800
	splashMod MOD_GRENADE_SPLASH
	flashColor 1 .7 0
	flashSound0 "sound/weapons/grenade/grenlf1a.wav"
	projectile "p_grenade"
}

weapongroup "wp_grenade_launcher"
{
	itemName "weapon_grenadelauncher"
	pickupName "Grenade Launcher"
	pickupModel "models/weapons2/grenadel/grenadel.md3"
	iconName "icons/iconw_grenade"
	pickupAmmo 10
	weapon_primary "w_grenadel"
}

//
// Rocket Launcher (Done)
//

projectile "p_rocket"
{
	model "models/ammo/rocket/rocket.md3"
	damage 100
	splashDamage 100
	splashRadius 120
	speed 900
	timetolive 15000
	trailType PT_ROCKET
	deathType PD_ROCKET
	missileSound "sound/weapons/rocket/rockfly.wav"
	missileDlight 200
	missileDlightColor 1 .75 0
	hitMarkName "gfx/damage/burn_med_mrk"
	hitMarkRadius 64
}

weapon "w_rocket_launcher"
{
	weapontype WT_GUN
	model "models/weapons2/rocketl/rocketl.md3"
	mod MOD_ROCKET
	attackDelay 800
	splashMod MOD_ROCKET_SPLASH
	flashColor 1 0.75 0
	flashSound0 "sound/weapons/rocket/rocklf1a.wav"
	projectile "p_rocket"
}

weapongroup "wp_rocket_launcher"
{
	itemName "weapon_rocketlauncher"
	pickupName "Rocket Launcher"
	pickupModel "models/weapons2/rocketl/rocketl.md3"
	iconName "icons/iconw_rocket"
	pickupAmmo 10
	weapon_primary "w_rocket_launcher"
}

//
// Lightning (Done)
//

projectile "p_lightning bolt"
{
	instantDamage 1
	damage 8
	trailType PT_LIGHTNING
	deathType PD_LIGHTNING
	hitMarkName "gfx/damage/hole_lg_mrk"
	hitMarkRadius 12
	speed 768 // range of instantDamage
	hitSound0 "sound/weapons/lightning/lg_hit.wav"
	hitSound1 "sound/weapons/lightning/lg_hit2.wav"
	hitSound2 "sound/weapons/lightning/lg_hit3.wav"
}

weapon "w_lightning"
{
	weapontype WT_GUN
	model "models/weapons2/lightning/lightning.md3"
	mod MOD_LIGHTNING
	attackDelay 50
	flashColor 0.6 0.6 1
	continuousFlash 1
	initialEffectOnly 1
	flashSound0 "sound/weapons/lightning/lg_fire.wav"
	projectile "p_lightning bolt"
}

weapongroup "wp_lightning"
{
	itemName "weapon_lightning"
	pickupName "Lightning Gun"
	pickupModel "models/weapons2/lightning/lightning.md3"
	iconName "icons/iconw_lightning"
	pickupAmmo 100
	firingSound "sound/weapons/lightning/lg_hum.wav"
	readySound "sound/weapons/melee/fsthum.wav"
	weapon_primary "w_lightning"
}

//
// Railgun (Done)
//

projectile "p_rail"
{
	instantDamage 1
	damage 100
	trailType PT_RAIL
	deathType PD_RAIL
	hitMarkName "gfx/damage/plasma_mrk"
	hitMarkRadius 24
	hitMarkColorize 1
	maxHits 4
}

weapon "w_railgun"
{
	weapontype WT_GUN
	model "models/weapons2/railgun/railgun.md3"
	mod MOD_RAILGUN
	attackDelay 1500
	flashColor 1 0.5 0
	flashSound0 "sound/weapons/railgun/railgf1a.wav"
	projectile "p_rail"
}

weapongroup "wp_railgun"
{
	itemName "weapon_railgun"
	pickupName "Railgun"
	pickupModel "models/weapons2/railgun/railgun.md3"
	iconName "icons/iconw_railgun"
	pickupAmmo 10
	readySound "sound/weapons/railgun/rg_hum.wav"
	firingSound "sound/weapons/railgun/rg_hum.wav"
	weapon_primary "w_railgun"
}

//
// Plasma Gun (Done)
//

projectile "p_plasma ball"
{
	sprite "sprites/plasma1"
	spriteRadius 16
	damage 20
	splashDamage 15
	splashRadius 20
	speed 2000
	timetolive 10000
	trailType PT_PLASMA
	deathType PD_PLASMA
	missileSound "sound/weapons/plasma/lasfly.wav"
	hitMarkName "gfx/damage/plasma_mrk"
	hitMarkRadius 16
	hitMarkFadeAlpha 1
}

weapon "w_plasmagun"
{
	weapontype WT_GUN
	model "models/weapons2/plasma/plasma.md3"
	mod MOD_PLASMA
	attackDelay 100
	splashMod MOD_PLASMA_SPLASH
	flashColor 0.6 0.6 1.0
	flashSound0 "sound/weapons/plasma/hyprbf1a.wav"
	projectile "p_plasma ball"
}

weapongroup "wp_plasmagun"
{
	itemName "weapon_plasmagun"
	pickupName "Plasma Gun"
	pickupModel "models/weapons2/plasma/plasma.md3"
	iconName "icons/iconw_plasma"
	pickupAmmo 50
	weapon_primary "w_plasmagun"
}

//
// BFG (Done)
//

projectile "p_bfg"
{
	model "models/weaphits/bfg.md3"
	damage 100
	splashDamage 100
	splashRadius 120
	speed 2000
	timetolive 10000
	deathType PD_BFG
	missileSound "sound/weapons/rocket/rockfly.wav"
	hitMarkName "gfx/damage/burn_med_mrk"
	hitMarkRadius 32
}

weapon "w_bfg"
{
	weapontype WT_GUN
	model "models/weapons2/bfg/bfg.md3"
	mod MOD_BFG
	attackDelay 200
	splashMod MOD_BFG_SPLASH
	flashColor 1 0.7 1
	flashSound0 "sound/weapons/bfg/bfg_fire.wav"
	//barrelSpin BS_PITCH
	projectile "p_bfg"
}

weapongroup "wp_bfg"
{
	itemName "weapon_bfg"
	pickupName "BFG10K"
	pickupModel "models/weapons2/bfg/bfg.md3"
	iconName "icons/iconw_bfg"
	pickupAmmo 20
	readySound "sound/weapons/bfg/bfg_hum.wav"
	firingSound "sound/weapons/bfg/bfg_hum.wav"
	weapon_primary "w_bfg"
}

//
// Grappling Hook (Done)
//
projectile "p_grappling hook"
{
	model "models/ammo/rocket/rocket.md3"
	damage 10
	speed 800
	timetolive 10000
	trailType "PT_LIGHTNING"
	missileDlight 200
	missileDlightColor 1 .75 0
	hitMarkName "gfx/damage/hole_lg_mrk"
	hitMarkRadius 12
	grappling 1
}

weapon "w_grappling_hook"
{
	weapontype WT_GUN
	model "models/weapons2/grapple/grapple.md3"
	mod MOD_GRAPPLE
	attackDelay 400
	continuousFlash 1
	flashColor 0.6 0.6 1.0
	projectile "p_grappling hook"
}

weapongroup "wp_grappling_hook"
{
	clone "wt_gun"
	itemName "weapon_grapplinghook"
	pickupName "Grappling Hook"
	pickupModel "models/weapons2/grapple/grapple.md3"
	iconName "icons/iconw_grapple"
	// NOTE: grappling projectiles use no ammo.
	readySound "sound/weapons/melee/fsthum.wav"
	firingSound "sound/weapons/melee/fstrun.wav"
	weapon_primary "w_grappling_hook"
}


//
// Team Arena Weapons
//

//
// Nailgun (Done)
//

projectile "p_nail"
{
	model "models/weaphits/nail.md3"
	damage 20
	speed 555
	spdRndAdd 1800
	timetolive 10000
	spread 500
	numProjectiles 15
	trailType "PT_NAIL"
	deathType "PD_NONE_EXP_PLAYER"
	hitMarkName "gfx/damage/hole_lg_mrk"
	hitMarkRadius 12
	hitPlayerSound "sound/weapons/nailgun/wnalimpl.wav"
	hitMetalSound "sound/weapons/nailgun/wnalimpm.wav"
	hitSound0 "sound/weapons/nailgun/wnalimpd.wav"
}

weapon "w_nailgun"
{
	weapontype WT_GUN
	model "models/weapons/nailgun/nailgun.md3"
	mod MOD_NAIL
	attackDelay 1000
	ejectSmoke 1
	flashColor 1 0.75 0
	flashSound0 "sound/weapons/nailgun/wnalfire.wav"
	projectile "p_nail"
}

weapongroup "wp_nailgun"
{
	itemName "weapon_nailgun"
	pickupName "Nailgun"
	pickupModel "models/weapons/nailgun/nailgun.md3"
	iconName "icons/iconw_nailgun"
	pickupAmmo 10
	weapon_primary "w_nailgun"
}

//
// Prox Mine Launcher (Done)
// ZTM: WONTFIX?: Stick mines to players.
//

projectile "p_prox mine"
{
	model "models/weaphits/proxmine.md3"
	modelBlue "models/weaphits/proxmineb.md3"
	damage 0
	splashDamage 100
	splashRadius 150
	speed 700
	timetolive 3000
	trailType "PT_GRENADE"
	deathType "PD_GRENADE"
	explosionType "PE_PROX"
	useGravity 1
	stickOnImpact PSOI_ANGLE_90
	hitSound0 "sound/weapons/proxmine/wstbexpl.wav"

	// stick sounds
	impactPlayerSound "sound/weapons/proxmine/wstbimpl.wav"
	impactMetalSound "sound/weapons/proxmine/wstbimpm.wav"
	impactSound0 "sound/weapons/proxmine/wstbimpd.wav"

	// PE_PROX sounds
	triggerSound "sound/weapons/proxmine/wstbactv.wav"
	tickSound "sound/weapons/proxmine/wstbtick.wav"
}

weapon "w_prox_launcher"
{
	weapontype WT_GUN
	model "models/weapons/proxmine/proxmine.md3"
	mod MOD_PROXIMITY_MINE
	attackDelay 800
	flashColor 1 0.7 0
	flashSound0 "sound/weapons/proxmine/wstbfire.wav"
	projectile "p_prox mine"
}

weapongroup "wp_prox_launcher"
{
	itemName "weapon_prox_launcher"
	pickupName "Prox Launcher"
	pickupModel "models/weapons/proxmine/proxmine.md3"
	iconName "icons/iconw_proxlauncher"
	pickupAmmo 5
	weapon_primary "w_prox_launcher"
}

//
// Chaingun (Done)
//

projectile "p_chaingun"
{
	instantDamage 1
	damage 7
	trailType "PT_BULLET"
	deathType "PD_BULLET"
	explosionType "PE_NONE"
	hitMarkName "gfx/damage/bullet_mrk"
	hitMarkRadius 8
	spread 600

	// In vanilla Quake III: Team Arena, Chaingun sounds were overriden with normal bullet sounds.
	//  "normal bullet sounds" are done in the engine by PD_BULLET
	//hitPlayerSound "sound/weapons/vulcan/wvulimpl.wav"
	//hitMetalSound "sound/weapons/vulcan/wvulimpm.wav"
	//hitSound0 "sound/weapons/vulcan/wvulimpd.wav"
}

weapon "w_chaingun"
{
	weapontype WT_GUN
	model "models/weapons/vulcan/vulcan.md3"
	mod MOD_CHAINGUN
	attackDelay 30
	ejectBrass 1
	flashColor 1 1 0
	flashSound0 "sound/weapons/vulcan/vulcanf1b.wav"
	flashSound1 "sound/weapons/vulcan/vulcanf2b.wav"
	flashSound2 "sound/weapons/vulcan/vulcanf3b.wav"
	flashSound3 "sound/weapons/vulcan/vulcanf4b.wav"
	projectile "p_chaingun"
}

weapongroup "wp_chaingun"
{
	itemName "weapon_chaingun"
	pickupName "Chaingun"
	pickupModel "models/weapons/vulcan/vulcan.md3"
	iconName "icons/iconw_chaingun"
	pickupAmmo 80
	firingStoppedSound "sound/weapons/vulcan/wvulwind.wav"
	weapon_primary "w_chaingun"
}

