
// *********************
//      Constants
//    Phoenix V0.46
// *********************

// Die Antwort für die AskBox
VAR INT answer_yes;

// Constants for Attributes
CONST INT MAX_ATTRIBUTE			= 18;

CONST INT ATR_HITPOINTS			= 0;
CONST INT ATR_HITPOINTS_MAX		= 1;
CONST INT ATR_MANA				= 2;
CONST INT ATR_MANA_MAX			= 3;
CONST INT ATR_MADNESS			= 4;
CONST INT ATR_MADNESS_MAX		= 5;
CONST INT ATR_STRENGTH			= 6;
CONST INT ATR_CONSTITUTION		= 7;	// = Dexterity
CONST INT ATR_DEXTERITY			= 7;
CONST INT ATR_THIEVERY			= 8;
CONST INT ATR_SWORDSMANSHIP		= 9;
CONST INT ATR_ARCANE			= 10;
CONST INT ATR_WILL				= 11;
CONST INT ATR_PROTECTION		= 12;	// Schutzwirkung

CONST INT ATR_RESIST_WEAPON		= 14;
CONST INT ATR_RESIST_FIRE		= 15;
CONST INT ATR_RESIST_POISON		= 16;
CONST INT ATR_RESIST_MAGIC		= 17;

// Constants for Guilds
CONST INT GIL_NONE			= 0;		// gildenlose
CONST INT GIL_EBR			= 1;		// Erzbarone
CONST INT GIL_SLD			= 2;		// Söldner
CONST INT GIL_STT			= 3;		// Schatten
CONST INT GIL_KDF			= 4;		// Kreis des Feuers
CONST INT GIL_VLK			= 5;		// Volk/Buddler
CONST INT GIL_KDW			= 6;		// Kreis des Wassers
CONST INT GIL_GRD			= 7;		// Garde
CONST INT GIL_ORG			= 8;		// Organisatoren
CONST INT GIL_BAU			= 9;		// Bauern
CONST INT GIL_SFB			= 10;		// Schürferbund

CONST INT GIL_GUR			= 11;		// Gurus
CONST INT GIL_NOV			= 12;		// Novizen
CONST INT GIL_TPL			= 13;		// Templer

CONST INT GIL_DMB			= 14;		// Dämonenbeschwörer
CONST INT GIL_MST			= 15;		// Die Meister

CONST INT MAX_GUILDS		= 16;

// Additional Groups

CONST INT GIL_ORC			= 17;

CONST INT GIL_SLF			= 18;		// Schläfer
CONST INT GIL_GOBBO			= 19;
CONST INT GIL_TROLL			= 20;
CONST INT GIL_SNAPPER		= 21;
CONST INT GIL_CRAWLER		= 22;
CONST INT GIL_MEATBUG		= 23;
CONST INT GIL_SCAVENGER		= 24;
CONST INT GIL_DOG			= 25;
CONST INT GIL_WOLF			= 26;
CONST INT GIL_SHADOW		= 27;
CONST INT GIL_VULTURE		= 28;
CONST INT GIL_SHARK			= 29;
CONST INT GIL_ZOMBIE		= 30;
CONST INT GIL_UNDEAD		= 31;
CONST INT GIL_SKELETON		= 32;
CONST INT GIL_ORCDOG		= 33;

CONST INT GIL_NPCMAX		= 34;

// Special Guild -> Set Constants for all Human Guilds
CONST INT GIL_HUMAN			= 1;		

// Specific Constants for Guilds
CLASS C_GILVALUES {

	VAR INT WATER_DEPTH_KNEE	[GIL_NPCMAX];
	VAR INT WATER_DEPTH_CHEST	[GIL_NPCMAX];
	VAR INT JUMPUP_FORCE		[GIL_NPCMAX];
	VAR INT SWIM_TIME			[GIL_NPCMAX];
	VAR INT DIVE_TIME			[GIL_NPCMAX];
	VAR INT STEP_HEIGHT			[GIL_NPCMAX];
	VAR INT JUMPLOW_HEIGHT		[GIL_NPCMAX];
	VAR INT JUMPMID_HEIGHT		[GIL_NPCMAX];
	VAR INT SLIDE_ANGLE			[GIL_NPCMAX];
	VAR INT SLIDE_ANGLE2		[GIL_NPCMAX];

	// 0 = Autoroll enabled ( default ) / 1 = Autoroll disabled
	VAR INT DISABLE_AUTOROLL	[GIL_NPCMAX];

	VAR INT SURFACE_ALIGN		[GIL_NPCMAX];	// Default : 0 - disabled

	// Kletterkanten - Winkel
	VAR INT CLIMB_HEADING_ANGLE	[GIL_NPCMAX];
	VAR INT CLIMB_HORIZ_ANGLE	[GIL_NPCMAX]; 
	VAR INT	CLIMB_GROUND_ANGLE  [GIL_NPCMAX];

	// Kampfdistanzen
	VAR INT FIGHT_RANGE_FIST	 [GIL_NPCMAX];	// Faustreichweite
	VAR INT FIGHT_RANGE_DAG		 [GIL_NPCMAX];	
	VAR INT FIGHT_RANGE_1HS		 [GIL_NPCMAX];	
	VAR INT FIGHT_RANGE_1HA		 [GIL_NPCMAX];	
	VAR INT FIGHT_RANGE_2HS		 [GIL_NPCMAX];	
	VAR INT FIGHT_RANGE_2HA		 [GIL_NPCMAX];	

	VAR INT FIGHT_STEP_LENGTH	 [GIL_NPCMAX];	// Länge eines Kampfschrittes
	VAR INT FIGHT_ATTACK_LENGTH	 [GIL_NPCMAX];	// Länge der Ausfallattacke
	VAR INT FIGHT_RUN2WALK_LENGTH[GIL_NPCMAX];	// Übergangsbereich um den Angreifer vom Runmodus in den Walkmodus zu versetzen
};

// ************************************
// Constants for Spells - Concept V1.33
// ************************************

CONST INT MAX_SPELL			=	19;

// Kreis des Feuers
CONST INT SPL_LIGHT			=	 0;
CONST INT SPL_FIREBALL		=	 1;
CONST INT SPL_TRANSFORM		=	 2;
CONST INT SPL_EARTHQUAKE	=	 3;
CONST INT SPL_PETRIFY		=	 4;
// Kreis des Wassers
CONST INT SPL_HEAL			=	 5;
CONST INT SPL_LIGHTNING		=	 6;
CONST INT SPL_UNUSED		=	 7;
CONST INT SPL_INVISIBLE		=	 8;
CONST INT SPL_TELEPORTATION	=	 9;
// Beide Kreise
CONST INT SPL_DEAMON		=	10;
CONST INT SPL_STOPTIME		=	11;

// Psi-Sekte
CONST INT SPL_FORGET		=	12;
CONST INT SPL_WINDFIST		=	13;
CONST INT SPL_TELEKINESIS	=	14;
CONST INT SPL_HUMANCONTROL	=	15;
CONST INT SPL_UNUSED2		=	16;
CONST INT SPL_INSANE		=	17;
CONST INT SPL_TELESTORM		=	18;

// Kampftalente ( npc.fighttalents )
CONST INT TAL_DAGGER			= 1 << 	0;
CONST INT TAL_DAGGER2			= 1 << 	1;
CONST INT TAL_DAGGER3			= 1 << 	2;
CONST INT TAL_1H_SWORD			= 1 << 	3;
CONST INT TAL_1H_SWORD2			= 1 << 	4;
CONST INT TAL_1H_SWORD3			= 1 << 	5;
CONST INT TAL_1H_AXE			= 1 << 	6;
CONST INT TAL_1H_AXE2			= 1 << 	7;
CONST INT TAL_1H_AXE3			= 1 << 	8;
CONST INT TAL_2H_SWORD			= 1 << 	9;
CONST INT TAL_2H_SWORD2			= 1 << 10;
CONST INT TAL_2H_SWORD3			= 1 << 11;
CONST INT TAL_2H_AXE			= 1 << 12;
CONST INT TAL_2H_AXE2			= 1 << 13;
CONST INT TAL_2H_AXE3			= 1 << 14;
CONST INT TAL_BOW				= 1 << 15;
CONST INT TAL_BOW2				= 1 << 16;
CONST INT TAL_BOW3				= 1 << 17;
CONST INT TAL_CROSSBOW			= 1 << 18;
CONST INT TAL_CROSSBOW2			= 1 << 19;
CONST INT TAL_CROSSBOW3			= 1 << 20;

// Weitere Talente ( npc.talents )
CONST INT MAX_TALENT			=	17;

CONST INT TAL_SNEAK				=	1<< 0;
CONST INT TAL_HIDE				=   1<< 1;
CONST INT TAL_STEAL				=   1<< 2;
CONST INT TAL_PICKLOCK			=   1<< 3;
CONST INT TAL_TRAPS				=   1<< 4;
CONST INT TAL_SEVENTHSENSE		=   1<< 5;
CONST INT TAL_ACROBAT			=	1<< 6;
CONST INT TAL_NIGHTSIGHT		=   1<< 7;
CONST INT TAL_ASSASSIN			=   1<< 8;
CONST INT TAL_MUSHROOMS			=	1<< 9;
CONST INT TAL_TAMEANIMALS		=   1<<10;
CONST INT TAL_SPEAKORK			=   1<<11;			
CONST INT TAL_HEAL				=	1<<12;
CONST INT TAL_MANA				=	1<<13;
CONST INT TAL_IRONWILL			=   1<<14;

CONST INT TAL_SWIM				=	1<<15;
CONST INT TAL_CLIMB				=	1<<16;

// Konstanten fuer Lernpakete
CONST INT LP_ATR		= 0;		// Lerne Attribut
CONST INT LP_FIGHT_TAL	= 1;		// Lerne Fight-Talent
CONST INT LP_TAL		= 2;		// Lerne Talent
CONST INT LP_MAG		= 3;		// Lerne Spell

// Constants for Daytime
CONST INT TIME_MIDNIGHT			= 0;			// 00 - 03 Uhr
CONST INT TIME_DAWN				= 3;			// 03 - 06 Uhr
CONST INT TIME_MORNING			= 6;			// 06 - 09 Uhr
CONST INT TIME_FORENOON			= 9;			// 09 - 12 Uhr
CONST INT TIME_NOON				= 12;			// 12 - 15 Uhr
CONST INT TIME_AFTERNOON		= 15;			// 15 - 18 Uhr
CONST INT TIME_EVENING			= 18;			// 18 - 21 Uhr
CONST INT TIME_NIGHT			= 21;			// 21 - 00 Uhr

//VAR INT daytime;						// aktuelle Tageszeit
VAR INT day;							// Tagescounter
VAR INT chapter;						// aktuelles Kapitel

// Constants for Memory
CONST INT SC_UNKNOWN		= 0;
CONST INT SC_KNOWN			= 1;
CONST INT SC_ANNOYED		= 2;
CONST INT SC_FURIOUS		= 4;
CONST INT SC_STOLE			= 8;
CONST INT SC_ATTACKED		= 16;
CONST INT SC_KILLED			= 32;

CONST INT SC_RECRUIT		= 64;

// Constants for Infos
CONST INT INF_PLACE			= 1;
CONST INT INF_PERSON		= 2;
CONST INT INF_ITEMS			= 4;
CONST INT INF_GUILD			= 8;
CONST INT INF_BEINGS		= 16;
CONST INT INF_MISSION		= 32;

// Info Status
CONST INT INF_TELL		= 0;
CONST INT INF_UNKNOWN	= 2;

// Constants for Item - Kategories
CONST INT ITEM_KAT_NONE		= 0;	// Sonstiges
CONST INT ITEM_KAT_NF		= 1;	// Alle Nahkampfwaffen
CONST INT ITEM_KAT_FF		= 2;	// Alle Fernkampfwaffen
CONST INT ITEM_KAT_MUN		= 3;	// Jede Art von Munition
CONST INT ITEM_KAT_ARMOR	= 4;	// Rüstungen und Schilde
CONST INT ITEM_KAT_TRAPS	= 5;	// Alle Fallen
CONST INT ITEM_KAT_FOOD		= 6;	// Alle Nahrungsmittel
CONST INT ITEM_KAT_DOCS		= 7;	// Alle Dokumente
CONST INT ITEM_KAT_KEYS		= 8;	// Alle Schlüssel
CONST INT ITEM_KAT_LIGHT	= 9;	// Alle Lichtquellen

// Constants for Item - Flags
CONST INT ITEM_NF 			= 1 <<  0; // Nahkampffaehig		
CONST INT ITEM_FF 			= 1 <<  1; // Ferkampffaehig		
CONST INT ITEM_VS 			= 1 <<  2; // Verschießbar			 
CONST INT ITEM_RU 			= 1 <<  3; // Rüstbar				
CONST INT ITEM_FT 			= 1 <<  4; // Fallentauglich		
CONST INT ITEM_VZ 			= 1 <<  5; // Verzehrbar			
CONST INT ITEM_LB 			= 1 <<  6; // Lesbar				
CONST INT ITEM_SO 			= 1 <<  7; // Schloesseroeffnend	
CONST INT ITEM_LS 			= 1 <<  8; // Lichtspendend		
CONST INT ITEM_ZF 			= 1 <<  9; // Zahlungsfaehig		
CONST INT ITEM_BB 			= 1 << 10; // Brennbar				
CONST INT ITEM_SB 			= 1 << 11; // Schwimmbar		
CONST INT ITEM_MI 			= 1 << 12; // Missionsgegenstand	
CONST INT ITEM_DRINK		= 1 << 27; // Trinkbar
CONST INT ITEM_TORCH		= 1 << 28; // Wie eine Fackel behandeln
CONST INT ITEM_THROW		= 1 << 29; // Gegenstand kann geworfen werden

// weitere Waffenflags
CONST INT ITEM_DAG			= 1 << 13; // Waffe wird wie ein Dolch behandelt
CONST INT ITEM_SWD			= 1 << 14; // Waffe wird wie ein Schwert behandelt
CONST INT ITEM_AXE			= 1 << 15; // Waffe wird wie eine Axt behandelt
CONST INT ITEM_2HD_SWD		= 1 << 16; // Waffe wird wie ein Zweihänder behandelt
CONST INT ITEM_2HD_AXE		= 1 << 17; // Waffe wird wie eine Streitaxt behandelt
CONST INT ITEM_SHIELD		= 1 << 18; // Waffe wird wie ein Schild behandelt
CONST INT ITEM_BOW			= 1 << 19; // Waffe wird wie ein Bogen behandelt
CONST INT ITEM_CROSSBOW		= 1 << 20; // Waffe wird wie eine Armbrust behandelt

// Constants for Munition
CONST INT MUN_THROW			= 1; // Keine, die Fernkampfwaffe selbst wird geworfen
CONST INT MUN_PFL			= 2; // Pfeile
CONST INT MUN_BLZ			= 4; // Bolzen

// Constants for wearing Armor
CONST INT WEAR_TORSO			= 1; // Oberkoerper	( Brustpanzer )
CONST INT WEAR_HEAD				= 2; // Kopf		( Helm )
CONST INT WEAR_NECK				= 3; // Hals		( Kette )
CONST INT WEAR_EAR				= 4; // Ohrringe

// Constants for objects
CONST INT OBJ_CLOSED			= 0;		// Schalter aus
CONST INT OBJ_OPEN				= 1;		// Schalter an
CONST INT OBJ_LOCKED			= 2;		

CONST INT OBJ_FLAG_MOVEABLE			= 1;	// Object kann bewegt werden
CONST INT OBJ_FLAG_TAKEABLE			= 2;	// Object kann getragen werden
CONST INT OBJ_FLAG_HIDE				= 4;	// Object kann als Versteck genutzt werden
CONST INT OBJ_FLAG_CONTAINER		= 8;	// Object kann andere Objecte beinhalten
CONST INT OBJ_FLAG_SWITCH			= 32;	// Object ist ein Schalter
CONST INT OBJ_FLAG_SITDOWN			= 64;	// hinsetzen möglich
CONST INT OBJ_FLAG_LIEDOWN			= 128;	// hinlegen möglich
CONST INT OBJ_FLAG_INDESTRUCTABLE	= 512;	// Unzerstörbar - Flag

// Chapter Flags
CONST INT CHAPTER_1		= 1 << 0;
CONST INT CHAPTER_2		= 1 << 1;
CONST INT CHAPTER_3		= 1 << 2;
CONST INT CHAPTER_4		= 1 << 3;
CONST INT CHAPTER_5		= 1 << 4;
CONST INT CHAPTER_6		= 1 << 5;
CONST INT CHAPTER_ALL	= CHAPTER_1 + CHAPTER_2 + CHAPTER_3 + CHAPTER_4 + CHAPTER_5 + CHAPTER_6;

// AI - Senses - Flags
CONST INT SENSE_SEE		= 1 << 0;
CONST INT SENSE_HEAR	= 1 << 1;
CONST INT SENSE_SMELL	= 1 << 2;

// AI - Walkmode
CONST INT NPC_RUN			= 0;
CONST INT NPC_WALK			= 1;
CONST INT NPC_SNEAK			= 2;
CONST INT NPC_RUN_WEAPON	= 0 + 128;
CONST INT NPC_WALK_WEAPON	= 1 + 128;
CONST INT NPC_SNEAK_WEAPON	= 2 + 128;

// AI - Sound - Types
CONST INT NPC_SOUND_DROPTAKE	= 1;
CONST INT NPC_SOUND_SPEAK		= 3;
CONST INT NPC_SOUND_STEPS		= 4;
CONST INT NPC_SOUND_THROWCOLL	= 5;
CONST INT NPC_SOUND_DRAWWEAPON	= 6;
CONST INT NPC_SOUND_SCREAM		= 7;
CONST INT NPC_SOUND_FIGHT		= 8;

// AI - Manipulate - Types
CONST INT PC_MANIPULATES_ITEM	= 0;
CONST INT PC_MANIPULATES_MOB	= 1;

// Others
CONST INT TIME_INFINITE	= -1000000 / 1000;

// AI - Attitude - Types
CONST INT ATT_FRIENDLY	= 3;
CONST INT ATT_NEUTRAL	= 2;
CONST INT ATT_ANGRY		= 1;
CONST INT ATT_HOSTILE	= 0;

// AI - Kampf - Modi
CONST INT FAI_ATTACK	= 0;
CONST INT FAI_DEFEND	= 1;
CONST INT FAI_PASSIVE	= 2;
CONST INT FAI_ORC		= 3;
CONST INT FAI_GOBBO		= 4;
CONST INT FAI_TROLL		= 5;
CONST INT FAI_SNAPPER	= 6;
CONST INT FAI_CRAWLER	= 7;
CONST INT FAI_MEATBUG	= 8;
CONST INT FAI_SCAVENGER	= 9;
CONST INT FAI_SHADOW	= 10;
CONST INT FAI_ZOMBIE	= 11;
CONST INT FAI_SKELETON	= 12;
CONST INT FAI_WOLF		= 13;

// Objekt - Materialien
CONST INT MAT_WOOD		= 0;
CONST INT MAT_STONE		= 1;
CONST INT MAT_METAL		= 2;
CONST INT MAT_LEATHER	= 3;
CONST INT MAT_CLAY		= 4;
CONST INT MAT_GLAS		= 5;		// ??
