-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4403.daecb7b8f25f59a9ca11.js
More file actions
1 lines (1 loc) · 15.6 KB
/
4403.daecb7b8f25f59a9ca11.js
File metadata and controls
1 lines (1 loc) · 15.6 KB
1
(self.webpackChunkudonarium_lily_gk=self.webpackChunkudonarium_lily_gk||[]).push([[4403],{4403:function(ne,se,re){re(4656),Opal.modules["bcdice/arithmetic_evaluator"]=function(s){var $,T,E,j,P,o,l,x,k=[],S=s.nil,G=s.$$$,V=s.$$,u=s.module,U=s.hash2,t=s.truthy;return $=k,T=x=[u(k[0],"BCDice")].concat($),l=[o=u(x[0],"ArithmeticEvaluator")].concat(T),E=s.get_singleton_class(o),P=[E].concat(l),void s.def(E,"$eval",j=function(q,M){var g,L=S;if(null==M)M=U([],{});else if(!M.$$is_hash)throw s.ArgumentError.$new("expected kwargs");return null==(g=M.$$smap.round_type)&&(g=G(V(P,"RoundType"),"FLOOR")),t(q)&&t(L=V(P,"Arithmetic").$eval(q,g))?L:0},j.$$arity=-2)},Opal.modules["bcdice/dice_table/range_table"]=function(s){var T,I,M,L,B,z,R,K,Y,J,Q,W,g,C,j,l,V=[],u=s.nil,t=s.$$,w=s.module,$=s.klass,X=s.send,x=s.truthy;return T=V,I=l=[w(V[0],"BCDice")].concat(T),M=j=[w(l[0],"DiceTable")].concat(I),g=$(j[0],null,"RangeTable"),C=[g].concat(M),g.$$prototype.name=g.$$prototype.items=g.$$prototype.num_of_dice=g.$$prototype.num_of_sides=g.$$prototype.formatter=u,s.const_set(C[0],"RollResult",X(t(C,"Struct"),"new",["sum","values","content","formatted"],((L=function(){return(null==L.$$s?this:L.$$s).$alias_method("to_s","formatted")}).$$s=g,L.$$arity=0,L))),s.const_set(C[0],"Item",t(C,"Struct").$new("range","content")),s.const_set(C[0],"DICE_ROLL_METHOD_RE",/^(\d+)D(\d+)$/i.$freeze()),s.const_set(C[0],"DEFAULT_FORMATTER",X(g,"lambda",[],($$2=function(y){function i(e,n){return y.apply(this,arguments)}return i.toString=function(){return y.toString()},i}(function(y,i){return null==$$2.$$s||$$2,null==y&&(y=u),null==i&&(i=u),y.$name()+"("+i.$sum()+") \uff1e "+i.$content()}),$$2.$$s=g,$$2.$$arity=2,$$2))),g.$attr_reader("name"),g.$attr_reader("num_of_dice"),g.$attr_reader("num_of_sides"),s.def(g,"$initialize",B=function(i,e,n){var v,a=B.$$p,c=a||u,r=this,h=u;return a&&(B.$$p=null),a&&(B.$$p=null),r.name=i.$freeze(),r.formatter=x(v=c)?v:t(C,"DEFAULT_FORMATTER"),h=t(C,"DICE_ROLL_METHOD_RE").$match(e),x(h)||r.$raise(t(C,"ArgumentError"),r.name+": invalid dice roll method: "+e),r.num_of_dice=h["$[]"](1).$to_i(),r.num_of_sides=h["$[]"](2).$to_i(),r.$store(n)},B.$$arity=3),s.def(g,"$fetch",z=function(i){var e,a,n=this;return a=X(n.items,"find",[],((e=function(r){return null==r&&(r=u),r.$range()["$include?"](i)}).$$s=n,e.$$arity=1,e)),x(a)||n.$raise(t(C,"RangeError"),n.name+": value is out of range: "+i),a},z.$$arity=1),s.def(g,"$roll",R=function(i){var a,c,r,d,e=this,n=u;return a=(n=i.$roll_barabara(e.num_of_dice,e.num_of_sides)).$sum(),c=t(C,"RollResult").$new(a,n,e.$fetch(a).$content()),r=[e.formatter["$[]"](e,c)],X(c,"formatted=",s.to_a(r)),"number"==typeof(d=r.length)||d["$-"](1),c},R.$$arity=1),g.$private(),s.def(g,"$store",K=function(i){var e,n,a,r,v,c=this;return r=X(i,"map",[],((e=function(D,f){return null==D&&(D=u),null==f&&(f=u),[(null==e.$$s?this:e.$$s).$coerce_to_int_range(D),f]}).$$s=c,e.$$arity=2,e)),v=X(r,"sort_by",[],((n=function(D,f){return null==D&&(D=u),null==f&&(f=u),D.$min()}).$$s=c,n.$$arity=2,n)),c.$assert_min_sum_is_covered(v),c.$assert_max_sum_is_covered(v),c.$assert_no_gap_or_overlap_in_ranges(v),c.items=X(v,"map",[],(a=function(D,f){return null==D&&(D=u),null==f&&(f=u),t(C,"Item").$new(D,f.$freeze()).$freeze()},a.$$s=c,a.$$arity=2,a)).$freeze(),c},K.$$arity=1),s.def(g,"$coerce_to_int_range",Y=function(i){var n,a=u;return n=i,t(C,"Integer")["$==="](n)?t(C,"Range").$new(i,i):t(C,"Range")["$==="](n)&&x(x(a=i.$begin()["$is_a?"](t(C,"Integer")))?i.$end()["$is_a?"](t(C,"Integer")):a)?i:this.$raise(t(C,"TypeError"),this.name+": "+i+" ("+i.$class()+") must be an Integer or a Range with Integers ")},Y.$$arity=1),s.def(g,"$assert_min_sum_is_covered",J=function(i){var n,e=this,a=u;return n=e.num_of_dice,a=i.$first()["$[]"](0),x(a["$include?"](n))||e.$raise(t(C,"RangeError"),e.name+": min value ("+n+") is not covered: "+a),e},J.$$arity=1),s.def(g,"$assert_max_sum_is_covered",Q=function(i){var n,e=this,a=u;return n=function(d,T){return"number"==typeof d&&"number"==typeof T?d*T:d["$*"](T)}(e.num_of_dice,e.num_of_sides),a=i.$last()["$[]"](0),x(a["$include?"](n))||e.$raise(t(C,"RangeError"),e.name+": max value ("+n+") is not covered: "+a),e},Q.$$arity=1),void s.def(g,"$assert_no_gap_or_overlap_in_ranges",W=function(i){var e;return X(i,"each_cons",[2],((e=function(c,r){var f,_,d,v=null==e.$$s?this:e.$$s,h=u,D=u;return null==v.name&&(v.name=u),null==c&&(c=u),null==r&&(r=u),h=c["$[]"](0),D=r["$[]"](0),_="number"==typeof(d=f=h.$max())?d+1:d["$+"](1),x(D["$include?"](f))&&v.$raise(t(C,"RangeError"),v.name+": Range overlap: "+h+" and "+D),x(D["$include?"](_))?u:v.$raise(t(C,"RangeError"),v.name+": Range gap: "+h+" and "+D)}).$$s=this,e.$$arity=2,e)),this},W.$$arity=1)},function(s){function F(E,I){return"number"==typeof E&&"number"==typeof I?E<I:E["$<"](I)}function k(E,I){return"number"==typeof E&&"number"==typeof I?E>I:E["$>"](I)}function S(E,I){return"number"==typeof E&&"number"==typeof I?E+I:E["$+"](I)}function G(E,I){return"number"==typeof E&&"number"==typeof I?E-I:E["$-"](I)}function V(E,I){return"number"==typeof E&&"number"==typeof I?E>=I:E["$>="](I)}var I,q,C,L,B,K,Y,J,Q,W,e,c,r,v,h,n,a,z,R,g,j,u=s.top,U=[],t=s.nil,w=s.$$$,$=s.$$,X=s.module,x=s.klass,d=s.truthy,T=s.send,o=s.hash2,l=s.range;u.$require("bcdice/arithmetic_evaluator"),u.$require("bcdice/dice_table/range_table"),I=U,q=j=[X(U[0],"BCDice")].concat(I),C=(g=[X(j[0],"GameSystem")].concat(q))[0],L=$(g,"Base"),B=g,z=x(C,L,"DoubleCross"),R=[z].concat(B),z.$$prototype.randomizer=t,s.const_set(R[0],"ID","DoubleCross"),s.const_set(R[0],"NAME","\u30c0\u30d6\u30eb\u30af\u30ed\u30b92nd,3rd"),s.const_set(R[0],"SORT_KEY","\u305f\u3075\u308b\u304f\u308d\u30592"),s.const_set(R[0],"HELP_MESSAGE",'\u30fb\u5224\u5b9a\u30b3\u30de\u30f3\u30c9\uff08xDX+y@c or xDXc+y\uff09\n\u3000"(\u500b\u6570)DX(\u4fee\u6b63)@(\u30af\u30ea\u30c6\u30a3\u30ab\u30eb\u5024)" \u3082\u3057\u304f\u306f "(\u500b\u6570)DX(\u30af\u30ea\u30c6\u30a3\u30ab\u30eb\u5024)(\u4fee\u6b63)" \u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\n\u3000\u4fee\u6b63\u5024\u3082\u4ed8\u3051\u3089\u308c\u307e\u3059\u3002\n\u3000\u4f8b\uff0910dx\u3000\u300010dx+5@8\uff08OD tool\u5f0f)\u3000\u30005DX7+7-3\uff08\u75be\u98a8\u6012\u6fe4\u5f0f\uff09\n\n\u30fb\u5404\u7a2e\u8868\n\u3000\u30fb\u611f\u60c5\u8868\uff08ET\uff09\n\u3000\u3000\u30dd\u30b8\u30c6\u30a3\u30d6\u3068\u30cd\u30ac\u30c6\u30a3\u30d6\u306e\u4e21\u65b9\u3092\u632f\u3063\u3066\u3001\u8868\u306b\u306a\u3063\u3066\u3044\u308b\u5074\u306b\u25cb\u3092\u4ed8\u3051\u3066\u8868\u793a\u3057\u307e\u3059\u3002\n\u3000\u3000\u3082\u3061\u308d\u3093\u4efb\u610f\u3067\u9078\u3076\u90e8\u5206\u306f\u5909\u66f4\u3057\u3066\u69cb\u3044\u307e\u305b\u3093\u3002\n\n\u30fbD66\u30c0\u30a4\u30b9\u3042\u308a\n'),z.$register_prefix("\\d+DX","ET"),e=R,n=x(R[0],null,"DX"),a=[n].concat(e),n.$$prototype.modifier=n.$$prototype.critical_value=n.$$prototype.expression=n.$$prototype.num=n.$$prototype.modifier_str=n.$$prototype.target_value=t,n.$include($(a,"Translate")),s.def(n,"$initialize",c=function(f,_,m,b){var p=this;return p.num=f,p.critical_value=_,p.modifier=m,p.target_value=b,p.modifier_str=$(a,"Format").$modifier(p.modifier),p.expression=p.$node_expression(),p.locale="ja_jp"},c.$$arity=4),s.def(n,"$execute",r=function(f){var m=this,b=t,p=t,A=t,Z=t,H=t,N=t;if(d(F(m.critical_value,2)))return $(a,"Result").$new("("+m.expression+") \uff1e "+m.$translate("DoubleCross.DX.invalid_critical"));if(d(F(m.num,1)))return $(a,"Result").$failure("("+m.expression+") \uff1e "+m.$translate("DoubleCross.DX.auto_failure"));for(b=[],p=m.num,A=0;d(d(Z=k(p,0))?F(A,w(w($(a,"CommonCommand"),"RerollDice"),"REROLL_LIMIT")):Z);)H=f.$roll_barabara(p,10),N=$(a,"ValueGroup").$new(H,m.critical_value),b.$push(N),p=N.$num_of_critical_occurrences(),A=S(A,1);return m.$result(b)},r.$$arity=1),n.$private(),s.def(n,"$node_expression",v=function(){var _,f=this;return _=f.num+"DX"+f.critical_value+f.modifier_str,d(f.target_value)?_+">="+f.target_value:_},v.$$arity=0),s.def(n,"$result",h=function(f){var p,Z,_=this,m=t,b=t,A=t,H=t,N=t,ee=t,te=t;return m=$(a,"Result").$new(),b=[f["$[]"](0).$values()["$all?"](1)],T(m,"fumble=",s.to_a(b)),G(b.length,1),p=T(f,"map",[],"max".$to_proc()).$sum(),A=d(m["$fumble?"]())?0:S(p,_.modifier),Z=d(m["$fumble?"]())?A+" ("+_.$translate("fumble")+")":A.$to_s(),b=[k(f.$length(),1)],T(m,"critical=",s.to_a(b)),G(b.length,1),H=["("+_.expression+")",""+f.$join("+")+_.modifier_str,Z],d(_.target_value)&&(N=d(ee=m["$fumble?"]()["$!"]())?V(A,_.target_value):ee,d(N)?(T(m,"success=",s.to_a(b=[!0])),G(b.length,1)):(T(m,"failure=",s.to_a(b=[!0])),G(b.length,1)),te=_.$translate(d(N)?"success":"failure"),H.$push(te)),b=[H.$join(" \uff1e ")],T(m,"text=",s.to_a(b)),G(b.length,1),m},h.$$arity=1),function(y,i,e){var c,r,v,h,D,n=x(y,null,"ValueGroup");[n].concat(e),n.$$prototype.values=n.$$prototype.critical_value=t,n.$attr_reader("values"),n.$attr_reader("critical_value"),s.def(n,"$initialize",c=function(_,m){return this.values=_.$sort(),this.critical_value=m},c.$$arity=2),s.def(n,"$to_s",r=function(){return this.$max()+"["+this.values.$join(",")+"]"},r.$$arity=0),s.def(n,"$max",v=function(){var _,m=this;return d(T(m.values,"any?",[],((_=function(p){return null==p&&(p=t),(null==_.$$s?this:_.$$s)["$critical?"](p)}).$$s=m,_.$$arity=1,_)))?10:m.values.$max()},v.$$arity=0),s.def(n,"$num_of_critical_occurrences",h=function(){var _;return T(this.values,"count",[],((_=function(p){return null==p&&(p=t),(null==_.$$s?this:_.$$s)["$critical?"](p)}).$$s=this,_.$$arity=1,_))},h.$$arity=0),n.$private(),s.def(n,"$critical?",D=function(_){return V(_,this.critical_value)},D.$$arity=1)}(R[0],0,R),s.def(z,"$eval_game_system_specific_command",K=function(i){var e=this,n=t;return d(n=e.$parse_dx(i))?n.$execute(e.randomizer):i["$=="]("ET")?e.$roll_emotion_table():t},K.$$arity=1),z.$private(),s.def(z,"$parse_dx",Y=function(i){var n;return d(n=this.$parse_dx_od(i))?n:this.$parse_dx_shippu_doto(i)},Y.$$arity=1),s.def(z,"$parse_dx_od",J=function(i){var a=t,c=t,r=t,v=t;return a=w($(R,"Command"),"Parser").$new(/\d+DX/,o(["round_type"],{round_type:this.$round_type()})).$enable_critical().$restrict_cmp_op_to(t,">=").$parse(i),d(a)?(c=a.$command().$to_i(),r=d(v=a.$critical())?v:10,w(this.$class(),"DX").$new(c,r,a.$modify_number(),a.$target_number())):t},J.$$arity=1),s.def(z,"$parse_dx_shippu_doto",Q=function(i){var e,n,a,c=this,v=t,h=t,D=t,f=t;return v=w($(R,"Command"),"Parser").$new(/\d+DX\d*/,o(["round_type"],{round_type:c.$round_type()})).$restrict_cmp_op_to(t,">=").$parse(i),d(v)?(n=T(v.$command().$split("DX",2),"map",[],((a=function(m){var p;return null==m&&(m=t),(p=m)===t||null==p?t:T(p,"to_i",[])}).$$s=c,a.$$arity=1,a)),h=null==(e=s.to_ary(n))[0]?t:e[0],D=d(f=D=null==e[1]?t:e[1])?f:10,w(c.$class(),"DX").$new(h,D,v.$modify_number(),v.$target_number())):t},Q.$$arity=1),s.def(z,"$roll_emotion_table",W=function(){var a,i=this,e=t,n=t,c=t,v=t;return e=w(i.$class(),"POSITIVE_EMOTION_TABLE").$roll(i.randomizer),n=w(i.$class(),"NEGATIVE_EMOTION_TABLE").$roll(i.randomizer),a=i.randomizer.$roll_once(2)["$=="](1),c=d(a)?["\u25cb"+e.$content(),n.$content()]:[e.$content(),"\u25cb"+n.$content()],v=[i.$translate("DoubleCross.ET.name")+"("+e.$sum()+"-"+n.$sum()+")",c.$join(" - ")],$(R,"Result").$new(v.$join(" \uff1e "))},W.$$arity=0),function(y,i){var n,a,e=[y].concat(i);y.$private(),s.def(y,"$positive_emotion_table",n=function(r){return w($(e,"DiceTable"),"RangeTable").$new($(e,"I18n").$translate("DoubleCross.ET.positive.name",o(["locale"],{locale:r})),"1D100",[[l(1,5,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.1_5",o(["locale"],{locale:r}))],[l(6,10,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.6_10",o(["locale"],{locale:r}))],[l(11,15,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.11_15",o(["locale"],{locale:r}))],[l(16,20,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.16_20",o(["locale"],{locale:r}))],[l(21,25,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.21_25",o(["locale"],{locale:r}))],[l(26,30,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.26_30",o(["locale"],{locale:r}))],[l(31,35,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.31_35",o(["locale"],{locale:r}))],[l(36,40,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.36_40",o(["locale"],{locale:r}))],[l(41,45,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.41_45",o(["locale"],{locale:r}))],[l(46,50,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.46_50",o(["locale"],{locale:r}))],[l(51,55,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.51_55",o(["locale"],{locale:r}))],[l(56,60,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.56_60",o(["locale"],{locale:r}))],[l(61,65,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.61_65",o(["locale"],{locale:r}))],[l(66,70,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.66_70",o(["locale"],{locale:r}))],[l(71,75,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.71_75",o(["locale"],{locale:r}))],[l(76,80,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.76_80",o(["locale"],{locale:r}))],[l(81,85,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.81_85",o(["locale"],{locale:r}))],[l(86,90,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.86_90",o(["locale"],{locale:r}))],[l(91,95,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.91_95",o(["locale"],{locale:r}))],[l(96,100,!1),$(e,"I18n").$translate("DoubleCross.ET.positive.items.96_100",o(["locale"],{locale:r}))]])},n.$$arity=1),s.def(y,"$negative_emotion_table",a=function(r){return w($(e,"DiceTable"),"RangeTable").$new($(e,"I18n").$translate("DoubleCross.ET.negative.name",o(["locale"],{locale:r})),"1D100",[[l(1,5,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.1_5",o(["locale"],{locale:r}))],[l(6,10,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.6_10",o(["locale"],{locale:r}))],[l(11,15,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.11_15",o(["locale"],{locale:r}))],[l(16,20,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.16_20",o(["locale"],{locale:r}))],[l(21,25,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.21_25",o(["locale"],{locale:r}))],[l(26,30,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.26_30",o(["locale"],{locale:r}))],[l(31,35,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.31_35",o(["locale"],{locale:r}))],[l(36,40,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.36_40",o(["locale"],{locale:r}))],[l(41,45,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.41_45",o(["locale"],{locale:r}))],[l(46,50,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.46_50",o(["locale"],{locale:r}))],[l(51,55,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.51_55",o(["locale"],{locale:r}))],[l(56,60,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.56_60",o(["locale"],{locale:r}))],[l(61,65,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.61_65",o(["locale"],{locale:r}))],[l(66,70,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.66_70",o(["locale"],{locale:r}))],[l(71,75,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.71_75",o(["locale"],{locale:r}))],[l(76,80,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.76_80",o(["locale"],{locale:r}))],[l(81,85,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.81_85",o(["locale"],{locale:r}))],[l(86,90,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.86_90",o(["locale"],{locale:r}))],[l(91,95,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.91_95",o(["locale"],{locale:r}))],[l(96,100,!1),$(e,"I18n").$translate("DoubleCross.ET.negative.items.96_100",o(["locale"],{locale:r}))]]).$freeze()},a.$$arity=1)}(s.get_singleton_class(z),R),s.const_set(R[0],"POSITIVE_EMOTION_TABLE",z.$positive_emotion_table("ja_jp").$freeze()),s.const_set(R[0],"NEGATIVE_EMOTION_TABLE",z.$negative_emotion_table("ja_jp").$freeze())}(Opal)}}]);