function selectCharacter(character) {
        dispatch({
            type: SET_STATISTICS,
            payload: {
                characterName: character.characterName,
                strength: character.strength,
                agility: character.agility,
                endurance: character.endurance,
                maxHP: character.maxHP,
                currentHP: character.currentHP,
                damMod: character.damMod,
                evaMod: character.evaMod,
                gold: character.gold,
                exp: character.exp,
                potions: character.potions,
            }
        })

        if (player.characterName == character.characterName) {
            console.log(player.currentHP);
            setStart(true);
        }
    }
// Load the character info into global state to start the game
Load the character info into global state to start the game
Load the character info into global state to start the game
function selectCharacter(character) {
        dispatch({
            type: SET_STATISTICS,
            payload: {
                characterName: character.characterName,
                strength: character.strength,
                agility: character.agility,
                endurance: character.endurance,
                maxHP: character.maxHP,
                currentHP: character.currentHP,
                damMod: character.damMod,
                evaMod: character.evaMod,
                gold: character.gold,
                exp: character.exp,
                potions: character.potions,
            }
        })
        if (player.characterName == character.characterName) {
            console.log(player.currentHP);
            setStart(true);
        }
    }
function selectCharacter ( character ) { dispatch ( { type : SET_STATISTICS , payload : { characterName : character . characterName , strength : character . strength , agility : character . agility , endurance : character . endurance , maxHP : character . maxHP , currentHP : character . currentHP , damMod : character . damMod , evaMod : character . evaMod , gold : character . gold , exp : character . exp , potions : character . potions , } } ) if ( player . characterName == character . characterName ) { console . log ( player . currentHP ) ; setStart ( true ) ; } }
Load the character info into global state to start the game
Load the character info into global state to start the game