src/scripts/combat.js
//setup encounter; this calls the Encounter-passage !
setup encounter; this calls the Encounter-passage !
setup encounter ; this calls the Encounter - passage !
initCombat() {
  let s=window.story.state;
  s.combat.enemyParty = this.EnemyFunc();
  s.combat.playerParty = [];
  for(let el of s._gm.playerParty) {
    s.combat.playerParty.push(s[el]);
  }
  s.combat.turnStack = [];
  s.combat.actor = s.combat.target = s.combat.action = null;
  s.combat.location = this.location;
  s.combat.scenePic = this.scenePic;
  s.combat.playerFleeing = false;
  s.combat.playerSubmitting = false;
  s.combat.inCombat=true;
  s.combat.enemyFirst= this.EnemyFirst;
  s.combat.turnCount=0;
  this.next=this.battleInit;
  this.msg='';
  window.story.show("EncounterStartTurn");
}
initCombat ( ) { let s = window . story . state ; s . combat . enemyParty = this . EnemyFunc ( ) ; s . combat . playerParty = [ ] ; for ( let el of s . _gm . playerParty ) { s . combat . playerParty . push ( s [ el ] ) ; } s . combat . turnStack = [ ] ; s . combat . actor = s . combat . target = s . combat . action = null ; s . combat . location = this . location ; s . combat . scenePic = this . scenePic ; s . combat . playerFleeing = false ; s . combat . playerSubmitting = false ; s . combat . inCombat = true ; s . combat . enemyFirst = this . EnemyFirst ; s . combat . turnCount = 0 ; this . next = this . battleInit ; this . msg = '' ; window . story . show ( "EncounterStartTurn" ) ; }
setup encounter; this calls the Encounter-passage !
setup encounter ; this calls the Encounter - passage !