aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacopograndi <jacopo.grandi@outlook.it>2022-01-17 16:21:29 +0100
committerjacopograndi <jacopo.grandi@outlook.it>2022-01-17 16:21:29 +0100
commite2b1324becf85fabfd046b3e4333b2639b9e1838 (patch)
tree74a17875eb587d11559314e2a01ec4aebb2ddb88
parent4c6f7fe6d90770a3faaa0cc4972b34cf1148142e (diff)
enemy json
-rw-r--r--assets/json/enemies.json311
-rw-r--r--assets/json/enemies_gen.py88
-rw-r--r--assets/json/turrets.json325
3 files changed, 724 insertions, 0 deletions
diff --git a/assets/json/enemies.json b/assets/json/enemies.json
new file mode 100644
index 0000000..ed3945c
--- /dev/null
+++ b/assets/json/enemies.json
@@ -0,0 +1,311 @@
+[
+ {
+ "lives": 10,
+ "speed": 1,
+ "damage": 1,
+ "spawn_num": 1,
+ "name": "T",
+ "model_name": "T.glb",
+ "thumbnail_name": "T.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1.2,
+ "damage": 1,
+ "spawn_num": 1,
+ "name": "kT",
+ "spawn_on_death": "T",
+ "model_name": "kT.glb",
+ "thumbnail_name": "kT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1.2,
+ "damage": 1,
+ "spawn_num": 2,
+ "name": "dkT",
+ "spawn_on_death": "kT",
+ "model_name": "dkT.glb",
+ "thumbnail_name": "dkT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1,
+ "damage": 2,
+ "spawn_num": 1,
+ "name": "aT",
+ "spawn_on_death": "T",
+ "model_name": "aT.glb",
+ "thumbnail_name": "aT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1.2,
+ "damage": 2,
+ "spawn_num": 1,
+ "name": "kaT",
+ "spawn_on_death": "aT",
+ "model_name": "kaT.glb",
+ "thumbnail_name": "kaT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1.2,
+ "damage": 2,
+ "spawn_num": 2,
+ "name": "dkaT",
+ "spawn_on_death": "kaT",
+ "model_name": "dkaT.glb",
+ "thumbnail_name": "dkaT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1,
+ "damage": 4,
+ "spawn_num": 1,
+ "name": "aaT",
+ "spawn_on_death": "aT",
+ "model_name": "aaT.glb",
+ "thumbnail_name": "aaT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1,
+ "damage": 4,
+ "spawn_num": 2,
+ "name": "daaT",
+ "spawn_on_death": "aaT",
+ "model_name": "daaT.glb",
+ "thumbnail_name": "daaT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1.2,
+ "damage": 4,
+ "spawn_num": 2,
+ "name": "kdaaT",
+ "spawn_on_death": "daaT",
+ "model_name": "kdaaT.glb",
+ "thumbnail_name": "kdaaT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1.2,
+ "damage": 4,
+ "spawn_num": 4,
+ "name": "dkdaaT",
+ "spawn_on_death": "kdaaT",
+ "model_name": "dkdaaT.glb",
+ "thumbnail_name": "dkdaaT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1,
+ "damage": 8,
+ "spawn_num": 1,
+ "name": "aaaT",
+ "spawn_on_death": "aaT",
+ "model_name": "aaaT.glb",
+ "thumbnail_name": "aaaT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1,
+ "damage": 8,
+ "spawn_num": 2,
+ "name": "daaaT",
+ "spawn_on_death": "aaaT",
+ "model_name": "daaaT.glb",
+ "thumbnail_name": "daaaT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1,
+ "damage": 2,
+ "spawn_num": 2,
+ "name": "daT",
+ "spawn_on_death": "aT",
+ "model_name": "daT.glb",
+ "thumbnail_name": "daT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1.2,
+ "damage": 2,
+ "spawn_num": 2,
+ "name": "kdaT",
+ "spawn_on_death": "daT",
+ "model_name": "kdaT.glb",
+ "thumbnail_name": "kdaT.png"
+ },
+ {
+ "lives": 10,
+ "speed": 1.2,
+ "damage": 2,
+ "spawn_num": 4,
+ "name": "dkdaT",
+ "spawn_on_death": "kdaT",
+ "model_name": "dkdaT.glb",
+ "thumbnail_name": "dkdaT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.8,
+ "damage": 2,
+ "spawn_num": 1,
+ "name": "saT",
+ "spawn_on_death": "aT",
+ "model_name": "saT.glb",
+ "thumbnail_name": "saT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.8,
+ "damage": 2,
+ "spawn_num": 2,
+ "name": "dsaT",
+ "spawn_on_death": "saT",
+ "model_name": "dsaT.glb",
+ "thumbnail_name": "dsaT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.8,
+ "damage": 1,
+ "spawn_num": 1,
+ "name": "sT",
+ "spawn_on_death": "T",
+ "model_name": "sT.glb",
+ "thumbnail_name": "sT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.96,
+ "damage": 1,
+ "spawn_num": 1,
+ "name": "ksT",
+ "spawn_on_death": "sT",
+ "model_name": "ksT.glb",
+ "thumbnail_name": "ksT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.96,
+ "damage": 1,
+ "spawn_num": 2,
+ "name": "dksT",
+ "spawn_on_death": "ksT",
+ "model_name": "dksT.glb",
+ "thumbnail_name": "dksT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.8,
+ "damage": 2,
+ "spawn_num": 1,
+ "name": "asT",
+ "spawn_on_death": "sT",
+ "model_name": "asT.glb",
+ "thumbnail_name": "asT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.8,
+ "damage": 2,
+ "spawn_num": 2,
+ "name": "dasT",
+ "spawn_on_death": "asT",
+ "model_name": "dasT.glb",
+ "thumbnail_name": "dasT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.96,
+ "damage": 2,
+ "spawn_num": 2,
+ "name": "kdasT",
+ "spawn_on_death": "dasT",
+ "model_name": "kdasT.glb",
+ "thumbnail_name": "kdasT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.96,
+ "damage": 2,
+ "spawn_num": 4,
+ "name": "dkdasT",
+ "spawn_on_death": "kdasT",
+ "model_name": "dkdasT.glb",
+ "thumbnail_name": "dkdasT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.8,
+ "damage": 4,
+ "spawn_num": 1,
+ "name": "aasT",
+ "spawn_on_death": "asT",
+ "model_name": "aasT.glb",
+ "thumbnail_name": "aasT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.8,
+ "damage": 4,
+ "spawn_num": 2,
+ "name": "daasT",
+ "spawn_on_death": "aasT",
+ "model_name": "daasT.glb",
+ "thumbnail_name": "daasT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.8,
+ "damage": 1,
+ "spawn_num": 2,
+ "name": "dsT",
+ "spawn_on_death": "sT",
+ "model_name": "dsT.glb",
+ "thumbnail_name": "dsT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.96,
+ "damage": 1,
+ "spawn_num": 2,
+ "name": "kdsT",
+ "spawn_on_death": "dsT",
+ "model_name": "kdsT.glb",
+ "thumbnail_name": "kdsT.png"
+ },
+ {
+ "lives": 30,
+ "speed": 0.96,
+ "damage": 1,
+ "spawn_num": 4,
+ "name": "dkdsT",
+ "spawn_on_death": "kdsT",
+ "model_name": "dkdsT.glb",
+ "thumbnail_name": "dkdsT.png"
+ },
+ {
+ "lives": 90,
+ "speed": 0.6400000000000001,
+ "damage": 1,
+ "spawn_num": 1,
+ "name": "ssT",
+ "spawn_on_death": "sT",
+ "model_name": "ssT.glb",
+ "thumbnail_name": "ssT.png"
+ },
+ {
+ "lives": 90,
+ "speed": 0.6400000000000001,
+ "damage": 1,
+ "spawn_num": 2,
+ "name": "dssT",
+ "spawn_on_death": "ssT",
+ "model_name": "dssT.glb",
+ "thumbnail_name": "dssT.png"
+ }
+]
diff --git a/assets/json/enemies_gen.py b/assets/json/enemies_gen.py
new file mode 100644
index 0000000..258b091
--- /dev/null
+++ b/assets/json/enemies_gen.py
@@ -0,0 +1,88 @@
+nodes = [
+ 'T', 'kT', 'dkT',
+ 'aT', 'kaT', 'dkaT', 'aaT', 'daaT', 'kdaaT',
+ 'dkdaaT', 'aaaT', 'daaaT', 'daT', 'kdaT', 'dkdaT', 'saT', 'dsaT',
+ 'sT', 'ksT', 'dksT', 'asT', 'dasT', 'kdasT',
+ 'dkdasT', 'aasT', 'daasT', 'dsT', 'kdsT', 'dkdsT', 'ssT', 'dssT'
+]
+
+edges = {
+ 'kT': 'T',
+ 'dkT': 'kT',
+ 'aT': 'T',
+ 'kaT': 'aT',
+ 'dkaT': 'kaT',
+ 'aaT': 'aT',
+ 'daaT': 'aaT',
+ 'kdaaT': 'daaT',
+ 'dkdaaT': 'kdaaT',
+ 'aaaT': 'aaT',
+ 'daaaT': 'aaaT',
+ 'daT': 'aT',
+ 'kdaT': 'daT',
+ 'dkdaT': 'kdaT',
+ 'saT': 'aT',
+ 'dsaT': 'saT',
+ 'sT': 'T',
+ 'ksT': 'sT',
+ 'dksT': 'ksT',
+ 'asT': 'sT',
+ 'dasT': 'asT',
+ 'kdasT': 'dasT',
+ 'dkdasT': 'kdasT',
+ 'aasT': 'asT',
+ 'daasT': 'aasT',
+ 'dsT': 'sT',
+ 'kdsT': 'dsT',
+ 'dkdsT': 'kdsT',
+ 'ssT': 'sT',
+ 'dssT': 'ssT',
+}
+
+base = {
+ "lives": 10,
+ "speed": 1,
+ "damage": 1,
+ "spawn_num": 1
+}
+
+bonus = {
+ "T": {},
+ "k": { "speed": 1.2 },
+ "a": { "damage": 2 },
+ "d": { "spawn_num": 2 },
+ "s": { "speed": 0.8, "lives": 3 },
+}
+
+def get_stats (node):
+ stats = base.copy()
+ bonuses = { k:1 for k in stats }
+ for char in node:
+ effects = bonus[char]
+ for e in effects:
+ bonuses[e] = effects[e] * bonuses[e]
+
+ for s in stats:
+ stats[s] *= bonuses[s]
+ return stats
+
+def get_enemy (node):
+ enemy = get_stats(node)
+ enemy['name'] = node
+ if node in edges:
+ enemy['spawn_on_death'] = edges[node]
+ enemy["model_name"] = node + '.glb'
+ enemy["thumbnail_name"] = node + '.png'
+ return enemy
+
+
+def main ():
+ enemies = []
+ for n in nodes:
+ enemies += [ get_enemy(n) ]
+
+ import json
+ raw = json.dumps(enemies, indent=4)
+ with open("enemies.json", "w") as f: f.write(raw)
+
+if __name__ == "__main__": main()
diff --git a/assets/json/turrets.json b/assets/json/turrets.json
new file mode 100644
index 0000000..3ef9db3
--- /dev/null
+++ b/assets/json/turrets.json
@@ -0,0 +1,325 @@
+[
+ {
+ "name": "laser",
+ "cost": { "T": 100 },
+ "cooldown": 1.0,
+ "damage": 1,
+ "turn_speed": 3,
+ "range": 5,
+ "upgrades": [ "heavy laser", "sniper" ],
+ "modules_max": 6,
+ "model_name": "laser.glb",
+ "thumbnail_name": "laser.png",
+ "projectile": {
+ "type": "bullet",
+ "speed": 5,
+ "model_name": "laser_shot.glb",
+ "amount": 1
+ }
+ },
+ {
+ "name": "heavy laser",
+ "cost": { "T": 250 },
+ "cooldown": 0.9,
+ "damage": 2,
+ "turn_speed": 3,
+ "range": 5,
+ "upgrades": [ "minigun" ],
+ "modules_max": 6,
+ "model_name": "laser.glb",
+ "thumbnail_name": "laser.png",
+ "projectile": {
+ "type": "bullet",
+ "speed": 5,
+ "model_name": "laser_shot.glb",
+ "amount": 1
+ }
+ },
+ {
+ "name": "minigun",
+ "cost": { "T": 1000 },
+ "cooldown": 0.2,
+ "damage": 2,
+ "turn_speed": 10,
+ "range": 5,
+ "modules_max": 6,
+ "model_name": "laser.glb",
+ "thumbnail_name": "laser.png",
+ "projectile": {
+ "type": "bullet",
+ "speed": 10,
+ "model_name": "laser_shot.glb",
+ "amount": 1
+ }
+ },
+ {
+ "name": "sniper",
+ "cost": { "T": 300 },
+ "cooldown": 2,
+ "damage": 3,
+ "turn_speed": 1,
+ "range": 7,
+ "upgrades": [ "railgun" ],
+ "modules_max": 4,
+ "model_name": "sniper.glb",
+ "thumbnail_name": "sniper.png",
+ "projectile": {
+ "type": "ray",
+ "model_name": "ray_laser.glb",
+ "amount": 1
+ }
+ },
+ {
+ "name": "railgun",
+ "cost": { "T": 1200 },
+ "cooldown": 5,
+ "damage": 10,
+ "turn_speed": 1,
+ "range": 8,
+ "modules_max": 4,
+ "model_name": "sniper.glb",
+ "thumbnail_name": "laser.png",
+ "projectile": {
+ "type": "ray",
+ "model_name": "ray_laser.glb",
+ "amount": 1
+ }
+ },
+ {
+ "name": "shotgun",
+ "cost": { "T": 250 },
+ "cooldown": 2.0,
+ "damage": 1,
+ "turn_speed": 1,
+ "range": 4,
+ "upgrades": [ "cannon" ],
+ "modules_max": 3,
+ "model_name": "shotgun.glb",
+ "thumbnail_name": "shotgun.png",
+ "projectile": {
+ "type": "bullet",
+ "speed": 5,
+ "model_name": "bullet_shot.glb",
+ "amount": 5,
+ "spread": 10
+ }
+ },
+ {
+ "name": "cannon",
+ "cost": { "T": 400 },
+ "cooldown": 2.0,
+ "damage": 5,
+ "turn_speed": 1,
+ "range": 4,
+ "upgrades": [ "tesla" ],
+ "modules_max": 3,
+ "model_name": "shotgun.glb",
+ "thumbnail_name": "shotgun.png",
+ "projectile": {
+ "type": "bomb",
+ "speed": 3,
+ "model_name": "bullet_shot.glb"
+ }
+ },
+ {
+ "name": "tesla",
+ "cost": { "T": 800 },
+ "cooldown": 1.0,
+ "damage": 2,
+ "turn_speed": 1,
+ "range": 4,
+ "modules_max": 5,
+ "model_name": "shotgun.glb",
+ "thumbnail_name": "shotgun.png",
+ "projectile": {
+ "type": "shock",
+ "jumps": 5,
+ "model_name": "bullet_shot.glb"
+ }
+ },
+ {
+ "name": "plastic",
+ "cost": { "T": 400 },
+ "cooldown": 1.5,
+ "damage": 1,
+ "turn_speed": 0.5,
+ "range": 6,
+ "upgrades": [ "heavy plastic" ],
+ "modules_max": 3,
+ "model_name": "plastic.glb",
+ "thumbnail_name": "plastic.png",
+ "projectile": {
+ "type": "bounce",
+ "model_name": "bullet_bounce.glb",
+ "speed": 5,
+ "max bounces": 2,
+ "amount": 1
+ }
+ },
+ {
+ "name": "heavy plastic",
+ "cost": { "T": 400 },
+ "cooldown": 1.5,
+ "damage": 2,
+ "turn_speed": 0.5,
+ "range": 6,
+ "upgrades": [ "plasma plastic" ],
+ "modules_max": 3,
+ "model_name": "plastic.glb",
+ "thumbnail_name": "plastic.png",
+ "projectile": {
+ "type": "bounce",
+ "model_name": "bullet_bounce.glb",
+ "speed": 7.5,
+ "max bounces": 4,
+ "amount": 1
+ }
+ },
+ {
+ "name": "plasma plastic",
+ "cost": { "T": 800 },
+ "cooldown": 1,
+ "damage": 2,
+ "turn_speed": 0.5,
+ "range": 6,
+ "upgrades": [ "plasma plastic" ],
+ "modules_max": 4,
+ "model_name": "plastic.glb",
+ "thumbnail_name": "plastic.png",
+ "projectile": {
+ "type": "bounce",
+ "lifetime": 5,
+ "model_name": "bullet_bounce.glb",
+ "speed": 10,
+ "amount": 1
+ }
+ },
+ {
+ "name": "slower",
+ "cost": { "T": 350 },
+ "cooldown": 1,
+ "turn_speed": 5,
+ "range": 5,
+ "upgrades": [ "heavy slower", "stopper" ],
+ "modules_max": 4,
+ "model_name": "slower.glb",
+ "thumbnail_name": "slower.png",
+ "slowness": 5,
+ "projectile": {
+ "type": "bullet",
+ "model_name": "bullet_slow.glb",
+ "speed": 10,
+ "amount": 1
+ }
+ },
+ {
+ "name": "heavy slower",
+ "cost": { "T": 500 },
+ "cooldown": 0.7,
+ "turn_speed": 5,
+ "range": 6,
+ "upgrades": [ "final slower" ],
+ "modules_max": 5,
+ "model_name": "slower.glb",
+ "thumbnail_name": "slower.png",
+ "slowness": 7,
+ "projectile": {
+ "type": "bullet",
+ "model_name": "bullet_slow.glb",
+ "speed": 10,
+ "amount": 1
+ }
+ },
+ {
+ "name": "final slower",
+ "cost": { "T": 1000 },
+ "cooldown": 2,
+ "turn_speed": 5,
+ "range": 7,
+ "modules_max": 5,
+ "model_name": "slower.glb",
+ "thumbnail_name": "slower.png",
+ "slowness": 10,
+ "projectile": {
+ "type": "ray",
+ "model_name": "ray_slow.glb",
+ "amount": 1
+ }
+ },
+ {
+ "name": "stopper",
+ "cost": { "T": 750 },
+ "cooldown": 5,
+ "range": 2,
+ "upgrades": [ "heavy stopper" ],
+ "modules_max": 4,
+ "model_name": "slower.glb",
+ "thumbnail_name": "slower.png",
+ "stop": 3,
+ "projectile": {
+ "type": "area",
+ "model_name": "ray_slow.glb",
+ "amount": 1
+ }
+ },
+ {
+ "name": "heavy stopper",
+ "cost": { "T": 1000 },
+ "cooldown": 3,
+ "range": 3,
+ "modules_max": 5,
+ "model_name": "slower.glb",
+ "thumbnail_name": "slower.png",
+ "stop": 5,
+ "projectile": {
+ "type": "area",
+ "model_name": "ray_slow.glb",
+ "amount": 1
+ }
+ },
+ {
+ "name": "T generator",
+ "cost": { "T": 800 },
+ "resource_per_wave": { "T": 100 },
+ "upgrades": [ "kad generator" ],
+ "max_modules": 2,
+ "model_name": "finance.glb",
+ "thumbnail_name": "finance.png"
+ },
+ {
+ "name": "kad generator",
+ "cost": { "T": 400 },
+ "resource_per_wave": { "k": 30, "a": 30, "d": 30 },
+ "upgrades": [ "s generator" ],
+ "max_modules": 2,
+ "model_name": "finance.glb",
+ "thumbnail_name": "finance.png"
+ },
+ {
+ "name": "s generator",
+ "cost": { "T": 800 },
+ "resource_per_wave": { "s": 30 },
+ "max_modules": 3,
+ "model_name": "finance.glb",
+ "thumbnail_name": "finance.png"
+ },
+ {
+ "name": "struct I",
+ "cost": { "T": 50 },
+ "model_name": "structI.glb",
+ "thumbnail_name": "structI.png"
+ },
+ {
+ "name": "struct T",
+ "cost": { "T": 100 },
+ "collider": "sphere",
+ "model_name": "structT.glb",
+ "thumbnail_name": "structT.png"
+ },
+ {
+ "name": "struct X",
+ "cost": { "T": 150 },
+ "model_name": "structX.glb",
+ "thumbnail_name": "structX.png"
+ }
+]