From 43a28ad77190f2e55e2e6ba65a9a7b5b1f5dea6c Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 20 Aug 2023 20:48:29 +0200 Subject: area progression, item usage --- db/_generated/areas/route1.json | 2 +- db/areas/route1.json | 1 + index.html | 19 +- resources/css/battle.css | 34 +++- resources/css/menu.css | 139 +++++++------- resources/js/classes/InventoryItem.js | 3 +- resources/js/classes/Monster.js | 4 + resources/js/classes/State.js | 5 + resources/js/classes/Trainer.js | 36 ++-- resources/js/game.js | 131 ++++++++++++-- resources/js/main.js | 15 +- resources/js/ui.js | 329 +++++++++++++++++++++++++++------- 12 files changed, 552 insertions(+), 166 deletions(-) diff --git a/db/_generated/areas/route1.json b/db/_generated/areas/route1.json index 11eaf46..3956a3c 100644 --- a/db/_generated/areas/route1.json +++ b/db/_generated/areas/route1.json @@ -1 +1 @@ -{"encounter_slug":"route1","encounters":[{"monster":"pairagrin","encounter_rate":3.5,"daytime":true,"exp_req_mod":1,"level_range":[2,4]},{"monster":"aardorn","encounter_rate":3.5,"daytime":true,"exp_req_mod":1,"level_range":[2,4]},{"monster":"cataspike","encounter_rate":3.5,"daytime":true,"exp_req_mod":1,"level_range":[2,4]},{"monster":"pairagrin","encounter_rate":3.5,"daytime":false,"exp_req_mod":1,"level_range":[3,5]},{"monster":"aardorn","encounter_rate":3.5,"daytime":false,"exp_req_mod":1,"level_range":[3,5]},{"monster":"cataspike","encounter_rate":3.5,"daytime":false,"exp_req_mod":1,"level_range":[3,5]}],"requiredEncounters":10,"trainers":[{"name":"Bruder Mikki","monsters":[{"slug":"memnomnom","level":5},{"slug":"jelillow","level":5}],"inventory":[{"slug":"potion","quantity":2}]}],"environment_slug":"forest","previousArea":"paper-town","nextArea":"route2","environment":{"slug":"forest","battle_graphics":{"island_back":"woodland_island.png","island_front":"woodland_island.png","background":"forest_background.png"},"battle_music":"music_battle_loop"}} \ No newline at end of file +{"encounter_slug":"route1","encounters":[{"monster":"pairagrin","encounter_rate":3.5,"daytime":true,"exp_req_mod":1,"level_range":[2,4]},{"monster":"aardorn","encounter_rate":3.5,"daytime":true,"exp_req_mod":1,"level_range":[2,4]},{"monster":"cataspike","encounter_rate":3.5,"daytime":true,"exp_req_mod":1,"level_range":[2,4]},{"monster":"pairagrin","encounter_rate":3.5,"daytime":false,"exp_req_mod":1,"level_range":[3,5]},{"monster":"aardorn","encounter_rate":3.5,"daytime":false,"exp_req_mod":1,"level_range":[3,5]},{"monster":"cataspike","encounter_rate":3.5,"daytime":false,"exp_req_mod":1,"level_range":[3,5]}],"requiredEncounters":10,"trainers":[{"name":"Bruder Mikki","sprite":"dragonrider.png","monsters":[{"slug":"memnomnom","level":5},{"slug":"jelillow","level":5}],"inventory":[{"slug":"potion","quantity":2}]}],"environment_slug":"forest","previousArea":"paper-town","nextArea":"route2","environment":{"slug":"forest","battle_graphics":{"island_back":"woodland_island.png","island_front":"woodland_island.png","background":"forest_background.png"},"battle_music":"music_battle_loop"}} \ No newline at end of file diff --git a/db/areas/route1.json b/db/areas/route1.json index 54cc345..3d1cf23 100644 --- a/db/areas/route1.json +++ b/db/areas/route1.json @@ -8,6 +8,7 @@ "trainers": [ { "name": "Bruder Mikki", + "sprite": "dragonrider.png", "monsters": [ { "slug": "memnomnom", diff --git a/index.html b/index.html index ae14db0..4ae9189 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,8 @@
- + +
@@ -25,10 +26,10 @@
Money: - Monster Progress: - Trainer Progress: - - + Monster Progress: + Trainer Progress: + +
@@ -226,7 +227,13 @@