{"action":"created","issue":{"url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1661","labels_url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1661/labels{/name}","comments_url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1661/comments","events_url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1661/events","html_url":"https://github.com/buttonmen-dev/buttonmen/issues/1661","id":95361667,"number":1661,"title":"a die which captures a radioactive rage die does not split","user":{"login":"cgolubi1","id":2898207,"avatar_url":"https://avatars.githubusercontent.com/u/2898207?v=3","gravatar_id":"","url":"https://api.github.com/users/cgolubi1","html_url":"https://github.com/cgolubi1","followers_url":"https://api.github.com/users/cgolubi1/followers","following_url":"https://api.github.com/users/cgolubi1/following{/other_user}","gists_url":"https://api.github.com/users/cgolubi1/gists{/gist_id}","starred_url":"https://api.github.com/users/cgolubi1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgolubi1/subscriptions","organizations_url":"https://api.github.com/users/cgolubi1/orgs","repos_url":"https://api.github.com/users/cgolubi1/repos","events_url":"https://api.github.com/users/cgolubi1/events{/privacy}","received_events_url":"https://api.github.com/users/cgolubi1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/buttonmen-dev/buttonmen/labels/backend","name":"backend","color":"000000"},{"url":"https://api.github.com/repos/buttonmen-dev/buttonmen/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"blackshadowshade","id":2898401,"avatar_url":"https://avatars.githubusercontent.com/u/2898401?v=3","gravatar_id":"","url":"https://api.github.com/users/blackshadowshade","html_url":"https://github.com/blackshadowshade","followers_url":"https://api.github.com/users/blackshadowshade/followers","following_url":"https://api.github.com/users/blackshadowshade/following{/other_user}","gists_url":"https://api.github.com/users/blackshadowshade/gists{/gist_id}","starred_url":"https://api.github.com/users/blackshadowshade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blackshadowshade/subscriptions","organizations_url":"https://api.github.com/users/blackshadowshade/orgs","repos_url":"https://api.github.com/users/blackshadowshade/repos","events_url":"https://api.github.com/users/blackshadowshade/events{/privacy}","received_events_url":"https://api.github.com/users/blackshadowshade/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/buttonmen-dev/buttonmen/milestones/8","html_url":"https://github.com/buttonmen-dev/buttonmen/milestones/Refactoring%20BMGame%20and%20BMInterface","labels_url":"https://api.github.com/repos/buttonmen-dev/buttonmen/milestones/8/labels","id":598781,"number":8,"title":"Refactoring BMGame and BMInterface","description":"This milestone is James' next major goal.","creator":{"login":"blackshadowshade","id":2898401,"avatar_url":"https://avatars.githubusercontent.com/u/2898401?v=3","gravatar_id":"","url":"https://api.github.com/users/blackshadowshade","html_url":"https://github.com/blackshadowshade","followers_url":"https://api.github.com/users/blackshadowshade/followers","following_url":"https://api.github.com/users/blackshadowshade/following{/other_user}","gists_url":"https://api.github.com/users/blackshadowshade/gists{/gist_id}","starred_url":"https://api.github.com/users/blackshadowshade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blackshadowshade/subscriptions","organizations_url":"https://api.github.com/users/blackshadowshade/orgs","repos_url":"https://api.github.com/users/blackshadowshade/repos","events_url":"https://api.github.com/users/blackshadowshade/events{/privacy}","received_events_url":"https://api.github.com/users/blackshadowshade/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":0,"state":"open","created_at":"2014-03-15T22:16:35Z","updated_at":"2015-07-16T06:33:40Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-07-16T06:32:28Z","updated_at":"2015-07-16T06:36:19Z","closed_at":null,"body":"Shown in https://github.com/buttonmen-dev/buttonmen/pull/1658#issuecomment-120767802 - at the moment, this bug only affects wtrollkin."},"comment":{"url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/comments/121846633","html_url":"https://github.com/buttonmen-dev/buttonmen/issues/1661#issuecomment-121846633","issue_url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1661","id":121846633,"user":{"login":"cgolubi1","id":2898207,"avatar_url":"https://avatars.githubusercontent.com/u/2898207?v=3","gravatar_id":"","url":"https://api.github.com/users/cgolubi1","html_url":"https://github.com/cgolubi1","followers_url":"https://api.github.com/users/cgolubi1/followers","following_url":"https://api.github.com/users/cgolubi1/following{/other_user}","gists_url":"https://api.github.com/users/cgolubi1/gists{/gist_id}","starred_url":"https://api.github.com/users/cgolubi1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgolubi1/subscriptions","organizations_url":"https://api.github.com/users/cgolubi1/orgs","repos_url":"https://api.github.com/users/cgolubi1/repos","events_url":"https://api.github.com/users/cgolubi1/events{/privacy}","received_events_url":"https://api.github.com/users/cgolubi1/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T06:36:19Z","updated_at":"2015-07-16T06:36:19Z","body":"Here's a responder test:\r\n```\r\ndiff --git a/test/src/api/responderTest.php b/test/src/api/responderTest.php\r\nindex ac47e8c..72e77a8 100644\r\n--- a/test/src/api/responderTest.php\r\n+++ b/test/src/api/responderTest.php\r\n@@ -145,6 +145,7 @@ class responderTest extends PHPUnit_Framework_TestCase {\r\n                 'description' => 'Fire Dice cannot make Power Attacks. Instead, they can assist other Dice in making Skill and Power Attacks. Before making a Skill or Power Attack, you may increase the value showing on any of the attacking dice, and decrease the values showing on one or more of your Fire Dice by the same amount. For example, if you wish to increase the value of an attacking die by 5 points, you can take 5 points away from one or more of your Fire Dice. Turn the Fire Dice to show the adjusted values, and then make the attack as normal. Dice can never be increased or decreased outside their normal range, i.e., a 10-sided die can never show a number lower than 1 or higher than 10. Also, Fire Dice cannot assist other dice in making attacks other than normal Skill and Power Attacks.',\r\n                 'interacts' => array(\r\n                     'Mighty' => 'Dice with both Fire and Mighty skills do not grow when firing, only when actually rolling',\r\n+                    'Weak' => 'Dice with both Fire and Weak skills do not shrink when firing, only when actually rolling',\r\n                 ),\r\n             ),\r\n             'Focus' => array(\r\n@@ -198,7 +199,9 @@ class responderTest extends PHPUnit_Framework_TestCase {\r\n             'Morphing' => array(\r\n                 'code' => 'm',\r\n                 'description' => 'When a Morphing Die is used in any attack, it changes size, becoming the same size as the die that was captured. It is then re-rolled. Morphing Dice change size every time they capture another die. If a Morphing die is captured, its scoring value is based on its size at the time of capture; likewise, if it is not captured during a round, its scoring value is based on its size at the end of the round',\r\n-                'interacts' => array(),\r\n+                'interacts' => array(\r\n+                     'Radioactive' => 'Dice with both Radioactive and Morphing skills first morph into the size of the captured die, and then decay',\r\n+                ),\r\n             ),\r\n             'Null' => array(\r\n                 'code' => 'n',\r\n@@ -236,6 +239,7 @@ class responderTest extends PHPUnit_Framework_TestCase {\r\n                 'interacts' => array(\r\n                     'Berserk' => 'Dice with both Radioactive and Berserk skills making a berserk attack targeting a SINGLE die are first replaced with non-berserk dice with half their previous number of sides, rounding up, and then decay',\r\n                     'Doppelganger' => 'Dice with both Radioactive and Doppelganger first decay, then each of the \"decay products\" are replaced by exact copies of the die they captured',\r\n+                    'Morphing' => 'Dice with both Radioactive and Morphing skills first morph into the size of the captured die, and then decay',\r\n                 ),\r\n             ),\r\n             'Rage' => array(\r\n@@ -314,6 +318,7 @@ class responderTest extends PHPUnit_Framework_TestCase {\r\n                 'description' => 'When a Weak Die rerolls for any reason, it first shrinks from its current size to the next larger size in the list of \"standard\" die sizes (1, 2, 4, 6, 8, 10, 12, 16, 20, 30).',\r\n                 'interacts' => array(\r\n                     'Berserk' => 'Dice with both Berserk and Weak skills will first halve in size, and then shrink',\r\n+                    'Fire' => 'Dice with both Fire and Weak skills do not shrink when firing, only when actually rolling',\r\n                 ),\r\n             ),\r\n         );\r\n@@ -11623,4 +11628,151 @@ class responderTest extends PHPUnit_Framework_TestCase {\r\n             $retval, array(array(0, 2), array(1, 1)),\r\n             $gameId, 1, 'Trip', 0, 1, '');\r\n     }\r\n+\r\n+    /**\r\n+     * This game reproduces a bug in which a die which attacks a radioactive rage die does not split\r\n+     */\r\n+    public function test_interface_game_039() {\r\n+\r\n+        // responder003 is the POV player, so if you need to fake\r\n+        // login as a different player e.g. to submit an attack, always\r\n+        // return to responder003 as soon as you've done so\r\n+        $this->game_number = 39;\r\n+        $_SESSION = $this->mock_test_user_login('responder003');\r\n+\r\n+\r\n+        $gameId = $this->verify_api_createGame(\r\n+            array(),\r\n+            'responder003', 'responder004', 'wtrollkin', 'Maryland', 3\r\n+        );\r\n+\r\n+        $expData = $this->generate_init_expected_data_array($gameId, 'responder003', 'responder004', 3, 'CHOOSE_AUXILIARY_DICE');\r\n+        $expData['gameSkillsInfo'] = $this->get_skill_info(array('Auxiliary', 'Berserk', 'Ornery', 'Morphing', 'Radioactive', 'Rage', 'Reserve', 'Shadow', 'Slow', 'Stinger', 'Poison'));\r\n+        $expData['playerDataArray'][0]['button'] = array('name' => 'wtrollkin', 'recipe' => 'p(4) pG%(7) s(15) sB(S) s%(S)! worm(Y)', 'artFilename' => 'BMdefaultRound.png');\r\n+        $expData['playerDataArray'][1]['button'] = array('name' => 'Maryland', 'recipe' => 'g(4) m(8) o(10) (W) (X) +@(8)', 'artFilename' => 'BMdefaultRound.png');\r\n+        $expData['playerDataArray'][0]['swingRequestArray'] = array('S' => array(6, 20));\r\n+        $expData['playerDataArray'][1]['swingRequestArray'] = array('W' => array(4, 12), 'X' => array(4, 20));\r\n+        $expData['playerDataArray'][0]['activeDieArray'] = array(\r\n+            array('value' => NULL, 'sides' => 4, 'skills' => array('Poison'), 'properties' => array(), 'recipe' => 'p(4)', 'description' => 'Poison 4-sided die'),\r\n+            array('value' => NULL, 'sides' => 7, 'skills' => array('Poison', 'Rage', 'Radioactive'), 'properties' => array(), 'recipe' => 'pG%(7)', 'description' => 'Poison Rage Radioactive 7-sided die'),\r\n+            array('value' => NULL, 'sides' => 15, 'skills' => array('Shadow'), 'properties' => array(), 'recipe' => 's(15)', 'description' => 'Shadow 15-sided die'),\r\n+            array('value' => NULL, 'sides' => NULL, 'skills' => array('Shadow', 'Berserk'), 'properties' => array(), 'recipe' => 'sB(S)', 'description' => 'Shadow Berserk S Swing Die'),\r\n+            array('value' => NULL, 'sides' => NULL, 'skills' => array('Shadow', 'Radioactive'), 'properties' => array(), 'recipe' => 's%(S)', 'description' => 'Shadow Radioactive S Swing Die'),\r\n+            array('value' => NULL, 'sides' => NULL, 'skills' => array('Slow', 'Ornery', 'Reserve', 'Morphing'), 'properties' => array(), 'recipe' => 'worm(Y)', 'description' => 'Slow Ornery Reserve Morphing Y Swing Die'),\r\n+            array('value' => NULL, 'sides' => 8, 'skills' => array('Auxiliary'), 'properties' => array(), 'recipe' => '+(8)', 'description' => 'Auxiliary 8-sided die'),\r\n+        );\r\n+        $expData['playerDataArray'][1]['activeDieArray'] = array(\r\n+            array('value' => NULL, 'sides' => 4, 'skills' => array('Stinger'), 'properties' => array(), 'recipe' => 'g(4)', 'description' => 'Stinger 4-sided die'),\r\n+            array('value' => NULL, 'sides' => 8, 'skills' => array('Morphing'), 'properties' => array(), 'recipe' => 'm(8)', 'description' => 'Morphing 8-sided die'),\r\n+            array('value' => NULL, 'sides' => 10, 'skills' => array('Ornery'), 'properties' => array(), 'recipe' => 'o(10)', 'description' => 'Ornery 10-sided die'),\r\n+            array('value' => NULL, 'sides' => NULL, 'skills' => array(), 'properties' => array(), 'recipe' => '(W)', 'description' => 'W Swing Die'),\r\n+            array('value' => NULL, 'sides' => NULL, 'skills' => array(), 'properties' => array(), 'recipe' => '(X)', 'description' => 'X Swing Die'),\r\n+            array('value' => NULL, 'sides' => 8, 'skills' => array('Auxiliary'), 'properties' => array(), 'recipe' => '+(8)', 'description' => 'Auxiliary 8-sided die'),\r\n+        );\r\n+\r\n+        $retval = $this->verify_api_loadGameData($expData, $gameId, 10);\r\n+\r\n+        $this->verify_api_reactToAuxiliary(\r\n+            array(2, 3, 14, 4, 1, 6),\r\n+            'responder003 chose not to use auxiliary dice in this game: neither player will get an auxiliary die. ',\r\n+            $gameId, 'decline');\r\n+\r\n+        array_unshift($expData['gameActionLog'], array('timestamp' => 'TIMESTAMP', 'player' => 'responder003', 'message' => 'responder003 chose not to use auxiliary dice in this game: neither player will get an auxiliary die'));\r\n+        $expData['gameActionLogCount'] = 1;\r\n+        $expData['gameSkillsInfo'] =  $this->get_skill_info(array('Berserk', 'Morphing', 'Ornery', 'Poison', 'Radioactive', 'Rage', 'Reserve', 'Shadow', 'Slow', 'Stinger'));\r\n+        $expData['gameState'] = \"SPECIFY_DICE\";\r\n+        array_pop($expData['playerDataArray'][0]['activeDieArray']);\r\n+        array_pop($expData['playerDataArray'][0]['activeDieArray']);\r\n+        $expData['playerDataArray'][0]['button'] = array(\"artFilename\" => \"BMdefaultRound.png\", \"name\" => \"wtrollkin\", \"recipe\" => \"p(4) pG%(7) s(15) sB(S) s%(S) worm(Y)\");\r\n+        array_pop($expData['playerDataArray'][1]['activeDieArray']);\r\n+        $expData['playerDataArray'][1]['button'] = array(\"artFilename\" => \"BMdefaultRound.png\", \"name\" => \"Maryland\", \"recipe\" => \"g(4) m(8) o(10) (W) (X)\");\r\n+\r\n+        $retval = $this->verify_api_loadGameData($expData, $gameId, 10);\r\n+\r\n+        $_SESSION = $this->mock_test_user_login('responder004');\r\n+        $this->verify_api_submitDieValues(\r\n+            array(2, 8),\r\n+            $gameId, 1, array('W' => 7, 'X' => 17), NULL);\r\n+        $_SESSION = $this->mock_test_user_login('responder003');\r\n+\r\n+        array_unshift($expData['gameActionLog'], array('timestamp' => 'TIMESTAMP', 'player' => 'responder004', 'message' => 'responder004 set die sizes'));\r\n+        $expData['gameActionLogCount'] = 2;\r\n+        $expData['playerDataArray'][1]['waitingOnAction'] = false;\r\n+\r\n+        $retval = $this->verify_api_loadGameData($expData, $gameId, 10);\r\n+\r\n+        $this->verify_api_submitDieValues(\r\n+            array(3, 5),\r\n+            $gameId, 1, array('S' => 6), NULL);\r\n+\r\n+        $expData['activePlayerIdx'] = 1;\r\n+        $expData['gameActionLog'] = array();\r\n+        array_unshift($expData['gameActionLog'], array('timestamp' => 'TIMESTAMP', 'player' => 'responder003', 'message' => 'responder003 chose not to use auxiliary dice in this game: neither player will get an auxiliary die'));\r\n+        array_unshift($expData['gameActionLog'], array('timestamp' => 'TIMESTAMP', 'player' => 'responder004', 'message' => 'responder004 set swing values: W=7, X=17'));\r\n+        array_unshift($expData['gameActionLog'], array('timestamp' => 'TIMESTAMP', 'player' => 'responder003', 'message' => 'responder003 set swing values: S=6'));\r\n+        array_unshift($expData['gameActionLog'], array('timestamp' => 'TIMESTAMP', 'player' => '', 'message' => 'responder004 won initiative for round 1. Initial die values: responder003 rolled [p(4):2, pG%(7):3, s(15):14, sB(S=6):3, s%(S=6):5], responder004 rolled [g(4):4, m(8):1, o(10):6, (W=7):2, (X=17):8]. responder003 has dice which are not counted for initiative due to die skills: [pG%(7)]. responder004 has dice which are not counted for initiative due to die skills: [g(4)].'));\r\n+        $expData['gameActionLogCount'] = 4;\r\n+        $expData['gameState'] = \"START_TURN\";\r\n+        $expData['playerDataArray'][0]['activeDieArray'][0]['value'] = 2;\r\n+        $expData['playerDataArray'][0]['activeDieArray'][1]['value'] = 3;\r\n+        $expData['playerDataArray'][0]['activeDieArray'][2]['value'] = 14;\r\n+        $expData['playerDataArray'][0]['activeDieArray'][3]['description'] = \"Shadow Berserk S Swing Die (with 6 sides)\";\r\n+        $expData['playerDataArray'][0]['activeDieArray'][3]['sides'] = 6;\r\n+        $expData['playerDataArray'][0]['activeDieArray'][3]['value'] = 3;\r\n+        $expData['playerDataArray'][0]['activeDieArray'][4]['description'] = \"Shadow Radioactive S Swing Die (with 6 sides)\";\r\n+        $expData['playerDataArray'][0]['activeDieArray'][4]['sides'] = 6;\r\n+        $expData['playerDataArray'][0]['activeDieArray'][4]['value'] = 5;\r\n+        $expData['playerDataArray'][0]['roundScore'] = 2.5;\r\n+        $expData['playerDataArray'][0]['sideScore'] = -13.7;\r\n+        $expData['playerDataArray'][0]['waitingOnAction'] = false;\r\n+        $expData['playerDataArray'][1]['activeDieArray'][0]['value'] = 4;\r\n+        $expData['playerDataArray'][1]['activeDieArray'][1]['value'] = 1;\r\n+        $expData['playerDataArray'][1]['activeDieArray'][2]['value'] = 6;\r\n+        $expData['playerDataArray'][1]['activeDieArray'][3]['description'] = \"W Swing Die (with 7 sides)\";\r\n+        $expData['playerDataArray'][1]['activeDieArray'][3]['sides'] = 7;\r\n+        $expData['playerDataArray'][1]['activeDieArray'][3]['value'] = 2;\r\n+        $expData['playerDataArray'][1]['activeDieArray'][4]['description'] = \"X Swing Die (with 17 sides)\";\r\n+        $expData['playerDataArray'][1]['activeDieArray'][4]['sides'] = 17;\r\n+        $expData['playerDataArray'][1]['activeDieArray'][4]['value'] = 8;\r\n+        $expData['playerDataArray'][1]['roundScore'] = 23;\r\n+        $expData['playerDataArray'][1]['sideScore'] = 13.7;\r\n+        $expData['playerDataArray'][1]['waitingOnAction'] = true;\r\n+        $expData['playerWithInitiativeIdx'] = 1;\r\n+        $expData['validAttackTypeArray'] = array(\"Power\", \"Skill\");\r\n+\r\n+        $retval = $this->verify_api_loadGameData($expData, $gameId, 10);\r\n+\r\n+        // BUG: this attack should cause the (X=17):8 to split\r\n+        $_SESSION = $this->mock_test_user_login('responder004');\r\n+        $this->verify_api_submitTurn(\r\n+            array(8, 7, 4),\r\n+            'responder004 performed Power attack using [(X=17):8] against [pG%(7):3]; Defender pG%(7) was captured; Defender p%(7):7 was added; Attacker (X=17) rerolled 8 => 8. responder004\\'s idle ornery dice rerolled at end of turn: o(10) rerolled 6 => 4. ',\r\n+            $retval, array(array(1, 4), array(0, 1)),\r\n+            $gameId, 1, 'Power', 1, 0, '');\r\n+        $_SESSION = $this->mock_test_user_login('responder003');\r\n+\r\n+        $expData['activePlayerIdx'] = 0;\r\n+        array_unshift($expData['gameActionLog'], array('timestamp' => 'TIMESTAMP', 'player' => 'responder004', 'message' => 'responder004 performed Power attack using [(X=17):8] against [pG%(7):3]; Defender pG%(7) was captured; Defender p%(7):7 was added; Attacker (X=17) rerolled 8 => 8'));\r\n+        array_unshift($expData['gameActionLog'], array('timestamp' => 'TIMESTAMP', 'player' => 'responder004', 'message' => 'responder004\\'s idle ornery dice rerolled at end of turn: o(10) rerolled 6 => 4'));\r\n+        $expData['gameActionLogCount'] = 6;\r\n+        $expData['playerDataArray'][0]['activeDieArray'][1]['description'] = \"Poison Radioactive 7-sided die\";\r\n+        $expData['playerDataArray'][0]['activeDieArray'][1]['properties'] = array(\"IsRageTargetReplacement\");\r\n+        $expData['playerDataArray'][0]['activeDieArray'][1]['recipe'] = \"p%(7)\";\r\n+        $expData['playerDataArray'][0]['activeDieArray'][1]['skills'] = array(\"Poison\", \"Radioactive\");\r\n+        $expData['playerDataArray'][0]['activeDieArray'][1]['value'] = 7;\r\n+        $expData['playerDataArray'][0]['sideScore'] = -11.3;\r\n+        $expData['playerDataArray'][0]['waitingOnAction'] = true;\r\n+        $expData['playerDataArray'][1]['activeDieArray'][2]['properties'] = array(\"HasJustRerolledOrnery\");\r\n+        $expData['playerDataArray'][1]['activeDieArray'][2]['value'] = 4;\r\n+        $expData['playerDataArray'][1]['capturedDieArray'][0]['properties'] = array(\"WasJustCaptured\");\r\n+        $expData['playerDataArray'][1]['capturedDieArray'][0]['recipe'] = \"pG%(7)\";\r\n+        $expData['playerDataArray'][1]['capturedDieArray'][0]['sides'] = 7;\r\n+        $expData['playerDataArray'][1]['capturedDieArray'][0]['value'] = 3;\r\n+        $expData['playerDataArray'][1]['roundScore'] = 19.5;\r\n+        $expData['playerDataArray'][1]['sideScore'] = 11.3;\r\n+        $expData['playerDataArray'][1]['waitingOnAction'] = false;\r\n+        $expData['validAttackTypeArray'] = array(\"Power\", \"Skill\", \"Berserk\", \"Shadow\");\r\n+\r\n+        $retval = $this->verify_api_loadGameData($expData, $gameId, 10);\r\n+    }\r\n }\r\n```"}}