1 NPC Decision Making
1.1 Brief Description
Gives NPCs the ability to navigate the world and path find specific targets, for example the player.
2 Flow of Events
2.1 Basic Flow
- If player in detection range
- set target
- move to target
2.1.1 Activity Diagram
2.1.2 Mock-up
2.1.3 Narrative
@npc @movement
Feature: Finding target location
Background:
Given I (NPC) am in a room
And Game is active
And There is no obstacle
Scenario: Target player
Given Player in detection range
When I press noting
Then set target player.position
Scenario: not moving toward trigger
Given Player not in detection range
And I do not have patrol point
When I press noting
Then nothing
Scenario: Target patrol point
Given Player not in detection range
And I have patrol point
When I press noting
Then set target patrol point.position
2.2 Alternative Flows
(n/a)
3 Special Requirements
(n/a)
4 Preconditions
(n/a)
5 Postconditions
(n/a)
6 Extension Points
(n/a)