private void HandleNpcBattle(Npc npc) { IBattle battleInterface = npc as IBattle; while (player.Health > 0 && npc.Health > 0) { view.DisplayStatus(Text.GetBattleStatus(player, npc)); Ability ability = view.DisplayInteractAbilities(player.Abilities, allowCancel: false); // // if not null, procs the ability // ability?.Proc(npc); view.DisplayStatus(Text.GetBattleStatus(player, npc)); if (ability != null && ability.ProcText != null && ability.ProcText != "") { view.DisplayAbilityText(ability.ProcText); } if (npc.Health > 0) { battleInterface.Battle(player); } view.DisplayStatus(Text.GetBattleStatus(player, npc)); } if (player.Health <= 0) { player.Damage(player.Health); view.DisplayBattleNpc(npc, "Observation: Unit critically damaged.\nRecommended Action: " + "Return to sync zone for repair."); } else if (npc.Health <= 0) { view.DisplayBattleNpc(npc, battleInterface.GetLossText()); } }