public Battle(RandomGenerator random, Party party1, Party party2) { this.random = random; party = new Party[2]; party[0] = party1; party[1] = party2; curTurn = 1; battleResult = PartyIndex.NONE; this.battleInfo = null; }
// 전투 종료 조건 체크( 상대 파티의 전멸 ) // mBattleResult에 이긴 파티의 번호를 저장. bool EndCheck() { if (party[(int)PartyIndex.USERS].characters.Sum(chr => chr.hp) <= 0) { battleResult = PartyIndex.MOBS; return(true); } if (party[(int)PartyIndex.MOBS].characters.Sum(chr => chr.hp) <= 0) { battleResult = PartyIndex.USERS; return(true); } return(false); }