🐛 first index not reset

This commit is contained in:
Chase Manning 2023-10-04 23:36:40 +01:00
commit c414e95aef
3 changed files with 2 additions and 143 deletions

View file

@ -1,6 +1,5 @@
===========
- first index not reset after heal
- Restrict east traversal before beating brock
- Implement meseum
- Add more maps

View file

@ -634,7 +634,6 @@ const PokemonEncounter = () => {
// Ending encounter
setTrainerPokemonIndex(0);
dispatch(endEncounter());
dispatch(resetActivePokemon());
if (isTrainer) {
// Defeated trainer
@ -667,6 +666,7 @@ const PokemonEncounter = () => {
useEffect(() => {
if (isInBattle) {
dispatch(resetActivePokemon());
setStage(0);
setTimeout(() => {
setStage(1);
@ -679,7 +679,7 @@ const PokemonEncounter = () => {
if (!isInBattle) {
setStage(-1);
}
}, [isInBattle]);
}, [isInBattle, dispatch]);
const throwPokeball = () => {
setTimeout(() => {

View file

@ -77,146 +77,6 @@ const initialState: GameState = {
{ id: "growl", pp: 40 },
],
},
{
id: 4,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "scratch", pp: 35 },
{ id: "growl", pp: 40 },
],
},
{
id: 7,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "tackle", pp: 35 },
{ id: "tail-whip", pp: 30 },
],
},
{
id: 1,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "tackle", pp: 35 },
{ id: "growl", pp: 40 },
],
},
{
id: 4,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "scratch", pp: 35 },
{ id: "growl", pp: 40 },
],
},
{
id: 7,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "tackle", pp: 35 },
{ id: "tail-whip", pp: 30 },
],
},
{
id: 1,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "tackle", pp: 35 },
{ id: "growl", pp: 40 },
],
},
{
id: 4,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "scratch", pp: 35 },
{ id: "growl", pp: 40 },
],
},
{
id: 7,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "tackle", pp: 35 },
{ id: "tail-whip", pp: 30 },
],
},
{
id: 1,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "tackle", pp: 35 },
{ id: "growl", pp: 40 },
],
},
{
id: 4,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "scratch", pp: 35 },
{ id: "growl", pp: 40 },
],
},
{
id: 7,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "tackle", pp: 35 },
{ id: "tail-whip", pp: 30 },
],
},
{
id: 1,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "tackle", pp: 35 },
{ id: "growl", pp: 40 },
],
},
{
id: 4,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "scratch", pp: 35 },
{ id: "growl", pp: 40 },
],
},
{
id: 7,
level: 5,
xp: 0,
hp: 19,
moves: [
{ id: "tackle", pp: 35 },
{ id: "tail-whip", pp: 30 },
],
},
],
activePokemonIndex: 0,
trainerEncounter: undefined,