Writing the state machine for collision effects, contained in CombatScript.