[
	{
		name: "exitInPanic",
		triggers: [
			{
				name: "enteredHotspot",
				params: {
					categories: ["mapExit"],
				}
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "panic"
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "policeCalled",
					global: true,
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionImSafeNow1",
						"reactionImSafeNow2",
						"reactionImSafeNow3",
					],
				}
			},
			{
				name: "removeEntity",
			}
		],
		doNotOptimize: true
	},
	{
		name: "speakFriendlyFire",
		cooldown: 5,
		triggers: [
			{
				name: "friendlyFire",
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionFriendlyFire1",
						"reactionFriendlyFire2",
						"reactionFriendlyFire3",
						"reactionFriendlyFire4"
					],
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "wakeUpWonder",
		triggers: [
			{
				name:"wakeUp",
			}
		],
		steps: [
			{
				name: "turnInPlace",
			},
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionWonder"],
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: ["reactionGuardSpot3"],
				}
			},
			{
				name: "setFlag",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "callPolice"
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "intimidatingShoutFirst",
		triggers: [
			{
				name:"intimidatesFirst",
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionIntimidateShout1",
						"reactionIntimidateShout2",
						"reactionIntimidateShout3",
						"reactionIntimidateShout4",
						"reactionIntimidateShout5",
						"reactionIntimidateShout6",
						"reactionIntimidateShout7"
						],
				}
			},
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["holdupShout"]
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "intimidatingShoutAgain",
		triggers: [
			{
				name:"intimidatesAgain",
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionIntimidateShoutAgain1",
						"reactionIntimidateShoutAgain2",
						"reactionIntimidateShoutAgain3"
						],
				}
			},
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["holdupShoutAgain"]
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "speakDoorIsLockedSuprised",
		cooldown: 1,
		triggers: [
			{
				name:"doorIsLockedSuprised",
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionDoorIsLockedSuprised1",
						"reactionDoorIsLockedSuprised2",
						"reactionDoorIsLockedSuprised3",
						"reactionDoorIsLockedSuprised4",
						"reactionDoorIsLockedSuprised5"
						],
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "speakDoorIsLocked",
		cooldown: 1,
		triggers: [
			{
				name:"doorIsLocked",
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionDoorIsLocked1",
						"reactionDoorIsLocked2",
						"reactionDoorIsLocked3",
						"reactionDoorIsLocked4"
						],
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "intimidatingShout",
		triggers: [
			{
				name:"intimidates",
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionIntimidateShoutSingle1",
						"reactionIntimidateShoutSingle2",
						"reactionIntimidateShoutSingle3",
						"reactionIntimidateShoutSingle4"
						],
				}
			},
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["holdupShoutAgain"]
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "exitInPanicNoCops",
		triggers: [
			{
				name: "enteredHotspot",
				params: {
					categories: ["mapExit"],
				}
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "panic"
				}
			},
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionImSafeNow1",
						"reactionImSafeNow2",
						"reactionImSafeNow3",
					],
				}
			},
			{
				name: "removeEntity",
			}
		],
		doNotOptimize: true
	},
	{
		name: "exitPeacefully",
		triggers: [
			{
				name: "enteredHotspot",
				params: {
					categories: ["mapExit"],
				}
			}
		],
		conditions: [
			{
				name: "flagSet",
				params: {
					name: "readyToLeave"
				}
			}
		],
		steps: [
			{
				name: "removeEntity",
			}
		],
		doNotOptimize: true
	},
	{
		name:"speakTooManySuspiciousObjectsPanic",
		cooldown: 10,
		triggers: [
			{
				name:"tooManySuspiciousObjectsSeen"
			}
		],
		conditions: [
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionPanicWhat1",
						"reactionPanicWhat2",
						"reactionPanicWhat3",
						"reactionPanicWhat4",
						"reactionPanicWhat5",
						"reactionPanicWhat6",
						"reactionPanicWhat7",
					]
				}
			},
		]
	},
	{
		name:"speakTooManySuspiciousObjectsAggressive",
		cooldown: 10,
		triggers: [
			{
				name:"tooManySuspiciousObjectsSeen",
			},
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionStartAttack1",
						"reactionStartAttack2",
						"reactionStartAttack3",
						"reactionStartAttack4",
						"reactionStartAttack5"
					]
				}
			},
		]
	},
	{
		name:"tooManySuspiciousObjectsPanic",
		triggers: [
			{
				name:"tooManySuspiciousObjectsSeen",
			},
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			}
		],
		steps:[
			{
				name: "setFlag",
				params: {
					name: "panic"
				}
			},
		],
	},
	{
		name:"tooManySuspiciousObjectsCallPolice",
		triggers: [
			{
				name:"tooManySuspiciousObjectsSeen",
			},
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "policeCalled",
					global: true
				},
			}
		],
		steps:[
			{
				name: "setFlag",
				params: {
					name: "callPolice"
				}
			},
		],
	},
	{
		name:"tooManySuspiciousObjectsGetAggressive",
		triggers: [
			{
				name:"tooManySuspiciousObjectsSeen",
			},
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "aggressive"
				}

			}
		],
		steps:[
			{
				name: "setFlag",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "pickTargetFromVisible",
				params: {
					belongsToTeam: "goons"
				}
			},
		],
	},
	{
		name: "foundSuspiciousSubjectSoInvestigateIt",
		triggers: [
			{
				name: "foundSuspiciousSubject",
			},
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
			{
				name: "doesNotHaveTarget",
			},
		],
		steps: [
			{
				name: "turnInPlace",
			},
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionWonder"],
				}
			},
			{
				name: "offscreenAlert",
				params: {
					baseDefinition: "alertBaseNegative",
					iconDefinition: "alertIconEye",
				}
			},
			{
				name: "rememberWaypoint",
				params: {
					name: "investigate",
				}
			},
			{
				name: "specialAction",
				params: {
					name: "lookAtSuspicious"
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "gotTargetSetAsTargetAndRememberLocation",
		triggers: [
			{
				name: "gotTarget",
			},
		],
		steps: [
			// Every time you get new target, remember where you saw him
			// or otherwise got to know about him
			{
				name: "rememberWaypoint",
				params: {
					name: "opponentPosition",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "aggressiveSawPotentialEnemy",
		triggers: [
			{
				name: "otherBecameVisible",
				params: {
					ignoreRelayed: true
				}
			},
		],
		triggerConditions: [
			{
				name: "otherIsNotTarget",
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
			{
				name: "flagSet",
				params: {
					name: "aggressive",
				}
			},
			{
				name: "otherBelongsToTeam",
				params: {
					name: "goons",
				}
			},
		],
		steps: [
			{
				name: "pickTargetFromVisible",
				params: {
					belongsToTeam: "goons"
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionStartAttack1",
						"reactionStartAttack2",
						"reactionStartAttack3",
						"reactionStartAttack4",
						"reactionStartAttack5",
						],
				}
			},
		],
		doNotOptimize: true
	},

		{
		name: "zombieAggressiveSawPotentialEnemy",
		triggers: [
			{
				name: "otherBecameVisible",
				params: {
					ignoreRelayed: true
				}
			},
		],
		triggerConditions: [
			{
				name: "otherIsNotTarget",
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
			{
				name: "flagSet",
				params: {
					name: "aggressive",
				}
			},
			{
				name: "otherBelongsToTeam",
				params: {
					name: "goons",
				}
			},
		],
		steps: [
			{
				name: "pickTargetFromVisible",
				params: {
					belongsToTeam: "goons"
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: ["reactionZombieSeeATarget"],
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "aggressiveFlagChanged",
		triggers: [
			{
				name: "flagChanged",
				params: {
					flagName: "aggressive",
					newState: true
				}
			},
		],
		triggerConditions:[
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
			{
				name: "doesNotHaveTarget",
			}
		],
		steps: [
			{
				name: "pickTargetFromVisible",
				params: {
					belongsToTeam: "goons"
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "aggressiveTargetBecameVisible",
		triggers: [
			{
				name: "targetBecameVisible"
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "reactedToTargetVisible",
				}
			},
			{
				name: "flagSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "reactedToTargetVisible",
					timer: 4.0
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionContinueAttack1",
						"reactionContinueAttack2",
						"reactionContinueAttack3",
						"reactionContinueAttack4",
						"reactionContinueAttack5",
						"reactionContinueAttack6"
					],
				}
			},
		],
		doNotOptimize: true
	}

	{
		name: "zombieAggressiveTargetBecameVisible",
		triggers: [
			{
				name: "targetBecameVisible"
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "reactedToTargetVisible",
				}
			},
			{
				name: "flagSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "reactedToTargetVisible",
					timer: 4.0
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: ["reactionZombieSeeATarget"]
				}
			},
		],
		doNotOptimize: true
	}

	{
		name: "aggressiveLostTarget",
		triggers: [
			{
				name: "lostTarget"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionWonFight1",
						"reactionWonFight2",
						"reactionWonFight3",
						"reactionWonFight4",
						"reactionWonFight5",
					]
				}
			},
			{
				name: "pickTargetFromVisible",
				params: {
					belongsToTeam: "goons"
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "zombieAggressiveLostTarget",
		triggers: [
			{
				name: "lostTarget"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: ["reactionZombieKilledAGoon"]
				}
			},
			{
				name: "pickTargetFromVisible",
				params: {
					belongsToTeam: "goons"
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "aggressiveTargetBecameInvisible",
		triggers: [
			{
				name: "targetBecameInVisible"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
		],
		steps: [
			{
				name: "rememberWaypoint",
				params: {
					name: "opponentPosition",
				}
			},
		// Don't we already have a target?
		// Yes but we could want to pick a new one that we actually see?
			/*
			{
				name: "pickTargetFromVisible",
				params: {
					belongsToTeam: "goons"
				}
			},
			*/
		],
		doNotOptimize: true
	},

	{
		name: "calledPoliceFight",
		triggers: [
			{
				name: "globalFlagChanged",
				params: {
					flagName: "policeCalled",
					newState: true,
				}
			},
		],
		conditions: [
			{ // this one called or was going to call the police
				name: "flagSet",
				params: {
					name: "callPolice"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			}
		],
		doNotOptimize: true
	},
	{
		name: "guardCalledPoliceFight",
		triggers: [
			{
				name: "globalFlagChanged",
				params: {
					flagName: "policeCalled",
					newState: true,
				}
			},
		],
		conditions: [
			{
				name: "flagNotSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "tookDamageHealthBelowSomeLevelGetGun",
		triggers: [
			{
				name: "tookDamage",
				params: {
					healthBelowPercent: 0.8
				}
			},
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "hasGun"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "getGun"
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "getGun",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "tookDamageFight",
		triggers: [
			{
				name: "tookDamage"
			},
		],
		conditions: [
			{
				name: "random",
				params: {
					probability: 0.5,
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionYouHitMeFight1",
						"reactionYouHitMeFight2",
						"reactionYouHitMeFight3",
						"reactionYouHitMeFight4",
						"reactionYouHitMeFight5"
					]
				}
			},
			{
				name: "setFlag",
				params: {
					name: "aggressive"
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "guardTookDamageFight",
		triggers: [
			{
				name: "tookDamage"
			},
		],
		conditions: [
			{
				name: "flagNotSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionYouHitMeFight1",
						"reactionYouHitMeFight2",
						"reactionYouHitMeFight3",
						"reactionYouHitMeFight4",
						"reactionYouHitMeFight5"
					]
				}
			},
			{
				name: "setFlag",
				params: {
					name: "aggressive"
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "tookDamageFlee",
		triggers: [
			{
				name: "tookDamage"
			}
		],
		conditions: [
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionPanicDontHitMe1",
						"reactionPanicDontHitMe2",
						"reactionPanicDontHitMe3",
						"reactionPanicDontHitMe4",
						"reactionPanicDontHitMe5",
						"reactionPanicDontHitMe6",
					]
				}
			},
			{
				name: "setFlag",
				params: {
					name: "callPolice"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic"
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "defreezeOtherLostSight",
		triggers: [
			{
				name: "otherLostSight",
			}
		],
		triggerConditions: [
			{
				name: "otherIsTarget",
			},
			{
				name: "flagSet",
				params: {
					name: "freeze"
				}
			},
		],
		steps: [
			{
				name: "unsetFlag",
				params: {
					name: "freeze",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "defreezeOtherBecameInvisible",
		triggers: [
			{
				name: "otherBecameInvisible",
			}
		],
		triggerConditions: [
			{
				name: "otherIsTarget",
			},
			{
				name: "flagSet",
				params: {
					name: "freeze"
				}
			},
		],
		steps: [
			{
				name: "unsetFlag",
				params: {
					name: "freeze",
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionRun1",
						"reactionRun2",
						"reactionRun3",
						"reactionRun4",
					],
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "defreezeOtherUnequippedWeapon",
		triggers: [
			{
				name: "otherUnequipped",
				params: {
					type: "weapon"
				}
			}
		],
		triggerConditions: [
			{
				name: "otherIsTarget",
			},
			{
				name: "flagSet",
				params: {
					name: "freeze"
				}
			},
		],
		steps: [
			{
				name: "unsetFlag",
				params: {
					name: "freeze",
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionRun1",
						"reactionRun2",
						"reactionRun3",
						"reactionRun4",
					],
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "disableLOSConeIntimidated",
		triggers: [
			{
				name: "flagChanged",
				params: {
					flagName: "intimidated",
					newState: true,
				}
			}
		],
		steps: [
			{
				name: "modifyComponent",
				params: {
					component: "LOSVisualizationComponent",
					values: {
						enabled: false,
					}
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "enableLOSConeNoMoreIntimidated",
		triggers: [
			{
				name: "flagChanged",
				params: {
					flagName: "intimidated",
					newState: false,
				}
			}
		],
		steps: [
			{
				name: "modifyComponent",
				params: {
					component: "LOSVisualizationComponent",
					values: {
						enabled: true,
					}
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "speakIntimidatedPanic",
		triggers: [
			{
				name: "flagChanged",
				params: {
					flagName: "intimidated",
					newState: true,
				}
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionDontShoot1",
						"reactionDontShoot2",
						"reactionDontShoot3",
						"reactionDontShoot4",
						"reactionDontShoot5",
					],
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "intimidatedPanic",
		triggers: [
			{
				name: "flagChanged",
				params: {
					flagName: "intimidated",
					newState: true,
				}
			}
		],
		steps: [
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			},
			{
				name: "setFlag",
				params: {
					name: "callPolice"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic"
				}
			},
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["holdupScream"]
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "speakUserCommandFailed",
		triggers: [
			{
				name: "userCommandFailed",
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionCantGo1",
						"reactionCantGo2",
						"reactionCantGo3",
						"reactionCantGo4",
						"reactionCantGo5",
						"reactionCantGo6",
					],
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "speakUserCommandSucceed",
		cooldown: 4,
		triggers: [
			{
				name: "userCommandSucceed",
			}
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionCommandedMove1",
						"reactionCommandedMove2",
						"reactionCommandedMove3",
						"reactionCommandedMove4",
						"reactionCommandedMove5",
						"reactionCommandedMove6",
						"reactionCommandedMove7",
						"reactionCommandedMove8",
						"reactionCommandedMove9",
						"reactionCommandedMove10",
					],
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "noMoreIntimidated",
		triggers: [
			{
				name: "flagChanged",
				params: {
					flagName: "intimidated",
					newState: false,
				}
			}
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "callPolice"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic"
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run"
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "noMoreIntimidatedClerk",
		triggers: [
			{
				name: "flagChanged",
				params: {
					flagName: "intimidated",
					newState: false,
				}
			}
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "pickTargetFromVisible",
				params: {
					belongsToTeam: "goons"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "callPolice"
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run"
				}
			},
		],
		doNotOptimize: true
	},


	{
		name: "freezeOtherGainedSight",
		triggers: [
			{
				name: "otherGainedSight"
			}
		],
		triggerConditions: [
			{
				name: "otherBelongsToTeam",
				params: {
					name: "goons",
				}
			},
			{
				name: "otherHasEquipped",
				params: {
					type: "weapon",
				}
			},
			{
				name: "canSeeOther",
				params: {
					ignoreRelayed: true,
				}
			},
		],
		steps: [
			{
				name: "setAsTarget",
			},
			{
				name: "setFlag",
				params: {
					name: "freeze"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "callPolice"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic"
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionDontShoot1",
						"reactionDontShoot2",
						"reactionDontShoot3",
						"reactionDontShoot4",
						"reactionDontShoot5",
					],
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "freezeOtherBecameVisible",
		triggers: [
			{
				name: "otherBecameVisible",
				params: {
					ignoreRelayed: true,
				}
			}
		],
		triggerConditions: [
			{
				name: "otherBelongsToTeam",
				params: {
					name: "goons",
				}
			},
			{
				name: "otherHasEquipped",
				params: {
					type: "weapon",
				}
			},
			{
				name: "otherCanSee",
				params: {
					ignoreRelayed: true,
				}
			},
		],
		steps: [
			{
				name: "setAsTarget",
			},
			{
				name: "setFlag",
				params: {
					name: "freeze"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic"
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionDontShoot1",
						"reactionDontShoot2",
						"reactionDontShoot3",
						"reactionDontShoot4",
						"reactionDontShoot5",
					],
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "freezeOtherEquippedWeapon",
		triggers: [
			{
				name: "otherEquipped",
				params: {
					type: "weapon",
				}
			}
		],
		triggerConditions: [
			{
				name: "otherBelongsToTeam",
				params: {
					name: "goons",
				}
			},
			{
				name: "canSeeOther",
				params: {
					ignoreRelayed: true,
				}
			},
			{
				name: "otherCanSee",
				params: {
					ignoreRelayed: true,
				}
			},
		],
		steps: [
			{
				name: "setAsTarget",
			},
			{
				name: "setFlag",
				params: {
					name: "freeze"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "callPolice"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic"
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionDontShoot1",
						"reactionDontShoot2",
						"reactionDontShoot3",
						"reactionDontShoot4",
						"reactionDontShoot5",
					],
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "panicSawBody",
		triggers: [
			{
				name: "otherBecameVisible"
			}
		],
		triggerConditions: [
			{
				name: "otherHasComponents",
				params: {
					components: ["BodyComponent"],
					any: true
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "freeze"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionDeadGuy1",
						"reactionDeadGuy2",
						"reactionDeadGuy3",
						"reactionDeadGuy4",
						"reactionDeadGuy5",
						"reactionDeadGuy6",
					],
				}
			},
			{
				name: "setFlag",
				params: {
					name: "callPolice"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic",
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "getGunWitnessedGun",
		triggers: [
			{
				name: "witnessedSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "hasGun"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "getGun"
				}
			},
			{
				name: "otherHasEquipped",
				params: {
					type: "weapon"
				}
			},
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionSpotted"],
				}
			},
			{
				name: "setFlag",
				params: {
					name: "getGun",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "getGunTargetEquippedGun",
		triggers: [
			{
				name: "otherEquipped",
				params: {
					type: "weapon"
				}
			}
		],
		triggerConditions: [
			{
				name: "otherIsTarget",
			},
			{
				name: "flagNotSet",
				params: {
					name: "hasGun"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "getGun"
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "getGun"
				}
			},
		]
	},
	{
		name: "speakInventoryFull",
		cooldown: 2,
		triggers: [
			{
				name: "inventoryFull",
			},
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionInventoryFull1",
						"reactionInventoryFull2",
						"reactionInventoryFull3",
						"reactionInventoryFull4",
						"reactionInventoryFull5",
						"reactionInventoryFull6"
					],
					allowSpamming: true
				}
			}
		]
	},
	{
		name: "investigateSawLooting",
		triggers: [
			{
				name: "witnessedSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "freeze"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
			{
				name: "otherIsPerformingSpecialAction",
				params: {
					name: "steal"
				}
			},
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionSpotted"],
				}
			},
			{
				name: "unsetFlag",
				params: {
					name: "witnessing",
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionWitnessSteal1",
						"reactionWitnessSteal2",
						"reactionWitnessSteal3",
						"reactionWitnessSteal4",
						"reactionWitnessSteal5",
					],
				}
			},
			// Remember the point of looting, just in case
			{
				name: "rememberWaypoint",
				params: {
					name: "investigate"
				}
			},
			{
				name: "setFlag",
				params: {
					name: "investigateLooting",
				}
			},
			{
				name: "setAsTarget",
			},
		],
		doNotOptimize: true
	}

	{
		name: "callPoliceClerkSawSuspiciousBehavior",
		triggers: [
			{
				name: "witnessedSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "freeze"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "callPolice",
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "policeCalled",
					global: true,
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "callPolice",
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic",
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			},
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionSpotted"],
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "getGunClerkSawSuspiciousBehavior",
		triggers: [
			{
				name: "witnessedSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "preferGunToCallingCops"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "freeze"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "hasGun"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "getGun"
				}
			},
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionSpotted"],
				}
			},
			{
				name: "setFlag",
				params: {
					name: "getGun",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "lookAtAttacker",
		triggers: [
			{
				name: "tookDamage",
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "lookingAtAttacker"
				}
			},
			{
				name: "doesNotHaveTarget",
			},
			{
				name: "flagNotSet",
				params: {
					name: "freeze"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
		],
		steps: [
			{
				name: "turnInPlace", // without params, looks at triggering entity
			},
			{
				name: "setFlag",
				params: {
					name: "aggressive",
				},
			},
		],
		doNotOptimize: true
	},

	{
		name: "lookAtScarySound",
		triggers: [
			{
				name: "sound",
				params: {
					category: ["alarm", "explosion", "shot", "hit", "scream"],
					minDistance: 0.5,
				}
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "investigatingSound"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "freeze"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "aggressive"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated"
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "investigatingSound",
					timer: 2.0
				}
			},
			{
				name: "turnInPlace", // without params, looks at triggering entity
			},
			{
				name: "specialAction",
				params: {
					name: "lookAround"
				}
			},
			{
				name: "turnInPlace",
				params: {
					random: true
				}
			}
		],
		doNotOptimize: true
	},

	{
		name: "callPoliceCustomerSawSuspiciousBehavior",
		triggers: [
			{
				name: "witnessedSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "callPolice",
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated",
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "policeCalled",
					global: true,
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
			{
				name: "canSeeOther",
			},
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionSpotted"],
				}
			},
			{
				name: "setFlag",
				params: {
					name: "callPolice",
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic",
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "leaveCustomerSawSuspiciousBehavior",
		triggers: [
			{
				name: "witnessedSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "policeCalled",
					global: true,
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
			{
				name: "canSeeOther",
			},
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionSpotted"],
				}
			},
			{
				name: "setFlag",
				params: {
					name: "panic",
				}
			},
			{
				name: "setMovementMode",
				params: {
					mode: "run",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "spawnEyeStartedWitnessingSuspiciousBehavior",
		triggers: [
			{
				name: "startedWitnessingSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "policeCalled",
					global: true,
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionWonder"],
				}
			},
			{
				name: "offscreenAlert",
				params: {
					baseDefinition: "alertBaseNegative",
					iconDefinition: "alertIconEye",
				}
			},
			{
				name: "setFlag",
				params: {
					name: "witnessing",
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "keepLookingAtSuspicious",
		triggers: [
			{
				name: "startedWitnessingSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "witnessing"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "aggressive"
				}
			},
		],
		steps: [
			// Keeps looking at triggering entity forever
			// or until another reaction causes a state change
			{
				name: "turnInPlace",
				params: {
					keepLooking: true,
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "stoppedWitnessingSuspiciousBehavior",
		triggers: [
			{
				name: "stoppedWitnessingSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "witnessing",
				}
			},
		],
		steps: [
			{
				name: "unsetFlag",
				params: {
					name: "witnessing",
				}
			},
		],
		doNotOptimize: true
	},
	{
		name: "witnessingSuspiciousBehaviorSoShout",
		triggers: [
			{
				name: "witnessingSuspiciousBehaviorHalfway"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "witnessing",
				}
			},
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionIrritated1",
						"reactionIrritated2",
						"reactionIrritated3",
						"reactionIrritated4",
						"reactionIrritated5",
						"reactionIrritated6",
					],
				}
			},
			// Keeps looking at triggering entity forever
			// or until another reaction causes a state change
			{
				name: "turnInPlace",
				params: {
					keepLooking: true,
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "stoppedWitnessingGoInvestigate",
		triggers: [
			{
				name: "stoppedWitnessingSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "witnessing",
				}
			},
		],
		steps: [
			{
				name: "unsetFlag",
				params: {
					name: "witnessing",
				}
			},
			{
				name: "rememberWaypoint",
				params: {
					name: "investigate",
				}
			},
		],
		doNotOptimize: true
	},


	{
		name: "enableLOSConeStartedWitnessing",
		triggers: [
			{
				name: "startedWitnessingSuspiciousBehavior"
			}
		],
		steps: [
			{
				name: "modifyComponent",
				params: {
					component: "LOSVisualizationComponent",
					values: {
						enabled: true,
					}
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "disableLOSConeStoppedWitnessing",
		triggers: [
			{
				name: "stoppedWitnessingSuspiciousBehavior"
			}
		],
		steps: [
			{
				name: "modifyComponent",
				params: {
					component: "LOSVisualizationComponent",
					values: {
						enabled: false,
					}
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "guardWitnessedSuspiciousBehavior",
		triggers: [
			{
				name: "witnessedSuspiciousBehavior"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "witnessing"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "intimidated"
				}
			}
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionSpotted"],
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionGuardSpot1",
						"reactionGuardSpot2",
						"reactionGuardSpot3",
						"reactionGuardSpot4",
						"reactionGuardSpot5"
						],
				}
			},
			{
				name: "unsetFlag",
				params: {
					name: "witnessing"
				}
			},
			// Remember opponent position in case we see him/her only from a camera
			{
				name: "rememberWaypoint",
				params: {
					name: "opponentPosition"
				}
			},
			{
				name: "setAsTarget",
			},
			{
				name: "setFlag",
				params: {
					name: "aggressive",
				}
			},
		],
		doNotOptimize: true
	},


	{
		name: "enteredCameraHotspot",
		triggers: [
			{
				name: "enteredHotspot",
				params: {
					names: ["canSeeCameras"]
				}
			}
		],
		steps: [
			{
				name: "startReceivingFOV",
				params: {
					group: "cameras"
				}
			}
		],
		doNotOptimize: true
	},

	{
		name: "exitedCameraHotspot",
		triggers: [
			{
				name: "leftHotspot",
				params: {
					names: ["canSeeCameras"]
				}
			}
		],
		steps: [
			{
				name: "stopReceivingFOV",
				params: {
					group: "cameras"
				}
			}
		],
		doNotOptimize: true
	},

	{
		name: "enteredCashierHotspot",
		triggers: [
			{
				name: "enteredHotspot",
				params: {
					names: ["cashier"]
				}
			}
		],
		steps: [
			{
				name: "enableHotspot",
				params: {
					category: "queue"
				}
			}
		],
		doNotOptimize: true
	},

	{
		name: "exitedCashierHotspot",
		triggers: [
			{
				name: "leftHotspot",
				params: {
					names: ["cashier"]
				}
			}
		],
		steps: [
			{
				name: "disableHotspot",
				params: {
					category: "queue"
				}
			}
		],
		doNotOptimize: true
	},

	// Start oogling again if not clerk
	{
		name: "clerkExitedCashier",
		triggers: [
			{
				name: "otherLeftHotspot",
				params: {
					names: ["cashier"]
				}
			},
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "oogled"
				}
			},
			{
				name: "otherBelongsToTeam",
				params: {
					name: "clerks"
				}
			},
		],
		steps: [
			{
				name: "unsetFlag",
				params: {
					name: "oogled"
				}
			}
		],
		doNotOptimize: true
	},


	{
		name: "goonSomeoneAttacked",
		triggers: [
			{
				name: "attack"
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "aggressive",
				}
			},
		],
		steps: [
			{
				name: "setAsTarget",
			},
			{
				name: "setFlag",
				params: {
					name: "aggressive"
				}
			},
		],
	},

	{
		name: "goonSawPotentialEnemy",
		triggers: [
			{
				name: "otherBecameVisible",
				params: {
					ignoreRelayed: true
				}
			}
		],
		triggerConditions: [
			{
				name: "otherDoesNotBelongToTeam",
				params: {
					name: "goons"
				}
			},
			{
				name: "otherHasComponents",
				params: {
					components: ["PathFollowerComponent"],
				}
			}
		],
		steps: [
			{
				name: "offscreenAlert",
				params: {
					baseDefinition: "alertBaseNegative",
					iconDefinition: "alertIconSawEnemy",
				}
			},
		]
	},

	{
		name: "goonAggressiveLostTarget",
		triggers: [
			{
				name: "lostTarget"
			}
		],
		triggerConditions: [
			{
				name: "flagSet",
				params: {
					name: "aggressive"
				}
			},
		],
		steps: [
			{
				name: "unsetFlag",
				params: {
					name: "aggressive"
				}
			},
		]
	},

	{
		name: "engage",
		triggers: [
			{
				name: "otherBecameVisible",
				params: {
					ignoreRelayed: true
				}
			}
		],
		triggerConditions: [
			{
				name: "otherBelongsToTeam",
				params: {
					name: "goons"
				}
			},
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionSpotted"],
				}
			},
			{
				name: "setAsTarget",
			},
			{
				name: "followTarget",
			},
			{
				name: "useWeaponOnTarget",
			},
		]
	},

	{
		name: "investigateBody",
		triggers: [
			{
				name: "otherBecameVisible"
			}
		],
		triggerConditions: [
			{
				name: "otherHasComponents",
				params: {
					components: ["BodyComponent"],
					any: true
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "investigateBody"
				}
			},
			{
				name: "doesNotHaveTarget"
			},
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionWonder"],
				}
			},
			{
				name: "setFlag",
				params: {
					name: "seenBody",
				}
			},
		]
	},


	{
		name: "startInvestigatingScarySound",
		triggers: [
			{
				name: "sound",
				params: {
					category: ["alarm", "explosion", "shot", "hit", "scream"],
					minDistance: 0.5,
				}
			}
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "heardScarySound"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "freeze"
				}
			},
			{
				name: "flagNotSet",
				params: {
					name: "panic"
				}
			},
			{
				// Maybe doesNotHaveTarget is better?
				name: "canNotSeeTarget",
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "heardScarySound",
					timer: 2.0
				}
			},
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionWonder"],
				}
			},
			{
				name: "rememberWaypoint",
				params: {
					name: "investigate"
				}
			},
		],
		doNotOptimize: true
	},

	{
		name: "investigateCameras",
		triggers: [
			{
				name: "otherBecameVisible"
			}
		],
		triggerConditions: [
			{
				name: "otherHasComponents",
				params: {
					components: ["DamageComponent"],
					any: true
				}
			},
			{
				name: "otherBelongsToTeam",
				params: {
					name: "goons",
				}
			},
			{
				name: "doesNotHaveTarget"
			}
		],
		steps: [
			{
				name: "spawnEntityDefinition",
				params: {
					definitions: ["reactionWonder"],
				}
			},
		]
	},

	{
		name: "horseTargetBecameVisible",
		triggers: [
			{
				name: "otherBecameVisible",
				params: {
					ignoreRelayed: true
				}
			},
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "reactedToHorseTarget",
				}
			},
			{
				name: "otherBelongsToTeam",
				params: {
					name: "goons",
				}
			},
		],
		steps: [
			{
				name: "setFlag",
				params: {
					name: "reactedToHorseTarget",
				}
			},
			{
				name: "spawnSpeak",
				params: {
					definitions: [
						"reactionHorseWhat1",
						"reactionHorseWhat2",
						"reactionHorseWhat3",
						"reactionHorseWhat4",
						"reactionHorseWhat5",
					]
				}
			},
			{
				name: "setFlag",
				params: {
					name: "aggressive",
				}
			},
		],
		doNotOptimize: true
	}

	{
		name: "zombieFirstTargetBecameVisibleGoAggressive",
		triggers: [
			{
				name: "otherBecameVisible",
				params: {
					ignoreRelayed: true
				}
			},
		],
		triggerConditions: [
			{
				name: "flagNotSet",
				params: {
					name: "aggressive",
				}
			},
			{
				name: "otherBelongsToTeam",
				params: {
					name: "goons",
				}
			},
		],
		steps: [
			{
				name: "spawnSpeak",
				params: {
					definitions: ["reactionZombieBrains"]
				}
			},
			{
				name: "setFlag",
				params: {
					name: "aggressive",
				}
			},
		],
		doNotOptimize: true
	}
]

