• Advertisement

Make a small donation to Ye Olde Inn!

Donate via Paypal

Every cent received goes toward Ye Olde Inn's maintenance and allows us to continue providing the best resources for HeroQuest and Fantasy Gaming fans.

Monster slaying cost

Discuss general topics relating to HeroQuest that don't fit well in the categories below.

Re: Monster slaying cost

Postby Anderas » Thursday October 16th, 2014 11:55am

I also worked on it today.
I cleaned up the code in order to enhance the readability. It is also a good way to find failures, normally.

I just found one thing: I do average-x instead of x-average. As it is in brackets with a square on the outside, it doesn't matter. No failure here.

The rest, well... stayed as is. The results don't change as well - I calculated several times today.

[Reveal] Spoiler: "Code"
Public Sub SimulateAverageStdDevBadVsGoodDamage()
'Sets the LP of the good to 100 to measure the real potential of each attacking monster.
'Then, the LP of each participant get reset to full befor the next fight is started.
'Otherwise, the measurement will always be cut as soon as the good one is dead; thus,
'producing wrong results.

HerosDamage = True
HerosDamageStdDev = True

AverageCompleteFightDamageStdDev = 0
ReDim singleCompleteFightDamage(amount)
Dim SumForStdDev As Double

TheGood.LP = 100
AverageCompleteFightDamage = 0
threeStrikes = 0


'simulate "amount" fights
For i = 0 To amount
'setup
TheGood.CurLP = TheGood.LP
TheBad.CurLP = TheBad.LP


'fight
FightOneMonster

'note results
SumCompleteFightDamage = SumCompleteFightDamage + (TheGood.LP - TheGood.CurLP)
CountCompleteFightDamage = CountCompleteFightDamage + 1
singleCompleteFightDamage(i) = TheGood.LP - TheGood.CurLP
If singleCompleteFightDamage(i) >= 100 Then
threeStrikes = threeStrikes + 1
If threeStrikes > 3 Then Exit For
End If


'Serve windows; prevent white screen
If (i Mod 1000) = 0 Then
DoEvents
End If
Next i

'See if we have a valid simulation
If threeStrikes > 3 Then
AverageCompleteFightDamage = 100
AverageCompleteFightDamageStdDev = 0
Exit Sub
End If


'Standard deviation gets calculated by:

'Square root of (
'Sum of (

'(average - current value)^2
')
'Divided by amount - 1
')

'First step: Calculate average

AverageCompleteFightDamage = SumCompleteFightDamage / CountCompleteFightDamage

'Second Step: Calculate sum of squares of distance between average and current value
SumForStdDev = 0
For i = 1 To amount
SumForStdDev = SumForStdDev + (AverageCompleteFightDamage - singleCompleteFightDamage(i)) ^ 2
Next i


'Third step: Divide by N-1 (Bessel corrected amount). Result: Variance
SumForStdDev = SumForStdDev / (amount - 1)

'Fourth step: SQRT of Variance to get useable result.
AverageCompleteFightDamageStdDev = Sqr(SumForStdDev)


End Sub




What is surprising me, is that you don't have a good formula for Number of attacks per Monster. In fact, this was exactly what was killing me on my first try to directly calculate the MSC. Now, with no Formula, but with the same results for MSC, our both ways of calculating prove to be correct for the MSC.

As I stated earlier: I find the Standard Deviation quite big. I found a good explanation in the meanwhile - A Goblin normally dies without doing damage, but if not, he has 2 Attack Dice which can damage a Hero quite easily; thus, the deviation in the results from the "normal" are quite high. Ok for me!
I loaded my Monster table into Spotfire in order to have some advanced analysis methods at hand. I found that there is a bunch of Monsters available who are quite reliable. The problem about them is that their strength is Fimir or more. An Ogre proves to be quite a good monster in terms of reliability. And everything else with 3+ Defense dice and 3+ Body Points.
Viewed from this angle, my result again looks quite logical to me.

Now, i didn't find a failure in my procedure and the results appear to fit with my picture of the reality.
I must confess, i couldn't find the formula in your Sheet on the first glance. I maybe take a look at it later, when i have more time.
Maybe you could take a look at my code snippet, too? In fact, it's the only relevant part and the complete Standard Deviation Formula is inside this Part of the code.

The other parts are caring only about in/output. Ah well, and about the Fight between Heros and Monsters... but through the MSC and several other measurements, this part has already been proven.


Rewards:
Hosted a Play-by-Post game. Played a turn in a Play-by-Post game. Created a Hot Topic. Participated in four (4) Miniature Exchanges. Participated in a Miniature Exchange. Zealot Miniatures: Twisting Catacombs Kickstarter Backer Destroyed a Zombie! Encountered a menacing Chaos Warlock!
User avatar
Anderas
NOT Andreas!

Polar Warbear
Polar Warbear
 
Posts: 3131
Images: 33
Joined: Saturday September 20th, 2014 7:02am
Forum Language: British English
Evil Sorcerer: Morcar
Hero:
Usergroups:
Adventurers' Guild Group Member Artists Group Member
Champion Group Member

Advertisement

Make a small donation to Ye Olde Inn!

Donate via Paypal

Every cent received goes toward Ye Olde Inn's maintenance and allows us to continue providing the best resources for HeroQuest and Fantasy Gaming fans.

Re: Monster slaying cost

Postby Count Mohawk » Thursday October 16th, 2014 10:56pm

Here's what I have so far...

Some shortcuts:
E(N) = Expected value(Number of attacks per Monster, N Body Points remaining)
P(N) = Probability(Hero’s attack deals N damage)

E(N) =
P(0) * (1 + E(N))
+ P(1) * (1 + E(N-1))
+ P(2) * (1 + E(N-2))
+ …
+ P(K) * (1 + E(N-K))
+ …

…for all K less than N.

When N = 1, the formula simplifies down to:
E(1) = P(0) * (1 + E(1))
…which, by substitution, leads to:
E(1) = P (0) * (1 + P(0) * (1 + P(0) * …
= Summation from K = 1 to Infinity: (P(0) ^ K)
= P(0) / (1 – P(0))

When N > 1, we can always substitute for E(n) terms with a lower n than the N we are trying to calculate; thus E(n), where n < N, can be treated as a constant. Thus, we shall replace the entire term from the original formula:
P(1) * (1 + E(N-1)) + P(2) * (1 + E(N-2)) + … + P(K) * (1 + E(N-K)) + …
…with the symbol “Alpha”.

E(N) = “Alpha” + P(0) * (1 + E(N))
= “Alpha” + P(0) * (1 + “Alpha” + P(0) * (1 + “Alpha” + P(0) * (1 + “Alpha” + P(0) *…
= “Alpha” + P(0) + (“Alpha” * P(0)) + P(0)^2 + (“Alpha” * P(0)^2) + …
= “Alpha” + Summation from K = 1 to Infinity: (P(0)^K) + Summation from K = 1 to Infinity: (P(0)^K * “Alpha”)
= “Alpha” + (“Alpha” + 1) * (P(0) / (1 – P(0))
= [P(1) * (1 + E(N-1)) + P(2) * (1 + E(N-2)) + … + P(K) * (1 + E(N-K)) + …] + [1 + P(1) * (1 + E(N-1)) + P(2) * (1 + E(N-2)) + … + P(K) * (1 + E(N-K)) + …] * P(0) / (1 – P(0))

Compare with the formula from my spreadsheet, sheet 'MSC', cell B54:
E(10) = [P(0) + P(1) * (1 + E(9)) + P(2) * (1 + E(8)) + P(3) * (1 + E(7)) + P(4) * (1 + E(6)) + P(5) * (1 + E(5)) + P(6) * (1 + E(4)) + P(7) * (1 + E(3)) + P(8) * (1 + E(2)) + P(9) * (1 + E(1))] / (1 – P(0))
…and if you actually calculate the results of both formulas, you will find them to be equal.

But how to get the variance????

Through construction of my own simulator, I have verified that your variance figures are correct. However, I don’t know where my math is going awry. Perhaps it has something to do with the way I combine the two separate variances for # of Hits and Damage per Hit…


Rewards:
Grin's Stone Map Created a Hot Topic. Shattered a Skeleton! Destroyed a Zombie! Crushed a powerful Chaos Warrior! Smashed a massive Gargoyle!
User avatar
Marquis of Math
Count Mohawk

Elven Warrior
Elven Warrior
 
Posts: 679
Joined: Thursday July 11th, 2013 5:18pm
Location: New England, USA
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

Re: Monster slaying cost

Postby Anderas » Friday October 17th, 2014 2:22am

Wow thank you!
I was not at all sure about my numbers as i have an habit of building in a failure the last minute. :)

I think with our CalcoQuest we have repelled the last normal persons now. Maybe we have to think about a good way of presenting it and then to do it in a new thread.

Anyway, i thank you for your help and the thread originator for the good idea!


Rewards:
Hosted a Play-by-Post game. Played a turn in a Play-by-Post game. Created a Hot Topic. Participated in four (4) Miniature Exchanges. Participated in a Miniature Exchange. Zealot Miniatures: Twisting Catacombs Kickstarter Backer Destroyed a Zombie! Encountered a menacing Chaos Warlock!
User avatar
Anderas
NOT Andreas!

Polar Warbear
Polar Warbear
 
Posts: 3131
Images: 33
Joined: Saturday September 20th, 2014 7:02am
Forum Language: British English
Evil Sorcerer: Morcar
Hero:
Usergroups:
Adventurers' Guild Group Member Artists Group Member
Champion Group Member

Re: Monster slaying cost

Postby Count Mohawk » Wednesday October 29th, 2014 9:23pm

I've got one more update for this thread: my Excel spreadsheet is now finally capable of calculating the variance and standard deviation for Monster Slaying Cost! I won't put down the entire explanation here because it's long and tiresome; suffice to say that getting Var(MSC) requires a little bit of conditional probability (it's not just a straight product of Damage * #Hits) and the use of a mathematical concept known as the "Markov chain". If you don't know hat a Markov chain is, you probably don't need to know; suffice to say it deals with a bit of calculus and a bit of linear algebra (via matrices).

Anyway, here's my spreadsheet. I cross-checked some of the values it spits out against the ones Anderas generated by simulation, and they typically match to one decimal point.

Serious HQ Probability Update.xlsm
You do not have the required permissions to view the files attached to this post.


Rewards:
Grin's Stone Map Created a Hot Topic. Shattered a Skeleton! Destroyed a Zombie! Crushed a powerful Chaos Warrior! Smashed a massive Gargoyle!
User avatar
Marquis of Math
Count Mohawk

Elven Warrior
Elven Warrior
 
Posts: 679
Joined: Thursday July 11th, 2013 5:18pm
Location: New England, USA
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

Re: Monster slaying cost

Postby Daedalus » Monday December 8th, 2014 7:45pm

Thanks for the additions Count Mohawk and Anderas. Your work with means, variances, and formulas has added a lot. I've tried to get the meaning of your work with all of the complexities, but my math and programming skills leave me short. I hope I can offer some useful observations by offering a comparison of MSC results using the NA monsters of the Main Game System.

Thequester and Anderas feature a Hero with 2 AD and 2 DD, while I believe Count Mohawk uses the average of 1, 2, 2, and 3 AD, all with 2 DD. I included an average of Anderas' two values to more easily compare their variable results.

thequester MSC Count Mowhawk
MSC
Anderas MSC
Hero/monster 1st, (avg.)
:goblin: .6 .4 .27/.83, (.55)
:skeleton: .7 .5 .38/.94, (.66)
:zombie: .8 .7 .51/1.08, (.8)
:orc: 1.3 .9 .68/1.62, (1.15)
:fimir: 2.9 2.8 2.22/3.16, (2.69)
:mummy: 3.3 3.4 2.69/3.63, (3.16)
:chaoswarrior: 7.3 8.1 7.79/6.41, (7.1)
:gargoyle: 8.4 9.7 7.53/8.99, (8.26)
Felmarg's Guardian
4AD/4DD/2BP
4.8 5.0 3.91/5.3, (4.61)
Ulag
4AD/5DD/2BP
5.6 4.72/6.07, (5.4)
Balur
2AD/5DD/3BP
3.3+ 2.96/3.54, (3.25)
The Witch Lord
5AD/6DD/4BP
17.2+ 16.2/17.99, (17.1)

I'm struck by how all of the MSCs for a monster are generally within .2 of each other, but there are exceptions:

  • Mohawk's Orc is .25 under Anderas' (not too divergent), but . 4 under thequesters'
  • Anderas' Fimir is .21 under thequesters' (barely divergent)
  • Anderas' Mummy is .24 under Mohawk's (not too divergent)
  • Mohawks' Chaos Warrior is .8 over thequesters' and 1.0 over Anderas'
  • Mohawks' Gargoyle is 1.3 over thequesters' and 1.44 over Anderas'
It appears to me that thequester's program averaged out first attack for both the Hero and the monster, as his numbers nearly agree with Anderas' averaged results. As a Hero generally manages a first attack, perhaps this skews their value? I think the practical, single MSC must lie somewhere between Anderas' Hero-attacks-first and the average of his results.
..
UNCLE ZARGON
Image
WANTS.. YOU


Rewards:
Grin's Stone Map Played a turn in five (5) Play-by-Post games. Created a Hot Topic. Slain a measly Goblin! Slaughtered an Orc! Killed a mighty Fimir! Shattered a Skeleton! Destroyed a Zombie! Unravelled a Mummy!Crushed a powerful Chaos Warrior! Smashed a massive Gargoyle! Encountered all eight (8) Game System monsters. Encountered a menacing Chaos Warlock!
User avatar
Editor-in-Chief
Daedalus
Slacker Ruleslawyer

Wizard
Wizard
 
Posts: 3539
Images: 14
Joined: Monday May 9th, 2011 2:31pm
Forum Language: English (United States)
Evil Sorcerer: Zargon
Usergroups:
Wizards of Zargon Group Member Adventurers' Guild Group Member Artists Group Member Champion Group Member

Re: Monster slaying cost

Postby Anderas » Tuesday December 9th, 2014 1:07am

Thanks for this comparison, Daedalus! I wasn't aware that there is still such a large gap between Mohawk and me.
I was believing that we confirmed each other quite well and that we had the same results.


After weeks of calculating, in the meanwhile I think it is wrong to have a single value for MSC - except if you accept that this value has little or nothing to do with the reality.

The Game System was quite ok balanced for Heros with low stats. You get in Trouble if all the Heros are well equipped and stay together. Then you need rooms after rooms filled with monsters who do little or no damage. Some like it, some say it gets boring in that stage.

This is why i was providing this incredible large table in the end, so that you can filter by your Hero and then search for a well-fitting Boss Monster.

At the moment I am updating my table with 1 Monster against 2 Heros and 1 Monster against 3 Heros; plus the Monsters get abilities like 2 Attacks; or the second Attack not defendable. It is far to big for Excel by now. :roll: :)

Luckily, I think that I can derive some simple rules from the results, so in the end the tables with all the results may not be necessary; but you still can estimate how strong a monster really is. For example, a Monster with 2 Attacks just deals double the damage (ok, little surprise here); whereas a Monster with a non-defendable second attack generates between 4 and 5 times the damage of the basic Monster.

I hope to find these kinds of little helpers for a lot of special abilities and also for the fight against 2 or 3 Heros, to have a "Monster Design Tool" in the end.


Rewards:
Hosted a Play-by-Post game. Played a turn in a Play-by-Post game. Created a Hot Topic. Participated in four (4) Miniature Exchanges. Participated in a Miniature Exchange. Zealot Miniatures: Twisting Catacombs Kickstarter Backer Destroyed a Zombie! Encountered a menacing Chaos Warlock!
User avatar
Anderas
NOT Andreas!

Polar Warbear
Polar Warbear
 
Posts: 3131
Images: 33
Joined: Saturday September 20th, 2014 7:02am
Forum Language: British English
Evil Sorcerer: Morcar
Hero:
Usergroups:
Adventurers' Guild Group Member Artists Group Member
Champion Group Member

Re: Monster slaying cost

Postby Count Mohawk » Tuesday December 9th, 2014 11:07am

Anderas wrote:Thanks for this comparison, Daedalus! I wasn't aware that there is still such a large gap between Mohawk and me.
I was believing that we confirmed each other quite well and that we had the same results.

If you do a straight comparison with the same Hero and the same Monster, then yes, our values come out the same:
MSC One Hero.png

However, if you average 4 Heroes, as I tried to do, you will get somewhat different values:
MSC Four Heroes.png

I suspect Daedalus looked only at the active sheet on my Excel file, "Quest MSC Calculator", which indeed finds an average MSC for all 4 Heroes in a group. However, the sheet "MSC" allows you to look at just one Hero at a time against one Monster at a time.

The trouble with having a good and proper MSC, as you are discovering, Anderas, is that it is very rare for only one Hero to fight only one Monster at a time. Proper tactics in fact would have four Heroes killing off multiple monsters each round, while the Monsters gang up on whoever rolls the fewest Defense Dice. One factor in particular that the MSC does not take into account is room density; that is, how many monsters get packed into one room. One room with 12 Orcs is much more dangerous than twelve rooms each with 1 Orc, and three rooms with four Orcs would lie somewhere in the middle.
Anderas wrote:After weeks of calculating, in the meanwhile I think it is wrong to have a single value for MSC - except if you accept that this value has little or nothing to do with the reality.

The Game System was quite ok balanced for Heros with low stats. You get in Trouble if all the Heros are well equipped and stay together. Then you need rooms after rooms filled with monsters who do little or no damage. Some like it, some say it gets boring in that stage.

To be fair, normal Orcs will not be doing a lot of damage to well-equipped Heroes who roll 5 or 6 Defend dice at a time. That's more a fault of how quickly the Heroes can reach their maximum battle capacity, however. Given that most normal parties will have their Heroes rolling at least 4/4 by the end of the base Quest Pack, I have to assume that Milton Bradley did not plan around the possibility of additional Quest Packs very well.

Anderas wrote:At the moment I am updating my table with 1 Monster against 2 Heros and 1 Monster against 3 Heros; plus the Monsters get abilities like 2 Attacks; or the second Attack not defendable. It is far to big for Excel by now. :roll: :)

CHALLENGE ACCEPTED!
You do not have the required permissions to view the files attached to this post.


Rewards:
Grin's Stone Map Created a Hot Topic. Shattered a Skeleton! Destroyed a Zombie! Crushed a powerful Chaos Warrior! Smashed a massive Gargoyle!
User avatar
Marquis of Math
Count Mohawk

Elven Warrior
Elven Warrior
 
Posts: 679
Joined: Thursday July 11th, 2013 5:18pm
Location: New England, USA
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

Re: Monster slaying cost

Postby Daedalus » Saturday December 13th, 2014 11:01pm

Count Mohawk wrote:I suspect Daedalus looked only at the active sheet on my Excel file, "Quest MSC Calculator", which indeed finds an average MSC for all 4 Heroes in a group. However, the sheet "MSC" allows you to look at just one Hero at a time against one Monster at a time.

Yep. It was the easiest to understand and display. Didn't realize there was a 2/2 example in there. I prefer your averaged Heroes approach. I need a new table to compare those.

Meanwhile, I have something more substantial from thequester.
thequester wrote:Hi Daedalus,
Sounds interesting that the topic is still hot. I haven't had the time to follow the posts, unfortunately, and I expect I won't have the time for it for atleast a year from now. Hero Quest is still close to my heart though, as always :D

Below is the code I have used for calculating MSC so far.
Feel free to post it on the forum, and quote this message for everybody to see. :)

Have fun! :D


Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

//#define REPETITIONS 10000000  // The original amount of reps
//#define REPETITIONS 15000000  // Needed 4 enuff precision on US mummy vs 1 2
#define REPETITIONS 50000000  // Needed 4 enuff prec. on US Witch Lord vs 1 2


typedef enum {SKULL, WHITESHIELD, BLACKSHIELD} dicevalue;

int calculationStep;


double random0to1() {   /* Returns value 0..1 (including 0, excluding 1) */
   int r;
   double res;
   while((r=rand()) == RAND_MAX);
   res = ((double)r/((double)RAND_MAX));
   /*printf("random0to1 result is %.4f\n",res);*/
   return res;
}


dicevalue throwDice() {
   int throwValue;
   throwValue = (int)((random0to1()*6.0));
   switch(throwValue) {
      case 0: case 1: case 2:
         return SKULL;
         break;
      case 3: case 4:
         return WHITESHIELD;
         break;
      case 5:
         return BLACKSHIELD;
         break;
      default:
         printf("Switch - default, error. Value is %i\n",throwValue);
         exit(0);
         break;
   }
}


double damOfMonsterAttackTurn(int HDef, int MAtt) {
   int i, j, sum;
   int monsterHits, heroHits;

   sum = 0;
   for(i=0; i<REPETITIONS; i++) {
      monsterHits = 0;
      for(j=0; j<MAtt; j++) {
         if(throwDice()==SKULL)
            monsterHits++;
      }

      heroHits = 0;
      for(j=0; j<HDef; j++) {
         if(throwDice()==WHITESHIELD)
            heroHits++;
      }
      sum += ((monsterHits>heroHits) ? (monsterHits-heroHits) : 0);
   }
   /*printf("Sum of simulated monster hits (damage) is %i\n",sum);*/
   /*printf("(double)sum = %.4f\n",(double)sum);*/
   /*printf("(double)REPETITIONS = %.4f\n",(double)REPETITIONS);*/
   return (sum)/((double)REPETITIONS);
}


double damOfHeroAttackTurn(int HAtt, int MDef) {
   int i, j, sum;
   int monsterHits, heroHits;

   sum = 0;
   for(i=0; i<REPETITIONS; i++) {
      heroHits = 0;
      for(j=0; j<HAtt; j++) {
         if(throwDice()==SKULL)
            heroHits++;
      }

      monsterHits = 0;
      for(j=0; j<MDef; j++) {
         if(throwDice()==BLACKSHIELD)
            monsterHits++;
      }
      sum += ((heroHits>monsterHits) ? (heroHits-monsterHits) : 0);
   }
   return ((double)sum)/((double)REPETITIONS);
}


double averageHeroDamage(int HAtt, int HDef, int MAtt, int MDef, int MBod) {
   double monsterInflicts, heroInflicts;
   printf("[Step %i/4]",calculationStep++);
   monsterInflicts = damOfMonsterAttackTurn(HDef,MAtt);
   printf(" done\n");
   printf("[Step %i/4]",calculationStep++);
   heroInflicts = damOfHeroAttackTurn(HAtt,MDef);
   printf(" done\n");

   /*printf("Monster inflicts %.4f\n",monsterInflicts);*/
   /*printf("Hero inflicts %.4f\n",heroInflicts);*/
   return (((double)MBod)/heroInflicts) * monsterInflicts;
}


int getInputNumber() {
   char a[100];
   char *suffix;
   int t;

   if (!fgets(a, sizeof(a), stdin)) {
      printf("*** Error: Something went wrong during typing. Terminating.\n");
      exit(0);
   } else {
      t = (int)strtol(a,&suffix,10);
      if (strlen(suffix)!=1) { // This 1 is the return code
         printf("*** Error: Something went wrong during typing. Terminating."
               "\n");
         exit(0);
      }
   }
   return t;
}


double roundTo1decimal(double d) {
   int i;
   i = (int)(d*10+0.5);
   return ((double)i)/10.0;
}


int main(int argc, char *argv[]) {
   int HAtt, HDef, MAtt, MDef, MBod;
   double avg1, avg2;
   int batchMode = (argc == 6);
   double slayingCost1decimal;

   if (batchMode) {
      printf("HQ SLAYING COST CALC - can also be run without arguments."
            " Current arg values:\n");
      HAtt = atoi(argv[1]);
      HDef = atoi(argv[2]);
      MAtt = atoi(argv[3]);
      MDef = atoi(argv[4]);
      MBod = atoi(argv[5]);
      printf("HERO ATT: %i   ", HAtt);
      printf("HERO DEF: %i   ", HDef);
      printf("MONSTER ATT: %i   ", MAtt);
      printf("MONSTER DEF: %i   ", MDef);
      printf("MONSTER BP: %i\n", MBod);
   } else {
      printf("\n"
         "            /| ________________    \n"
         "      O|===|* >________________>   \n"
         "            \\|                    \n");
      printf("HERO QUEST SLAYING COST CALCULATOR v1.1\n");
      printf("by thequester\n\n");
      printf("This program calculates how much damage a hero takes\n");
      printf("(in average) before he has defeated a specific monster.\n\n");

      printf("This calculator can also be run with command-line arguments:\n"
               "heroAttack, heroDefend, monsterAttack, monsterDefend, "
               "monsterBodyPoints\n");
      printf("\nEnter HEROs number of ATTACK dice: ");
      HAtt = getInputNumber();
      printf("Enter HEROs number of DEFEND dice: ");
      HDef = getInputNumber();
      printf("Enter MONSTERs number of ATTACK dice: ");
      MAtt = getInputNumber();
      printf("Enter MONSTERs number of DEFEND dice: ");
      MDef = getInputNumber();
      printf("Enter MONSTERs number of BODY POINTS: ");
      MBod = getInputNumber();

      printf("Calculating...\n");
   }

   /*printf("Hero has %i ATTACK, %i DEFEND.\n",HAtt,HDef);*/
   /*printf("Monster has %i ATT, %i DEF, %i body points.\n",MAtt,MDef,MBod);*/
   calculationStep = 1;
   avg1 = averageHeroDamage(HAtt,HDef,MAtt,MDef,MBod);
   avg2 = averageHeroDamage(HAtt,HDef,MAtt,MDef,MBod);
   if(fabs(avg1 - avg2) > 0.01) {
      printf("Could not achieve sufficient precision. Terminating.\n");
      printf("avg1 = %.4f\n",avg1);
      printf("avg2 = %.4f\n",avg2);
      printf("fabs(avg1-avg2) = %.4f\n",fabs(avg1 - avg2));
      exit(0);
   }

   slayingCost1decimal = roundTo1decimal(avg1);
   if (batchMode) {
      printf("Slaying cost: %.1f\n\n", slayingCost1decimal);
   } else {
      printf("\nTo defeat the monster, the hero will take in average "
            "%.1f bodypoints of damage.\n\n" , slayingCost1decimal);
   }
}
..
UNCLE ZARGON
Image
WANTS.. YOU


Rewards:
Grin's Stone Map Played a turn in five (5) Play-by-Post games. Created a Hot Topic. Slain a measly Goblin! Slaughtered an Orc! Killed a mighty Fimir! Shattered a Skeleton! Destroyed a Zombie! Unravelled a Mummy!Crushed a powerful Chaos Warrior! Smashed a massive Gargoyle! Encountered all eight (8) Game System monsters. Encountered a menacing Chaos Warlock!
User avatar
Editor-in-Chief
Daedalus
Slacker Ruleslawyer

Wizard
Wizard
 
Posts: 3539
Images: 14
Joined: Monday May 9th, 2011 2:31pm
Forum Language: English (United States)
Evil Sorcerer: Zargon
Usergroups:
Wizards of Zargon Group Member Adventurers' Guild Group Member Artists Group Member Champion Group Member

Re: Monster slaying cost

Postby thequester » Saturday May 27th, 2017 4:07pm

By request and with help from Daedalus (thanks!), here's my original MSC table with a few more numbers calculated. Had to bump it up to 70,000,000 iterations for some of the ogres in order for the program to report high enough precision for one decimal. :lol:

Code: Select all
Hero Attack Dice     1 AD |2 AD  2 AD  2 AD |3 AD  3 AD  3 AD  3 AD  3 AD |4 AD  4 AD  4 AD  4 AD
Hero Defend Dice     2 DD |2 DD  3 DD  4 DD |2 DD  3 DD  4 DD  5 DD  6 DD |2 DD  3 DD  4 DD  5 DD
--------------------------+-----------------+-----------------------------+-----------------------
Goblin EU/NA .......  1.3 | 0.6 | 0.5 | 0.3 | 0.4 | 0.3 | 0.2 | 0.2 | 0.1 | 0.3 | 0.2 | 0.2 | 0.1
Skeleton EU/NA .....  1.6 | 0.7 | 0.5 | 0.4 | 0.5 | 0.3 | 0.2 | 0.2 | 0.1 | 0.3 | 0.2 | 0.2 | 0.1
Zombie EU/NA .......  1.9 | 0.8 | 0.6 | 0.4 | 0.5 | 0.4 | 0.3 | 0.2 | 0.1 | 0.4 | 0.3 | 0.2 | 0.1
Orc EU/NA ..........  2.8 | 1.3 | 1.0 | 0.8 | 0.8 | 0.6 | 0.5 | 0.4 | 0.3 | 0.6 | 0.4 | 0.3 | 0.3
Mummy EU ...........  4.0 | 1.7 | 1.3 | 1.0 | 1.0 | 0.8 | 0.6 | 0.5 | 0.3 | 0.7 | 0.5 | 0.4 | 0.3
Mummy NA ...........  7.9 | 3.3 | 2.6 | 2.0 | 2.0 | 1.5 | 1.2 | 0.9 | 0.7 | 1.4 | 1.1 | 0.8 | 0.6
Fimir EU ...........  3.3 | 1.4 | 1.1 | 0.9 | 0.9 | 0.7 | 0.5 | 0.4 | 0.3 | 0.6 | 0.5 | 0.4 | 0.3
Fimir NA ...........  6.6 | 2.9 | 2.3 | 1.7 | 1.8 | 1.4 | 1.1 | 0.8 | 0.6 | 1.2 | 1.0 | 0.7 | 0.6
Chaos Warrior EU ...  4.0 | 1.7 | 1.3 | 1.0 | 1.0 | 0.8 | 0.6 | 0.5 | 0.3 | 0.7 | 0.5 | 0.4 | 0.3
Chaos Warrior NA ... 17.5 | 7.3 | 6.0 | 4.8 | 4.3 | 3.5 | 2.9 | 2.3 | 1.8 | 3.0 | 2.4 | 2.0 | 1.6
Gargoyle EU ........  5.8 | 2.4 | 2.0 | 1.6 | 1.4 | 1.2 | 1.0 | 0.8 | 0.6 | 1.0 | 0.8 | 0.7 | 0.5
Gargoyle NA ........ 20.9 | 8.4 | 6.9 | 5.6 | 4.8 | 3.9 | 3.2 | 2.6 | 2.0 | 3.3 | 2.7 | 2.2 | 1.7
Fellmarg Guardian EU  5.8 | 2.4 | 2.0 | 1.6 | 1.4 | 1.2 | 1.0 | 0.8 | 0.6 | 1.0 | 0.8 | 0.7 | 0.5
Fellmarg Guardian NA 11.6 | 4.8 | 4.0 | 3.2 | 2.9 | 2.4 | 1.9 | 1.5 | 1.2 | 2.0 | 1.6 | 1.3 | 1.1
Ulag EU ............  7.0 | 2.8 | 2.3 | 1.9 | 1.6 | 1.3 | 1.1 | 0.9 | 0.7 | 1.1 | 0.9 | 0.7 | 0.6
Ulag NA ............ 14.0 | 5.6 | 4.6 | 3.7 | 3.2 | 2.6 | 2.1 | 1.7 | 1.4 | 2.2 | 1.8 | 1.4 | 1.2
Grak EU ............  5.8 | 2.4 | 2.0 | 1.6 | 1.4 | 1.2 | 1.0 | 0.8 | 0.6 | 1.0 | 0.8 | 0.7 | 0.5
Grak NA ............ 17.5 | 7.3 | 6.0 | 4.8 | 4.3 | 3.5 | 2.9 | 2.3 | 1.8 | 3.0 | 2.4 | 2.0 | 1.6
Stone Chaos Warr EU   4.8 | 1.9 | 1.5 | 1.2 | 1.1 | 0.9 | 0.7 | 0.5 | 0.4 | 0.7 | 0.6 | 0.4 | 0.3
Stone Chaos Warr NA  20.9 | 8.4 | 6.9 | 5.6 | 4.8 | 3.9 | 3.2 | 2.6 | 2.0 | 3.3 | 2.7 | 2.2 | 1.7
Balur EU ...........  2.8+| 1.1+| 0.8+| 0.6+| 0.6+| 0.5+| 0.3+| 0.2+| 0.2+| 0.4+| 0.3+| 0.2+| 0.2+
Balur NA ...........  8.3+| 3.3+| 2.4+| 1.8+| 1.9+| 1.4+| 1.0+| 0.7+| 0.5+| 1.3+| 0.9+| 0.7+| 0.5+
Witch Lord EU ...... 11.2+| 4.3+| 3.7+| 3.1+| 2.4+| 2.0+| 1.7+| 1.4+| 1.2+| 1.6+| 1.4+| 1.1+| 0.9+
Witch Lord NA ...... 44.7+|17.2+|14.6+|12.3+| 9.6+| 8.2+| 6.9+| 5.7+| 4.7+| 6.4+| 5.4+| 4.5+| 4.5+
---------------------     |     |     |     |     |     |     |     |     |     |     |     |
-HALLS OF DURRAG-DOL      |     |     |     |     |     |     |     |     |     |     |     |
Skaven Warrior .....  1.6+| 0.7+| 0.5+| 0.4+| 0.5+| 0.3+| 0.2+| 0.2+| 0.1+| 0.3+| 0.2+| 0.2+| 0.1+
White Seer ......... 13.2+| 5.8+| 4.5+| 3.5+| 3.5+| 2.7+| 2.1+| 1.6+| 1.2+| 2.5+| 1.9+| 1.5+| 1.1+
Rat Ogre ...........  3.3 | 1.4 | 1.1 | 0.9 | 0.9 | 0.7 | 0.5 | 0.4 | 0.3 | 0.6 | 0.5 | 0.4 | 0.3
Troll ..............  4.0 | 1.7 | 1.3 | 1.0 | 1.0 | 0.8 | 0.6 | 0.5 | 0.3 | 0.7 | 0.5 | 0.4 | 0.3
---------------------     |     |     |     |     |     |     |     |     |     |     |     |
-THE EYES OF CHAOS        |     |     |     |     |     |     |     |     |     |     |     |
Ogre ............... 18.6 | 7.5 | 6.3 | 5.3 | 4.3 | 3.6 | 3.1 | 2.5 | 2.1 | 2.9 | 2.5 | 2.1 | 1.7
Goblin w/ crossbow .  2.3+| 1.1+| 0.9+| 0.7+| 0.7+| 0.6+| 0.4+| 0.3+| 0.2+| 0.5+| 0.4+| 0.3+| 0.2+
Orc Nest Orcs ......  4.0+| 1.8+| 1.5+| 1.2+| 1.2+| 0.9+| 0.8+| 0.6+| 0.5+| 0.8+| 0.7+| 0.6+| 0.4+
Lair Orc ...........  2.8+| 1.3+| 1.0+| 0.8+| 0.8+| 0.6+| 0.5+| 0.4+| 0.3+| 0.6+| 0.4+| 0.3+| 0.3+
Lair Ogre .......... 18.6+| 7.5+| 6.3+| 5.3+| 4.3+| 3.6+| 3.1+| 2.5+| 2.1+| 2.9+| 2.5+| 2.1+| 1.7+
Ogre Chieftain ..... 42.2+|16.2+|14.1+|12.2+| 9.1+| 7.9+| 6.8+| 5.8+| 4.9+| 6.0+| 5.2+| 4.5+| 3.9+
Troll .............. 15.9 | 6.6 | 5.2 | 4.0 | 3.9 | 3.1 | 2.4 | 1.8 | 1.4 | 2.7 | 2.1 | 1.6 | 1.3
Chaos Sorcerer ..... 29.1+|12.1+| 9.9+| 8.1+| 7.2+| 5.9+| 4.8+| 3.8+| 3.0+| 4.9+| 4.1+| 3.3+| 2.6+
---------------------     |     |     |     |     |     |     |     |     |     |     |     |
-AGAINST T. O. HORDE      |     |     |     |     |     |     |     |     |     |     |     |
Ogre Warrior 3 BP .. 27.9 |11.2 | 9.5 | 8.0 | 6.4 | 5.5 | 4.6 | 3.8 | 3.1 | 4.3 | 3.7 | 3.1 | 2.6
Ogre Champion 4 BP . 37.2 |14.9 |12.7 |10.6 | 8.6 | 7.3 | 6.1 | 5.1 | 4.2 | 5.8 | 4.9 | 4.1 | 3.4
Ogre Chieftain 4 BP  56.2 |21.6 |18.9 |16.3 |12.1 |10.5 | 9.1 | 7.8 | 6.6 | 8.0 | 7.0 | 6.0 | 5.1
Ogre Lord 5 BP ..... 70.3 |27.0 |23.6 |20.3 |15.1 |13.2 |11.4 | 9.7 | 8.2 |10.0 | 8.7 | 7.5 | 6.4
Gargoyle Quest 1 ... 17.5 | 7.3 | 6.0 | 4.8 | 4.3 | 3.5 | 2.9 | 2.3 | 1.8 | 3.0 | 2.4 | 2.0 | 1.6
Stone Orc Quest 1 ..   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Festral ............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Festral's Guard ....   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Xenloth ............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
---------------------  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
-WIZARDS OF MORCAR     .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Zanrath's Chaos Warr   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Zanrath.............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Fanrax Skeleton.....   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Fanrax..............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Boroush.............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Grawshak's Bodyguard   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Grawshak............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
---------------------  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
-RUNNING THE GAUNTLET     |     |     |     |     |     |     |     |     |     |     |     |
Cabiri Lord ........  2.6+| 1.2+| 0.8+| 0.5+| 0.7+| 0.5+| 0.3+| 0.2+| 0.1+| 0.5+| 0.3+| 0.2+| 0.2+
---------------------     |     |     |     |     |     |     |     |     |     |     |     |
-A GROWL OF THUNDER    .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Wight ..............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Balash .............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Balor ..............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
---------------------  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
-INN OF CHAOS          .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Chaos Sorcerer .....   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Magical Skull ......   .  | 0.7 |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
---------------------  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
-REV. O.T. WEATHERMAN  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Ice Gargoyle .......   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Erongil ............   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
Death Reaper .......   .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .  |  .
A + after the cost means the monster/character is tougher to defeat than the number reflects because of additional special skills like magic and the like. (The MSC for these are only based on regular melee attacks.) So here I recommend the reader's personal judgement to estimate how much higher the number should be, depending maybe on how the monster is used in your chosen context. That might only be a rough estimate, but it's better than nothing.

I have a holiday coming up until mid-June, but after that, I might crunch more numbers for the table, if someone reminds me :D
Cheers |_P


Rewards:
Created a Hot Topic. Killed a mighty Fimir!
User avatar
thequester

Orc
Orc
 
Posts: 43
Images: 1
Joined: Wednesday January 9th, 2013 2:58pm
Location: Aarhus/Denmark
Forum Language: British English
Evil Sorcerer: Morcar
Usergroups:
Champion Group Member

Re: Monster slaying cost

Postby Anderas » Sunday May 28th, 2017 12:22am

Why not using Mohawk's Questimator?

It is cutting off the fight after sixty rounds of rolling dice, alternatively, when sixty Body Points are lost. So there will be small discrepancies if you compare the results to the detail. But to be honest, in the real life you won't see the difference that comes from it. More important, you won't feel it.

But it has a great feature to offer that neither me nor you implemented in our simulators: It calculates the attack of several heroes on one room, instead of a one-on-one.
For that, you will have to enter the monsters in the proper order and three values more as properties of a room:

- How many heroes fight in the initial/door opening round (initiative) - generally, for a wandering monster this is 0, for a 1-field-corridor it is 1, for open/ bigger rooms this is 4
- How many monsters are capable to fight back ("monster" value) - In a corridor, two monsters can fight back, everywhere else it's likely 4 or more
- How many heroes can fight at the beginning of round 2 and afterwards - in a corridor, two heroes can fight, everywhere else it's likely 4, depending on the room's geometry

Image

Then, to enter the monsters in the proper order is crucial. If there is a Goblin standing in the way, the mighty Barbarian's attack might be going to be waste just to remove the goblin before other heroes can enter the room. So put the monsters in the order they are attacked, and the result will be very close to reality.

Since this tool exists, i put all lost BP of the Heroes as markers in a little jar. After the quest, i count and compare to the Questimator. They have always been very very close... if i used the proper hero group. :)


Rewards:
Hosted a Play-by-Post game. Played a turn in a Play-by-Post game. Created a Hot Topic. Participated in four (4) Miniature Exchanges. Participated in a Miniature Exchange. Zealot Miniatures: Twisting Catacombs Kickstarter Backer Destroyed a Zombie! Encountered a menacing Chaos Warlock!
User avatar
Anderas
NOT Andreas!

Polar Warbear
Polar Warbear
 
Posts: 3131
Images: 33
Joined: Saturday September 20th, 2014 7:02am
Forum Language: British English
Evil Sorcerer: Morcar
Hero:
Usergroups:
Adventurers' Guild Group Member Artists Group Member
Champion Group Member

PreviousNext

Return to General HeroQuest Discussion

Who is online

Users browsing this forum: CommonCrawl [Bot], elvyler and 0 guests