123456789101112131415161718 |
- /// <reference path="../../AI.ts" />
- /// <reference path="../../Things/Person.ts" />
- module AIRules {
- export var standUp = new Rule({
- name: "Stand if down",
- firstPriority : AIRules.PRIORITY_ACTING_ON_SITUATION,
- priority : AIRules.PRIORITY_ACTING_ON_SITUATION,
- conditions : (runner : RulebookRunner<Person>) => {
- let person = runner.noun;
- return (person.stance != PersonStance.STANDING)
- },
- code : (runner : RulebookRunner<Person>) => {
- return new ActionStand(runner.noun);
- }
- });
- AI.combatRules.addRule(standUp);
- AI.rules.addRule(standUp);
- }
|