-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path9137.893edf89d3cd98da730f.js
More file actions
1 lines (1 loc) · 12.1 KB
/
9137.893edf89d3cd98da730f.js
File metadata and controls
1 lines (1 loc) · 12.1 KB
1
(self.webpackChunkudonarium_lily_gk=self.webpackChunkudonarium_lily_gk||[]).push([[9137],{9137:function(ot,$t,rt){rt(4656),Opal.modules["bcdice/game_system/Torg"]=function($){function E(_,a){return"number"==typeof _&&"number"==typeof a?_>a:_["$>"](a)}function d(_,a){return"number"==typeof _&&"number"==typeof a?_+a:_["$+"](a)}function A(_,a){return"number"==typeof _&&"number"==typeof a?_-a:_["$-"](a)}function B(_,a){return"number"==typeof _&&"number"==typeof a?_/a:_["$/"](a)}var a,X,k,w,N,W,U,L,z,p,T,K,l,Y,F,M,O,j,f,b,C,P,G=[],t=$.nil,v=$.$$,I=$.module,Q=$.klass,h=$.send,n=$.truthy;return a=G,X=P=[I(G[0],"BCDice")].concat(a),k=C=[I(P[0],"GameSystem")].concat(X),f=Q(C[0],v(C,"Base"),"Torg"),b=[f].concat(k),f.$$prototype.randomizer=t,$.const_set(b[0],"ID","Torg"),$.const_set(b[0],"NAME","\u30c8\u30fc\u30b0"),$.const_set(b[0],"SORT_KEY","\u3068\u304a\u304f"),$.const_set(b[0],"HELP_MESSAGE",'\u30fb\u5224\u5b9a\u3000(TGm)\n\u3000TORG\u5c02\u7528\u306e\u5224\u5b9a\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002\n\u3000"TG(\u6280\u80fd\u57fa\u672c\u5024)"\u3067\u30ed\u30fc\u30eb\u3057\u307e\u3059\u3002R\u30b3\u30de\u30f3\u30c9\u306b\u8aad\u66ff\u3055\u308c\u307e\u3059\u3002\n\u3000\u632f\u308a\u8db3\u3057\u3092\u81ea\u52d5\u3067\u884c\u3044\u300120\u306e\u51fa\u76ee\u304c\u51fa\u305f\u3068\u304d\u306b\u306f\u6280\u80fd\u7121\u3057\u5024\u3082\u4e26\u8a18\u3057\u307e\u3059\u3002\n\u30fb\u5404\u7a2e\u8868\u3000"(\u8868\u30b3\u30de\u30f3\u30c9)(\u6570\u5024)"\u3067\u632f\u308a\u307e\u3059\u3002\n\u3000\u30fb\u4e00\u822c\u7d50\u679c\u8868 \u6210\u529f\u5ea6\u51fa\u529b\u300cRTx or RESULTx\u300d\n\u3000\u30fb\u5a01\u5727/\u5a01\u5687 \u5bfe\u4eba\u884c\u70ba\u7d50\u679c\u8868\u300cITx or INTIMIDATEx or TESTx\u300d\n\u3000\u30fb\u6311\u767a/\u30c8\u30ea\u30c3\u30af \u5bfe\u4eba\u884c\u70ba\u7d50\u679c\u8868\u300cTTx or TAUNTx or TRICKx or CTx\u300d\n\u3000\u30fb\u9593\u5408\u3044 \u5bfe\u4eba\u884c\u70ba\u7d50\u679c\u8868\u300cMTx or MANEUVERx\u300d\n\u3000\u30fb\u30aa\u30fc\u30ba\uff08\u4e00\u822c\u4eba\uff09\u30c0\u30e1\u30fc\u30b8\u3000\u300cODTx or ORDSx or ODAMAGEx\u300d\n\u3000\u30fb\u30dd\u30b7\u30d3\u30ea\u30c6\u30a3\u30fc\u80fd\u529b\u8005\u30c0\u30e1\u30fc\u30b8\u300cDTx or DAMAGEx\u300d\n\u3000\u30fb\u30dc\u30fc\u30ca\u30b9\u8868\u300cBTx+y or BONUSx+y or TOTALx+y\u300d x\u306f\u6570\u5024, y\u306f\u6280\u80fd\u57fa\u672c\u5024\n'),f.$register_prefix("TG","1R20","RT","Result","IT","Intimidate","Test","TT","Taunt","Trick","CT","MT","Maneuver","ODT","ords","odamage","DT","damage","BT","bonus","total"),$.def(f,"$replace_text",w=function(r){var o;return r=(r=(r=(r=(r=(r=(r=r.$gsub(/Result/i,"RT")).$gsub(/(Intimidate|Test)/i,"IT")).$gsub(/(Taunt|Trick|CT)/i,"TT")).$gsub(/Maneuver/i,"MT")).$gsub(/(ords|odamage)/i,"ODT")).$gsub(/damage/i,"DT")).$gsub(/(bonus|total)/i,"BT"),(r=h(r,"gsub",[/TG(\d+)/i],((o=function(){return"1R20+"+v(b,"Regexp").$last_match(1)}).$$s=this,o.$$arity=0,o))).$gsub(/TG/i,"1R20")},w.$$arity=1),$.def(f,"$torg_check",N=function(r){var o,e,i=this,u=t,c=t,g=t,s=t,m=t,x=t;return n(/(^|\s)S?(1R20([+-]\d+)*)(\s|$)/i["$=~"](r))?(r=v(b,"Regexp").$last_match(2),u=v(b,"Regexp").$last_match(3),i.$debug(u),n(u)&&(u=v(b,"ArithmeticEvaluator").$eval(u)),i.$debug(u),u=u.$to_i(),e=i.$torg_dice(),g=null==(o=$.to_ary(e))[1]?t:o[1],s=null==o[2]?t:o[2],m=i.$get_torg_bonus(c=null==o[0]?t:o[0]),x=d(x=n(u)?n(E(u,0))?m+"["+s+"]+"+u:m+"["+s+"]"+u:m+"["+s+"]",d(" \uff1e ",d(m,u).$to_s())),n(c["$!="](g))&&(x=d(x,d(d("(\u6280\u80fd\u7121",d(i.$get_torg_bonus(g),u).$to_s()),")"))),x="("+r+") \uff1e "+x):t},N.$$arity=1),$.def(f,"$torg_dice",W=function(){var e=t,i=t,u=t,c=t,g=t,s=t;for(e=!0,i=!0,u=0,c=0,g="";n(e);)u=d(u,s=this.randomizer.$roll_once(20)),n(i)&&(c=d(c,s)),n(g["$empty?"]())||(g=d(g,",")),g=d(g,s.$to_s()),s["$=="](20)?i=!1:n(s["$!="](10))&&(e=!1,i=!1);return[u,c,g]},W.$$arity=0),$.def(f,"$eval_game_system_specific_command",U=function(r){var o,e,c,i=this,u=t,g=t,s=t,m=t,x=t,R=t,D=t;return u=r.$upcase(),u=i.$replace_text(u),n(c=i.$torg_check(u))?c:(g="1",s="",m=0,n(/([RITMDB]T)(\d+([+\-]\d+)*)/i["$=~"](u))?(x=v(b,"Regexp").$last_match(1),R=v(b,"Regexp").$last_match(2),"RT"["$==="](D=x)?(m=v(b,"ArithmeticEvaluator").$eval(R),g=i.$get_torg_success_level(m),s="\u4e00\u822c\u7d50\u679c"):"IT"["$==="](D)?(m=v(b,"ArithmeticEvaluator").$eval(R),g=i.$get_torg_interaction_result_intimidate_test(m),s="\u5a01\u5727/\u5a01\u5687"):"TT"["$==="](D)?(m=v(b,"ArithmeticEvaluator").$eval(R),g=i.$get_torg_interaction_result_taunt_trick(m),s="\u6311\u767a/\u30c8\u30ea\u30c3\u30af"):"MT"["$==="](D)?(m=v(b,"ArithmeticEvaluator").$eval(R),g=i.$get_torg_interaction_result_maneuver(m),s="\u9593\u5408\u3044"):"DT"["$==="](D)?(m=v(b,"ArithmeticEvaluator").$eval(R),n(u["$=~"](/ODT/i))?(g=i.$get_torg_damage_ords(m),s="\u30aa\u30fc\u30ba\u30c0\u30e1\u30fc\u30b8"):(g=i.$get_torg_damage_posibility(m),s="\u30dd\u30b7\u30d3\u30ea\u30c6\u30a3\u80fd\u529b\u8005\u30c0\u30e1\u30fc\u30b8")):"BT"["$==="](D)&&(e=i.$get_torg_bonus_text(R),g=null==(o=$.to_ary(e))[0]?t:o[0],m=null==o[1]?t:o[1],s="\u30dc\u30fc\u30ca\u30b9"),n(s["$!="](""))&&(g=s+"\u8868["+m+"] \uff1e "+g),g):t)},U.$$arity=1),$.def(f,"$get_torg_success_level",L=function(r){return this.$get_torg_table_result(r,[[0,"\u304e\u308a\u304e\u308a"],[1,"\u3075\u3064\u3046"],[3,"\u307e\u3042\u3088\u3044"],[7,"\u304b\u306a\u308a\u3088\u3044"],[12,"\u3059\u3054\u3044"]])},L.$$arity=1),$.def(f,"$get_torg_interaction_result_intimidate_test",z=function(r){return this.$get_torg_table_result(r,[[0,"\u6280\u80fd\u306a\u3057"],[5,"\u840e\u7e2e"],[10,"\u9006\u8ee2\u8ca0\u3051"],[15,"\u30e2\u30e9\u30eb\u5d29\u58ca"],[17,"\u30d7\u30ec\u30a4\u30e4\u30fc\u30ba\u30b3\u30fc\u30eb"]])},z.$$arity=1),$.def(f,"$get_torg_interaction_result_taunt_trick",p=function(r){return this.$get_torg_table_result(r,[[0,"\u6280\u80fd\u306a\u3057"],[5,"\u840e\u7e2e"],[10,"\u9006\u8ee2\u8ca0\u3051"],[15,"\u9ad8\u63da\uff0f\u9006\u8ee2\u8ca0\u3051"],[17,"\u30d7\u30ec\u30a4\u30e4\u30fc\u30ba\u30b3\u30fc\u30eb"]])},p.$$arity=1),$.def(f,"$get_torg_interaction_result_maneuver",T=function(r){return this.$get_torg_table_result(r,[[0,"\u6280\u80fd\u306a\u3057"],[5,"\u75b2\u52b4"],[10,"\u840e\u7e2e\uff0f\u75b2\u52b4"],[15,"\u9006\u8ee2\u8ca0\u3051\uff0f\u75b2\u52b4"],[17,"\u30d7\u30ec\u30a4\u30e4\u30fc\u30ba\u30b3\u30fc\u30eb"]])},T.$$arity=1),$.def(f,"$get_torg_table_result",K=function(r,o){var e,i=this,u=t;return u="1",function(){var c=$.new_brk();try{h(o,"each",[],((e=function(s){var x;return null==s&&(s=t),x=s["$[]"](0),n(E(x,r))&&$.brk(t,c),u=s["$[]"](1)}).$$s=i,e.$$brk=c,e.$$arity=1,e))}catch(g){if(g===c)return g.$v;throw g}}(),u},K.$$arity=2),$.def(f,"$get_torg_damage_ords",l=function(r){return this.$get_torg_damage(r,4,"\u30ec\u30d9\u30eb\u8ca0\u50b7 KO15",[[0,"1"],[1,"O1"],[2,"K1"],[3,"O2"],[4,"O3"],[5,"K3"],[6,"\u8ee2\u5012 K\uff0fO4"],[7,"\u8ee2\u5012 K\uff0fO5"],[8,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO7"],[9,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO9"],[10,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO10"],[11,"2\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO11"],[12,"2\u30ec\u30d9\u30eb\u8ca0\u50b7 KO12"],[13,"3\u30ec\u30d9\u30eb\u8ca0\u50b7 KO13"],[14,"3\u30ec\u30d9\u30eb\u8ca0\u50b7 KO14"],[15,"4\u30ec\u30d9\u30eb\u8ca0\u50b7 KO15"]])},l.$$arity=1),$.def(f,"$get_torg_damage_posibility",Y=function(r){return this.$get_torg_damage(r,3,"\u30ec\u30d9\u30eb\u8ca0\u50b7 KO5",[[0,"1"],[1,"1"],[2,"O1"],[3,"K2"],[4,"2"],[5,"O2"],[6,"\u8ee2\u5012 O2"],[7,"\u8ee2\u5012 K2"],[8,"\u8ee2\u5012 K2"],[9,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 K3"],[10,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 K4"],[11,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 O4"],[12,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 K5"],[13,"2\u30ec\u30d9\u30eb\u8ca0\u50b7 O4"],[14,"2\u30ec\u30d9\u30eb\u8ca0\u50b7 KO5"],[15,"3\u30ec\u30d9\u30eb\u8ca0\u50b7 KO5"]])},Y.$$arity=1),$.def(f,"$get_torg_damage",F=function(r,o,e,i){var _,c=t;return n("number"==typeof(_=r)?_<0:_["$<"](0))?"1":(c=A(i.$length(),1),n(function(_,a){return"number"==typeof _&&"number"==typeof a?_<=a:_["$<="](a)}(r,c))?this.$get_torg_table_result(r,i):d(d("",d(B(A(r,c),2).$to_i(),o).$to_s()),e))},F.$$arity=4),$.def(f,"$get_torg_bonus_text",M=function(r){var o=this,e=t,i=t,u=t,c=t,g=t;return i=(e=r.$split(/\+/)).$shift().$to_i(),u=v(b,"ArithmeticEvaluator").$eval(e.$join("+")),c=o.$get_torg_bonus(i),o.$debug("TORG BT resultValue",c),o.$debug("TORG BT mod",u),u["$=="](0)?g=c.$to_s():(g=o.$getTorgBonusOutputTextWhenModDefined(i,c,u),i=i+"+"+u),[g,i]},M.$$arity=1),$.def(f,"$getTorgBonusOutputTextWhenModDefined",O=function(r,o,e){var i=this;return i.$debug("getTorgBonusOutputTextWhenModDefined value, mod",r,e),n(E(e,0))?o+"["+r+"]+"+e+" \uff1e "+d(o,e):(i.$debug("resultValue",o),i.$debug("mod",e),o+"["+r+"]"+e+" \uff1e "+d(o,e))},O.$$arity=3),void $.def(f,"$get_torg_bonus",j=function(r){var i=t,u=t;return i=this.$get_torg_table_result(r,[[1,-12],[2,-10],[3,-8],[5,-5],[7,-2],[9,-1],[11,0],[13,1],[15,2],[16,3],[17,4],[18,5],[19,6],[20,7]]),n(E(r,20))&&(u=d(B(A(r,21),5).$to_i(),1),i=d(i,u)),i},j.$$arity=1)},function($){function d(n,_){return"number"==typeof n&&"number"==typeof _?n-_:n["$-"](_)}function q(n,_){return"number"==typeof n&&"number"==typeof _?n+_:n["$+"](_)}function B(n,_){return"number"==typeof n&&"number"==typeof _?n*_:n["$*"](_)}var _,V,tt,b,w,N,W,U,L,z,k,f,S,H,G=[],t=$.nil,v=$.$$,I=$.module,Q=$.klass,h=$.truthy;$.top.$require("bcdice/game_system/Torg"),_=G,V=H=[I(G[0],"BCDice")].concat(_),tt=S=[I(H[0],"GameSystem")].concat(V),f=[k=Q(S[0],v(S,"Torg"),"Torg1_5")].concat(tt),$.const_set(f[0],"ID","Torg1.5"),$.const_set(f[0],"NAME","\u30c8\u30fc\u30b01.5\u7248"),$.const_set(f[0],"SORT_KEY","\u3068\u304a\u304f1.5"),k.$register_prefix(v(f,"Torg").$prefixes()),$.def(k,"$get_torg_success_level",b=function(T){return this.$get_torg_table_result(T,[[0,"\u304e\u308a\u304e\u308a"],[1,"\u3075\u3064\u3046"],[3,"\u307e\u3042\u3088\u3044"],[7,"\u304b\u306a\u308a\u3088\u3044"],[12,"\u3059\u3054\u3044"]])},b.$$arity=1),$.def(k,"$get_torg_interaction_result_intimidate_test",w=function(T){return this.$get_torg_table_result(T,[[0,"\u840e\u7e2e"],[5,"\u6280\u80fd\u306a\u3057"],[10,"\u9006\u8ee2\u8ca0\u3051"],[15,"\u30e2\u30e9\u30eb\u5d29\u58ca"],[17,"\u30d7\u30ec\u30a4\u30e4\u30fc\u30ba\u30b3\u30fc\u30eb"]])},w.$$arity=1),$.def(k,"$get_torg_interaction_result_taunt_trick",N=function(T){return this.$get_torg_table_result(T,[[0,"\u840e\u7e2e"],[5,"\u6280\u80fd\u306a\u3057"],[10,"\u9006\u8ee2\u8ca0\u3051"],[15,"\u9ad8\u63da\uff0f\u9006\u8ee2\u8ca0\u3051"],[17,"\u30d7\u30ec\u30a4\u30e4\u30fc\u30ba\u30b3\u30fc\u30eb"]])},N.$$arity=1),$.def(k,"$get_torg_interaction_result_maneuver",W=function(T){return this.$get_torg_table_result(T,[[0,"\u75b2\u52b4"],[5,"\u840e\u7e2e"],[10,"\u6280\u80fd\u306a\u3057"],[15,"\u9006\u8ee2\u8ca0\u3051\uff0f\u75b2\u52b4"],[17,"\u30d7\u30ec\u30a4\u30e4\u30fc\u30ba\u30b3\u30fc\u30eb"]])},W.$$arity=1),$.def(k,"$get_torg_damage_ords",U=function(T){return this.$get_torg_damage(T,4,8,[[0,"1"],[1,"O1"],[2,"K1"],[3,"O2"],[4,"K2"],[5,"\u8ee2\u5012 O3"],[6,"\u8ee2\u5012 K3"],[7,"\u8ee2\u5012 K\uff0fO4"],[8,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 KO4"],[9,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO5"],[10,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 KO5"],[11,"2\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO6"],[12,"2\u30ec\u30d9\u30eb\u8ca0\u50b7 KO6"],[13,"3\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO7"],[14,"3\u30ec\u30d9\u30eb\u8ca0\u50b7 KO7"],[15,"4\u30ec\u30d9\u30eb\u8ca0\u50b7 KO8"]])},U.$$arity=1),$.def(k,"$get_torg_damage_posibility",L=function(T){return this.$get_torg_damage(T,3,5,[[0,"1"],[1,"1"],[2,"O1"],[3,"K1"],[4,"2"],[5,"O2"],[6,"\u8ee2\u5012 K2"],[7,"\u8ee2\u5012 O3"],[8,"\u8ee2\u5012 K3"],[9,"\u8ee2\u5012 K\uff0fO3"],[10,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO4"],[11,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO4"],[12,"1\u30ec\u30d9\u30eb\u8ca0\u50b7 KO4"],[13,"2\u30ec\u30d9\u30eb\u8ca0\u50b7 K\uff0fO5"],[14,"2\u30ec\u30d9\u30eb\u8ca0\u50b7 KO5"],[15,"3\u30ec\u30d9\u30eb\u8ca0\u50b7 KO5"]])},L.$$arity=1),$.def(k,"$get_torg_damage",z=function(T,K,l,Y){var n,M=t,O=t;return h("number"==typeof(n=T)?n<0:n["$<"](0))?"1":(M=d(Y.$length(),1),h(function(n,_){return"number"==typeof n&&"number"==typeof _?n<=_:n["$<="](_)}(T,M))?this.$get_torg_table_result(T,Y):q(K,B(O=function(n,_){return"number"==typeof n?n/2:n["$/"](2)}(d(T,M)).$to_i(),1))+"\u30ec\u30d9\u30eb\u8ca0\u50b7 KO"+q(l,B(O,1)))},z.$$arity=4)}(Opal)}}]);