Game Development, Graphics Programming, GPU, Computer Science

Interpreting Source Material When porting content from one media to another (such as book/comic to movie) (or doing a remake), the source material gives a lot of guidance, but there are still plenty of decisions to make. With HeroQuest, I’m leaning heavily towards making it authentic. But it is a video game, and I’ve decided to have the program do rules and a campaign and AI (unlike the Tabletop Simulator version) – which means more design decisions to make. With HeroQuest in particular (unlike other board games), there are plenty of holes in the rules. Another nuance to HeroQuest is that the 1989 European version is slightly different than the 1990 American version (I’m leaning towards the American version but also using the European version as a reference).

Multiple Weapons? The rules are ambiguous in regards to multiple weapons. The European version has equipment cards and there’s no section marked “Weapons” on the European character sheet – some people interpret this to mean you can only have one copy of each weapon total. The American version doesn’t have weapon cards and it’s character sheet says “Weapons” (plural). There’s nothing in the American version to suggest you can’t have two Longswords (eg one for the Barbarian and one for the Elf) (or even two Longswords for just the Barbarian).

The Armory’s Battle Axe description says "You may not use a shield when using this weapon" – which I’ve interpreted to mean you’re allowed multiple weapons, you can use any one of your weapons for an attack, and if a Hero has a Battle Axe at all then he/she can’t have a shield. With this interpretation, there isn’t any reason to have more than one melee weapon and one ranged weapon – so it might simplify the UI to just make that rule explicit.

Orc’s Bane MathThis makes sense for the Armory Equipment, but when I considered the Artifact weapons I ran into an exception – the Orc’s Bane.

I’m interpreting the text to mean you get two attacks, and the Orc gets a chance to defend against both attacks. At first glance, it’s not obvious whether the Orc’s Bane is better than the Longsword when attacking an Orc. An Orc has 1 Body and 2 Defense, so which is better – one attack with 3 attack dice, or two 2 attack dice attacks? To answer this question, I wrote some code and did some simple probability math.

The code I wrote just iterates through all the possibilities for a single attack + defend. With six sided dice rolling 2 attack + 2 defend, there’s 6^4 possible outcomes. With 3 attack + 2 defend, there’s 6^5 possible outcomes. Since the Orc only has 1 Body, there’s really only two types of outcomes – zero damage, or non-zero damage (which kills the Orc).

When doing one attack with the Orc’s Bane, there’s a 765/1296 = 59.028% chance of killing the Orc. When doing one attack with the Longsword, there’s a 5832/7776 = 75% chance of killing the Orc. But the Orc’s Bane gets two attacks. So which is better – 59.028% twice or 75% once?

The simpler question is this – what are the odds we do the two Orc’s Bane attacks and the Orc is still alive (aka we “lose”)? The odds of one Orc’s Bane attack failing are 1 – 59.028% = 40.972%. The odds of two attacks failing are 40.972%^2 = 16.787% chance of losing => 83.2% chance of winning (of damaging the Orc). So the Orc’s Bane is useful for attacking Orcs.

I’m aiming for authenticity but I also want to simplify the UI. So a Hero can have one melee weapon, one ranged weapon, and one special weapon (eg Orc’s Bane). For example, a Hero might have a Broadsword, a Crossbow, and the Orc’s Bane.

Having Bad Weapon Choices is Lame To justify UI simplification, I’m assuming the player doesn’t want to make blatantly bad decisions like buying multiple Shortswords. The Shortsword is really just a starting weapon for the Dwarf and the Elf, and there’s never any good reason to buy one (so yea – I love HeroQuest but some of the rules are a bit weird or ambiguous).

It’s not totally clear whether the Crossbow can attack one-square diagonally, but let’s assume it can because it the text says "you cannot fire at a monster that is adjacent to you" and elsewhere the game rules uses the word “adjacent” to mean orthogonal. So if you buy a Battle Axe, then spending 350 Gold Coins on a Longsword just to attack diagonally doesn’t make sense because you could instead spend 350 Gold Coins on a Crossbow.

By assuming the player doesn’t want to use bad weapon choices, the UI can be simplified by letting the game automatically pick each Hero’s best melee, ranged, and special weapon – based on the Hero’s weapons list. For example, if a Hero starts with a Shortsword and then buys a Battle Axe, the game will automatically pick the Battle Axe as the Hero’s melee weapon.

If a Hero’s weapons are (Shortsword, Longsword, Spirit Blade), then game will make set melee to Longsword and special to Spirit Blade. If a Hero’s weapons are (Shortsword, Broadsword, Spirit Blade), then the game will set melee to Spirit Blade and disable special.

For the moment, I’m going with this – by default the game will automatically select weapons for the user as follows – melee, ranged, special, other, other. However, the user can choose up to five weapon slots. For HeroQuest, five slots is arguably too many – I can’t think of any situations off-hand where it would make sense to have more than three – such as Spirit Blade, Crossbow, Orc’s Bane.

Update (2018/06): Attacking Two Orcs

After rereading the Orc’s Bane text for the UK version, I realized that it could reasonably be interpreted as letting you attack two separate Orc’s. I like this interpretation because it makes Orc’s Bane more useful, and it gives the Hero’s more options to get a small advantage by making a situational decision (similar to how Pass through Rock and Veil of Mist are only situationally useful).