411 lines
12 KiB
JavaScript
411 lines
12 KiB
JavaScript
// 寵物種族配置
|
||
export const PET_SPECIES = {
|
||
tinyTigerCat: {
|
||
id: 'tinyTigerCat',
|
||
name: '小虎斑貓',
|
||
description: '活潑可愛的小貓咪',
|
||
baseStats: {
|
||
// 系統更新間隔(毫秒)
|
||
physiologyTickInterval: 1000, // 生理系統刷新間隔:1秒 (更流暢的視覺效果)
|
||
eventCheckInterval: 10000, // 事件檢查間隔:10秒
|
||
|
||
// 衰減速率 (每 tick 1秒) - 調整為更輕鬆的體驗
|
||
// 飢餓從 8 小時延長到 16 小時,快樂從 5 小時延長到 10 小時
|
||
hungerDecayPerTick: 0.01, // 降低!0.02 → 0.01 (每秒掉 0.01,100/0.01/60 = 約 166 分鐘 ~16小時)
|
||
happinessDecayPerTick: 0.017, // 降低!0.033 → 0.017 (每秒掉 0.017,約 10 小時)
|
||
|
||
// 便便系統 - 大幅降低頻率和傷害
|
||
poopChancePerTick: 0.025, // 降低!0.05 → 0.025 (約 40 分鐘產生一次,原本 20 分鐘)
|
||
poopHealthDamage: 0.2, // 降低!0.5 → 0.2 (每坨每分鐘只扣 0.2,原本 0.5)
|
||
|
||
// 飢餓系統 - 降低傷害
|
||
hungerHealthDamage: 0.3, // 降低!1 → 0.3 (餓肚子每分鐘只扣 0.3,原本 1)
|
||
|
||
// 生病系統 - 更不容易生病
|
||
sicknessThreshold: 20, // 降低!40 → 20 (健康低於 20 才會生病,原本 40)
|
||
|
||
// 瀕死系統 - 延長時間
|
||
dyingTimeSeconds: 14400, // 延長!7200 → 14400 (瀕死 4 小時後死亡,原本 2 小時)
|
||
|
||
// 睡眠系統配置
|
||
sleepSchedule: {
|
||
nightSleep: {
|
||
startHour: 21, // 晚上 21:00 開始
|
||
startMinute: 30, // 21:30
|
||
endHour: 8, // 早上 8:00 結束
|
||
endMinute: 0,
|
||
autoSleep: true, // 自動進入睡眠
|
||
randomWakeChance: 0.3 // 在此時段唤醒後,30% 機率隨機再次入睡
|
||
},
|
||
noonNap: {
|
||
startHour: 12, // 中午 12:00 開始
|
||
startMinute: 0,
|
||
endHour: 13, // 下午 13:00 結束
|
||
endMinute: 0,
|
||
autoSleep: true, // 自動進入睡眠
|
||
randomWakeChance: 0.3 // 在此時段唤醒後,30% 機率隨機再次入睡
|
||
}
|
||
},
|
||
|
||
// 便便系統配置
|
||
maxPoopCount: 4, // 便便最大數量
|
||
|
||
// 睡眠系統配置
|
||
sleepDecayMultiplier: 0.1, // 睡眠时衰减倍率(饥饿、快乐衰减降低到10%)
|
||
|
||
// 默認數值
|
||
defaultHeight: 10, // 默認身高(cm)
|
||
defaultWeight: 500, // 默認體重(g)
|
||
|
||
// 互動消耗
|
||
playHungerCost: 1, // 玩耍消耗的飢餓值(降低以便玩更久)
|
||
|
||
// 戰鬥數值計算系數
|
||
combatFormulas: {
|
||
attack: {
|
||
strMultiplier: 2.5, // 攻擊力 = STR * 2.5 + DEX * 0.5
|
||
dexMultiplier: 0.5
|
||
},
|
||
defense: {
|
||
strMultiplier: 1.0, // 防禦力 = STR * 1.0 + INT * 2.0
|
||
intMultiplier: 2.0
|
||
},
|
||
speed: {
|
||
dexMultiplier: 3.0, // 速度 = DEX * 3.0 + INT * 0.5
|
||
intMultiplier: 0.5
|
||
}
|
||
},
|
||
|
||
// 其他
|
||
dropRate: 0.1,
|
||
luck: 10
|
||
},
|
||
lifecycle: [
|
||
// durationSeconds 是該階段結束時的累積年齡(秒)
|
||
{
|
||
stage: 'egg',
|
||
durationSeconds: 300, // 蛋在 300 秒(5分鐘)後孵化
|
||
height: 5, // 身高 5cm
|
||
baseWeight: 100, // 基礎體重 100g
|
||
weightRange: { min: 90, max: 110 }, // ±10%
|
||
unlockedFeatures: [],
|
||
allowedActions: [], // 蛋階段不能進行任何互動
|
||
enabledSystems: {
|
||
hunger: false, // 不會飢餓
|
||
happiness: false, // 不會不開心
|
||
poop: false, // 不會便便
|
||
sickness: false, // 不會生病
|
||
sleep: false // 不會睡覺
|
||
}
|
||
},
|
||
{
|
||
stage: 'baby',
|
||
durationSeconds: 21900, // 幼體持續到 6小時5分鐘 (300 + 21600)
|
||
height: 10, // 身高 10cm
|
||
baseWeight: 200, // 基礎體重 200g
|
||
weightRange: { min: 180, max: 220 }, // ±10%
|
||
unlockedFeatures: [],
|
||
allowedActions: ['feed', 'play', 'clean', 'heal', 'sleep'], // 所有基礎互動
|
||
enabledSystems: {
|
||
hunger: true,
|
||
happiness: true,
|
||
poop: true,
|
||
sickness: true,
|
||
sleep: true
|
||
}
|
||
},
|
||
{
|
||
stage: 'child',
|
||
durationSeconds: 281100, // 幼年持續到 3天6小時5分鐘 (21900 + 259200)
|
||
height: 18, // 身高 18cm
|
||
baseWeight: 400, // 基礎體重 400g
|
||
weightRange: { min: 360, max: 440 }, // ±10%
|
||
unlockedFeatures: ['miniGames'],
|
||
allowedActions: ['feed', 'play', 'clean', 'heal', 'sleep'],
|
||
enabledSystems: {
|
||
hunger: true,
|
||
happiness: true,
|
||
poop: true,
|
||
sickness: true,
|
||
sleep: true
|
||
},
|
||
conditions: {
|
||
str: 8, // 6小時內約需餵食 30-40 次,可獲得 ~10 STR
|
||
int: 8 // 6小時內約需玩耍 60-70 次,可獲得 ~10 INT
|
||
}
|
||
},
|
||
{
|
||
stage: 'adult',
|
||
durationSeconds: Infinity, // 成年是最終階段
|
||
height: 25, // 身高 25cm
|
||
baseWeight: 500, // 基礎體重 500g
|
||
weightRange: { min: 450, max: 550 }, // ±10%
|
||
unlockedFeatures: ['miniGames', 'breeding'],
|
||
allowedActions: ['feed', 'play', 'clean', 'heal', 'sleep'],
|
||
enabledSystems: {
|
||
hunger: true,
|
||
happiness: true,
|
||
poop: true,
|
||
sickness: true,
|
||
sleep: true
|
||
},
|
||
conditions: {
|
||
str: 50, // 3天內累積
|
||
int: 50,
|
||
dex: 50
|
||
},
|
||
// 進化分支配置
|
||
evolutions: [
|
||
{
|
||
id: 'warrior_tiger',
|
||
name: '戰士猛虎',
|
||
icon: '🐯',
|
||
description: '力量強大的猛虎形態',
|
||
conditions: {
|
||
str: { min: 50, dominant: true } // STR 需大於 INT+DEX
|
||
},
|
||
statModifiers: {
|
||
attack: 1.3,
|
||
defense: 1.2,
|
||
speed: 0.8
|
||
}
|
||
},
|
||
{
|
||
id: 'agile_cat',
|
||
name: '敏捷靈貓',
|
||
icon: '🐈',
|
||
description: '身手矯健的靈貓形態',
|
||
conditions: {
|
||
dex: { min: 50, dominant: true } // DEX 需大於 STR+INT
|
||
},
|
||
statModifiers: {
|
||
attack: 1.0,
|
||
defense: 0.8,
|
||
speed: 1.4
|
||
}
|
||
},
|
||
{
|
||
id: 'sage_cat',
|
||
name: '智者賢貓',
|
||
icon: '😺',
|
||
description: '充滿智慧的賢貓形態',
|
||
conditions: {
|
||
int: { min: 50, dominant: true } // INT 需大於 STR+DEX
|
||
},
|
||
statModifiers: {
|
||
attack: 0.9,
|
||
defense: 1.1,
|
||
speed: 1.0,
|
||
magic: 1.5
|
||
}
|
||
},
|
||
{
|
||
id: 'balanced_cat',
|
||
name: '成年貓',
|
||
icon: '😸',
|
||
description: '均衡發展的成年貓形態',
|
||
conditions: {
|
||
// 默認分支,無特殊條件
|
||
},
|
||
statModifiers: {
|
||
attack: 1.0,
|
||
defense: 1.0,
|
||
speed: 1.0
|
||
}
|
||
}
|
||
]
|
||
}
|
||
],
|
||
personality: ['活潑', '黏人']
|
||
},
|
||
tinyPuppy: {
|
||
id: 'tinyPuppy',
|
||
name: '小幼犬',
|
||
description: '忠誠活潑的小狗狗',
|
||
baseStats: {
|
||
physiologyTickInterval: 1000,
|
||
eventCheckInterval: 10000,
|
||
hungerDecayPerTick: 0.0125, // 降低!0.025 → 0.0125 (狗狗稍微容易餓,但也減半)
|
||
happinessDecayPerTick: 0.01, // 降低!0.02 → 0.01 (狗狗比較容易開心)
|
||
poopChancePerTick: 0.03, // 降低!0.06 → 0.03 (約 33 分鐘一次,原本 17 分鐘)
|
||
poopHealthDamage: 0.2, // 降低!0.5 → 0.2
|
||
hungerHealthDamage: 0.3, // 降低!1 → 0.3
|
||
sicknessThreshold: 20, // 降低!40 → 20
|
||
dyingTimeSeconds: 14400, // 延長!7200 → 14400 (4 小時)
|
||
sleepSchedule: {
|
||
nightSleep: {
|
||
startHour: 22, // 晚上 22:00 開始 (比貓晚睡)
|
||
startMinute: 0,
|
||
endHour: 7, // 早上 7:00 結束 (比貓早起)
|
||
endMinute: 0,
|
||
autoSleep: true,
|
||
randomWakeChance: 0.4
|
||
},
|
||
noonNap: {
|
||
startHour: 13,
|
||
startMinute: 0,
|
||
endHour: 14,
|
||
endMinute: 0,
|
||
autoSleep: true,
|
||
randomWakeChance: 0.2
|
||
}
|
||
},
|
||
maxPoopCount: 5,
|
||
sleepDecayMultiplier: 0.1,
|
||
defaultHeight: 12, // 狗狗比較大隻
|
||
defaultWeight: 600,
|
||
playHungerCost: 2, // 玩耍消耗更多體力
|
||
combatFormulas: {
|
||
attack: {
|
||
strMultiplier: 3.0, // 攻擊力更高
|
||
dexMultiplier: 0.2
|
||
},
|
||
defense: {
|
||
strMultiplier: 1.5,
|
||
intMultiplier: 1.5
|
||
},
|
||
speed: {
|
||
dexMultiplier: 2.0, // 速度稍慢
|
||
intMultiplier: 0.5
|
||
}
|
||
},
|
||
dropRate: 0.1,
|
||
luck: 15 // 狗狗運氣比較好?
|
||
},
|
||
lifecycle: [
|
||
{
|
||
stage: 'egg',
|
||
durationSeconds: 300,
|
||
height: 6,
|
||
baseWeight: 120,
|
||
weightRange: { min: 100, max: 140 },
|
||
unlockedFeatures: [],
|
||
allowedActions: [],
|
||
enabledSystems: {
|
||
hunger: false,
|
||
happiness: false,
|
||
poop: false,
|
||
sickness: false,
|
||
sleep: false
|
||
}
|
||
},
|
||
{
|
||
stage: 'baby',
|
||
durationSeconds: 21900,
|
||
height: 12,
|
||
baseWeight: 250,
|
||
weightRange: { min: 220, max: 280 },
|
||
unlockedFeatures: [],
|
||
allowedActions: ['feed', 'play', 'clean', 'heal', 'sleep'],
|
||
enabledSystems: {
|
||
hunger: true,
|
||
happiness: true,
|
||
poop: true,
|
||
sickness: true,
|
||
sleep: true
|
||
}
|
||
},
|
||
{
|
||
stage: 'child',
|
||
durationSeconds: 281100,
|
||
height: 20,
|
||
baseWeight: 500,
|
||
weightRange: { min: 450, max: 550 },
|
||
unlockedFeatures: ['miniGames'],
|
||
allowedActions: ['feed', 'play', 'clean', 'heal', 'sleep'],
|
||
enabledSystems: {
|
||
hunger: true,
|
||
happiness: true,
|
||
poop: true,
|
||
sickness: true,
|
||
sleep: true
|
||
},
|
||
conditions: {
|
||
str: 10,
|
||
int: 6
|
||
}
|
||
},
|
||
{
|
||
stage: 'adult',
|
||
durationSeconds: Infinity,
|
||
height: 30,
|
||
baseWeight: 800,
|
||
weightRange: { min: 700, max: 900 },
|
||
unlockedFeatures: ['miniGames', 'breeding'],
|
||
allowedActions: ['feed', 'play', 'clean', 'heal', 'sleep'],
|
||
enabledSystems: {
|
||
hunger: true,
|
||
happiness: true,
|
||
poop: true,
|
||
sickness: true,
|
||
sleep: true
|
||
},
|
||
conditions: {
|
||
str: 60,
|
||
int: 40,
|
||
dex: 40
|
||
},
|
||
evolutions: [
|
||
{
|
||
id: 'guardian_dog',
|
||
name: '守護神犬',
|
||
icon: '🐕',
|
||
description: '忠誠的守護者',
|
||
conditions: {
|
||
str: { min: 60, dominant: true }
|
||
},
|
||
statModifiers: {
|
||
attack: 1.4,
|
||
defense: 1.4,
|
||
speed: 0.9
|
||
}
|
||
},
|
||
{
|
||
id: 'hunting_dog',
|
||
name: '獵犬',
|
||
icon: '🐩',
|
||
description: '敏銳的獵手',
|
||
conditions: {
|
||
dex: { min: 50, dominant: true }
|
||
},
|
||
statModifiers: {
|
||
attack: 1.2,
|
||
defense: 0.9,
|
||
speed: 1.3
|
||
}
|
||
},
|
||
{
|
||
id: 'guide_dog',
|
||
name: '導盲犬',
|
||
icon: '🦮',
|
||
description: '聰明的嚮導',
|
||
conditions: {
|
||
int: { min: 50, dominant: true }
|
||
},
|
||
statModifiers: {
|
||
attack: 0.8,
|
||
defense: 1.2,
|
||
speed: 1.0,
|
||
magic: 1.4
|
||
}
|
||
},
|
||
{
|
||
id: 'balanced_dog',
|
||
name: '成年犬',
|
||
icon: '🐕🦺',
|
||
description: '健康的成年犬',
|
||
conditions: {},
|
||
statModifiers: {
|
||
attack: 1.1,
|
||
defense: 1.1,
|
||
speed: 1.0
|
||
}
|
||
}
|
||
]
|
||
}
|
||
],
|
||
personality: ['忠誠', '憨厚']
|
||
}
|
||
}
|
||
|