Immersion, you say? Is it the katana that bothers you, or the fact that the protagonist, knowing that the enemy has firearms, arms himself with a cold steel?
I'll remind you of the previous solution - he decided that it would be a great idea to simply take the computer out of the office of a company that makes robots that have already threatened humanity in a military conflict, but we promised that we would no longer treat them as a thing - and now Evil Robot, the president of a new race and the school council, appears.
This is a comedy porn plot, buddy, relax. And the katana could very well be made of carbon or ceramic monomolecular alloy.