mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-16 20:24:31 +08:00
第二章二区准备
This commit is contained in:
1 parent
98123bede8
commit
b84b1e6137
57 files changed
+1502
-155
No files matched your search
+7
-2
@@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div id="non-ui">
|
||||
<StatusBar v-if="showStatusBar"></StatusBar>
|
||||
<MarkedEnemy v-if="showMarkedEnemy"></MarkedEnemy>
|
||||
<MarkedEnemy v-if="showMarkedEnemy && showStatusBar"></MarkedEnemy>
|
||||
<Studied
|
||||
v-if="showStudiedSkill && showStatusBar && showStudied"
|
||||
></Studied>
|
||||
<Chapter v-if="chapterShowed" :chapter="chapterContent"></Chapter>
|
||||
</div>
|
||||
</template>
|
||||
@@ -9,11 +12,13 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import StatusBar from './ui/statusBar.vue';
|
||||
import { showStatusBar } from './plugin/uiController';
|
||||
import { showStatusBar, showStudiedSkill } from './plugin/uiController';
|
||||
import MarkedEnemy from './ui/markedEnemy.vue';
|
||||
import Chapter from './ui/chapter.vue';
|
||||
import { chapterContent, chapterShowed } from './plugin/ui/chapter';
|
||||
import { showMarkedEnemy } from './plugin/mark';
|
||||
import Studied from './ui/studied.vue';
|
||||
import { showStudied } from './plugin/settings';
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
+32
-20
@@ -3,7 +3,12 @@
|
||||
<div :id="`box-main-${id}`" class="box-main" @click="click">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div :id="`box-move-${id}`" class="box-move" :selected="moveSelected">
|
||||
<div
|
||||
v-if="dragable"
|
||||
:id="`box-move-${id}`"
|
||||
class="box-move"
|
||||
:selected="moveSelected"
|
||||
>
|
||||
<drag-outlined
|
||||
:id="`box-drag-${id}`"
|
||||
class="box-drag"
|
||||
@@ -14,21 +19,25 @@
|
||||
class="border border-vertical border-left"
|
||||
:id="`border-left-${id}`"
|
||||
:selected="moveSelected && resizable"
|
||||
:selectable="resizable"
|
||||
></div>
|
||||
<div
|
||||
class="border border-horizontal border-top"
|
||||
:id="`border-top-${id}`"
|
||||
:selected="moveSelected && resizable"
|
||||
:selectable="resizable"
|
||||
></div>
|
||||
<div
|
||||
class="border border-vertical border-right"
|
||||
:id="`border-right-${id}`"
|
||||
:selected="moveSelected && resizable"
|
||||
:selectable="resizable"
|
||||
></div>
|
||||
<div
|
||||
class="border border-horizontal border-bottom"
|
||||
:id="`border-bottom-${id}`"
|
||||
:selected="moveSelected && resizable"
|
||||
:selectable="resizable"
|
||||
></div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -41,6 +50,7 @@ import { has } from '../plugin/utils';
|
||||
import { sleep } from 'mutate-animate';
|
||||
|
||||
const props = defineProps<{
|
||||
dragable?: boolean;
|
||||
resizable?: boolean;
|
||||
left?: number;
|
||||
top?: number;
|
||||
@@ -162,18 +172,20 @@ onMounted(async () => {
|
||||
|
||||
if (!main) return;
|
||||
|
||||
useDrag(
|
||||
drag,
|
||||
dragFn,
|
||||
(x, y) => {
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
},
|
||||
() => {
|
||||
moveSelected.value = false;
|
||||
},
|
||||
true
|
||||
);
|
||||
if (props.dragable) {
|
||||
useDrag(
|
||||
drag,
|
||||
dragFn,
|
||||
(x, y) => {
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
},
|
||||
() => {
|
||||
moveSelected.value = false;
|
||||
},
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
if (props.resizable) {
|
||||
useDrag(
|
||||
@@ -202,7 +214,7 @@ onMounted(async () => {
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
cancelGlobalDrag(dragFn);
|
||||
if (props.dragable) cancelGlobalDrag(dragFn);
|
||||
if (props.resizable) {
|
||||
cancelGlobalDrag(leftDrag);
|
||||
cancelGlobalDrag(topDrag);
|
||||
@@ -264,13 +276,13 @@ onUnmounted(() => {
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.border-horizontal[selected='true'] {
|
||||
.border-horizontal[selected='true'][selectable='true'] {
|
||||
transform: scaleY(300%);
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.border-horizontal:hover,
|
||||
.border-horizontal:active {
|
||||
.border-horizontal:hover[selectable='true'],
|
||||
.border-horizontal:active[selectable='true'] {
|
||||
transform: scaleY(500%);
|
||||
cursor: ns-resize;
|
||||
}
|
||||
@@ -281,13 +293,13 @@ onUnmounted(() => {
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.border-vertical[selected='true'] {
|
||||
.border-vertical[selected='true'][selectable='true'] {
|
||||
transform: scaleX(300%);
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
.border-vertical:hover,
|
||||
.border-vertical:active {
|
||||
.border-vertical:hover[selectable='true'],
|
||||
.border-vertical:active[selectable='true'] {
|
||||
transform: scaleX(500%);
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
+45
-5
@@ -10,16 +10,16 @@
|
||||
"本百科全书字数很多,可以选择性地阅读。</span>",
|
||||
"<br>",
|
||||
"<br>",
|
||||
"2. 本塔中<span style=\"color: gold\">几乎所有 ui </span>都可以纵向滚动,如果发现显示不全,",
|
||||
"2. 本百科全书的内容会<span style=\"color: gold\">随着游戏的推进而增加新内容</span>,",
|
||||
"同时每次增加新内容时都会有提示。",
|
||||
"<br>",
|
||||
"<br>",
|
||||
"3. 本塔中<span style=\"color: gold\">几乎所有 ui </span>都可以纵向滚动,如果发现显示不全,",
|
||||
"可以尝试上下拖动,就像浏览网页一样。电脑端还可以使用滚轮上下滚动。",
|
||||
"大部分可以纵向滚动的 ui 都会在右方有一个滚动条,也可以拖动它进行滚动,例如本百科全书的条目列表和",
|
||||
"条目说明都是可以通过上述方式滚动的。",
|
||||
"<br>",
|
||||
"<br>",
|
||||
"3. 本百科全书的内容会<span style=\"color: gold\">随着游戏的推进而增加新内容</span>,",
|
||||
"同时每次增加新内容时都会有提示。",
|
||||
"<br>",
|
||||
"<br>",
|
||||
"4. 本塔主要面向电脑端设计,",
|
||||
"<span style=\"color: gold\">建议使用电脑游玩以获得更好的游戏体验</span>。但是手机依然可以游玩本塔,",
|
||||
"但部分操作可能不是很方便,ui 也可能不是很美观,不过依然可以完整体验本游戏。",
|
||||
@@ -406,6 +406,46 @@
|
||||
"这些技能一般需要尽早点出。"
|
||||
]
|
||||
},
|
||||
"study": {
|
||||
"text": "学习",
|
||||
"condition": "core.getSkillLevel(11) > 0",
|
||||
"desc": [
|
||||
"本条目会详细说明学习的机制与所有可以被学习的技能被学习后的效果。当前已经学习的技能会以与状态栏类似的盒子展示出来。",
|
||||
"<br>",
|
||||
"<br>",
|
||||
"首先,学习技能消耗的智慧点会越来越多,初始消耗的智慧点为500,每学习一次增加250。",
|
||||
"学习的技能可以持续5场战斗,在技能树界面每升级一次增加3场,",
|
||||
"<span style=\"color: gold\">当前为${core.getSkillLevel(11) * 3 + 2}场</span>。",
|
||||
"学习后对应属性的值,例如抱团怪增加的属性百分比,会与被学习的怪物相同。学习界面可以使用背包中的道具或点击状态栏打开。",
|
||||
"<br>",
|
||||
"<br>",
|
||||
"下面会详细说明每一种可以被学习的技能被学习后的效果,没有列出的均不可学习。",
|
||||
"<br>",
|
||||
"<br>",
|
||||
"<span style=\"color: #fc3\">1. 致命一击</span>:勇士每5回合对怪物造成一次强力攻击。",
|
||||
"<br>",
|
||||
"<span style=\"color: #bbb0ff\">2. 恶毒</span>:勇士攻击无视怪物的防御。",
|
||||
"<br>",
|
||||
"<span style=\"color: #c0b088\">3. 坚固</span>:勇士防御不低于怪物的攻击-1。",
|
||||
"<br>",
|
||||
"<span style=\"color: #fe7\">4. n连击</span>:勇士每回合攻击n次",
|
||||
"<br>",
|
||||
"<span style=\"color: #b30000\">5. 饥渴</span>:勇士在战前吸取怪物一定量的攻击加载自己身上,",
|
||||
"同时减少怪物相应量的攻击,优先于怪物。",
|
||||
"<br>",
|
||||
"<span style=\"color: #fa4\">6. 抱团</span>:勇士周围每有一个拥有抱团属性的怪物,勇士的属性便增加一定值。",
|
||||
"相应地,拥有抱团属性的怪物也会受到勇士的加成。",
|
||||
"<br>",
|
||||
"<span style=\"color: #b0c0dd\">7. 勇气之刃</span>:勇士第一回合造成一定量的伤害,之后正常。",
|
||||
"<br>",
|
||||
"<span style=\"color: #ff00d2\">8. 勇气冲锋</span>:勇士首先发动冲锋,造成一定量的伤害,眩晕怪物5回合。",
|
||||
"学习该技能后,勇士无条件先手。",
|
||||
"<br>",
|
||||
"<span style=\"color: #bbb0ff\">9. 魔攻</span>:勇士攻击无视怪物的防御。",
|
||||
"<br>",
|
||||
"<span style=\"color: #b0b666\">10. 先攻</span>:勇士无条件先手。"
|
||||
]
|
||||
},
|
||||
"special1": {
|
||||
"text": "第一章怪物特技",
|
||||
"condition": "flags.chapter > 0",
|
||||
|
||||
@@ -29,5 +29,15 @@
|
||||
"<br>",
|
||||
"2. 如果缩放后游戏画面高度高于页面高度的95%,那么缩小一个缩放比例,否则保持最大比例"
|
||||
]
|
||||
},
|
||||
"showHalo": {
|
||||
"text": "展示范围光环",
|
||||
"desc": ["开启后,会在地图上显示范围光环。"]
|
||||
},
|
||||
"showStudied": {
|
||||
"text": "展示已学习技能",
|
||||
"desc": [
|
||||
"开启后,会在画面内以类似状态栏的盒子的形式显示当前已学习的怪物技能。"
|
||||
]
|
||||
}
|
||||
}
|
||||
+20
-1
@@ -1,5 +1,4 @@
|
||||
import { ref, watch } from 'vue';
|
||||
import { has } from './utils';
|
||||
|
||||
/**
|
||||
* 打开和关闭ui时是否展示动画
|
||||
@@ -21,6 +20,16 @@ export const autoSkill = ref(true);
|
||||
*/
|
||||
export const autoScale = ref(true);
|
||||
|
||||
/**
|
||||
* 是否在地图上展示范围光环
|
||||
*/
|
||||
export const showHalo = ref(true);
|
||||
|
||||
/**
|
||||
* 是否展示已学习的技能
|
||||
*/
|
||||
export const showStudied = ref(true);
|
||||
|
||||
watch(transition, n => {
|
||||
core.plugin.transition.value = n;
|
||||
core.setLocalStorage('transition', n);
|
||||
@@ -41,6 +50,14 @@ watch(autoScale, n => {
|
||||
core.setLocalStorage('autoScale', n);
|
||||
});
|
||||
|
||||
watch(showStudied, n => {
|
||||
core.setLocalStorage('showStudied', n);
|
||||
});
|
||||
|
||||
watch(showHalo, n => {
|
||||
core.setLocalStorage('showHalo', n);
|
||||
});
|
||||
|
||||
/**
|
||||
* 重置设置信息,从localStorage读取即可
|
||||
*/
|
||||
@@ -49,6 +66,8 @@ function reset() {
|
||||
transition.value = t;
|
||||
core.plugin.transition.value = transition.value;
|
||||
autoScale.value = core.getLocalStorage('autoScale', true);
|
||||
showStudied.value = core.getLocalStorage('showStudied', true);
|
||||
showHalo.value = core.getLocalStorage('showHalo', true);
|
||||
}
|
||||
|
||||
function resetFlag() {
|
||||
|
||||
@@ -21,11 +21,10 @@ export function getAddStatus(equip: Equip) {
|
||||
return (
|
||||
<div class="equip-add-detail">
|
||||
{keys.map(v => {
|
||||
const value =
|
||||
(equip.value[v] ?? 0) +
|
||||
Math.floor(
|
||||
const value = Math.floor(
|
||||
(equip.value[v] ?? 0) * core.getBuff(v) +
|
||||
(core.status.hero[v] * (equip.percentage[v] ?? 0)) / 100
|
||||
);
|
||||
);
|
||||
|
||||
return (
|
||||
<span style="display: flex">
|
||||
@@ -72,7 +71,9 @@ export function getNowStatus(nowEquip?: Equip, onCol: boolean = false) {
|
||||
|
||||
let add = 0;
|
||||
if (has(nowEquip)) {
|
||||
add += nowEquip.value[v] ?? 0;
|
||||
add += Math.floor(
|
||||
(nowEquip.value[v] ?? 0) * core.getBuff(v)
|
||||
);
|
||||
const per = Math.floor(
|
||||
(nowEquip.percentage[v] * core.getStatus(v)) / 100
|
||||
);
|
||||
|
||||
@@ -18,6 +18,7 @@ export const descOpened = ref(false);
|
||||
export const skillOpened = ref(false);
|
||||
export const skillTreeOpened = ref(false);
|
||||
export const flyOpened = ref(false);
|
||||
export const showStudiedSkill = ref(false);
|
||||
|
||||
export const transition = ref(true);
|
||||
export const noClosePanel = ref(false);
|
||||
@@ -67,7 +68,8 @@ export default function init() {
|
||||
descOpened,
|
||||
skillOpened,
|
||||
skillTreeOpened,
|
||||
flyOpened
|
||||
flyOpened,
|
||||
showStudiedSkill
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Vendored
+27
@@ -114,6 +114,9 @@ interface IdToCls {
|
||||
autotile5: 'autotile';
|
||||
autotile6: 'autotile';
|
||||
autotile7: 'autotile';
|
||||
autotile8: 'autotile';
|
||||
autotile9: 'autotile';
|
||||
autotile10: 'autotile';
|
||||
autotile1: 'autotile';
|
||||
autotile2: 'autotile';
|
||||
autotile3: 'autotile';
|
||||
@@ -503,6 +506,30 @@ interface IdToCls {
|
||||
E577: 'enemys';
|
||||
E578: 'enemys';
|
||||
E579: 'enemys';
|
||||
T580: 'terrains';
|
||||
T581: 'terrains';
|
||||
T582: 'terrains';
|
||||
T583: 'terrains';
|
||||
T584: 'terrains';
|
||||
T585: 'terrains';
|
||||
T586: 'terrains';
|
||||
T587: 'terrains';
|
||||
T588: 'terrains';
|
||||
I589: 'items';
|
||||
E590: 'enemys';
|
||||
E591: 'enemys';
|
||||
E592: 'enemys';
|
||||
E593: 'enemys';
|
||||
E594: 'enemys';
|
||||
E595: 'enemys';
|
||||
E596: 'enemys';
|
||||
E597: 'enemys';
|
||||
E598: 'enemys';
|
||||
E599: 'enemys';
|
||||
E600: 'enemys';
|
||||
E601: 'enemys';
|
||||
E602: 'enemys';
|
||||
E603: 'enemys';
|
||||
X20037: 'tileset';
|
||||
X20038: 'tileset';
|
||||
X20039: 'tileset';
|
||||
|
||||
Vendored
+17
-1
@@ -39,6 +39,20 @@ type FloorIds =
|
||||
| 'MT29'
|
||||
| 'MT30'
|
||||
| 'MT31'
|
||||
| 'MT32'
|
||||
| 'MT33'
|
||||
| 'MT34'
|
||||
| 'MT35'
|
||||
| 'MT36'
|
||||
| 'MT37'
|
||||
| 'MT38'
|
||||
| 'MT39'
|
||||
| 'MT40'
|
||||
| 'MT41'
|
||||
| 'MT42'
|
||||
| 'MT43'
|
||||
| 'MT44'
|
||||
| 'MT45'
|
||||
|
||||
type ImageIds =
|
||||
| 'IQ.png'
|
||||
@@ -148,7 +162,8 @@ type BgmIds =
|
||||
| 'grass.mp3'
|
||||
| 'mount.mp3'
|
||||
| 'night.mp3'
|
||||
| 'palace.mp3'
|
||||
| 'palaceNorth.mp3'
|
||||
| 'palaceSouth.mp3'
|
||||
| 'plot1.mp3'
|
||||
| 'road.mp3'
|
||||
| 'title.mp3'
|
||||
@@ -157,6 +172,7 @@ type BgmIds =
|
||||
| 'towerBoss2.mp3'
|
||||
| 'towerBoss3.mp3'
|
||||
| 'winter.mp3'
|
||||
| 'winterTown.mp3'
|
||||
|
||||
type FontIds =
|
||||
| 'normal'
|
||||
|
||||
Vendored
+1
@@ -184,4 +184,5 @@ interface ItemDeclaration {
|
||||
I565: 'constants';
|
||||
I574: 'items';
|
||||
I575: 'equips';
|
||||
I589: 'equips';
|
||||
}
|
||||
Vendored
+54
@@ -114,6 +114,9 @@ interface IdToNumber {
|
||||
autotile5: 142;
|
||||
autotile6: 143;
|
||||
autotile7: 144;
|
||||
autotile8: 145;
|
||||
autotile9: 146;
|
||||
autotile10: 147;
|
||||
autotile1: 151;
|
||||
autotile2: 152;
|
||||
autotile3: 153;
|
||||
@@ -503,6 +506,30 @@ interface IdToNumber {
|
||||
E577: 577;
|
||||
E578: 578;
|
||||
E579: 579;
|
||||
T580: 580;
|
||||
T581: 581;
|
||||
T582: 582;
|
||||
T583: 583;
|
||||
T584: 584;
|
||||
T585: 585;
|
||||
T586: 586;
|
||||
T587: 587;
|
||||
T588: 588;
|
||||
I589: 589;
|
||||
E590: 590;
|
||||
E591: 591;
|
||||
E592: 592;
|
||||
E593: 593;
|
||||
E594: 594;
|
||||
E595: 595;
|
||||
E596: 596;
|
||||
E597: 597;
|
||||
E598: 598;
|
||||
E599: 599;
|
||||
E600: 600;
|
||||
E601: 601;
|
||||
E602: 602;
|
||||
E603: 603;
|
||||
X20037: 20037;
|
||||
X20038: 20038;
|
||||
X20039: 20039;
|
||||
@@ -651,6 +678,9 @@ interface NumberToId {
|
||||
142: 'autotile5';
|
||||
143: 'autotile6';
|
||||
144: 'autotile7';
|
||||
145: 'autotile8';
|
||||
146: 'autotile9';
|
||||
147: 'autotile10';
|
||||
151: 'autotile1';
|
||||
152: 'autotile2';
|
||||
153: 'autotile3';
|
||||
@@ -1040,6 +1070,30 @@ interface NumberToId {
|
||||
577: 'E577';
|
||||
578: 'E578';
|
||||
579: 'E579';
|
||||
580: 'T580';
|
||||
581: 'T581';
|
||||
582: 'T582';
|
||||
583: 'T583';
|
||||
584: 'T584';
|
||||
585: 'T585';
|
||||
586: 'T586';
|
||||
587: 'T587';
|
||||
588: 'T588';
|
||||
589: 'I589';
|
||||
590: 'E590';
|
||||
591: 'E591';
|
||||
592: 'E592';
|
||||
593: 'E593';
|
||||
594: 'E594';
|
||||
595: 'E595';
|
||||
596: 'E596';
|
||||
597: 'E597';
|
||||
598: 'E598';
|
||||
599: 'E599';
|
||||
600: 'E600';
|
||||
601: 'E601';
|
||||
602: 'E602';
|
||||
603: 'E603';
|
||||
20037: 'X20037';
|
||||
20038: 'X20038';
|
||||
20039: 'X20039';
|
||||
|
||||
Vendored
+10
-8
@@ -77,8 +77,8 @@ type Enemy<I extends EnemyIds = EnemyIds> = {
|
||||
*/
|
||||
type EnemySpecialDeclaration = [
|
||||
id: number,
|
||||
name: string | ((enemy: Enemy) => string),
|
||||
desc: string | ((enemy: Enemy) => string),
|
||||
name: string | ((enemy: EnemySpecialBase) => string),
|
||||
desc: string | ((enemy: EnemySpecialBase) => string),
|
||||
color: Color,
|
||||
extra?: number
|
||||
];
|
||||
@@ -95,7 +95,14 @@ interface DamageString {
|
||||
color: Color;
|
||||
}
|
||||
|
||||
interface EnemyInfoBase {
|
||||
interface EnemySpecialBase {
|
||||
/**
|
||||
* 怪物特殊属性
|
||||
*/
|
||||
special: number[];
|
||||
}
|
||||
|
||||
interface EnemyInfoBase extends EnemySpecialBase {
|
||||
/**
|
||||
* 生命值
|
||||
*/
|
||||
@@ -125,11 +132,6 @@ interface EnemyInfoBase {
|
||||
* 加点量
|
||||
*/
|
||||
point: number;
|
||||
|
||||
/**
|
||||
* 特殊属性列表
|
||||
*/
|
||||
special: number[];
|
||||
}
|
||||
|
||||
interface EnemyInfo extends EnemyInfoBase {
|
||||
|
||||
Vendored
+3
@@ -175,6 +175,9 @@ interface PluginUis {
|
||||
/** 是否展示标记的怪物 */
|
||||
readonly showMarkedEnemy: Ref<boolean>;
|
||||
|
||||
/** 是否展示已学习的技能 */
|
||||
readonly showStudiedSkill: Ref<boolean>;
|
||||
|
||||
/** ui栈 */
|
||||
readonly uiStack: Ref<Component[]>;
|
||||
|
||||
|
||||
Vendored
+5
@@ -53,6 +53,11 @@ interface CheckBlockStatus {
|
||||
* 缓存信息,是每个怪物受到的光环加成
|
||||
*/
|
||||
cache: Record<string, DeepReadonly<EnemyBuffCache>>;
|
||||
|
||||
/**
|
||||
* 光环信息
|
||||
*/
|
||||
halo: Record<LocString, string[]>;
|
||||
}
|
||||
|
||||
interface DamageStatus {
|
||||
|
||||
+8
-2
@@ -4,8 +4,9 @@
|
||||
><div id="desc-list">
|
||||
<div
|
||||
v-for="(data, k) in desc"
|
||||
class="selectable"
|
||||
class="selectable desc-item"
|
||||
:selected="selected === k"
|
||||
:show="show(data.condition)"
|
||||
@click="click(k)"
|
||||
>
|
||||
<span v-if="show(data.condition)">{{ data.text }}</span>
|
||||
@@ -31,7 +32,7 @@ function exit() {
|
||||
}
|
||||
|
||||
const content = computed(() => {
|
||||
return splitText(desc[selected.value].desc);
|
||||
return eval('`' + splitText(desc[selected.value].desc) + '`');
|
||||
});
|
||||
|
||||
function click(key: DescKey) {
|
||||
@@ -53,4 +54,9 @@ function show(condition: string) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.desc-item[show='false'] {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -9,6 +9,7 @@
|
||||
v-model:width="getBoxPos(v).width"
|
||||
v-model:height="getBoxPos(v).height"
|
||||
:resizable="true"
|
||||
:dragable="true"
|
||||
>
|
||||
<Scroll class="box-scroll" :no-scroll="true">
|
||||
<div class="marked-main">
|
||||
|
||||
+24
-1
@@ -34,6 +34,23 @@
|
||||
autoScale ? 'ON' : 'OFF'
|
||||
}}</span
|
||||
>
|
||||
<span
|
||||
class="selectable"
|
||||
:selected="selected === 'showHalo'"
|
||||
@click="click('showHalo')"
|
||||
>展示范围光环: {{
|
||||
showHalo ? 'ON' : 'OFF'
|
||||
}}</span
|
||||
>
|
||||
<span
|
||||
class="selectable"
|
||||
:selected="selected === 'showStudied'"
|
||||
v-if="core.getSkillLevel(11) > 0"
|
||||
@click="click('showStudied')"
|
||||
>展示已学习技能: {{
|
||||
showStudied ? 'ON' : 'OFF'
|
||||
}}</span
|
||||
>
|
||||
</div></template
|
||||
>
|
||||
<template #right><span v-html="descText"></span></template
|
||||
@@ -46,7 +63,9 @@ import {
|
||||
transition,
|
||||
itemDetail,
|
||||
autoSkill,
|
||||
autoScale
|
||||
autoScale,
|
||||
showStudied,
|
||||
showHalo
|
||||
} from '../plugin/settings';
|
||||
import settingInfo from '../data/settings.json';
|
||||
import { has, splitText } from '../plugin/utils';
|
||||
@@ -54,6 +73,8 @@ import Column from '../components/colomn.vue';
|
||||
|
||||
type Settings = typeof settingInfo;
|
||||
|
||||
const core = window.core;
|
||||
|
||||
const selected = ref<keyof Settings>('transition');
|
||||
|
||||
const descText = computed(() => {
|
||||
@@ -77,6 +98,8 @@ function click(id: keyof Settings) {
|
||||
autoSkill.value = !autoSkill.value;
|
||||
} else if (id === 'autoScale') {
|
||||
autoScale.value = !autoScale.value;
|
||||
} else if (id === 'showHalo') {
|
||||
showHalo.value = !showHalo.value;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div id="status-bar">
|
||||
<Box :resizable="true" v-model:width="width" v-model:height="height">
|
||||
<Box
|
||||
:resizable="true"
|
||||
:dragable="true"
|
||||
v-model:width="width"
|
||||
v-model:height="height"
|
||||
>
|
||||
<Scroll
|
||||
id="status-main"
|
||||
v-model:update="updateStatus"
|
||||
@@ -9,7 +14,7 @@
|
||||
<div id="status-div">
|
||||
<span
|
||||
id="status-floor"
|
||||
@click="viewMap"
|
||||
@click.stop="viewMap"
|
||||
class="button-text"
|
||||
>{{ floor }}</span
|
||||
>
|
||||
@@ -271,7 +276,7 @@ function openStudy() {}
|
||||
|
||||
.status-extra {
|
||||
position: absolute;
|
||||
right: 15%;
|
||||
right: 10%;
|
||||
bottom: 0;
|
||||
font-size: 1.6vw;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<div id="studied">
|
||||
<Box
|
||||
:resizable="true"
|
||||
:dragable="true"
|
||||
v-model:width="width"
|
||||
v-model:height="height"
|
||||
v-model:left="left"
|
||||
v-model:top="top"
|
||||
>
|
||||
<Scroll :no-scroll="true" style="height: 100%">
|
||||
<div id="studied-main">
|
||||
<div v-for="(num, i) of studied" :key="i">
|
||||
<div id="studied-rough">
|
||||
<right-outlined
|
||||
:folded="!!folded[i]"
|
||||
@click="folded[i] = !folded[i]"
|
||||
id="studied-fold"
|
||||
/>
|
||||
<span
|
||||
>{{ i }}. {{ skills[i] }},剩余{{
|
||||
last[i]
|
||||
}}场战斗</span
|
||||
>
|
||||
</div>
|
||||
<div id="studied-detail" v-if="!folded[i]">
|
||||
{{ hint(num) }}
|
||||
</div>
|
||||
</div>
|
||||
</div></Scroll
|
||||
></Box
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue';
|
||||
import Box from '../components/box.vue';
|
||||
import { status } from '../plugin/ui/statusBar';
|
||||
import { RightOutlined } from '@ant-design/icons-vue';
|
||||
import Scroll from '../components/scroll.vue';
|
||||
|
||||
watch(status, n => {});
|
||||
|
||||
let main: HTMLDivElement;
|
||||
|
||||
const width = ref(200);
|
||||
const height = ref(0);
|
||||
const left = ref(window.innerWidth - 300);
|
||||
const top = ref(window.innerHeight - 300);
|
||||
|
||||
const folded = reactive<boolean[]>([]);
|
||||
|
||||
const studied = computed(() => {
|
||||
status.value;
|
||||
return core.status.hero.special?.num ?? [];
|
||||
});
|
||||
|
||||
const last = computed(() => {
|
||||
status.value;
|
||||
return core.status.hero.special?.last ?? [];
|
||||
});
|
||||
|
||||
const skills = computed(() => {
|
||||
const specials = core.getSpecials();
|
||||
return studied.value.map(v => {
|
||||
const s = specials[v - 1][1];
|
||||
// @ts-ignore
|
||||
if (s instanceof Function) return s(core.status.hero.special);
|
||||
else return s;
|
||||
});
|
||||
});
|
||||
|
||||
function hint(number: number) {
|
||||
const specials = core.getSpecials();
|
||||
const s = specials[number - 1][2];
|
||||
// @ts-ignore
|
||||
if (s instanceof Function) return s(core.status.hero.special);
|
||||
else return s;
|
||||
}
|
||||
|
||||
async function calHeight() {
|
||||
await new Promise<void>(resolve => {
|
||||
requestAnimationFrame(() => {
|
||||
const style = getComputedStyle(main);
|
||||
height.value = parseFloat(style.height);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
onUpdated(() => {
|
||||
calHeight();
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
main = document.getElementById('studied-main') as HTMLDivElement;
|
||||
calHeight();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
#studied {
|
||||
font-family: 'normal';
|
||||
font-size: 1vw;
|
||||
}
|
||||
|
||||
#studied-fold {
|
||||
transition: transform 0.2s ease-out;
|
||||
}
|
||||
|
||||
#studied-fold[folded='true'] {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user