Combat in Inform 7


I’m working on a bit of a game for a friend and had a few ideas, but I’m having some trouble implementing them, mostly referring to combat and a couple of magic systems. I’ve been going over the documentation but I haven’t figured out a good way to do exactly what I want with it.
I just want to have some creatures to fight along the way, a little bit like slime rancher (the game revolves around slime creatures mostly since he thinks slime rancher is cool), but more focused on combat and such. I don’t want to have a super in-depth weapons system, I’m just having trouble wrapping my head around assigning the player values like health and defense, and same for the combative NPCs.

Giving people values is thankfully straightforward!

A person has a number called health.
A person has a number called maximum health.

Beyond that, though, it’s going to depend how exactly you want your combat system to work. You can find some examples under “combat” in the Recipe Book for inspiration; the most elaborate one I know of is in the game Kerkerkruip, which is conveniently open source!