diff --git a/src/App.vue b/src/App.vue
index 85c5744..2ea7bb4 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -175,6 +175,9 @@ function triggerDebugAction(action, payload = null) {
+
+
+
diff --git a/src/components/ActionMenu.vue b/src/components/ActionMenu.vue
index c0d5dc9..4879436 100644
--- a/src/components/ActionMenu.vue
+++ b/src/components/ActionMenu.vue
@@ -2,7 +2,7 @@
@@ -27,7 +27,7 @@ const props = defineProps({
}
});
-defineEmits(['clean', 'medicine', 'training', 'inventory']);
+defineEmits(['clean', 'medicine', 'sleep', 'inventory']);
diff --git a/src/components/PetGame.vue b/src/components/PetGame.vue
index 70b3978..75aa3ff 100644
--- a/src/components/PetGame.vue
+++ b/src/components/PetGame.vue
@@ -6,7 +6,7 @@
@info="showPetInfo = !showPetInfo"
@feed="$emit('action', 'feed')"
@playMenu="showPlayMenu = true"
- @sleep="$emit('action', 'sleep')"
+ @temple="showTemple = true"
/>
@@ -177,12 +177,11 @@
-
-
+
+
+
+
+
@@ -286,17 +297,17 @@
diff --git a/src/composables/usePetSystem.js b/src/composables/usePetSystem.js
index 101cd02..5d958a6 100644
--- a/src/composables/usePetSystem.js
+++ b/src/composables/usePetSystem.js
@@ -30,7 +30,17 @@ export function usePetSystem() {
dex: 0, // 敏捷 (Catch Ball)
generation: 1, // 輪迴世代
deityFavor: 0, // 神明好感度
- destiny: null // 天生命格 (Object)
+ destiny: null, // 天生命格 (Object)
+ // Deity System
+ currentDeity: 'mazu',
+ deityFavors: {
+ mazu: 0,
+ earthgod: 0,
+ matchmaker: 0,
+ wenchang: 0,
+ guanyin: 0
+ },
+ dailyPrayerCount: 0
});
const achievements = ref([
@@ -189,10 +199,14 @@ export function usePetSystem() {
// Sickness Check (更低的生病機率)
// Destiny Effect: Purification (淨化) - Sickness chance -20%
+ // Deity Buff: 媽祖 - Sickness chance -15%
let sickChance = 0.1;
if (stats.value.destiny?.id === 'purification') {
sickChance *= 0.8;
}
+ if (stats.value.currentDeity === 'mazu' && stats.value.deityFavors?.mazu > 0) {
+ sickChance *= 0.85;
+ }
if (stats.value.health < 30 && state.value !== 'sick') {
if (Math.random() < sickChance) {
@@ -202,8 +216,21 @@ export function usePetSystem() {
// Health Recovery (健康值可以緩慢恢復)
// 如果沒有便便、飢餓值和快樂值都高,健康值會緩慢恢復
+ let healthRecovery = 0.05;
+
+ // Deity Buff: 觀音 - Health 回復 +20%
+ if (stats.value.currentDeity === 'guanyin' && stats.value.deityFavors?.guanyin > 0) {
+ healthRecovery *= 1.2;
+ }
+
+ // Deity Buff: 月老 - Happiness 回復 +25%
+ if (stats.value.currentDeity === 'matchmaker' && stats.value.deityFavors?.matchmaker > 0) {
+ // Apply to happiness decay reduction (slower decay = faster recovery)
+ happinessDecay *= 0.75;
+ }
+
if (stats.value.poopCount === 0 && stats.value.hunger > 50 && stats.value.happiness > 50 && stats.value.health < 100 && state.value !== 'sick') {
- stats.value.health = Math.min(100, stats.value.health + 0.05);
+ stats.value.health = Math.min(100, stats.value.health + healthRecovery);
}
// Death Check (移除死亡機制,依照之前的討論)