3d8566bc-063f-41e8-8934-68c9ac5b8211
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { useState } from "react";
|
||||
import { useGameStore } from "@/store/gameStore";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { sfx } from "@/hooks/useAudio";
|
||||
import { EXPEDITION_CONFIG, combatWinRate } from "@/lib/game/expedition";
|
||||
import { formatNum } from "@/lib/game/config";
|
||||
import { Button } from "@/components/ui/button";
|
||||
@@ -58,6 +59,7 @@ export function ExpeditionPanel() {
|
||||
if (!res.ok) {
|
||||
toast({ title: "无法出发", description: res.reason, variant: "destructive" });
|
||||
} else {
|
||||
sfx("expeditionStart");
|
||||
toast({ title: "探险队出发", description: "深入遗迹,谨慎前行。" });
|
||||
setLastLog(null);
|
||||
}
|
||||
@@ -67,6 +69,12 @@ export function ExpeditionPanel() {
|
||||
const result = resolveCurrentNode();
|
||||
if (!result) return;
|
||||
setLastLog(result.log);
|
||||
if (result.ended) {
|
||||
if (result.endReason === "victory") sfx("expeditionVictory");
|
||||
else sfx("expeditionDefeat");
|
||||
} else {
|
||||
sfx("expeditionNode");
|
||||
}
|
||||
toast({
|
||||
title: result.ended
|
||||
? result.endReason === "victory" ? "✦ 探险胜利!" : "探险失败"
|
||||
|
||||
Reference in New Issue
Block a user