bcdice / bcdice-js

BCDice ported package for TypeScript and JavaScript by Opal.
BSD 3-Clause "New" or "Revised" License
22 stars 9 forks source link

Update BCDice to 2.07.03 #13

Closed esnya closed 4 years ago

esnya commented 4 years ago
esnya commented 4 years ago

Logを出した

  1) DoubleCross
       rolls 5DX7+7-2*(2+5-3)
output:
DoubleCross : (5DX7-1) > 10[5,6,6,7,8]+10[1,9]+5[5]-1 > 24
rand:6/10,6/10,8/10,5/10,7/10,9/10,1/10,5/10============================
input:
2D10>=? 目標値?でバグらない:

      gameType: DoubleCross
input: 5DX7+7-2*(2+5-3)
output:
DoubleCross : (5DX7-1) > 10[5,6,6,7,8]+10[1,9]+5[5]-1 > 24
rand:6/10,6/10,8/10,5/10,7/10,9/10,1/10,5/10============================
input:
2D10>=? 目標値?でバグらない
output: DoubleCross : (2D10>=?) > 10[5,5] > 10 > 失敗
rands: [[5,10],[5,10]]
logs:
        setGameByTitle gameTitle,DoubleCross
        loadUnknownGame gameTitle,DoubleCross
        setGameByTitle message,Game設定をダブルクロス2nd,3rdに設定しました
        setMessage messageToSet,5DX7+7-2*(2+5-3)
        parren_killer input,5DX7+7-2*(2+5-3)
        [st...ed] before string,5DX7+7-2*(2+5-3)
        [st...ed] after string,5DX7+7-2*(2+5-3)
        diceBot.changeText(string) begin,5DX7+7-2*4
        DiceBot.parren_killer_add called
        diceBot.changeText(string) end,5DX7+7-2*4
        parren_killer output,5DX7+7-2*4
        @message,5DX7+7-2*4
        setChannel called channel,
        recievePublicMessageCatched begin nick_e,
        recievePublicMessageCatched @channel,
        recievePublicMessageCatched @message,5DX7+7-2*4
        setChannelForPlotOrSecretDice Begin
        executePointCounterPublic begin
        executePointCounterPublic NOT match
        executeDiceRoll begin
        channel,
        dice_command arg,5DX7+7-2*4
        dice_command Begin string,5DX7+7-2*4
        dicebot after command,5DX7+7-2*4
        match
        call rollDiceCommand command,5DX7+7-2*4
        rand called @rands,
        @diceBot.sendMode,2
        rand called @rands,
        @diceBot.sendMode,2
        rand called @rands,
        executeCommand exception,nextRand is nil, so @rands is empty!! @rands:[],RuntimeError: nextRand is nil, so @rands is empty!! @rands:[]
    at constructor.$$raise (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/opal.js:4646:50)
    at constructor.$$randFromRands (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/cgiDiceBot.js:6523:14)
    at constructor.$$rand_inner (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/cgiDiceBot.js:6452:22)
    at constructor.$$rand (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/cgiDiceBot.js:6464:18)
    at $$45 (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/cgiDiceBot.js:6380:36)
    at Object.Opal.yieldX (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/opal.js:1475:18)
    at constructor.$$loop (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/opal.js:4512:16)
    at Opal.send (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/opal.js:1671:19)
    at /mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/cgiDiceBot.js:6373:60
    at $$44 (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/cgiDiceBot.js:6398:83)
    at Number.$$times (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/opal.js:16865:9)
    at Opal.send (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/opal.js:1671:19)
    at /mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/cgiDiceBot.js:6360:58
    at constructor.$$roll (/mnt/c/Users/esnya/Documents/GitHub/bcdice-js/lib/cgiDiceBot.js:6421:81)
        rollDiceCommand result,
        check add roll
        check barabara roll
        check xRn roll arg,5DX7+7-2*4
        check upper roll
        check choice command
        getTableDataResult Begin
        dice,
        getD66Infos, string,
        executeDiceRoll @channel,
        executeCard begin
        executeCard arg,5DX7+7-2*4
        executeCard end

on_public end: expected '' to equal 'DoubleCross : (2D10>=?) > 10[5,5] > 10 > 失敗'
      + expected - actual

      +DoubleCross : (2D10>=?) > 10[5,5] > 10 > 失敗
esnya commented 4 years ago

autopatchの変更を切り出したのを忘れて使っていました…… rebaseして再構築しました。