[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (TFT) Rewrite of Melee simulator in JavaScript



It's actually rolling 4 dice. The total in the case you cite is 6. The
reason you only see 3 rolls is that one of the rolls (the roll of 1) was
repeated and Chrome's console ate the message. Chrome's console has a
feature (sometimes annoying) that it combines repeated messages into one,
with a count in an icon next to it, which doesn't show up if you copy/paste
the console text.


I appreciate you looking at it.

The better way to verify code is unit tests. I had some unit tests in the
java version but JavaScript unit testing is not as obvious to use.


On Thu, Oct 15, 2015, 21:34 Peter von Kleinsmid <pvk@oz.net> wrote:

At 05:03 PM 10/15/2015, you wrote:
>...
>As far as defending, there could be bugs in the simulator. I look at the
>details of the case that you mention.

Yep. It only rolls three dice:

069:ST12;DX12;BROADSWORD;NO_ARMOR;SMALL_SHIELD is defending this turn
because attacker is charging with pole weapon. Logger.js:14:22
069:ST12;DX12;BROADSWORD;NO_ARMOR;SMALL_SHIELD (adjDx = 12) attacks
before 086:ST13;DX11;HALBERD;LEATHER;NO_SHIELD (adjDx = 9) Logger.js:14:22
069:ST12;DX12;BROADSWORD;NO_ARMOR;SMALL_SHIELD is defending. Logger.js:14:22
Rolling 4 dice...
  Logger.js:14:22
Die roll: 2
  Logger.js:14:22
Die roll: 1
  Logger.js:14:22
Die roll: 2
  Logger.js:14:22
Charging with pole weapon. Logger.js:14:22
086:ST13;DX11;HALBERD;LEATHER;NO_SHIELD rolling to hit. Rolled 6 and
adjDex is 9 Logger.js:14:22
Hit!

=====
Post to the entire list by writing to tft@brainiac.com.
Unsubscribe by mailing to majordomo@brainiac.com with the message body
"unsubscribe tft"

=====
Post to the entire list by writing to tft@brainiac.com.
Unsubscribe by mailing to majordomo@brainiac.com with the message body
"unsubscribe tft"