mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-18 20:09:27 +08:00
修复录像,修复部分bug,彻底完工
This commit is contained in:
parent
ebd94fc373
commit
e4a556329b
3
.gitignore
vendored
3
.gitignore
vendored
@ -31,4 +31,5 @@ story.md
|
||||
dist.rar
|
||||
*.h5save
|
||||
*.h5route
|
||||
index.cjs
|
||||
index.cjs
|
||||
!public/swap/*.h5save
|
@ -1,4 +1,5 @@
|
||||
vite.config.ts
|
||||
public/project/data.js
|
||||
story.md
|
||||
public/project/floors/*.js
|
||||
public/project/floors/*.js
|
||||
public/project/items.js
|
@ -18,7 +18,7 @@ main.floors.MT0=
|
||||
[141, 34, 34,141, 0,141, 0, 0, 0,141, 0,494,482,482,20040],
|
||||
[141, 33, 33,492, 0,141, 0, 0, 0,141, 0,141, 33, 33,20040],
|
||||
[141, 34, 34,141, 0,141, 0, 0, 0,141, 0,141,141,141,20040],
|
||||
[141,141,141,141, 0, 0, 0,141, 0, 0, 0,141, 33, 33,20040],
|
||||
[141,141,141,141, 92, 0, 0,141, 0, 0, 0,141, 33, 33,20040],
|
||||
[141, 34, 34,141, 0,141, 0, 0, 0,141, 0,494,482,482,20040],
|
||||
[141, 33, 33,492, 0,141, 0,642, 0,141, 0,141, 33, 33,20040],
|
||||
[141, 34, 34,141, 0,141, 45,559, 46,141, 0,141,141,141,20040],
|
||||
@ -55,6 +55,20 @@ main.floors.MT0=
|
||||
],
|
||||
"6,13": [
|
||||
"原声音乐可以在网易云音乐搜索:魔塔 人类:开天辟地 bgm,部分音乐因为版权问题可能无法播放或者不在歌单内"
|
||||
],
|
||||
"3,7": [
|
||||
"这里允许你跳转到第二章。如果你没玩过第一章,那么建议自己游玩,如果玩过却又不想再打一遍,可以由此跳转",
|
||||
{
|
||||
"type": "confirm",
|
||||
"text": "是否跳转到第二章?",
|
||||
"yes": [
|
||||
{
|
||||
"type": "function",
|
||||
"function": "function(){\ncore.swapChapter(2, flags.hard);\n}"
|
||||
}
|
||||
],
|
||||
"no": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"changeFloor": {
|
||||
|
@ -70,7 +70,7 @@ main.floors.MT16=
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": "function(){\ncore.status.maps.MT14.canFlyFrom = false\n}"
|
||||
"function": "function(){\ncore.status.maps.MT14.canFlyFrom = false;\ncore.chaseInit1();\n}"
|
||||
},
|
||||
{
|
||||
"type": "show",
|
||||
|
@ -81,6 +81,10 @@ main.floors.MT18=
|
||||
],
|
||||
"beforeBattle": {},
|
||||
"cannotMoveIn": {},
|
||||
"bg2map": [],
|
||||
"fg2map": []
|
||||
"bg2map": [
|
||||
|
||||
],
|
||||
"fg2map": [
|
||||
|
||||
]
|
||||
}
|
@ -24,7 +24,7 @@ main.floors.MT21=
|
||||
"true": [
|
||||
{
|
||||
"type": "confirm",
|
||||
"text": "是否提交第一章成绩?",
|
||||
"text": "是否提交第一章成绩?\n提交将结束游戏,结算第一章成绩,否则将继续第二章",
|
||||
"yes": [
|
||||
"计分方式:生命+黄*5000+蓝*15000",
|
||||
{
|
||||
|
@ -1747,7 +1747,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
checkLoopMap();
|
||||
|
||||
// 追猎
|
||||
if (core.status.checkBlock.haveHunt) {
|
||||
if (
|
||||
core.status.checkBlock.haveHunt &&
|
||||
!core
|
||||
.getBlockId(core.status.hero.loc.x, core.status.hero.loc.y)
|
||||
?.endsWith('Portal')
|
||||
) {
|
||||
var x = core.status.hero.loc.x,
|
||||
y = core.status.hero.loc.y;
|
||||
core.status.maps[core.status.floorId].blocks.forEach(function (
|
||||
|
@ -40,8 +40,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "items",
|
||||
"name": "小绿宝石",
|
||||
"text": ",护盾+${core.values.greenGem}",
|
||||
"itemEffect": "core.status.hero.mdef += 20 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${20 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)}",
|
||||
"itemEffect": "core.status.hero.mdef += 20 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${20 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)}",
|
||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
@ -626,8 +626,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "items",
|
||||
"name": "中绿宝石",
|
||||
"text": ",护盾+${core.values.greenGem}",
|
||||
"itemEffect": "core.status.hero.mdef += 40 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${40 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)}",
|
||||
"itemEffect": "core.status.hero.mdef += 40 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${40 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)}",
|
||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
@ -729,8 +729,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "items",
|
||||
"name": "大绿宝石",
|
||||
"text": ",护盾+${core.values.greenGem}",
|
||||
"itemEffect": "core.status.hero.mdef += 80 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${80 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)}",
|
||||
"itemEffect": "core.status.hero.mdef += 80 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${80 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)}",
|
||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
@ -896,8 +896,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "items",
|
||||
"name": "超大绿宝石",
|
||||
"text": ",护盾+${core.values.greenGem}",
|
||||
"itemEffect": "core.status.hero.mdef += 160 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${160 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)}",
|
||||
"itemEffect": "core.status.hero.mdef += 160 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${160 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)}",
|
||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
@ -1019,8 +1019,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "items",
|
||||
"name": "璀璨绿宝石",
|
||||
"text": ",护盾+${core.values.greenGem}",
|
||||
"itemEffect": "core.status.hero.mdef += 320 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${320 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)}",
|
||||
"itemEffect": "core.status.hero.mdef += 320 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${320 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)}",
|
||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
@ -1050,8 +1050,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "items",
|
||||
"name": "新物品",
|
||||
"text": ",防御+${core.values.blueGem}",
|
||||
"itemEffect": "core.status.hero.mdef += 640 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${640 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)}",
|
||||
"itemEffect": "core.status.hero.mdef += 640 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${640 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)}",
|
||||
"useItemEffect": "core.status.hero.def += core.values.blueGem",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
@ -1071,8 +1071,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "items",
|
||||
"name": "史诗绿宝石",
|
||||
"text": ",护盾+${core.values.greenGem}",
|
||||
"itemEffect": "core.status.hero.mdef += 1280 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${1280 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(11) / 20 + 1)}",
|
||||
"itemEffect": "core.status.hero.mdef += 1280 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)",
|
||||
"itemEffectTip": ",智慧+${1280 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (core.plugin.skillTree.getSkillLevel(12) / 20 + 1)}",
|
||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
|
1
public/swap/2.easy.h5save
Normal file
1
public/swap/2.easy.h5save
Normal file
File diff suppressed because one or more lines are too long
1
public/swap/2.hard.h5save
Normal file
1
public/swap/2.hard.h5save
Normal file
File diff suppressed because one or more lines are too long
@ -79,7 +79,9 @@
|
||||
"<br>",
|
||||
"2. 影法师",
|
||||
"<br>",
|
||||
"3. 夜战天明889"
|
||||
"3. 夜战天明889",
|
||||
"<br>",
|
||||
"4. 霸道的老鼠"
|
||||
]
|
||||
},
|
||||
"tutorial": {
|
||||
|
@ -2,9 +2,10 @@ import { Animation, circle, hyper, sleep, TimingFn } from 'mutate-animate';
|
||||
import { completeAchievement } from '../ui/achievement';
|
||||
import { has } from '../utils';
|
||||
import { ChaseCameraData, ChasePath, getChaseDataByIndex } from './data';
|
||||
import { init1 } from './chase1';
|
||||
|
||||
export default function init() {
|
||||
return { startChase };
|
||||
return { startChase, chaseInit1: init1 };
|
||||
}
|
||||
|
||||
export function shake2(power: number, timing: TimingFn): TimingFn {
|
||||
@ -31,7 +32,7 @@ export class Chase {
|
||||
*/
|
||||
showPath: boolean = false;
|
||||
|
||||
endFn?: () => void;
|
||||
endFn?: (lose: boolean) => void;
|
||||
|
||||
/**
|
||||
* 开始一个追逐战
|
||||
@ -213,14 +214,14 @@ export class Chase {
|
||||
* 当追逐战结束后执行函数
|
||||
* @param fn 执行的函数
|
||||
*/
|
||||
onEnd(fn: () => void) {
|
||||
onEnd(fn: (lose: boolean) => void) {
|
||||
this.endFn = fn;
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束这个追逐战
|
||||
*/
|
||||
end() {
|
||||
end(lose: boolean = false) {
|
||||
this.ani.ticker.destroy();
|
||||
delete flags.onChase;
|
||||
delete flags.chase;
|
||||
@ -229,7 +230,7 @@ export class Chase {
|
||||
delete flags.chaseIndex;
|
||||
flags.__lockViewport__ = false;
|
||||
core.deleteCanvas('chasePath');
|
||||
if (this.endFn) this.endFn();
|
||||
if (this.endFn) this.endFn(lose);
|
||||
}
|
||||
}
|
||||
|
||||
@ -248,9 +249,9 @@ export async function startChase(index: number) {
|
||||
const hard = flags.chaseHard;
|
||||
|
||||
// 成就
|
||||
chase.onEnd(() => {
|
||||
chase.onEnd(lose => {
|
||||
if (hard === 1) {
|
||||
if (index === 1) {
|
||||
if (index === 1 && !lose) {
|
||||
completeAchievement('challenge', 0);
|
||||
}
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ export async function wolfMove(chase: Chase) {
|
||||
export function judgeFail1(chase: Chase) {
|
||||
chase.ani.ticker.add(() => {
|
||||
if (core.status.hero.loc.x > core.bigmap.offsetX / 32 + 17) {
|
||||
chase.end();
|
||||
chase.end(true);
|
||||
ani.time(750).apply('rect', 0);
|
||||
core.lose('逃跑失败');
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ watch(useFixed, n => {
|
||||
core.setLocalStorage('useFixed', n);
|
||||
});
|
||||
|
||||
watch(autoSkill, n => {
|
||||
watch(autoLocate, n => {
|
||||
flags.autoLocate = n;
|
||||
core.updateStatusBar();
|
||||
core.status.route.push(`set:autoLocate:${n}`);
|
||||
@ -101,9 +101,9 @@ function resetFlag() {
|
||||
flags.itemDetail ??= true;
|
||||
flags.autoLocate ??= true;
|
||||
|
||||
itemDetail.value = flags.itemDetail ? true : false;
|
||||
autoSkill.value = flags.autoSkill ? true : false;
|
||||
autoLocate.value = flags.autoLocate ? true : false;
|
||||
itemDetail.value = !!flags.itemDetail;
|
||||
autoSkill.value = !!flags.autoSkill;
|
||||
autoLocate.value = !!flags.autoLocate;
|
||||
}
|
||||
|
||||
export async function triggerFullscreen() {
|
||||
|
@ -5,6 +5,8 @@ import { isNil } from 'lodash';
|
||||
import { Animation, sleep, TimingFn } from 'mutate-animate';
|
||||
import { ComputedRef, ref } from 'vue';
|
||||
import { EVENT_KEY_CODE_MAP } from './keyCodes';
|
||||
import axios from 'axios';
|
||||
import { decompressFromBase64 } from 'lz-string';
|
||||
|
||||
type CanParseCss = keyof {
|
||||
[P in keyof CSSStyleDeclaration as CSSStyleDeclaration[P] extends string
|
||||
@ -15,7 +17,14 @@ type CanParseCss = keyof {
|
||||
};
|
||||
|
||||
export default function init() {
|
||||
return { has, getDamageColor, parseCss, tip, changeLocalStorage };
|
||||
return {
|
||||
has,
|
||||
getDamageColor,
|
||||
parseCss,
|
||||
tip,
|
||||
changeLocalStorage,
|
||||
swapChapter
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@ -228,3 +237,20 @@ export function changeLocalStorage<T>(
|
||||
const to = fn(now);
|
||||
core.setLocalStorage(name, to);
|
||||
}
|
||||
|
||||
export async function swapChapter(chapter: number, hard: number) {
|
||||
const h = hard === 2 ? 'hard' : 'easy';
|
||||
const save = await axios.get(
|
||||
`${import.meta.env.BASE_URL}swap/${chapter}.${h}.h5save`,
|
||||
{
|
||||
responseType: 'text',
|
||||
responseEncoding: 'utf-8'
|
||||
}
|
||||
);
|
||||
const data = JSON.parse(decompressFromBase64(save.data));
|
||||
|
||||
core.loadData(data.data, () => {
|
||||
core.removeFlag('__fromLoad__');
|
||||
core.drawTip('读档成功');
|
||||
});
|
||||
}
|
||||
|
@ -146,6 +146,9 @@ function click(id: keyof Settings) {
|
||||
}
|
||||
if (!ignore.includes(id)) {
|
||||
settings[id].value = !settings[id].value;
|
||||
if (id === 'autoSkill') {
|
||||
core.status.route.push(`set:autoSkill:${settings.autoSkill.value}`);
|
||||
}
|
||||
} else {
|
||||
if (id === 'fullscreen') {
|
||||
triggerFullscreen();
|
||||
|
Loading…
Reference in New Issue
Block a user