diff --git a/idea.md b/idea.md index 74a1bbf..fde73dc 100644 --- a/idea.md +++ b/idea.md @@ -24,7 +24,7 @@ [] 苍蓝之殿 1: 红蓝黄门转换 [] 苍蓝之殿 2: 乾坤挪移、杀戮光环、同化、光环范围扩大等 [] 苍蓝之殿 3: 传送门 -[] 苍蓝之殿 4: +[] 苍蓝之殿 4: 地形变换,如平移、翻转、旋转等 [] 苍蓝之殿中: 让我们把这些东西结合起来... ### 成就 diff --git a/public/libs/control.js b/public/libs/control.js index ddb50ba..0ede38e 100644 --- a/public/libs/control.js +++ b/public/libs/control.js @@ -3769,13 +3769,8 @@ control.prototype._resize_canvas = function (obj) { for (var name in core.dymCanvas) { var ctx = core.dymCanvas[name], canvas = ctx.canvas; - var ratio = canvas.hasAttribute('isHD') - ? core.domStyle.ratio * devicePixelRatio - : 1; - canvas.style.width = - (canvas.width / ratio) * core.domStyle.scale + 'px'; - canvas.style.height = - (canvas.height / ratio) * core.domStyle.scale + 'px'; + canvas.style.width = canvas.width / devicePixelRatio + 'px'; + canvas.style.height = canvas.height / devicePixelRatio + 'px'; canvas.style.left = parseFloat(canvas.getAttribute('_left')) * core.domStyle.scale + 'px'; diff --git a/public/libs/maps.js b/public/libs/maps.js index 67ecd40..64acb55 100644 --- a/public/libs/maps.js +++ b/public/libs/maps.js @@ -2569,11 +2569,13 @@ maps.prototype._drawThumbnail_realDrawTempCanvas = function ( blocks, options ) { - const setting = Mota.require('var', 'mainSetting'); - options.ctx.imageSmoothingEnabled = !setting.getValue( - 'screen.antiAliasing', - true - ); + Mota.r(() => { + const setting = Mota.require('var', 'mainSetting'); + options.ctx.imageSmoothingEnabled = !setting.getValue( + 'screen.antiAliasing', + true + ); + }); // 缩略图:背景 this.drawBg(floorId, options); // 缩略图:事件 diff --git a/public/project/data.js b/public/project/data.js index 2c05ea6..28a0071 100644 --- a/public/project/data.js +++ b/public/project/data.js @@ -159,6 +159,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "escape.mp3", "grass.mp3", "mount.mp3", + "palaceNorth.mp3", + "palaceSouth.mp3", "plot1.mp3", "road.mp3", "title.mp3", diff --git a/public/project/enemys.js b/public/project/enemys.js index 124b8fa..36d81e0 100644 --- a/public/project/enemys.js +++ b/public/project/enemys.js @@ -15,8 +15,8 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "rock": {"name":"洞穴巨石","hp":31,"atk":25,"def":0,"money":0,"exp":4,"point":0,"special":[3],"description":"一些具有攻击性的巨石?或许就是兽人穿上了一层石头外衣吧。"}, "bluePriest": {"name":"初级法师","hp":100,"atk":120,"def":0,"money":3,"exp":0,"point":1,"special":[2]}, "redPriest": {"name":"高级法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, - "brownWizard": {"name":"初级巫师","hp":100,"atk":120,"def":0,"money":16,"exp":0,"point":0,"special":[15],"value":100,"range":2}, - "redWizard": {"name":"高级巫师","hp":1000,"atk":1200,"def":0,"money":160,"exp":0,"point":0,"special":[15],"value":200,"zoneSquare":true}, + "brownWizard": {"name":"苍蓝巫师","hp":8000,"atk":7000,"def":2000,"money":4,"exp":250,"point":0,"special":[28],"value":100,"range":2,"melt":null,"paleShield":25}, + "redWizard": {"name":"靛红巫师","hp":12000,"atk":6000,"def":4000,"money":4,"exp":300,"point":0,"special":[25],"value":200,"zoneSquare":true,"melt":30}, "swordsman": {"name":"野蛮剑士","hp":250,"atk":55,"def":27,"money":0,"exp":9,"point":0,"special":[15],"value":75,"description":"剑?这是什么东西?他们拿的只是比较锋利的骨头吧。"}, "soldier": {"name":"冥战士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "yellowKnight": {"name":"勇气骑士","hp":2000,"atk":500,"def":250,"money":1,"exp":30,"point":0,"special":[11],"charge":500,"description":"人们总是说,战斗,需要的就是勇气。而骑士,或许就站在了这勇气之巅了吧。有什么用呢?战场上,该死的时候就是得死,哪怕是在这远古时期,即使不是战场,一场战斗也足以决定生死。"}, @@ -113,7 +113,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "E536": {"name":"智慧法师","hp":2000,"atk":400,"def":200,"money":1,"exp":35,"point":0,"special":[13]}, "E537": {"name":"智慧蝴蝶","hp":1500,"atk":450,"def":200,"money":1,"exp":35,"point":0,"special":[5,14]}, "E538": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, - "E539": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, + "E539": {"name":"苍蓝恶魔","hp":7500,"atk":4500,"def":3000,"money":4,"exp":200,"point":0,"special":[8],"together":25}, "E544": {"name":"智慧具形","hp":2500,"atk":550,"def":225,"money":1,"exp":35,"point":0,"special":[]}, "E545": {"name":"勇气圣法","hp":3000,"atk":800,"def":350,"money":1,"exp":40,"point":0,"special":[13]}, "E546": {"name":"智慧信仰者","hp":2000,"atk":600,"def":250,"money":1,"exp":35,"point":0,"special":[]}, @@ -137,7 +137,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "E573": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E576": {"name":"智慧守卫","hp":7500,"atk":2500,"def":1250,"money":10,"exp":500,"point":0,"special":[1],"crit":250}, "E577": {"name":"智慧守护者","hp":15000,"atk":2500,"def":1200,"money":50,"exp":2500,"point":0,"special":[1],"crit":1000}, - "E578": {"name":"苍蓝守卫","hp":25000,"atk":8000,"def":4000,"money":5,"exp":600,"point":0,"special":[]}, + "E578": {"name":"苍蓝守卫","hp":25000,"atk":8000,"def":4000,"money":5,"exp":600,"point":0,"special":[1],"crit":300}, "E579": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E590": {"name":"冰封史莱姆","hp":7500,"atk":1750,"def":1000,"money":2,"exp":75,"point":0,"special":[20],"ice":25}, "E591": {"name":"新敌人","hp":10000,"atk":2000,"def":1000,"money":0,"exp":0,"point":0,"special":[]}, diff --git a/public/project/floors/MT50.js b/public/project/floors/MT50.js index b11d50f..d517fcc 100644 --- a/public/project/floors/MT50.js +++ b/public/project/floors/MT50.js @@ -63,8 +63,8 @@ main.floors.MT50= [648, 0, 0, 0, 0,129, 0, 0, 0,129, 0, 0, 0, 0,648], [648, 0,594, 0, 0,648,596,563,249,648, 0, 0, 0, 0,648], [648, 0, 0, 0, 0,648,656,601,243,648, 0,240, 0, 0,648], - [648, 0, 0, 0,103,648,618, 0,578,648,103, 0, 0, 0,648], - [648, 85,648,648,648,648, 0, 0, 0,648,648,648,648, 85,648], + [648, 0, 0, 0,103,648,618,539,578,648,103, 0, 0, 0,648], + [648, 85,648,648,648,648,219, 0,220,648,648,648,648, 85,648], [648, 0, 0, 0, 0, 0,484, 0,484, 0, 0, 0, 0, 0,648], [ 92, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 94], [648, 0, 0, 0, 0, 0,484, 0,484, 0, 0, 0, 0, 0,648], diff --git a/public/project/floors/MT51.js b/public/project/floors/MT51.js index bbe8532..ef3f9d7 100644 --- a/public/project/floors/MT51.js +++ b/public/project/floors/MT51.js @@ -24,30 +24,75 @@ main.floors.MT51= 0, 7 ] + }, + "0,8": { + "floorId": "MT52", + "loc": [ + 14, + 8 + ] } }, "beforeBattle": {}, - "afterBattle": {}, + "afterBattle": { + "11,12": [ + { + "type": "setValue", + "name": "flag:door_MT51_12_11", + "operator": "+=", + "value": "1" + } + ], + "13,12": [ + { + "type": "setValue", + "name": "flag:door_MT51_12_11", + "operator": "+=", + "value": "1" + } + ] + }, "afterGetItem": {}, "afterOpenDoor": {}, - "autoEvent": {}, + "autoEvent": { + "12,11": { + "0": { + "condition": "flag:door_MT51_12_11==2", + "currentFloor": true, + "priority": 0, + "delayExecute": false, + "multiExecute": false, + "data": [ + { + "type": "openDoor" + }, + { + "type": "setValue", + "name": "flag:door_MT51_12_11", + "operator": "=", + "value": "null" + } + ] + } + } + }, "cannotMove": {}, "cannotMoveIn": {}, "map": [ - [648,648,648,648,648,648,648, 0,648,648,648,648,648,648,648], - [648, 0, 0, 0, 0, 0, 0, 0,648, 0,648, 0, 0, 0,648], - [648, 0, 0, 0,648, 0, 0, 0,648, 0, 0, 0, 0, 0,648], - [648,648,648,648,648, 0,648,648,648, 0,648,648,648, 0,648], - [648, 0, 0, 0,648, 0, 0, 0, 0, 0,648, 0, 0, 0,648], - [648, 0,648, 0,648, 0,648,648,648, 0,648, 0, 0, 0,648], - [648, 0,648, 0, 0, 0, 0, 0, 0, 0,648,648,648,648,648], - [648, 0,648, 0,648,648, 0,648, 0,648,648, 0, 0, 0, 94], - [648, 0, 0, 0, 0,648, 0,648, 0, 0, 0, 0, 0, 0,648], - [648,648,648,648,648,648, 0,648, 0,648,648,648,648,648,648], - [648, 0, 0, 0, 0, 0, 0,648, 0, 0,648, 0,654, 0,648], - [648,648, 0,648, 0,648, 0,648,648, 0,648,648, 85,648,648], - [648, 0, 0,648, 0,648, 0,648, 0, 0,648, 0, 0, 0,648], - [648, 0, 0,648, 0,648, 0, 0, 0, 0,492, 0, 0, 0,648], + [648,648,648,648,648,648,648, 91,648,648,648,648,648,648,648], + [648, 0, 21, 0,596, 32, 0, 32,648, 27,648, 29, 0, 29,648], + [648, 27, 33, 28,648, 0,381, 0,648, 0,596, 0,378, 0,648], + [648,648,648,648,648, 0,648,648,648, 33,648,648,648,578,648], + [648,594, 33,381,648,539, 34,492, 0,243,648,376,403,378,648], + [648, 33,648,492,648, 0,648,648,648, 0,648, 33, 21, 33,648], + [648, 27,648, 0, 34, 0,219, 0, 34, 0,648,648,494,648,648], + [648,243,648,656,648,648, 0,648, 0,648,648, 27, 0, 0, 94], + [ 92, 0, 34, 0, 27,492, 34,648, 0, 0,539, 0,381, 0,648], + [648,648,648,648,648,648, 0,648,656,648,648,648,648,648,648], + [648, 0, 33, 0, 29, 0,219,648, 33, 0,648, 33,662, 33,648], + [648,648,601,648,492,648, 0,648,648,492,648,648, 85,648,648], + [648, 33, 0,648,482,648, 0,648,381, 0,648,596, 0,596,648], + [648, 0,378,648,482,648, 0,220, 0, 28,492, 0, 33, 0,648], [648,648,648,648,648,648,648,648,648,648,648,648,648,648,648] ], "bgmap": [ diff --git a/public/project/floors/MT52.js b/public/project/floors/MT52.js index 73ccd84..1a02613 100644 --- a/public/project/floors/MT52.js +++ b/public/project/floors/MT52.js @@ -1,45 +1,65 @@ main.floors.MT52= { -"floorId": "MT52", -"title": "苍蓝之殿-左下", -"name": "52", -"width": 15, -"height": 15, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"cannotViewMap": false, -"images": [], -"ratio": 8, -"defaultGround": "T650", -"bgm": "palaceSouth.mp3", -"firstArrive": [], -"eachArrive": [], -"parallelDo": "", -"events": {}, -"changeFloor": {}, -"beforeBattle": {}, -"afterBattle": {}, -"afterGetItem": {}, -"afterOpenDoor": {}, -"autoEvent": {}, -"cannotMove": {}, -"cannotMoveIn": {}, -"map": [ - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + "floorId": "MT52", + "title": "苍蓝之殿-左下", + "name": "52", + "width": 15, + "height": 15, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "cannotViewMap": false, + "images": [], + "ratio": 8, + "defaultGround": "T650", + "bgm": "palaceSouth.mp3", + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": {}, + "changeFloor": { + "14,8": { + "floorId": "MT51", + "loc": [ + 0, + 8 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [648,648,648,648, 91,648,648,648,648,648,648,648,648,648,648], + [648, 0, 0,648, 0,648,376,491,648,249,376,648,578, 0,648], + [648, 0, 0,648,243,648, 22,403, 85,403,491, 85, 0, 0,648], + [648, 0, 0,220, 0,648,378,491,648,249,378,648,578, 0,648], + [648,648,648,648, 0,648,648,648,648,648,648,648,648, 0,648], + [648, 0, 0,648, 0,648, 0, 0,648, 0, 0,648, 0, 0,648], + [648, 0, 0,492, 0,648, 0, 0, 0, 0, 0, 0, 0, 0,648], + [648, 0, 0,648, 0,648,648,219,648,648,648,648,648,648,648], + [648,601,648,648,656, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94], + [648, 0, 0,648,648,648,648,494,648,648,648,648,497,648,648], + [648, 0, 0,648, 0,539, 0, 0, 0,648, 0, 0, 0, 0,648], + [648,596,648,648,648,648,648,243,648,648,648, 0,648,648,648], + [648, 0, 0,648, 0, 0,648, 0, 0,648, 0, 0, 0, 0,648], + [648, 0, 0, 0, 0, 0, 0, 0, 0,240, 0, 0, 0, 0,648], + [648,648,648,648,648,648,648,648,648,648,648,648,648,648,648] ], + "bgmap": [ + +], + "fgmap": [ + +], + "bg2map": [ + +], + "fg2map": [ + +] } \ No newline at end of file diff --git a/public/project/icons.js b/public/project/icons.js index 7a4e020..25c8ba0 100644 --- a/public/project/icons.js +++ b/public/project/icons.js @@ -619,7 +619,11 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 = "I575": 100, "I589": 101, "I641": 102, - "I642": 103 + "I642": 103, + "I662": 104, + "I663": 105, + "I664": 106, + "I665": 107 }, "autotile": { "autotile": 0, diff --git a/public/project/items.js b/public/project/items.js index 48249a1..cc4ad93 100644 --- a/public/project/items.js +++ b/public/project/items.js @@ -1235,5 +1235,39 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "canUseItemEffect": "true", "useItemEffect": "Mota.require('var', 'mainUi')open('achievement');", "text": "可以查看成就" + }, + "I662": { + "cls": "equips", + "name": "天蓝石", + "canUseItemEffect": "true", + "equip": { + "type": "饰品", + "value": {}, + "percentage": { + "hpmax": 10 + } + }, + "text": "或许是苍蓝之灵的杰作,可以让使用者的恢复能力增强。生命回复增加10%" + }, + "I663": { + "cls": "items", + "name": "地灵华", + "canUseItemEffect": "true", + "text": "一个用大地之力制造出的饰品,貌似对魔法攻击有抵抗作用。装备后,对魔攻怪会有50%的防御力(即防御的一半充当抵消魔攻的防御,勇士受到的伤害变为 怪物攻击 - 勇士防御 / 2)", + "equip": { + "type": "饰品", + "value": {}, + "percentage": {} + } + }, + "I664": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" + }, + "I665": { + "cls": "items", + "name": "新物品", + "canUseItemEffect": "true" } } \ No newline at end of file diff --git a/public/project/maps.js b/public/project/maps.js index ae36ada..4b64fa0 100644 --- a/public/project/maps.js +++ b/public/project/maps.js @@ -590,6 +590,10 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e = "659": {"cls":"enemys","id":"E659"}, "660": {"cls":"terrains","id":"T660"}, "661": {"cls":"terrains","id":"T661"}, + "662": {"cls":"items","id":"I662"}, + "663": {"cls":"items","id":"I663"}, + "664": {"cls":"items","id":"I664"}, + "665": {"cls":"items","id":"I665"}, "20032": {"cls":"tileset","id":"X20032","cannotOut":["up","left"],"cannotIn":["up","left"]}, "20033": {"cls":"tileset","id":"X20033","cannotOut":["up"],"cannotIn":["up"]}, "20034": {"cls":"tileset","id":"X20034","cannotOut":["up","right"],"cannotIn":["up","right"]}, diff --git a/public/project/materials/items.png b/public/project/materials/items.png index 860669c..777caee 100644 Binary files a/public/project/materials/items.png and b/public/project/materials/items.png differ diff --git a/src/core/audio/bgm.ts b/src/core/audio/bgm.ts index 89c5fe2..3ae3fc5 100644 --- a/src/core/audio/bgm.ts +++ b/src/core/audio/bgm.ts @@ -67,7 +67,7 @@ export class BgmController * @param when 切换至的歌从什么时候开始播放,默认-1,表示不改变,整数表示设置为目标值 */ changeTo(id: BgmIds, when: number = -1, noStack: boolean = false) { - if (id === this.now) return; + if (id === this.now) return this.resume(); let prevent = false; const preventDefault = () => { prevent = true; diff --git a/src/core/main/init/hotkey.ts b/src/core/main/init/hotkey.ts index d0fa46c..8b3b490 100644 --- a/src/core/main/init/hotkey.ts +++ b/src/core/main/init/hotkey.ts @@ -1,6 +1,11 @@ import { KeyCode } from '@/plugin/keyCodes'; import { Hotkey, HotkeyJSON } from '../custom/hotkey'; -import { generateBinary, keycode, openDanmakuPoster } from '@/plugin/utils'; +import { + generateBinary, + keycode, + openDanmakuPoster, + tip +} from '@/plugin/utils'; import { hovered } from './fixed'; import { hasMarkedEnemy, markEnemy, unmarkEnemy } from '@/plugin/mark'; import { mainUi } from './ui'; @@ -203,6 +208,23 @@ gameKey alt: true }) // -------------------- + .group('skill', '技能按键') + .register({ + id: 'skill1', + name: '断灭之刃', + defaults: KeyCode.Digit1 + }) + .register({ + id: 'skill2', + name: '跳跃', + defaults: KeyCode.Digit2 + }) + .register({ + id: 'skill3', + name: '铸剑为盾', + defaults: KeyCode.Digit3 + }) + // -------------------- .group('system', '系统按键') .register({ id: 'restart', @@ -500,6 +522,41 @@ gameKey }) .realize('comment', () => { core.actions._clickGameInfo_openComments(); + }) + .realize('skill1', () => { + if (!flags.bladeOn) return; + if (flags.autoSkill) { + tip('error', '已开启自动切换技能!'); + return; + } + core.playSound('光标移动'); + if (flags.blade) flags.blade = false; + else flags.blade = true; + core.updateStatusBar(); + }) + .realize('skill2', () => { + if ( + !flags.chase && + !core.status.floorId.startsWith('tower') && + flags.skill2 + ) { + Mota.Plugin.require('skill_g').jumpSkill(); + } else { + if (core.hasItem('pickaxe')) { + core.useItem('pickaxe'); + } + } + }) + .realize('skill3', () => { + if (!flags.shieldOn) return; + if (flags.autoSkill) { + tip('error', '已开启自动切换技能!'); + return; + } + core.playSound('光标移动'); + if (flags.shield) flags.shield = false; + else flags.shield = true; + core.updateStatusBar(); }); // ----- Storage diff --git a/src/plugin/fx/gameCanvas.ts b/src/plugin/fx/gameCanvas.ts index 2fef4da..8d454cc 100644 --- a/src/plugin/fx/gameCanvas.ts +++ b/src/plugin/fx/gameCanvas.ts @@ -12,10 +12,7 @@ export function setGameCanvasFilter(filter: string) { }); } -const filterMap: [FloorIds[], string][] = [ - [['MT50'], 'brightness(80%)contrast(120%)'], // 童心佬的滤镜( - [['MT51'], 'brightness(90%)contrast(120%)'] // 童心佬的滤镜( -]; +const filterMap: [FloorIds[], string][] = []; export function getCanvasFilterByFloorId( floorId: FloorIds = core.status.floorId @@ -28,3 +25,9 @@ export function setCanvasFilterByFloorId( ) { setGameCanvasFilter(getCanvasFilterByFloorId(floorId)); } + +Mota.require('var', 'loading').once('coreInit', () => { + filterMap.push( + [core.floorIds.slice(60), 'brightness(80%)contrast(120%)'] // 童心佬的滤镜( + ); +}); diff --git a/src/plugin/game/enemy/checkblock.ts b/src/plugin/game/enemy/checkblock.ts index 4a59174..34f2416 100644 --- a/src/plugin/game/enemy/checkblock.ts +++ b/src/plugin/game/enemy/checkblock.ts @@ -116,6 +116,7 @@ function checkMockery(loc: string, force: boolean = false) { const dir = x > tx ? 'left' : x < tx ? 'right' : y > ty ? 'up' : 'down'; const { x: dx, y: dy } = core.utils.scan[dir]; + action.push({ type: 'forbidSave', forbid: true }); action.push({ type: 'changePos', direction: dir }); const blocks = core.getMapBlocksObj(); while (1) { @@ -164,6 +165,7 @@ function checkMockery(loc: string, force: boolean = false) { function: `function() { core.checkBlock(true); }` }); action.push({ type: 'stopAsync' }); + action.push({ type: 'forbidSave' }); core.insertAction(action); } } diff --git a/src/plugin/game/fx/halo.ts b/src/plugin/game/fx/halo.ts index 6cb5ad6..a30f1cb 100644 --- a/src/plugin/game/fx/halo.ts +++ b/src/plugin/game/fx/halo.ts @@ -3,7 +3,7 @@ const haloColor: Record = { 25: ['purple'], 26: ['blue'], 27: ['red'], - 29: ['#BD0D0D'] + 29: ['#C3D100'] }; export function drawHalo( diff --git a/src/plugin/game/fx/itemDetail.ts b/src/plugin/game/fx/itemDetail.ts index c0370c4..5beffdc 100644 --- a/src/plugin/game/fx/itemDetail.ts +++ b/src/plugin/game/fx/itemDetail.ts @@ -105,6 +105,7 @@ function drawItemDetail(diff: any, x: number, y: number) { if (typeof diff[name] === 'number') content = core.formatBigNumber(diff[name], true); else content = diff[name]; + switch (name) { case 'atk': case 'atkper': @@ -125,6 +126,7 @@ function drawItemDetail(diff: any, x: number, y: number) { case 'hpmaxper': color = '#F9FF00'; break; + case 'manaper': case 'mana': color = '#c66'; break; diff --git a/src/plugin/game/replay.ts b/src/plugin/game/replay.ts index 6c96016..b0e88e7 100644 --- a/src/plugin/game/replay.ts +++ b/src/plugin/game/replay.ts @@ -116,4 +116,32 @@ export function init() { core.replay(); return true; }); + + core.registerReplayAction('skill', name => { + if (!name.startsWith('skill:')) return false; + const [type, skill] = name.split(':'); + if (skill === '1') { + if (flags.autoSkill || !flags.bladeOn) return true; + if (flags.blade) flags.blade = false; + else flags.blade = true; + } else if (skill === '2') { + if ( + !flags.chase && + !core.status.floorId.startsWith('tower') && + flags.skill2 + ) { + Mota.Plugin.require('skill_g').jumpSkill(); + } else { + if (core.hasItem('pickaxe')) { + core.useItem('pickaxe'); + } + } + } else if (skill === '3') { + if (flags.autoSkill || !flags.shieldOn) return true; + if (flags.shield) flags.shield = false; + else flags.shield = true; + } + core.updateStatusBar(); + return true; + }); } diff --git a/src/plugin/shadow/gameShadow.ts b/src/plugin/shadow/gameShadow.ts index 310912c..e675502 100644 --- a/src/plugin/shadow/gameShadow.ts +++ b/src/plugin/shadow/gameShadow.ts @@ -95,11 +95,23 @@ const shadowInfo: Partial> = { color: 'transparent', followHero: true } + ], + MT52: [ + { + id: 'mt52_hero', + x: 0, + y: 0, + decay: 50, + r: 250, + color: 'transparent', + followHero: true + } ] }; const backgroundInfo: Partial> = { MT50: pColor('#0006'), - MT51: pColor('#0004') + MT51: pColor('#0004'), + MT52: pColor('#0004') }; const blurInfo: Partial> = {}; const immersionInfo: Partial> = {}; diff --git a/src/plugin/shadow/shadow.ts b/src/plugin/shadow/shadow.ts index 58c2402..a28234e 100644 --- a/src/plugin/shadow/shadow.ts +++ b/src/plugin/shadow/shadow.ts @@ -68,6 +68,7 @@ export function initShadowCanvas() { const h = core._PY_ ?? core.__PIXELS__; ctx = core.createCanvas('shadow', -32, -32, w + 64, h + 64, 55); canvas = ctx.canvas; + const s = core.domStyle.scale * devicePixelRatio; temp1.width = (w + 64) * s; temp1.height = (h + 64) * s; diff --git a/src/source/cls.d.ts b/src/source/cls.d.ts index e62e37d..f1fa72e 100644 --- a/src/source/cls.d.ts +++ b/src/source/cls.d.ts @@ -589,6 +589,10 @@ interface IdToCls { E659: 'enemys'; T660: 'terrains'; T661: 'terrains'; + I662: 'items'; + I663: 'items'; + I664: 'items'; + I665: 'items'; X20032: 'tileset'; X20033: 'tileset'; X20034: 'tileset'; diff --git a/src/source/items.d.ts b/src/source/items.d.ts index 307232e..7937681 100644 --- a/src/source/items.d.ts +++ b/src/source/items.d.ts @@ -187,4 +187,8 @@ interface ItemDeclaration { I589: 'equips'; I641: 'equips'; I642: 'constants'; + I662: 'equips'; + I663: 'items'; + I664: 'items'; + I665: 'items'; } \ No newline at end of file diff --git a/src/source/maps.d.ts b/src/source/maps.d.ts index 51d51cc..5967582 100644 --- a/src/source/maps.d.ts +++ b/src/source/maps.d.ts @@ -589,6 +589,10 @@ interface IdToNumber { E659: 659; T660: 660; T661: 661; + I662: 662; + I663: 663; + I664: 664; + I665: 665; X20032: 20032; X20033: 20033; X20034: 20034; @@ -1263,6 +1267,10 @@ interface NumberToId { 659: 'E659'; 660: 'T660'; 661: 'T661'; + 662: 'I662'; + 663: 'I663'; + 664: 'I664'; + 665: 'I665'; 20032: 'X20032'; 20033: 'X20033'; 20034: 'X20034'; diff --git a/src/ui/start.vue b/src/ui/start.vue index 6f2192b..886f735 100644 --- a/src/ui/start.vue +++ b/src/ui/start.vue @@ -208,10 +208,9 @@ gameKey }); function bgm() { - core.triggerBgm(); + // core.triggerBgm(); soundChecked.value = !soundChecked.value; mainSetting.setValue('audio.bgmEnabled', soundChecked.value); - console.log(mainSetting.getValue('audio.bgmEnabled')); } async function setFullscreen() { @@ -642,4 +641,19 @@ onUnmounted(() => { transform: translateX(-20px); opacity: 0; } + +@media screen and (max-width: 600px) { + #buttons { + font-size: 250%; + } + + #start-main { + #title { + font-size: 700%; + } + #settings { + font-size: 400%; + } + } +}