Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change some English text, delete console.logs #44

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<div class="popupScreen" id='info-modal-screen'>
<div id="modal-exit-button" class="exitButton">&#10006;</div>
<p id="modal-header" class="modalHeader">How to play?</p>
<p id="modal-paragraph" class="modalParagraph">After entering the players' names, click start. <br>Each player chooses three pokemon and then the game begins. <br>During his move, the player can attack the opponent, change the pokemon or use the mango (heal currently used pokemon). <br>The one who kills all the opponent's pokemon faster wins. <br>Have fun! </p>
<p id="modal-paragraph" class="modalParagraph">After entering the players' names, click start. <br>Each player chooses three pokemons and then the game begins. <br>During his move, the player can attack the opponent, change the pokemon or use mango (heal currently active pokemon, available only once per game). <br>The player who kills all the opponent's pokemons faster wins. <br>Have fun!</p>
</div>
</template>

Expand All @@ -83,7 +83,7 @@
<template id='choose-page-template'>
<div id='choose-page'>
<p>Sorry, but we couldn't wake up Snorlax...<br>
We catch only 12 Pokemons. Choose the pokemon to fight wisely and smarter than your opponent :)</p>
We caught only 12 Pokemons. Choose them wisely and smarter than your opponent &#128515;</p>
<p id='whoChoosesParagraph'>Ash chooses 1 (the last) pokemon</p>
<div class='choosePagePlayers' id='choosePagePlayer1'>
<h1 class='choosePagePlayersName fancyFont' id='choosePagePlayer1Name'>ASH</h1>
Expand Down
4 changes: 0 additions & 4 deletions src/fightPage/buttonsEventListeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,11 @@ export const attack = (gameHandler: GameHandler, e: Event) => {
const attackingPoke = gameHandler.currentPlayer.getActivePokemon;
const defendingPoke = gameHandler.opponentPlayer.getActivePokemon;

console.log("Before attack ", `${defendingPoke.name} has ${defendingPoke.currentHP}`);
const damage: number = fight.fight(attackingPoke, defendingPoke, move as PokemonMove)
console.log(`${attackingPoke.name} did ${damage} with ${move.moveName} to ${defendingPoke.name}`);
console.log("After attack ", `${defendingPoke.name} has ${defendingPoke.currentHP}`);
}
};

export const switchPoke = (gameHandler: GameHandler, event: Event) => {
console.log('Switched!')
animationSwitchPokemon(gameHandler);
const nameOfChosenPokemon = (event.currentTarget as HTMLDivElement)
.textContent;
Expand Down
1 change: 0 additions & 1 deletion src/fightPage/createHPBars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const createHPBars = (playerOne: Player, playerTwo: Player) => {
const maxHP = player.getActivePokemon.maxHP;
const currentHP = player.getActivePokemon.currentHP;
const HPInPercent = (currentHP / maxHP) * 100;
console.log(HPInPercent);
HPBar.style.width = `${HPInPercent}%`;
let HPClassList = HPBar.classList;
if (HPInPercent < 20) {
Expand Down