Ok, having thought about it a little more here's what I think happened:
You were right bro, stocksr seems to be getting the number of cards held by player by parsing the information contained in the player roster to the right of the map.
A snippet of the code staring from line 703:
- Code: Select all
/*--- Get Player Card Counts ---*/
var tmp2 = getElementsByClassName(rightside,"li","status");
for ( i in tmp2 )
{
var tmp3 = tmp2[i].textContent.split(/\W/);
pl[pIndxs[i].innerHTML]._cards=parseInt(tmp3[1]);
}
This is how the number of cards held are being parsed. But this is an assassin game, and it just so happens that your (The1exile) target is red. So there is a target symbol (crossthreads) there that would under normal circumstances not be there. The tmp3[1] item must be the target symbol (crossthreads) which cannot be converted into a number (yet is considered a word character), hence the number of cards held by the red player is set to NaN (Not a Number, the result of attempting to convert something that isn't a number into a number). So in the statistics table the red player's cards are listed as NaN and the Card Set Estimate will be -3 when the number of cards held by a player is NaN. Also it explains why at the end of the game the statistics table is correct, because at that point the target symbol is removed from the player roster because at that point in time the game is over.
I guess the quickest fix is simply to insert the following lines:
- Code: Select all
if (isNaN(pl[pIndxs[i].innerHTML]._cards)) {
pl[pIndxs[i].innerHTML]._cards = parseInt(tmp3[2]);
}
thusly:
- Code: Select all
/*--- Get Player Card Counts ---*/
var tmp2 = getElementsByClassName(rightside,"li","status");
for ( i in tmp2 )
{
var tmp3 = tmp2[i].textContent.split(/\W/);
pl[pIndxs[i].innerHTML]._cards=parseInt(tmp3[1]);
if (isNaN(pl[pIndxs[i].innerHTML]._cards)) {
pl[pIndxs[i].innerHTML]._cards = parseInt(tmp3[2]);
}
}
Of course, the only way to test this is to start an assassin game and see that your target's cards held is being calculated correctly.
[Update] The proposed fix has been tested and seems to work.