Hey there! I'm currently working on a fantasy rpg using Harlowe, and while I already have a basic combat system coded, I'm hoping there's something I could do to make this simpler. My current set up looks like this:
(if: (random: 1,20) is >$AC)[
The monster bites you!
(set: $player's "HP" to $player's "HP" - (random: 1,3))
(if: $player's "HP" < 1)[ You are [[dead]]! ]
(else:)[ Your health is (print: $player's "HP").
(else:)[ You hit the monster!
(set:$zombie_hp = $zombie_hp - ($weapon's damage))
(if: $zombie_hp < 1)[ The [[zombie is dead]]! ]
Its health is $zombie_hp.
This combat system feels very basic, and I'm hoping to build onto it by adding spells, abilities and consumable items. The problem is that I am doing this by hand for every instance of combat that occurrs, and it's extremely time consuming. I was hoping that someone more experienced might be able to recommend an easier way to go about populating this information, and I was figuring that it would most likely involve the use of datamaps and arrays, and my knowledge in those areas is rudimentary at best. I could be way off the mark here, so any advice would be wizard!