src/scripts/combat.js
/**
 * this runs the statemachine and is triggered by user input
 */
this runs the statemachine and is triggered by user input
this runs the statemachine and is triggered by user input
battle() {
  var result = {OK:false, msg:''};
  this.msg = '';
  while(this.next!==null && !result.OK) {
    result =this.next();
    this.msg+=result.msg;
    window.gm.printOutput(this.msg);
    window.gm.Encounter.renderCombatScene();
    renderToSelector("#panel", "statspanel");
  }
  return;
}
battle ( ) { var result = { OK : false , msg : '' } ; this . msg = '' ; while ( this . next !== null && ! result . OK ) { result = this . next ( ) ; this . msg += result . msg ; window . gm . printOutput ( this . msg ) ; window . gm . Encounter . renderCombatScene ( ) ; renderToSelector ( "#panel" , "statspanel" ) ; } return ; }
this runs the statemachine and is triggered by user input
this runs the statemachine and is triggered by user input
//if result =true user input required- break loop and wait for click event (msg has to contain printNextLink-call !) //if(result.OK) {   result.msg = this.msg+result.msg;    return(result);  }