1
1

BasicCombat.ts 647 B

123456789101112131415161718
  1. /// <reference path="../../AI.ts" />
  2. /// <reference path="../../Things/Person.ts" />
  3. module AIRules {
  4. export var standUp = new Rule({
  5. name: "Stand if down",
  6. firstPriority : AIRules.PRIORITY_ACTING_ON_SITUATION,
  7. priority : AIRules.PRIORITY_ACTING_ON_SITUATION,
  8. conditions : (runner : RulebookRunner<Person>) => {
  9. let person = runner.noun;
  10. return (person.stance != PersonStance.STANDING)
  11. },
  12. code : (runner : RulebookRunner<Person>) => {
  13. return new ActionStand(runner.noun);
  14. }
  15. });
  16. AI.combatRules.addRule(standUp);
  17. AI.rules.addRule(standUp);
  18. }