-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa5e4e0
commit 44967a5
Showing
18 changed files
with
531 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.died { | ||
|
||
height: 100vh; | ||
width: 100vw; | ||
background-color: black; | ||
color: white; | ||
z-index: 2000; | ||
position: absolute; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 20px; | ||
visibility: hidden; | ||
opacity: 0; | ||
transition: 2s; | ||
text-align: center; | ||
|
||
} | ||
|
||
.died.active { | ||
|
||
visibility: visible; | ||
opacity: 1; | ||
|
||
} | ||
|
||
.diedTxt { | ||
|
||
font-size: 3.5em; | ||
|
||
} | ||
|
||
.diedTopaze { | ||
|
||
display: flex; | ||
align-items: center; | ||
gap: 30px; | ||
|
||
} | ||
|
||
.diedTopazeTxt { | ||
|
||
font-size: 2em; | ||
|
||
} | ||
|
||
.died.active .btn { | ||
|
||
cursor: pointer; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
|
||
.imgElement { | ||
|
||
width: 45px; | ||
width: auto; | ||
height: 45px; | ||
|
||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const nbPotionSpeed = document.querySelector(".nbPotionSpeed"); | ||
|
||
let playerSpeed = 2; | ||
|
||
let PotionSpeed = 0; | ||
|
||
function potionSpeedChange(PotionSpeedLess) { | ||
PotionSpeed += PotionSpeedLess; | ||
|
||
if(PotionSpeed <= 0) { | ||
PotionSpeed = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const carte = document.querySelector(".carte"); | ||
|
||
const carteAmarantis = ` | ||
<div> | ||
<p>Amarantis</p> | ||
<img class="carteImg" src="Site/ImageGame/village.png" alt="Village"> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
const nbHeart = document.querySelector(".nbHeart"); | ||
|
||
const nbPotionHeart = document.querySelector(".nbPotionHeart"); | ||
|
||
const died = document.querySelector(".died"); | ||
const diedTopaze = document.querySelector(".diedTopaze"); | ||
const diedTopazeTxt = document.querySelector(".diedTopazeTxt"); | ||
const reprendreDied = document.querySelector(".reprendreDied"); | ||
|
||
let heartMax = 3; | ||
|
||
let heart = heartMax; | ||
|
||
function heartChange(heartLess) { | ||
if(playerSpeed === 3) { | ||
if(heartLess > 0) { | ||
heartLess = 0 | ||
} | ||
} else { | ||
heart += heartLess; | ||
} | ||
|
||
if(heart > heartMax) { | ||
heart = heartMax; | ||
} | ||
|
||
if(heart <= 0) { | ||
heart = 0; | ||
} | ||
} | ||
|
||
let PotionHeart = 0; | ||
|
||
function potionHeartChange(PotionHeartLess) { | ||
PotionHeart += PotionHeartLess; | ||
|
||
if(PotionHeart <= 0) { | ||
PotionHeart = 0; | ||
} | ||
} | ||
|
||
let diedReprendre = false; | ||
|
||
reprendreDied.onclick = function() {; | ||
died.classList.remove("active"); | ||
body.style.cursor = "none"; | ||
menuKeys = false; | ||
|
||
if(!diedReprendre) { | ||
heartChange(heartMax); | ||
topazeChange(-2); | ||
diedReprendre = true; | ||
} | ||
}; |
Oops, something went wrong.