Handle Nincada split evolution (Ninjask + Shedinja)
When evolving Nincada, a confirmation prompt now offers to also add Shedinja as a new encounter on the same route. The Shedinja encounter uses a "shed_evolution" origin to bypass route-locking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import { useState } from 'react'
|
||||
import { useParams, Link } from 'react-router-dom'
|
||||
import { useRun, useUpdateRun } from '../hooks/useRuns'
|
||||
import { useGameRoutes } from '../hooks/useGames'
|
||||
import { useUpdateEncounter } from '../hooks/useEncounters'
|
||||
import { useCreateEncounter, useUpdateEncounter } from '../hooks/useEncounters'
|
||||
import { StatCard, PokemonCard, RuleBadges, StatusChangeModal, EndRunModal } from '../components'
|
||||
import type { RunStatus, EncounterDetail } from '../types'
|
||||
|
||||
@@ -26,6 +26,7 @@ export function RunDashboard() {
|
||||
const runIdNum = Number(runId)
|
||||
const { data: run, isLoading, error } = useRun(runIdNum)
|
||||
const { data: routes } = useGameRoutes(run?.gameId ?? null)
|
||||
const createEncounter = useCreateEncounter(runIdNum)
|
||||
const updateEncounter = useUpdateEncounter(runIdNum)
|
||||
const updateRun = useUpdateRun(runIdNum)
|
||||
const [selectedEncounter, setSelectedEncounter] =
|
||||
@@ -243,6 +244,9 @@ export function RunDashboard() {
|
||||
onClose={() => setSelectedEncounter(null)}
|
||||
isPending={updateEncounter.isPending}
|
||||
region={run?.game.region}
|
||||
onCreateEncounter={(data) => {
|
||||
createEncounter.mutate(data)
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@@ -1269,6 +1269,9 @@ export function RunEncounters() {
|
||||
onClose={() => setSelectedTeamEncounter(null)}
|
||||
isPending={updateEncounter.isPending}
|
||||
region={run?.game.region}
|
||||
onCreateEncounter={(data) => {
|
||||
createEncounter.mutate(data)
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user