Skip to content
Permalink
Browse files

feat: BCDiceをRuby→JavaScriptに変換したコードの更新

Opal v0.10.5 -> v0.11.4
  • Loading branch information...
TK11235 committed Feb 28, 2019
1 parent bf73a38 commit 844c6e2a1ea9c5b920661107a885faeae8e44eb0
Showing with 34,512 additions and 26,928 deletions.
  1. +12,513 −9,602 src/assets/cgiDiceBot.js
  2. +103 −86 src/assets/dicebot/AceKillerGene.js
  3. +79 −71 src/assets/dicebot/Airgetlamh.js
  4. +88 −79 src/assets/dicebot/Alsetto.js
  5. +90 −86 src/assets/dicebot/Alshard.js
  6. +130 −94 src/assets/dicebot/Alter_raise.js
  7. +96 −84 src/assets/dicebot/Amadeus.js
  8. +96 −84 src/assets/dicebot/Amadeus_Korean.js
  9. +46 −44 src/assets/dicebot/Arianrhod.js
  10. +122 −101 src/assets/dicebot/ArsMagica.js
  11. +74 −68 src/assets/dicebot/Avandner.js
  12. +140 −110 src/assets/dicebot/BadLife.js
  13. +152 −126 src/assets/dicebot/BarnaKronika.js
  14. +223 −179 src/assets/dicebot/BattleTech.js
  15. +132 −114 src/assets/dicebot/BeastBindTrinity.js
  16. +493 −279 src/assets/dicebot/BeginningIdol.js
  17. +480 −274 src/assets/dicebot/BeginningIdol_Korean.js
  18. +82 −65 src/assets/dicebot/BladeOfArcana.js
  19. +192 −168 src/assets/dicebot/BlindMythos.js
  20. +145 −101 src/assets/dicebot/BloodCrusade.js
  21. +142 −100 src/assets/dicebot/BloodMoon.js
  22. +76 −65 src/assets/dicebot/CardRanker.js
  23. +54 −42 src/assets/dicebot/ChaosFlare.js
  24. +79 −66 src/assets/dicebot/Chill.js
  25. +35 −30 src/assets/dicebot/Chill3.js
  26. +75 −66 src/assets/dicebot/CodeLayerd.js
  27. +145 −132 src/assets/dicebot/ColossalHunter.js
  28. +49 −43 src/assets/dicebot/CrashWorld.js
  29. +113 −89 src/assets/dicebot/Cthulhu.js
  30. +237 −180 src/assets/dicebot/Cthulhu7th.js
  31. +237 −180 src/assets/dicebot/Cthulhu7th_ChineseTraditional.js
  32. +237 −180 src/assets/dicebot/Cthulhu7th_Korean.js
  33. +112 −91 src/assets/dicebot/CthulhuTech.js
  34. +113 −89 src/assets/dicebot/Cthulhu_ChineseTraditional.js
  35. +113 −89 src/assets/dicebot/Cthulhu_Korean.js
  36. +135 −120 src/assets/dicebot/DarkBlaze.js
  37. +81 −69 src/assets/dicebot/DarkDaysDrive.js
  38. +78 −70 src/assets/dicebot/DarkSouls.js
  39. +214 −167 src/assets/dicebot/DeadlineHeroes.js
  40. +85 −68 src/assets/dicebot/DemonParasite.js
  41. +146 −117 src/assets/dicebot/DetatokoSaga.js
  42. +146 −117 src/assets/dicebot/DetatokoSaga_Korean.js
  43. +368 −348 src/assets/dicebot/DiceBot.js
  44. +51 −34 src/assets/dicebot/DiceBotLoader.js
  45. +69 −50 src/assets/dicebot/DiceBotLoaderList.js
  46. +64 −56 src/assets/dicebot/DiceOfTheDead.js
  47. +151 −134 src/assets/dicebot/DoubleCross.js
  48. +301 −251 src/assets/dicebot/Dracurouge.js
  49. +160 −141 src/assets/dicebot/Dracurouge_Korean.js
  50. +29 −38 src/assets/dicebot/DungeonsAndDoragons.js
  51. +125 −107 src/assets/dicebot/EarthDawn.js
  52. +273 −235 src/assets/dicebot/EarthDawn3.js
  53. +284 −244 src/assets/dicebot/EarthDawn4.js
  54. +42 −38 src/assets/dicebot/EclipsePhase.js
  55. +31 −29 src/assets/dicebot/Elric.js
  56. +315 −227 src/assets/dicebot/Elysion.js
  57. +126 −112 src/assets/dicebot/EmbryoMachine.js
  58. +77 −63 src/assets/dicebot/EndBreaker.js
  59. +90 −86 src/assets/dicebot/EtrianOdysseySRS.js
  60. +397 −211 src/assets/dicebot/FilledWith.js
  61. +125 −120 src/assets/dicebot/FullMetalPanic.js
  62. +195 −137 src/assets/dicebot/Garako.js
  63. +74 −63 src/assets/dicebot/GardenOrder.js
  64. +89 −84 src/assets/dicebot/GehennaAn.js
  65. +67 −61 src/assets/dicebot/GeishaGirlwithKatana.js
  66. +58 −49 src/assets/dicebot/GoldenSkyStories.js
  67. +50 −47 src/assets/dicebot/Gorilla.js
  68. +100 −71 src/assets/dicebot/GranCrest.js
  69. +40 −43 src/assets/dicebot/Gundog.js
  70. +143 −120 src/assets/dicebot/GundogRevised.js
  71. +115 −94 src/assets/dicebot/GundogZero.js
  72. +137 −114 src/assets/dicebot/Gurps.js
  73. +386 −223 src/assets/dicebot/GurpsFW.js
  74. +119 −94 src/assets/dicebot/HarnMaster.js
  75. +116 −98 src/assets/dicebot/HatsuneMiku.js
  76. +33 −29 src/assets/dicebot/Hieizan.js
  77. +145 −120 src/assets/dicebot/HouraiGakuen.js
  78. +177 −125 src/assets/dicebot/HuntersMoon.js
  79. +59 −55 src/assets/dicebot/Illusio.js
  80. +39 −37 src/assets/dicebot/InfiniteFantasia.js
  81. +298 −196 src/assets/dicebot/Insane.js
  82. +298 −196 src/assets/dicebot/Insane_Korean.js
  83. +39 −38 src/assets/dicebot/IthaWenUa.js
  84. +32 −30 src/assets/dicebot/JamesBond.js
  85. +105 −83 src/assets/dicebot/Kamigakari.js
  86. +118 −90 src/assets/dicebot/Kamigakari_Korean.js
  87. +365 −237 src/assets/dicebot/KanColle.js
  88. +333 −206 src/assets/dicebot/KillDeathBusiness.js
  89. +330 −207 src/assets/dicebot/KillDeathBusiness_Korean.js
  90. +42 −40 src/assets/dicebot/KurayamiCrying.js
  91. +97 −55 src/assets/dicebot/LiveraDoll.js
  92. +325 −256 src/assets/dicebot/LogHorizon.js
  93. +325 −256 src/assets/dicebot/LogHorizon_Korean.js
  94. +170 −137 src/assets/dicebot/LostRoyal.js
  95. +352 −243 src/assets/dicebot/MagicaLogia.js
  96. +205 −145 src/assets/dicebot/MeikyuDays.js
  97. +720 −533 src/assets/dicebot/MeikyuKingdom.js
  98. +127 −110 src/assets/dicebot/MetalHead.js
  99. +351 −216 src/assets/dicebot/MetalHeadExtream.js
  100. +90 −86 src/assets/dicebot/MetallicGuadian.js
  101. +128 −95 src/assets/dicebot/MonotoneMusium.js
  102. +100 −79 src/assets/dicebot/MonotoneMusium_Korean.js
  103. +100 −88 src/assets/dicebot/Nechronica.js
  104. +100 −88 src/assets/dicebot/Nechronica_Korean.js
  105. +124 −116 src/assets/dicebot/NightWizard.js
  106. +154 −144 src/assets/dicebot/NightWizard3rd.js
  107. +72 −63 src/assets/dicebot/NightmareHunterDeep.js
  108. +47 −42 src/assets/dicebot/NjslyrBattle.js
  109. +42 −40 src/assets/dicebot/Nuekagami.js
  110. +189 −167 src/assets/dicebot/OneWayHeroics.js
  111. +56 −51 src/assets/dicebot/OrgaRain.js
  112. +42 −35 src/assets/dicebot/Oukahoushin3rd.js
  113. +53 −49 src/assets/dicebot/Paranoia.js
  114. +136 −113 src/assets/dicebot/ParasiteBlood.js
  115. +59 −67 src/assets/dicebot/Pathfinder.js
  116. +103 −77 src/assets/dicebot/Peekaboo.js
  117. +31 −27 src/assets/dicebot/Pendragon.js
  118. +59 −55 src/assets/dicebot/PhantasmAdventure.js
  119. +95 −80 src/assets/dicebot/Postman.js
  120. +113 −98 src/assets/dicebot/Raisondetre.js
  121. +103 −93 src/assets/dicebot/RecordOfSteam.js
  122. +80 −75 src/assets/dicebot/RokumonSekai2.js
  123. +31 −30 src/assets/dicebot/RoleMaster.js
  124. +32 −30 src/assets/dicebot/RuneQuest.js
  125. +118 −109 src/assets/dicebot/Ryutama.js
  126. +53 −51 src/assets/dicebot/SRS.js
  127. +300 −188 src/assets/dicebot/Satasupe.js
  128. +168 −158 src/assets/dicebot/SevenFortressMobius.js
  129. +31 −30 src/assets/dicebot/ShadowRun.js
  130. +47 −44 src/assets/dicebot/ShadowRun4.js
  131. +56 −54 src/assets/dicebot/SharedFantasia.js
  132. +64 −58 src/assets/dicebot/ShinMegamiTenseiKakuseihen.js
  133. +210 −176 src/assets/dicebot/ShinkuuGakuen.js
  134. +168 −106 src/assets/dicebot/ShinobiGami.js
  135. +55 −53 src/assets/dicebot/ShoujoTenrankai.js
  136. +173 −142 src/assets/dicebot/Skynauts.js
  137. +75 −66 src/assets/dicebot/StellarKnights.js
  138. +80 −73 src/assets/dicebot/StrangerOfSwordCity.js
  139. +95 −76 src/assets/dicebot/Strave.js
  140. +213 −180 src/assets/dicebot/SwordWorld.js
  141. +353 −298 src/assets/dicebot/SwordWorld2_0.js
  142. +437 −371 src/assets/dicebot/SwordWorld2_5.js
  143. +66 −60 src/assets/dicebot/TherapieSein.js
  144. +47 −43 src/assets/dicebot/TokumeiTenkousei.js
  145. +29 −29 src/assets/dicebot/TokyoNova.js
  146. +174 −138 src/assets/dicebot/Torg.js
  147. +225 −179 src/assets/dicebot/Torg1_5.js
  148. +154 −133 src/assets/dicebot/TunnelsAndTrolls.js
  149. +229 −152 src/assets/dicebot/TwilightGunsmoke.js
  150. +115 −96 src/assets/dicebot/Utakaze.js
  151. +32 −29 src/assets/dicebot/WARPS.js
  152. +38 −37 src/assets/dicebot/WaresBlade.js
  153. +115 −86 src/assets/dicebot/Warhammer.js
  154. +89 −75 src/assets/dicebot/WitchQuest.js
  155. +90 −74 src/assets/dicebot/WorldOfDarkness.js
  156. +78 −68 src/assets/dicebot/YankeeYogSothoth.js
  157. +101 −92 src/assets/dicebot/ZettaiReido.js
  158. +59 −63 src/assets/dicebot/_Template.js
  159. +6 −6 src/assets/dicebot/test.js

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,4 +1,4 @@
/* Generated by Opal 0.10.5 */
/* Generated by Opal 0.11.4 */
(function(Opal) {
function $rb_gt(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs);
@@ -12,117 +12,125 @@
function $rb_times(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs);
}
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $gvars = Opal.gvars;
var self = Opal.top, $nesting = [], nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars;

Opal.add_stubs(['$setPrefixes', '$===', '$to_i', '$==', '$>', '$checkRoll', '$roll', '$collect', '$split', '$count', '$<=', '$+', '$empty?', '$!=', '$*']);
return (function($base, $super) {
return (function($base, $super, $parent_nesting) {
function $Airgetlamh(){};
var self = $Airgetlamh = $klass($base, $super, 'Airgetlamh', $Airgetlamh);

var def = self.$$proto, $scope = self.$$scope, TMP_1, TMP_2, TMP_3, TMP_4, TMP_5, TMP_9;
var def = self.$$proto, $nesting = [self].concat($parent_nesting), TMP_Airgetlamh_initialize_1, TMP_Airgetlamh_gameName_2, TMP_Airgetlamh_gameType_3, TMP_Airgetlamh_getHelpMessage_4, TMP_Airgetlamh_rollDiceCommand_5, TMP_Airgetlamh_checkRoll_9;

def.sortType = nil;
Opal.defn(self, '$initialize', TMP_1 = function $$initialize() {
var $a, $b, self = this, $iter = TMP_1.$$p, $yield = $iter || nil, $zuper = nil, $zuper_index = nil, $zuper_length = nil;

TMP_1.$$p = null;
$zuper = [];

for($zuper_index = 0; $zuper_index < arguments.length; $zuper_index++) {
$zuper[$zuper_index] = arguments[$zuper_index];


Opal.defn(self, '$initialize', TMP_Airgetlamh_initialize_1 = function $$initialize() {
var self = this, $iter = TMP_Airgetlamh_initialize_1.$$p, $yield = $iter || nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;

if ($iter) TMP_Airgetlamh_initialize_1.$$p = null;
// Prepare super implicit arguments
for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
$zuper[$zuper_i] = arguments[$zuper_i];
}
($a = ($b = self, Opal.find_super_dispatcher(self, 'initialize', TMP_1, false)), $a.$$p = $iter, $a).apply($b, $zuper);
return self.sortType = 1;
}, TMP_1.$$arity = 0);


$send(self, Opal.find_super_dispatcher(self, 'initialize', TMP_Airgetlamh_initialize_1, false), $zuper, $iter);
return (self.sortType = 1);
}, TMP_Airgetlamh_initialize_1.$$arity = 0);
self.$setPrefixes([["(\\d+)?A(A|L)(\\d+)?((x|\\*)(\\d+)(\\+(\\d+))?)?(C(\\d+))?"]]);

Opal.defn(self, '$gameName', TMP_2 = function $$gameName() {
Opal.defn(self, '$gameName', TMP_Airgetlamh_gameName_2 = function $$gameName() {
var self = this;

return "朱の孤塔のエアゲトラム";
}, TMP_2.$$arity = 0);

Opal.defn(self, '$gameType', TMP_3 = function $$gameType() {
return "朱の孤塔のエアゲトラム"
}, TMP_Airgetlamh_gameName_2.$$arity = 0);
Opal.defn(self, '$gameType', TMP_Airgetlamh_gameType_3 = function $$gameType() {
var self = this;

return "Airgetlamh";
}, TMP_3.$$arity = 0);

Opal.defn(self, '$getHelpMessage', TMP_4 = function $$getHelpMessage() {
return "Airgetlamh"
}, TMP_Airgetlamh_gameType_3.$$arity = 0);
Opal.defn(self, '$getHelpMessage', TMP_Airgetlamh_getHelpMessage_4 = function $$getHelpMessage() {
var self = this;

return "【Reg2.0『THE ANSWERER』~】\n・調査判定(成功数を表示):[n]AA[m]\n・命中判定(ダメージ表示):[n]AA[m]*p[+t][Cx]\n【~Reg1.1『昇華』】\n・調査判定(成功数を表示):[n]AL[m]\n・命中判定(ダメージ表示):[n]AL[m]*p\n----------------------------------------\n[]内のコマンドは省略可能。\n\n「n」でダイス数(攻撃回数)を指定。省略時は「2」。\n「m」で目標値を指定。省略時は「6」。\n「p」で威力を指定。「*」は「x」で代用可。\n「+t」でクリティカルトリガーを指定。省略可。\n「Cx」でクリティカル値を指定。省略時は「1」、最大値は「3」、「0」でクリティカル無し。\n\n攻撃力指定で命中判定となり、成功数ではなく、ダメージを結果表示します。\nクリティカルヒットの分だけ、自動で振り足し処理を行います。\n(ALコマンドではクリティカル処理を行いません)\n\n【書式例】\n・AL → 2d10で目標値6の調査判定。\n・5AA7*12 → 5d10で目標値7、威力12の命中判定。\n・AA7x28+5 → 2d10で目標値7、威力28、クリティカルトリガー5の命中判定。\n・9aa5*10C2 → 9d10で目標値5、威力10、クリティカル値2の命中判定。\n・15AAx4c0 → 15d10で目標値6、威力4、クリティカル無しの命中判定。\n";
}, TMP_4.$$arity = 0);

Opal.defn(self, '$rollDiceCommand', TMP_5 = function $$rollDiceCommand(command) {
return "" + "【Reg2.0『THE ANSWERER』~】\n" + "・調査判定(成功数を表示):[n]AA[m]\n" + "・命中判定(ダメージ表示):[n]AA[m]*p[+t][Cx]\n" + "【~Reg1.1『昇華』】\n" + "・調査判定(成功数を表示):[n]AL[m]\n" + "・命中判定(ダメージ表示):[n]AL[m]*p\n" + "----------------------------------------\n" + "[]内のコマンドは省略可能。\n" + "\n" + "「n」でダイス数(攻撃回数)を指定。省略時は「2」。\n" + "「m」で目標値を指定。省略時は「6」。\n" + "「p」で威力を指定。「*」は「x」で代用可。\n" + "「+t」でクリティカルトリガーを指定。省略可。\n" + "「Cx」でクリティカル値を指定。省略時は「1」、最大値は「3」、「0」でクリティカル無し。\n" + "\n" + "攻撃力指定で命中判定となり、成功数ではなく、ダメージを結果表示します。\n" + "クリティカルヒットの分だけ、自動で振り足し処理を行います。\n" + "(ALコマンドではクリティカル処理を行いません)\n" + "\n" + "【書式例】\n" + "・AL → 2d10で目標値6の調査判定。\n" + "・5AA7*12 → 5d10で目標値7、威力12の命中判定。\n" + "・AA7x28+5 → 2d10で目標値7、威力28、クリティカルトリガー5の命中判定。\n" + "・9aa5*10C2 → 9d10で目標値5、威力10、クリティカル値2の命中判定。\n" + "・15AAx4c0 → 15d10で目標値6、威力4、クリティカル無しの命中判定。\n"
}, TMP_Airgetlamh_getHelpMessage_4.$$arity = 0);
Opal.defn(self, '$rollDiceCommand', TMP_Airgetlamh_rollDiceCommand_5 = function $$rollDiceCommand(command) {
var $a, $b, self = this, diceCount = nil, target = nil, damage = nil, criticalTrigger = nil, criticalNumber = nil;

if ((($a = /(\d+)?A(A|L)(\d+)?((x|\*)(\d+)(\+(\d+))?)?(C(\d+))?$/i['$==='](command)) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
diceCount = (((($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))) !== false && $a !== nil && $a != null) ? $a : 2)).$to_i();
target = (((($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](3))) !== false && $a !== nil && $a != null) ? $a : 6)).$to_i();
damage = (((($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](6))) !== false && $a !== nil && $a != null) ? $a : 0)).$to_i();
if ((($a = ((($b = $gvars['~']) === nil ? nil : $b['$[]'](2))['$==']("L"))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {

if ($truthy(/(\d+)?A(A|L)(\d+)?((x|\*)(\d+)(\+(\d+))?)?(C(\d+))?$/i['$==='](command))) {

diceCount = ($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))) ? $a : 2).$to_i();
target = ($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](3))) ? $a : 6).$to_i();
damage = ($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](6))) ? $a : 0).$to_i();
if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))['$==']("L"))) {

criticalTrigger = 0;
criticalNumber = 0;
} else {
criticalTrigger = (((($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](8))) !== false && $a !== nil && $a != null) ? $a : 0)).$to_i();
criticalNumber = (((($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](10))) !== false && $a !== nil && $a != null) ? $a : 1)).$to_i();

criticalTrigger = ($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](8))) ? $a : 0).$to_i();
criticalNumber = ($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](10))) ? $a : 1).$to_i();
};
if ((($a = ($rb_gt(criticalNumber, 4))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
if ($truthy($rb_gt(criticalNumber, 4))) {
criticalNumber = 3};
return self.$checkRoll(diceCount, target, damage, criticalTrigger, criticalNumber);};
return nil;
}, TMP_5.$$arity = 1);

return (Opal.defn(self, '$checkRoll', TMP_9 = function $$checkRoll(diceCount, target, damage, criticalTrigger, criticalNumber) {
var $a, $b, $c, TMP_6, $d, TMP_7, $e, TMP_8, self = this, totalSuccessCount = nil, totalCriticalCount = nil, text = nil, rollCount = nil, dice = nil, diceText = nil, diceArray = nil, successCount = nil, criticalCount = nil, result = nil, isDamage = nil, totalDamage = nil;
}, TMP_Airgetlamh_rollDiceCommand_5.$$arity = 1);
return (Opal.defn(self, '$checkRoll', TMP_Airgetlamh_checkRoll_9 = function $$checkRoll(diceCount, target, damage, criticalTrigger, criticalNumber) {
var $a, $b, $c, TMP_6, TMP_7, TMP_8, self = this, totalSuccessCount = nil, totalCriticalCount = nil, text = nil, rollCount = nil, dice = nil, diceText = nil, diceArray = nil, successCount = nil, criticalCount = nil, result = nil, isDamage = nil, totalDamage = nil;


totalSuccessCount = 0;
totalCriticalCount = 0;
text = "";
rollCount = diceCount;
while ((($b = $rb_gt(rollCount, 0)) !== nil && $b != null && (!$b.$$is_boolean || $b == true))) {
$c = self.$roll(rollCount, 10, self.sortType), $b = Opal.to_ary($c), dice = ($b[0] == null ? nil : $b[0]), diceText = ($b[1] == null ? nil : $b[1]), $c;
diceArray = ($b = ($c = diceText.$split(/,/)).$collect, $b.$$p = (TMP_6 = function(i){var self = TMP_6.$$s || this;
while ($truthy($rb_gt(rollCount, 0))) {

$c = self.$roll(rollCount, 10, self.sortType), $b = Opal.to_ary($c), (dice = ($b[0] == null ? nil : $b[0])), (diceText = ($b[1] == null ? nil : $b[1])), $c;
diceArray = $send(diceText.$split(/,/), 'collect', [], (TMP_6 = function(i){var self = TMP_6.$$s || this;
if (i == null) i = nil;
return i.$to_i()}, TMP_6.$$s = self, TMP_6.$$arity = 1, TMP_6), $b).call($c);
successCount = ($b = ($d = diceArray).$count, $b.$$p = (TMP_7 = function(i){var self = TMP_7.$$s || this;
return i.$to_i()}, TMP_6.$$s = self, TMP_6.$$arity = 1, TMP_6));
successCount = $send(diceArray, 'count', [], (TMP_7 = function(i){var self = TMP_7.$$s || this;
if (i == null) i = nil;
return $rb_le(i, target)}, TMP_7.$$s = self, TMP_7.$$arity = 1, TMP_7), $b).call($d);
criticalCount = ($b = ($e = diceArray).$count, $b.$$p = (TMP_8 = function(i){var self = TMP_8.$$s || this;
return $rb_le(i, target)}, TMP_7.$$s = self, TMP_7.$$arity = 1, TMP_7));
criticalCount = $send(diceArray, 'count', [], (TMP_8 = function(i){var self = TMP_8.$$s || this;
if (i == null) i = nil;
return $rb_le(i, criticalNumber)}, TMP_8.$$s = self, TMP_8.$$arity = 1, TMP_8), $b).call($e);
totalSuccessCount = $rb_plus(totalSuccessCount, successCount);
totalCriticalCount = $rb_plus(totalCriticalCount, criticalCount);
if ((($b = (text['$empty?']())) !== nil && $b != null && (!$b.$$is_boolean || $b == true))) {
} else {
text = $rb_plus(text, "+")
return $rb_le(i, criticalNumber)}, TMP_8.$$s = self, TMP_8.$$arity = 1, TMP_8));
totalSuccessCount = $rb_plus(totalSuccessCount, successCount);
totalCriticalCount = $rb_plus(totalCriticalCount, criticalCount);
if ($truthy(text['$empty?']())) {
} else {
text = $rb_plus(text, "+")
};
text = $rb_plus(text, "" + (successCount) + "[" + (diceText) + "]");
rollCount = criticalCount;
};
text = $rb_plus(text, "" + (successCount) + "[" + (diceText) + "]");
rollCount = criticalCount;};
result = "";
isDamage = (damage['$!='](0));
if ((($a = (isDamage)) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
isDamage = damage['$!='](0);
if ($truthy(isDamage)) {

totalDamage = $rb_plus($rb_times(totalSuccessCount, damage), $rb_times(totalCriticalCount, criticalTrigger));
result = $rb_plus(result, "(" + (diceCount) + "D10<=" + (target) + ") > " + (text) + " > Hits:" + (totalSuccessCount) + "*" + (damage));
if ((($a = ($rb_gt(criticalTrigger, 0))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
result = $rb_plus(result, " + Trigger:" + (totalCriticalCount) + "*" + (criticalTrigger))};
result = $rb_plus(result, "" + (totalDamage) + "ダメージ");
result = $rb_plus(result, "" + "(" + (diceCount) + "D10<=" + (target) + ") > " + (text) + " > Hits:" + (totalSuccessCount) + "*" + (damage));
if ($truthy($rb_gt(criticalTrigger, 0))) {
result = $rb_plus(result, "" + " + Trigger:" + (totalCriticalCount) + "*" + (criticalTrigger))};
result = $rb_plus(result, "" + "" + (totalDamage) + "ダメージ");
} else {
result = $rb_plus(result, "(" + (diceCount) + "D10<=" + (target) + ") > " + (text) + " > 成功数:" + (totalSuccessCount))
result = $rb_plus(result, "" + "(" + (diceCount) + "D10<=" + (target) + ") > " + (text) + " > 成功数:" + (totalSuccessCount))
};
if ((($a = ($rb_gt(totalCriticalCount, 0))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
result = $rb_plus(result, " / " + (totalCriticalCount) + "クリティカル")};
if ($truthy($rb_gt(totalCriticalCount, 0))) {
result = $rb_plus(result, "" + " / " + (totalCriticalCount) + "クリティカル")};
return result;
}, TMP_9.$$arity = 5), nil) && 'checkRoll';
})($scope.base, $scope.get('DiceBot'))
}, TMP_Airgetlamh_checkRoll_9.$$arity = 5), nil) && 'checkRoll';
})($nesting[0], Opal.const_get_relative($nesting, 'DiceBot'), $nesting)
})(Opal);

/* Generated by Opal 0.10.5 */
/* Generated by Opal 0.11.4 */
(function(Opal) {
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice;
var self = Opal.top, $nesting = [], nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice;

Opal.add_stubs(['$exit']);
return $scope.get('Kernel').$exit()
return Opal.const_get_relative($nesting, 'Kernel').$exit()
})(Opal);
Oops, something went wrong.

0 comments on commit 844c6e2

Please sign in to comment.
You can’t perform that action at this time.