
zscript
{
	name = "ZDoom ZScript";
	keyword_link = "http://zdoom.org/wiki/Special:Search/%s";
	constant_link = "http://zdoom.org/wiki/Special:Search/%s";
	function_link = "http://zdoom.org/wiki/%s";
	case_sensitive = false;
	blocks = "class", "struct", "enum";

	keywords =
	{
		// General keywords
		class, default, private, static, native, return, if, else, for, while, do,
		break, continue, deprecated, state, null, readonly, true, false, struct,
		extend, clearscope, vararg, ui, play, virtual, virtualscope, meta, Property,
		version, in, out, states, action, override, super, is, let, const, replaces,
		protected, self, abstract, enum, switch, case, until, nullptr, foreach, array,
		map, mapiterator, sealed, function
	}

	types =
	{
		object, vector2, vector3, name, string, color, sound, void, double, bool,
		int, float, uint8, uint16, uint, int8, int16, TextureID, SpriteID,
		voidptr, short, fvector2, fvector3, fvector4, vector4, fquat, quat,
		TranslationID
	}

	properties =
	{
		// Actor properties --------------------------------------------------------------------------------

		// Actor
		Skip_Super, DefaultStateUsage, Tag, PainChance, DefThreshold, Threshold, Damage, DamageFunction,
		Scale, FloatBobPhase, FloatBobStrength, Args, DropItem, RenderStyle, DefaultAlpha, Translation,
		StencilColor, BloodColor, BloodType, BounceType, BounceFactor, WallBounceFactor, DamageType,
		PainType, DeathType, DamageFactor, Decal, PoisonDamage, Gravity, SpriteAngle, Friction,	ClearFlags,
		Monster, Projectile, Activation, DesignatedTeam, VisibleToTeam, VisibleToPlayerClass, DistanceCheck,
		FloatBobFactor,

		// Actor (MBF21)
		InfightingGroup, ProjectileGroup, SplashGroup,

		// Inventory
		RestrictedTo, ForbiddenTo, Icon, AltHudIcon, DefMaxAmount,

		// Weapon
		DefaultKickback, BobStyle, PreferredSkin,

		// Powerup/PowerupGiver
		Color, Colormap, Duration,

		// PowerupGiver
		Type,

		// PlayerPawn
		DisplayName, SoundClass, Face, ColorRange, ColorSet, ColorSetFile, ClearColorSet, SpawnClass,
		ForwardMove, SideMove, ScoreIcon, CrouchSprite, DamageScreenColor, StartItem, HexenArmor,
		WeaponSlot,

		// MorphProjectile
		PlayerClass, MonsterClass, /* Duration, */ MorphStyle, MorphFlash, UnmorphFlash,

		// PowerMorph
		/* PlayerClass, MonsterClass, MorphStyle, MorphFlash, UnmorphFlash, */

		// DynamicLight
		/* Type, */

		// Actor flags (as variables accessible from scripts) ----------------------------------------------

		// Internal flags
		bINCHASE, bUNMORPHED, bFLY, bONMOBJ, bARGSDEFINED, bNOSIGHTCHECK, bCRASHED,
		bWARNBOT, bHUNTPLAYERS, bNOHATEPLAYERS, bSCROLLMOVE, bVFRICTION, bBOSSSPAWNED,
		bAVOIDINGDROPOFF, bCHASEGOAL, bINCONVERSATION, bARMED, bFALLING, bLINEDONE,
		bSHATTERING, bKILLED, bBOSSCUBE, bINTRYMOVE, bHANDLENODELAY, bFLYCHEAT,
		bRESPAWNINVUL,

		// MF
		bPICKUP, bSPECIAL, bSOLID, bSHOOTABLE, bNOSECTOR, bNOBLOCKMAP, bAMBUSH, bJUSTHIT,
		bJUSTATTACKED, bSPAWNCEILING, bNOGRAVITY, bDROPOFF, bNOCLIP, bFLOAT, bTELEPORT,
		bMISSILE, bDROPPED, bSHADOW, bNOBLOOD, bCORPSE, bINFLOAT, bCOUNTKILL, bCOUNTITEM,
		bSKULLFLY, bNOTDMATCH, bSPAWNSOUNDSOURCE, bFRIENDLY, bNOLIFTDROP, bSTEALTH,
		bICECORPSE,

		// MF2
		bDONTREFLECT, bWINDTHRUST, bDONTSEEKINVISIBLE, bBLASTED, bFLOORCLIP, bSPAWNFLOAT,
		bNOTELEPORT, bRIPPER, bPUSHABLE, bSLIDESONWALLS, bCANPASS, bCANNOTPUSH, bTHRUGHOST,
		bBOSS, bNODAMAGETHRUST, bDONTTRANSLATE, bTELESTOMP, bFLOATBOB, bTHRUACTORS,
		bACTIVATEIMPACT, bCANPUSHWALLS, bACTIVATEMCROSS, bACTIVATEPCROSS,
		bCANTLEAVEFLOORPIC, bNONSHOOTABLE, bINVULNERABLE, bDORMANT, bSEEKERMISSILE,
		bREFLECTIVE,

		// MF3
		bFLOORHUGGER, bCEILINGHUGGER, bNORADIUSDMG, bGHOST, bSPECIALFLOORCLIP, bALWAYSPUFF,
		bDONTSPLASH, bDONTOVERLAP, bDONTMORPH, bDONTSQUASH, bEXPLOCOUNT, bFULLVOLACTIVE,
		bISMONSTER, bSKYEXPLODE, bSTAYMORPHED, bDONTBLAST, bCANBLAST, bNOTARGET, bDONTGIB,
		bNOBLOCKMONST, bFULLVOLDEATH, bAVOIDMELEE, bSCREENSEEKER, bFOILINVUL, bNOTELEOTHER,
		bBLOODLESSIMPACT, bNOEXPLODEFLOOR, bPUFFONACTORS,

		// MF4
		bQUICKTORETALIATE, bNOICEDEATH, bRANDOMIZE, bFIXMAPTHINGPOS, bACTLIKEBRIDGE,
		bSTRIFEDAMAGE, bCANUSEWALLS, bFORCERADIUSDMG, bDONTFALL, bSEESDAGGERS, bINCOMBAT,
		bLOOKALLAROUND, bSTANDSTILL, bSPECTRAL, bNOSPLASHALERT, bSYNCHRONIZED, bNOTARGETSWITCH,
		bDONTHARMCLASS, bSHIELDREFLECT, bDEFLECT, bALLOWPARTICLES, bEXTREMEDEATH, bNOEXTREMEDEATH,
		bFRIGHTENED, bNOSKIN, bBOSSDEATH,

		// MF5
		bDONTDRAIN, bGETOWNER, bNODROPOFF, bNOFORWARDFALL, bCOUNTSECRET, bNODAMAGE,
		bBLOODSPLATTER, bOLDRADIUSDMG, bDEHEXPLOSION, bPIERCEARMOR, bNOBLOODDECALS,
		bUSESPECIAL, bNOPAIN, bALWAYSFAST, bNEVERFAST, bALWAYSRESPAWN, bNEVERRESPAWN,
		bDONTRIP, bNOINFIGHTING, bNOINTERACTION, bNOTIMEFREEZE, bPUFFGETSOWNER,
		bSPECIALFIREDAMAGE, bSUMMONEDMONSTER, bNOVERTICALMELEERANGE, bBRIGHT, bCANTSEEK,
		bPAINLESS, bMOVEWITHSECTOR,

		// MF6
		bNOBOSSRIP, bTHRUSPECIES, bMTHRUSPECIES, bFORCEPAIN, bNOFEAR, bBUMPSPECIAL,
		bDONTHARMSPECIES, bSTEPMISSILE, bNOTELEFRAG, bTOUCHY, bCANJUMP, bJUMPDOWN,
		bVULNERABLE, bNOTRIGGER, bADDITIVEPOISONDAMAGE, bADDITIVEPOISONDURATION,
		bBLOCKEDBYSOLIDACTORS, bNOMENU, bSEEINVISIBLE, bDONTCORPSE, bDOHARMSPECIES,
		bPOISONALWAYS, bNOTAUTOAIMED, bNOTONAUTOMAP, bRELATIVETOFLOOR,

		// MF7
		bNEVERTARGET, bNOTELESTOMP, bALWAYSTELEFRAG, bWEAPONSPAWN, bHARMFRIENDS, bBUDDHA,
		bFOILBUDDHA, bDONTTHRUST, bALLOWPAIN, bCAUSEPAIN, bTHRUREFLECT, bMIRRORREFLECT,
		bAIMREFLECT, bHITTARGET, bHITMASTER, bHITTRACER, bNODECAL, bFORCEDECAL, bLAXTELEFRAGDMG,
		bICESHATTER, bALLOWTHRUFLAGS, bUSEKILLSCRIPTS, bNOKILLSCRIPTS, bSPRITEANGLE,
		bSMASHABLE, bNOSHIELDREFLECT, bFORCEZERORADIUSDMG, bNOINFIGHTSPECIES, bFORCEINFIGHTING,

		// MF8
		bFRIGHTENING, bBLOCKASPLAYER, bDONTFACETALKER, bHITOWNER, bNOFRICTION,
		bNOFRICTIONBOUNCE, bRETARGETAFTERSLAM, bSTOPRAILS, bFALLDAMAGE, bMINVISIBLE,
		bMVISBLOCKED, bABSVIEWANGLES, bALLOWTHRUBITS, bFULLVOLSEE, bE1M8BOSS, bE2M8BOSS,
		bE3M8BOSS, bE4M8BOSS, bE4M6BOSS, bMAP07BOSS1, bMAP07BOSS2, bAVOIDHAZARDS,
		bSTAYONLIFT, bDONTFOLLOWPLAYERS, bSEEFRIENDLYMONSTERS, bCROSSLINECHECK,
		bMASTERNOSEE, bADDLIGHTLEVEL, bONLYSLAMSOLID,

		// MF9
		bSHADOWAIM, bDOSHADOWBLOCK, bSHADOWBLOCK, bSHADOWAIMVERT, bDECOUPLEDANIMATIONS,
		bNOSECTORDAMAGE, bISPUFF, bFORCESECTORDAMAGE,

		// Effect flags
		bVISIBILITYPULSE, bROCKETTRAIL, bGRENADETRAIL, bINVISIBLE, bFORCEYBILLBOARD,
		bFORCEXYBILLBOARD, bROLLSPRITE, bFLATSPRITE, bWALLSPRITE, bDONTFLIP, bROLLCENTER,
		bMASKROTATION, bABSMASKANGLE, bABSMASKPITCH, bXFLIP, bYFLIP, bINTERPOLATEANGLES,
		bDONTINTERPOLATE, bSPRITEFLIP, bZDOOMTRANS, bCASTSPRITESHADOW, bNOSPRITESHADOW,
		bINVISIBLEINMIRRORS, bONLYVISIBLEINMIRRORS, bBILLBOARDFACECAMERA,
		bBILLBOARDNOFACECAMERA, bFLIPSPRITEOFFSETX, bFLIPSPRITEOFFSETY, bCAMFOLLOWSPLAYER,
		bNOMIPMAP, bISOMETRICSPRITES, bSQUAREPIXELS,

		// Bounce flags
		bBOUNCEONWALLS, bBOUNCEONFLOORS, bBOUNCEONCEILINGS, bALLOWBOUNCEONACTORS,
		bBOUNCEAUTOOFF, bBOUNCELIKEHERETIC, bCANBOUNCEWATER, bNOWALLBOUNCESND,
		bNOBOUNCESOUND, bBOUNCEONACTORS, bEXPLODEONWATER, bMBFBOUNCER, bBOUNCEAUTOOFFFLOORONLY,
		bUSEBOUNCESTATE, bDONTBOUNCEONSHOOTABLES, bBOUNCEONUNRIPPABLES, bDONTBOUNCEONSKY,

		// Misc
		bNOSAVEGAME,

		// Deprecated
		bMISSILEMORE, bMISSILEEVENMORE
	}

	constants =
	{
		// Actor flags (used in an actor's definition)

		// MF
		PICKUP, SPECIAL, SOLID, SHOOTABLE, NOSECTOR, NOBLOCKMAP, AMBUSH, JUSTHIT,
		JUSTATTACKED, SPAWNCEILING, NOGRAVITY, DROPOFF, NOCLIP, FLOAT, TELEPORT,
		MISSILE, DROPPED, SHADOW, NOBLOOD, CORPSE, INFLOAT, COUNTKILL, COUNTITEM,
		SKULLFLY, NOTDMATCH, SPAWNSOUNDSOURCE, FRIENDLY, NOLIFTDROP, STEALTH,
		ICECORPSE,

		// MF2
		DONTREFLECT, WINDTHRUST, DONTSEEKINVISIBLE, BLASTED, FLOORCLIP, SPAWNFLOAT,
		NOTELEPORT, RIPPER, PUSHABLE, SLIDESONWALLS, CANPASS, CANNOTPUSH, THRUGHOST,
		BOSS, NODAMAGETHRUST, DONTTRANSLATE, TELESTOMP, FLOATBOB, THRUACTORS,
		ACTIVATEIMPACT, CANPUSHWALLS, ACTIVATEMCROSS, ACTIVATEPCROSS,
		CANTLEAVEFLOORPIC, NONSHOOTABLE, INVULNERABLE, DORMANT, SEEKERMISSILE,
		REFLECTIVE,

		// MF3
		FLOORHUGGER, CEILINGHUGGER, NORADIUSDMG, GHOST, SPECIALFLOORCLIP, ALWAYSPUFF,
		DONTSPLASH, DONTOVERLAP, DONTMORPH, DONTSQUASH, EXPLOCOUNT, FULLVOLACTIVE,
		ISMONSTER, SKYEXPLODE, STAYMORPHED, DONTBLAST, CANBLAST, NOTARGET, DONTGIB,
		NOBLOCKMONST, FULLVOLDEATH, AVOIDMELEE, SCREENSEEKER, FOILINVUL, NOTELEOTHER,
		BLOODLESSIMPACT, NOEXPLODEFLOOR, PUFFONACTORS,

		// MF4
		QUICKTORETALIATE, NOICEDEATH, RANDOMIZE, FIXMAPTHINGPOS, ACTLIKEBRIDGE,
		STRIFEDAMAGE, CANUSEWALLS, FORCERADIUSDMG, DONTFALL, SEESDAGGERS, INCOMBAT,
		LOOKALLAROUND, STANDSTILL, SPECTRAL, NOSPLASHALERT, SYNCHRONIZED, NOTARGETSWITCH,
		DONTHARMCLASS, SHIELDREFLECT, DEFLECT, ALLOWPARTICLES, EXTREMEDEATH, NOEXTREMEDEATH,
		FRIGHTENED, NOSKIN, BOSSDEATH,

		// MF5
		DONTDRAIN, GETOWNER, NODROPOFF, NOFORWARDFALL, COUNTSECRET, NODAMAGE,
		BLOODSPLATTER, OLDRADIUSDMG, DEHEXPLOSION, PIERCEARMOR, NOBLOODDECALS,
		USESPECIAL, NOPAIN, ALWAYSFAST, NEVERFAST, ALWAYSRESPAWN, NEVERRESPAWN,
		DONTRIP, NOINFIGHTING, NOINTERACTION, NOTIMEFREEZE, PUFFGETSOWNER,
		SPECIALFIREDAMAGE, SUMMONEDMONSTER, NOVERTICALMELEERANGE, BRIGHT, CANTSEEK,
		PAINLESS, MOVEWITHSECTOR,

		// MF6
		NOBOSSRIP, THRUSPECIES, MTHRUSPECIES, FORCEPAIN, NOFEAR, BUMPSPECIAL,
		DONTHARMSPECIES, STEPMISSILE, NOTELEFRAG, TOUCHY, CANJUMP, JUMPDOWN,
		VULNERABLE, NOTRIGGER, ADDITIVEPOISONDAMAGE, ADDITIVEPOISONDURATION,
		BLOCKEDBYSOLIDACTORS, NOMENU, SEEINVISIBLE, DONTCORPSE, DOHARMSPECIES,
		POISONALWAYS, NOTAUTOAIMED, NOTONAUTOMAP, RELATIVETOFLOOR,

		// MF7
		NEVERTARGET, NOTELESTOMP, ALWAYSTELEFRAG, WEAPONSPAWN, HARMFRIENDS, BUDDHA,
		FOILBUDDHA, DONTTHRUST, ALLOWPAIN, CAUSEPAIN, THRUREFLECT, MIRRORREFLECT,
		AIMREFLECT, HITTARGET, HITMASTER, HITTRACER, NODECAL, FORCEDECAL, LAXTELEFRAGDMG,
		ICESHATTER, ALLOWTHRUFLAGS, USEKILLSCRIPTS, NOKILLSCRIPTS, SPRITEANGLE,
		SMASHABLE, NOSHIELDREFLECT, FORCEZERORADIUSDMG, NOINFIGHTSPECIES, FORCEINFIGHTING,

		// MF8
		FRIGHTENING, BLOCKASPLAYER, DONTFACETALKER, HITOWNER, NOFRICTION,
		NOFRICTIONBOUNCE, RETARGETAFTERSLAM, STOPRAILS, FALLDAMAGE, MINVISIBLE,
		MVISBLOCKED, ABSVIEWANGLES, ALLOWTHRUBITS, FULLVOLSEE, E1M8BOSS, E2M8BOSS,
		E3M8BOSS, E4M8BOSS, E4M6BOSS, MAP07BOSS1, MAP07BOSS2, AVOIDHAZARDS,
		STAYONLIFT, DONTFOLLOWPLAYERS, SEEFRIENDLYMONSTERS, CROSSLINECHECK,
		MASTERNOSEE, ADDLIGHTLEVEL, ONLYSLAMSOLID,

		// MF9
		SHADOWAIM, DOSHADOWBLOCK, SHADOWBLOCK, SHADOWAIMVERT, DECOUPLEDANIMATIONS,
		NOSECTORDAMAGE, ISPUFF, FORCESECTORDAMAGE,

		// Effect flags
		VISIBILITYPULSE, ROCKETTRAIL, GRENADETRAIL, INVISIBLE, FORCEYBILLBOARD,
		FORCEXYBILLBOARD, ROLLSPRITE, FLATSPRITE, WALLSPRITE, DONTFLIP, ROLLCENTER,
		MASKROTATION, ABSMASKANGLE, ABSMASKPITCH, XFLIP, YFLIP, INTERPOLATEANGLES,
		DONTINTERPOLATE, SPRITEFLIP, ZDOOMTRANS, CASTSPRITESHADOW, NOSPRITESHADOW,
		INVISIBLEINMIRRORS, ONLYVISIBLEINMIRRORS, BILLBOARDFACECAMERA,
		BILLBOARDNOFACECAMERA, FLIPSPRITEOFFSETX, FLIPSPRITEOFFSETY, CAMFOLLOWSPLAYER,
		NOMIPMAP, ISOMETRICSPRITES, SQUAREPIXELS,

		// Bounce flags
		BOUNCEONWALLS, BOUNCEONFLOORS, BOUNCEONCEILINGS, ALLOWBOUNCEONACTORS,
		BOUNCEAUTOOFF, BOUNCELIKEHERETIC, CANBOUNCEWATER, NOWALLBOUNCESND,
		NOBOUNCESOUND, BOUNCEONACTORS, EXPLODEONWATER, MBFBOUNCER, BOUNCEAUTOOFFFLOORONLY,
		USEBOUNCESTATE, DONTBOUNCEONSHOOTABLES, BOUNCEONUNRIPPABLES, DONTBOUNCEONSKY,

		// Misc
		NOSAVEGAME,

		// Deprecated
		MISSILEMORE, MISSILEEVENMORE
	}

	// Function info we cannot parse from (g)zdoom.pk3
	// Currently only the deprecated functions are defined. More will be added at some point.
	functions
	{
		// 'base.txt' ----------------------------------------------------------

		DrawHUDTexture
		{
			description = "Access 'statusBar.DrawTexture' directly.";
		}
		LastIndexOf
		{
			description = "Do not use. Contains a bug that couldn't be fixed.";
			deprecated_f = "RightIndexOf";
		}

		// 'actor.txt' ---------------------------------------------------------

		A_FaceConsolePlayer
		{
			description = "Do not use. Has no effects, only exists to let old Zandronum mods run without aborting.";
		}
		A_MeleeAttack
		{
			description = "Performs a melee attack.";
			deprecated_f = "A_CustomMeleeAttack";
		}
		A_MissileAttack
		{
			description = "Turns the actor to face its target, then launches a missile.";
			deprecated_f = "A_CustomMissile";
		}
		A_ComboAttack
		{
			description = "A customizable projectile attack for monsters.";
			deprecated_f = "A_CustomComboAttack";
		}
		A_BulletAttack
		{
			description = "Performs a hitscan attack.";
			deprecated_f = "A_CustomBulletAttack";
		}
		A_PlayWeaponSound
		{
			description = "Plays the specified sound but uses the weapon channel.";
			deprecated_f = "A_PlaySound";
		}
		A_PlaySoundEx
		{
			description = "Plays the a sound on the specified channel.";
			deprecated_f = "A_PlaySound";
		}
		A_StopSoundEx
		{
			description = "Stops the sound playing on the specified channel.";
			deprecated_f = "A_StopSound";
		}
		A_ChangeFlag
		{
			description = "Do not use. Flags are just variables in ZScript, access them directly.";
		}
		A_SetUserVar
		{
			description = "Do not use. Actor variables are directly accessible in ZScript.";
		}
		A_SetUserArray
		{
			description = "Do not use. Actor variables are directly accessible in ZScript.";
		}
		A_SetUserVarFloat
		{
			description = "Do not use. Actor variables are directly accessible in ZScript.";
		}
		A_SetUserArrayFloat
		{
			description = "Do not use. Actor variables are directly accessible in ZScript.";
		}

		// 'actor_checks.txt' --------------------------------------------------

		A_CheckFlag
		{
			description = "Do not use. Flags are just variables in ZScript, access them directly.";
		}

		// 'compatibility.txt' -------------------------------------------------

		GameType
		{
			description = "Do not use. 'gameinfo.gametype' can be accessed directly.";
		}
		C_MidPrint
		{
			deprecated_f = "MidPrint";
		}
		A_CustomMissile
		{
			description = "A customizable projectile attack for monsters.";
			deprecated_f = "A_SpawnProjectile";
		}
		A_FireCustomMissile
		{
			description = "Fires a projectile from a Weapon or a CustomInventory.";
			deprecated_f = "A_FireProjectile";
		}

		// 'stateprovider.txt' -------------------------------------------------

		A_GunFlash
		{
			description = "Do not use. Placeholder to prevent old mods from not being able to load.";
		}
		A_Lower
		{
			description = "Do not use. Placeholder to prevent old mods from not being able to load.";
		}
		A_Raise
		{
			description = "Do not use. Placeholder to prevent old mods from not being able to load.";
		}
		A_CheckReload
		{
			description = "Do not use. Placeholder to prevent old mods from not being able to load.";
		}
	}
}
