From 289a342917e9291895b0332dd4ab412b15a7fabf Mon Sep 17 00:00:00 2001 From: troido Date: Mon, 6 Apr 2020 19:29:43 +0200 Subject: added rooms from python asciifarm --- content/encyclopediae/default_encyclopedia.json | 107 ++++++++++++++++-- content/maps/_home.json | 6 +- content/maps/basement.json | 49 ++++++++ content/maps/begin.json | 142 ++++++++++++++++++++++++ content/maps/cave.json | 93 ++++++++++++++++ content/maps/right.json | 110 ++++++++++++++++++ content/maps/room.json | 52 ++++----- content/maps/smallview.json | 87 +++++++++++++++ content/maps/town.json | 106 ++++++++++++++++++ content/maps/tutorial.json | 135 ++++++++++++++++++++++ 10 files changed, 851 insertions(+), 36 deletions(-) create mode 100644 content/maps/basement.json create mode 100644 content/maps/begin.json create mode 100644 content/maps/cave.json create mode 100644 content/maps/right.json create mode 100644 content/maps/smallview.json create mode 100644 content/maps/town.json create mode 100644 content/maps/tutorial.json (limited to 'content') diff --git a/content/encyclopediae/default_encyclopedia.json b/content/encyclopediae/default_encyclopedia.json index 760779d..411f1c1 100644 --- a/content/encyclopediae/default_encyclopedia.json +++ b/content/encyclopediae/default_encyclopedia.json @@ -68,17 +68,24 @@ "flags": ["Floor"] }, "water": { - "components": [], "sprite": "water", - "height": 0.1 + "height": 0.0 }, + "house": {"height": 3.0, "sprite": "house"}, + "freeland": {}, "portal": { - "arguments": [["destination", "string"], ["dest_pos", "string", ""]], + "arguments": [["destination", "string"], ["destpos", "string", ""]], "components": [ - ["RoomExit", {"destination": ["arg", "destination"], "dest_pos": ["arg", "dest_pos"]}] + ["RoomExit", {"destination": ["arg", "destination"], "dest_pos": ["arg", "destpos"]}] ], "flags": ["Floor"] }, + "img": { + "arguments": [["sprite", "string", ""], ["height", "float", 1.0]], + "components": [ + ["Visible", {"name": ["arg", "sprite"], "sprite": ["arg", "sprite"], "height": ["arg", "height"]}] + ] + }, "builtwall": { "arguments": [["health", "int", 100]], "components": [ @@ -112,7 +119,7 @@ }, "rat": { "sprite": "rat", - "height": 1, + "height": 1.0, "components": [ ["MonsterAI", { "view_distance": 3, @@ -123,7 +130,68 @@ ["Fighter", {"damage": 2, "cooldown": 6}], ["Movable", {"cooldown": 3}], "Mortal", - ["Faction", {"faction": "evil"}] + ["Faction", {"faction": "evil"}], + ["Loot", {"loot": ["list", [ + ["list", [{"type": "radishseed"}, 1.0]] + ]]}] + ] + }, + "goblin": { + "sprite": "goblin", + "height": 1.0, + "components": [ + ["MonsterAI", { + "view_distance": 8, + "move_chance": 0.02, + "homesickness": 0.1 + }], + ["Health", {"health": 15, "maxhealth": 15}], + ["Fighter", {"damage": 5, "cooldown": 8}], + ["Movable", {"cooldown": 4}], + "Mortal", + ["Faction", {"faction": "evil"}], + ["Loot", {"loot": ["list", [ + ["list", [{"type": "sword"}, 0.05]], + ["list", [{"type": "club"}, 0.1]], + ["list", [{"type": "radish"}, 0.25]] + ]]}] + ] + }, + "troll": { + "sprite": "troll", + "height": 1.0, + "components": [ + ["MonsterAI", { + "view_distance": 8, + "move_chance": 0.01, + "homesickness": 0.1 + }], + ["Health", {"health": 75, "maxhealth": 75}], + ["Fighter", {"damage": 15, "cooldown": 10}], + ["Movable", {"cooldown": 5}], + "Mortal", + ["Faction", {"faction": "evil"}], + ["Loot", {"loot": ["list", [ + ["list", [{"type": "stone"}, 1.0]], + ["list", [{"type": "stone"}, 0.3]], + ["list", [{"type": "pebble"}, 0.5]], + ["list", [{"type": "pebble"}, 0.5]], + ["list", [{"type": "pebble"}, 0.5]] + ]]}] + + ] + }, + "rabbit": { + "sprite": "rabbit", + "height": 1.0, + "components": [ + ["MonsterAI", { + "view_distance": 3, + "move_chance": 0.08, + "homesickness": 0.1 + }], + ["Movable", {"cooldown": 3}], + ["Faction", {"faction": "neutral"}] ] }, "spawner": { @@ -184,6 +252,23 @@ "sprite": "seedling", "height": 0.05, "name": "seedling", + "components": [ + ["Grow", { + "delay": 600, + "target_time": ["arg", "target_time"], + "into": ["template", "youngradishplant"] + }] + ], + "extract": { + "target_time": ["Grow", "target_time"] + }, + "flags": ["Occupied"] + }, + "youngradishplant": { + "arguments": [["target_time", "int", 0]], + "sprite": "youngplant", + "height": 0.05, + "name": "youngradishplate", "components": [ ["Grow", { "delay": 600, @@ -316,7 +401,15 @@ "carrot": {"sprite": "food", "action": ["eat", 5]}, "sword": {"action": ["equip", { "slot": "hand", - "stats": {"strength": 50} + "stats": {"strength": 5} + }]}, + "club": {"action": ["equip", { + "slot": "hand", + "stats": {"strength": 3} + }]}, + "armour": {"action": ["equip", { + "slot": "body", + "stats": {"defence": 3} }]} }, "templates":{ diff --git a/content/maps/_home.json b/content/maps/_home.json index 656ad94..13bbeb2 100644 --- a/content/maps/_home.json +++ b/content/maps/_home.json @@ -1,10 +1,10 @@ { "width": 64, "height": 64, - "spawn": [63,0], + "spawn": [0,0], "places": {}, "field":[ - ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%", + "%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", @@ -73,7 +73,7 @@ ",": ["grass"], "%": [{ "type": "portal", - "kwargs": {"destination": "room"} + "kwargs": {"destination": "smallview", "destpos": "home"} }, "ground"] } } diff --git a/content/maps/basement.json b/content/maps/basement.json new file mode 100644 index 0000000..0d090b4 --- /dev/null +++ b/content/maps/basement.json @@ -0,0 +1,49 @@ +{ + "width": 24, + "height": 11, + "spawn": [17, 8], + "places": { + "stairup": [17, 8] + }, + + "field": [ + " ############### ", + " #++++++++a++++# ", + " #+++++++++++++# ", + " #+a+++++++++++# ", + " #+++++++++++++# ", + " #+++++a+++++++# ", + " ##D######D##### ", + " #++++++#++++++# ", + " #+a++:+#++++<+# ", + " #++++++#++++++# ", + " ############### " + ], + "mapping": { + ",": "grass", + "Y": ["grass", "radishplant"], + "~": "water", + "#": "wall", + "X": "rock", + ".": "ground", + "+": "floor", + "^": ["spiketrap"], + "D": ["ground", "closeddoor"], + "<": [ + {"type": "portal", "args": ["begin", "stairdown"]}, + {"type": "img", "args": ["stairup"]}, + "floor" + ], + "a": ["floor", { + "type": "spawner", + "args": [{"type": "rat"}, 1, 300], + "kwargs": {"initialSpawn": true, "setHome": true} + }], + ":": ["floor", { + "type": "spawner", + "args": [{"type": "carrotseed"}, 1, 1200], + "kwargs": {"initialSpawn": false} + }], + " ": [] + } +} diff --git a/content/maps/begin.json b/content/maps/begin.json new file mode 100644 index 0000000..34a72cb --- /dev/null +++ b/content/maps/begin.json @@ -0,0 +1,142 @@ +{ + "width": 64, + "height": 64, + "spawn": [15, 30], + "places": { + "stairdown": [37, 33], + "caveentrance": [31, 50], + "right": [62, 10], + "cavebridge": [1, 60] + }, + "field": [ + + + + + + + + + ",,,,,,,,,,,,,,,,,,,,,,,,,,,~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", + ",,,,,,,,,,,,,,,,,~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", + ",,,,,,,,,,,,~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", + ",,,,,,,,~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,,,,,,,,,,,,,,,,,,,'1", + ",,,,,,~~~~~~~~~~~~~~~~~~~~~~~~,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'1", + ",,,,~~~~~~~~~~~~~~~,,,,,,,,,,,,,,,,,,,,,,,,,,,,T,,,,,,,,,,,,,,'1", + ",,,~~~~~~~~~~~,,,,,,,,,,,,,,,,,,,,,,,,,T,,,,,,,,,,,,,,,,,,,,,,'1", + ",,~~~~~~~~~,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'1", + ",,~~~~~~,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,T,,,,,,T,,,,,,,,,,,'1", + ",~~~~~~,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'1", + ",~~~~~,,,,,,,,,''''''''T'''''''''''''''''''''''T'''''''''''''''1", + "~~~~~~,,,,,,,'''''''''''''T''''''''''''''''''''''''''''''''''''1", + "~~~~~''''T''''.................................................1", + "~~~~~.'''''''.'''''''''''''''''''''''''''''''''''''''''''''''''1", + "~~~~~........''''''''''''''''''''''''''''''''''''''''''''''''''1", + "~~~~~.'''...''*',,,,,,,,,,,,,,,,,,,,,,,,,,'''''''',,,,,,,,,,,,'1", + "~~~~~''''...'''',,,,,,,,,,,,,,,,,,,,,,,,,,'''''''',T,,,,,,,,,,'1", + "~~~~~'''''..'''',,,,,,,,,,,,,,,,,,,,,,,,,,'''''''',,,,,,,,,,,,'1", + ",~~~~'''''..'''',,,,,,,,,,,,,,,,,,,,,,,,,,'''''''',,,,,,,,,,,,'1", + ",~~~~'''*''.'''',,,,,,,,,,,,,,,,,,,,,,,,T,'''''''',,,,,,,,,,,,'1", + ",~~~~~,,,,..'''',,,,,,,,,,,,,,,,,,T,,,,,,,'''''''',,,,,,,,,,,,'1", + ",~~~~~,,,,'..''',,,,,,,,,,,,,,,,,,,,,,,,,,'''''''',,,,,,,,,,,,'1", + ",~~~~~,,,,''.''',,,,,,,,,,,,,,,,,,,,,,,,,,'''''''',,,,,,,,,,,,'1", + ",~~~~~,,,,,'..'',,,,,,,,,,,,,,,,,,,,,,,,,,'''''''',,,,,,,,,,,,'1", + ",~~~~~,,,,,''.'E,,,,,,,,,,,,,,,,,,,,,,,,,,'''T'''',,,,,,,,,,,,'1", + ",~~~~~,,,,,'..''''''#####################''''''''',,,,,,,,,,,,'1", + ",~~~~~,,,,,''..'''BB#+++++++++++++#+++++#''''''''',,,,,,,,,,,,'1", + ",~~~~~'''''''..'''.'#+++++++++++++#+++++#''''''''',,,,,,,,,,,,'1", + "~~~~~'''5''''''../!]#+++++++++++++++++++#''''''''',,,,,,,,,,,,'1", + "~~~~~'''6''''.'.''..D+++++++++++++#+++++#''''''''',,,,,,,,,,,,'1", + "~~~~~'''7'..''.'....D+++++++++++++#######''''''''',,,,,,,,,,,,'1", + "~~~~~'888''.'..'....#+++++++++++++#+++++#''''''''',,,,,,,,,,,,'1", + "~~~~,,,,,,'.'#d.....#+++++++++++++#+++++#''''''''',,,,,,,,,,,,'1", + "~~~~,,,,,,8.'#..d..^#+++++++++++++++++>+#''''''''',,,,,,,,,,,,'1", + "~~~~,,,,,,'.'########+++++++++++++#+++++#''''''''',,,,,,,,,,,,'1", + "~~~~,,,,,,'.''''''''#####################''''''''',,,,,,,,,,,,'1", + "~~~~,,,,,,8.'''''''''''''''''''''''''''''''''''''',,,,,,,,,,,,'1", + "~~~~~,,,,,'.'''''''''''''''''''''''''''''''''''''',,,,,,,,,,,,'1", + "~~~~~,,,,,'.'''''''''''''''''''''''''''''''''''''''''''''''''''1", + "~~~~~~,,,,'....................................................1", + ",~~~~~,,,,'''T'''''''''''''''''''''''''''''''''''''''''''''''''1", + ",~~~~~~''''''''''''''''''''''''''''''''''''''''''''''''''''''''1", + ",~~~~~~''''''''',,,,,,,,,,,,,,,''.',,,,,,,,,',,,,,,,,,,,,,,,,,'1", + ",,~~~~~'',,,,,,,,,,,,,,,,,,,,,,'''',,,,T,,,,',,,,,,,,,,,,,,,,,'1", + ",,~~~~~'',,,,,,,,,,,,,,,,,,,,,,'.'',,,,,,,,,',,T,,,,r,,,r,,,,,'1", + ",,~~~~~'',,,,,,,,,,,,,,,,,,,,,,T'.',,,,,,,,,',,,,,,,,,,,,,,,,,'1", + ",,~~~~~'',,,,,T,,,,,,,,,,,,,,,,'''',T,,,,,T,',,,,,,T,,r,,,,,,,'1", + ",,~~~~~'',,,,,,,,,,,,,,,,,T,,,,'''',,,,,,,,,',T,,,,,,,,,,,,,,,'1", + ",,~~~~~'',,,,,,,,,,,,,,,,,,,,,,'T.',,,,,,,,T,,,,,,,r,,,,T,,,,,'1", + ",,~~~~~'',,,,,,,,,,,,,,,,,,,,,,'''',,,T,,,,,,,,,,,,,,,,,,,,,,,'1", + ",~~~~~~'',,,,,,,,,,,,XXXXXXXXXX'.'',,,,,,,,,,,,T,,,,,,,T,,,,,,'1", + ",~~~~~~'',,,,,,XXXXXXX XCX'',,,,,T,,,,,,,,,,,,,,,,,,,,,XX", + ",~~~~~'''',,XXXX XXXXX,,,,,,,,,,,,T,,,,,,,,,,,,XXX ", + ",~~~~~''''XXX XXXX,,,,,,,,,,,,,,,,,,,,,XX ", + "X~~~~~'''XX XXX,,,,,,,XX,,,,,,,,,,X ", + "X~~~~~''XX XXX,,,XXXXXXX,,,,,,XX ", + "X~~~~~''X X,,XX XXXX,,XX ", + "X~~~~~''X X,XX XXXX ", + "X~~~~~'XX XXX ", + "#~~~~~'XX ", + "2=====''X ", + "#~~~~~XXX ", + "X~~~~~X ", + "X~~~~~X " + ], + "mapping": { + ",": ["grass", "freeland"], + "'": ["grass"], + "Y": ["grass", "radishplant"], + "T": ["grass", "tree"], + "~": "water", + "=": ["water", "bridge"], + "o": ["grass", "stone", "stone", "stone", "stone", "stone", "stone", "stone", "stone"], + "W": ["grass", "hardwood", "hardwood", "hardwood", "hardwood", "hardwood", "hardwood", "hardwood", "hardwood"], + "*": ["grass", "pebble"], + "d": ["ground", { + "type": "spawner", + "args": [{"type": "dummy"}, 1, 600], + "kwargs": {"initialSpawn": true} + }], + "D": ["ground", "opendoor"], + "#": "wall", + ":": ["ground", { + "type": "spawner", + "args": ["radishseed", 1, 600], + "kwargs": {"initialSpawn": false} + }], + ";": ["floor", "radishseed"], + ".": "ground", + "+": "floor", + "X": "rock", + "^": ["spiketrap", "ground"], + ">": [ + {"type": "portal", "kwargs": {"destination": "basement", "destpos": "stairup"}}, + {"type": "img", "kwargs": {"sprite": "stairdown"}}, + "floor" + ], + "C": [ + {"type": "portal", "kwargs": {"destination": "cave", "destpos": "stairup"}}, + {"type": "img", "kwargs": {"sprite": "stairdown"}}, + "floor" + ], + "r": ["grass", "rabbit"], + "/": ["grass", "sword"], + "!": ["grass", "club"], + "]": ["grass", "armour"], + "1": [{ + "type": "portal", + "kwargs": {"destination": "right", "destpos": "left"} + }], + "2": [{ + "type": "portal", + "kwargs": {"destination": "tutorial", "destpos": "tunnelout"} + }, "floor"], + "E": ["grass", "trader"], + "B": ["grass", "freeland", "builtwall"], + "5": ["grass", "plantedradishseed"], + "6": ["grass", "radishseedling"], + "7": ["grass", "youngradishplant"], + "8": ["grass", "radishplant"], + " ": [] + } +} diff --git a/content/maps/cave.json b/content/maps/cave.json new file mode 100644 index 0000000..6086d78 --- /dev/null +++ b/content/maps/cave.json @@ -0,0 +1,93 @@ +{ + "width": 64, + "height": 44, + "spawn": [32, 4], + "places": { + "stairup": [32, 4] + }, + "field": [ + " ", + " ", + " XXX ", + " XXX