Main      Site Guide    
Message Forum
Re: Monster Arena maths questions
Posted By: Sam, on host 24.34.46.67
Date: Wednesday, August 12, 2009, at 21:33:40
In Reply To: Monster Arena maths questions posted by Sentynel on Wednesday, August 12, 2009, at 20:55:24:

> I've been using the Damage Chart to estimate the damage potential of any given character's attacks, but upon paying more attention I've noticed something that doesn't quite fit the chart for very high attacks - for example, a monster of attack 22 attacks a monster of defence 9 (no relevant elemental bonuses) for 18 damage, rather than the expected 20 - would I be right in guessing the damage function differs above d=2?

Probably. I don't really remember how I coded this.

> Also, I cannot follow what determines the order of attacks at all.

LOL. I remember how seemingly unnecessarily complicated that got. It's designed to be fair and to lack even the smallest element of randomness. But although the algorithm is not random, some of it is arbitrary. The central problem I solved is this: given two identical parties, who *stay* identical throughout the entire course of the tournament and only fight each other, they should each win 50% of the time without there being any randomness in the algorithm. That means I can't ever break a tie with a coin toss, or by alphabetizing the names of the players or characters.

Basically the way it works is that there are 30 "turns" per round, and as many rounds as it takes to complete a match. In each "turn," all six characters could potentially attack. In fact, if a character has an agility of 30, he *will* make an attack every "turn."

With an agility 29, he can attack on every turn except turn #15 (IIRC). With an agility of 3, he can attack on 10, 20, and 30.

If a character has an agility over 30, he actually gets to attack twice during some turns. For example, with an agility of 31, he gets to attack on all moves, plus a second time on those turns that characters with agility 1 can attack on.

To keep each match in a tournament from playing out the same way with identical characters, each battle in a tournament starts on a different turn number. So the first match of a tournament starts on turn 1, the second on turn 2, etc. (I can't remember for sure, but I think even the tournament number itself is a factor in determining the starting turn number. It might be the sum of the tournament number and the round number, mod 30.)

Thus, when examining who gets to move first in a battle, the characters with higher agility get to move first more often than characters with lower agility. But a battle just might happen to start on a turn number that a lower agility character can move in and a higher agility character can't.

Now: if multiple characters attack on the same turn, what order do they attack in? Well, for starters, if any characters get to move twice in the same turn, then every character gets to move once before anybody gets a second move. Otherwise, higher agilities go before lower agilities. In the case of an agility tie, those with higher *natural* agilities (that is, their agility stat without taking equipment bonuses into account) go first. If that's also tied, the ties are broken with strength and constitution (I don't remember which one it looks at first), first checking the total stat, then the unadjusted stat if necessary.

If ALL stats are tied, then the ties are broken in an arbitrary but fair manner. It's not exactly like this, but it goes something like this: The characters are ordered this way:

1. First team, first character.
2. Second team, first character.
3. First team, second character.
4. Second team, second character.
5. First team, third character.
6. Second team, third character.

Then, take the round number (and possibly add the tournament number to it), mod 6, and that's where you start in this list. Then you loop through the whole list, and that's the order the characters move in.

So, problem solved: two identical teams will each win 50% of the battles and 50% of the tournaments, without randomness or character names being determining factors.

Replies To This Message

Post a Reply

RinkChat Username:
Password:
Email: (optional)
Subject:
Message:
Link URL: (optional)
Link Title: (optional)

Make sure you read our message forum policy before posting.