Skip to content

Commit b32690c

Browse files
committed
🐞 fix: 修正飞行棋状态回显与蓝绿棋到达显示
1 parent 272b102 commit b32690c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

game/frontend/src/components/aeroplane-chess/AeroplaneChessRoom.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<span :class="getTextColor(player.attributes?.aeroplaneColor, false)">✈</span>
2929
</template>
3030
<template #actions>
31-
<section class="w-full sticky bottom-0 z-100 bg-base-100/90 p-4 md:p-0 flex flex-col gap-4">
31+
<section class="w-full fixed md:sticky bottom-4 z-100 bg-base-100/90 p-4 md:p-0 flex flex-col gap-4">
3232
<div class="flex items-center gap-2" v-if="canRoll || state?.lastRoll">
3333
<button class="btn btn-primary" :disabled="!canRoll" @click="roll">掷骰</button>
3434
<div class="text-sm" v-if="state?.lastRoll">

game/frontend/src/components/aeroplane-chess/tiles/Hangar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ const rotateMap: Record<Dir, string> = {
4444
};
4545
const finishRotateMap: Record<Dir, string> = {
4646
br: '180deg',
47-
bl: '90deg',
47+
bl: '270deg',
4848
tl: '0deg',
49-
tr: '270deg',
49+
tr: '90deg',
5050
};
5151
5252
const pieces = computed(() => {

game/frontend/src/components/aeroplane-chess/useAeroplaneChess.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export function useAeroplaneChess(game: GameCore, roomPlayer: RoomPlayer & { roo
5454
break;
5555
case 'status':
5656
if (msg.data?.state) state.value = msg.data.state;
57+
movable.value = state.value?.moveable?.[roomPlayer.id] || [];
5758
break;
5859
case 'aeroplane:roll':
5960
lastRoll.value = msg.data?.roll ?? null;

0 commit comments

Comments
 (0)