-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4486.db7e9ea980e417642eaf.js
More file actions
1 lines (1 loc) · 8.6 KB
/
4486.db7e9ea980e417642eaf.js
File metadata and controls
1 lines (1 loc) · 8.6 KB
1
(self.webpackChunkudonarium_lily_gk=self.webpackChunkudonarium_lily_gk||[]).push([[4486],{4486:function(ue,ie,ee){ee(4656),Opal.modules["bcdice/arithmetic_evaluator"]=function(r){var F,H,c,l,$,G,N,K,k=[],A=r.nil,_=r.$$$,M=r.$$,D=r.module,q=r.hash2,T=r.truthy;return F=k,H=K=[D(k[0],"BCDice")].concat(F),N=[G=D(K[0],"ArithmeticEvaluator")].concat(H),c=r.get_singleton_class(G),$=[c].concat(N),void r.def(c,"$eval",l=function(P,E){var w,z=A;if(null==E)E=q([],{});else if(!E.$$is_hash)throw r.ArgumentError.$new("expected kwargs");return null==(w=E.$$smap.round_type)&&(w=_(M($,"RoundType"),"FLOOR")),T(P)&&T(z=M($,"Arithmetic").$eval(P,w))?z:0},l.$$arity=-2)},function(r){function S($,l){return"number"==typeof $&&"number"==typeof l?$<=l:$["$<="](l)}function k($,l){return"number"==typeof $&&"number"==typeof l?$>l:$["$>"](l)}function A($,l){return"number"==typeof $&&"number"==typeof l?$+l:$["$+"](l)}function _($,l){return"number"==typeof $&&"number"==typeof l?$-l:$["$-"](l)}function D($,l){return"number"==typeof $&&"number"==typeof l?$*l:$["$*"](l)}function q($,l){return"number"==typeof $&&"number"==typeof l?$<l:$["$<"](l)}function T($,l){return"number"==typeof $&&"number"==typeof l?$>=l:$["$>="](l)}var l,w,ne,L,J,Q,U,V,W,n,a,g,h,i,s,p,y,z,P,F=[],e=r.nil,R=r.$$,H=r.module,G=r.klass,N=r.send2,c=r.truthy,f=r.send;r.top.$require("bcdice/arithmetic_evaluator"),l=F,w=P=[H(F[0],"BCDice")].concat(l),ne=z=[H(P[0],"GameSystem")].concat(w),p=G(z[0],R(z,"Base"),"Cthulhu"),y=[p].concat(ne),p.$$prototype.randomizer=p.$$prototype.locale=p.$$prototype.special_percentage=p.$$prototype.critical_percentage=p.$$prototype.fumble_percentage=e,r.const_set(y[0],"ID","Cthulhu"),r.const_set(y[0],"NAME","\u30af\u30c8\u30a5\u30eb\u30d5\u795e\u8a71TRPG"),r.const_set(y[0],"SORT_KEY","\u304f\u3068\u3046\u308b\u3075\u3057\u3093\u308fTRPG"),r.const_set(y[0],"HELP_MESSAGE","c=\u30af\u30ea\u30c6\u30a3\u30ab\u30eb\u5024 \uff0f f=\u30d5\u30a1\u30f3\u30d6\u30eb\u5024 \uff0f s=\u30b9\u30da\u30b7\u30e3\u30eb\n\n1d100<=n c\u30fbf\u30fbs\u3059\u3079\u3066\u30aa\u30d5\uff08\u5358\u7d14\u306a\u6570\u5024\u6bd4\u8f03\u5224\u5b9a\u306e\u307f\u884c\u3044\u307e\u3059\uff09\n\n\u30fbcfs\u5224\u5b9a\u4ed8\u304d\u5224\u5b9a\u30b3\u30de\u30f3\u30c9\n\nCC\t 1d100\u30ed\u30fc\u30eb\u3092\u884c\u3046 c=1\u3001f=100\nCCB \u540c\u4e0a\u3001c=5\u3001f=96\n\n\u4f8b\uff1aCC<=80 \uff08\u6280\u80fd\u502480\u3067\u884c\u70ba\u5224\u5b9a\u30021%\u30eb\u30fc\u30eb\u3067cf\u9069\u7528\uff09\n\u4f8b\uff1aCCB<=55 \uff08\u6280\u80fd\u502455\u3067\u884c\u70ba\u5224\u5b9a\u30025%\u30eb\u30fc\u30eb\u3067cf\u9069\u7528\uff09\n\n\u30fb\u7d44\u307f\u5408\u308f\u305b\u30ed\u30fc\u30eb\u306b\u3064\u3044\u3066\n\nCBR(x,y)\tc=1\u3001f=100\nCBRB(x,y)\tc=5\u3001f=96\n\n\u30fb\u62b5\u6297\u8868\u30ed\u30fc\u30eb\u306b\u3064\u3044\u3066\nRES(x-y)\tc=1\u3001f=100\nRESB(x-y)\tc=5\u3001f=96\n\n\u203b\u6545\u969c\u30ca\u30f3\u30d0\u30fc\u5224\u5b9a\n\n\u30fbCC(x) c=1\u3001f=100\nx=\u6545\u969c\u30ca\u30f3\u30d0\u30fc\u3002\u51fa\u76eex\u4ee5\u4e0a\u304c\u51fa\u305f\u4e0a\u3067\u3001\u30d5\u30a1\u30f3\u30d6\u30eb\u304c\u540c\u6642\u306b\u767a\u751f\u3057\u305f\u5834\u5408\u3001\u5171\u306b\u51fa\u529b\u3059\u308b\uff08\u30c6\u30ad\u30b9\u30c8\u300c\u30d5\u30a1\u30f3\u30d6\u30eb\uff06\u6545\u969c\u300d\uff09\n\u30d5\u30a1\u30f3\u30d6\u30eb\u3067\u306a\u3044\u5834\u5408\u3001\u6210\u529f\u30fb\u5931\u6557\u306b\u95a2\u308f\u3089\u305a\u30c6\u30ad\u30b9\u30c8\u300c\u6545\u969c\u300d\u306e\u307f\u3092\u51fa\u529b\u3059\u308b\uff08\u6210\u529f\u30fb\u5931\u6557\u3092\u51fa\u529b\u305b\u305a\u3001\u4e0a\u66f8\u304d\u3057\u305f\u3082\u306e\u3092\u51fa\u529b\u3059\u308b\u5f62\uff09\n\n\u30fbCCB(x) c=5\u3001f=96\n\u540c\u4e0a\n\n"),p.$register_prefix("CCB?","RESB?","CBRB?"),r.def(p,"$initialize",L=function(o){var s=this;return L.$$p&&(L.$$p=null),N(s,r.find_super_dispatcher(s,"initialize",L,!1,!0),"initialize",[o],null),s.special_percentage=20,s.critical_percentage=1,s.fumble_percentage=1},L.$$arity=1),r.def(p,"$eval_game_system_specific_command",J=function(o){var i,n=this;return/CCB/i["$==="](i=o)?(n.critical_percentage=5,n.fumble_percentage=5,n.$getCheckResult(o)):/CC/i["$==="](i)?(n.critical_percentage=1,n.fumble_percentage=1,n.$getCheckResult(o)):/RESB/i["$==="](i)?(n.critical_percentage=5,n.fumble_percentage=5,n.$getRegistResult(o)):/CBRB/i["$==="](i)?(n.critical_percentage=5,n.fumble_percentage=5,n.$getCombineRoll(o)):/RES/i["$==="](i)?(n.critical_percentage=1,n.fumble_percentage=1,n.$getRegistResult(o)):/CBR/i["$==="](i)?(n.critical_percentage=1,n.fumble_percentage=1,n.$getCombineRoll(o)):e},J.$$arity=1),p.$private(),r.def(p,"$getCheckResult",Q=function(o){var n,i=this,s=e,a=e,g=e,h=e,t=e,u=e;return s=/^CCB?(\d+)?(?:<=([+-\/*\d]+))?$/i.$match(o),c(s)?(a=s["$[]"](1).$to_i(),g=R(y,"ArithmeticEvaluator").$eval(s["$[]"](2)),c(S(g,0))?(h=i.randomizer.$roll_once(100),R(y,"Result").$new("(1D100) \uff1e "+h)):(t="(1D100<="+g+")",c(k(a,0))&&(t=A(t," "+i.$translate("Cthulhu.broken_number")+"["+a+"]")),h=i.randomizer.$roll_once(100),u=i.$compare(h,g,a),f(u.$to_result(),"tap",[],((n=function(v){var B;return null==v&&(v=e),B=[t+" \uff1e "+h+" \uff1e "+u.$text()],f(v,"text=",r.to_a(B)),B[_(B.length,1)]}).$$s=i,n.$$arity=1,n)))):e},Q.$$arity=1),n=y,i=G(y[0],null,"CompareResult"),s=[i].concat(n),i.$include(R(s,"Translate")),i.$attr_accessor("success","failure","critical","fumble","special","broken"),r.def(i,"$initialize",a=function(u){var C=this;return C.locale=u,C.success=!1,C.failure=!1,C.critical=!1,C.fumble=!1,C.special=!1,C.broke=!1},a.$$arity=1),r.def(i,"$text",g=function(){var C,u=this,v=e;return c(c(C=u.$critical())?u.$special():C)?u.$translate("Cthulhu.critical_special"):c(u.$critical())?u.$translate("Cthulhu.critical"):c(u.$special())?u.$translate("Cthulhu.special"):c(u.$success())?u.$translate("success"):c(c(v=u.$broken())?u.$fumble():v)?u.$translate("Cthulhu.fumble")+"/"+u.$translate("Cthulhu.broken"):c(u.$broken())?u.$translate("Cthulhu.broken"):c(u.$fumble())?u.$translate("Cthulhu.fumble"):c(u.$failure())?u.$translate("failure"):e},g.$$arity=0),r.def(i,"$to_result",h=function(){var u;return f(R(s,"Result").$new(),"tap",[],((u=function(d){var B=null==u.$$s?this:u.$$s,m=e;return null==d&&(d=e),m=[B.$success()],f(d,"success=",r.to_a(m)),_(m.length,1),m=[B.$failure()],f(d,"failure=",r.to_a(m)),_(m.length,1),m=[B.$critical()],f(d,"critical=",r.to_a(m)),_(m.length,1),m=[B.$fumble()],f(d,"fumble=",r.to_a(m)),m[_(m.length,1)]}).$$s=this,u.$$arity=1,u))},h.$$arity=0),r.def(p,"$compare",U=function(o,n,i){var a,g,h,u,$,s=this,t=e;return null==i&&(i=0),a=R(y,"CompareResult").$new(s.locale),g=($=D(n,s.special_percentage),"number"==typeof $?$/100:$["$/"](100)).$to_i().$clamp(1,100),c(c(h=S(o,n))?q(o,100):h)?(f(a,"success=",r.to_a(t=[!0])),_(t.length,1),t=[S(o,g)],f(a,"special=",r.to_a(t)),_(t.length,1),t=[S(o,s.critical_percentage)],f(a,"critical=",r.to_a(t)),_(t.length,1)):(f(a,"failure=",r.to_a(t=[!0])),_(t.length,1),t=[T(o,_(101,s.fumble_percentage))],f(a,"fumble=",r.to_a(t)),_(t.length,1)),c(c(u=k(i,0))?T(o,i):u)&&(f(a,"broken=",r.to_a(t=[!0])),_(t.length,1),f(a,"failure=",r.to_a(t=[!0])),_(t.length,1),f(a,"success=",r.to_a(t=[!1])),_(t.length,1),f(a,"special=",r.to_a(t=[!1])),_(t.length,1),f(a,"critical=",r.to_a(t=[!1])),_(t.length,1)),a},U.$$arity=-3),r.def(p,"$getRegistResult",V=function(o){var n,i=this,s=e,a=e,g=e,h=e,t=e;return s=/^RES(B)?([-\d]+)$/i.$match(o),c(s)?(a=s["$[]"](2).$to_i(),g=A(D(a,5),50),c(q(g,5))?R(y,"Result").$failure("(1d100<="+g+") \uff1e "+i.$translate("Cthulhu.automatic_failure")):c(k(g,95))?R(y,"Result").$success("(1d100<="+g+") \uff1e "+i.$translate("Cthulhu.automatic_success")):(h=i.randomizer.$roll_once(100),t=i.$compare(h,g),f(t.$to_result(),"tap",[],((n=function(C){var d;return null==C&&(C=e),d=["(1d100<="+g+") \uff1e "+h+" \uff1e "+t.$text()],f(C,"text=",r.to_a(d)),d[_(d.length,1)]}).$$s=i,n.$$arity=1,n)))):e},V.$$arity=1),r.def(p,"$getCombineRoll",W=function(o){var n,i=this,s=e,a=e,g=e,h=e,t=e,u=e,C=e,v=e,d=e;return s=/^CBR(B)?\((\d+),(\d+)\)$/i.$match(o),c(s)?(a=s["$[]"](2).$to_i(),g=s["$[]"](3).$to_i(),h=i.randomizer.$roll_once(100),t=i.$compare(h,a),u=i.$compare(h,g),C=c(c(v=t.$success())?u.$success():v)?i.$translate("success"):c(c(d=t.$success())?d:u.$success())?i.$translate("Cthulhu.partial_success"):i.$translate("failure"),f(R(y,"Result").$new(),"tap",[],((n=function(m){var X,Z,O,b=e;return null==m&&(m=e),b=["(1d100<="+a+","+g+") \uff1e "+h+"["+t.$text()+","+u.$text()+"] \uff1e "+C],f(m,"text=",r.to_a(b)),_(b.length,1),b=[c(X=t.$critical())?X:u.$critical()],f(m,"critical=",r.to_a(b)),_(b.length,1),b=[c(Z=t.$fumble())?Z:u.$fumble()],f(m,"fumble=",r.to_a(b)),_(b.length,1),b=[c(O=t.$success())?O:u.$success()],f(m,"condition=",r.to_a(b)),b[_(b.length,1)]}).$$s=i,n.$$arity=1,n))):e},W.$$arity=1)}(Opal)}}]);