summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-08-20 14:32:40 +0200
committerDaniel Weipert <code@drogueronin.de>2023-08-20 14:32:40 +0200
commitb227fc9c2ef361f8aa5ee2f24aa1ade6bc972a73 (patch)
tree8fdd7e980107bfd8fcd58ffe21f2299b37d310c8 /db
parent2c7890e90e1aad371854cfe60ad63eaa88e64fec (diff)
area progress
Diffstat (limited to 'db')
-rw-r--r--db/_generated/areas/paper-town.json1
-rw-r--r--db/_generated/areas/route1.json1
-rw-r--r--db/_generated/areas/route2.json1
-rw-r--r--db/_generated/areas/route3.json1
-rw-r--r--db/areas.php17
-rw-r--r--db/areas/paper-town.json20
-rw-r--r--db/areas/route1.json34
-rw-r--r--db/areas/route2.json14
-rw-r--r--db/areas/route3.json14
9 files changed, 103 insertions, 0 deletions
diff --git a/db/_generated/areas/paper-town.json b/db/_generated/areas/paper-town.json
new file mode 100644
index 0000000..c569938
--- /dev/null
+++ b/db/_generated/areas/paper-town.json
@@ -0,0 +1 @@
+{"encounter_slug":"","encounters":[],"requiredEncounters":0,"trainers":[{"name":"Rival","monsters":[],"inventory":[]}],"environment_slug":"interior","previousArea":"","nextArea":"route1","environment":{"slug":"interior","battle_graphics":{"island_back":"paper_back_island.png","island_front":"paper_front_island.png","background":"battle_bg03.png"},"battle_music":"music_battle_loop"}} \ No newline at end of file
diff --git a/db/_generated/areas/route1.json b/db/_generated/areas/route1.json
new file mode 100644
index 0000000..11eaf46
--- /dev/null
+++ b/db/_generated/areas/route1.json
@@ -0,0 +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
diff --git a/db/_generated/areas/route2.json b/db/_generated/areas/route2.json
new file mode 100644
index 0000000..2b4a00f
--- /dev/null
+++ b/db/_generated/areas/route2.json
@@ -0,0 +1 @@
+{"encounter_slug":"route2","encounters":[{"monster":"cardiling","encounter_rate":2.5,"daytime":true,"exp_req_mod":1,"level_range":[3,6]},{"monster":"aardorn","encounter_rate":2.5,"daytime":true,"exp_req_mod":1,"level_range":[3,6]},{"monster":"eyenemy","encounter_rate":2.5,"daytime":true,"exp_req_mod":1,"level_range":[3,6]},{"monster":"axylightl","encounter_rate":1,"daytime":true,"exp_req_mod":1,"level_range":[4,7]},{"monster":"cataspike","encounter_rate":2.5,"daytime":true,"exp_req_mod":1,"level_range":[3,6]},{"monster":"cardiling","encounter_rate":2.5,"daytime":false,"exp_req_mod":1,"level_range":[3,6]},{"monster":"aardorn","encounter_rate":2.5,"daytime":false,"exp_req_mod":1,"level_range":[4,8]},{"monster":"eyenemy","encounter_rate":2.5,"daytime":false,"exp_req_mod":1,"level_range":[4,8]},{"monster":"axylightl","encounter_rate":1,"daytime":false,"exp_req_mod":1,"level_range":[5,8]},{"monster":"cataspike","encounter_rate":2.5,"daytime":false,"exp_req_mod":1,"level_range":[4,8]}],"requiredEncounters":10,"trainers":[],"environment_slug":"forest","previousArea":"route1","nextArea":"route3","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/_generated/areas/route3.json b/db/_generated/areas/route3.json
new file mode 100644
index 0000000..45a32f0
--- /dev/null
+++ b/db/_generated/areas/route3.json
@@ -0,0 +1 @@
+{"encounter_slug":"route3","encounters":[{"monster":"cardiling","encounter_rate":3,"daytime":true,"exp_req_mod":1,"level_range":[7,10]},{"monster":"elofly","encounter_rate":3,"daytime":true,"exp_req_mod":1,"level_range":[7,10]},{"monster":"squabbit","encounter_rate":1,"daytime":true,"exp_req_mod":1,"level_range":[8,11]},{"monster":"shybulb","encounter_rate":3,"daytime":true,"exp_req_mod":1,"level_range":[7,10]},{"monster":"cardiling","encounter_rate":3,"daytime":false,"exp_req_mod":1,"level_range":[9,12]},{"monster":"elofly","encounter_rate":3,"daytime":false,"exp_req_mod":1,"level_range":[9,12]},{"monster":"squabbit","encounter_rate":1,"daytime":false,"exp_req_mod":1,"level_range":[9,12]},{"monster":"shybulb","encounter_rate":3,"daytime":false,"exp_req_mod":1,"level_range":[9,12]}],"requiredEncounters":10,"trainers":[],"environment_slug":"forest","previousArea":"route2","nextArea":"route4","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.php b/db/areas.php
new file mode 100644
index 0000000..55b2177
--- /dev/null
+++ b/db/areas.php
@@ -0,0 +1,17 @@
+<?php
+
+foreach (scandir(__DIR__ . '/areas') as $file) {
+ if (in_array($file, ['.', '..'])) continue;
+
+ $filePath = __DIR__ . '/areas/' . $file;
+ $fileName = pathinfo($file, PATHINFO_FILENAME);
+
+ $area = json_decode(file_get_contents($filePath), true);
+ $encounters = json_decode(@file_get_contents(dirname(__DIR__) . "/modules/tuxemon/mods/tuxemon/db/encounter/$area[encounter_slug].json") ?? '', true);
+ $environment = json_decode(file_get_contents(dirname(__DIR__) . "/modules/tuxemon/mods/tuxemon/db/environment/$area[environment_slug].json"), true);
+
+ array_push($area['encounters'], ...$encounters['monsters'] ?? []);
+ $area['environment'] = $environment;
+
+ file_put_contents(__DIR__ . "/_generated/areas/$fileName.json", json_encode($area));
+}
diff --git a/db/areas/paper-town.json b/db/areas/paper-town.json
new file mode 100644
index 0000000..b18e17e
--- /dev/null
+++ b/db/areas/paper-town.json
@@ -0,0 +1,20 @@
+{
+ "encounter_slug": "",
+
+ "encounters": [],
+
+ "requiredEncounters": 0,
+
+ "trainers": [
+ {
+ "name": "Rival",
+ "monsters": [],
+ "inventory": []
+ }
+ ],
+
+ "environment_slug": "interior",
+
+ "previousArea": "",
+ "nextArea": "route1"
+}
diff --git a/db/areas/route1.json b/db/areas/route1.json
new file mode 100644
index 0000000..54cc345
--- /dev/null
+++ b/db/areas/route1.json
@@ -0,0 +1,34 @@
+{
+ "encounter_slug": "route1",
+
+ "encounters": [],
+
+ "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"
+}
diff --git a/db/areas/route2.json b/db/areas/route2.json
new file mode 100644
index 0000000..f4fc9bb
--- /dev/null
+++ b/db/areas/route2.json
@@ -0,0 +1,14 @@
+{
+ "encounter_slug": "route2",
+
+ "encounters": [],
+
+ "requiredEncounters": 10,
+
+ "trainers": [],
+
+ "environment_slug": "forest",
+
+ "previousArea": "route1",
+ "nextArea": "route3"
+}
diff --git a/db/areas/route3.json b/db/areas/route3.json
new file mode 100644
index 0000000..e9242fb
--- /dev/null
+++ b/db/areas/route3.json
@@ -0,0 +1,14 @@
+{
+ "encounter_slug": "route3",
+
+ "encounters": [],
+
+ "requiredEncounters": 10,
+
+ "trainers": [],
+
+ "environment_slug": "forest",
+
+ "previousArea": "route2",
+ "nextArea": "route4"
+}