>>915
character[1].nHP -= character[0].nAttack; のあとに
if (character[1].nHP <= 0) {
 character[1].nHP = 0;
 break;
}
を入れれば。
下の計算のあとにも。