diff --git a/.github/.keep b/.github/.keep new file mode 100644 index 00000000..e69de29b diff --git a/README.md b/README.md index e240001b..4f663e04 100644 --- a/README.md +++ b/README.md @@ -1 +1,53 @@ -REPLACE THIS WITH A DESCRIPTION OF YOUR GAME (in the README.md file). +# Game Name + +Infamia di Creti + +# Team Color + +Green + +# Developers + +Mantra Yang (myang@udel.edu) +Sehee Hwang (hsehee@udel.edu + +# Blurb + +Infamia di Creti is a game based on the myth of Theseus and the Minotaur. Players play as Theseus, a young prince, who sets out on a quest to slay the Minotaur, a half-man, half-bull monster at the center of the maze, to save the people of Crete from being sacrificed to it. Theseus must travel through three rooms of the maze in order to reach the center where the Minotaur lives. The game's learning objective is to teach players about Java classes and methods. Players can upgrade and change the type of Theseus's weapon by writing code using provided classes and methods. + +# Basic Instructions + +Once the game loads in the browser, you must click on "Enter the Maze" to begin the game. The game begins with a tutorial, during which Ariadne, the princess of Crete, provides Theseus with a bow and guides him through an example of how to use the weapons system. In the tutorial, Thesues must increase the damage of his bow and once he is successful he can enter the maze. Theseus enters a room with two skeleton enemies which he must defeat to progress to the next room. There are two rooms after the initial room that Theseus must progress through to reach the Minotaur at the center of the maze. These two rooms have different enemies and the difficulty level of the game increases as Theseus progresses through the room. The number of enemies increases as well as how much health they have. Upon death, enemies will drop a weapon, a weapon upgrade feature, or a weapon type feature. The increasing difficulty encourages the player to use the weapon system to modify their weapon. Once Theseus reaches the center of the maze, he must defeat the Minotaur to win the game and save the people of Crete. + +# Screenshot + +![Screenshot of the first room in Infamia di Creti](/docs/large.png) + +# Gameplay Video + + +https://github.com/UD-S24-CISC374/final-project-green/assets/131828619/7118c93c-0296-4285-ae5f-78b3f9595322 + + + + +# Educational Game Design Document + +Link to our [egdd](docs/egdd.md) + +# Credits + +- https://quintino-pixels.itch.io/cc-10-top-down-dungeon-tileset +- https://opengameart.org/content/legend-of-faune +- https://opengameart.org/content/sword-normal +- https://opengameart.org/content/weapon-slash-effect +- https://opengameart.org/content/animated-fantasy-bows +- https://jitsukoan.itch.io/minotaur +- https://opengameart.org/content/skeletons-rework +- https://despairparty.itch.io/rpgmaker-spriteface +- https://pogutatar.itch.io/pixel-button-pack-by-pogutatar +- https://xzany.itch.io/flying-demon-2d-pixel-art +- https://lilwillydesigns.itch.io/dark-enemies-pack +- Music by OB-LIX: + - https://pixabay.com/music/suspense-the-spell-dark-magic-background-music-ob-lix-8009/ + diff --git a/assets/Buttons/ArrowButton.png b/assets/Buttons/ArrowButton.png new file mode 100644 index 00000000..085e1ce9 Binary files /dev/null and b/assets/Buttons/ArrowButton.png differ diff --git a/assets/Music/titleScene.mp3 b/assets/Music/titleScene.mp3 new file mode 100644 index 00000000..f89da10d Binary files /dev/null and b/assets/Music/titleScene.mp3 differ diff --git a/assets/characters/Ariadne.png b/assets/characters/Ariadne.png new file mode 100644 index 00000000..1c821379 Binary files /dev/null and b/assets/characters/Ariadne.png differ diff --git a/assets/characters/blob_monster.json b/assets/characters/blob_monster.json new file mode 100644 index 00000000..63861643 --- /dev/null +++ b/assets/characters/blob_monster.json @@ -0,0 +1,187 @@ +{ + "textures": [ + { + "image": "texture", + "format": "RGBA8888", + "size": { + "w": 175, + "h": 20 + }, + "scale": 1, + "frames": [ + { + "filename": "walk07.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 0, + "y": 12, + "w": 22, + "h": 20 + }, + "frame": { + "x": 0, + "y": 0, + "w": 22, + "h": 20 + } + }, + { + "filename": "walk08.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 0, + "y": 12, + "w": 22, + "h": 20 + }, + "frame": { + "x": 22, + "y": 0, + "w": 22, + "h": 20 + } + }, + { + "filename": "walk01.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 0, + "y": 13, + "w": 22, + "h": 19 + }, + "frame": { + "x": 44, + "y": 0, + "w": 22, + "h": 19 + } + }, + { + "filename": "walk02.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 0, + "y": 13, + "w": 22, + "h": 19 + }, + "frame": { + "x": 66, + "y": 0, + "w": 22, + "h": 19 + } + }, + { + "filename": "walk03.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 0, + "y": 13, + "w": 22, + "h": 19 + }, + "frame": { + "x": 88, + "y": 0, + "w": 22, + "h": 19 + } + }, + { + "filename": "walk04.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 0, + "y": 13, + "w": 22, + "h": 19 + }, + "frame": { + "x": 110, + "y": 0, + "w": 22, + "h": 19 + } + }, + { + "filename": "walk05.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 0, + "y": 13, + "w": 22, + "h": 19 + }, + "frame": { + "x": 132, + "y": 0, + "w": 22, + "h": 19 + } + }, + { + "filename": "walk06.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 1, + "y": 12, + "w": 21, + "h": 20 + }, + "frame": { + "x": 154, + "y": 0, + "w": 21, + "h": 20 + } + } + ] + } + ], + "meta": { + "app": "http://free-tex-packer.com", + "version": "0.6.7" + } +} \ No newline at end of file diff --git a/assets/characters/blob_monster.png b/assets/characters/blob_monster.png new file mode 100644 index 00000000..04e993fb Binary files /dev/null and b/assets/characters/blob_monster.png differ diff --git a/assets/characters/fauna.json b/assets/characters/fauna.json new file mode 100644 index 00000000..6e2eb356 --- /dev/null +++ b/assets/characters/fauna.json @@ -0,0 +1,670 @@ +{ + "textures": [ + { + "image": "fauna.png", + "format": "RGBA8888", + "size": { + "w": 130, + "h": 147 + }, + "scale": 1, + "frames": [ + { + "filename": "run-side-4.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 22 + }, + "frame": { + "x": 2, + "y": 2, + "w": 17, + "h": 22 + } + }, + { + "filename": "walk-side-3.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 22 + }, + "frame": { + "x": 23, + "y": 2, + "w": 17, + "h": 22 + } + }, + { + "filename": "run-down-1.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 8, + "w": 18, + "h": 22 + }, + "frame": { + "x": 2, + "y": 28, + "w": 18, + "h": 22 + } + }, + { + "filename": "walk-down-3.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 6, + "w": 16, + "h": 22 + }, + "frame": { + "x": 24, + "y": 28, + "w": 16, + "h": 22 + } + }, + { + "filename": "run-down-5.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 8, + "w": 18, + "h": 22 + }, + "frame": { + "x": 44, + "y": 2, + "w": 18, + "h": 22 + } + }, + { + "filename": "run-side-1.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 18, + "h": 22 + }, + "frame": { + "x": 44, + "y": 28, + "w": 18, + "h": 22 + } + }, + { + "filename": "run-side-2.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 18, + "h": 22 + }, + "frame": { + "x": 2, + "y": 54, + "w": 18, + "h": 22 + } + }, + { + "filename": "run-side-5.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 5, + "w": 18, + "h": 22 + }, + "frame": { + "x": 24, + "y": 54, + "w": 18, + "h": 22 + } + }, + { + "filename": "run-side-6.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 6, + "w": 18, + "h": 22 + }, + "frame": { + "x": 46, + "y": 54, + "w": 18, + "h": 22 + } + }, + { + "filename": "run-side-8.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 6, + "w": 17, + "h": 22 + }, + "frame": { + "x": 66, + "y": 2, + "w": 17, + "h": 22 + } + }, + { + "filename": "run-up-6.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 9, + "w": 17, + "h": 21 + }, + "frame": { + "x": 66, + "y": 28, + "w": 17, + "h": 21 + } + }, + { + "filename": "run-down-8.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 9, + "w": 17, + "h": 21 + }, + "frame": { + "x": 2, + "y": 80, + "w": 17, + "h": 21 + } + }, + { + "filename": "run-down-2.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 9, + "w": 16, + "h": 21 + }, + "frame": { + "x": 68, + "y": 53, + "w": 16, + "h": 21 + } + }, + { + "filename": "faint-1.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 7, + "w": 17, + "h": 21 + }, + "frame": { + "x": 23, + "y": 80, + "w": 17, + "h": 21 + } + }, + { + "filename": "run-side-3.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 7, + "w": 18, + "h": 21 + }, + "frame": { + "x": 44, + "y": 80, + "w": 18, + "h": 21 + } + }, + { + "filename": "faint-2.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 8, + "w": 20, + "h": 21 + }, + "frame": { + "x": 66, + "y": 80, + "w": 20, + "h": 21 + } + }, + { + "filename": "run-down-4.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 9, + "w": 17, + "h": 21 + }, + "frame": { + "x": 90, + "y": 2, + "w": 17, + "h": 21 + } + }, + { + "filename": "faint-3.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 9, + "y": 14, + "w": 21, + "h": 15 + }, + "frame": { + "x": 87, + "y": 27, + "w": 21, + "h": 15 + } + }, + { + "filename": "run-side-7.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 7, + "w": 18, + "h": 21 + }, + "frame": { + "x": 90, + "y": 46, + "w": 18, + "h": 21 + } + }, + { + "filename": "run-down-6.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 9, + "w": 16, + "h": 21 + }, + "frame": { + "x": 90, + "y": 71, + "w": 16, + "h": 21 + } + }, + { + "filename": "run-up-1.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 6, + "y": 8, + "w": 19, + "h": 21 + }, + "frame": { + "x": 2, + "y": 105, + "w": 19, + "h": 21 + } + }, + { + "filename": "run-up-2.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 9, + "w": 17, + "h": 21 + }, + "frame": { + "x": 25, + "y": 105, + "w": 17, + "h": 21 + } + }, + { + "filename": "run-up-5.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 8, + "w": 19, + "h": 21 + }, + "frame": { + "x": 46, + "y": 105, + "w": 19, + "h": 21 + } + }, + { + "filename": "walk-up-3.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 6, + "w": 16, + "h": 21 + }, + "frame": { + "x": 69, + "y": 105, + "w": 16, + "h": 21 + } + }, + { + "filename": "run-up-4.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 7, + "y": 9, + "w": 17, + "h": 20 + }, + "frame": { + "x": 90, + "y": 96, + "w": 17, + "h": 20 + } + }, + { + "filename": "run-up-3.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 10, + "w": 16, + "h": 20 + }, + "frame": { + "x": 112, + "y": 2, + "w": 16, + "h": 20 + } + }, + { + "filename": "run-down-7.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 10, + "w": 17, + "h": 20 + }, + "frame": { + "x": 111, + "y": 71, + "w": 17, + "h": 20 + } + }, + { + "filename": "run-up-7.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 10, + "w": 17, + "h": 20 + }, + "frame": { + "x": 111, + "y": 95, + "w": 17, + "h": 20 + } + }, + { + "filename": "run-up-8.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 9, + "w": 17, + "h": 20 + }, + "frame": { + "x": 111, + "y": 119, + "w": 17, + "h": 20 + } + }, + { + "filename": "run-down-3.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 8, + "y": 10, + "w": 16, + "h": 20 + }, + "frame": { + "x": 112, + "y": 26, + "w": 16, + "h": 20 + } + }, + { + "filename": "faint-4.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 9, + "y": 14, + "w": 20, + "h": 15 + }, + "frame": { + "x": 2, + "y": 130, + "w": 20, + "h": 15 + } + } + ] + } + ], + "meta": { + "app": "http://free-tex-packer.com", + "version": "0.6.5" + } +} diff --git a/assets/characters/fauna.png b/assets/characters/fauna.png new file mode 100644 index 00000000..e2532b37 Binary files /dev/null and b/assets/characters/fauna.png differ diff --git a/assets/characters/flying_bat.json b/assets/characters/flying_bat.json new file mode 100644 index 00000000..2cb65d9e --- /dev/null +++ b/assets/characters/flying_bat.json @@ -0,0 +1,173 @@ +{ + "textures": [ + { + "image": "texture", + "format": "RGBA8888", + "size": { + "w": 203, + "h": 23 + }, + "scale": 1, + "frames": [ + { + "filename": "fly01.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 1, + "y": 4, + "w": 29, + "h": 23 + }, + "frame": { + "x": 0, + "y": 0, + "w": 29, + "h": 23 + } + }, + { + "filename": "fly07.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 1, + "y": 4, + "w": 29, + "h": 23 + }, + "frame": { + "x": 29, + "y": 0, + "w": 29, + "h": 23 + } + }, + { + "filename": "fly02.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 1, + "y": 4, + "w": 29, + "h": 22 + }, + "frame": { + "x": 58, + "y": 0, + "w": 29, + "h": 22 + } + }, + { + "filename": "fly05.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 1, + "y": 4, + "w": 29, + "h": 22 + }, + "frame": { + "x": 87, + "y": 0, + "w": 29, + "h": 22 + } + }, + { + "filename": "fly06.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 1, + "y": 4, + "w": 29, + "h": 22 + }, + "frame": { + "x": 116, + "y": 0, + "w": 29, + "h": 22 + } + }, + { + "filename": "fly03.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 1, + "y": 5, + "w": 29, + "h": 20 + }, + "frame": { + "x": 145, + "y": 0, + "w": 29, + "h": 20 + } + }, + { + "filename": "fly04.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 32, + "h": 32 + }, + "spriteSourceSize": { + "x": 1, + "y": 5, + "w": 29, + "h": 20 + }, + "frame": { + "x": 174, + "y": 0, + "w": 29, + "h": 20 + } + } + ] + } + ], + "meta": { + "app": "http://free-tex-packer.com", + "version": "0.6.7", + "image": "flying_bat.png", + "format": "RGBA8888", + "size": { + "w": 20, + "h": 234 + }, + "scale": 1 + } +} diff --git a/assets/characters/flying_bat.png b/assets/characters/flying_bat.png new file mode 100644 index 00000000..cee40707 Binary files /dev/null and b/assets/characters/flying_bat.png differ diff --git a/assets/characters/minotaur_black.json b/assets/characters/minotaur_black.json new file mode 100644 index 00000000..8a62f4d0 --- /dev/null +++ b/assets/characters/minotaur_black.json @@ -0,0 +1,303 @@ +{ + "frames": { + "minotaur_black_10.png": { + "frame": { + "x": 0, + "y": 0, + "w": 54, + "h": 96 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 48, + "y": 0, + "w": 54, + "h": 96 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_04.png": { + "frame": { + "x": 0, + "y": 96, + "w": 55, + "h": 84 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 41, + "y": 12, + "w": 55, + "h": 84 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_03.png": { + "frame": { + "x": 54, + "y": 0, + "w": 55, + "h": 83 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 41, + "y": 13, + "w": 55, + "h": 83 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_05.png": { + "frame": { + "x": 0, + "y": 180, + "w": 55, + "h": 83 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 41, + "y": 13, + "w": 55, + "h": 83 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_09.png": { + "frame": { + "x": 0, + "y": 263, + "w": 53, + "h": 83 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 48, + "y": 13, + "w": 53, + "h": 83 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_11.png": { + "frame": { + "x": 0, + "y": 346, + "w": 53, + "h": 83 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 48, + "y": 13, + "w": 53, + "h": 83 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_01.png": { + "frame": { + "x": 0, + "y": 429, + "w": 67, + "h": 82 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 37, + "y": 14, + "w": 67, + "h": 82 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_07.png": { + "frame": { + "x": 53, + "y": 263, + "w": 67, + "h": 82 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 38, + "y": 14, + "w": 67, + "h": 82 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_00.png": { + "frame": { + "x": 53, + "y": 345, + "w": 67, + "h": 81 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 38, + "y": 15, + "w": 67, + "h": 81 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_02.png": { + "frame": { + "x": 55, + "y": 83, + "w": 67, + "h": 81 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 37, + "y": 15, + "w": 67, + "h": 81 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_06.png": { + "frame": { + "x": 120, + "y": 0, + "w": 66, + "h": 81 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 39, + "y": 15, + "w": 66, + "h": 81 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "minotaur_black_08.png": { + "frame": { + "x": 55, + "y": 164, + "w": 66, + "h": 81 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 37, + "y": 15, + "w": 66, + "h": 81 + }, + "sourceSize": { + "w": 144, + "h": 96 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + } + }, + "meta": { + "app": "http://free-tex-packer.com", + "version": "0.6.7", + "image": "minotaur_black.png", + "format": "RGBA8888", + "size": { + "w": 186, + "h": 511 + }, + "scale": 1 + } +} \ No newline at end of file diff --git a/assets/characters/minotaur_black.png b/assets/characters/minotaur_black.png new file mode 100644 index 00000000..e8cb7b6c Binary files /dev/null and b/assets/characters/minotaur_black.png differ diff --git a/assets/characters/skeleton_red_eyes.json b/assets/characters/skeleton_red_eyes.json new file mode 100644 index 00000000..7ec6ee49 --- /dev/null +++ b/assets/characters/skeleton_red_eyes.json @@ -0,0 +1,231 @@ +{ + "frames": { + "skeleton_red_eyes_01.png": { + "frame": { + "x": 0, + "y": 0, + "w": 20, + "h": 26 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 2, + "y": 5, + "w": 20, + "h": 26 + }, + "sourceSize": { + "w": 24, + "h": 32 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "skeleton_red_eyes_07.png": { + "frame": { + "x": 0, + "y": 26, + "w": 20, + "h": 26 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 2, + "y": 5, + "w": 20, + "h": 26 + }, + "sourceSize": { + "w": 24, + "h": 32 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "skeleton_red_eyes_03.png": { + "frame": { + "x": 0, + "y": 52, + "w": 16, + "h": 26 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 3, + "y": 6, + "w": 16, + "h": 26 + }, + "sourceSize": { + "w": 24, + "h": 32 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "skeleton_red_eyes_05.png": { + "frame": { + "x": 0, + "y": 78, + "w": 16, + "h": 26 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 3, + "y": 6, + "w": 16, + "h": 26 + }, + "sourceSize": { + "w": 24, + "h": 32 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "skeleton_red_eyes_04.png": { + "frame": { + "x": 0, + "y": 104, + "w": 15, + "h": 26 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 4, + "y": 5, + "w": 15, + "h": 26 + }, + "sourceSize": { + "w": 24, + "h": 32 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "skeleton_red_eyes_00.png": { + "frame": { + "x": 0, + "y": 130, + "w": 14, + "h": 26 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 14, + "h": 26 + }, + "sourceSize": { + "w": 24, + "h": 32 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "skeleton_red_eyes_02.png": { + "frame": { + "x": 0, + "y": 156, + "w": 14, + "h": 26 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 14, + "h": 26 + }, + "sourceSize": { + "w": 24, + "h": 32 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "skeleton_red_eyes_06.png": { + "frame": { + "x": 0, + "y": 182, + "w": 14, + "h": 26 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 14, + "h": 26 + }, + "sourceSize": { + "w": 24, + "h": 32 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "skeleton_red_eyes_08.png": { + "frame": { + "x": 0, + "y": 208, + "w": 14, + "h": 26 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 5, + "y": 6, + "w": 14, + "h": 26 + }, + "sourceSize": { + "w": 24, + "h": 32 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + } + }, + "meta": { + "app": "http://free-tex-packer.com", + "version": "0.6.7", + "image": "skeleton_red_eyes.png", + "format": "RGBA8888", + "size": { + "w": 20, + "h": 234 + }, + "scale": 1 + } +} diff --git a/assets/characters/skeleton_red_eyes.png b/assets/characters/skeleton_red_eyes.png new file mode 100644 index 00000000..4d0c8a80 Binary files /dev/null and b/assets/characters/skeleton_red_eyes.png differ diff --git a/assets/favicon.ico b/assets/favicon.ico index f268a177..bfe8c2bc 100644 Binary files a/assets/favicon.ico and b/assets/favicon.ico differ diff --git a/assets/img/BlackFrame.png b/assets/img/BlackFrame.png new file mode 100644 index 00000000..7a25a7ed Binary files /dev/null and b/assets/img/BlackFrame.png differ diff --git a/assets/img/background.jpg b/assets/img/background.jpg new file mode 100644 index 00000000..860d12b1 Binary files /dev/null and b/assets/img/background.jpg differ diff --git a/assets/img/phaser-logo.png b/assets/img/phaser-logo.png deleted file mode 100644 index d1fc105c..00000000 Binary files a/assets/img/phaser-logo.png and /dev/null differ diff --git a/assets/img/storyboard.png b/assets/img/storyboard.png new file mode 100644 index 00000000..82c70d1f Binary files /dev/null and b/assets/img/storyboard.png differ diff --git a/assets/items/bow_damage_up.png b/assets/items/bow_damage_up.png new file mode 100644 index 00000000..d633f665 Binary files /dev/null and b/assets/items/bow_damage_up.png differ diff --git a/assets/items/bow_poison.png b/assets/items/bow_poison.png new file mode 100644 index 00000000..5d494c93 Binary files /dev/null and b/assets/items/bow_poison.png differ diff --git a/assets/items/bow_speed_up.png b/assets/items/bow_speed_up.png new file mode 100644 index 00000000..45364c69 Binary files /dev/null and b/assets/items/bow_speed_up.png differ diff --git a/assets/items/bow_triple.png b/assets/items/bow_triple.png new file mode 100644 index 00000000..2b3c1c2b Binary files /dev/null and b/assets/items/bow_triple.png differ diff --git a/assets/items/sword_damage_up.png b/assets/items/sword_damage_up.png new file mode 100644 index 00000000..aea1273a Binary files /dev/null and b/assets/items/sword_damage_up.png differ diff --git a/assets/items/sword_fire.png b/assets/items/sword_fire.png new file mode 100644 index 00000000..1f206c4e Binary files /dev/null and b/assets/items/sword_fire.png differ diff --git a/assets/items/sword_ice.png b/assets/items/sword_ice.png new file mode 100644 index 00000000..faf8d558 Binary files /dev/null and b/assets/items/sword_ice.png differ diff --git a/assets/items/sword_speed_up.png b/assets/items/sword_speed_up.png new file mode 100644 index 00000000..cbc7ce06 Binary files /dev/null and b/assets/items/sword_speed_up.png differ diff --git a/assets/maze_background.json b/assets/maze_background.json new file mode 100644 index 00000000..3334ca67 --- /dev/null +++ b/assets/maze_background.json @@ -0,0 +1,2008 @@ +{ "compressionlevel":-1, + "height":24, + "infinite":false, + "layers":[ + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 131, 83, 68, 83, 68, 66, 82, 67, 84, 81, 83, 67, 99, 99, 68, 84, 98, 68, 83, 81, 67, 68, 82, 66, 82, 82, 82, 65, 65, 84, 83, 131, + 147, 66, 68, 66, 68, 82, 84, 84, 66, 82, 83, 66, 81, 84, 82, 65, 83, 68, 84, 65, 98, 98, 68, 98, 67, 67, 65, 66, 99, 81, 98, 147, + 163, 98, 65, 65, 65, 98, 65, 82, 83, 66, 82, 81, 84, 98, 65, 67, 83, 65, 83, 99, 98, 98, 84, 82, 66, 83, 82, 65, 68, 68, 83, 163, + 65, 83, 68, 83, 81, 81, 67, 83, 83, 66, 66, 68, 67, 66, 84, 83, 84, 81, 67, 67, 84, 65, 83, 68, 66, 68, 81, 81, 67, 82, 84, 84, + 68, 82, 66, 84, 67, 66, 83, 82, 84, 82, 66, 82, 83, 67, 84, 83, 65, 81, 81, 81, 83, 67, 82, 81, 84, 67, 82, 66, 83, 68, 65, 83, + 65, 65, 66, 81, 82, 81, 66, 84, 81, 81, 66, 68, 65, 82, 65, 65, 83, 81, 84, 82, 82, 81, 65, 84, 83, 82, 67, 68, 66, 65, 66, 68, + 84, 81, 65, 67, 81, 82, 67, 82, 68, 83, 82, 68, 83, 67, 67, 81, 67, 67, 66, 67, 84, 67, 81, 66, 66, 82, 68, 83, 84, 84, 81, 84, + 83, 67, 83, 68, 82, 82, 84, 82, 82, 65, 83, 67, 82, 82, 81, 84, 84, 81, 84, 68, 65, 67, 66, 84, 81, 82, 83, 68, 81, 81, 66, 67, + 83, 83, 67, 65, 81, 81, 84, 83, 82, 68, 82, 68, 81, 81, 84, 65, 65, 81, 66, 66, 68, 82, 65, 68, 67, 84, 82, 68, 81, 66, 84, 84, + 83, 81, 67, 81, 65, 84, 83, 81, 65, 81, 84, 82, 82, 84, 66, 68, 81, 81, 68, 84, 67, 66, 65, 83, 67, 81, 67, 81, 68, 66, 81, 68, + 68, 66, 67, 82, 84, 84, 84, 68, 84, 68, 83, 84, 82, 66, 82, 83, 68, 83, 65, 66, 66, 81, 65, 81, 84, 81, 81, 65, 68, 66, 68, 82, + 83, 66, 68, 66, 66, 66, 81, 68, 84, 82, 65, 82, 67, 68, 82, 67, 66, 67, 67, 68, 66, 82, 83, 81, 83, 66, 67, 66, 83, 84, 82, 82, + 83, 82, 66, 83, 84, 66, 67, 81, 83, 65, 68, 68, 65, 81, 84, 83, 81, 65, 83, 84, 67, 67, 68, 84, 65, 65, 66, 81, 68, 67, 67, 66, + 68, 67, 67, 82, 66, 68, 65, 83, 83, 65, 82, 81, 83, 81, 81, 83, 65, 81, 66, 67, 67, 67, 65, 84, 67, 67, 67, 82, 82, 68, 83, 82, + 84, 66, 68, 66, 68, 81, 65, 82, 67, 68, 84, 68, 84, 65, 81, 66, 83, 66, 65, 83, 84, 83, 68, 81, 81, 66, 68, 65, 83, 82, 65, 68, + 66, 84, 83, 84, 65, 65, 65, 66, 82, 65, 83, 68, 67, 83, 65, 84, 68, 65, 83, 67, 67, 82, 81, 81, 67, 68, 84, 66, 65, 66, 83, 65, + 84, 65, 68, 81, 68, 83, 66, 67, 82, 84, 82, 82, 65, 81, 65, 81, 83, 68, 67, 81, 81, 81, 83, 68, 65, 65, 82, 84, 83, 84, 65, 66, + 81, 81, 84, 83, 68, 67, 68, 67, 83, 67, 67, 84, 68, 67, 81, 67, 66, 81, 67, 68, 66, 66, 81, 66, 83, 65, 67, 67, 66, 83, 83, 68, + 65, 84, 66, 66, 67, 81, 66, 65, 81, 83, 67, 66, 81, 83, 68, 66, 67, 82, 68, 68, 68, 66, 66, 68, 83, 82, 81, 68, 65, 84, 66, 83, + 67, 65, 84, 66, 82, 83, 68, 82, 66, 82, 83, 83, 84, 68, 65, 65, 81, 65, 82, 81, 68, 81, 83, 81, 84, 65, 83, 67, 83, 68, 81, 66, + 68, 68, 66, 83, 68, 82, 65, 67, 68, 66, 67, 83, 67, 84, 67, 66, 81, 67, 83, 66, 81, 68, 68, 66, 67, 84, 68, 65, 66, 83, 81, 83, + 65, 68, 81, 68, 67, 81, 82, 83, 65, 81, 81, 84, 67, 82, 66, 81, 65, 66, 82, 82, 67, 65, 81, 68, 65, 83, 81, 68, 84, 84, 65, 67, + 66, 83, 65, 82, 83, 81, 82, 83, 81, 83, 82, 82, 68, 68, 83, 67, 83, 83, 83, 83, 83, 82, 84, 66, 67, 81, 68, 68, 65, 83, 68, 66], + "height":24, + "id":1, + "name":"ground", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }, + { + "data":[1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 118, 119, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, + 17, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 0, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 19, + 17, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 0, 0, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 19, + 17, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 0, 0, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35], + "height":24, + "id":2, + "name":"wall", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 41, 0, 0, 42, 0, 0, 42, 0, 0, 41, 0, 0, 0, 0, 0, 0, 41, 0, 0, 42, 0, 0, 42, 0, 0, 41, 0, 0, 0, + 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":24, + "id":3, + "name":"objects", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }, + { + "data":[1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, + 17, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 19, + 17, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 19, + 17, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 7, 169, 170, 5, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35], + "height":24, + "id":6, + "name":"minotaur-wall", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 41, 0, 0, 42, 0, 0, 41, 0, 0, 42, 0, 0, 41, 0, 0, 41, 0, 0, 42, 0, 0, 41, 0, 0, 42, 0, 0, 41, 0, 0, + 0, 0, 57, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 57, 0, 0, 57, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 57, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":24, + "id":7, + "name":"minotaur-objects", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":24, + "id":4, + "name":"door-open", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 156, 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":24, + "id":5, + "name":"door", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":32, + "x":0, + "y":0 + }], + "nextlayerid":9, + "nextobjectid":1, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"1.10.2", + "tileheight":16, + "tilesets":[ + { + "columns":16, + "firstgid":1, + "image":"tileset.png", + "imageheight":204, + "imagewidth":265, + "margin":0, + "name":"dungeon", + "spacing":0, + "tilecount":192, + "tileheight":16, + "tiles":[ + { + "id":0, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":1, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":2, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":3, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":4, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":5, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":6, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":7, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":8, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":9, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":10, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":11, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":12, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":13, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":14, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":15, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":16, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":17, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":18, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":19, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":20, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":21, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":22, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":23, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":24, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":25, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":26, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":27, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":28, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":29, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":30, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":31, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + + { + "id":32, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":33, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":34, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":35, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":36, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":37, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":38, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":39, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":40, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":41, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":42, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":43, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":44, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":45, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":46, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":47, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":48, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":49, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":50, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":51, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":52, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":53, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":54, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":55, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":56, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":57, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":58, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":59, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":60, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":61, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":62, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":63, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + + { + "id":64, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":65, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":66, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":67, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":68, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":69, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":70, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":71, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":72, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":73, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":74, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":75, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":76, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":77, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":78, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":79, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":80, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":81, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":82, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":83, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":84, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":85, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":86, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":87, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":88, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":89, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":90, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":91, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":92, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":93, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":94, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":95, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + + { + "id":96, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":97, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":98, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":99, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":100, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":101, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":102, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":103, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":104, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":105, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":106, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":107, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":108, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":109, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":110, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":111, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":112, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":113, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":114, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":115, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":116, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":117, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":118, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":119, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":120, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":121, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":122, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":123, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":124, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":125, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":126, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":127, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + + { + "id":128, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":129, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":130, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":131, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":132, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":133, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":134, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":135, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":136, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":137, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":138, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":139, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":140, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":141, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":142, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":143, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":144, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":145, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":146, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":147, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":148, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":149, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":150, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":151, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":152, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":153, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":154, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":155, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":156, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":157, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":158, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":159, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + + { + "id":160, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":161, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":162, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":163, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":164, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":165, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":166, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":167, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":168, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":169, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":170, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":171, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":172, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":173, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":174, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":175, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":176, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":177, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":178, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":179, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":180, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":181, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":182, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":183, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":184, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":185, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":186, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":187, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":188, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":189, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":190, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }, + { + "id":191, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":false + }] + }], + "tilewidth":16 + }], + "tilewidth":16, + "type":"map", + "version":"1.10", + "width":32 +} \ No newline at end of file diff --git a/assets/next_button.png b/assets/next_button.png new file mode 100644 index 00000000..8a67a108 Binary files /dev/null and b/assets/next_button.png differ diff --git a/assets/threads.png b/assets/threads.png new file mode 100644 index 00000000..7ad342db Binary files /dev/null and b/assets/threads.png differ diff --git a/assets/tileset.png b/assets/tileset.png new file mode 100644 index 00000000..e4735310 Binary files /dev/null and b/assets/tileset.png differ diff --git a/assets/tuto_attack.png b/assets/tuto_attack.png new file mode 100644 index 00000000..36fb4359 Binary files /dev/null and b/assets/tuto_attack.png differ diff --git a/assets/tuto_enter_door.png b/assets/tuto_enter_door.png new file mode 100644 index 00000000..58ee1008 Binary files /dev/null and b/assets/tuto_enter_door.png differ diff --git a/assets/tuto_move.png b/assets/tuto_move.png new file mode 100644 index 00000000..781f182f Binary files /dev/null and b/assets/tuto_move.png differ diff --git a/assets/tuto_pause.png b/assets/tuto_pause.png new file mode 100644 index 00000000..c3f91547 Binary files /dev/null and b/assets/tuto_pause.png differ diff --git a/assets/tuto_weapon_change.png b/assets/tuto_weapon_change.png new file mode 100644 index 00000000..f6b9360f Binary files /dev/null and b/assets/tuto_weapon_change.png differ diff --git a/assets/tuto_weapon_design.png b/assets/tuto_weapon_design.png new file mode 100644 index 00000000..47cacf60 Binary files /dev/null and b/assets/tuto_weapon_design.png differ diff --git a/assets/ui_heart_empty.png b/assets/ui_heart_empty.png new file mode 100644 index 00000000..d56cfae9 Binary files /dev/null and b/assets/ui_heart_empty.png differ diff --git a/assets/ui_heart_full.png b/assets/ui_heart_full.png new file mode 100644 index 00000000..60612b86 Binary files /dev/null and b/assets/ui_heart_full.png differ diff --git a/assets/weaponBox.png b/assets/weaponBox.png new file mode 100644 index 00000000..bb65b7ea Binary files /dev/null and b/assets/weaponBox.png differ diff --git a/assets/weapons/arrow.png b/assets/weapons/arrow.png new file mode 100644 index 00000000..edfd2441 Binary files /dev/null and b/assets/weapons/arrow.png differ diff --git a/assets/weapons/bow.json b/assets/weapons/bow.json new file mode 100644 index 00000000..689c1320 --- /dev/null +++ b/assets/weapons/bow.json @@ -0,0 +1,207 @@ +{ + "frames": { + "Bow-4.png": { + "frame": { + "x": 0, + "y": 0, + "w": 33, + "h": 30 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 2, + "y": 4, + "w": 33, + "h": 30 + }, + "sourceSize": { + "w": 36, + "h": 35 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Bow-5.png": { + "frame": { + "x": 33, + "y": 0, + "w": 33, + "h": 29 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 3, + "y": 6, + "w": 33, + "h": 29 + }, + "sourceSize": { + "w": 36, + "h": 35 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Bow-1.png": { + "frame": { + "x": 66, + "y": 0, + "w": 32, + "h": 32 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 32 + }, + "sourceSize": { + "w": 36, + "h": 35 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Bow-2.png": { + "frame": { + "x": 33, + "y": 29, + "w": 32, + "h": 32 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 1, + "y": 1, + "w": 32, + "h": 32 + }, + "sourceSize": { + "w": 36, + "h": 35 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Bow-7.png": { + "frame": { + "x": 0, + "y": 30, + "w": 32, + "h": 32 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 32 + }, + "sourceSize": { + "w": 36, + "h": 35 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Bow-8.png": { + "frame": { + "x": 98, + "y": 0, + "w": 32, + "h": 32 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 32 + }, + "sourceSize": { + "w": 36, + "h": 35 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Bow-3.png": { + "frame": { + "x": 130, + "y": 0, + "w": 32, + "h": 31 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 2, + "y": 3, + "w": 32, + "h": 31 + }, + "sourceSize": { + "w": 36, + "h": 35 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Bow-6.png": { + "frame": { + "x": 162, + "y": 0, + "w": 27, + "h": 30 + }, + "rotated": true, + "trimmed": true, + "spriteSourceSize": { + "x": 0, + "y": 1, + "w": 27, + "h": 30 + }, + "sourceSize": { + "w": 36, + "h": 35 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + } + }, + "meta": { + "app": "http://free-tex-packer.com", + "version": "0.6.7", + "image": "texture.png", + "format": "RGBA8888", + "size": { + "w": 192, + "h": 62 + }, + "scale": 1 + } +} \ No newline at end of file diff --git a/assets/weapons/bow.png b/assets/weapons/bow.png new file mode 100644 index 00000000..46b0276f Binary files /dev/null and b/assets/weapons/bow.png differ diff --git a/assets/weapons/slash1.json b/assets/weapons/slash1.json new file mode 100644 index 00000000..d3324be7 --- /dev/null +++ b/assets/weapons/slash1.json @@ -0,0 +1,159 @@ +{ + "frames": { + "Classic_15.png": { + "frame": { + "x": 0, + "y": 0, + "w": 90, + "h": 88 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 17, + "y": 36, + "w": 90, + "h": 88 + }, + "sourceSize": { + "w": 125, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Classic_17.png": { + "frame": { + "x": 0, + "y": 88, + "w": 114, + "h": 73 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 9, + "y": 68, + "w": 114, + "h": 73 + }, + "sourceSize": { + "w": 124, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Classic_18.png": { + "frame": { + "x": 90, + "y": 0, + "w": 112, + "h": 60 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 0, + "y": 64, + "w": 112, + "h": 60 + }, + "sourceSize": { + "w": 125, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Classic_13.png": { + "frame": { + "x": 114, + "y": 60, + "w": 61, + "h": 107 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 26, + "y": 22, + "w": 61, + "h": 107 + }, + "sourceSize": { + "w": 126, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Classic_14.png": { + "frame": { + "x": 0, + "y": 161, + "w": 74, + "h": 98 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 20, + "y": 31, + "w": 74, + "h": 98 + }, + "sourceSize": { + "w": 124, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Classic_16.png": { + "frame": { + "x": 74, + "y": 167, + "w": 98, + "h": 65 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 14, + "y": 59, + "w": 98, + "h": 65 + }, + "sourceSize": { + "w": 126, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + } + }, + "meta": { + "app": "http://free-tex-packer.com", + "version": "0.6.7", + "image": "slash1.png", + "format": "RGBA8888", + "size": { + "w": 202, + "h": 259 + }, + "scale": 1 + } +} \ No newline at end of file diff --git a/assets/weapons/slash1.png b/assets/weapons/slash1.png new file mode 100644 index 00000000..e705a95a Binary files /dev/null and b/assets/weapons/slash1.png differ diff --git a/assets/weapons/slash2.json b/assets/weapons/slash2.json new file mode 100644 index 00000000..487b890a --- /dev/null +++ b/assets/weapons/slash2.json @@ -0,0 +1,159 @@ +{ + "frames": { + "Alternative_2_15.png": { + "frame": { + "x": 0, + "y": 0, + "w": 89, + "h": 88 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 17, + "y": 36, + "w": 89, + "h": 88 + }, + "sourceSize": { + "w": 125, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_2_17.png": { + "frame": { + "x": 0, + "y": 88, + "w": 113, + "h": 73 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 10, + "y": 68, + "w": 113, + "h": 73 + }, + "sourceSize": { + "w": 124, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_2_18.png": { + "frame": { + "x": 89, + "y": 0, + "w": 112, + "h": 60 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 0, + "y": 64, + "w": 112, + "h": 60 + }, + "sourceSize": { + "w": 125, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_2_13.png": { + "frame": { + "x": 113, + "y": 60, + "w": 61, + "h": 107 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 26, + "y": 22, + "w": 61, + "h": 107 + }, + "sourceSize": { + "w": 126, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_2_14.png": { + "frame": { + "x": 0, + "y": 161, + "w": 74, + "h": 98 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 20, + "y": 31, + "w": 74, + "h": 98 + }, + "sourceSize": { + "w": 124, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_2_16.png": { + "frame": { + "x": 74, + "y": 167, + "w": 98, + "h": 64 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 14, + "y": 59, + "w": 98, + "h": 64 + }, + "sourceSize": { + "w": 126, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + } + }, + "meta": { + "app": "http://free-tex-packer.com", + "version": "0.6.7", + "image": "slash2.png", + "format": "RGBA8888", + "size": { + "w": 201, + "h": 259 + }, + "scale": 1 + } +} \ No newline at end of file diff --git a/assets/weapons/slash2.png b/assets/weapons/slash2.png new file mode 100644 index 00000000..dbb74a78 Binary files /dev/null and b/assets/weapons/slash2.png differ diff --git a/assets/weapons/slash3.json b/assets/weapons/slash3.json new file mode 100644 index 00000000..ae14dab2 --- /dev/null +++ b/assets/weapons/slash3.json @@ -0,0 +1,159 @@ +{ + "frames": { + "Alternative_3_17.png": { + "frame": { + "x": 0, + "y": 0, + "w": 116, + "h": 73 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 7, + "y": 68, + "w": 116, + "h": 73 + }, + "sourceSize": { + "w": 124, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_3_18.png": { + "frame": { + "x": 0, + "y": 73, + "w": 112, + "h": 60 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 0, + "y": 64, + "w": 112, + "h": 60 + }, + "sourceSize": { + "w": 125, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_3_13.png": { + "frame": { + "x": 116, + "y": 0, + "w": 64, + "h": 110 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 25, + "y": 19, + "w": 64, + "h": 110 + }, + "sourceSize": { + "w": 126, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_3_16.png": { + "frame": { + "x": 0, + "y": 133, + "w": 103, + "h": 69 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 11, + "y": 59, + "w": 103, + "h": 69 + }, + "sourceSize": { + "w": 126, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_3_14.png": { + "frame": { + "x": 180, + "y": 0, + "w": 77, + "h": 102 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 20, + "y": 27, + "w": 77, + "h": 102 + }, + "sourceSize": { + "w": 124, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + }, + "Alternative_3_15.png": { + "frame": { + "x": 112, + "y": 110, + "w": 97, + "h": 88 + }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { + "x": 14, + "y": 36, + "w": 97, + "h": 88 + }, + "sourceSize": { + "w": 125, + "h": 150 + }, + "pivot": { + "x": 0.5, + "y": 0.5 + } + } + }, + "meta": { + "app": "http://free-tex-packer.com", + "version": "0.6.7", + "image": "slash3.png", + "format": "RGBA8888", + "size": { + "w": 257, + "h": 202 + }, + "scale": 1 + } +} \ No newline at end of file diff --git a/assets/weapons/slash3.png b/assets/weapons/slash3.png new file mode 100644 index 00000000..845433dd Binary files /dev/null and b/assets/weapons/slash3.png differ diff --git a/assets/weapons/sword_normal.png b/assets/weapons/sword_normal.png new file mode 100644 index 00000000..5105aec5 Binary files /dev/null and b/assets/weapons/sword_normal.png differ diff --git a/docs/egdd.md b/docs/egdd.md index 51ed6536..c813c233 100644 --- a/docs/egdd.md +++ b/docs/egdd.md @@ -1 +1,180 @@ -REPLACE THIS TEXT WITH YOUR EGDD MARKDOWN. +# Infamia di Creti + +## Elevator Pitch + +You are Theseus, the son of Poseidon. You must travel to the center of the maze to defeat the Minotaur and save the people of Crete! + +## Influences (Brief) + +- The Binding of Issac: + - Medium: Game + - Explanation: Idea of moving through different rooms +- The myth of Theseus and the Minotaur: + - Medium: Greek Mythology + - Explanation: Idea of storyline, design of character and boss + +## Core Gameplay Mechanics (Brief) + +- Fight with enemies by moving Theseus using keyboard and mouse. +- Whenever you defeat all the enemies in the room, you can move to the other rooms. +- Collect upgrades and weapon types by defeating enemies, and use them to upgrade your weapon or change your weapon type. +- Progress through all three rooms to reach the center of the maze. +- When you loss all your health, it displays a game over message. +- After you defeat the boss, Minotaur, it displays a victory message showing that Theseus became a hero. + +# Learning Aspects + +## Learning Domains + +- Introductory Java Programming + - Using the getters and setters of a class. + +## Target Audiences + +- Middle or high school aged kids (or older). +- People who have some prior coding knowledge. + + +## Target Contexts + +- Can be used in a Java course, or for someone who is teaching themselves Java. +- Due to the longer playtime, it might not be appropriate for a classroom activity. + +## Learning Objectives + +- By the end of the lesson, players will be able to identify the syntax of defining classes in Java. +- By the end of the lesson, players will be able to write an appropriate constructor for the class. +- By the end of the lesson, players will be able to explain appropriate uses of the getters and setters. + +## Prerequisite Knowledge + +Give assessments before and after gameplay. + +- Prior to the game, players need to be able to define the concept of a class. +- Prior to the game, players need to be able to explain the concept of a getters and setters. + +## Assessment Measures + +- Using given name of class and information of the fields, define a class. +- Given classes, use getters and setters to change the value in a class. + +# What sets this project apart? + +- This game presents the concept of Java classes in a game where there is an end goal (defeating the minotaur) motivating the students to use classes, not just + presenting class related coding problems to students. +- The game appeals to fans of Greek mythology. + +# Player Interaction Patterns and Modes + +## Player Interaction Pattern + +- This is a single player game, they can intereact with the game via the keyboard and mouse. + +## Player Modes + +- Single-player: You collect codes by defeating the enemies in rooms and join them together to have the best items until you reach the boss stage. + +# Gameplay Objectives + +- Advance to the center of the maze: gain access to the necessary parts of the maze in order to eventually reach the center. +- Defeat lower-level enemies: Using methods, "attack" the enemy until its health is zero to defeat it. +- Defeat the Minotaur: Defeat the Minotaur to win the game. + +# Procedures/Actions + +- You can either move or attack using keyboard and mouse. + +- Write methods and classes by using the keyboard. + +# Rules + +- If the player clicks, then the attack will be occured to the place where they aimed. +- Using the "WASD" keys and the space bar, the player can move Theseus. +- If the player press the shift button, they can change their weapon. +- A player has a limited amount of lives. + - If the player collides with the enemies or hit by the enemies, then the player's lives decreases. +- There is display that shows the amount of string a player has. + +# Objects/Entities + +- There is an avatar to represent Thesues. +- There is an avatar to represent Ariadne. +- There is an avatar to represent the Minotaur and other enemies. +- There are different weapons Theseus can use. +- A health bar for Thesueus, the Minotuar, and other enemies. +- There is a box that shows what weapons Thesueus is using. +- There is some indication of how much string Theseus has. + +## Core Gameplay Mechanics (Detailed) + +- Defeating enemies: The player must battle enemies and upgrade/change their weapon using methods and classes. Once an enemies health bar reaches zero they are defeated. +- Exploring the Maze: The player must move from the outer ring of rooms to the center, until they reach the Minotaur. The player moves is able to move between rooms only once they have cleared the room they are in by defeating all the enemies. Enetering a new room reduces the amount of string the player has. +- Gaining items: Player is able to collect code by exploring rooms. +- Losing all your health: Once Theseus loses all his health, the game is over and a "Game Over" message is displayed. +- Defeating the Minotuar: Theseus must battle the Minotaur similar to other enemies and once the Minotaur has no more health, the player wins the game. A "You are the hero!" message is displayed. + +## Feedback + +- Defeating an enemy will give you codes to upgrade/change weapon, positive feedback for battling an enemy. +- Each time the player enters and clears a room, it reduces the amount of string they have. +- The state of Theseues health bar reflects how successful he has been in battling enemies. +- When you defeat the minotaur and win the game, a message will be displayed on the screen. +- When you lose, a message will be displayed on the screen. + +# Story and Gameplay + +## Presentation of Rules + +- When Theseus enters the maze, Ariadne, the princess of Crete, explains the objective and interaction instructions + +## Presentation of Content + +- The game is not intended to teach players what a class or method is in Java. It is meant to help players learn the correct syntax of a class, how to write a constructor, and when to use a method. + +## Story (Brief) + +You are Theseus, a young prince, who sets out on a quest to slay the Minotaur, a half-man, half-bull monster, and save your people from being sacrificed to it. + +## Storyboarding + +![storyboard](/assets/img/storyboard.png "storyboard") +The storyboard shows four key scenes in the game. The bottom right shows a maze, which is what the player will navigate through to reach the center and defeat the minotaur. The player has a limited amount of string they can use to reach the center. The bottom left shows an example of a class and methods the player can use. The top right is an example of what it will look like when the player is battling enemies in the maze. There is a health bar for the player, a display for the amount of coins, and a display for the amount of string. The red circle shows how the player will use the mouse to aim. The top left scene is the intro scene where the player will recieve instructions on how to play the game from Ariadne. + +# Assets Needed + +## Aethestics + +- The aesthics should be fantastical, since it is based on a myth. The tone of the game can shift, going from neutral to more threatening if Theseues encounters an enemy. This contributes to the player feeling as if they +are in the myth themselves. + +## Graphical + +- Characters List + - Thesues: cartoon, pixalated sprite. Have three faces: happy, hurt, neutral. + - Ariadne: cartoon, pixalated sprite. Happy expression. + - Minotaur: cartoon, pixalated sprite. Mean expression. + - Enemies: cartoon, pixalated sprite. Mean expression. + +- Textures: +- Pixelated texture. +- Environment Art/Textures: + - Pixelated texture. + - Each "room" in the maze should have a grayish floor and the walls should be a shade of white. + +## Audio + +- Music List (Ambient sound) + - General gameplay: fantastical, mythical (similar to this https://www.youtube.com/watch?v=DEJNkrHCUTE) + - When battling an enemy: more fast paced (similar to https://www.youtube.com/watch?v=KXb2lFpfccc) + - The music will be more dramtic in the boss battle (similar to this (https://www.youtube.com/watch?v=4uvqbpkowLA&pp=ygUVYmF0dGxpbmcgZHJhZ29uIG11c2lj) + + +- Sound List (SFX) + - Striking an enemy: Will depend on the weapons but a sword might produce sound effects similar to this - https://www.youtube.com/watch?v=EgRvVq8mStE + - Receiving a hit might vary depending on the enemy but recieving a hit might sound like if the enemy has claws https://www.youtube.com/watch?v=MH6M21jtX_k + +# Metadata + +- Template created by Austin Cory Bart , Mark Sheriff, Alec Markarian, and Benjamin Stanley. +- Version 0.0.3 + diff --git a/docs/large.png b/docs/large.png new file mode 100644 index 00000000..3802b645 Binary files /dev/null and b/docs/large.png differ diff --git a/docs/small.png b/docs/small.png new file mode 100644 index 00000000..8bbdf2ed Binary files /dev/null and b/docs/small.png differ diff --git a/package-lock.json b/package-lock.json index 279e7740..2fdcdbf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,20 @@ { - "name": "coding-3-phaser-scenes", + "name": "final-project", "version": "4.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "coding-3-phaser-scenes", + "name": "final-project", "version": "4.0.0", "license": "MIT", "dependencies": { - "phaser": "^3.70.0" + "phaser": "^3.80.1", + "webfontloader": "^1.6.28" }, "devDependencies": { "@types/jest": "^29.5.11", + "@types/webfontloader": "^1.6.38", "@typescript-eslint/eslint-plugin": "^6.2.0", "@typescript-eslint/parser": "^6.2.0", "@yandeu/prettier-config": "^0.0.3", @@ -92,12 +94,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -166,22 +169,23 @@ "dev": true }, "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz", - "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", + "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", "dev": true, "dependencies": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -242,9 +246,9 @@ } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -335,18 +339,18 @@ "dev": true }, "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -365,25 +369,25 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -513,30 +517,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -581,14 +585,15 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -657,9 +662,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.13.tgz", - "integrity": "sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", + "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1792,9 +1797,9 @@ } }, "node_modules/@babel/preset-env/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -1829,34 +1834,34 @@ } }, "node_modules/@babel/template": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", - "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.13.tgz", - "integrity": "sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -1887,13 +1892,13 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz", - "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2588,14 +2593,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -2611,22 +2616,22 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -2636,9 +2641,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", - "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -2925,9 +2930,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/express": { @@ -3108,6 +3113,18 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, + "node_modules/@types/validator": { + "version": "13.11.9", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.9.tgz", + "integrity": "sha512-FCTsikRozryfayPuiI46QzH3fnrOoctTjvOYZkho9BTFLCOZ2rgZJHMOVgCOfttjPJcgOx52EpkY0CMfy87MIw==", + "dev": true + }, + "node_modules/@types/webfontloader": { + "version": "1.6.38", + "resolved": "https://registry.npmjs.org/@types/webfontloader/-/webfontloader-1.6.38.tgz", + "integrity": "sha512-kUaF72Fv202suFx6yBrwXqeVRMx7hGtJTesyESZgn9sEPCUeDXm2p0SiyS1MTqW74nQP4p7JyrOCwZ7pNFns4w==", + "dev": true + }, "node_modules/@types/ws": { "version": "8.5.4", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", @@ -3495,148 +3512,148 @@ "dev": true }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -3717,9 +3734,9 @@ } }, "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -3729,9 +3746,9 @@ } }, "node_modules/acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "dev": true, "peerDependencies": { "acorn": "^8" @@ -4122,9 +4139,9 @@ } }, "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4225,13 +4242,13 @@ } }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dev": true, "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -4239,7 +4256,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -4332,9 +4349,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -4344,13 +4361,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -4452,9 +4473,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001447", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001447.tgz", - "integrity": "sha512-bdKU1BQDPeEXe9A39xJnGtY0uRq/z5osrnXUw0TcK+EYno45Y+U7QU9HhHEyzvMDffpYadFXi3idnSNkcwLkTw==", + "version": "1.0.30001605", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz", + "integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==", "dev": true, "funding": [ { @@ -4464,6 +4485,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -4499,9 +4524,9 @@ } }, "node_modules/chance": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.8.tgz", - "integrity": "sha512-v7fi5Hj2VbR6dJEGRWLmJBA83LJMS47pkAbmROFxHWd9qmE1esHRZW8Clf1Fhzr3rjxnNZVCjOEv/ivFxeIMtg==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.9.tgz", + "integrity": "sha512-TfxnA/DcZXRTA4OekA2zL9GH8qscbbl6X0ZqU4tXhGveVY/mXWvEQLt5GwZcYXTEyEFflVtj+pG8nc8EwSm1RQ==", "dev": true }, "node_modules/char-regex": { @@ -4592,12 +4617,13 @@ "dev": true }, "node_modules/class-validator": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.13.2.tgz", - "integrity": "sha512-yBUcQy07FPlGzUjoLuUfIOXzgynnQPPruyK1Ge2B74k9ROwnle1E+NxLWnUv5OLU8hA/qL5leAE9XnXq3byaBw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", + "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", "dev": true, "dependencies": { - "libphonenumber-js": "^1.9.43", + "@types/validator": "^13.7.10", + "libphonenumber-js": "^1.10.14", "validator": "^13.7.0" } }, @@ -4826,9 +4852,9 @@ } }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, "engines": { "node": ">= 0.6" @@ -4841,9 +4867,9 @@ "dev": true }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "dev": true, "engines": { "node": ">= 0.6" @@ -5265,9 +5291,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.724", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.724.tgz", + "integrity": "sha512-RTRvkmRkGhNBPPpdrgtDKvmOEYTrPlXDfc0J/Nfq5s29tEahAwhiX4mmhNzj6febWMleulxVYPh7QwCSL/EldA==", "dev": true }, "node_modules/emittery": { @@ -5307,9 +5333,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", - "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -5397,9 +5423,9 @@ } }, "node_modules/es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.0.tgz", + "integrity": "sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==", "dev": true }, "node_modules/es-set-tostringtag": { @@ -5519,9 +5545,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -5532,9 +5558,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5939,17 +5965,17 @@ } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dev": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -6213,9 +6239,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -6503,9 +6529,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/graphemer": { @@ -7495,27 +7521,27 @@ } }, "node_modules/javascript-obfuscator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-4.0.0.tgz", - "integrity": "sha512-vS/8w/9eKISzwXNLd+OLMCCwjD+dFMdOlCDOo919iR/MWdBs+7u1ybpwRoWOmODToPQKVYw5GasvZoIiPs5nPw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-4.1.0.tgz", + "integrity": "sha512-ckC0VFKQ0/sFtLH9apW/ZLfsP8LuZqZhVEM4VTJ5KLzyLaodW6C1lTU8808eboDmddKyvd2uyRx5bzc0Me0GYg==", "dev": true, "hasInstallScript": true, "dependencies": { "@javascript-obfuscator/escodegen": "2.3.0", "@javascript-obfuscator/estraverse": "5.4.0", - "acorn": "8.7.0", + "acorn": "8.8.2", "assert": "2.0.0", "chalk": "4.1.2", - "chance": "1.1.8", - "class-validator": "0.13.2", - "commander": "9.0.0", - "eslint-scope": "7.1.0", - "eslint-visitor-keys": "3.2.0", + "chance": "1.1.9", + "class-validator": "0.14.0", + "commander": "10.0.0", + "eslint-scope": "7.1.1", + "eslint-visitor-keys": "3.3.0", "fast-deep-equal": "3.1.3", "inversify": "6.0.1", "js-string-escape": "1.0.1", "md5": "2.3.0", - "mkdirp": "1.0.4", + "mkdirp": "2.1.3", "multimatch": "5.0.0", "opencollective-postinstall": "2.0.3", "process": "0.11.10", @@ -7523,13 +7549,13 @@ "source-map-support": "0.5.21", "string-template": "1.0.0", "stringz": "2.1.0", - "tslib": "2.3.1" + "tslib": "2.5.0" }, "bin": { "javascript-obfuscator": "bin/javascript-obfuscator" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^12.22.0 || ^14.0.0 || ^16.0.0 || ^17.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -7537,20 +7563,14 @@ } }, "node_modules/javascript-obfuscator/node_modules/commander": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", - "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.0.tgz", + "integrity": "sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==", "dev": true, "engines": { - "node": "^12.20.0 || >=14" + "node": ">=14" } }, - "node_modules/javascript-obfuscator/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -8429,9 +8449,9 @@ } }, "node_modules/libphonenumber-js": { - "version": "1.10.18", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.18.tgz", - "integrity": "sha512-NS4ZEgNhwbcPz1gfSXCGFnQm0xEiyTSPRthIuWytDzOiEG9xnZ2FbLyfJC4tI2BMAAXpoWbNxHYH75pa3Dq9og==", + "version": "1.10.59", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.59.tgz", + "integrity": "sha512-HeTsOrDF/hWhEiKqZVwg9Cqlep5x2T+IYDENvT2VRj3iX8JQ7Y+omENv+AIn0vC8m6GYhivfCed5Cgfw27r5SA==", "dev": true }, "node_modules/lines-and-columns": { @@ -8710,15 +8730,18 @@ } }, "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.3.tgz", + "integrity": "sha512-sjAkg21peAG9HS+Dkx7hlG9Ztx7HLeKnvB3NQRcu/mltCVmvkF0pisbiTSfDVYTT86XEfZrTUosLdZLStquZUw==", "dev": true, "bin": { - "mkdirp": "bin/cmd.js" + "mkdirp": "dist/cjs/src/bin.js" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ms": { @@ -8836,9 +8859,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", - "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-path": { @@ -9183,9 +9206,9 @@ } }, "node_modules/phaser": { - "version": "3.70.0", - "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.70.0.tgz", - "integrity": "sha512-2g+gh+Jp9f/Ho9FOXOYbIJMGf3UZXyMbW2iLScFaLQw11e/LqVyxj/YmaBauWbHabeTnZjiWkPklDnxhesMH0g==", + "version": "3.80.1", + "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.80.1.tgz", + "integrity": "sha512-VQGAWoDOkEpAWYkI+PUADv5Ql+SM0xpLuAMBJHz9tBcOLqjJ2wd8bUhxJgOqclQlLTg97NmMd9MhS75w16x1Cw==", "dependencies": { "eventemitter3": "^5.0.1" } @@ -9432,9 +9455,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "dependencies": { "bytes": "3.1.2", @@ -10643,13 +10666,13 @@ } }, "node_modules/terser": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.1.tgz", - "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==", + "version": "5.30.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.2.tgz", + "integrity": "sha512-vTDjRKYKip4dOFL5VizdoxHTYDfEXPdz5t+FbxCC5Rp2s+KbEO8w5wqMDPgj7CtFKZuzq7PXv28fZoXfqqBVuw==", "dev": true, "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -10661,16 +10684,16 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", - "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.14", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.14.1" + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -10726,9 +10749,9 @@ "dev": true }, "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", @@ -10953,9 +10976,9 @@ "dev": true }, "node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, "node_modules/type-check": { @@ -11127,9 +11150,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -11139,6 +11162,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { @@ -11146,7 +11173,7 @@ "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -11250,9 +11277,9 @@ "dev": true }, "node_modules/validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", "dev": true, "engines": { "node": ">= 0.10" @@ -11277,9 +11304,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -11298,6 +11325,11 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/webfontloader": { + "version": "1.6.28", + "resolved": "https://registry.npmjs.org/webfontloader/-/webfontloader-1.6.28.tgz", + "integrity": "sha512-Egb0oFEga6f+nSgasH3E0M405Pzn6y3/9tOVanv/DLfa1YBIgcv90L18YyWnvXkRbIM17v5Kv6IT2N6g1x5tvQ==" + }, "node_modules/webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", @@ -11305,34 +11337,34 @@ "dev": true }, "node_modules/webpack": { - "version": "5.75.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", - "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "version": "5.91.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", + "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", + "acorn-import-assertions": "^1.9.0", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.16.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -11408,9 +11440,9 @@ } }, "node_modules/webpack-dev-middleware": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", - "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", + "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", "dev": true, "dependencies": { "colorette": "^2.0.10", @@ -11549,18 +11581,6 @@ "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/webpack/node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -11615,9 +11635,9 @@ "dev": true }, "node_modules/webpack/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", @@ -11739,9 +11759,9 @@ "dev": true }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -12200,12 +12220,13 @@ } }, "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" } }, "@babel/compat-data": { @@ -12253,21 +12274,22 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, "@babel/generator": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz", - "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", + "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", "dev": true, "requires": { - "@babel/types": "^7.20.7", - "@jridgewell/gen-mapping": "^0.3.2", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" } }, @@ -12313,9 +12335,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true }, "yallist": { @@ -12382,17 +12404,17 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-explode-assignable-expression": { @@ -12405,22 +12427,22 @@ } }, "@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-member-expression-to-functions": { @@ -12517,24 +12539,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -12567,14 +12589,15 @@ } }, "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "dependencies": { "ansi-styles": { @@ -12630,9 +12653,9 @@ } }, "@babel/parser": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.13.tgz", - "integrity": "sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", + "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { @@ -13384,9 +13407,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -13414,31 +13437,31 @@ } }, "@babel/template": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", - "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" } }, "@babel/traverse": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.13.tgz", - "integrity": "sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", - "debug": "^4.1.0", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "dependencies": { @@ -13460,13 +13483,13 @@ } }, "@babel/types": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz", - "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -13998,14 +14021,14 @@ } }, "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" } }, "@jridgewell/resolve-uri": { @@ -14015,19 +14038,19 @@ "dev": true }, "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true }, "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "@jridgewell/sourcemap-codec": { @@ -14037,9 +14060,9 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", - "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.1.0", @@ -14291,9 +14314,9 @@ } }, "@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "@types/express": { @@ -14474,6 +14497,18 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, + "@types/validator": { + "version": "13.11.9", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.9.tgz", + "integrity": "sha512-FCTsikRozryfayPuiI46QzH3fnrOoctTjvOYZkho9BTFLCOZ2rgZJHMOVgCOfttjPJcgOx52EpkY0CMfy87MIw==", + "dev": true + }, + "@types/webfontloader": { + "version": "1.6.38", + "resolved": "https://registry.npmjs.org/@types/webfontloader/-/webfontloader-1.6.38.tgz", + "integrity": "sha512-kUaF72Fv202suFx6yBrwXqeVRMx7hGtJTesyESZgn9sEPCUeDXm2p0SiyS1MTqW74nQP4p7JyrOCwZ7pNFns4w==", + "dev": true + }, "@types/ws": { "version": "8.5.4", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", @@ -14726,148 +14761,148 @@ "dev": true }, "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true }, "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" } }, "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -14930,15 +14965,15 @@ } }, "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true }, "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "dev": true, "requires": {} }, @@ -15220,9 +15255,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -15301,13 +15336,13 @@ "dev": true }, "body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dev": true, "requires": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -15315,7 +15350,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -15390,15 +15425,15 @@ } }, "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" } }, "bs-logger": { @@ -15470,9 +15505,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001447", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001447.tgz", - "integrity": "sha512-bdKU1BQDPeEXe9A39xJnGtY0uRq/z5osrnXUw0TcK+EYno45Y+U7QU9HhHEyzvMDffpYadFXi3idnSNkcwLkTw==", + "version": "1.0.30001605", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz", + "integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==", "dev": true }, "chalk": { @@ -15495,9 +15530,9 @@ } }, "chance": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.8.tgz", - "integrity": "sha512-v7fi5Hj2VbR6dJEGRWLmJBA83LJMS47pkAbmROFxHWd9qmE1esHRZW8Clf1Fhzr3rjxnNZVCjOEv/ivFxeIMtg==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.9.tgz", + "integrity": "sha512-TfxnA/DcZXRTA4OekA2zL9GH8qscbbl6X0ZqU4tXhGveVY/mXWvEQLt5GwZcYXTEyEFflVtj+pG8nc8EwSm1RQ==", "dev": true }, "char-regex": { @@ -15558,12 +15593,13 @@ "dev": true }, "class-validator": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.13.2.tgz", - "integrity": "sha512-yBUcQy07FPlGzUjoLuUfIOXzgynnQPPruyK1Ge2B74k9ROwnle1E+NxLWnUv5OLU8hA/qL5leAE9XnXq3byaBw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", + "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", "dev": true, "requires": { - "libphonenumber-js": "^1.9.43", + "@types/validator": "^13.7.10", + "libphonenumber-js": "^1.10.14", "validator": "^13.7.0" } }, @@ -15741,9 +15777,9 @@ "dev": true }, "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true }, "convert-source-map": { @@ -15753,9 +15789,9 @@ "dev": true }, "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "dev": true }, "cookie-signature": { @@ -16062,9 +16098,9 @@ } }, "electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.724", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.724.tgz", + "integrity": "sha512-RTRvkmRkGhNBPPpdrgtDKvmOEYTrPlXDfc0J/Nfq5s29tEahAwhiX4mmhNzj6febWMleulxVYPh7QwCSL/EldA==", "dev": true }, "emittery": { @@ -16092,9 +16128,9 @@ "dev": true }, "enhanced-resolve": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", - "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -16164,9 +16200,9 @@ } }, "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.0.tgz", + "integrity": "sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==", "dev": true }, "es-set-tostringtag": { @@ -16410,9 +16446,9 @@ } }, "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -16420,9 +16456,9 @@ } }, "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "espree": { @@ -16547,17 +16583,17 @@ } }, "express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dev": true, "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -16788,9 +16824,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true }, "for-each": { @@ -16988,9 +17024,9 @@ } }, "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "graphemer": { @@ -17695,26 +17731,26 @@ } }, "javascript-obfuscator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-4.0.0.tgz", - "integrity": "sha512-vS/8w/9eKISzwXNLd+OLMCCwjD+dFMdOlCDOo919iR/MWdBs+7u1ybpwRoWOmODToPQKVYw5GasvZoIiPs5nPw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-4.1.0.tgz", + "integrity": "sha512-ckC0VFKQ0/sFtLH9apW/ZLfsP8LuZqZhVEM4VTJ5KLzyLaodW6C1lTU8808eboDmddKyvd2uyRx5bzc0Me0GYg==", "dev": true, "requires": { "@javascript-obfuscator/escodegen": "2.3.0", "@javascript-obfuscator/estraverse": "5.4.0", - "acorn": "8.7.0", + "acorn": "8.8.2", "assert": "2.0.0", "chalk": "4.1.2", - "chance": "1.1.8", - "class-validator": "0.13.2", - "commander": "9.0.0", - "eslint-scope": "7.1.0", - "eslint-visitor-keys": "3.2.0", + "chance": "1.1.9", + "class-validator": "0.14.0", + "commander": "10.0.0", + "eslint-scope": "7.1.1", + "eslint-visitor-keys": "3.3.0", "fast-deep-equal": "3.1.3", "inversify": "6.0.1", "js-string-escape": "1.0.1", "md5": "2.3.0", - "mkdirp": "1.0.4", + "mkdirp": "2.1.3", "multimatch": "5.0.0", "opencollective-postinstall": "2.0.3", "process": "0.11.10", @@ -17722,19 +17758,13 @@ "source-map-support": "0.5.21", "string-template": "1.0.0", "stringz": "2.1.0", - "tslib": "2.3.1" + "tslib": "2.5.0" }, "dependencies": { "commander": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", - "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", - "dev": true - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.0.tgz", + "integrity": "sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==", "dev": true } } @@ -18412,9 +18442,9 @@ } }, "libphonenumber-js": { - "version": "1.10.18", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.18.tgz", - "integrity": "sha512-NS4ZEgNhwbcPz1gfSXCGFnQm0xEiyTSPRthIuWytDzOiEG9xnZ2FbLyfJC4tI2BMAAXpoWbNxHYH75pa3Dq9og==", + "version": "1.10.59", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.59.tgz", + "integrity": "sha512-HeTsOrDF/hWhEiKqZVwg9Cqlep5x2T+IYDENvT2VRj3iX8JQ7Y+omENv+AIn0vC8m6GYhivfCed5Cgfw27r5SA==", "dev": true }, "lines-and-columns": { @@ -18639,9 +18669,9 @@ "dev": true }, "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.3.tgz", + "integrity": "sha512-sjAkg21peAG9HS+Dkx7hlG9Ztx7HLeKnvB3NQRcu/mltCVmvkF0pisbiTSfDVYTT86XEfZrTUosLdZLStquZUw==", "dev": true }, "ms": { @@ -18742,9 +18772,9 @@ "dev": true }, "node-releases": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", - "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "normalize-path": { @@ -18999,9 +19029,9 @@ "dev": true }, "phaser": { - "version": "3.70.0", - "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.70.0.tgz", - "integrity": "sha512-2g+gh+Jp9f/Ho9FOXOYbIJMGf3UZXyMbW2iLScFaLQw11e/LqVyxj/YmaBauWbHabeTnZjiWkPklDnxhesMH0g==", + "version": "3.80.1", + "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.80.1.tgz", + "integrity": "sha512-VQGAWoDOkEpAWYkI+PUADv5Ql+SM0xpLuAMBJHz9tBcOLqjJ2wd8bUhxJgOqclQlLTg97NmMd9MhS75w16x1Cw==", "requires": { "eventemitter3": "^5.0.1" }, @@ -19170,9 +19200,9 @@ "dev": true }, "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "requires": { "bytes": "3.1.2", @@ -20101,13 +20131,13 @@ } }, "terser": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.1.tgz", - "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==", + "version": "5.30.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.2.tgz", + "integrity": "sha512-vTDjRKYKip4dOFL5VizdoxHTYDfEXPdz5t+FbxCC5Rp2s+KbEO8w5wqMDPgj7CtFKZuzq7PXv28fZoXfqqBVuw==", "dev": true, "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -20121,16 +20151,16 @@ } }, "terser-webpack-plugin": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", - "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.14", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.14.1" + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" }, "dependencies": { "ajv": { @@ -20159,9 +20189,9 @@ "dev": true }, "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { "@types/json-schema": "^7.0.8", @@ -20303,9 +20333,9 @@ } }, "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, "type-check": { @@ -20424,9 +20454,9 @@ "dev": true }, "update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "requires": { "escalade": "^3.1.1", @@ -20523,9 +20553,9 @@ } }, "validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", "dev": true }, "vary": { @@ -20544,9 +20574,9 @@ } }, "watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", "dev": true, "requires": { "glob-to-regexp": "^0.4.1", @@ -20562,6 +20592,11 @@ "minimalistic-assert": "^1.0.0" } }, + "webfontloader": { + "version": "1.6.28", + "resolved": "https://registry.npmjs.org/webfontloader/-/webfontloader-1.6.28.tgz", + "integrity": "sha512-Egb0oFEga6f+nSgasH3E0M405Pzn6y3/9tOVanv/DLfa1YBIgcv90L18YyWnvXkRbIM17v5Kv6IT2N6g1x5tvQ==" + }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", @@ -20569,43 +20604,37 @@ "dev": true }, "webpack": { - "version": "5.75.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", - "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "version": "5.91.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", + "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", + "acorn-import-assertions": "^1.9.0", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.16.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "dependencies": { - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -20648,9 +20677,9 @@ "dev": true }, "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { "@types/json-schema": "^7.0.8", @@ -20689,9 +20718,9 @@ } }, "webpack-dev-middleware": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", - "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", + "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", "dev": true, "requires": { "colorette": "^2.0.10", @@ -20866,9 +20895,9 @@ "dev": true }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "workbox-background-sync": { diff --git a/package.json b/package.json index e285b2ae..69a71cb1 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "final-project", + "name": "final-project-green", "version": "4.0.0", - "description": "Phaser 3 Final Project", - "homepage": "https://github.com/UD-S24-CISC374/final-project-template#readme", + "description": "Phaser 3 Final Project - Infamia di Creti", + "homepage": "https://github.com/UD-S24-CISC374/final-project-green#readme", "main": "index.js", "scripts": { "start": "webpack serve --config webpack/webpack.dev.js", @@ -20,46 +20,55 @@ "Phaser3", "html5 game", "TypeScript", - "webpack", - "starter" + "webpack" + ], + "contributors": [ + { + "name": "Sehee Hwang", + "email": "hsehee@udel.edu", + "url": "https://github.com/h-sehee" + }, + { + "name": "Mantra Yang", + "email": "myang@udel.edu", + "url": "https://github.com/m-y-0110" + } ], - "author": { - "name": "Austin Cory Bart", - "url": "https://github.com/acbart" - }, "repository": { "type": "git", - "url": "https://github.com/UD-S24-CISC374/final-project-template.git" + "url": "https://github.com/UD-S24-CISC374/final-project-green.git" }, "engines": { "node": ">=12" }, "license": "MIT", "dependencies": { - "phaser": "^3.70.0" + "phaser": "^3.80.1", + "webfontloader": "^1.6.28" }, "devDependencies": { + "@types/jest": "^29.5.11", + "@types/webfontloader": "^1.6.38", + "@typescript-eslint/eslint-plugin": "^6.2.0", + "@typescript-eslint/parser": "^6.2.0", "@yandeu/prettier-config": "^0.0.3", "copy-webpack-plugin": "^10.1.0", + "eslint": "^8.46.0", "html-webpack-plugin": "^5.5.0", "javascript-obfuscator": "^4.0.0", + "jest": "^29.7.0", "prettier": "^2.5.1", "rimraf": "^3.0.2", "serve": "^14.1.2", + "ts-jest": "^29.1.1", "ts-loader": "^9.2.6", + "ts-node": "^10.9.2", "typescript": "^4.5.3", "webpack": "^5.65.0", "webpack-cli": "^4.9.1", "webpack-dev-server": "^4.6.0", "webpack-merge": "^5.8.0", "webpack-obfuscator": "^3.5.0", - "workbox-webpack-plugin": "^6.4.2", - "eslint": "^8.46.0", - "@types/jest": "^29.5.11", - "jest": "^29.7.0", - "ts-jest": "^29.1.1", - "ts-node": "^10.9.2", - "@typescript-eslint/eslint-plugin": "^6.2.0", - "@typescript-eslint/parser": "^6.2.0" + "workbox-webpack-plugin": "^6.4.2" } } diff --git a/pwa/icons/icons-192.png b/pwa/icons/icons-192.png index 16bebab8..64c0296b 100644 Binary files a/pwa/icons/icons-192.png and b/pwa/icons/icons-192.png differ diff --git a/pwa/icons/icons-512.png b/pwa/icons/icons-512.png index 0e536097..ea878fd2 100644 Binary files a/pwa/icons/icons-512.png and b/pwa/icons/icons-512.png differ diff --git a/pwa/manifest.json b/pwa/manifest.json index fa202a58..e474b6b3 100644 --- a/pwa/manifest.json +++ b/pwa/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "Phaser Game", - "name": "My Cool Phaser 3 Game", + "short_name": "Infamia di Creti", + "name": "Infamia di Creti", "icons": [ { "src": "./icons/icons-192.png", diff --git a/src/anims/enemyAnims.ts b/src/anims/enemyAnims.ts new file mode 100644 index 00000000..92f42cac --- /dev/null +++ b/src/anims/enemyAnims.ts @@ -0,0 +1,90 @@ +import Phaser from "phaser"; + +const createRedEyesSkeletonAnims = ( + anims: Phaser.Animations.AnimationManager +) => { + anims.create({ + key: "redEyesSkeleton-idle-down", + frames: [ + { key: "skeleton_red_eyes", frame: "skeleton_red_eyes_01.png" }, + ], + }); + anims.create({ + key: "redEyesSkeleton-idle-up", + frames: [ + { key: "skeleton_red_eyes", frame: "skeleton_red_eyes_07.png" }, + ], + }); + anims.create({ + key: "redEyesSkeleton-idle-side", + frames: [ + { key: "skeleton_red_eyes", frame: "skeleton_red_eyes_04.png" }, + ], + }); + + anims.create({ + key: "redEyesSkeleton-run-down", + frames: anims.generateFrameNames("skeleton_red_eyes", { + start: 0, + end: 2, + prefix: "skeleton_red_eyes_0", + suffix: ".png", + }), + repeat: -1, + frameRate: 10, + }); + anims.create({ + key: "redEyesSkeleton-run-up", + frames: anims.generateFrameNames("skeleton_red_eyes", { + start: 6, + end: 8, + prefix: "skeleton_red_eyes_0", + suffix: ".png", + }), + repeat: -1, + frameRate: 10, + }); + anims.create({ + key: "redEyesSkeleton-run-side", + frames: anims.generateFrameNames("skeleton_red_eyes", { + start: 3, + end: 5, + prefix: "skeleton_red_eyes_0", + suffix: ".png", + }), + repeat: -1, + frameRate: 10, + }); +}; + +const createFlyingBatAnims = (anims: Phaser.Animations.AnimationManager) => { + anims.create({ + key: "flying_bat_flapping", + frames: anims.generateFrameNames("flying_bat", { + start: 1, + end: 7, + prefix: "fly0", + suffix: ".png", + }), + frameRate: 10, + repeat: -1, + }); +}; + +const createBlobMonsterAnims = (anims: Phaser.Animations.AnimationManager) => { + anims.create({ + key: "blob_monster_moving", + frames: anims.generateFrameNames("blob_monster", { + start: 1, + end: 8, + prefix: "walk0", + suffix: ".png", + }), + frameRate: 10, + repeat: -1, + }); +}; + +export { createFlyingBatAnims }; +export { createRedEyesSkeletonAnims }; +export { createBlobMonsterAnims }; diff --git a/src/anims/minotaurAnims.ts b/src/anims/minotaurAnims.ts new file mode 100644 index 00000000..dd901bde --- /dev/null +++ b/src/anims/minotaurAnims.ts @@ -0,0 +1,52 @@ +import Phaser from "phaser"; + +const createMinotaurAnims = (anims: Phaser.Animations.AnimationManager) => { + anims.create({ + key: "minotaur-idle-down", + frames: [{ key: "minotaur", frame: "minotaur_black_01.png" }], + }); + anims.create({ + key: "minotaur-idle-up", + frames: [{ key: "minotaur", frame: "minotaur_black_07.png" }], + }); + anims.create({ + key: "minotaur-idle-side", + frames: [{ key: "minotaur", frame: "minotaur_black_04.png" }], + }); + + anims.create({ + key: "minotaur-run-down", + frames: anims.generateFrameNames("minotaur", { + start: 0, + end: 2, + prefix: "minotaur_black_0", + suffix: ".png", + }), + repeat: -1, + frameRate: 3, + }); + anims.create({ + key: "minotaur-run-up", + frames: anims.generateFrameNames("minotaur", { + start: 6, + end: 8, + prefix: "minotaur_black_0", + suffix: ".png", + }), + repeat: -1, + frameRate: 3, + }); + anims.create({ + key: "minotaur-run-side", + frames: anims.generateFrameNames("minotaur", { + start: 3, + end: 5, + prefix: "minotaur_black_0", + suffix: ".png", + }), + repeat: -1, + frameRate: 3, + }); +}; + +export { createMinotaurAnims }; diff --git a/src/anims/theseusAnims.ts b/src/anims/theseusAnims.ts new file mode 100644 index 00000000..e41bd4ee --- /dev/null +++ b/src/anims/theseusAnims.ts @@ -0,0 +1,62 @@ +import Phaser from "phaser"; + +const createTheseusAnims = (anims: Phaser.Animations.AnimationManager) => { + anims.create({ + key: "faune-idle-down", + frames: [{ key: "faune", frame: "walk-down-3.png" }], + }); + anims.create({ + key: "faune-idle-up", + frames: [{ key: "faune", frame: "walk-up-3.png" }], + }); + anims.create({ + key: "faune-idle-side", + frames: [{ key: "faune", frame: "walk-side-3.png" }], + }); + + anims.create({ + key: "faune-run-down", + frames: anims.generateFrameNames("faune", { + start: 1, + end: 8, + prefix: "run-down-", + suffix: ".png", + }), + repeat: -1, + frameRate: 15, + }); + anims.create({ + key: "faune-run-up", + frames: anims.generateFrameNames("faune", { + start: 1, + end: 8, + prefix: "run-up-", + suffix: ".png", + }), + repeat: -1, + frameRate: 15, + }); + anims.create({ + key: "faune-run-side", + frames: anims.generateFrameNames("faune", { + start: 1, + end: 8, + prefix: "run-side-", + suffix: ".png", + }), + repeat: -1, + frameRate: 15, + }); + anims.create({ + key: "faune-faint", + frames: anims.generateFrameNames("faune", { + start: 1, + end: 4, + prefix: "faint-", + suffix: ".png", + }), + frameRate: 15, + }); +}; + +export { createTheseusAnims }; diff --git a/src/anims/weaponsAnims.ts b/src/anims/weaponsAnims.ts new file mode 100644 index 00000000..43c849ed --- /dev/null +++ b/src/anims/weaponsAnims.ts @@ -0,0 +1,54 @@ +import Phaser from "phaser"; + +const createWeaponsAnims = (anims: Phaser.Animations.AnimationManager) => { + anims.create({ + key: "sword_attack", + frames: anims.generateFrameNames("swordSlash", { + start: 13, + end: 18, + prefix: "Classic_", + suffix: ".png", + }), + frameRate: 20, + }); + + anims.create({ + key: "sword_attack_ice", + frames: anims.generateFrameNames("swordSlash-ice", { + start: 13, + end: 18, + prefix: "Alternative_2_", + suffix: ".png", + }), + frameRate: 20, + }); + + anims.create({ + key: "sword_attack_fire", + frames: anims.generateFrameNames("swordSlash-fire", { + start: 13, + end: 18, + prefix: "Alternative_3_", + suffix: ".png", + }), + frameRate: 20, + }); + + anims.create({ + key: "bow-idle", + frames: [{ key: "bow", frame: "Bow-1.png" }], + }); + + anims.create({ + key: "bow_attack", + frames: anims.generateFrameNames("bow", { + start: 1, + end: 8, + prefix: "Bow-", + suffix: ".png", + }), + frameRate: 20, + }); +}; + +export { createWeaponsAnims }; diff --git a/src/config.ts b/src/config.ts index 9776bc5c..e3e72b09 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,12 +1,21 @@ import Phaser from "phaser"; -import MainScene from "./scenes/mainScene"; import PreloadScene from "./scenes/preloadScene"; +import TitleScene from "./scenes/TitleScene"; +import GameUI from "./scenes/GameUI"; +import GameOver from "./scenes/GameOver"; +import MainScene from "./scenes/mainScene"; +import Tutorial from "./scenes/Tutorial"; +import Pause from "./scenes/Pause"; +import WeaponDesign from "./scenes/WeaponDesign"; +import MinotaurRoom from "./scenes/MinotaurRoom"; +import GameClear from "./scenes/GameClear"; +import Instructions from "./scenes/Instructions"; -const DEFAULT_WIDTH = 1280; -const DEFAULT_HEIGHT = 720; +const DEFAULT_WIDTH = 512; +const DEFAULT_HEIGHT = 384; export const CONFIG = { - title: "My Untitled Phaser 3 Game", + title: "Infamia di Creti", version: "0.0.1", type: Phaser.AUTO, backgroundColor: "#ffffff", @@ -17,12 +26,26 @@ export const CONFIG = { width: DEFAULT_WIDTH, height: DEFAULT_HEIGHT, }, - scene: [PreloadScene, MainScene], + dom: { + createContainer: true, + }, + scene: [ + PreloadScene, + TitleScene, + Tutorial, + MainScene, + MinotaurRoom, + GameUI, + WeaponDesign, + Instructions, + Pause, + GameOver, + GameClear, + ], physics: { default: "arcade", arcade: { debug: false, - gravity: { y: 300 }, }, }, input: { diff --git a/src/enemies/blobMonster.ts b/src/enemies/blobMonster.ts new file mode 100644 index 00000000..ce1f60ce --- /dev/null +++ b/src/enemies/blobMonster.ts @@ -0,0 +1,269 @@ +import Phaser from "phaser"; +import { sceneEvents } from "../events/eventsCenter"; + +enum HealthState { + IDLE, + DAMAGE, + DEAD, +} + +enum DamageState { + IDLE, + ICE, + FIRE, + POISON, +} + +export default class BlobMonster extends Phaser.Physics.Arcade.Sprite { + private target?: Phaser.Physics.Arcade.Sprite; + + private healthState = HealthState.IDLE; + private currentState = DamageState.IDLE; + + private damageTime = 0; + private effectTime = 0; + private decreaseTime = 0; + + private _health = 10; + private maxHealth = 10; + private speed = 50; + private isEasyMode: boolean; + + private healthBar: Phaser.GameObjects.Graphics; + + get health() { + return this._health; + } + + set setEasyMode(isEasyMode: boolean) { + this.isEasyMode = isEasyMode; + } + + constructor( + scene: Phaser.Scene, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + super(scene, x, y, texture, frame); + this.anims.play("blob_monster_moving"); + this.createHealthBar(); + } + + setTarget(target: Phaser.Physics.Arcade.Sprite) { + this.target = target; + } + + updateStatus(speed: number, maxHealth: number) { + this.speed = speed; + this._health = maxHealth; + this.maxHealth = maxHealth; + this.updateHealthBarSize(); + } + + handleDamage(damage: number, attackType: string) { + if (this._health <= 0) { + return; + } + if (this.healthState === HealthState.DAMAGE) { + return; + } + + this._health -= damage; + + if (this._health <= 0) { + this.healthState = HealthState.DEAD; + this._health = 0; + this.setVelocity(0, 0); + this.scene.tweens.add({ + targets: this, + alpha: 0, + duration: 300, + onComplete: () => { + this.healthBar.destroy(); + this.destroy(); + }, + }); + sceneEvents.emit("enemy-destroyed", this.x, this.y); + } else { + this.setTint(0xff0000); + this.healthState = HealthState.DAMAGE; + this.damageTime = 0; + } + + if (attackType === "ice") { + this.currentState = DamageState.ICE; + this.effectTime = 0; + this.speed = this.isEasyMode ? 30 : 40; + + this.setTint(0x0000ff); + } else if (attackType === "fire") { + this.currentState = DamageState.FIRE; + this.effectTime = 0; + this.setTint(0xffff00); + } + if (attackType === "poison") { + this.currentState = DamageState.POISON; + this.effectTime = 0; + this.setTint(0x00ff00); + } + } + + handleEffectDamage(damage: number) { + if (this._health <= 0) { + return; + } + + this._health -= damage; + + if (this._health <= 0) { + this.healthState = HealthState.DEAD; + this._health = 0; + this.setVelocity(0, 0); + this.scene.tweens.add({ + targets: this, + alpha: 0, + duration: 300, + onComplete: () => { + this.healthBar.destroy(); + this.destroy(); + }, + }); + sceneEvents.emit("enemy-destroyed", this.x, this.y); + } + } + + createHealthBar() { + this.healthBar = this.scene.add.graphics(); + this.updateHealthBarPosition(); + this.updateHealthBarSize(); + } + + updateHealthBarPosition() { + this.healthBar.x = this.x - 15; + this.healthBar.y = this.y - 20; + } + + updateHealthBarSize() { + this.healthBar.clear(); + + this.healthBar.fillStyle(0x000000, 0.8); + this.healthBar.fillRect(0, 0, 25, 3); + + const width = (this.health / this.maxHealth) * 25; + + this.healthBar.fillStyle(0xff0000, 1); + this.healthBar.fillRect(0, 0, width, 3); + } + + preUpdate(t: number, dt: number) { + super.preUpdate(t, dt); + + switch (this.healthState) { + case HealthState.IDLE: + break; + case HealthState.DAMAGE: + this.damageTime += dt; + if (this.damageTime >= 250) { + this.healthState = HealthState.IDLE; + this.setTint(0xffffff); + this.damageTime = 0; + } + break; + } + + switch (this.currentState) { + case DamageState.IDLE: + break; + case DamageState.ICE: + this.effectTime += dt; + if (this.effectTime > 250) { + this.setTint(0x0000ff); + } + if (this.effectTime >= 2000) { + this.currentState = DamageState.IDLE; + this.speed = this.isEasyMode ? 40 : 50; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + case DamageState.FIRE: + this.effectTime += dt; + this.decreaseTime += dt; + if (this.effectTime > 250) { + this.setTint(0xffff00); + } + if (this.decreaseTime >= 200) { + this.setTint(0xffffff); + } + if (this.decreaseTime >= 400) { + this.handleEffectDamage(0.5); + this.setTint(0xffff00); + + console.log(this._health); + this.decreaseTime = 0; + } + if (this.effectTime >= 1600) { + this.currentState = DamageState.IDLE; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + case DamageState.POISON: + this.effectTime += dt; + this.decreaseTime += dt; + if (this.effectTime > 250) { + this.setTint(0x00ff00); + } + if (this.decreaseTime >= 200) { + this.setTint(0xffffff); + } + if (this.decreaseTime >= 400) { + this.handleEffectDamage(0.25); + this.setTint(0x00ff00); + this.decreaseTime = 0; + } + if (this.effectTime >= 1600) { + this.currentState = DamageState.IDLE; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + } + + if (!this.target || !this.body) { + return; + } + + if (this.x <= this.target.x && Math.abs(this.x - this.target.x) > 30) { + this.anims.play("blob_monster_moving", true); + this.scaleX = 1; + this.body.offset.x = 0; + } else if ( + this.x > this.target.x && + Math.abs(this.x - this.target.x) > 30 + ) { + this.anims.play("blob_monster_moving", true); + this.scaleX = -1; + this.body.offset.x = 20; + } else if (this.y <= this.target.y) { + this.anims.play("blob_monster_moving", true); + this.body.offset.y = 12; + } else if (this.y > this.target.y) { + this.anims.play("blob_monster_moving", true); + this.body.offset.y = 12; + } + this.scene.physics.moveTo( + this, + this.target.x, + this.target.y, + this.speed + ); + } + + update() { + this.updateHealthBarPosition(); + this.updateHealthBarSize(); + } +} diff --git a/src/enemies/flyingBats.ts b/src/enemies/flyingBats.ts new file mode 100644 index 00000000..6e4a0ab7 --- /dev/null +++ b/src/enemies/flyingBats.ts @@ -0,0 +1,269 @@ +import Phaser from "phaser"; +import { sceneEvents } from "../events/eventsCenter"; + +enum HealthState { + IDLE, + DAMAGE, + DEAD, +} + +enum DamageState { + IDLE, + ICE, + FIRE, + POISON, +} + +export default class FlyingBat extends Phaser.Physics.Arcade.Sprite { + private target?: Phaser.Physics.Arcade.Sprite; + + private healthState = HealthState.IDLE; + private currentState = DamageState.IDLE; + + private damageTime = 0; + private effectTime = 0; + private decreaseTime = 0; + + private _health = 15; + private maxHealth = 15; + private speed = 50; + private isEasyMode: boolean; + + private healthBar: Phaser.GameObjects.Graphics; + + get health() { + return this._health; + } + + set setEasyMode(isEasyMode: boolean) { + this.isEasyMode = isEasyMode; + } + + constructor( + scene: Phaser.Scene, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + super(scene, x, y, texture, frame); + this.anims.play("flying_bat_flapping"); + this.createHealthBar(); + } + + setTarget(target: Phaser.Physics.Arcade.Sprite) { + this.target = target; + } + + updateStatus(speed: number, maxHealth: number) { + this.speed = speed; + this._health = maxHealth; + this.maxHealth = maxHealth; + this.updateHealthBarSize(); + } + + handleDamage(damage: number, attackType: string) { + if (this._health <= 0) { + return; + } + if (this.healthState === HealthState.DAMAGE) { + return; + } + + this._health -= damage; + + if (this._health <= 0) { + this.healthState = HealthState.DEAD; + this._health = 0; + this.setVelocity(0, 0); + this.scene.tweens.add({ + targets: this, + alpha: 0, + duration: 300, + onComplete: () => { + this.healthBar.destroy(); + this.destroy(); + }, + }); + sceneEvents.emit("enemy-destroyed", this.x, this.y); + } else { + this.setTint(0xff0000); + this.healthState = HealthState.DAMAGE; + this.damageTime = 0; + } + + if (attackType === "ice") { + this.currentState = DamageState.ICE; + this.effectTime = 0; + this.speed = this.isEasyMode ? 30 : 40; + + this.setTint(0x0000ff); + } else if (attackType === "fire") { + this.currentState = DamageState.FIRE; + this.effectTime = 0; + this.setTint(0xffff00); + } + if (attackType === "poison") { + this.currentState = DamageState.POISON; + this.effectTime = 0; + this.setTint(0x00ff00); + } + } + + handleEffectDamage(damage: number) { + if (this._health <= 0) { + return; + } + + this._health -= damage; + + if (this._health <= 0) { + this.healthState = HealthState.DEAD; + this._health = 0; + this.setVelocity(0, 0); + this.scene.tweens.add({ + targets: this, + alpha: 0, + duration: 300, + onComplete: () => { + this.healthBar.destroy(); + this.destroy(); + }, + }); + sceneEvents.emit("enemy-destroyed", this.x, this.y); + } + } + + createHealthBar() { + this.healthBar = this.scene.add.graphics(); + this.updateHealthBarPosition(); + this.updateHealthBarSize(); + } + + updateHealthBarPosition() { + this.healthBar.x = this.x - 15; + this.healthBar.y = this.y - 20; + } + + updateHealthBarSize() { + this.healthBar.clear(); + + this.healthBar.fillStyle(0x000000, 0.8); + this.healthBar.fillRect(0, 0, 25, 3); + + const width = (this.health / this.maxHealth) * 25; + + this.healthBar.fillStyle(0xff0000, 1); + this.healthBar.fillRect(0, 0, width, 3); + } + + preUpdate(t: number, dt: number) { + super.preUpdate(t, dt); + + switch (this.healthState) { + case HealthState.IDLE: + break; + case HealthState.DAMAGE: + this.damageTime += dt; + if (this.damageTime >= 250) { + this.healthState = HealthState.IDLE; + this.setTint(0xffffff); + this.damageTime = 0; + } + break; + } + + switch (this.currentState) { + case DamageState.IDLE: + break; + case DamageState.ICE: + this.effectTime += dt; + if (this.effectTime > 250) { + this.setTint(0x0000ff); + } + if (this.effectTime >= 2000) { + this.currentState = DamageState.IDLE; + this.speed = this.isEasyMode ? 40 : 50; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + case DamageState.FIRE: + this.effectTime += dt; + this.decreaseTime += dt; + if (this.effectTime > 250) { + this.setTint(0xffff00); + } + if (this.decreaseTime >= 200) { + this.setTint(0xffffff); + } + if (this.decreaseTime >= 400) { + this.handleEffectDamage(0.5); + this.setTint(0xffff00); + + console.log(this._health); + this.decreaseTime = 0; + } + if (this.effectTime >= 1600) { + this.currentState = DamageState.IDLE; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + case DamageState.POISON: + this.effectTime += dt; + this.decreaseTime += dt; + if (this.effectTime > 250) { + this.setTint(0x00ff00); + } + if (this.decreaseTime >= 200) { + this.setTint(0xffffff); + } + if (this.decreaseTime >= 400) { + this.handleEffectDamage(0.25); + this.setTint(0x00ff00); + this.decreaseTime = 0; + } + if (this.effectTime >= 1600) { + this.currentState = DamageState.IDLE; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + } + + if (!this.target || !this.body) { + return; + } + + if (this.x <= this.target.x && Math.abs(this.x - this.target.x) > 30) { + this.anims.play("flying_bat_flapping", true); + this.scaleX = 1; + this.body.offset.x = 4; + } else if ( + this.x > this.target.x && + Math.abs(this.x - this.target.x) > 30 + ) { + this.anims.play("flying_bat_flapping", true); + this.scaleX = -1; + this.body.offset.x = 24; + } else if (this.y <= this.target.y) { + this.anims.play("flying_bat_flapping", true); + this.body.offset.y = 4; + } else if (this.y > this.target.y) { + this.anims.play("flying_bat_flapping", true); + this.body.offset.y = 4; + } + this.scene.physics.moveTo( + this, + this.target.x, + this.target.y, + this.speed + ); + } + + update() { + this.updateHealthBarPosition(); + this.updateHealthBarSize(); + } +} diff --git a/src/enemies/minotaur.ts b/src/enemies/minotaur.ts new file mode 100644 index 00000000..3da104af --- /dev/null +++ b/src/enemies/minotaur.ts @@ -0,0 +1,304 @@ +import Phaser from "phaser"; +// import { sceneEvents } from "../events/eventsCenter"; + +enum HealthState { + IDLE, + DAMAGE, + DEAD, +} + +enum DamageState { + IDLE, + ICE, + FIRE, + POISON, +} + +export default class Minotaur extends Phaser.Physics.Arcade.Sprite { + private target?: Phaser.Physics.Arcade.Sprite; + + private healthState = HealthState.IDLE; + private currentState = DamageState.IDLE; + + private damageTime = 0; + private effectTime = 0; + private decreaseTime = 0; + private speedTime = 0; + + private _health = 500; + private maxHealth = 500; + private speed = 60; + private isEasyMode: boolean; + + private healthBar: Phaser.GameObjects.Graphics; + + get health() { + return this._health; + } + + set setEasyMode(isEasyMode: boolean) { + this.isEasyMode = isEasyMode; + } + + constructor( + scene: Phaser.Scene, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + super(scene, x, y, texture, frame); + this.anims.play("minotaur-idle-down"); + this.createHealthBar(); + } + + setTarget(target: Phaser.Physics.Arcade.Sprite) { + this.target = target; + } + + updateStatus(speed: number, maxHealth: number) { + this.speed = speed; + this._health = maxHealth; + this.maxHealth = maxHealth; + this.updateHealthBarSize(); + } + + handleDamage(damage: number, attackType: string) { + if (this._health <= 0) { + return; + } + if (this.healthState === HealthState.DAMAGE) { + return; + } + + this._health -= damage; + + if (this._health <= 0) { + this.healthState = HealthState.DEAD; + this._health = 0; + this.setVelocity(0, 0); + this.scene.tweens.add({ + targets: this, + alpha: 0, + duration: 300, + onComplete: () => { + this.healthBar.destroy(); + this.destroy(); + }, + }); + } else { + this.setTint(0xff0000); + this.healthState = HealthState.DAMAGE; + this.damageTime = 0; + } + + if (attackType === "ice") { + this.currentState = DamageState.ICE; + this.effectTime = 0; + this.speed = this.isEasyMode ? 40 : 50; + this.setTint(0x0000ff); + } else if (attackType === "fire") { + this.currentState = DamageState.FIRE; + this.effectTime = 0; + this.setTint(0xffff00); + } + if (attackType === "poison") { + this.currentState = DamageState.POISON; + this.effectTime = 0; + this.setTint(0x00ff00); + } + } + + handleEffectDamage(damage: number) { + if (this._health <= 0) { + return; + } + + this._health -= damage; + + if (this._health <= 0) { + this.healthState = HealthState.DEAD; + this._health = 0; + this.setVelocity(0, 0); + this.scene.tweens.add({ + targets: this, + alpha: 0, + duration: 300, + onComplete: () => { + this.healthBar.destroy(); + this.destroy(); + }, + }); + } + } + + createHealthBar() { + this.healthBar = this.scene.add.graphics(); + this.healthBar.x = this.scene.cameras.main.width * 0.15; + this.healthBar.y = this.scene.cameras.main.height * 0.1; + this.scene.add + .text( + this.scene.cameras.main.width * 0.5, + this.healthBar.y - 15, + "Minotaur", + { + fontSize: "22px", + fontFamily: "Academy Engraved LET", + strokeThickness: 3, + stroke: "0xffffff", + } + ) + .setOrigin(0.5); + this.updateHealthBarSize(); + } + + updateHealthBarSize() { + this.healthBar.clear(); + + this.healthBar.fillStyle(0x000000, 0.8); + this.healthBar.fillRect( + 0, + 0, + this.scene.cameras.main.width * 0.7, + this.scene.cameras.main.height * 0.05 + ); + + const width = + (this.health / this.maxHealth) * + this.scene.cameras.main.width * + 0.7; + + this.healthBar.fillStyle(0xff0000, 1); + this.healthBar.fillRect( + 0, + 0, + width, + this.scene.cameras.main.height * 0.05 + ); + + this.healthBar.lineStyle(2, 0xffffff); + this.healthBar.strokeRect( + 0, + 0, + this.scene.cameras.main.width * 0.7, + this.scene.cameras.main.height * 0.05 + ); + } + + preUpdate(t: number, dt: number) { + super.preUpdate(t, dt); + + switch (this.healthState) { + case HealthState.IDLE: + break; + case HealthState.DAMAGE: + this.damageTime += dt; + if (this.damageTime >= 250) { + this.healthState = HealthState.IDLE; + this.setTint(0xffffff); + this.damageTime = 0; + } + break; + } + + switch (this.currentState) { + case DamageState.IDLE: + break; + case DamageState.ICE: + this.effectTime += dt; + if (this.effectTime > 250) { + this.setTint(0x0000ff); + } + if (this.effectTime >= 2000) { + this.currentState = DamageState.IDLE; + this.speed = this.isEasyMode ? 50 : 60; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + case DamageState.FIRE: + this.effectTime += dt; + this.decreaseTime += dt; + if (this.effectTime > 250) { + this.setTint(0xffff00); + } + if (this.decreaseTime >= 200) { + this.setTint(0xffffff); + } + if (this.decreaseTime >= 400) { + this.handleEffectDamage(0.5); + this.setTint(0xffff00); + + console.log(this._health); + this.decreaseTime = 0; + } + if (this.effectTime >= 1600) { + this.currentState = DamageState.IDLE; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + case DamageState.POISON: + this.effectTime += dt; + this.decreaseTime += dt; + if (this.effectTime > 250) { + this.setTint(0x00ff00); + } + if (this.decreaseTime >= 200) { + this.setTint(0xffffff); + } + if (this.decreaseTime >= 400) { + this.handleEffectDamage(0.25); + this.setTint(0x00ff00); + this.decreaseTime = 0; + } + if (this.effectTime >= 1600) { + this.currentState = DamageState.IDLE; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + } + + if (!this.target || !this.body) { + return; + } + + if (this.x <= this.target.x && Math.abs(this.x - this.target.x) > 30) { + this.anims.play("minotaur-run-side", true); + this.scaleX = -1; + this.body.offset.x = 90; + } else if ( + this.x > this.target.x && + Math.abs(this.x - this.target.x) > 30 + ) { + this.anims.play("minotaur-run-side", true); + this.scaleX = 1; + this.body.offset.x = 50; + } else if (this.y <= this.target.y) { + this.anims.play("minotaur-run-down", true); + this.body.offset.y = 25; + } else if (this.y > this.target.y) { + this.anims.play("minotaur-run-up", true); + this.body.offset.y = 25; + } + if (!this.isEasyMode) { + this.speedTime += dt; + if (this.speedTime >= 250) { + this.speed = Math.floor(Math.random() * 21 + 60); + this.speedTime = 0; + console.log(this.speed); + } + } + this.scene.physics.moveTo( + this, + this.target.x, + this.target.y, + this.speed + ); + } + + update() { + this.updateHealthBarSize(); + } +} diff --git a/src/enemies/redEyesSkeleton.ts b/src/enemies/redEyesSkeleton.ts new file mode 100644 index 00000000..c5af35f3 --- /dev/null +++ b/src/enemies/redEyesSkeleton.ts @@ -0,0 +1,269 @@ +import Phaser from "phaser"; +import { sceneEvents } from "../events/eventsCenter"; + +enum HealthState { + IDLE, + DAMAGE, + DEAD, +} + +enum DamageState { + IDLE, + ICE, + FIRE, + POISON, +} + +export default class RedEyesSkeleton extends Phaser.Physics.Arcade.Sprite { + private target?: Phaser.Physics.Arcade.Sprite; + + private healthState = HealthState.IDLE; + private currentState = DamageState.IDLE; + + private damageTime = 0; + private effectTime = 0; + private decreaseTime = 0; + + private _health = 20; + private maxHealth = 20; + private speed = 50; + private isEasyMode: boolean; + + private healthBar: Phaser.GameObjects.Graphics; + + get health() { + return this._health; + } + + set setEasyMode(isEasyMode: boolean) { + this.isEasyMode = isEasyMode; + } + + constructor( + scene: Phaser.Scene, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + super(scene, x, y, texture, frame); + this.anims.play("redEyesSkeleton-idle-down"); + this.createHealthBar(); + } + + setTarget(target: Phaser.Physics.Arcade.Sprite) { + this.target = target; + } + + updateStatus(speed: number, maxHealth: number) { + this.speed = speed; + this._health = maxHealth; + this.maxHealth = maxHealth; + this.updateHealthBarSize(); + } + + handleDamage(damage: number, attackType: string) { + if (this._health <= 0) { + return; + } + if (this.healthState === HealthState.DAMAGE) { + return; + } + + this._health -= damage; + + if (this._health <= 0) { + this.healthState = HealthState.DEAD; + this._health = 0; + this.setVelocity(0, 0); + this.scene.tweens.add({ + targets: this, + alpha: 0, + duration: 300, + onComplete: () => { + this.healthBar.destroy(); + this.destroy(); + }, + }); + sceneEvents.emit("enemy-destroyed", this.x, this.y); + } else { + this.setTint(0xff0000); + this.healthState = HealthState.DAMAGE; + this.damageTime = 0; + } + + if (attackType === "ice") { + this.currentState = DamageState.ICE; + this.effectTime = 0; + this.speed = this.isEasyMode ? 30 : 40; + + this.setTint(0x0000ff); + } else if (attackType === "fire") { + this.currentState = DamageState.FIRE; + this.effectTime = 0; + this.setTint(0xffff00); + } + if (attackType === "poison") { + this.currentState = DamageState.POISON; + this.effectTime = 0; + this.setTint(0x00ff00); + } + } + + handleEffectDamage(damage: number) { + if (this._health <= 0) { + return; + } + + this._health -= damage; + + if (this._health <= 0) { + this.healthState = HealthState.DEAD; + this._health = 0; + this.setVelocity(0, 0); + this.scene.tweens.add({ + targets: this, + alpha: 0, + duration: 300, + onComplete: () => { + this.healthBar.destroy(); + this.destroy(); + }, + }); + sceneEvents.emit("enemy-destroyed", this.x, this.y); + } + } + + createHealthBar() { + this.healthBar = this.scene.add.graphics(); + this.updateHealthBarPosition(); + this.updateHealthBarSize(); + } + + updateHealthBarPosition() { + this.healthBar.x = this.x - 15; + this.healthBar.y = this.y - 20; + } + + updateHealthBarSize() { + this.healthBar.clear(); + + this.healthBar.fillStyle(0x000000, 0.8); + this.healthBar.fillRect(0, 0, 25, 3); + + const width = (this.health / this.maxHealth) * 25; + + this.healthBar.fillStyle(0xff0000, 1); + this.healthBar.fillRect(0, 0, width, 3); + } + + preUpdate(t: number, dt: number) { + super.preUpdate(t, dt); + + switch (this.healthState) { + case HealthState.IDLE: + break; + case HealthState.DAMAGE: + this.damageTime += dt; + if (this.damageTime >= 250) { + this.healthState = HealthState.IDLE; + this.setTint(0xffffff); + this.damageTime = 0; + } + break; + } + + switch (this.currentState) { + case DamageState.IDLE: + break; + case DamageState.ICE: + this.effectTime += dt; + if (this.effectTime > 250) { + this.setTint(0x0000ff); + } + if (this.effectTime >= 2000) { + this.currentState = DamageState.IDLE; + this.speed = this.isEasyMode ? 40 : 50; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + case DamageState.FIRE: + this.effectTime += dt; + this.decreaseTime += dt; + if (this.effectTime > 250) { + this.setTint(0xffff00); + } + if (this.decreaseTime >= 200) { + this.setTint(0xffffff); + } + if (this.decreaseTime >= 400) { + this.handleEffectDamage(0.5); + this.setTint(0xffff00); + + console.log(this._health); + this.decreaseTime = 0; + } + if (this.effectTime >= 1600) { + this.currentState = DamageState.IDLE; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + case DamageState.POISON: + this.effectTime += dt; + this.decreaseTime += dt; + if (this.effectTime > 250) { + this.setTint(0x00ff00); + } + if (this.decreaseTime >= 200) { + this.setTint(0xffffff); + } + if (this.decreaseTime >= 400) { + this.handleEffectDamage(0.25); + this.setTint(0x00ff00); + this.decreaseTime = 0; + } + if (this.effectTime >= 1600) { + this.currentState = DamageState.IDLE; + this.setTint(0xffffff); + this.effectTime = 0; + } + break; + } + + if (!this.target || !this.body) { + return; + } + + if (this.x <= this.target.x && Math.abs(this.x - this.target.x) > 30) { + this.anims.play("redEyesSkeleton-run-side", true); + this.scaleX = -1; + this.body.offset.x = 16; + } else if ( + this.x > this.target.x && + Math.abs(this.x - this.target.x) > 30 + ) { + this.anims.play("redEyesSkeleton-run-side", true); + this.scaleX = 1; + this.body.offset.x = 0; + } else if (this.y <= this.target.y) { + this.anims.play("redEyesSkeleton-run-down", true); + this.body.offset.y = 4; + } else if (this.y > this.target.y) { + this.anims.play("redEyesSkeleton-run-up", true); + this.body.offset.y = 4; + } + this.scene.physics.moveTo( + this, + this.target.x, + this.target.y, + this.speed + ); + } + + update() { + this.updateHealthBarPosition(); + this.updateHealthBarSize(); + } +} diff --git a/src/events/eventsCenter.ts b/src/events/eventsCenter.ts new file mode 100644 index 00000000..578f33ef --- /dev/null +++ b/src/events/eventsCenter.ts @@ -0,0 +1,5 @@ +import Phaser from "phaser"; + +const sceneEvents = new Phaser.Events.EventEmitter(); + +export { sceneEvents }; diff --git a/src/objects/phaserLogo.ts b/src/objects/phaserLogo.ts deleted file mode 100644 index 84324120..00000000 --- a/src/objects/phaserLogo.ts +++ /dev/null @@ -1,16 +0,0 @@ -import Phaser from "phaser"; - -export default class PhaserLogo extends Phaser.Physics.Arcade.Sprite { - constructor(scene: Phaser.Scene, x: number, y: number) { - super(scene, x, y, "phaser-logo"); - scene.add.existing(this); - scene.physics.add.existing(this); - - this.setCollideWorldBounds(true) - .setBounce(0.6) - .setInteractive() - .on("pointerdown", () => { - this.setVelocityY(-400); - }); - } -} diff --git a/src/player/theseus.ts b/src/player/theseus.ts new file mode 100644 index 00000000..1c20e8ef --- /dev/null +++ b/src/player/theseus.ts @@ -0,0 +1,324 @@ +import Phaser from "phaser"; +import { sceneEvents } from "../events/eventsCenter"; +import "../weapons/sword"; +import Sword from "../weapons/sword"; +import "../weapons/bow"; +import Bow from "../weapons/bow"; + +declare global { + namespace Phaser.GameObjects { + interface GameObjectFactory { + theseus( + x: number, + y: number, + texture: string, + frame?: string | number + ): Theseus; + } + } +} + +enum HealthState { + IDLE, + DAMAGE, + DEAD, +} + +export default class Theseus extends Phaser.Physics.Arcade.Sprite { + private healthState = HealthState.IDLE; + private damageTime = 0; + + private _health = 3; + + private weapon: Sword | Bow; + private _weaponType = "sword"; + private sword: Sword; + private bow: Bow; + private mouse?: Phaser.Input.Pointer; + + private canAttack = true; + private invincibility = false; + private _gameOver = false; + + private shiftKeyPressed = false; + + private _canUseBow = true; + + get health() { + return this._health; + } + + set health(newHealth: number) { + this._health = newHealth; + } + + get gameOVer() { + return this._gameOver; + } + + get getWeapon() { + return this.weapon; + } + + get getSword() { + return this.sword; + } + + get getBow() { + return this.bow; + } + + get weaponType() { + return this._weaponType; + } + + set weaponType(newWeapon: string) { + this._weaponType = newWeapon; + } + + set canUseBow(flag: boolean) { + this._canUseBow = flag; + } + + constructor( + scene: Phaser.Scene, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + super(scene, x, y, texture, frame); + this.anims.play("faune-idle-down"); + + this.mouse = this.scene.input.mousePointer; + + this.sword = this.scene.add.sword(this.x + 5, this.y + 7, "sword"); + this.bow = this.scene.add.bow(this.x + 5, this.y + 7, "bow"); + + this.canAttack = true; + this.setDepth(500); + + // this.scene.events.on("weapon-updated", this.handleWeaponUpdated, this); + } + + handleDamage(dir: Phaser.Math.Vector2) { + if (this._health <= 0) { + return; + } + if (this.healthState === HealthState.DAMAGE) { + return; + } + if (this.invincibility) { + return; + } + + --this._health; + + if (this._health <= 0) { + this.healthState = HealthState.DEAD; + this.anims.play("faune-faint"); + this.setVelocity(0, 0); + sceneEvents.emit("gameOver"); + this.scene.physics.pause(); + this._gameOver = true; + } else { + this.setVelocity(dir.x, dir.y); + this.setTint(0xff0000); + this.healthState = HealthState.DAMAGE; + this.damageTime = 0; + this.alpha = 0.5; + this.invincibility = true; + this.scene.time.delayedCall(1000, () => { + this.alpha = 1; + this.invincibility = false; + }); + } + } + + preUpdate(t: number, dt: number) { + super.preUpdate(t, dt); + switch (this.healthState) { + case HealthState.IDLE: + break; + case HealthState.DAMAGE: + this.damageTime += dt; + if (this.damageTime >= 250) { + this.healthState = HealthState.IDLE; + this.setTint(0xffffff); + this.damageTime = 0; + } + break; + } + if (this._weaponType === "sword") { + this.weapon = this.sword; + this.bow.setVisible(false); + } else if (this._weaponType === "bow") { + this.weapon = this.bow; + this.sword.setVisible(false); + } + } + + private handleAttack(angle: number) { + this.canAttack = false; + + if (this.weapon instanceof Sword) { + this.weapon.handleSwordSlash(angle); + this.scene.time.delayedCall( + 600 - 20 * (this.weapon.speed - 3), + () => { + this.canAttack = true; + } + ); + } else if (this.weapon instanceof Bow) { + this.weapon.handleArrow(angle); + this.scene.time.delayedCall( + 500 - 10 * (this.weapon.speed - 3), + () => { + this.canAttack = true; + } + ); + } + } + + update(cursors: Phaser.Types.Input.Keyboard.CursorKeys) { + if ( + this.healthState === HealthState.DAMAGE || + this.healthState === HealthState.DEAD + ) { + return; + } + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (!cursors || !this.body) { + return; + } + + const speed = 100; + + this.weapon.setY(this.y + 7); + + const keyA = this.scene.input.keyboard?.addKey( + Phaser.Input.Keyboard.KeyCodes.A, + false + ); + const keyS = this.scene.input.keyboard?.addKey( + Phaser.Input.Keyboard.KeyCodes.S, + false + ); + const keyD = this.scene.input.keyboard?.addKey( + Phaser.Input.Keyboard.KeyCodes.D, + false + ); + const keyW = this.scene.input.keyboard?.addKey( + Phaser.Input.Keyboard.KeyCodes.W, + false + ); + + if (keyA?.isDown) { + this.anims.play("faune-run-side", true); + this.setVelocity(-speed, 0); + this.scaleX = -1; + this.body.offset.x = 24; + this.weapon.setX(this.x - 5); + if (this.weaponType === "bow") { + this.weapon.setX(this.x - 8); + } + this.weapon.setDepth(1000); + } else if (keyD?.isDown) { + this.anims.play("faune-run-side", true); + this.setVelocity(speed, 0); + this.scaleX = 1; + this.body.offset.x = 8; + this.weapon.setX(this.x + 5); + this.weapon.setDepth(1000); + } else if (keyW?.isDown) { + this.anims.play("faune-run-up", true); + this.setVelocity(0, -speed); + this.body.offset.y = 4; + this.weapon.setX(this.x + 5); + this.weapon.setY(this.y); + this.weapon.setDepth(0); + } else if (keyS?.isDown) { + this.anims.play("faune-run-down", true); + this.setVelocity(0, speed); + this.weapon.setX(this.x + 5); + if (this.weaponType === "bow") { + this.weapon.setY(this.y + 15); + } + this.weapon.setDepth(1000); + } else { + const parts = this.anims.currentAnim?.key.split("-") as string[]; + parts[1] = "idle"; + this.anims.play(parts.join("-")); + this.setVelocity(0, 0); + this.weapon.setX(this.x + 5); + } + + const keyShift = this.scene.input.keyboard?.addKey( + Phaser.Input.Keyboard.KeyCodes.SHIFT + ); + + if (keyShift?.isDown) { + if (!this.shiftKeyPressed && this._canUseBow) { + this.shiftKeyPressed = true; + if (this._weaponType === "sword") { + this._weaponType = "bow"; + this.weapon.setVisible(false); + this.weapon = this.bow!; + this.weapon.setVisible(true); + sceneEvents.emit("player-weapon-changed", this._weaponType); + } else if (this._weaponType === "bow") { + this._weaponType = "sword"; + this.weapon.setVisible(false); + this.weapon = this.sword!; + this.weapon.setVisible(true); + sceneEvents.emit("player-weapon-changed", this._weaponType); + } + } + } + if (keyShift?.isUp) { + this.shiftKeyPressed = false; + } + + let angle = Phaser.Math.Angle.Between( + this.weapon.x!, + this.weapon.y!, + this.scene.input.x, + this.scene.input.y + ); + + if (this._weaponType === "sword") { + this.weapon.setRotation(angle + Math.PI / 4); + } else if (this._weaponType === "bow") { + this.weapon.setRotation(angle + (Math.PI * 4) / 5); + } + + if (this.mouse?.isDown && this.canAttack) { + this.handleAttack(angle); + } + } +} + +Phaser.GameObjects.GameObjectFactory.register( + "theseus", + function ( + this: Phaser.GameObjects.GameObjectFactory, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + var sprite = new Theseus(this.scene, x, y, texture, frame); + + this.displayList.add(sprite); + this.updateList.add(sprite); + + this.scene.physics.world.enableBody( + sprite, + Phaser.Physics.Arcade.DYNAMIC_BODY + ); + + sprite.body?.setSize(sprite.width * 0.5, sprite.height * 0.8); + + return sprite; + } +); diff --git a/src/scenes/GameClear.ts b/src/scenes/GameClear.ts new file mode 100644 index 00000000..b0e8c3ec --- /dev/null +++ b/src/scenes/GameClear.ts @@ -0,0 +1,140 @@ +import Phaser from "phaser"; +import FpsText from "../objects/fpsText"; +import { sceneEvents } from "../events/eventsCenter"; + +export default class GameClear extends Phaser.Scene { + fpsText: FpsText; + + constructor() { + super({ key: "GameClear" }); + } + + create() { + this.scene.stop("game-ui"); + + this.fpsText = new FpsText(this); + const background = this.add.image( + this.cameras.main.width / 2, + this.cameras.main.height / 2, + "background" + ); + let X = this.cameras.main.width / background.width; + let Y = this.cameras.main.height / background.height; + let scale = Math.max(X, Y); + background.setScale(scale).setScrollFactor(0); + background.setDepth(0); + + this.add + .rectangle( + this.cameras.main.width / 2, + this.cameras.main.height / 2, + this.cameras.main.width, + this.cameras.main.height, + 0x000000, + 0.8 + ) + .setOrigin(0.5) + .setDepth(999); + + this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 3, + "Victory!!", + { + fontSize: "35px", + fontFamily: "Academy Engraved LET", + strokeThickness: 6, + stroke: "0xffffff", + shadow: { + color: "#0000FF", + fill: true, + offsetX: 3, + offsetY: 3, + blur: 4, + stroke: false, + }, + //strokeAlpha: 1 + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const retry = this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 1.5 - 40, + "Restart", + { + fontSize: "22px", + fontFamily: "Academy Engraved LET", + strokeThickness: 4, + stroke: "0xffffff", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + retry.setInteractive(); + retry.on("pointerover", () => { + retry.setFontSize("25px"); + retry.setShadow(1, 1, "#FFD300", 3, false, true); + }); + retry.on("pointerout", () => { + retry.setFontSize("22px"); + retry.setShadow(undefined); + }); + retry.on("pointerdown", () => { + this.scene.start("tutorial"); + sceneEvents.emit("gameRetry"); + }); + + const goTitle = this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 1.5, + "Return to Title", + { + fontSize: "22px", + fontFamily: "Academy Engraved LET", + strokeThickness: 4, + stroke: "0xffffff", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + goTitle.setInteractive(); + goTitle.on("pointerover", () => { + goTitle.setFontSize("25px"); + goTitle.setShadow(1, 1, "#FFD300", 3, false, true); + }); + goTitle.on("pointerout", () => { + goTitle.setFontSize("22px"); + goTitle.setShadow(undefined); + }); + goTitle.on("pointerdown", () => { + this.scene.stop(); + this.scene.stop("mainScene"); + this.scene.stop("game-ui"); + this.scene.start("TitleScene"); + }); + + this.add.image(0, 0, "base_tiles"); + const map = this.make.tilemap({ key: "tilemap" }); + const tileset = map.addTilesetImage( + "dungeon", + "base_tiles", + 16, + 16 + ) as Phaser.Tilemaps.Tileset; + + map.createLayer("ground", tileset); + map.createLayer("wall", tileset) as Phaser.Tilemaps.TilemapLayer; + map.createLayer("door", tileset) as Phaser.Tilemaps.TilemapLayer; + } + + update() { + this.fpsText.update(); + } +} diff --git a/src/scenes/GameOver.ts b/src/scenes/GameOver.ts new file mode 100644 index 00000000..20a48f72 --- /dev/null +++ b/src/scenes/GameOver.ts @@ -0,0 +1,141 @@ +import Phaser from "phaser"; +import FpsText from "../objects/fpsText"; +import { sceneEvents } from "../events/eventsCenter"; + +export default class GameOver extends Phaser.Scene { + fpsText: FpsText; + + constructor() { + super({ key: "GameOver" }); + } + + create() { + this.scene.stop("game-ui"); + + this.fpsText = new FpsText(this); + const background = this.add.image( + this.cameras.main.width / 2, + this.cameras.main.height / 2, + "background" + ); + let X = this.cameras.main.width / background.width; + let Y = this.cameras.main.height / background.height; + let scale = Math.max(X, Y); + background.setScale(scale).setScrollFactor(0); + background.setDepth(0); + + this.add + .rectangle( + this.cameras.main.width / 2, + this.cameras.main.height / 2, + this.cameras.main.width, + this.cameras.main.height, + 0x000000, + 0.8 + ) + .setOrigin(0.5) + .setDepth(999); + + this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 3, + "Game Over", + { + fontSize: "35px", + fontFamily: "Academy Engraved LET", + strokeThickness: 6, + stroke: "0xffffff", + shadow: { + color: "#FF0000", + fill: true, + offsetX: 3, + offsetY: 3, + blur: 4, + stroke: false, + }, + //strokeAlpha: 1 + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const retry = this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 1.5 - 40, + "Retry", + { + fontSize: "22px", + fontFamily: "Academy Engraved LET", + strokeThickness: 4, + stroke: "0xffffff", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + retry.setInteractive(); + retry.on("pointerover", () => { + retry.setFontSize("25px"); + retry.setShadow(1, 1, "#FFD300", 3, false, true); + }); + retry.on("pointerout", () => { + retry.setFontSize("22px"); + retry.setShadow(undefined); + }); + retry.on("pointerdown", () => { + this.scene.start("tutorial"); + sceneEvents.emit("gameRetry"); + }); + + const goTitle = this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 1.5, + "Return to Title", + { + fontSize: "22px", + fontFamily: "Academy Engraved LET", + strokeThickness: 4, + stroke: "0xffffff", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + goTitle.setInteractive(); + goTitle.on("pointerover", () => { + goTitle.setFontSize("25px"); + goTitle.setShadow(1, 1, "#FFD300", 3, false, true); + }); + goTitle.on("pointerout", () => { + goTitle.setFontSize("22px"); + goTitle.setShadow(undefined); + }); + goTitle.on("pointerdown", () => { + this.scene.stop(); + this.scene.stop("mainScene"); + this.scene.stop("game-ui"); + this.scene.start("TitleScene"); + sceneEvents.emit("gameRetry"); + }); + + this.add.image(0, 0, "base_tiles"); + const map = this.make.tilemap({ key: "tilemap" }); + const tileset = map.addTilesetImage( + "dungeon", + "base_tiles", + 16, + 16 + ) as Phaser.Tilemaps.Tileset; + + map.createLayer("ground", tileset); + map.createLayer("wall", tileset) as Phaser.Tilemaps.TilemapLayer; + map.createLayer("door", tileset) as Phaser.Tilemaps.TilemapLayer; + } + + update() { + this.fpsText.update(); + } +} diff --git a/src/scenes/GameUI.ts b/src/scenes/GameUI.ts new file mode 100644 index 00000000..778b6948 --- /dev/null +++ b/src/scenes/GameUI.ts @@ -0,0 +1,247 @@ +import Phaser from "phaser"; +import { sceneEvents } from "../events/eventsCenter"; + +export default class GameUI extends Phaser.Scene { + private hp: number; + private threads: number; + private weaponType: string; + + private hearts: Phaser.GameObjects.Group; + private weaponBox: Phaser.GameObjects.Image; + private sword: Phaser.GameObjects.Image; + private bow: Phaser.GameObjects.Sprite; + + private swordStatus: string[]; + private bowStatus: string[]; + + private swordDamage: Phaser.GameObjects.Text; + private swordSpeed: Phaser.GameObjects.Text; + private swordType: Phaser.GameObjects.Text; + private bowDamage: Phaser.GameObjects.Text; + private bowSpeed: Phaser.GameObjects.Text; + private bowType: Phaser.GameObjects.Text; + + constructor() { + super({ key: "game-ui" }); + this.swordStatus = []; + this.bowStatus = []; + } + + init(data: { + hp: number; + threads: number; + weaponType: string; + swordStatus: string[]; + bowStatus: string[]; + }) { + this.hp = data.hp; + this.threads = data.threads; + this.weaponType = data.weaponType; + this.swordStatus = data.swordStatus; + this.bowStatus = data.bowStatus; + } + + create() { + this.hearts = this.add.group({ classType: Phaser.GameObjects.Image }); + this.hearts.createMultiple({ + key: "heart-full", + setXY: { + x: 30, + y: 30, + stepX: 16, + }, + quantity: 3, + }); + + if (this.hp < 3) { + this.hearts.children.each((go, idx) => { + const heart = go as Phaser.GameObjects.Image; + if (idx < this.hp) { + heart.setTexture("heart-full"); + } else { + heart.setTexture("heart-empty"); + } + return true; + }); + } + + this.add.image(30, 50, "threads"); + this.add.text(40, 41, `${this.threads}`, { + fontSize: "12px", + fontFamily: "Academy Engraved LET", + strokeThickness: 2, + stroke: "0xffffff", + }); + + this.weaponBox = this.add.image( + this.cameras.main.width - 40, + 38, + "weaponBox" + ); + this.weaponBox.setScale(0.01, 0.01); + + this.sword = this.add.image(this.cameras.main.width - 40, 38, "sword"); + this.bow = this.add.sprite( + this.cameras.main.width - 38, + 39, + "bow", + "Bow-1.png" + ); + + this.swordDamage = this.add.text( + this.cameras.main.width - 135, + 15, + `Damage: ${this.swordStatus[0]}`, + { + fontSize: "12px", + fontFamily: "Academy Engraved LET", + strokeThickness: 2, + stroke: "0xffffff", + } + ); + + this.swordSpeed = this.add.text( + this.cameras.main.width - 135, + 30, + `Speed: ${this.swordStatus[1]}`, + { + fontSize: "12px", + fontFamily: "Academy Engraved LET", + strokeThickness: 2, + stroke: "0xffffff", + } + ); + + this.swordType = this.add.text( + this.cameras.main.width - 135, + 45, + `Type: ${this.swordStatus[2]}`, + { + fontSize: "12px", + fontFamily: "Academy Engraved LET", + strokeThickness: 2, + stroke: "0xffffff", + } + ); + + this.bowDamage = this.add.text( + this.cameras.main.width - 135, + 15, + `Damage: ${this.bowStatus[0]}`, + { + fontSize: "12px", + fontFamily: "Academy Engraved LET", + strokeThickness: 2, + stroke: "0xffffff", + } + ); + + this.bowSpeed = this.add.text( + this.cameras.main.width - 135, + 30, + `Speed: ${this.bowStatus[1]}`, + { + fontSize: "12px", + fontFamily: "Academy Engraved LET", + strokeThickness: 2, + stroke: "0xffffff", + } + ); + + this.bowType = this.add.text( + this.cameras.main.width - 135, + 45, + `Type: ${this.bowStatus[2]}`, + { + fontSize: "12px", + fontFamily: "Academy Engraved LET", + strokeThickness: 2, + stroke: "0xffffff", + } + ); + + if (this.weaponType === "sword") { + this.sword.setVisible(true); + this.bow.setVisible(false); + + this.swordDamage.setVisible(true); + this.swordSpeed.setVisible(true); + this.swordType.setVisible(true); + this.bowDamage.setVisible(false); + this.bowSpeed.setVisible(false); + this.bowType.setVisible(false); + } else if (this.weaponType === "bow") { + this.bow.setVisible(true); + this.sword.setVisible(false); + + this.swordDamage.setVisible(false); + this.swordSpeed.setVisible(false); + this.swordType.setVisible(false); + this.bowDamage.setVisible(true); + this.bowSpeed.setVisible(true); + this.bowType.setVisible(true); + } + + sceneEvents.on( + "player-health-changed", + this.handlePlayerHealthChanged, + this + ); + + sceneEvents.on( + "player-weapon-changed", + this.handlePlayerWeaponChanged, + this + ); + + sceneEvents.on( + "weapon-status-update", + (data: { swordStatus: string[]; bowStatus: string[] }) => { + this.handleWeaponUpdated(data.swordStatus, data.bowStatus); + }, + this + ); + } + + private handlePlayerHealthChanged(health: number) { + this.hearts.children.each((go, idx) => { + const heart = go as Phaser.GameObjects.Image; + if (idx < health) { + heart.setTexture("heart-full"); + } else { + heart.setTexture("heart-empty"); + } + return true; + }); + } + + private handlePlayerWeaponChanged(weaponType: string) { + if (weaponType === "sword") { + this.sword.setVisible(true); + this.bow.setVisible(false); + this.swordDamage.setVisible(true); + this.swordSpeed.setVisible(true); + this.swordType.setVisible(true); + this.bowDamage.setVisible(false); + this.bowSpeed.setVisible(false); + this.bowType.setVisible(false); + } else if (weaponType === "bow") { + this.bow.setVisible(true); + this.sword.setVisible(false); + this.swordDamage.setVisible(false); + this.swordSpeed.setVisible(false); + this.swordType.setVisible(false); + this.bowDamage.setVisible(true); + this.bowSpeed.setVisible(true); + this.bowType.setVisible(true); + } + } + private handleWeaponUpdated(swordStatus: string[], bowStatus: string[]) { + this.swordDamage.setText(`Damage: ${swordStatus[0]}`); + this.swordSpeed.setText(`Speed: ${swordStatus[1]}`); + this.swordType.setText(`Type: ${swordStatus[2]}`); + this.bowDamage.setText(`Damage: ${bowStatus[0]}`); + this.bowSpeed.setText(`Speed: ${bowStatus[1]}`); + this.bowType.setText(`Type: ${bowStatus[2]}`); + } +} diff --git a/src/scenes/Instructions.ts b/src/scenes/Instructions.ts new file mode 100644 index 00000000..32b5a59e --- /dev/null +++ b/src/scenes/Instructions.ts @@ -0,0 +1,246 @@ +import Phaser from "phaser"; +import { sceneEvents } from "../events/eventsCenter"; + +export default class MazeMap extends Phaser.Scene { + private ariadne: Phaser.GameObjects.Image; + private textBox: Phaser.GameObjects.Rectangle; + private currentIndex: number; + private ariadneText: Phaser.GameObjects.Text; + private ariadneTextOptions: string[]; + private nextButton: Phaser.GameObjects.Image; + private prevButton: Phaser.GameObjects.Image; + private bowAndItemGet = false; + private instructionEnd = false; + + constructor() { + super({ key: "instructions" }); + } + + init(data: { currentIndex: number }) { + this.currentIndex = data.currentIndex; + } + + create() { + this.ariadneTextOptions = [ + "Thank goodness you came Theseus!", + "The minotaur at the center of the maze has been plaguing my people for years.", + "If you were able to make it to the center of the maze and defeat the minotaur, you would be the hero of Crete!", + "I got this bow and item for you.", + "Oh, you don't know how to use it?\nDon't worry it's not that hard.", + "I gave you an item that can increase the damage of bow, so let's try using it.", + "Try pressing E once to see what you have!", + "If you drag item in the box below, it will show you a box where you can write some code to upgrade your weapon.", + "First, we should get bow from theseus file to upgrade it.", + "Try clicking the arrow button on the top so that you can look through theseus file.", + "We can find lots of code, but we need only one, getBow(), to use our item.", + "Let's type it to the box!\nDon't forget you need a dot before to use code.", + "Okay! Then we need another code that can access to the damage of the bow.", + "Let's move to bow file.", + "As you can see, there is incDamage() code that will increase the damage of the bow.", + "Let's return to main file and write the code.\nAgain, don't forget you need a dot before to use code.", + "If you press ENTER key.... \nitem should be successfully used!", + "If it did not, try going back the dialogues and write it again.", + "It seems you're ready... Good Luck Theseus!", + ]; + + this.ariadne = this.add + .image( + this.cameras.main.width - 50, + this.cameras.main.height - 120, + "Ariadne" + ) + .setDepth(1000); + + this.textBox = this.add + .rectangle( + this.cameras.main.width / 2, + this.cameras.main.height * 0.85 - 60, + this.cameras.main.width * 0.9, + this.cameras.main.height * 0.2, + 0x000000, + 0.7 + ) + .setOrigin(0.5) + .setDepth(999); + + this.ariadneText = this.add + .text( + this.cameras.main.width * 0.1, + this.cameras.main.height * 0.8 - 60, + this.ariadneTextOptions[this.currentIndex], + { + fontSize: "12px", + fontFamily: "American Typewriter", + color: "#fff", + wordWrap: { width: this.cameras.main.width * 0.7 }, + } + ) + .setDepth(1000); + + this.nextButton = this.add + .image( + this.cameras.main.width * 0.8, + this.cameras.main.height * 0.9 - 60, + "next-button" + ) + .setDepth(1000); + + this.nextButton.setInteractive(); + + this.nextButton.on("pointerdown", this.handleNextText, this); + + this.nextButton.on("pointerover", () => { + this.input.setDefaultCursor("pointer"); + this.nextButton.setScale(1.2); + }); + this.nextButton.on("pointerout", () => { + this.input.setDefaultCursor("default"); + this.nextButton.setScale(); + }); + + this.prevButton = this.add + .image( + this.cameras.main.width * 0.77, + this.cameras.main.height * 0.9 - 60, + "next-button" + ) + .setDepth(1000); + this.prevButton.scaleX = -1; + + this.prevButton.setInteractive(); + + this.prevButton.on("pointerdown", this.handlePrevText, this); + + this.prevButton.on("pointerover", () => { + this.input.setDefaultCursor("pointer"); + this.prevButton.setScale(1.2); + this.prevButton.scaleX = -1; + }); + this.prevButton.on("pointerout", () => { + this.input.setDefaultCursor("default"); + this.prevButton.setScale(); + this.prevButton.scaleX = -1; + }); + + this.events.on("shutdown", () => { + sceneEvents.emit("update-index", this.currentIndex); + }); + + this.events.once("item-setup", () => { + this.nextButton + .setActive(this.bowAndItemGet) + .setVisible(this.bowAndItemGet); + this.prevButton + .setActive(this.bowAndItemGet) + .setVisible(this.bowAndItemGet); + }); + + sceneEvents.on("bowItemGet", () => { + this.nextButton.setActive(true).setVisible(true); + this.prevButton.setActive(true).setVisible(true); + this.bowAndItemGet = true; + }); + + sceneEvents.on("ready", () => { + this.instructionEnd = true; + }); + + sceneEvents.on("not-main", this.handleTextbox, this); + sceneEvents.on("in-main", this.handleMainTextbox, this); + } + + private handleNextText() { + if (this.currentIndex === 2) { + sceneEvents.emit("bowAndItem"); + this.events.emit("item-setup"); + } + this.currentIndex++; + if (this.currentIndex < this.ariadneTextOptions.length) { + this.ariadneText.setText( + this.ariadneTextOptions[this.currentIndex] + ); + } else { + if (this.instructionEnd) { + this.ariadneText.setVisible(false); + this.ariadne.setVisible(false); + this.textBox.setVisible(false); + this.prevButton.setActive(false).setVisible(false); + this.nextButton.setActive(false).setVisible(false); + } + this.currentIndex = this.ariadneTextOptions.length - 1; + } + } + + private handlePrevText() { + this.currentIndex--; + if (this.currentIndex >= 0) { + this.ariadneText.setText( + this.ariadneTextOptions[this.currentIndex] + ); + } else { + this.currentIndex = 0; + } + } + + private handleTextbox() { + this.ariadne.setPosition( + this.cameras.main.width - 50, + this.cameras.main.height - 260 + ); + this.textBox + .setPosition( + (this.cameras.main.width * 3) / 5 + 50, + this.cameras.main.height * 0.85 - 200 + ) + .setSize( + this.cameras.main.width * 0.5, + this.cameras.main.height * 0.4 + ); + this.ariadneText + .setPosition( + this.cameras.main.width * 0.5 - 10, + this.cameras.main.height * 0.8 - 220 + ) + .setStyle({ + wordWrap: { width: this.cameras.main.width * 0.4 - 20 }, + }); + this.nextButton.setPosition( + this.ariadne.x + 8, + this.cameras.main.height * 0.9 - 180 + ); + this.prevButton.setPosition( + this.ariadne.x - 12, + this.cameras.main.height * 0.9 - 180 + ); + } + + private handleMainTextbox() { + this.ariadne.setPosition( + this.cameras.main.width - 50, + this.cameras.main.height - 120 + ); + this.textBox + .setPosition( + this.cameras.main.width / 2, + this.cameras.main.height * 0.85 - 60 + ) + .setSize( + this.cameras.main.width * 0.9, + this.cameras.main.height * 0.2 + ); + this.ariadneText + .setPosition( + this.cameras.main.width * 0.1, + this.cameras.main.height * 0.8 - 60 + ) + .setStyle({ wordWrap: { width: this.cameras.main.width * 0.7 } }); + this.nextButton.setPosition( + this.cameras.main.width * 0.8, + this.cameras.main.height * 0.9 - 60 + ); + this.prevButton.setPosition( + this.cameras.main.width * 0.77, + this.cameras.main.height * 0.9 - 60 + ); + } +} diff --git a/src/scenes/MinotaurRoom.ts b/src/scenes/MinotaurRoom.ts new file mode 100644 index 00000000..540febf1 --- /dev/null +++ b/src/scenes/MinotaurRoom.ts @@ -0,0 +1,379 @@ +import Phaser from "phaser"; +import { debugDraw } from "../utils/debug"; +import { createMinotaurAnims } from "../anims/minotaurAnims"; +import { createTheseusAnims } from "../anims/theseusAnims"; +import { createWeaponsAnims } from "../anims/weaponsAnims"; +import minotaur from "../enemies/minotaur"; +import Minotaur from "../enemies/minotaur"; +import "../enemies/minotaur"; +import "../player/theseus"; +import Theseus from "../player/theseus"; +import { sceneEvents } from "../events/eventsCenter"; + +export type Collidable = + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile; + +export default class MinotaurRoom extends Phaser.Scene { + private theseus?: Theseus; + private map: Phaser.Tilemaps.Tilemap; + private cursors?: Phaser.Types.Input.Keyboard.CursorKeys; + private minotaur?: Phaser.Physics.Arcade.Group; + private playerEnemyCollider?: Phaser.Physics.Arcade.Collider; + private hp: number; + private threads: number; + private weapon: string; + private itemList: string[]; + private updateCodeList: string[] | undefined; + private upgrades = 0; + private isEasyMode: boolean; + private swordStatus: string[]; + private bowStatus: string[]; + + // private healthBar: Phaser.GameObjects.Graphics; + + private dropList = [ + { item: "sword-damage-up", weight: 15 }, + { item: "sword-speed-up", weight: 15 }, + { item: "sword-fire", weight: 10 }, + { item: "sword-ice", weight: 10 }, + { item: "bow-damage-up", weight: 15 }, + { item: "bow-speed-up", weight: 15 }, + { item: "bow-poison", weight: 10 }, + { item: "bow-triple", weight: 10 }, + ]; + + constructor() { + super({ key: "minotaur" }); + } + + init(data: { + hp: number; + threads: number; + weaponType: string; + itemList: string[]; + updateCodeList: string[]; + swordStatus: string[]; + bowStatus: string[]; + isEasyMode: boolean; + }) { + this.hp = data.hp; + this.threads = data.threads; + this.weapon = data.weaponType; + this.itemList = data.itemList; + this.updateCodeList = data.updateCodeList; + this.swordStatus = data.swordStatus; + this.bowStatus = data.bowStatus; + this.isEasyMode = data.isEasyMode; + } + + create() { + this.scene.run("game-ui", { + hp: this.theseus?.health, + threads: this.threads, + weaponType: this.theseus?.weaponType, + swordStatus: this.swordStatus, + bowStatus: this.bowStatus, + }); + createTheseusAnims(this.anims); + createMinotaurAnims(this.anims); + createWeaponsAnims(this.anims); + + this.cursors = + this.input.keyboard?.createCursorKeys() as Phaser.Types.Input.Keyboard.CursorKeys; + + this.input.setDefaultCursor("crosshair"); + + this.add.image(0, 0, "base_tiles"); + this.map = this.make.tilemap({ key: "tilemap" }); + const tileset = this.map.addTilesetImage( + "dungeon", + "base_tiles", + 16, + 16 + ) as Phaser.Tilemaps.Tileset; + + this.map.createLayer("ground", tileset); + const wallsLayer = this.map.createLayer( + "minotaur-wall", + tileset + ) as Phaser.Tilemaps.TilemapLayer; + this.map.createLayer("minotaur-objects", tileset); + + wallsLayer.setCollisionByProperty({ collides: true }, true); + + debugDraw(wallsLayer, this, false); + + this.theseus = this.add.theseus( + this.cameras.main.width * 0.5, + this.cameras.main.height * 0.9, + "faune" + ); + this.theseus.health = this.hp; + this.theseus.weaponType = this.weapon; + this.theseus.anims.play("faune-idle-up"); + + this.theseus.getSword.damage = parseInt(this.swordStatus[0]); + this.theseus.getSword.speed = parseInt(this.swordStatus[1]); + this.theseus.getSword.attackType = this.swordStatus[2]; + + this.theseus.getBow.damage = parseInt(this.bowStatus[0]); + this.theseus.getBow.speed = parseInt(this.bowStatus[1]); + this.theseus.getBow.attackType = this.bowStatus[2]; + + this.minotaur = this.physics.add.group({ + classType: Minotaur, + }); + + this.minotaur.get( + this.cameras.main.width * 0.5, + this.cameras.main.height * 0.3, + "minotaur" + ); + + this.minotaur.children.iterate((c) => { + const minotaur = c as Minotaur; + minotaur.setTarget(this.theseus!); + minotaur.setEasyMode = this.isEasyMode; + if (this.isEasyMode) { + minotaur.updateStatus(50, 300); + } + minotaur.body?.setSize(minotaur.width * 0.3, minotaur.height * 0.7); + minotaur.setOrigin(0.5); + return true; + }); + + // this.createHealthBar(); + + this.physics.add.collider(this.theseus, wallsLayer); + + this.physics.add.collider(this.minotaur, wallsLayer); + + this.physics.add.collider(this.minotaur, this.minotaur); + + this.playerEnemyCollider = this.physics.add.collider( + this.minotaur, + this.theseus, + this.handlePlayerEnemyCollision, + undefined, + this + ); + + this.events.on( + "swordSlashCreated", + (swordSlash: Phaser.Types.Physics.Arcade.SpriteWithDynamicBody) => { + if (this.minotaur) { + this.physics.add.collider( + swordSlash, + this.minotaur, + this.handleEnemySwordAttacked, + undefined, + this + ); + } + } + ); + + this.events.on( + "arrowCreated", + (arrow: Phaser.Types.Physics.Arcade.SpriteWithDynamicBody) => { + if (this.minotaur) { + this.physics.add.collider( + arrow, + this.minotaur, + this.handleEnemyBowAttacked, + undefined, + this + ); + } + } + ); + + sceneEvents.on("gameRetry", () => { + if (!this.theseus) { + return; + } + this.theseus.health = this.hp; + this.threads = 3; + }); + + this.input.keyboard?.on("keydown-ESC", () => { + this.scene.pause(); + this.scene.run("pause", { currentScene: "minotaur" }); + }); + + this.input.keyboard?.on("keydown-E", () => { + let tempList: string[] = []; + if (this.updateCodeList != undefined) { + tempList = this.updateCodeList; + } + this.scene.pause(); + this.scene.run("weapon-design", { + from: "minotaur", + itemList: this.itemList, + updateCodeList: tempList, + }); + }); + + this.events.on("weapon-updated", this.handleWeaponUpdated, this); + + this.events.on( + "resume", + ( + scene: this, + data: { + previous: string; + updatedList: string[]; + updateCodeList: string[]; + upgradeList: string[]; + } + ) => { + if (data.previous === "pause") { + return; + } + this.itemList = data.updatedList; + this.updateCodeList = data.updateCodeList; + if (this.upgrades < data.upgradeList.length) { + this.handleWeaponUpdated(data.upgradeList); + } + } + ); + } + + private handlePlayerEnemyCollision( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const minotaur = obj2 as Minotaur; + + const dx = this.theseus!.x - minotaur.x; + const dy = this.theseus!.y - minotaur.y; + + const dir = new Phaser.Math.Vector2(dx, dy).normalize().scale(100); + + this.theseus?.handleDamage(dir); + + sceneEvents.emit("player-health-changed", this.theseus?.health); + + this.events.on(Phaser.Scenes.Events.SHUTDOWN, () => { + sceneEvents.off( + "player-health-changed", + this.handlePlayerEnemyCollision, + this + ); + }); + + if (this.theseus?.gameOVer) { + this.time.delayedCall(1000, () => { + this.scene.start("GameOver"); + }); + } + } + + private handleEnemySwordAttacked( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const minotaur = obj2 as Minotaur; + const swordSlash = + obj1 as Phaser.Types.Physics.Arcade.SpriteWithDynamicBody; + this.events.emit("swordSlashHit", swordSlash); + + if (this.theseus?.getWeapon) { + minotaur.handleDamage( + this.theseus.getWeapon.damage, + this.theseus.getWeapon.attackType + ); + } + } + + private handleEnemyBowAttacked( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const minotaur = obj2 as minotaur; + const arrow = obj1 as Phaser.Types.Physics.Arcade.SpriteWithDynamicBody; + this.events.emit("arrowHit", arrow); + + if (this.theseus?.getWeapon) { + minotaur.handleDamage( + this.theseus.getWeapon.damage, + this.theseus.getWeapon.attackType + ); + } + } + + private handleWeaponUpdated(upgradeList: string[]) { + upgradeList.forEach((text: string, index: number) => { + if (!this.theseus) { + return; + } + if (index >= this.upgrades) { + if (text === "sword-fire") { + this.theseus.getSword.attackType = "fire"; + } else if (text === "sword-ice") { + this.theseus.getSword.attackType = "ice"; + } else if (text === "sword-damage-up") { + this.theseus.getSword.incDamage(); + } else if (text === "sword-speed-up") { + this.theseus.getSword.incSpeed(); + } else if (text === "bow-poison") { + this.theseus.getBow.attackType = "poison"; + } else if (text === "bow-triple") { + this.theseus.getBow.attackType = "triple"; + } else if (text === "bow-damage-up") { + this.theseus.getBow.incDamage(); + } else if (text === "bow-speed-up") { + this.theseus.getBow.incSpeed(); + } + this.upgrades++; + } + }); + console.log( + "sword", + this.theseus?.getSword.damage, + this.theseus?.getSword.attackType, + this.theseus?.getSword.speed, + "\nbow", + this.theseus?.getBow.damage, + this.theseus?.getBow.attackType, + this.theseus?.getBow.speed, + "\nupgrades", + this.upgrades, + upgradeList + ); + } + + update() { + const enemyRemained = this.minotaur?.getChildren(); + if (enemyRemained!.length === 0) { + this.time.delayedCall(1000, () => { + this.scene.start("GameClear"); + }); + } + + if (this.theseus) { + this.theseus.update(this.cursors!); + } + + if (this.minotaur) { + this.minotaur.children.iterate((c) => { + const minotaur = c as minotaur; + minotaur.update(); + return true; + }); + } + } +} diff --git a/src/scenes/Pause.ts b/src/scenes/Pause.ts new file mode 100644 index 00000000..7cd8d62d --- /dev/null +++ b/src/scenes/Pause.ts @@ -0,0 +1,115 @@ +import Phaser from "phaser"; +import { sceneEvents } from "../events/eventsCenter"; + +export default class Pause extends Phaser.Scene { + private previous: string; + + constructor() { + super({ key: "pause" }); + } + + init(data: { currentScene: string }) { + this.previous = data.currentScene; + } + + create() { + this.add + .rectangle( + this.cameras.main.width / 2, + this.cameras.main.height / 2, + this.cameras.main.width, + this.cameras.main.height, + 0x000000, + 0.7 + ) + .setOrigin(0.5) + .setDepth(999); + + this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 3, + "Paused", + { + fontSize: "35px", + fontFamily: "Academy Engraved LET", + strokeThickness: 6, + stroke: "0xffffff", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const resume = this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 1.5 - 40, + "Resume", + { + fontSize: "15px", + fontFamily: "Academy Engraved LET", + strokeThickness: 4, + stroke: "0xffffff", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + resume.setInteractive(); + resume.on("pointerover", () => { + resume.setFontSize("17px"); + resume.setShadow(1, 1, "#FFD300", 3, false, true); + }); + resume.on("pointerout", () => { + resume.setFontSize("15px"); + resume.setShadow(undefined); + }); + resume.on("pointerdown", () => { + this.scene.stop(); + this.scene.resume(this.previous, { previous: "pause" }); + }); + + const restart = this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 1.5, + "Quit the Game", + { + fontSize: "15px", + fontFamily: "Academy Engraved LET", + strokeThickness: 4, + stroke: "0xffffff", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + restart.setInteractive(); + restart.on("pointerover", () => { + restart.setFontSize("17px"); + restart.setShadow(1, 1, "#FFD300", 3, false, true); + }); + restart.on("pointerout", () => { + restart.setFontSize("15px"); + restart.setShadow(undefined); + }); + restart.on("pointerdown", () => { + this.scene.stop(); + if (this.previous === "mainScene") { + this.scene.stop("mainScene"); + } else if (this.previous === "tutorial") { + this.scene.stop("tutorial"); + } else if (this.previous === "minotaur") { + this.scene.stop("minotaur"); + } + this.scene.stop("game-ui"); + this.scene.start("TitleScene"); + sceneEvents.emit("gameRetry"); + }); + + this.input.keyboard?.on("keydown-ESC", () => { + this.scene.stop(); + this.scene.resume(this.previous, { previous: "pause" }); + }); + } +} diff --git a/src/scenes/TitleScene.ts b/src/scenes/TitleScene.ts new file mode 100644 index 00000000..8fa1b137 --- /dev/null +++ b/src/scenes/TitleScene.ts @@ -0,0 +1,135 @@ +import Phaser from "phaser"; +//import PhaserLogo from "../objects/phaserLogo"; +import FpsText from "../objects/fpsText"; +//import PreloadScene from "./preloadScene"; +//background image by rawpixel.com +//audio for title scene by Darren Curtis +//Music by OB-LIX from Pixabay +export default class TitleScene extends Phaser.Scene { + fpsText: FpsText; + + constructor() { + super({ key: "TitleScene" }); + } + + create() { + this.fpsText = new FpsText(this); + const background = this.add.image( + this.cameras.main.width / 2, + this.cameras.main.height / 2, + "background" + ); + let X = this.cameras.main.width / background.width; + let Y = this.cameras.main.height / background.height; + let scale = Math.max(X, Y); + background.setScale(scale).setScrollFactor(0); + background.setDepth(0); + + this.add + .rectangle( + this.cameras.main.width / 2, + this.cameras.main.height / 2, + this.cameras.main.width, + this.cameras.main.height, + 0x000000, + 0.4 + ) + .setOrigin(0.5) + .setDepth(999); + + this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 3, + "Infamia di Creti", + { + fontSize: "35px", + fontFamily: "Academy Engraved LET", + strokeThickness: 6, + stroke: "0xffffff", + //strokeAlpha: 1 + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const easyMode = this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 1.5 - 20, + "Easy Mode", + { + fontSize: "20px", + fontFamily: "Academy Engraved LET", + strokeThickness: 4, + stroke: "0xffffff", + //strokeAlpha: 1 + } + ) + .setOrigin(0.5) + .setDepth(1000); + + easyMode.setInteractive(); + easyMode.on("pointerdown", () => + this.scene.start("tutorial", { isEasyMode: true }) + ); + + easyMode.on("pointerover", () => { + easyMode.setScale(1.1); + }); + easyMode.on("pointerout", () => { + easyMode.setScale(); + }); + + const hardMode = this.add + .text( + this.cameras.main.width / 2, + this.cameras.main.height / 1.5 + 20, + "Hard Mode", + { + fontSize: "20px", + fontFamily: "Academy Engraved LET", + strokeThickness: 4, + stroke: "0xffffff", + //strokeAlpha: 1 + } + ) + .setOrigin(0.5) + .setDepth(1000); + + hardMode.setInteractive(); + hardMode.on("pointerdown", () => + this.scene.start("tutorial", { isEasyMode: false }) + ); + + hardMode.on("pointerover", () => { + hardMode.setScale(1.1); + }); + hardMode.on("pointerout", () => { + hardMode.setScale(); + }); + + this.add.image(0, 0, "base_tiles"); + const map = this.make.tilemap({ key: "tilemap" }); + const tileset = map.addTilesetImage( + "dungeon", + "base_tiles", + 16, + 16 + ) as Phaser.Tilemaps.Tileset; + + map.createLayer("ground", tileset); + map.createLayer("wall", tileset) as Phaser.Tilemaps.TilemapLayer; + map.createLayer("door-open", tileset) as Phaser.Tilemaps.TilemapLayer; + + let music = this.sound.add("titleScene"); + music.loop = true; + music.play(); + music.setVolume(1); + } + + update() { + this.fpsText.update(); + } +} diff --git a/src/scenes/Tutorial.ts b/src/scenes/Tutorial.ts new file mode 100644 index 00000000..04026817 --- /dev/null +++ b/src/scenes/Tutorial.ts @@ -0,0 +1,634 @@ +//https://despairparty.itch.io/rpgmaker-spriteface +//https://pogutatar.itch.io/pixel-button-pack-by-pogutatar +import Phaser from "phaser"; +import { debugDraw } from "../utils/debug"; +import { createTheseusAnims } from "../anims/theseusAnims"; +import { createWeaponsAnims } from "../anims/weaponsAnims"; +import "../player/theseus"; +import Theseus from "../player/theseus"; +import "../weapons/bow"; + +import { sceneEvents } from "../events/eventsCenter"; + +export default class Tutorial extends Phaser.Scene { + private cursors?: Phaser.Types.Input.Keyboard.CursorKeys; + private theseus?: Theseus; + private doorOpened: Phaser.Tilemaps.TilemapLayer; + private doorLayer: Phaser.Tilemaps.TilemapLayer; + private swordStatus: string[]; + private bowStatus: string[]; + + private itemList: string[]; + private updateCodeList: string[] | undefined; + private upgrades = 0; + private isEasyMode: boolean; + private isSkipped = false; + + private ariadne: Phaser.GameObjects.Image; + private textBox: Phaser.GameObjects.Rectangle; + private currentIndex: number; + private ariadneText: Phaser.GameObjects.Text; + private ariadneTextOptions: string[]; + private nextButton: Phaser.GameObjects.Image; + private prevButton: Phaser.GameObjects.Image; + private skipButton: Phaser.GameObjects.Text; + + constructor() { + super({ key: "tutorial" }); + this.swordStatus = []; + this.bowStatus = []; + this.itemList = []; + this.updateCodeList = []; + this.ariadneTextOptions = [ + "Thank goodness you came Theseus!", + "The minotaur at the center of the maze has been plaguing my people for years.", + "If you were able to make it to the center of the maze and defeat the minotaur, you would be the hero of Crete!", + "I got this bow and item for you.", + "Oh, you don't know how to use it?\nDon't worry it's not that hard.", + "I gave you an item that can increase the damage of bow, so let's try using it.", + "Try pressing E once to see what you have!", + "If you drag item in the box below, it will show you a box where you can write some code to upgrade your weapon.", + "First, we should get bow from theseus file to upgrade it.", + "Try clicking the arrow button on the top so that you can look through theseus file.", + "We can find lots of code, but we need only one, getBow(), to use our item.", + "Let's type it to the box!\nDon't forget you need a dot before to use code.", + "Okay! Then we need another code that can access to the damage of the bow.", + "Let's move to bow file.", + "As you can see, there is incDamage() code that will increase the damage of the bow.", + "Let's return to main file and write the code.\nAgain, don't forget you need a dot before to use code.", + "If you press ENTER key.... \nitem should be successfully used!", + "If it did not, try going back the dialogues and write it again.", + "It seems you're ready... Good Luck Theseus!", + ]; + } + + init(data: { isEasyMode: boolean }) { + this.isEasyMode = data.isEasyMode; + } + + create() { + createTheseusAnims(this.anims); + createWeaponsAnims(this.anims); + + this.cursors = + this.input.keyboard?.createCursorKeys() as Phaser.Types.Input.Keyboard.CursorKeys; + + this.input.setDefaultCursor("crosshair"); + + this.add.image(0, 0, "base_tiles"); + const map = this.make.tilemap({ key: "tilemap" }); + const tileset = map.addTilesetImage( + "dungeon", + "base_tiles", + 16, + 16 + ) as Phaser.Tilemaps.Tileset; + + map.createLayer("ground", tileset); + const wallsLayer = map.createLayer( + "wall", + tileset + ) as Phaser.Tilemaps.TilemapLayer; + map.createLayer("objects", tileset); + this.doorOpened = map.createLayer( + "door-open", + tileset + ) as Phaser.Tilemaps.TilemapLayer; + this.doorLayer = map.createLayer( + "door", + tileset + ) as Phaser.Tilemaps.TilemapLayer; + + wallsLayer.setCollisionByProperty({ collides: true }, true); + this.doorLayer.setCollisionByProperty({ collides: true }, true); + + debugDraw(wallsLayer, this, false); + debugDraw(this.doorLayer, this, false); + + this.theseus = this.add.theseus( + this.cameras.main.width * 0.5, + this.cameras.main.height * 0.7, + "faune" + ); + this.theseus.canUseBow = false; + + this.physics.add.overlap( + this.theseus, + this.doorOpened, + this.handleEnterDoor, + undefined, + this + ); + + this.physics.add.collider(this.theseus, wallsLayer); + this.physics.add.collider(this.theseus, this.doorLayer); + + this.swordStatus.push(this.theseus.getSword.damage.toString()); + this.swordStatus.push(this.theseus.getSword.speed.toString()); + this.swordStatus.push(this.theseus.getSword.attackType); + this.bowStatus.push(this.theseus.getBow.damage.toString()); + this.bowStatus.push(this.theseus.getBow.speed.toString()); + this.bowStatus.push(this.theseus.getBow.attackType); + + this.currentIndex = 0; + + this.time.delayedCall(1000, () => { + if (!this.theseus) { + return; + } + this.swordStatus = []; + this.bowStatus = []; + this.swordStatus.push(this.theseus.getSword.damage.toString()); + this.swordStatus.push(this.theseus.getSword.speed.toString()); + this.swordStatus.push(this.theseus.getSword.attackType); + this.bowStatus.push(this.theseus.getBow.damage.toString()); + this.bowStatus.push(this.theseus.getBow.speed.toString()); + this.bowStatus.push(this.theseus.getBow.attackType); + this.scene.run("game-ui", { + hp: this.theseus.health, + threads: 3, + weaponType: this.theseus.weaponType, + swordStatus: this.swordStatus, + bowStatus: this.bowStatus, + }); + }); + + this.skipButton = this.add + .text( + this.cameras.main.width * 0.79, + this.cameras.main.height * 0.78, + "skip", + { + fontFamily: "American Typewriter", + fontSize: "12px", + } + ) + .setDepth(1000) + .setInteractive() + .setOrigin(0.5); + + this.skipButton.on("pointerdown", this.handleSkipText, this); + + this.skipButton.on("pointerover", () => { + this.input.setDefaultCursor("pointer"); + this.skipButton.setScale(1.1); + }); + this.skipButton.on("pointerout", () => { + this.input.setDefaultCursor("crosshair"); + this.skipButton.setScale(); + }); + + this.nextButton = this.add + .image( + this.cameras.main.width * 0.8, + this.cameras.main.height * 0.9, + "next-button" + ) + .setDepth(1000); + + this.nextButton.setInteractive(); + + this.nextButton.on("pointerdown", this.handleNextText, this); + + this.nextButton.on("pointerover", () => { + this.input.setDefaultCursor("pointer"); + this.nextButton.setScale(1.2); + }); + this.nextButton.on("pointerout", () => { + this.input.setDefaultCursor("crosshair"); + this.nextButton.setScale(); + }); + + this.prevButton = this.add + .image( + this.cameras.main.width * 0.77, + this.cameras.main.height * 0.9, + "next-button" + ) + .setDepth(1000); + this.prevButton.scaleX = -1; + + this.prevButton.setInteractive(); + + this.prevButton.on("pointerdown", this.handlePrevText, this); + + this.prevButton.on("pointerover", () => { + this.input.setDefaultCursor("pointer"); + this.prevButton.setScale(1.2); + this.prevButton.scaleX = -1; + }); + this.prevButton.on("pointerout", () => { + this.input.setDefaultCursor("crosshair"); + this.prevButton.setScale(); + this.prevButton.scaleX = -1; + }); + + let bowGet = false; + let itemGet = false; + + sceneEvents.once("bowAndItem", () => { + if (!this.theseus) { + return; + } + this.nextButton.setActive(false).setVisible(false); + this.prevButton.setActive(false).setVisible(false); + + const bow = this.add.bow( + this.cameras.main.width * 0.45, + this.cameras.main.height * 0.5, + "bow" + ); + bow.setScale(1); + this.tweens.add({ + targets: bow, + y: "-=10", + duration: 1000, + yoyo: true, + repeat: -1, + }); + this.physics.add.overlap( + this.theseus, + bow, + () => { + if (!this.theseus) { + return; + } + this.theseus.canUseBow = true; + bow.destroy(); + bowGet = true; + if (itemGet && !this.isSkipped) { + this.nextButton.setActive(true).setVisible(true); + this.prevButton.setActive(true).setVisible(true); + this.skipButton.setActive(true).setVisible(true); + sceneEvents.emit("bowItemGet"); + } + }, + undefined, + this + ); + + const sampleItem = this.physics.add.image( + this.cameras.main.width * 0.55, + this.cameras.main.height * 0.5, + "bow-damage-up" + ); + sampleItem.setScale(1.5); + this.tweens.add({ + targets: sampleItem, + y: "-=10", + duration: 1000, + yoyo: true, + repeat: -1, + }); + this.physics.add.overlap( + this.theseus, + sampleItem, + () => { + this.itemList.push("bow-damage-up"); + sampleItem.destroy(); + itemGet = true; + if (bowGet && !this.isSkipped) { + this.nextButton.setActive(true).setVisible(true); + this.prevButton.setActive(true).setVisible(true); + this.skipButton.setActive(true).setVisible(true); + } + }, + undefined, + this + ); + }); + + this.ariadne = this.add + .image( + this.cameras.main.width - 50, + this.cameras.main.height - 60, + "Ariadne" + ) + .setDepth(1000); + + this.textBox = this.add + .rectangle( + this.cameras.main.width / 2, + this.cameras.main.height * 0.85, + this.cameras.main.width * 0.9, + this.cameras.main.height * 0.2, + 0x000000, + 0.7 + ) + .setOrigin(0.5) + .setDepth(999); + + this.ariadneText = this.add + .text( + this.cameras.main.width * 0.1, + this.cameras.main.height * 0.8, + this.ariadneTextOptions[this.currentIndex], + { + fontFamily: "American Typewriter", + fontSize: "12px", + color: "#fff", + wordWrap: { width: this.cameras.main.width * 0.65 }, + } + ) + .setDepth(1000); + + this.input.keyboard?.on("keydown-ESC", () => { + this.scene.pause(); + this.scene.run("pause", { currentScene: "tutorial" }); + }); + + this.input.keyboard?.on("keydown-E", () => { + let tempList: string[] = []; + if (this.updateCodeList != undefined) { + tempList = this.updateCodeList; + } + this.ariadne.setVisible(false); + this.textBox.setVisible(false); + this.ariadneText.setVisible(false); + this.nextButton.setActive(false).setVisible(false); + this.prevButton.setActive(false).setVisible(false); + this.skipButton.setActive(false).setVisible(false); + this.scene.pause(); + if (!this.isSkipped) { + this.scene.run("instructions", { + currentIndex: this.currentIndex, + }); + } + + this.scene.run("weapon-design", { + from: "tutorial", + itemList: this.itemList, + updateCodeList: tempList, + }); + }); + + this.input.keyboard?.on("keydown-M", () => { + this.scene.pause(); + this.scene.run("maze-map", { currentScene: "tutorial" }); + }); + + this.events.on("weapon-updated", this.handleWeaponUpdated, this); + + this.events.on( + "resume", + ( + scene: this, + data: { + previous: string; + updatedList: string[]; + updateCodeList: string[]; + upgradeList: string[]; + } + ) => { + if (data.previous === "pause") { + return; + } + this.itemList = data.updatedList; + this.updateCodeList = data.updateCodeList; + if (this.upgrades < data.upgradeList.length) { + this.handleWeaponUpdated(data.upgradeList); + } + if (!this.isSkipped) { + this.ariadne.setVisible(true); + this.textBox.setVisible(true); + this.ariadneText.setVisible(true); + this.nextButton.setActive(true).setVisible(true); + this.prevButton.setActive(true).setVisible(true); + this.skipButton.setActive(true).setVisible(true); + } + } + ); + + this.events.on("start", () => { + this.swordStatus = []; + this.bowStatus = []; + this.swordStatus.push("5"); + this.swordStatus.push("2"); + this.swordStatus.push("classic"); + this.bowStatus.push("2"); + this.bowStatus.push("3"); + this.bowStatus.push("classic"); + this.itemList = []; + this.updateCodeList = []; + }); + + sceneEvents.on("update-index", this.updateText, this); + sceneEvents.on("gameRetry", () => { + this.isSkipped = false; + }); + + this.add + .image( + this.cameras.main.width * 0.2, + this.cameras.main.height * 0.6, + "tuto-move" + ) + .setOrigin(0.5) + .setScale(0.4); + + this.add + .image( + this.cameras.main.width * 0.8, + this.cameras.main.height * 0.6, + "tuto-attack" + ) + .setOrigin(0.5) + .setScale(0.4); + + this.add + .image( + this.cameras.main.width * 0.2, + this.cameras.main.height * 0.4, + "tuto-weapon-change" + ) + .setOrigin(0.5) + .setScale(0.4); + + this.add + .image( + this.cameras.main.width * 0.5 + 80, + this.cameras.main.height * 0.2, + "tuto-enter-door" + ) + .setOrigin(0.5) + .setScale(0.4); + + this.add + .image( + this.cameras.main.width * 0.8, + this.cameras.main.height * 0.4, + "tuto-weapon-design" + ) + .setOrigin(0.5) + .setScale(0.4); + + this.add + .image( + this.cameras.main.width * 0.3, + this.cameras.main.height * 0.2, + "tuto-pause" + ) + .setOrigin(0.5) + .setScale(0.4); + } + + private handleEnterDoor() { + if (!this.theseus) { + return; + } + const tile = this.doorOpened.getTileAtWorldXY( + this.theseus.x, + this.theseus.y, + true + ); + + this.swordStatus = []; + this.bowStatus = []; + + let pushComplete = false; + + if (this.cursors?.space.isDown && tile.index != -1) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (!pushComplete) { + this.swordStatus.push(this.theseus.getSword.damage.toString()); + this.swordStatus.push(this.theseus.getSword.speed.toString()); + this.swordStatus.push(this.theseus.getSword.attackType); + this.bowStatus.push(this.theseus.getBow.damage.toString()); + this.bowStatus.push(this.theseus.getBow.speed.toString()); + this.bowStatus.push(this.theseus.getBow.attackType); + + pushComplete = true; + } + this.scene.pause(); + //this.scene.run("maze-map", { currentScene: "tutorial" }); + this.scene.start("mainScene", { + hp: this.theseus.health, + threads: 3, + weaponType: this.theseus.weaponType, + itemList: this.itemList, + updateCodeList: this.updateCodeList, + swordStatus: this.swordStatus, + bowStatus: this.bowStatus, + isEasyMode: this.isEasyMode, + }); + } + } + + private handleNextText() { + this.currentIndex++; + if (this.currentIndex === 3) { + sceneEvents.emit("bowAndItem"); + } + if (this.currentIndex < this.ariadneTextOptions.length) { + this.ariadneText.setText( + this.ariadneTextOptions[this.currentIndex] + ); + } else { + if (this.theseus?.getBow.damage === 3) { + this.doorLayer.setCollisionByProperty( + { collides: true }, + false + ); + this.doorLayer.setVisible(false); + this.ariadneText.setVisible(false); + this.ariadne.setVisible(false); + this.textBox.setVisible(false); + this.prevButton.setActive(false).setVisible(false); + this.nextButton.setActive(false).setVisible(false); + this.skipButton.setActive(false).setVisible(false); + sceneEvents.emit("ready"); + } + this.currentIndex = this.ariadneTextOptions.length - 1; + } + } + + private handlePrevText() { + this.currentIndex--; + if (this.currentIndex >= 0) { + this.ariadneText.setText( + this.ariadneTextOptions[this.currentIndex] + ); + } else { + this.currentIndex = 0; + } + } + + private handleSkipText() { + this.doorLayer.setCollisionByProperty({ collides: true }, false); + this.doorLayer.setVisible(false); + this.ariadneText.setVisible(false); + this.ariadne.setVisible(false); + this.textBox.setVisible(false); + this.prevButton.setActive(false).setVisible(false); + this.nextButton.setActive(false).setVisible(false); + this.skipButton.setActive(false).setVisible(false); + this.isSkipped = true; + sceneEvents.emit("bowAndItem"); + sceneEvents.emit("ready"); + } + + private updateText(currentIndex: number) { + if (this.isSkipped) { + return; + } + this.ariadne.setVisible(true); + this.textBox.setVisible(true); + this.ariadneText.setVisible(true); + this.nextButton.setActive(true).setVisible(true); + this.prevButton.setActive(true).setVisible(true); + this.skipButton.setActive(true).setVisible(true); + this.currentIndex = currentIndex; + this.ariadneText.setText(this.ariadneTextOptions[this.currentIndex]); + } + + private handleWeaponUpdated(upgradeList: string[]) { + if (!this.theseus) { + return; + } + upgradeList.forEach((text: string, index: number) => { + if (!this.theseus) { + return; + } + if (index >= this.upgrades) { + if (text === "sword-fire") { + this.theseus.getSword.attackType = "fire"; + } else if (text === "sword-ice") { + this.theseus.getSword.attackType = "ice"; + } else if (text === "sword-damage-up") { + this.theseus.getSword.incDamage(); + } else if (text === "sword-speed-up") { + this.theseus.getSword.incSpeed(); + } else if (text === "bow-poison") { + this.theseus.getBow.attackType = "poison"; + } else if (text === "bow-triple") { + this.theseus.getBow.attackType = "triple"; + } else if (text === "bow-damage-up") { + this.theseus.getBow.incDamage(); + } else if (text === "bow-speed-up") { + this.theseus.getBow.incSpeed(); + } + this.upgrades++; + } + }); + this.swordStatus = []; + this.bowStatus = []; + this.swordStatus.push(this.theseus.getSword.damage.toString()); + this.swordStatus.push(this.theseus.getSword.speed.toString()); + this.swordStatus.push(this.theseus.getSword.attackType); + this.bowStatus.push(this.theseus.getBow.damage.toString()); + this.bowStatus.push(this.theseus.getBow.speed.toString()); + this.bowStatus.push(this.theseus.getBow.attackType); + sceneEvents.emit("weapon-status-update", { + swordStatus: this.swordStatus, + bowStatus: this.bowStatus, + }); + // this.doorLayer.setCollisionByProperty({ collides: true }, false); + // this.doorLayer.setVisible(false); + } + + update() { + if (this.theseus) { + this.theseus.update(this.cursors!); + } + } +} diff --git a/src/scenes/WeaponDesign.ts b/src/scenes/WeaponDesign.ts new file mode 100644 index 00000000..3e639beb --- /dev/null +++ b/src/scenes/WeaponDesign.ts @@ -0,0 +1,761 @@ +import Phaser from "phaser"; +import { createWeaponDesignScreen } from "../screen/weaponDesignTexts"; +import { sceneEvents } from "../events/eventsCenter"; + +export default class WeaponDesign extends Phaser.Scene { + private fileList = ["Main", "Theseus", "Sword", "Bow"]; + private current = this.fileList[0]; + + private theseusFile: Phaser.GameObjects.Group; + private mainFile: Phaser.GameObjects.Group; + private swordFile: Phaser.GameObjects.Group; + private bowFile: Phaser.GameObjects.Group; + private defaultCode: Phaser.GameObjects.Text; + private semiColonCode: Phaser.GameObjects.Text; + + private codeList: Phaser.GameObjects.Group; + private itemBox: Phaser.GameObjects.Group; + private usedCodes: Phaser.GameObjects.Group; + private errorMessage: Phaser.GameObjects.Text; + + private holdingItem: Phaser.GameObjects.Image | undefined; + + private previous: string; + private itemList: string[]; + + private upgradeList: string[]; + private updatedItemList: string[]; + private updateCodeList: string[]; + + private dropZones: Phaser.GameObjects.Zone[]; + private inputField: HTMLInputElement; + + private inputEntered = false; + + constructor() { + super({ key: "weapon-design" }); + this.dropZones = []; + this.upgradeList = []; + } + + init(data: { from: string; itemList: string[]; updateCodeList: string[] }) { + this.previous = data.from; + this.itemList = data.itemList; + this.updateCodeList = data.updateCodeList; + } + + create() { + this.updatedItemList = []; + this.input.setDefaultCursor("default"); + + this.theseusFile = this.add.group(); + this.mainFile = this.add.group(); + this.swordFile = this.add.group(); + this.bowFile = this.add.group(); + + this.usedCodes = this.add.group(); + + createWeaponDesignScreen( + this, + this.theseusFile, + this.mainFile, + this.swordFile, + this.bowFile + ); + + // Displaying main file by default + this.theseusFile.setVisible(false); + this.swordFile.setVisible(false); + this.bowFile.setVisible(false); + + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (this.updateCodeList) { + this.updateCodeList.forEach((text: string, index: number) => { + let textY = this.cameras.main.height * 0.25; + const codeText = this.add + .text( + this.cameras.main.width * 0.1, + textY + 20 * index, + text, + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0) + .setDepth(1000) + .setVisible(true); + this.usedCodes.add(codeText); + }); + } + + //Previous button that will switch to previous java file + const previous = this.add + .image(this.cameras.main.width * 0.05 + 10, 28, "next-button") + .setOrigin(0.5) + .setDepth(1000); + previous.scaleX = -1; + previous.setInteractive(); + + previous.on("pointerover", () => { + this.input.setDefaultCursor("pointer"); + previous.setScale(1.1); + previous.scaleX *= -1; + }); + previous.on("pointerout", () => { + this.input.setDefaultCursor("default"); + + previous.setScale(1); + previous.scaleX *= -1; + }); + previous.on("pointerdown", () => { + let currIdx = this.fileList.indexOf(this.current); + if (currIdx > 0) { + currIdx--; + } else { + currIdx = this.fileList.length - 1; + } + this.current = this.fileList[currIdx]; + this.handleFileChange(); + }); + + //Next button that will switch to next java file + const next = this.add + .image(this.cameras.main.width * 0.85 - 10, 28, "next-button") + .setOrigin(0.5) + .setDepth(1000); + next.setInteractive(); + + next.on("pointerover", () => { + this.input.setDefaultCursor("pointer"); + + next.setScale(1.1); + }); + next.on("pointerout", () => { + this.input.setDefaultCursor("default"); + + next.setScale(1); + }); + next.on("pointerdown", () => { + const currIdx = this.fileList.indexOf(this.current); + this.current = this.fileList[(currIdx + 1) % this.fileList.length]; + this.handleFileChange(); + }); + + // Display list of items + this.codeList = this.add.group(); + + const addItem = ( + x: number, + y: number, + itemName: string, + itemImg: string + ) => { + const itemImage = this.add + .image(x, y, itemImg) + .setOrigin(0.5) + .setDepth(2000) + .setScale(1.5); + + this.codeList.add(itemImage); + + const itemTag = this.add + .text(x, y + 15, itemName, { + fontSize: "10px", + fontFamily: "American Typewriter", + //strokeThickness: 3, + //stroke: "0xffffff", + color: "0x000000", + }) + .setOrigin(0.5) + .setDepth(2000) + .setVisible(false); + + itemImage.setInteractive(); + this.input.setDraggable(itemImage); + + itemImage.on("pointerover", () => { + itemImage.setScale(1.6); + this.input.setDefaultCursor("pointer"); + itemTag.x = itemImage.x; + itemTag.y = itemImage.y + 15; + itemTag.setVisible(true); + }); + + itemImage.on("pointerout", () => { + itemImage.setScale(1.5); + this.input.setDefaultCursor("default"); + itemTag.setVisible(false); + }); + + // Drag and Drop for items + let initialPosition: { x: number; y: number } | null = null; + + this.input.on( + "dragstart", + ( + pointer: Phaser.Input.Pointer, + gameObject: Phaser.GameObjects.Image + ) => { + if (gameObject.x >= this.cameras.main.width * 0.9) { + initialPosition = { x: gameObject.x, y: gameObject.y }; + } + this.scene.pause("instructions"); + } + ); + + this.input.on( + "drag", + ( + pointer: Phaser.Input.Pointer, + gameObject: Phaser.GameObjects.Image, + dragX: number, + dragY: number + ) => { + gameObject.x = dragX; + gameObject.y = dragY; + itemTag.x = gameObject.x; + itemTag.y = gameObject.y + 15; + } + ); + + this.input.on( + "dragend", + ( + pointer: Phaser.Input.Pointer, + gameObject: Phaser.GameObjects.Image, + dropped: boolean + ) => { + if (!dropped || this.current !== "Main") { + if (initialPosition) { + gameObject.x = initialPosition.x; + gameObject.y = initialPosition.y; + itemTag.x = gameObject.x; + itemTag.y = gameObject.y + 15; + } + } + this.scene.resume("instructions"); + } + ); + }; + + // List up the items that player collected + for (let i = 0; i < this.itemList.length; i++) { + let textureKeyToCountMap = 0; + this.codeList + .getChildren() + .forEach((image: Phaser.GameObjects.GameObject) => { + if (image instanceof Phaser.GameObjects.Image) { + if (image.texture.key === this.itemList[i]) { + textureKeyToCountMap++; + } + } + }); + if ( + this.itemList[i] === "sword-fire" || + this.itemList[i] === "sword-ice" || + this.itemList[i] === "bow-poison" || + this.itemList[i] === "bow-triple" + ) { + if (textureKeyToCountMap == 0) { + addItem( + this.cameras.main.width * 0.9, + 60 + 30 * this.codeList.getLength() - 1, + this.itemList[i], + this.itemList[i] + ); + } + } else if ( + this.itemList[i] === "sword-damage-up" || + this.itemList[i] === "sword-speed-up" || + this.itemList[i] === "bow-damage-up" || + this.itemList[i] === "bow-speed-up" + ) { + addItem( + this.cameras.main.width * 0.9, + 60 + 30 * this.codeList.getLength() - 1, + this.itemList[i], + this.itemList[i] + ); + } + } + + // box where the item will be dropped + this.itemBox = this.add.group({ + classType: Phaser.GameObjects.Graphics, + }); + + let itemBoxX = this.cameras.main.width * 0.1 - 5; + let itemBoxY = this.cameras.main.height * 0.83; + + const itemBoxWidth = this.cameras.main.height * 0.08; + const itemBoxHeight = this.cameras.main.height * 0.08; + + const zone = this.add + .zone( + itemBoxX + itemBoxWidth / 2, + itemBoxY + itemBoxHeight / 2, + itemBoxWidth, + itemBoxHeight + ) + .setRectangleDropZone(itemBoxWidth, itemBoxHeight) + .setDepth(1700) + .setOrigin(0.5); + + this.dropZones.push(zone); + + const box = this.itemBox.get(itemBoxX, itemBoxY); + + box.fillStyle(0xffffff, 1); + box.fillRect(itemBoxX, itemBoxY, itemBoxWidth, itemBoxHeight); + box.lineStyle(2, 0x000000); + box.strokeRect(itemBoxX, itemBoxY, itemBoxWidth, itemBoxHeight); + box.setDepth(1500); + + this.input.on( + "dragenter", + ( + pointer: Phaser.Input.Pointer, + gameObject: Phaser.GameObjects.Image, + dropZone: Phaser.GameObjects.Graphics + ) => { + if (this.current === "Main") { + box.fillStyle(0xd3d3d3, 1); + box.fillRect( + dropZone.x - dropZone.input?.hitArea.width / 2, + dropZone.y - dropZone.input?.hitArea.height / 2, + dropZone.input?.hitArea.width, + dropZone.input?.hitArea.height + ); + box.lineStyle(2, 0x33cc33); + box.strokeRect( + dropZone.x - dropZone.input?.hitArea.width / 2, + dropZone.y - dropZone.input?.hitArea.height / 2, + dropZone.input?.hitArea.width, + dropZone.input?.hitArea.height + ); + } + } + ); + + this.input.on( + "dragleave", + ( + pointer: Phaser.Input.Pointer, + gameObject: Phaser.GameObjects.Image, + dropZone: Phaser.GameObjects.Graphics + ) => { + if (this.current === "Main") { + box.fillStyle(0xffffff, 1); + box.fillRect( + dropZone.x - dropZone.input?.hitArea.width / 2, + dropZone.y - dropZone.input?.hitArea.height / 2, + dropZone.input?.hitArea.width, + dropZone.input?.hitArea.height + ); + box.lineStyle(2, 0x000000); + box.strokeRect( + dropZone.x - dropZone.input?.hitArea.width / 2, + dropZone.y - dropZone.input?.hitArea.height / 2, + dropZone.input?.hitArea.width, + dropZone.input?.hitArea.height + ); + } + } + ); + + this.defaultCode = this.add + .text( + this.cameras.main.width * 0.05 + 90, + this.cameras.main.height * 0.86 + 2, + "\ttheseus", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000) + .setVisible(false); + + this.semiColonCode = this.add + .text( + this.cameras.main.width * 0.8, + this.cameras.main.height * 0.86 + 2, + ";", + { + fontSize: "20px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000) + .setVisible(false); + + this.input.on( + "drop", + ( + pointer: Phaser.Input.Pointer, + gameObject: Phaser.GameObjects.Image, + dropZone: Phaser.GameObjects.Zone + ) => { + if (this.current === "Main") { + gameObject.x = dropZone.x - itemBoxWidth / 2 + 15; + gameObject.y = dropZone.y; + + if (this.dropZones.includes(dropZone)) { + this.holdingItem = gameObject; + this.defaultCode.setVisible(true); + this.semiColonCode.setVisible(true); + + this.inputField = document.createElement("input"); + this.inputField.type = "text"; + this.inputField.style.border = "none"; + this.inputField.style.outline = "none"; + this.inputField.style.width = `${ + this.cameras.main.width * 0.5 + }px`; + this.inputField.style.height = `${itemBoxHeight - 5}px`; + document.body.appendChild(this.inputField); + + this.inputField.focus(); + + this.add.dom( + itemBoxX + this.defaultCode.width + 180, + dropZone.y, + this.inputField + ); + } + } + } + ); + + this.input.on( + "dragend", + ( + pointer: Phaser.Input.Pointer, + gameObject: Phaser.GameObjects.Image, + dropped: boolean + ) => { + if (!dropped) { + if (this.defaultCode.visible) { + this.inputField.style.visibility = "hidden"; + this.inputField.disabled = true; + this.inputField.remove(); + } + this.defaultCode.setVisible(false); + this.semiColonCode.setVisible(false); + this.holdingItem = undefined; + } + } + ); + + // Close button that will return to the game screen + const close = this.add + .text(this.cameras.main.width - 20, 20, "X", { + fontSize: "25px", + fontFamily: "Academy Engraved LET", + strokeThickness: 6, + stroke: "0xffffff", + }) + .setOrigin(0.5) + .setDepth(1000); + + close.setInteractive(); + close.on("pointerover", () => { + this.input.setDefaultCursor("pointer"); + + close.setFontSize("27px"); + }); + close.on("pointerout", () => { + this.input.setDefaultCursor("default"); + + close.setFontSize("25px"); + }); + close.on("pointerdown", () => { + this.input.setDefaultCursor("crosshair"); + this.codeList + .getChildren() + .forEach((image: Phaser.GameObjects.GameObject) => { + if (image instanceof Phaser.GameObjects.Image) { + this.updatedItemList.push(image.texture.key); + } + }); + this.scene.resume(this.previous, { + previous: "weapon-design", + updatedList: this.updatedItemList, + updateCodeList: this.updateCodeList, + upgradeList: this.upgradeList, + }); + if (this.previous === "tutorial") { + this.scene.stop("instructions"); + } + console.log(this.updateCodeList); + this.scene.stop(); + }); + } + + private handleFileChange() { + this.mainFile.setVisible(this.current === "Main"); + this.theseusFile.setVisible(this.current === "Theseus"); + this.swordFile.setVisible(this.current === "Sword"); + this.bowFile.setVisible(this.current === "Bow"); + this.itemBox.setVisible(this.current === "Main"); + this.usedCodes.setVisible(this.current === "Main"); + if (this.current === "Main") { + if (this.holdingItem != undefined) { + this.defaultCode.setVisible(true); + this.semiColonCode.setVisible(true); + this.inputField.style.visibility = "visible"; + this.inputField.disabled = false; + this.holdingItem.setVisible(true); + this.errorMessage.setVisible(true); + } + sceneEvents.emit("in-main"); + } else { + if (this.holdingItem != undefined) { + this.defaultCode.setVisible(false); + this.semiColonCode.setVisible(false); + this.inputField.style.visibility = "hidden"; + this.inputField.disabled = true; + this.holdingItem.setVisible(false); + this.errorMessage.setVisible(false); + } + sceneEvents.emit("not-main"); + } + console.log(this.upgradeList, "holdingItme:", this.holdingItem); + } + + update() { + const keyEnter = this.input.keyboard?.addKey( + Phaser.Input.Keyboard.KeyCodes.ENTER + ); + + if (keyEnter?.isDown) { + if (!this.inputEntered && this.holdingItem != undefined) { + this.inputEntered = true; + + const inputValue = this.inputField.value; + const inputParts = inputValue.split("."); + const itemParts = this.holdingItem.texture.key.split("-"); + console.log(inputParts); + + let isCorrect = false; + + const completeText = this.add + .text( + this.cameras.main.width * 0.1, + this.cameras.main.height * 0.25, + "", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0) + .setDepth(1000) + .setVisible(false); + + //this.errorMessage message for feedback + this.errorMessage = this.add + .text( + this.cameras.main.width * 0.3, + this.cameras.main.height * 0.91, + "", + { + fontSize: "10px", + color: "#f00", + } + ) + .setDepth(1000) + .setVisible(false); + + // Check player's input + if (itemParts[0] === "sword") { + if (inputParts[1] === "getSword()") { + if (itemParts[1] === "fire") { + if (inputParts[2] === 'setType("fire")') { + isCorrect = true; + completeText.setText( + 'theseus.getSword().setType("fire");' + ); + } else { + this.errorMessage + .setText("Incorrect method") + .setVisible(true); + } + } else if (itemParts[1] === "ice") { + if (inputParts[2] === 'setType("ice")') { + isCorrect = true; + completeText.setText( + 'theseus.getSword().setType("ice");' + ); + } else { + this.errorMessage + .setText("Incorrect method") + .setVisible(true); + } + } else if (itemParts[1] === "damage") { + if (inputParts[2] === "incDamage()") { + isCorrect = true; + completeText.setText( + "theseus.getSword().incDamage();" + ); + } else if (inputParts[2] === "incDamage") { + this.errorMessage + .setText("Missing parenthesis") + .setVisible(true); + } else { + this.errorMessage + .setText("Incorrect method") + .setVisible(true); + } + } else if (itemParts[1] === "speed") { + if (inputParts[2] === "incSpeed()") { + isCorrect = true; + completeText.setText( + "theseus.getSword().incSpeed();" + ); + } else if (inputParts[2] === "incSpeed") { + this.errorMessage + .setText("Missing parenthesis") + .setVisible(true); + } else { + this.errorMessage + .setText("Incorrect method") + .setVisible(true); + } + } + } else if (inputParts[1] === "getSword") { + this.errorMessage + .setText("Missing parenthesis") + .setVisible(true); + } else if (inputParts[1] === "getBow()") { + this.errorMessage + .setText("Incorrect Weapon") + .setVisible(true); + } else if (inputParts[1] === "sword") { + this.errorMessage + .setText("sword is private attribute") + .setVisible(true); + } else { + this.errorMessage + .setText("Incorrect getter") + .setVisible(true); + } + } else if (itemParts[0] === "bow") { + if (inputParts[1] === "getBow()") { + if (itemParts[1] === "poison") { + if (inputParts[2] === 'setType("poison")') { + isCorrect = true; + completeText.setText( + 'theseus.getBow().setType("poison");' + ); + } else { + this.errorMessage + .setText("Incorrect method") + .setVisible(true); + } + } else if (itemParts[1] === "triple") { + if (inputParts[2] === 'setType("triple")') { + isCorrect = true; + completeText.setText( + 'theseus.getBow().setType("triple");' + ); + } else { + this.errorMessage + .setText("Incorrect method") + .setVisible(true); + } + } else if (itemParts[1] === "damage") { + if (inputParts[2] === "incDamage()") { + isCorrect = true; + completeText.setText( + "theseus.getBow().incDamage();" + ); + } else if (inputParts[2] === "incDamage") { + this.errorMessage + .setText("Missing parenthesis") + .setVisible(true); + } else { + this.errorMessage + .setText("Incorrect method") + .setVisible(true); + } + } else if (itemParts[1] === "speed") { + if (inputParts[2] === "incSpeed()") { + isCorrect = true; + completeText.setText( + "theseus.getBow().incSpeed();" + ); + } else if (inputParts[2] === "incSpeed") { + this.errorMessage + .setText("Missing parenthesis") + .setVisible(true); + } else { + this.errorMessage + .setText("Incorrect method") + .setVisible(true); + } + } + } else if (inputParts[1] === "getBow") { + this.errorMessage + .setText("Missing parenthesis") + .setVisible(true); + } else if (inputParts[1] === "getSword()") { + this.errorMessage + .setText("Incorrect Weapon") + .setVisible(true); + } else if (inputParts[1] === "bow") { + this.errorMessage + .setText("bow is private attribute") + .setVisible(true); + } else { + this.errorMessage + .setText("Incorrect getter") + .setVisible(true); + } + } + if (inputParts[0] !== "") { + this.errorMessage.setText("Missing dot").setVisible(true); + } + this.inputField.addEventListener("input", () => { + this.errorMessage.setVisible(false); + }); + + if (isCorrect) { + this.inputField.remove(); + this.defaultCode.setVisible(false); + this.semiColonCode.setVisible(false); + this.codeList.remove(this.holdingItem); + this.upgradeList.push(this.holdingItem.texture.key); + this.holdingItem.destroy(); + this.holdingItem = undefined; + completeText.setY( + this.cameras.main.height * 0.25 + + 20 * this.updateCodeList.length + ); + completeText.setVisible(true); + this.updateCodeList.push(completeText.text); + this.usedCodes.add(completeText); + this.events.emit("weapon-updated", this.upgradeList); + } + } + } + if (keyEnter?.isUp) { + this.inputEntered = false; + } + } +} diff --git a/src/scenes/mainScene.ts b/src/scenes/mainScene.ts index 1c6b6089..70a05ec2 100644 --- a/src/scenes/mainScene.ts +++ b/src/scenes/mainScene.ts @@ -1,28 +1,874 @@ import Phaser from "phaser"; -import PhaserLogo from "../objects/phaserLogo"; -import FpsText from "../objects/fpsText"; +import { debugDraw } from "../utils/debug"; +import { createRedEyesSkeletonAnims } from "../anims/enemyAnims"; +import { createFlyingBatAnims } from "../anims/enemyAnims"; +import { createTheseusAnims } from "../anims/theseusAnims"; +import { createWeaponsAnims } from "../anims/weaponsAnims"; +import { createBlobMonsterAnims } from "../anims/enemyAnims"; +import RedEyesSkeleton from "../enemies/redEyesSkeleton"; +import flyingBats from "../enemies/flyingBats"; +import BlobMonster from "../enemies/blobMonster"; +import "../player/theseus"; +import Theseus from "../player/theseus"; +import { sceneEvents } from "../events/eventsCenter"; + +//blue star increases speed of the weapons +//orange star increases the damage of the weapon + +export type Collidable = + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile; export default class MainScene extends Phaser.Scene { - fpsText: FpsText; + private theseus?: Theseus; + private map: Phaser.Tilemaps.Tilemap; + private doorLayer: Phaser.Tilemaps.TilemapLayer; + private doorOpened: Phaser.Tilemaps.TilemapLayer; + private cursors?: Phaser.Types.Input.Keyboard.CursorKeys; + private redEyesSkeletons?: Phaser.Physics.Arcade.Group; + private flyingBat?: Phaser.Physics.Arcade.Group; + private blobMonster?: Phaser.Physics.Arcade.Group; + private playerEnemyCollider?: Phaser.Physics.Arcade.Collider; + private hp: number; + private threads: number; + private weapon: string; + private itemList: string[]; + private updateCodeList: string[] | undefined; + private upgrades = 0; + private swordStatus: string[]; + private bowStatus: string[]; + private isEasyMode: boolean; + + private dropList = [ + { item: "sword-damage-up", weight: 14 }, + { item: "sword-speed-up", weight: 14 }, + { item: "sword-fire", weight: 10 }, + { item: "sword-ice", weight: 12 }, + { item: "bow-damage-up", weight: 14 }, + { item: "bow-speed-up", weight: 14 }, + { item: "bow-poison", weight: 10 }, + { item: "bow-triple", weight: 12 }, + ]; constructor() { - super({ key: "MainScene" }); + super({ key: "mainScene" }); + this.swordStatus = []; + this.bowStatus = []; + } + + init(data: { + hp: number; + threads: number; + weaponType: string; + itemList: string[]; + updateCodeList: string[]; + swordStatus: string[]; + bowStatus: string[]; + isEasyMode: boolean; + }) { + this.hp = data.hp; + this.threads = data.threads; + this.weapon = data.weaponType; + this.itemList = data.itemList; + this.updateCodeList = data.updateCodeList; + this.swordStatus = data.swordStatus; + this.bowStatus = data.bowStatus; + this.isEasyMode = data.isEasyMode; } create() { - new PhaserLogo(this, this.cameras.main.width / 2, 0); - this.fpsText = new FpsText(this); + createTheseusAnims(this.anims); + createRedEyesSkeletonAnims(this.anims); + createWeaponsAnims(this.anims); + createFlyingBatAnims(this.anims); + createBlobMonsterAnims(this.anims); + + this.cursors = + this.input.keyboard?.createCursorKeys() as Phaser.Types.Input.Keyboard.CursorKeys; + + this.input.setDefaultCursor("crosshair"); + + this.add.image(0, 0, "base_tiles"); + this.map = this.make.tilemap({ key: "tilemap" }); + const tileset = this.map.addTilesetImage( + "dungeon", + "base_tiles", + 16, + 16 + ) as Phaser.Tilemaps.Tileset; + + this.map.createLayer("ground", tileset); + const wallsLayer = this.map.createLayer( + "wall", + tileset + ) as Phaser.Tilemaps.TilemapLayer; + this.map.createLayer("objects", tileset); + this.doorOpened = this.map.createLayer( + "door-open", + tileset + ) as Phaser.Tilemaps.TilemapLayer; + this.doorLayer = this.map.createLayer( + "door", + tileset + ) as Phaser.Tilemaps.TilemapLayer; + + wallsLayer.setCollisionByProperty({ collides: true }, true); + this.doorLayer.setCollisionByProperty({ collides: true }, true); + + debugDraw(wallsLayer, this, false); + debugDraw(this.doorLayer, this, false); + + this.theseus = this.add.theseus( + this.cameras.main.width * 0.5, + this.cameras.main.height * 0.5, + "faune" + ); + this.theseus.health = this.hp; + this.theseus.weaponType = this.weapon; + + console.log("sword", this.swordStatus, "bow", this.bowStatus); + + this.theseus.getSword.damage = parseInt(this.swordStatus[0]); + this.theseus.getSword.speed = parseInt(this.swordStatus[1]); + this.theseus.getSword.attackType = this.swordStatus[2]; + + this.theseus.getBow.damage = parseInt(this.bowStatus[0]); + this.theseus.getBow.speed = parseInt(this.bowStatus[1]); + this.theseus.getBow.attackType = this.bowStatus[2]; + + this.swordStatus = []; + this.bowStatus = []; + this.swordStatus.push(this.theseus.getSword.damage.toString()); + this.swordStatus.push(this.theseus.getSword.speed.toString()); + this.swordStatus.push(this.theseus.getSword.attackType); + this.bowStatus.push(this.theseus.getBow.damage.toString()); + this.bowStatus.push(this.theseus.getBow.speed.toString()); + this.bowStatus.push(this.theseus.getBow.attackType); + this.scene.run("game-ui", { + hp: this.theseus.health, + threads: this.threads, + weaponType: this.theseus.weaponType, + swordStatus: this.swordStatus, + bowStatus: this.bowStatus, + }); + + this.redEyesSkeletons = this.physics.add.group({ + classType: RedEyesSkeleton, + }); + + this.flyingBat = this.physics.add.group({ + classType: flyingBats, + }); + + this.blobMonster = this.physics.add.group({ + classType: BlobMonster, + }); + + let maxNum = this.isEasyMode ? 5 : 6; + + for (let i = 0; i < maxNum - this.threads; i++) { + let posX = Phaser.Math.Between(24, 488); + let posY = Phaser.Math.Between(76, 355); + while ((posX > 236 && posX < 276) || (posY > 172 && posY < 212)) { + posX = Phaser.Math.Between(24, 488); + posY = Phaser.Math.Between(76, 355); + } + if (this.isEasyMode) { + if (this.threads === 3) { + this.blobMonster.get(posX, posY, "blob_monster_moving"); + } else if (this.threads === 2) { + this.flyingBat.get(posX, posY, "flying_bat_flapping"); + } else if (this.threads === 1) { + this.redEyesSkeletons.get(posX, posY, "skeleton_red_eyes"); + } + } else { + if (this.threads === 3) { + this.blobMonster.get(posX, posY, "blob_monster_moving"); + } else if (this.threads === 2) { + this.flyingBat.get(posX, posY, "flying_bat_flapping"); + } else if (this.threads === 1) { + this.redEyesSkeletons.get(posX, posY, "skeleton_red_eyes"); + } + } + } + + this.redEyesSkeletons.children.iterate((c) => { + const redEyesSkeleton = c as RedEyesSkeleton; + redEyesSkeleton.setTarget(this.theseus!); + if (this.isEasyMode) { + redEyesSkeleton.updateStatus(40, 15); + } + redEyesSkeleton.setEasyMode = this.isEasyMode; + redEyesSkeleton.body?.setSize( + redEyesSkeleton.width * 0.6, + redEyesSkeleton.height * 0.8 + ); + return true; + }); + + this.flyingBat.children.iterate((c) => { + const FlyingBat = c as flyingBats; + FlyingBat.setTarget(this.theseus!); + if (this.isEasyMode) { + FlyingBat.updateStatus(40, 15); + } + FlyingBat.setEasyMode = this.isEasyMode; + FlyingBat.body?.setSize( + FlyingBat.width * 0.6, + FlyingBat.height * 0.8 + ); + return true; + }); + + this.blobMonster.children.iterate((c) => { + const BlobMonster = c as BlobMonster; + BlobMonster.setTarget(this.theseus!); + if (this.isEasyMode) { + BlobMonster.updateStatus(40, 15); + } + BlobMonster.setEasyMode = this.isEasyMode; + BlobMonster.body?.setSize( + BlobMonster.width * 0.6, + BlobMonster.height * 0.8 + ); + return true; + }); + + this.physics.add.collider(this.theseus, wallsLayer); + this.physics.add.collider(this.theseus, this.doorLayer); + + this.physics.add.collider(this.redEyesSkeletons, wallsLayer); + this.physics.add.collider(this.redEyesSkeletons, this.doorLayer); + + this.physics.add.collider(this.redEyesSkeletons, this.redEyesSkeletons); + + this.physics.add.collider(this.flyingBat, wallsLayer); + this.physics.add.collider(this.flyingBat, this.doorLayer); + + this.physics.add.collider(this.flyingBat, this.flyingBat); + + this.physics.add.collider(this.blobMonster, wallsLayer); + this.physics.add.collider(this.blobMonster, this.doorLayer); + + this.physics.add.collider(this.blobMonster, this.blobMonster); + + this.playerEnemyCollider = this.physics.add.collider( + this.redEyesSkeletons, + this.theseus, + this.handlePlayerEnemyCollision, + undefined, + this + ); + + this.playerEnemyCollider = this.physics.add.collider( + this.flyingBat, + this.theseus, + this.handlePlayerEnemyCollision, + undefined, + this + ); + + this.playerEnemyCollider = this.physics.add.collider( + this.blobMonster, + this.theseus, + this.handlePlayerEnemyCollision, + undefined, + this + ); + + this.physics.add.overlap( + this.theseus, + this.doorOpened, + this.handleEnterDoor, + undefined, + this + ); + + this.events.on( + "swordSlashCreated", + (swordSlash: Phaser.Types.Physics.Arcade.SpriteWithDynamicBody) => { + if (this.redEyesSkeletons) { + this.physics.add.collider( + swordSlash, + this.redEyesSkeletons, + this.handleEnemySwordAttacked, + undefined, + this + ); + } + } + ); + + this.events.on( + "swordSlashCreated", + (swordSlash: Phaser.Types.Physics.Arcade.SpriteWithDynamicBody) => { + if (this.flyingBat) { + this.physics.add.collider( + swordSlash, + this.flyingBat, + this.handleEnemySwordAttacked, + undefined, + this + ); + } + } + ); + + this.events.on( + "swordSlashCreated", + (swordSlash: Phaser.Types.Physics.Arcade.SpriteWithDynamicBody) => { + if (this.blobMonster) { + this.physics.add.collider( + swordSlash, + this.blobMonster, + this.handleEnemySwordAttacked, + undefined, + this + ); + } + } + ); + + this.events.on( + "arrowCreated", + (arrow: Phaser.Types.Physics.Arcade.SpriteWithDynamicBody) => { + if (this.redEyesSkeletons) { + this.physics.add.collider( + arrow, + this.redEyesSkeletons, + this.handleEnemyBowAttacked, + undefined, + this + ); + } + } + ); + + this.events.on( + "arrowCreated", + (arrow: Phaser.Types.Physics.Arcade.SpriteWithDynamicBody) => { + if (this.flyingBat) { + this.physics.add.collider( + arrow, + this.flyingBat, + this.handleEnemyBowAttacked, + undefined, + this + ); + } + } + ); + + this.events.on( + "arrowCreated", + (arrow: Phaser.Types.Physics.Arcade.SpriteWithDynamicBody) => { + if (this.blobMonster) { + this.physics.add.collider( + arrow, + this.blobMonster, + this.handleEnemyBowAttacked, + undefined, + this + ); + } + } + ); + + sceneEvents.on("gameRetry", () => { + if (!this.theseus) { + return; + } + this.theseus.health = this.hp; + this.threads = 3; + }); + + this.events.once("enemyDefeated", this.handleEnemyDefeated, this); + + this.input.keyboard?.on("keydown-ESC", () => { + this.scene.pause(); + this.scene.run("pause", { currentScene: "mainScene" }); + }); + + this.input.keyboard?.on("keydown-M", () => { + this.scene.pause(); + this.scene.run("maze-map", { currentScene: "tutorial" }); + }); + + this.input.keyboard?.on("keydown-E", () => { + let tempList: string[] = []; + if (this.updateCodeList != undefined) { + tempList = this.updateCodeList; + } + this.scene.pause(); + this.scene.run("weapon-design", { + from: "mainScene", + itemList: this.itemList, + updateCodeList: tempList, + }); + }); + + sceneEvents.on("enemy-destroyed", this.handleEnemyDropItem, this); + this.events.on(Phaser.Scenes.Events.SHUTDOWN, () => { + sceneEvents.off("enemy-destroyed", this.handleEnemyDropItem, this); + }); + + this.events.on("weapon-updated", this.handleWeaponUpdated, this); + + this.events.on( + "resume", + ( + scene: this, + data: { + previous: string; + updatedList: string[]; + updateCodeList: string[]; + upgradeList: string[]; + } + ) => { + if (data.previous === "pause") { + return; + } + this.itemList = data.updatedList; + this.updateCodeList = data.updateCodeList; + if (this.upgrades < data.upgradeList.length) { + this.handleWeaponUpdated(data.upgradeList); + } + } + ); + } + + private handleEnterDoor() { + if (!this.theseus) { + return; + } + const tile = this.doorOpened.getTileAtWorldXY( + this.theseus.x, + this.theseus.y, + true + ); + + this.swordStatus = []; + this.bowStatus = []; + + let pushComplete = false; + + if (this.cursors?.space.isDown && tile.index != -1) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (!pushComplete) { + this.swordStatus.push(this.theseus.getSword.damage.toString()); + this.swordStatus.push(this.theseus.getSword.speed.toString()); + this.swordStatus.push(this.theseus.getSword.attackType); + this.bowStatus.push(this.theseus.getBow.damage.toString()); + this.bowStatus.push(this.theseus.getBow.speed.toString()); + this.bowStatus.push(this.theseus.getBow.attackType); + + pushComplete = true; + } - const message = `Phaser v${Phaser.VERSION}`; - this.add - .text(this.cameras.main.width - 15, 15, message, { - color: "#000000", - fontSize: "24px", - }) - .setOrigin(1, 0); + if (this.threads > 1) { + this.scene.start("mainScene", { + hp: this.theseus.health, + threads: this.threads - 1, + weaponType: this.theseus.weaponType, + itemList: this.itemList, + updateCodeList: this.updateCodeList, + swordStatus: this.swordStatus, + bowStatus: this.bowStatus, + isEasyMode: this.isEasyMode, + }); + } else { + this.scene.start("minotaur", { + hp: this.theseus.health, + threads: this.threads - 1, + weaponType: this.theseus.weaponType, + itemList: this.itemList, + updateCodeList: this.updateCodeList, + swordStatus: this.swordStatus, + bowStatus: this.bowStatus, + isEasyMode: this.isEasyMode, + }); + } + } + } + + private handlePlayerEnemyCollision( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const redEyesSkeleton = obj2 as RedEyesSkeleton; + + const dx = this.theseus!.x - redEyesSkeleton.x; + const dy = this.theseus!.y - redEyesSkeleton.y; + + const dir = new Phaser.Math.Vector2(dx, dy).normalize().scale(100); + + this.theseus?.handleDamage(dir); + + sceneEvents.emit("player-health-changed", this.theseus?.health); + + this.events.on(Phaser.Scenes.Events.SHUTDOWN, () => { + sceneEvents.off( + "player-health-changed", + this.handlePlayerEnemyCollision, + this + ); + }); + + if (this.theseus?.gameOVer) { + this.time.delayedCall(1000, () => { + this.scene.start("GameOver"); + }); + } + } + + private handlePlayerEnemyCollisionBat( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const flyingBats = obj2 as flyingBats; + + const dx = this.theseus!.x - flyingBats.x; + const dy = this.theseus!.y - flyingBats.y; + + const dir = new Phaser.Math.Vector2(dx, dy).normalize().scale(100); + + this.theseus?.handleDamage(dir); + + sceneEvents.emit("player-health-changed", this.theseus?.health); + + this.events.on(Phaser.Scenes.Events.SHUTDOWN, () => { + sceneEvents.off( + "player-health-changed", + this.handlePlayerEnemyCollision, + this + ); + }); + + if (this.theseus?.gameOVer) { + this.time.delayedCall(1000, () => { + this.scene.start("GameOver"); + }); + } + } + + private handlePlayerEnemyCollisionBlobMonster( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const blobMonster = obj2 as BlobMonster; + + const dx = this.theseus!.x - blobMonster.x; + const dy = this.theseus!.y - blobMonster.y; + + const dir = new Phaser.Math.Vector2(dx, dy).normalize().scale(100); + + this.theseus?.handleDamage(dir); + + sceneEvents.emit("player-health-changed", this.theseus?.health); + + this.events.on(Phaser.Scenes.Events.SHUTDOWN, () => { + sceneEvents.off( + "player-health-changed", + this.handlePlayerEnemyCollision, + this + ); + }); + + if (this.theseus?.gameOVer) { + this.time.delayedCall(1000, () => { + this.scene.start("GameOver"); + }); + } + } + + private handleEnemySwordAttacked( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const redEyesSkeleton = obj2 as RedEyesSkeleton; + const swordSlash = + obj1 as Phaser.Types.Physics.Arcade.SpriteWithDynamicBody; + this.events.emit("swordSlashHit", swordSlash); + + if (this.theseus?.getWeapon) { + redEyesSkeleton.handleDamage( + this.theseus.getWeapon.damage, + this.theseus.getWeapon.attackType + ); + } + } + + private handleEnemySwordAttackedBat( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const flyingBats = obj2 as flyingBats; + const swordSlash = + obj1 as Phaser.Types.Physics.Arcade.SpriteWithDynamicBody; + this.events.emit("swordSlashHit", swordSlash); + + if (this.theseus?.getWeapon) { + flyingBats.handleDamage( + this.theseus.getWeapon.damage, + this.theseus.getWeapon.attackType + ); + } + } + + private handleEnemySwordAttackedBlobMonster( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const blobMonster = obj2 as BlobMonster; + const swordSlash = + obj1 as Phaser.Types.Physics.Arcade.SpriteWithDynamicBody; + this.events.emit("swordSlashHit", swordSlash); + + if (this.theseus?.getWeapon) { + blobMonster.handleDamage( + this.theseus.getWeapon.damage, + this.theseus.getWeapon.attackType + ); + } + } + + private handleEnemyBowAttacked( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const redEyesSkeleton = obj2 as RedEyesSkeleton; + const arrow = obj1 as Phaser.Types.Physics.Arcade.SpriteWithDynamicBody; + this.events.emit("arrowHit", arrow); + + if (this.theseus?.getWeapon) { + redEyesSkeleton.handleDamage( + this.theseus.getWeapon.damage, + this.theseus.getWeapon.attackType + ); + } + } + + private handleEnemyBowAttackedBat( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const flyingBats = obj2 as flyingBats; + const arrow = obj1 as Phaser.Types.Physics.Arcade.SpriteWithDynamicBody; + this.events.emit("arrowHit", arrow); + + if (this.theseus?.getWeapon) { + flyingBats.handleDamage( + this.theseus.getWeapon.damage, + this.theseus.getWeapon.attackType + ); + } + } + + private handleEnemyBowAttackedBlobMonster( + obj1: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + obj2: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const blobMonster = obj2 as BlobMonster; + const arrow = obj1 as Phaser.Types.Physics.Arcade.SpriteWithDynamicBody; + this.events.emit("arrowHit", arrow); + + if (this.theseus?.getWeapon) { + blobMonster.handleDamage( + this.theseus.getWeapon.damage, + this.theseus.getWeapon.attackType + ); + } + } + + private handleEnemyDefeated() { + this.doorLayer.setCollisionByProperty({ collides: true }, false); + this.doorLayer.setVisible(false); + } + + private handleEnemyDropItem(dropX: number, dropY: number) { + const ranNum = Math.random() * 100; + + if (ranNum <= 50) { + const randomWeight = Math.random() * 100; + let accumulatedWeight = 0; + let itemIdx = 0; + for (const item of this.dropList) { + accumulatedWeight += item.weight; + if (randomWeight <= accumulatedWeight) { + itemIdx = this.dropList.indexOf(item); + break; + } + } + // const ranIdx = Math.floor(Math.random() * this.dropList.length); + const dropItem = this.physics.add.image( + dropX, + dropY, + this.dropList[itemIdx].item + ); + dropItem.setScale(1.5); + this.tweens.add({ + targets: dropItem, + y: "-=10", + duration: 1000, + yoyo: true, + repeat: -1, + }); + if (!this.theseus) { + return; + } + this.physics.add.overlap( + this.theseus, + dropItem, + this.handlePlayerItemGet, + undefined, + this + ); + } + } + + private handlePlayerItemGet( + player: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile, + item: + | Phaser.Types.Physics.Arcade.GameObjectWithBody + | Phaser.Tilemaps.Tile + ) { + const dropItem = + item as Phaser.Types.Physics.Arcade.SpriteWithDynamicBody; + this.itemList.push(dropItem.texture.key); + console.log(this.itemList); + dropItem.destroy(); + } + + private handleWeaponUpdated(upgradeList: string[]) { + if (!this.theseus) { + return; + } + upgradeList.forEach((text: string, index: number) => { + if (!this.theseus) { + return; + } + if (index >= this.upgrades) { + if (text === "sword-fire") { + this.theseus.getSword.attackType = "fire"; + } else if (text === "sword-ice") { + this.theseus.getSword.attackType = "ice"; + } else if (text === "sword-damage-up") { + this.theseus.getSword.incDamage(); + } else if (text === "sword-speed-up") { + this.theseus.getSword.incSpeed(); + } else if (text === "bow-poison") { + this.theseus.getBow.attackType = "poison"; + } else if (text === "bow-triple") { + this.theseus.getBow.attackType = "triple"; + } else if (text === "bow-damage-up") { + this.theseus.getBow.incDamage(); + } else if (text === "bow-speed-up") { + this.theseus.getBow.incSpeed(); + } + this.upgrades++; + } + }); + this.swordStatus = []; + this.bowStatus = []; + this.swordStatus.push(this.theseus.getSword.damage.toString()); + this.swordStatus.push(this.theseus.getSword.speed.toString()); + this.swordStatus.push(this.theseus.getSword.attackType); + this.bowStatus.push(this.theseus.getBow.damage.toString()); + this.bowStatus.push(this.theseus.getBow.speed.toString()); + this.bowStatus.push(this.theseus.getBow.attackType); + sceneEvents.emit("weapon-status-update", { + swordStatus: this.swordStatus, + bowStatus: this.bowStatus, + }); + console.log( + "sword", + this.theseus.getSword.damage, + this.theseus.getSword.attackType, + this.theseus.getSword.speed, + "\nbow", + this.theseus.getBow.damage, + this.theseus.getBow.attackType, + this.theseus.getBow.speed, + "\nupgrades", + this.upgrades, + upgradeList + ); } update() { - this.fpsText.update(); + const enemyRemained = + this.threads === 3 + ? this.blobMonster?.getChildren() + : this.threads === 2 + ? this.flyingBat?.getChildren() + : this.redEyesSkeletons?.getChildren(); + if (enemyRemained!.length === 0) { + this.events.emit("enemyDefeated"); + } + + if (this.theseus) { + this.theseus.update(this.cursors!); + } + + if (this.redEyesSkeletons) { + this.redEyesSkeletons.children.iterate((c) => { + const redEyesSkeleton = c as RedEyesSkeleton; + redEyesSkeleton.update(); + return true; + }); + } + + if (this.flyingBat) { + this.flyingBat.children.iterate((c) => { + const flyingBats = c as flyingBats; + flyingBats.update(); + return true; + }); + } + if (this.blobMonster) { + this.blobMonster.children.iterate((c) => { + const blobMonster = c as BlobMonster; + blobMonster.update(); + return true; + }); + } } } diff --git a/src/scenes/preloadScene.ts b/src/scenes/preloadScene.ts index c17b81ba..42b42714 100644 --- a/src/scenes/preloadScene.ts +++ b/src/scenes/preloadScene.ts @@ -6,10 +6,100 @@ export default class PreloadScene extends Phaser.Scene { } preload() { - this.load.image("phaser-logo", "assets/img/phaser-logo.png"); + this.load.image("background", "assets/img/background.jpg"); + this.load.image("base_tiles", "assets/tileset.png"); + this.load.tilemapTiledJSON("tilemap", "assets/maze_background.json"); + + this.load.atlas( + "faune", + "assets/characters/fauna.png", + "assets/characters/fauna.json" + ); + this.load.image("sword", "assets/weapons/sword_normal.png"); + this.load.atlas( + "swordSlash", + "assets/weapons/slash1.png", + "assets/weapons/slash1.json" + ); + + this.load.atlas( + "swordSlash-ice", + "assets/weapons/slash2.png", + "assets/weapons/slash2.json" + ); + + this.load.atlas( + "swordSlash-fire", + "assets/weapons/slash3.png", + "assets/weapons/slash3.json" + ); + + this.load.atlas( + "skeleton_red_eyes", + "assets/characters/skeleton_red_eyes.png", + "assets/characters/skeleton_red_eyes.json" + ); + this.load.atlas( + "minotaur", + "assets/characters/minotaur_black.png", + "assets/characters/minotaur_black.json" + ); + + this.load.atlas( + "flying_bat", + "assets/characters/flying_bat.png", + "assets/characters/flying_bat.json" + ); + + this.load.atlas( + "blob_monster", + "assets/characters/blob_monster.png", + "assets/characters/blob_monster.json" + ); + + this.load.image("heart-empty", "assets/ui_heart_empty.png"); + this.load.image("heart-full", "assets/ui_heart_full.png"); + + //Load the music for the titleScene + this.load.audio("titleScene", ["assets/Music/titleScene.mp3"]); + + //Load the image of Ariadne + this.load.image("Ariadne", "assets/characters/Ariadne.png"); + + //Load the image of the next button + this.load.image("ArrowButton", "assets/Buttons/ArrowButton.png"); + + //Load the image of the map frame + this.load.image("BlackFrame", "assets/img/BlackFrame.png"); + + this.load.image("threads", "assets/threads.png"); + this.load.image("weaponBox", "assets/weaponBox.png"); + this.load.atlas( + "bow", + "assets/weapons/bow.png", + "assets/weapons/bow.json" + ); + this.load.image("arrow", "assets/weapons/arrow.png"); + this.load.image("next-button", "assets/next_button.png"); + + this.load.image("sword-damage-up", "assets/items/sword_damage_up.png"); + this.load.image("sword-speed-up", "assets/items/sword_speed_up.png"); + this.load.image("sword-fire", "assets/items/sword_fire.png"); + this.load.image("sword-ice", "assets/items/sword_ice.png"); + this.load.image("bow-damage-up", "assets/items/bow_damage_up.png"); + this.load.image("bow-speed-up", "assets/items/bow_speed_up.png"); + this.load.image("bow-poison", "assets/items/bow_poison.png"); + this.load.image("bow-triple", "assets/items/bow_triple.png"); + + this.load.image("tuto-move", "assets/tuto_move.png"); + this.load.image("tuto-attack", "assets/tuto_attack.png"); + this.load.image("tuto-weapon-change", "assets/tuto_weapon_change.png"); + this.load.image("tuto-enter-door", "assets/tuto_enter_door.png"); + this.load.image("tuto-weapon-design", "assets/tuto_weapon_design.png"); + this.load.image("tuto-pause", "assets/tuto_pause.png"); } create() { - this.scene.start("MainScene"); + this.scene.start("TitleScene"); } } diff --git a/src/screen/weaponDesignTexts.ts b/src/screen/weaponDesignTexts.ts new file mode 100644 index 00000000..d83f34bc --- /dev/null +++ b/src/screen/weaponDesignTexts.ts @@ -0,0 +1,376 @@ +import Phaser from "phaser"; + +const createWeaponDesignScreen = ( + scene: Phaser.Scene, + theseusFile: Phaser.GameObjects.Group, + mainFile: Phaser.GameObjects.Group, + swordFile: Phaser.GameObjects.Group, + bowFile: Phaser.GameObjects.Group +) => { + scene.add + .rectangle( + scene.cameras.main.width / 2, + scene.cameras.main.height / 2, + scene.cameras.main.width * 0.9, + scene.cameras.main.height * 0.9, + 0xffffff, + 0.85 + ) + .setOrigin(0.5) + .setDepth(999); + + scene.add + .rectangle( + scene.cameras.main.width * 0.85, + scene.cameras.main.height / 2, + 1, + scene.cameras.main.height * 0.9, + 0x000000 + ) + .setOrigin(0.5) + .setDepth(1000); + + scene.add + .rectangle( + scene.cameras.main.width / 2, + 40, + scene.cameras.main.width * 0.9, + 1, + 0x000000 + ) + .setOrigin(0.5) + .setDepth(1000); + + scene.add + .text(scene.cameras.main.width * 0.9, 28, "Items", { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + }) + .setOrigin(0.5) + .setDepth(1000); + + //Text group of Theseus.java + const theseusTitle = scene.add + .text(scene.cameras.main.width * 0.45, 28, "Theseus.java", { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + // //stroke: "0xffffff", + color: "0x000000", + }) + .setOrigin(0.5) + .setDepth(1000); + + const theseusBody = scene.add + .text( + scene.cameras.main.width * 0.05 + 77, + 78, + "public class Theseus {\n" + + "\t\t\t\tprivate double speed ;\n" + + "\t\t\t\tprivate Sword sword ;\n" + + "\t\t\t\tprivate Bow bow ;", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const theseusConstructor = scene.add + .text( + scene.cameras.main.width * 0.1 + 82, + 168, + "public Theseus() {\n" + + "\t\t\t\tthis.speed = 5 ;\n" + + "\t\t\t\tthis.sword = new Sword() ; \n" + + "\t\t\t\tthis.bow = new Bow() ;\n}", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const theseusGetterSetter = scene.add + .text( + scene.cameras.main.width * 0.3 + 59, + 265, + "public double getSpeed() { return this.speed ; }\n" + + "public double getSword() { return this.sword ; }\n" + + "public double getBow() { return this.bow ; }\n" + + "public void setSpeed(double speed) { this.speed = speed ; }\n", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + const theseusClose = scene.add + .text(scene.cameras.main.width * 0.05 + 10, 305, "}", { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + }) + .setOrigin(0.5) + .setDepth(1000); + + theseusFile.add(theseusTitle); + theseusFile.add(theseusBody); + theseusFile.add(theseusConstructor); + theseusFile.add(theseusGetterSetter); + theseusFile.add(theseusClose); + + //Text group of main.java + const mainTitle = scene.add + .text(scene.cameras.main.width * 0.45, 28, "main.java", { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + }) + .setOrigin(0.5) + .setDepth(1000); + + const mainBody = scene.add + .text( + scene.cameras.main.width * 0.05 + 110, + 60, + "public static void main(String[] args) {\n" + + "\t\t\t\tTheseus theseus = new Theseus() ;", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + mainFile.add(mainTitle); + mainFile.add(mainBody); + + //Text group of Sword.java + const swordTitle = scene.add + .text(scene.cameras.main.width * 0.45, 28, "Sword.java", { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + }) + .setOrigin(0.5) + .setDepth(1000); + + const swordBody = scene.add + .text( + scene.cameras.main.width * 0.05 + 82, + 78, + "public class Sword {\n" + + "\t\t\t\tprivate double damage ;\n" + + "\t\t\t\tprivate double speed ;\n" + + "\t\t\t\tprivate string type ;", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + const swordConstructor = scene.add + .text( + scene.cameras.main.width * 0.1 + 63, + 168, + "public Sword() {\n" + + "\t\t\t\tthis.damage = 5 ;\n" + + "\t\t\t\tthis.speed = 2 ; \n" + + '\t\t\t\tthis.type = "classic";\n}', + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const swordGetterSetter = scene.add + .text( + scene.cameras.main.width * 0.3 + 38, + 265, + "public double getDamage() { return this.damage ; }\n" + + "public double getSpeed() { return this.speed ; }\n" + + "public double getType() { return this.type ; }\n" + + "public void setType(string type) { this.type = type ; }\n", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const swordMethods = scene.add + .text( + scene.cameras.main.width * 0.3 + 25, + 320, + "public void incDamage() { this.damage += 2 ; }\n" + + "public void incSpeed() { this.speed += 1 ; }", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const swordClose = scene.add + .text(scene.cameras.main.width * 0.05 + 10, 347, "}", { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + }) + .setOrigin(0.5) + .setDepth(1000); + + swordFile.add(swordTitle); + swordFile.add(swordBody); + swordFile.add(swordConstructor); + swordFile.add(swordGetterSetter); + swordFile.add(swordMethods); + swordFile.add(swordClose); + + //Text group of Bow.java + const bowTitle = scene.add + .text(scene.cameras.main.width * 0.45, 28, "Bow.java", { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + }) + .setOrigin(0.5) + .setDepth(1000); + + const bowBody = scene.add + .text( + scene.cameras.main.width * 0.05 + 82, + 78, + "public class Bow {\n" + + "\t\t\t\tprivate double damage ;\n" + + "\t\t\t\tprivate double speed ;\n" + + "\t\t\t\tprivate string type ;", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + const bowConstructor = scene.add + .text( + scene.cameras.main.width * 0.1 + 63, + 168, + "public Bow() {\n" + + "\t\t\t\tthis.damage = 2 ;\n" + + "\t\t\t\tthis.speed = 3 ; \n" + + '\t\t\t\tthis.type = "classic";\n}', + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const bowGetterSetter = scene.add + .text( + scene.cameras.main.width * 0.3 + 38, + 265, + "public double getDamage() { return this.damage ; }\n" + + "public double getSpeed() { return this.speed ; }\n" + + "public double getType() { return this.type ; }\n" + + "public void setType(string type) { this.type = type ; }\n", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + const bowMethods = scene.add + .text( + scene.cameras.main.width * 0.3 + 25, + 320, + "public void incDamage() { this.damage += 1 ; }\n" + + "public void incSpeed() { this.speed += 1 ; }", + { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + } + ) + .setOrigin(0.5) + .setDepth(1000); + + const bowClose = scene.add + .text(scene.cameras.main.width * 0.05 + 10, 347, "}", { + fontSize: "12px", + fontFamily: "American Typewriter", + strokeThickness: 1, + //stroke: "0xffffff", + color: "0x000000", + }) + .setOrigin(0.5) + .setDepth(1000); + + bowFile.add(bowTitle); + bowFile.add(bowBody); + bowFile.add(bowConstructor); + bowFile.add(bowGetterSetter); + bowFile.add(bowMethods); + bowFile.add(bowClose); +}; + +export { createWeaponDesignScreen }; diff --git a/src/utils/debug.ts b/src/utils/debug.ts new file mode 100644 index 00000000..4e754cfa --- /dev/null +++ b/src/utils/debug.ts @@ -0,0 +1,18 @@ +import Phaser from "phaser"; + +const debugDraw = ( + layer: Phaser.Tilemaps.TilemapLayer, + scene: Phaser.Scene, + flag: boolean +) => { + if (flag) { + const debugGraphics = scene.add.graphics().setAlpha(0.7); + layer.renderDebug(debugGraphics, { + tileColor: null, + collidingTileColor: new Phaser.Display.Color(243, 234, 48, 255), + faceColor: new Phaser.Display.Color(40, 39, 37, 255), + }); + } +}; + +export { debugDraw }; diff --git a/src/weapons/bow.ts b/src/weapons/bow.ts new file mode 100644 index 00000000..880802c3 --- /dev/null +++ b/src/weapons/bow.ts @@ -0,0 +1,155 @@ +import Phaser from "phaser"; + +declare global { + namespace Phaser.GameObjects { + interface GameObjectFactory { + bow( + x: number, + y: number, + texture: string, + frame?: string | number + ): Bow; + } + } +} + +export default class Bow extends Phaser.Physics.Arcade.Sprite { + private _damage: number; + private _speed: number; + private _attackType: string; + + get damage() { + return this._damage; + } + + get speed() { + return this._speed; + } + + get attackType() { + return this._attackType; + } + + set damage(damage: number) { + this._damage = damage; + } + + set speed(speed: number) { + this._speed = speed; + } + + set attackType(newType: string) { + this._attackType = newType; + } + + constructor( + scene: Phaser.Scene, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + super(scene, x, y, texture, frame); + this._damage = 2; + this._speed = 3; + this._attackType = "classic"; + this.anims.play("bow-idle"); + } + + handleArrow(angle: number) { + const arrow = this.scene.physics.add.image(this.x, this.y, "arrow"); + arrow.setScale(2); + + arrow.body.setSize(arrow.width * 0.8, arrow.height * 0.8); + + this.scene.events.emit("arrowCreated", arrow); + + this.anims.play("bow_attack", true); + + arrow.setScale(0.3); + arrow.setRotation(angle - Math.PI / 4); + + this.scene.physics.moveTo( + arrow, + this.scene.input.x, + this.scene.input.y, + 250 + ); + + if (this._attackType === "triple") { + this.scene.time.delayedCall(50, () => { + const arrow = this.scene.physics.add + .image(this.x, this.y, "arrow") + .setScale(2); + arrow.body.setSize(arrow.width * 0.8, arrow.height * 0.8); + this.scene.events.emit("arrowCreated", arrow); + arrow.setScale(0.3); + arrow.setRotation(angle - Math.PI / 4); + this.scene.physics.moveTo( + arrow, + this.scene.input.x, + this.scene.input.y, + 250 + ); + this.scene.time.delayedCall(50, () => { + const arrow = this.scene.physics.add + .image(this.x, this.y, "arrow") + .setScale(2); + arrow.body.setSize(arrow.width * 0.8, arrow.height * 0.8); + this.scene.events.emit("arrowCreated", arrow); + arrow.setScale(0.3); + arrow.setRotation(angle - Math.PI / 4); + this.scene.physics.moveTo( + arrow, + this.scene.input.x, + this.scene.input.y, + 250 + ); + }); + }); + } + + this.scene.events.on( + "arrowHit", + (arrow: Phaser.Types.Physics.Arcade.ImageWithDynamicBody) => { + arrow.destroy(); + } + ); + } + + incDamage() { + this._damage += 1; + } + + incSpeed() { + this._speed += 1; + } + + update() {} +} + +Phaser.GameObjects.GameObjectFactory.register( + "bow", + function ( + this: Phaser.GameObjects.GameObjectFactory, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + var sprite = new Bow(this.scene, x, y, texture, frame); + + this.displayList.add(sprite); + this.updateList.add(sprite); + + this.scene.physics.world.enableBody( + sprite, + Phaser.Physics.Arcade.DYNAMIC_BODY + ); + + sprite.setScale(0.5); + sprite.setOrigin(0.5, 0.5); + + return sprite; + } +); diff --git a/src/weapons/sword.ts b/src/weapons/sword.ts new file mode 100644 index 00000000..17c6d75c --- /dev/null +++ b/src/weapons/sword.ts @@ -0,0 +1,145 @@ +import Phaser from "phaser"; + +declare global { + namespace Phaser.GameObjects { + interface GameObjectFactory { + sword( + x: number, + y: number, + texture: string, + frame?: string | number + ): Sword; + } + } +} + +export default class Sword extends Phaser.Physics.Arcade.Sprite { + private swordslash?: Phaser.Physics.Arcade.Sprite; + private _damage: number; + private _speed: number; + private _attackType: string; + + get damage() { + return this._damage; + } + + get speed() { + return this._speed; + } + + get attackType() { + return this._attackType; + } + + set damage(damage: number) { + this._damage = damage; + } + + set speed(speed: number) { + this._speed = speed; + } + + set attackType(newType: string) { + this._attackType = newType; + } + + constructor( + scene: Phaser.Scene, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + super(scene, x, y, texture, frame); + this._damage = 5; + this._speed = 2; + this._attackType = "classic"; + } + + handleSwordSlash(angle: number) { + const swordSlash = this.scene.physics.add.sprite( + this.x, + this.y, + "swordSlash", + "Classic_13.png" + ); + + if (this.attackType === "ice") { + swordSlash.setFrame("Alternative_2_13.png"); + swordSlash.anims.play("sword_attack_ice", true); + } else if (this.attackType === "fire") { + swordSlash.setFrame("Alternative_3_13.png"); + swordSlash.anims.play("sword_attack_fire", true); + } else { + swordSlash.anims.play("sword_attack", true); + } + + swordSlash.body.setSize( + swordSlash.width * 0.4, + swordSlash.height * 0.4 + ); + + this.scene.events.emit("swordSlashCreated", swordSlash); + + swordSlash.setScale(0.3); + swordSlash.setRotation(angle - Math.PI / 4); + + swordSlash.on( + Phaser.Animations.Events.ANIMATION_COMPLETE, + () => { + swordSlash.destroy(); + }, + this + ); + + this.scene.physics.moveTo( + swordSlash, + this.scene.input.x, + this.scene.input.y, + 200 + ); + + this.scene.events.on( + "swordSlashHit", + (swordSlash: Phaser.Types.Physics.Arcade.SpriteWithDynamicBody) => { + swordSlash.destroy(); + } + ); + } + + incDamage() { + this._damage += 1; + } + + incSpeed() { + this._speed += 1; + } + + update() {} +} + +Phaser.GameObjects.GameObjectFactory.register( + "sword", + function ( + this: Phaser.GameObjects.GameObjectFactory, + x: number, + y: number, + texture: string, + frame?: string | number + ) { + var sprite = new Sword(this.scene, x, y, texture, frame); + + this.displayList.add(sprite); + this.updateList.add(sprite); + + this.scene.physics.world.enableBody( + sprite, + Phaser.Physics.Arcade.DYNAMIC_BODY + ); + + sprite.setScale(0.5); + sprite.setOrigin(0, 1); + + return sprite; + } +); diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index 03a698e7..b372fb22 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -35,7 +35,7 @@ module.exports = { }, plugins: [ new HtmlWebpackPlugin({ - gameName: "My Phaser Game", + gameName: "Infamia di Creti", template: "assets/index.html", }), new CopyWebpackPlugin({