feat(tongji): add milk tea afternoon challenge

This commit is contained in:
大哥大哥的大哥哥
2026-07-27 01:51:08 +08:00
parent 87b8949f95
commit c8507aed43
5 changed files with 51 additions and 15 deletions
+21 -7
View File
@@ -302,7 +302,7 @@
<text>{{ food.short }}</text>
</view>
</view>
<text class="eg-stage-tip">橙框食物已更新,普通食物会随掉落逐步加入</text>
<text class="eg-stage-tip">{{ stageMeta.tip || '橙框食物已更新,普通食物会随掉落逐步加入' }}</text>
</view>
</view>
@@ -342,7 +342,8 @@ const LOCAL_FOOD_IMAGES = {
spinach: `${LOCAL_FOOD_IMAGE_BASE_URL}spinach.jpg`,
carrot: `${LOCAL_FOOD_IMAGE_BASE_URL}carrot.jpg`,
fish: `${LOCAL_FOOD_IMAGE_BASE_URL}fish.jpg`,
redBeanCongee: `${LOCAL_FOOD_IMAGE_BASE_URL}redBeanCongee.jpg`
redBeanCongee: `${LOCAL_FOOD_IMAGE_BASE_URL}redBeanCongee.jpg`,
milkTea: `${LOCAL_FOOD_IMAGE_BASE_URL}milkTea.jpg`
}
const ROWS = 5
@@ -365,7 +366,8 @@ const FLOW_TICK_MS = 100
const ACTIVE_GAME_KEY = 'tongji_endless_active_game_v2'
const LEGACY_ACTIVE_GAME_KEY = 'tongji_endless_active_game_v1'
const ENDED_GAME_KEY = 'tongji_endless_ended_game_v1'
const ACTIVE_GAME_VERSION = 2
// 新增“下午茶甜饮”后关卡序号发生变化;旧局不能按新序号恢复,否则高糖目标会错位。
const ACTIVE_GAME_VERSION = 3
const DANGER_DROP_CHANCE = 0.05 + GAME_DIFFICULTY * 0.01
const COLUMN_GROUP_BIAS = 0.86 - GAME_DIFFICULTY * 0.028
const CHEER_MESSAGES = [
@@ -418,7 +420,11 @@ const FOODS = {
soda: { name: '含糖汽水', short: '汽水', emoji: '🥤', color: 'orange', level: 'high', levelLabel: '高糖', high: true, replaceable: true, tip: '含糖饮料中的糖吸收较快,日常应优先选择不加糖的饮品。' },
riceNoodleSoup: { name: '汤粉', short: '汤粉', emoji: '🍜', color: 'orange', level: 'high', levelLabel: '高糖', high: true, replaceable: true, tip: '汤粉以精制米粉为主,实际影响与分量和配菜有关,应注意搭配。' },
noodleSoup: { name: '汤面', short: '汤面', emoji: '🍜', color: 'orange', level: 'high', levelLabel: '高糖', high: true, replaceable: true, tip: '汤面以精细面食为主,汤汁和分量需要注意,具体建议以医生审核为准。' },
milkTea: { name: '含糖奶茶', short: '奶茶', emoji: '🧋', color: 'orange', level: 'high', levelLabel: '高糖', high: true, replaceable: true, tip: '含糖奶茶可能同时含有较多添加糖和能量,应关注配方与饮用量。' },
milkTea: {
name: '含糖奶茶', short: '奶茶', emoji: '🧋', color: 'orange', level: 'high', levelLabel: '高糖',
high: true, replaceable: true, largeIcon: true, villain: true,
tip: '含糖奶茶可能同时含有较多添加糖和能量,应关注配方、杯量和饮用频率。游戏中的食物等级需由甄养堂医生最终审核。'
},
tofu: { name: '豆腐', short: '豆腐', emoji: '◻️', color: 'cream', category: '豆制品', level: 'low', levelLabel: '低糖', largeIcon: true },
spinach: { name: '菠菜', short: '菠菜', emoji: '🥬', color: 'yellow', category: '蔬菜', level: 'low', levelLabel: '低糖', largeIcon: true },
carrot: { name: '胡萝卜', short: '胡萝卜', emoji: '🥕', color: 'red', category: '蔬菜', level: 'low', levelLabel: '低糖', largeIcon: true },
@@ -439,6 +445,12 @@ const FOOD_GROUPS = [
{ title: '粗粮早餐', safe: ['broccoli', 'milk', 'brownRice', 'potato'], danger: 'milletCongee' },
{ title: '水果饮品', safe: ['apple', 'strawberry', 'banana', 'mango'], danger: 'orangeJuice' },
{ title: '日常饮品', safe: ['milk', 'tea', 'blackCoffee', 'coffee'], danger: 'soda' },
{
title: '下午茶甜饮',
safe: ['milk', 'tea', 'apple', 'strawberry'],
danger: 'milkTea',
hint: '奶茶混进下午茶了,别把它三连消除!'
},
{ title: '南方汤粉', safe: ['pepper', 'greenBean', 'shrimp', 'udon'], danger: 'riceNoodleSoup' },
{ title: '北方面食', safe: ['onion', 'celery', 'corn', 'grainMantou'], danger: 'noodleSoup' },
{ title: '家常餐桌', safe: ['tofu', 'spinach', 'carrot', 'fish'], danger: 'redBeanCongee' },
@@ -513,7 +525,7 @@ const impactText = ref('')
const impactLevel = ref(1)
const camelJackpot = ref({ visible: false, count: 0, kicker: '', title: '', reward: '' })
const stageVisible = ref(false)
const stageMeta = ref({ number: 1, title: '', foods: [] })
const stageMeta = ref({ number: 1, title: '', foods: [], tip: '' })
const reshuffleVisible = ref(false)
const reshuffleDone = ref(false)
const reshuffling = ref(false)
@@ -1263,6 +1275,7 @@ function cellClasses(tile) {
{
'is-selected': selected.value === tile.index,
'is-high': food.high,
'is-villain': food.villain,
'is-camel-target': camelMode.value && food.replaceable,
'is-clearing': clearingIndices.value.includes(tile.index),
'is-fire-clearing': fireClearingIndices.value.includes(tile.index),
@@ -1687,10 +1700,11 @@ function advanceFoodTheme() {
stageMeta.value = {
number: themeIndex.value + 1,
title: nextTheme.title,
foods: [...nextTheme.safe, nextTheme.danger].map(key => ({ key, ...foodOf(key) }))
foods: [...nextTheme.safe, nextTheme.danger].map(key => ({ key, ...foodOf(key) })),
tip: nextTheme.hint || '橙框食物已更新,普通食物会随掉落逐步加入'
}
stageVisible.value = true
statusText.value = `已进入${nextTheme.title},新食物会随掉落逐步加入`
statusText.value = nextTheme.hint || `已进入${nextTheme.title},新食物会随掉落逐步加入`
playSfxLayer('fanfare', 'sparkle', 100, .65)
if (stageTimer) clearTimeout(stageTimer)
stageTimer = setTimeout(() => { stageVisible.value = false }, 1800)