1 /** 2 * Created by hirai.takashi on 15/12/14. 3 */ 4 < 5 script > (function () { 6 var teehah = {}; 7 teehah.debug = function (com) { 8 console.debug(com); 9 var iframe = document.createElement('IFRAME'); 10 iframe.setAttribute('src', 'createjs-ios:///path?command=' + com); 11 iframe.style.outline = 'none'; 12 iframe.style.border = 'none'; 13 iframe.width = iframe.height = 1; 14 document.documentElement.appendChild(iframe); 15 iframe.parentNode.removeChild(iframe); 16 iframe = null; 17 }; 18 window.addEventListener("beforeunload", function (e) { 19 teehah.debug("teehah:beforeunload:" + e); 20 }, false); 21 window.addEventListener("unload", function (e) { 22 teehah.debug("teehah:unload:" + e); 23 }, false); 24 window.addEventListener("pagehide", function (e) { 25 teehah.debug("teehah:pagehide:" + e.persisted); 26 e.persisted = false; 27 if (e.persisted) { 28 } 29 }, false); 30 window.addEventListener("load", function (e) { 31 teehah.debug("teehah:load:" + e); 32 }, false); 33 window.addEventListener("pageshow", function (e) { 34 teehah.debug("teehah:pageshow:" + e.persisted); 35 document.worker = new Worker(window.URL.createObjectURL(new Blob(["onmessage = function(oEvent) {};"], {type: "text/javascript"}))); 36 }, false); 37 })(); 38 </ 39 script > 40 < / head > 41 42 var Game = window.Game = window.Game || {}, patchWithCJSScale = function (a) { 43 createjs.Config.setPixelRatio(a), require(["catalog/ua/canvas"], function (a) { 44 a.requiresLayoutInUpdate() && (createjs.Config.setUseAndroidWorkarounds("2d", !0), createjs.Config.setUseAndroidWorkarounds("webgl", !0)) 45 }), createjs.Config.setCacheVersion(1 * Game.version || -1), 1 == Game.setting.cjs_mode && (window.CreateJsShell && (createjs.Ticker.timingMode = "auto"), require(["lib/shellapp"], function (a) { 46 if (a.isShellApp()) { 47 "undefined" == typeof window.localStorage.cache_size && (window.localStorage.cache_size = 256), "undefined" == typeof window.localStorage.cache_retention && (window.localStorage.cache_retention = 7); 48 var b = window.localStorage.cache_size, c = window.localStorage.cache_retention, d = window.Game.ua; 49 "iOS" === d.os.name && 50 ("undefined" != typeof window.cjsCacheValue && 51 (b = window.cjsCacheValue), 52 "undefined" != typeof window.cjsCacheRetention && 53 (c = window.cjsCacheRetention), 54 window.localStorage.cache_size = b, 55 window.localStorage.cache_retention = c), 56 window.cjsSetCacheManifestCompat ? window.cjsSetCacheManifestCompat(Game.modifiedListUri, b, c) : a.isShellAppWKWebView() ? webkit.messageHandlers.wkcjs_settings.postMessage({ 57 cacheRetention: c, 58 cacheValue: b 59 }) : createjs.Config.setCacheManifest(Game.modifiedListUri, b, c) 60 } 61 })), createjs.Config.setDevice && createjs.Config.setDevice(window.cjsAndroidSdk >= 19 ? 1 : 0), require(["catalog/ua"], function (a) { 62 a.isOveriOS8() && createjs.Config.setUseFrame(!0) 63 }), createjs.Config.addHotfix("cjs/enemy_8100393", function () { 64 createjs.Config.overrideProperties(lib.gr_enemy_8100393_wait_ef, {mask: "hide"}) 65 }), _.each(["gacha", "gacha_event_001", "gacha_event_002", "gacha_event_004", "gacha_event_005", "gacha_event_006", "gacha_event_008", "gacha_event_009", "gacha_event_010", "gacha_event_011"], function (a) { 66 createjs.Config.addHotfix("cjs/" + a, function () { 67 createjs.Config.overrideProperties(lib["gr_" + a + "_lighter_clystal_white"], {mask: "compose"}), createjs.Config.overrideProperties(lib["mc_" + a + "_scene3"], { 68 actions: { 69 frame_25: function () { 70 this.cards.gotoAndStop(cjs_exportRoot_gacha.gacha_ct), this.txt_rera.gotoAndStop(gacha_rare_array[cjs_exportRoot_gacha.gacha_ct]), this.txt_rera2.gotoAndStop(gacha_rare_array[cjs_exportRoot_gacha.gacha_ct]), this.text2_mc.text1.text = gacha_text1[cjs_exportRoot_gacha.gacha_ct], this._frame_25(), cjs_exportRoot_gacha.gacha_sound_call = 1 71 }, frame_126: function () { 72 var a = cjs_exportRoot_gacha.gacha_ct - (cjs_gacha_num - cjs_gacha_demo_num); 73 this.gcha_npc.gotoAndStop(a); 74 var b = gacha_npc_text[a]; 75 if (b && b.split) { 76 var c = b.split("\n"); 77 this.text1.text = c[0], this.text2.text = c[1], this.text3.text = c[2], this.text4.text = c[3], this.text5.text = c[4] 78 } 79 this._frame_126() 80 } 81 } 82 }) 83 }) 84 }), _.each(["gacha_event_003", "gacha_event_007"], function (a) { 85 createjs.Config.addHotfix("cjs/" + a, function () { 86 createjs.Config.overrideProperties(lib["gr_" + a + "_lighter_clystal_white"], {mask: "compose"}) 87 }) 88 }), createjs.Config.addHotfix("cjs/luckygacha", function () { 89 createjs.Config.overrideProperties(lib.gr_luckygacha_lighter_clystal_white, {mask: "compose"}), createjs.Config.overrideProperties(lib.gr_luckygacha_txt_lucky, {visible: !1}) 90 }), createjs.Config.addHotfix("cjs/casino_effect_winlose", function () { 91 createjs.Config.overrideProperties(lib.gr_casino_effect_winlose_win_light, {mask: "hide"}) 92 }), createjs.Config.addHotfix("cjs/casino_effect_type", function () { 93 createjs.Config.overrideProperties(lib.gr_casino_effect_type_win_light, {mask: "hide"}) 94 }), createjs.Config.addHotfix("cjs/casino_effect_three7_sj", function () { 95 createjs.Config.overrideProperties(lib.gr_casino_effect_three7_sj_win_light, {mask: "hide"}) 96 }), createjs.Config.addHotfix("cjs/casino_effect_bingo", function () { 97 createjs.Config.overrideProperties(lib.gr_casino_effect_bingo_win_light, {mask: "hide"}) 98 }), createjs.Config.addHotfix("cjs/casino_effect_sbingo", function () { 99 createjs.Config.overrideProperties(lib.gr_casino_effect_sbingo_win_light, {mask: "hide"}) 100 }), createjs.Config.addHotfix("cjs/quest_clear", function () { 101 createjs.Config.overrideProperties(lib.gr_quest_clear_light_ob, {mask: "hide"}) 102 }), createjs.Config.addHotfix("cjs/teamraid_qualify", function () { 103 createjs.Config.overrideProperties(lib.gr_teamraid_qualify_light_ob, {mask: "hide"}) 104 }), createjs.Config.addHotfix("cjs/teamraid_qualify_1", function () { 105 createjs.Config.overrideProperties(lib.gr_teamraid_qualify_1_light_ob, {mask: "hide"}) 106 }), createjs.Config.addHotfix("cjs/teamraid_qualify_halloween", function () { 107 createjs.Config.overrideProperties(lib.gr_teamraid_qualify_halloween_light_ob, {mask: "hide"}) 108 }), createjs.Config.addHotfix("cjs/teamraid_qualify_christmas", function () { 109 createjs.Config.overrideProperties(lib.gr_teamraid_qualify_christmas_light_ob, {mask: "hide"}) 110 }), createjs.Config.addHotfix("cjs/raid_win", function () { 111 createjs.Config.overrideProperties(lib.gr_raid_win_win_light, {mask: "hide"}) 112 }), createjs.Config.addHotfix("cjs/npc_3030054000_01", function () { 113 createjs.Config.overrideProperties(lib.mc_npc_3030054000_01_enemy_attack, {mask: "scissor"}), createjs.Config.overrideProperties(lib.mc_npc_3030054000_01_enemy_attack02, {mask: "scissor"}), createjs.Config.overrideProperties(lib.mc_npc_3030054000_01_enemy_attack03, {mask: "scissor"}) 114 }), createjs.Config.addHotfix("cjs/npc_3030054000_02", function () { 115 createjs.Config.overrideProperties(lib.mc_npc_3030054000_02_enemy_attack, {mask: "scissor"}), createjs.Config.overrideProperties(lib.mc_npc_3030054000_02_enemy_attack02, {mask: "scissor"}), createjs.Config.overrideProperties(lib.mc_npc_3030054000_02_enemy_attack03, {mask: "scissor"}) 116 }), createjs.Config.addHotfix("cjs/usf_arcade_1", function () { 117 createjs.Config.overrideProperties(lib.usf_arcade_1_stage_white, {mask: "scissor"}), createjs.Config.overrideProperties(lib.usf_arcade_1_firestStage_mark_00_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_1_vs_ui_00_s_light_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_1_vs_ui_00_light_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_1_vs_ui_00_2_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_1_vs_ui_00_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_1_vs_ui_00_s_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_1_vs_ui_02_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_1_vs_ui_01_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_1_bg_sen_1, {mask: "hide"}) 118 }), createjs.Config.addHotfix("cjs/usf_arcade_2", function () { 119 createjs.Config.overrideProperties(lib.usf_arcade_2_stage_white, {mask: "scissor"}), createjs.Config.overrideProperties(lib.usf_arcade_2_firestStage_mark_00_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_2_vs_ui_00_s_light_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_2_vs_ui_00_light_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_2_vs_ui_00_2_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_2_vs_ui_00_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_2_vs_ui_00_s_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_2_vs_ui_02_1, {mask: "hide"}), createjs.Config.overrideProperties(lib.usf_arcade_2_vs_ui_01_1, {mask: "hide"}) 120 }), createjs.Config.addHotfix("cjs/usf_bonus", function () { 121 createjs.Config.overrideProperties(lib.gr_usf_bonus_txt_ef, {visible: !1}), createjs.Config.overrideProperties(lib.gr_usf_bonus_txt_bonus, {mask: "scissor"}), createjs.Config.overrideProperties(lib.gr_usf_bonus_txt_stage, {mask: "scissor"}) 122 }), createjs.Config.addHotfix("cjs/raid_parts_auto", function () { 123 createjs.Config.overrideProperties(lib.gr_raid_parts_auto_gradation, {mask: "hide"}) 124 }), createjs.Config.addHotfix("cjs/npc_3040005000_01", function () { 125 createjs.Config.overrideProperties(lib.npc_3040005000_01_setup_main_skirt01, {mask: "show"}) 126 }), createjs.Config.addHotfix("cjs/npc_3040066000_01", function () { 127 createjs.Config.overrideProperties(lib.mc_npc_3040066000_01_monitor, {mask: "hide"}) 128 }), createjs.Config.addHotfix("cjs/npc_3040066000_02", function () { 129 createjs.Config.overrideProperties(lib.mc_npc_3040066000_02_monitor, {mask: "hide"}) 130 }), createjs.Config.addHotfix("cjs/npc_3840066000_01", function () { 131 createjs.Config.overrideProperties(lib.mc_npc_3840066000_01_monitor, {mask: "hide"}) 132 }), createjs.Config.addHotfix("cjs/npc_3840066000_02", function () { 133 createjs.Config.overrideProperties(lib.mc_npc_3840066000_02_monitor, {mask: "hide"}) 134 }), _.each(["loginbonus_1st_anniversary", "loginbonus_cm", "loginbonus_fes", "loginbonus_normal", "loginbonus_special", "loginbonus_special_cm", "loginbonus_special_cm_01", "loginbonus_special_fes", "loginbonus_fes_01", "loginbonus_5million", "loginbonus_special_5million", "loginbonus_special_tgs2015", "loginbonus_tgs2015", "loginbonus_6million", "loginbonus_special_6million", "loginbonus_cm_02", "loginbonus_special_cm_02"], function (a) { 135 createjs.Config.addHotfix("cjs/" + a, function () { 136 var b = ["loginbonus_normal", "loginbonus_6million", "loginbonus_cm_02", "loginbonus_special_cm_02"]; 137 _.contains(b, a) || createjs.Config.overrideProperties(lib[a], { 138 actions: { 139 frame_75: function () { 140 function a(b) { 141 var c = b.currentTarget; 142 c.removeEventListener("click", a), this.exportRoot.chara02.gotoAndPlay("jump"), this.exportRoot.itemToday.gotoAndPlay(2), this.exportRoot.gotoAndPlay("extraPresent") 143 } 144 145 this.tf4.text = msgArray[5], this.tf5.text = msgArray[6], this.tf6.text = msgArray[7], this.mc_hitArea.addEventListener("click", a) 146 } 147 } 148 }), createjs.Config.overrideProperties(lib["mc_" + a + "_roll_02"], { 149 actions: { 150 frame_0: function () { 151 this.stamp_mc.gotoAndPlay = function () { 152 }, this._frame_0(), delete this.stamp_mc.gotoAndPlay 153 } 154 } 155 }) 156 }) 157 }), createjs.Config.addHotfix("cjs/sp_sw_03000001", function () { 158 createjs.Config.overrideProperties(lib.sp_sw_03000001_effect_04, {mask: "hide"}) 159 }), createjs.Config.addHotfix("cjs/sp_sw_03310001", function () { 160 createjs.Config.overrideProperties(lib.gr_sp_sw_03310001_effect_04, {mask: "hide"}) 161 }), createjs.Config.addHotfix("cjs/burst_321", function () { 162 createjs.Config.overrideProperties(lib.mc_burst_321_effect10, {mask: "hide"}) 163 }), createjs.Config.addHotfix("cjs/burst_331", function () { 164 createjs.Config.overrideProperties(lib.mc_burst_331_effect10, {mask: "hide"}) 165 }), createjs.Config.addHotfix("cjs/summon_2040096000_01_attack", function () { 166 createjs.Config.overrideProperties(lib.mc_summon_2040096000_01_attack_pieru_setin, {mask: "hide"}) 167 }), createjs.Config.addHotfix("cjs/enemy_9100193", function () { 168 createjs.Config.overrideProperties(lib.mc_enemy_9100193_setinbody_m, {mask: "scissor"}) 169 }), _.each(["enemy_7100023", "enemy_7100033"], function (a) { 170 createjs.Config.addHotfix("cjs/" + a, function () { 171 createjs.Config.overrideProperties(lib["mc_" + a + "_mortal_A"], { 172 actions: { 173 frame_13: function () { 174 this.stop() 175 } 176 } 177 }) 178 }) 179 }), require(["catalog/ua/canvas"], function (a) { 180 a.shouldUseTimeoutTiming() && (createjs.Ticker.timingMode = "timeout") 181 }); 182 var b = createjs.Stage; 183 createjs.Stage = function (a) { 184 if (a) { 185 var b = parseInt(a.getAttribute("data-width"), 10) || parseInt(a.style.width, 10) || a.width / 2, c = parseInt(a.getAttribute("data-height"), 10) || parseInt(a.style.height, 10) || a.height / 2; 186 a.setAttribute("data-width", b), a.setAttribute("data-height", c), a.style.zoom = 1 / window.deviceRatio, a.style.width = b * window.deviceRatio + "px", a.style.height = c * window.deviceRatio + "px", a.width = 2 * b, a.height = 2 * c, window.CreateJsShell && 1 == Game.setting.cjs_mode && 1 == window.devicePixelRatio && Game.ua.isIOS() && Game.ua.versionCompare(Game.ua.os.version, "6") >= 0 && Game.ua.versionCompare(Game.ua.os.version, "7") < 0 && "shell" == a.getAttribute("cjs-context") && (a.width /= 2, a.height /= 2) 187 } 188 this.initialize(a) 189 }, createjs.Stage.prototype = b.prototype; 190 var c = createjs.SpriteSheet; 191 createjs.SpriteSheet = function (a) { 192 for (var b = a.images, c = b.length - 1; c >= 0; --c)b[c] = Game.imgUri + "/" + b[c]; 193 this.initialize(a) 194 }, createjs.SpriteSheet.prototype = c.prototype, createjs.patch_delay_run_for_android4_0_x = function (a) { 195 if (!Game.ua.isAndroid() || "4.0.3" !== Game.ua.os.version && "4.0.4" !== Game.ua.os.version || !createjs || createjs._isWebviewInitialized)a(); else { 196 var b = !1, c = function () { 197 b || (b = !0, a()) 198 }, d = function () { 199 createjs._isWebviewInitialized || (createjs._isWebviewInitialized = !0), c(), document.removeEventListener("cjsLayer", d) 200 }; 201 document.addEventListener("cjsLayer", d); 202 var e = 1e3; 203 setTimeout(function () { 204 c() 205 }, e) 206 } 207 }, document.addEventListener("cjsLayer", function () { 208 createjs._isWebviewInitialized = !0 209 }) 210 }; 211 patchWithCJSScale(Game.cjsScale); 212