import { StatisticsType } from '../game/GameDataEnums'; /** 看视频解锁 2 倍速所需累计次数 */ export const BATTLE_SPEED_UNLOCK_VIDEO_COUNT = 10; export const BATTLE_SPEED_NORMAL = 1; export const BATTLE_SPEED_FAST = 2; export function getBattleSpeedVideoUnlockCount(): number { return gg.data.getStatistics(StatisticsType.BattleSpeedVideoUnlockCount); } export function isBattleSpeedPermanentlyUnlocked(): boolean { return getBattleSpeedVideoUnlockCount() >= BATTLE_SPEED_UNLOCK_VIDEO_COUNT; } /** 累计看视频解锁次数 +1,返回最新次数 */ export function recordBattleSpeedVideoUnlock(): number { const next = getBattleSpeedVideoUnlockCount() + 1; gg.data.setStatistics(StatisticsType.BattleSpeedVideoUnlockCount, next); return next; }