wangfukang 4 days ago
parent
commit
93a4f8cda1
  1. 25
      package1/planet/adventure.vue

25
package1/planet/adventure.vue

@ -79,8 +79,8 @@
<view class="slot-wrap">
<view class="slot-title">助推槽 {{slots.length}}/{{slotLimit}}</view>
<view class="slots">
<view class="slot" v-for="i in slotLimit" :key="i">
<text v-if="slots[i - 1]">{{slots[i - 1].displayIcon}}</text>
<view class="slot" v-for="cell in slotCells" :key="cell.key">
<text v-if="cell.icon">{{cell.icon}}</text>
</view>
</view>
</view>
@ -194,6 +194,17 @@
trapGroupCount() {
return this.collectDifficultyStats(this.cards).trapGroupCount
},
slotCells() {
const cells = []
for (let i = 0; i < this.slotLimit; i++) {
const card = this.slots[i]
cells.push({
key: 'slot_' + i,
icon: card ? (card.displayIcon || this.displayIcon(card.icon)) : ''
})
}
return cells
},
riskText() {
if (this.slots.length >= this.slotLimit - 1) return '危险:差1格就满'
if (this.slots.length >= this.slotLimit - 2) return '注意槽位'
@ -356,9 +367,9 @@
hell: {
layerCounts: [36, 30, 24],
zones: [
{ x: 38, y: 18, cols: 6, gapX: 86, gapY: 82, offsetX: 0, offsetY: 0, stagger: 4 },
{ x: 82, y: 58, cols: 5, gapX: 86, gapY: 82, offsetX: 0, offsetY: 0, stagger: 4 },
{ x: 124, y: 98, cols: 4, gapX: 86, gapY: 82, offsetX: 0, offsetY: 0, stagger: 4 }
{ x: 58, y: 18, cols: 6, gapX: 86, gapY: 82, offsetX: 0, offsetY: 0, stagger: 4 },
{ x: 102, y: 58, cols: 5, gapX: 86, gapY: 82, offsetX: 0, offsetY: 0, stagger: 4 },
{ x: 144, y: 98, cols: 4, gapX: 86, gapY: 82, offsetX: 0, offsetY: 0, stagger: 4 }
]
}
}
@ -445,8 +456,8 @@
for (let i = 0; i < 2; i++) {
const cover = covers.shift()
if (!cover) return
cover.x = key.x + (i === 0 ? 18 : -10) + Math.floor(rand() * 8)
cover.y = key.y + (i === 0 ? 18 : -10) + Math.floor(rand() * 8)
cover.x = key.x + (i === 0 ? 18 : -4) + Math.floor(rand() * 8)
cover.y = key.y + (i === 0 ? 18 : -4) + Math.floor(rand() * 8)
cover.style = `left:${cover.x}rpx;top:${cover.y}rpx;z-index:${this.cardZIndex(cover)};`
}
})

Loading…
Cancel
Save