mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 04:19:30 +08:00
增加跳跃次数的显示
This commit is contained in:
parent
aad49a0c30
commit
0b0c7c7958
@ -20,7 +20,7 @@ var ignoreInJump = {
|
||||
};
|
||||
|
||||
/** @type {FloorIds[]} */
|
||||
const jumpIgnoreFloor = [
|
||||
export const jumpIgnoreFloor = [
|
||||
'MT31',
|
||||
'snowTown',
|
||||
'MT36',
|
||||
@ -177,5 +177,6 @@ export function jumpSkill() {
|
||||
}
|
||||
|
||||
core.plugin.skillEffects = {
|
||||
jumpSkill
|
||||
jumpSkill,
|
||||
jumpIgnoreFloor
|
||||
};
|
||||
|
5
src/types/plugin.d.ts
vendored
5
src/types/plugin.d.ts
vendored
@ -31,6 +31,7 @@ interface PluginDeclaration
|
||||
hero: GamePluginHeroRealStatus;
|
||||
|
||||
skills: Record<Chapter, Skill[]>;
|
||||
skillEffects: SkillEffects;
|
||||
|
||||
/**
|
||||
* 添加函数 例:添加弹出文字,像这个就可以使用core.addPop或core.plugin.addPop调用
|
||||
@ -435,6 +436,10 @@ interface PluginAchievement {
|
||||
checkVisitedFloor(): void;
|
||||
}
|
||||
|
||||
interface SkillEffects {
|
||||
jumpIgnoreFloor: FloorIds[];
|
||||
}
|
||||
|
||||
type Chapter = 'chapter1' | 'chapter2';
|
||||
|
||||
interface Skill {
|
||||
|
@ -25,6 +25,12 @@
|
||||
class="status-icon"
|
||||
/>
|
||||
<span>{{ skill }}</span>
|
||||
<span
|
||||
v-if="has(spring)"
|
||||
id="status-spring"
|
||||
class="status-extra"
|
||||
>剩余{{ spring }}</span
|
||||
>
|
||||
</div>
|
||||
<div id="status-hp" class="status-item">
|
||||
<img src="/project/images/hp.png" class="status-icon" />
|
||||
@ -37,10 +43,10 @@
|
||||
>+{{ format(hero.hpmax!) }}/t</span
|
||||
>
|
||||
<span
|
||||
v-if="has(spring)"
|
||||
id="status-spring"
|
||||
v-if="has(jumpCnt)"
|
||||
id="status-jump"
|
||||
class="status-extra"
|
||||
>剩余{{ spring }}</span
|
||||
>跳跃剩余{{ jumpCnt }}</span
|
||||
>
|
||||
</div>
|
||||
<div id="status-atk" class="status-item">
|
||||
@ -124,7 +130,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, shallowReactive, watch } from 'vue';
|
||||
import { onMounted, ref, shallowReactive, watch } from 'vue';
|
||||
import Box from '../components/box.vue';
|
||||
import Scroll from '../components/scroll.vue';
|
||||
import { status } from '../plugin/ui/statusBar';
|
||||
@ -150,6 +156,7 @@ const up = ref(0);
|
||||
const spring = ref<number>();
|
||||
const skillOpened = ref(core.getFlag('chapter', 0) > 0);
|
||||
const studyOpened = ref(core.plugin.skillTree.getSkillLevel(11) > 0);
|
||||
const jumpCnt = ref<number>();
|
||||
/**
|
||||
* 要展示的勇士属性
|
||||
*/
|
||||
@ -198,6 +205,11 @@ function update() {
|
||||
}
|
||||
skillOpened.value = core.getFlag('chapter', 0) > 0;
|
||||
studyOpened.value = core.plugin.skillTree.getSkillLevel(11) > 0;
|
||||
jumpCnt.value =
|
||||
flags.skill2 &&
|
||||
!core.plugin.skillEffects.jumpIgnoreFloor.includes(core.status.floorId)
|
||||
? 3 - flags[`jump_${core.status.floorId}`]
|
||||
: void 0;
|
||||
}
|
||||
|
||||
function openSkillTree() {
|
||||
@ -213,6 +225,10 @@ function viewMap() {
|
||||
}
|
||||
|
||||
function openStudy() {}
|
||||
|
||||
onMounted(() => {
|
||||
update();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@ -300,6 +316,12 @@ function openStudy() {}
|
||||
font-size: 1.4vw;
|
||||
}
|
||||
|
||||
#status-jump {
|
||||
line-height: 0;
|
||||
top: 0;
|
||||
font-size: 1.3vw;
|
||||
}
|
||||
|
||||
#status-key {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
Loading…
Reference in New Issue
Block a user