//-----------------------------------------------------
// General constants
//-----------------------------------------------------

float DEF_MEGAHEALTH_ALLOWED = 0;	//set to 1 to allow more (up to NINJA_MEGAHEALTH_MAXHEALTH) health than 100 (NINJA_MAXHEALTH)
float DEF_BIGBARRELS_ALLOWED = 1;	//set to 0 to forbid the big shootable powder barrels
float DEF_HEALTH_ALLOWED = 1;		//set to 0 to forbid the health
float DEF_ARMOR_ALLOWED = 1;		//set to 0 to forbid the armor
float DEF_AMBUSH_ALLOWED = 1;		//set to 0 to forbid ambush
float DEF_CAMOUFLAGE_ALLOWED = 1;	//set to 0 to forbid camouflage
float DEF_LS_ALLOWED = 1;		//set to 0 to forbid lightning speed powerup
float DEF_FLASHBOMB_ALLOWED = 1;	//set to 0 to forbid the flashbombs
float DEF_TRAP_ALLOWED = 1;		//set to 0 to forbid the traps
float DEF_BOMB_ALLOWED = 1;		//set to 0 to forbid the powder barrels
float DEF_CROSSBOW_ALLOWED = 1;		//set to 0 to forbid the crossbow
float DEF_KATANA_ALLOWED = 1;		//set to 0 to forbid the katana
float DEF_DAGGERS_ALLOWED = 1;		//set to 0 to forbid the daggers

float NINJA_MAXHEALTH = 100;		//starting health
float NINJA_MEGAHEALTH_MAXHEALTH = 250;	//maxhealth when picking up megahealth if it is allowed
float NINJA_CLOAKWAIT = 0.8;		//time(sec) to stand still before camouflaging
float NINJA_JUMPCHARGETIME = 0.04;	//smaller = jump charging faster
float NINJA_MAXJUMPCHARGE = 400;	//higher  = higher jump possible
float NINJA_CLIMB_RANGE = 50;		//maximum distance from wall while climbing
float NINJA_JUMPTOLERANCE = 32;		//maximum distance from ground which allowes jumping
float NINJA_ARMORFACTOR = 0.3;		//armor prevents NINJA_ARMORFACTOR*NINJA_ARMORVALUE damage
float NINJA_ARMORVALUE = 150;
float NINJA_AIRCOMBATUPDRAFT = 200;	//players having an aircombat move NINJA_AIRCOMBATUPDRAFT up when hit
float NINJA_GIBS = 10;
float NINJA_CORPSE_HEALTH = 200;	//how much damage the corpses take before they gib

float Z_FEET = 0.8;			//damage multiplier for hitzones
float Z_CHEST = 1;
float Z_HEAD = 2;

float DEATHFADE_SMOOTHNESS = 0.1;	//how smooth screen blacks out (sec)
float DEATHFADE_STEP = 40;		//how fast screen blacks out; higher number = faster

float STARTAMMO_ARROWS = 20;		//startammo: ammo when respawning
float STARTAMMO_SHURIKEN = 80;
float STARTAMMO_FLASHBOMBS = 0;
float STARTAMMO_DAGGERS = 0;

float CLIMBSPEED_VERT = 180;		//vertical climbing speed
float CLIMBSPEED_HOR = 100;		//horizontal climbing speed
float SPLISHSPEED = 500;		//speed needed to splish when dead and flying against a wall

float BERSERKRELOADTIME = 15;		//time(sec) until player may use berserk attack again
float BERSERKHEALTH = 25;		//if player's health lower or equal: berserk attack possible

float MAXAMMO_ARROWS = 20;		//maximum ammo a player may have
float MAXAMMO_SHURIKEN = 100;
float MAXAMMO_FLASHBOMBS = 5;
float MAXAMMO_DAGGERS = 9;

float AMMO_SHURIKEN = 40;		//ammo a player gets when picking up shuriken
float BIGAMMO_SHURIKEN = 80;		//ammo a player gets when picking up shuriken without flag WEAPON_BIG2 (bigbox)
float AMMO_ARROWS = 3;			//ammo a player gets when picking up arrows
float BIGAMMO_ARROWS = 6;		//ammo a player gets when picking up arrows without flag WEAPON_BIG2 (bigbox)
float AMMO_FLASHBOMBS = 2;		//ammo a player gets when picking up flashbombs
float AMMO_DAGGERS = 9;			//ammo a player gets when picking up daggers

float FISH_HEALAMOUNT = 25;		//health player gets for picking up a fish
float FISH_SMALL_HEALAMOUNT = 15;	//health player gets for picking up a small fish
float FISH_MEGA_HEALAMOUNT = 100;	//health player gets for picking up a big fish

string COMMAND_THROWSWORD;		//defined in world.qc -> void() worldspawn
string COMMAND_AMBUSH;			//defined in world.qc -> void() worldspawn
string COMMAND_GRAPPLE;			//defined in world.qc -> void() worldspawn

//-----------------------------------------------------
// Weapon constants
//-----------------------------------------------------

float BURNTIME = 30;			//maximum time a fire lasts on a player
float FIREDAMAGE = 1;			//damage the fire does
float FIREDAMAGETIME = 0.3;		//time intervall(sec) in which the fire damages
float REDUCEBURNTIMESPEED = 400;	//minimum speed a player must have to reduce the time the fire lasts
float FIRE_RADIUS = 70;			//range in which burning players set things on fire
float NUM_FLAMES = 4;			//number of flames on a burning player

float FIST_RELOADTIME = 0.5;		//time(sec) before another attack can be triggered
float FIST_DAMAGE = 20;
float FIST_BACKDAMAGE = 90;		//when attacking from the back
float FIST_DAMAGE_ADDRANDOM = 20;

float SHURIKEN_RELOADTIME = 0.17;	//time(sec) before another attack can be triggered
float SHURIKEN_INITIALRANDOM = 50;	//initial spreading factor
float SHURIKEN_MAXRANDOM = 150;		//maximum spreading factor when holding fire for SHURIKEN_RANDOMTIME
float SHURIKEN_DAMAGE = 5;
float SHURIKEN_DAMAGE_ADDRANDOM = 5;
float SHURIKEN_RANDOMTIME = 5;		//time(sec) until max. spreading factor(MAXRANDOM) is reached

float FLASH_FADEIN_TIME = 0.3;		//how long it takes to reach full effect
float FLASH_FADEOUT_TIME = 1;		//how long it takes from full to no effect
float FLASH_TIME = 1.2;			//how long the intensity stays at FLASH_INTENSITY value
float FLASH_INTENSITY = 230;		//0 = no effect; 255 = cannot see anything
float FLASH_SMOOTHNESS = 0.1;		//lower = smoother
float FLASH_RELOADTIME = 0.5;		//time(sec) before another attack can be triggered
string FLASH_COLOR;			//defined in world.qc -> void() worldspawn

float TRAP_RANGE = 8000;		//maximum length of trap
float TRAP_BLINKSPEED = 300;		//how fast trap is blinking
float TRAP_DAMAGE = 100;
float TRAP_DAMAGE_ADDRANDOM = 50;
float TRAP_RELOADTIME = 0.5;		//time(sec) before another attack can be triggered

float BOMB_EXPLODETIME = 3.5;		//time(sec) from throwing to exploding
float BOMB_RADIUS = 500;		//bomb damage radius
float BOMB_FIRERADIUS = 620;		//bomb burn radius
float BOMB_DAMAGE_FRAMEMULTIPLIER = 12;	//damage during explosion (12 = only damages in explosion)
float BOMB_SCRAPAIMRADIUS = 2000;	//radius of scraps
float BOMB_SCRAPS = 5;			//number of scraps bomb throws
float BOMB_SCRAPRADIUS = 90;		//scrap damage radius
float BOMB_SCRAPFIRERADIUS = 150;	//scrap burn radius
float BOMB_SCRAPSPEED = 600;		//maximum scrap speed
float BOMB_SCRAPAIMCHANCE = 0.2;	//% of scraps that are aimed at players (1 = 100%; 0.5 = 50%; 0 = 0%)
float BOMB_SCRAPDAMAGE_FRAMEMULTIPLIER = 12;	//damage during explosion (12 = only damages in explosion)
float BOMB_RELOADTIME = 0.5;		//time(sec) before another attack can be triggered

float ARROW_RANDOM = 4;			//spreading factor
float ARROW_DAMAGE = 90;		//normal arrows
float ARROW_DAMAGE_ADDRANDOM = 6;
float BARROW_DAMAGE = 70;		//burning arrows
float BARROW_DAMAGE_ADDRANDOM = 20;
float BARROW_BURNCHANCE = 0.5;		//1 = always burn; 0 = never
float CROSSBOW_RELOADTIME = 1.2;	//time(sec) before another attack can be triggered

float KATANA_DAMAGE = 150;
float KATANA_DAMAGE_ADDRANDOM = 30;
float KATANA_CANNOTBLOCKCHANCE = 0.1;	//% of katana hits cannot be blocked (1 = 100%; 0.5 = 50%; 0 = 0%)
float KATANA_OFFENSIVEBLOCKCHANCE = 0.2;//% of thrown katana hits are blocked offensively (1 = 100%; 0.5 = 50%; 0 = 0%)
float KATANA_BERSERKRADIUS = 90;	//throwing berserk sword damage radius
float KATANA_BERSERKFIRERADIUS = 150;	//throwing berserk sword burn radius
float KATANA_RELOADTIME = 0.4;		//time(sec) before another attack can be triggered

float NUM_DAGGERS = 3;			//how many daggers are thrown at once
float DAGGER_DAMAGE = 70;
float DAGGER_DAMAGE_ADDRANDOM = 20;
float DAGGER_DELAY = 0.18;		//delay until next dagger is thrown
float DAGGER_RELOADTIME = 0.8;		//time(sec) before another attack can be triggered

float GRAPPLE_DAMAGE = 4;
float GRAPPLE_DRAGSPEED = 500;		//how fast grapple drags owner
float GRAPPLE_SPEED = 1200;		//how fast grapple is shot
float GRAPPLE_RETURNSPEED = 800;	//grapple returnspeed
float GRAPPLE_MINSPEED = 70;		//swing downwards if speed < this
float GRAPPLE_RELOADTIME = 0.5;		//time(sec) before another attack can be triggered

float GIB_DAMAGE = 1;			//flying gibs damage =)
float GIB_DAMAGE_ADDRANDOM = 2;

float BIGBARREL_RADIUS = 500;				//BIGBARREL damage radius
float BIGBARREL_FIRERADIUS = 620;			//BIGBARREL burn radius
float BIGBARREL_SCRAPAIMRADIUS = 2000;			//radius of scraps
float BIGBARREL_SCRAPS = 6;				//number of scraps BIGBARREL throws
float BIGBARREL_SCRAPRADIUS = 90;			//scrap damage radius
float BIGBARREL_SCRAPFIRERADIUS = 150;			//scrap burn radius
float BIGBARREL_SCRAPSPEED = 600;			//maximum scrap speed
float BIGBARREL_SCRAPAIMCHANCE = 0.2;			//% of scraps that are aimed at players (1 = 100%; 0.5 = 50%; 0 = 0%)
float BIGBARREL_RELOADTIME = 0.5;			//time(sec) before another attack can be triggered
float BIGBARREL_DAMAGE_FRAMEMULTIPLIER = 12;		//damage during explosion (12 = only damages in explosion)
float BIGBARREL_SCRAPDAMAGE_FRAMEMULTIPLIER = 12;	//damage during explosion (12 = only damages in explosion)

float TRAP_TIME = 180;			//time(sec) until these items disappear / return
float SHURIKEN_TIME = 3;
float ARROW_TIME = 8;
float KATANA_TIME = 15;
float DAGGER_TIME = 15;
float GRAPPLE_TIME = 120;
float BACKPACK_TIME = 120;
float GIB_TIME = 6;
float GIB_TIME_ADDRANDOM = 6;

//-----------------------------------------------------
//-----------------------------------------------------
// to ensure functionality do not change anything below
//-----------------------------------------------------
//-----------------------------------------------------

float GRAPPLE_MAXSTEPS = 10;		//smoothness of grapple curve (should not be altered)
float GRAPPLE_MAXAMPS = 50;		//maximum amplitudes of grappling hook (should not be altered)
float GRAPPLE_POINTDIST = 128;		//should not be altered
float GRAPPLE_DEPTH = 300;		//should not be altered
float GRAPPLE_TARGETMINDIST = 80;	//should not be altered

float M_BERSERK = 1;

float S_CANT_MOVE = 1;
float S_BURNING = 4;
float S_REALINVIS = 8;
float S_SBERSERK = 16;
float S_CBERSERK = 32;
float S_TIEDUP = 64;
float S_NOGRAV = 128;

float gravity;

.float ninja;
.float jumpheight;
.float jumptime;
.entity nchain;
.vector oldvel;
.float state;
.float mode;
.string deathan;
.float retouch_time;
.float cloaktime;
.float berserktime;
.float splish;
.float stick;
.entity sword;
.float nflytime;
.string lastplayerinview;
.float viewupdatetime;
.float blocktime;
.float lasthit;
.float climbjump;
.float randomf;
.float lastrazortargetdrop;
.vector lastseen;
.vector lastseenoldvel;
.float chained;
.float button0held;
.vector tvec;
.float grapple0;
.float oldtargi;
.float oldspeed;
.float retesttouch;
.float nextstate;
.float gfrom;
.float gamps;
.float slowdown;
.float bombtargettime;
.float dagger_finished;
