Replace map system
This commit is contained in:
		| @@ -1,779 +0,0 @@ | ||||
| { | ||||
| 	"__header__": { | ||||
| 		"fileType": "LDtk Project JSON", | ||||
| 		"app": "LDtk", | ||||
| 		"doc": "https://ldtk.io/json", | ||||
| 		"schema": "https://ldtk.io/files/JSON_SCHEMA.json", | ||||
| 		"appAuthor": "Sebastien 'deepnight' Benard", | ||||
| 		"appVersion": "1.5.3", | ||||
| 		"url": "https://ldtk.io" | ||||
| 	}, | ||||
| 	"iid": "f7ed7e70-c210-11ef-bffb-911ba1dc425d", | ||||
| 	"jsonVersion": "1.5.3", | ||||
| 	"appBuildId": 473703, | ||||
| 	"nextUid": 9, | ||||
| 	"identifierStyle": "Capitalize", | ||||
| 	"toc": [], | ||||
| 	"worldLayout": "Free", | ||||
| 	"worldGridWidth": 256, | ||||
| 	"worldGridHeight": 256, | ||||
| 	"defaultLevelWidth": 256, | ||||
| 	"defaultLevelHeight": 256, | ||||
| 	"defaultPivotX": 0, | ||||
| 	"defaultPivotY": 0, | ||||
| 	"defaultGridSize": 16, | ||||
| 	"defaultEntityWidth": 16, | ||||
| 	"defaultEntityHeight": 16, | ||||
| 	"bgColor": "#40465B", | ||||
| 	"defaultLevelBgColor": "#696A79", | ||||
| 	"minifyJson": false, | ||||
| 	"externalLevels": false, | ||||
| 	"exportTiled": false, | ||||
| 	"simplifiedExport": false, | ||||
| 	"imageExportMode": "None", | ||||
| 	"exportLevelBg": true, | ||||
| 	"pngFilePattern": null, | ||||
| 	"backupOnSave": false, | ||||
| 	"backupLimit": 10, | ||||
| 	"backupRelPath": null, | ||||
| 	"levelNamePattern": "Level_%idx", | ||||
| 	"tutorialDesc": null, | ||||
| 	"customCommands": [], | ||||
| 	"flags": [], | ||||
| 	"defs": { "layers": [ | ||||
| 		{ | ||||
| 			"__type": "Tiles", | ||||
| 			"identifier": "Floor_2", | ||||
| 			"type": "Tiles", | ||||
| 			"uid": 7, | ||||
| 			"doc": null, | ||||
| 			"uiColor": null, | ||||
| 			"gridSize": 32, | ||||
| 			"guideGridWid": 0, | ||||
| 			"guideGridHei": 0, | ||||
| 			"displayOpacity": 1, | ||||
| 			"inactiveOpacity": 1, | ||||
| 			"hideInList": false, | ||||
| 			"hideFieldsWhenInactive": false, | ||||
| 			"canSelectWhenInactive": true, | ||||
| 			"renderInWorldView": true, | ||||
| 			"pxOffsetX": 0, | ||||
| 			"pxOffsetY": 0, | ||||
| 			"parallaxFactorX": 0, | ||||
| 			"parallaxFactorY": 0, | ||||
| 			"parallaxScaling": true, | ||||
| 			"requiredTags": [], | ||||
| 			"excludedTags": [], | ||||
| 			"autoTilesKilledByOtherLayerUid": null, | ||||
| 			"uiFilterTags": [], | ||||
| 			"useAsyncRender": false, | ||||
| 			"intGridValues": [], | ||||
| 			"intGridValuesGroups": [], | ||||
| 			"autoRuleGroups": [], | ||||
| 			"autoSourceLayerDefUid": null, | ||||
| 			"tilesetDefUid": 1, | ||||
| 			"tilePivotX": 0, | ||||
| 			"tilePivotY": 0, | ||||
| 			"biomeFieldUid": null | ||||
| 		}, | ||||
| 		{ | ||||
| 			"__type": "Tiles", | ||||
| 			"identifier": "Walls", | ||||
| 			"type": "Tiles", | ||||
| 			"uid": 6, | ||||
| 			"doc": null, | ||||
| 			"uiColor": null, | ||||
| 			"gridSize": 32, | ||||
| 			"guideGridWid": 0, | ||||
| 			"guideGridHei": 0, | ||||
| 			"displayOpacity": 1, | ||||
| 			"inactiveOpacity": 1, | ||||
| 			"hideInList": false, | ||||
| 			"hideFieldsWhenInactive": false, | ||||
| 			"canSelectWhenInactive": true, | ||||
| 			"renderInWorldView": true, | ||||
| 			"pxOffsetX": 0, | ||||
| 			"pxOffsetY": 0, | ||||
| 			"parallaxFactorX": 0, | ||||
| 			"parallaxFactorY": 0, | ||||
| 			"parallaxScaling": true, | ||||
| 			"requiredTags": [], | ||||
| 			"excludedTags": [], | ||||
| 			"autoTilesKilledByOtherLayerUid": null, | ||||
| 			"uiFilterTags": [], | ||||
| 			"useAsyncRender": false, | ||||
| 			"intGridValues": [], | ||||
| 			"intGridValuesGroups": [], | ||||
| 			"autoRuleGroups": [], | ||||
| 			"autoSourceLayerDefUid": null, | ||||
| 			"tilesetDefUid": 3, | ||||
| 			"tilePivotX": 0, | ||||
| 			"tilePivotY": 0, | ||||
| 			"biomeFieldUid": null | ||||
| 		}, | ||||
| 		{ | ||||
| 			"__type": "Tiles", | ||||
| 			"identifier": "Floor", | ||||
| 			"type": "Tiles", | ||||
| 			"uid": 5, | ||||
| 			"doc": null, | ||||
| 			"uiColor": null, | ||||
| 			"gridSize": 32, | ||||
| 			"guideGridWid": 0, | ||||
| 			"guideGridHei": 0, | ||||
| 			"displayOpacity": 1, | ||||
| 			"inactiveOpacity": 1, | ||||
| 			"hideInList": false, | ||||
| 			"hideFieldsWhenInactive": false, | ||||
| 			"canSelectWhenInactive": true, | ||||
| 			"renderInWorldView": true, | ||||
| 			"pxOffsetX": 0, | ||||
| 			"pxOffsetY": 0, | ||||
| 			"parallaxFactorX": 0, | ||||
| 			"parallaxFactorY": 0, | ||||
| 			"parallaxScaling": true, | ||||
| 			"requiredTags": [], | ||||
| 			"excludedTags": [], | ||||
| 			"autoTilesKilledByOtherLayerUid": null, | ||||
| 			"uiFilterTags": [], | ||||
| 			"useAsyncRender": false, | ||||
| 			"intGridValues": [], | ||||
| 			"intGridValuesGroups": [], | ||||
| 			"autoRuleGroups": [], | ||||
| 			"autoSourceLayerDefUid": null, | ||||
| 			"tilesetDefUid": 2, | ||||
| 			"tilePivotX": 0, | ||||
| 			"tilePivotY": 0, | ||||
| 			"biomeFieldUid": null | ||||
| 		} | ||||
| 	], "entities": [], "tilesets": [ | ||||
| 		{ | ||||
| 			"__cWid": 3, | ||||
| 			"__cHei": 3, | ||||
| 			"identifier": "Intercut", | ||||
| 			"uid": 1, | ||||
| 			"relPath": "../tilesets/intercut.png", | ||||
| 			"embedAtlas": null, | ||||
| 			"pxWid": 96, | ||||
| 			"pxHei": 96, | ||||
| 			"tileGridSize": 32, | ||||
| 			"spacing": 0, | ||||
| 			"padding": 0, | ||||
| 			"tags": [], | ||||
| 			"tagsSourceEnumUid": null, | ||||
| 			"enumTags": [], | ||||
| 			"customData": [], | ||||
| 			"savedSelections": [], | ||||
| 			"cachedPixelData": { "opaqueTiles": "111111111", "averageColors": "f223f223f223f223f223f223f223f223f223" } | ||||
| 		}, | ||||
| 		{ | ||||
| 			"__cWid": 1, | ||||
| 			"__cHei": 1, | ||||
| 			"identifier": "Base", | ||||
| 			"uid": 2, | ||||
| 			"relPath": "../tilesets/base.png", | ||||
| 			"embedAtlas": null, | ||||
| 			"pxWid": 32, | ||||
| 			"pxHei": 32, | ||||
| 			"tileGridSize": 32, | ||||
| 			"spacing": 0, | ||||
| 			"padding": 0, | ||||
| 			"tags": [], | ||||
| 			"tagsSourceEnumUid": null, | ||||
| 			"enumTags": [], | ||||
| 			"customData": [], | ||||
| 			"savedSelections": [], | ||||
| 			"cachedPixelData": { "opaqueTiles": "1", "averageColors": "f111" } | ||||
| 		}, | ||||
| 		{ | ||||
| 			"__cWid": 3, | ||||
| 			"__cHei": 3, | ||||
| 			"identifier": "Walls", | ||||
| 			"uid": 3, | ||||
| 			"relPath": "../tilesets/walls.png", | ||||
| 			"embedAtlas": null, | ||||
| 			"pxWid": 96, | ||||
| 			"pxHei": 96, | ||||
| 			"tileGridSize": 32, | ||||
| 			"spacing": 0, | ||||
| 			"padding": 0, | ||||
| 			"tags": [], | ||||
| 			"tagsSourceEnumUid": null, | ||||
| 			"enumTags": [], | ||||
| 			"customData": [], | ||||
| 			"savedSelections": [], | ||||
| 			"cachedPixelData": { "opaqueTiles": "111111111", "averageColors": "f88af89af88af89af89af89af88af89af88a" } | ||||
| 		}, | ||||
| 		{ | ||||
| 			"__cWid": 1, | ||||
| 			"__cHei": 1, | ||||
| 			"identifier": "Block", | ||||
| 			"uid": 4, | ||||
| 			"relPath": "../tilesets/block.png", | ||||
| 			"embedAtlas": null, | ||||
| 			"pxWid": 32, | ||||
| 			"pxHei": 32, | ||||
| 			"tileGridSize": 32, | ||||
| 			"spacing": 0, | ||||
| 			"padding": 0, | ||||
| 			"tags": [], | ||||
| 			"tagsSourceEnumUid": null, | ||||
| 			"enumTags": [], | ||||
| 			"customData": [], | ||||
| 			"savedSelections": [], | ||||
| 			"cachedPixelData": { "opaqueTiles": "1", "averageColors": "f88a" } | ||||
| 		} | ||||
| 	], "enums": [], "externalEnums": [], "levelFields": [] }, | ||||
| 	"levels": [ | ||||
| 		{ | ||||
| 			"identifier": "Level_0", | ||||
| 			"iid": "f7eda580-c210-11ef-bffb-6b05aa089ccc", | ||||
| 			"uid": 0, | ||||
| 			"worldX": 0, | ||||
| 			"worldY": 0, | ||||
| 			"worldDepth": 0, | ||||
| 			"pxWid": 384, | ||||
| 			"pxHei": 288, | ||||
| 			"__bgColor": "#696A79", | ||||
| 			"bgColor": null, | ||||
| 			"useAutoIdentifier": true, | ||||
| 			"bgRelPath": null, | ||||
| 			"bgPos": null, | ||||
| 			"bgPivotX": 0.5, | ||||
| 			"bgPivotY": 0.5, | ||||
| 			"__smartColor": "#ADADB5", | ||||
| 			"__bgPos": null, | ||||
| 			"externalRelPath": null, | ||||
| 			"fieldInstances": [], | ||||
| 			"layerInstances": [ | ||||
| 				{ | ||||
| 					"__identifier": "Floor_2", | ||||
| 					"__type": "Tiles", | ||||
| 					"__cWid": 12, | ||||
| 					"__cHei": 9, | ||||
| 					"__gridSize": 32, | ||||
| 					"__opacity": 1, | ||||
| 					"__pxTotalOffsetX": 0, | ||||
| 					"__pxTotalOffsetY": 0, | ||||
| 					"__tilesetDefUid": 1, | ||||
| 					"__tilesetRelPath": "../tilesets/intercut.png", | ||||
| 					"iid": "22e79470-c210-11ef-bffb-f789fe121d9f", | ||||
| 					"levelId": 0, | ||||
| 					"layerDefUid": 7, | ||||
| 					"pxOffsetX": 0, | ||||
| 					"pxOffsetY": 0, | ||||
| 					"visible": true, | ||||
| 					"optionalRules": [], | ||||
| 					"intGridCsv": [], | ||||
| 					"autoLayerTiles": [], | ||||
| 					"seed": 7519619, | ||||
| 					"overrideTilesetUid": null, | ||||
| 					"gridTiles": [ | ||||
| 						{ "px": [32,32], "src": [0,0], "f": 0, "t": 0, "d": [13], "a": 1 }, | ||||
| 						{ "px": [64,32], "src": [64,0], "f": 0, "t": 2, "d": [14], "a": 1 }, | ||||
| 						{ "px": [288,32], "src": [0,0], "f": 0, "t": 0, "d": [21], "a": 1 }, | ||||
| 						{ "px": [320,32], "src": [64,0], "f": 0, "t": 2, "d": [22], "a": 1 }, | ||||
| 						{ "px": [32,64], "src": [0,64], "f": 0, "t": 6, "d": [25], "a": 1 }, | ||||
| 						{ "px": [64,64], "src": [32,32], "f": 0, "t": 4, "d": [26], "a": 1 }, | ||||
| 						{ "px": [96,64], "src": [32,0], "f": 0, "t": 1, "d": [27], "a": 1 }, | ||||
| 						{ "px": [128,64], "src": [32,0], "f": 0, "t": 1, "d": [28], "a": 1 }, | ||||
| 						{ "px": [160,64], "src": [32,0], "f": 0, "t": 1, "d": [29], "a": 1 }, | ||||
| 						{ "px": [192,64], "src": [32,0], "f": 0, "t": 1, "d": [30], "a": 1 }, | ||||
| 						{ "px": [224,64], "src": [32,0], "f": 0, "t": 1, "d": [31], "a": 1 }, | ||||
| 						{ "px": [256,64], "src": [32,0], "f": 0, "t": 1, "d": [32], "a": 1 }, | ||||
| 						{ "px": [288,64], "src": [32,32], "f": 0, "t": 4, "d": [33], "a": 1 }, | ||||
| 						{ "px": [320,64], "src": [64,64], "f": 0, "t": 8, "d": [34], "a": 1 }, | ||||
| 						{ "px": [64,96], "src": [0,32], "f": 0, "t": 3, "d": [38], "a": 1 }, | ||||
| 						{ "px": [96,96], "src": [32,32], "f": 0, "t": 4, "d": [39], "a": 1 }, | ||||
| 						{ "px": [128,96], "src": [32,64], "f": 0, "t": 7, "d": [40], "a": 1 }, | ||||
| 						{ "px": [160,96], "src": [32,64], "f": 0, "t": 7, "d": [41], "a": 1 }, | ||||
| 						{ "px": [192,96], "src": [32,64], "f": 0, "t": 7, "d": [42], "a": 1 }, | ||||
| 						{ "px": [224,96], "src": [32,64], "f": 0, "t": 7, "d": [43], "a": 1 }, | ||||
| 						{ "px": [256,96], "src": [32,32], "f": 0, "t": 4, "d": [44], "a": 1 }, | ||||
| 						{ "px": [288,96], "src": [64,32], "f": 0, "t": 5, "d": [45], "a": 1 }, | ||||
| 						{ "px": [64,128], "src": [0,32], "f": 0, "t": 3, "d": [50], "a": 1 }, | ||||
| 						{ "px": [96,128], "src": [64,32], "f": 0, "t": 5, "d": [51], "a": 1 }, | ||||
| 						{ "px": [256,128], "src": [0,32], "f": 0, "t": 3, "d": [56], "a": 1 }, | ||||
| 						{ "px": [288,128], "src": [64,32], "f": 0, "t": 5, "d": [57], "a": 1 }, | ||||
| 						{ "px": [64,160], "src": [0,32], "f": 0, "t": 3, "d": [62], "a": 1 }, | ||||
| 						{ "px": [96,160], "src": [32,32], "f": 0, "t": 4, "d": [63], "a": 1 }, | ||||
| 						{ "px": [128,160], "src": [32,0], "f": 0, "t": 1, "d": [64], "a": 1 }, | ||||
| 						{ "px": [160,160], "src": [32,0], "f": 0, "t": 1, "d": [65], "a": 1 }, | ||||
| 						{ "px": [192,160], "src": [32,0], "f": 0, "t": 1, "d": [66], "a": 1 }, | ||||
| 						{ "px": [224,160], "src": [32,0], "f": 0, "t": 1, "d": [67], "a": 1 }, | ||||
| 						{ "px": [256,160], "src": [32,32], "f": 0, "t": 4, "d": [68], "a": 1 }, | ||||
| 						{ "px": [288,160], "src": [64,32], "f": 0, "t": 5, "d": [69], "a": 1 }, | ||||
| 						{ "px": [32,192], "src": [0,0], "f": 0, "t": 0, "d": [73], "a": 1 }, | ||||
| 						{ "px": [64,192], "src": [32,32], "f": 0, "t": 4, "d": [74], "a": 1 }, | ||||
| 						{ "px": [96,192], "src": [32,64], "f": 0, "t": 7, "d": [75], "a": 1 }, | ||||
| 						{ "px": [128,192], "src": [32,64], "f": 0, "t": 7, "d": [76], "a": 1 }, | ||||
| 						{ "px": [160,192], "src": [32,64], "f": 0, "t": 7, "d": [77], "a": 1 }, | ||||
| 						{ "px": [192,192], "src": [32,64], "f": 0, "t": 7, "d": [78], "a": 1 }, | ||||
| 						{ "px": [224,192], "src": [32,64], "f": 0, "t": 7, "d": [79], "a": 1 }, | ||||
| 						{ "px": [256,192], "src": [32,64], "f": 0, "t": 7, "d": [80], "a": 1 }, | ||||
| 						{ "px": [288,192], "src": [32,32], "f": 0, "t": 4, "d": [81], "a": 1 }, | ||||
| 						{ "px": [320,192], "src": [64,0], "f": 0, "t": 2, "d": [82], "a": 1 }, | ||||
| 						{ "px": [32,224], "src": [0,64], "f": 0, "t": 6, "d": [85], "a": 1 }, | ||||
| 						{ "px": [64,224], "src": [64,64], "f": 0, "t": 8, "d": [86], "a": 1 }, | ||||
| 						{ "px": [288,224], "src": [0,64], "f": 0, "t": 6, "d": [93], "a": 1 }, | ||||
| 						{ "px": [320,224], "src": [64,64], "f": 0, "t": 8, "d": [94], "a": 1 } | ||||
| 					], | ||||
| 					"entityInstances": [] | ||||
| 				}, | ||||
| 				{ | ||||
| 					"__identifier": "Walls", | ||||
| 					"__type": "Tiles", | ||||
| 					"__cWid": 12, | ||||
| 					"__cHei": 9, | ||||
| 					"__gridSize": 32, | ||||
| 					"__opacity": 1, | ||||
| 					"__pxTotalOffsetX": 0, | ||||
| 					"__pxTotalOffsetY": 0, | ||||
| 					"__tilesetDefUid": 3, | ||||
| 					"__tilesetRelPath": "../tilesets/walls.png", | ||||
| 					"iid": "857a8620-c210-11ef-bffb-8318132dc9ca", | ||||
| 					"levelId": 0, | ||||
| 					"layerDefUid": 6, | ||||
| 					"pxOffsetX": 0, | ||||
| 					"pxOffsetY": 0, | ||||
| 					"visible": true, | ||||
| 					"optionalRules": [], | ||||
| 					"intGridCsv": [], | ||||
| 					"autoLayerTiles": [], | ||||
| 					"seed": 8442990, | ||||
| 					"overrideTilesetUid": null, | ||||
| 					"gridTiles": [ | ||||
| 						{ "px": [0,0], "src": [64,64], "f": 0, "t": 8, "d": [0], "a": 1 }, | ||||
| 						{ "px": [128,0], "src": [0,64], "f": 0, "t": 6, "d": [4], "a": 1 }, | ||||
| 						{ "px": [160,0], "src": [32,64], "f": 0, "t": 7, "d": [5], "a": 1 }, | ||||
| 						{ "px": [192,0], "src": [32,64], "f": 0, "t": 7, "d": [6], "a": 1 }, | ||||
| 						{ "px": [224,0], "src": [64,64], "f": 0, "t": 8, "d": [7], "a": 1 }, | ||||
| 						{ "px": [352,0], "src": [0,64], "f": 0, "t": 6, "d": [11], "a": 1 }, | ||||
| 						{ "px": [64,64], "src": [0,0], "f": 0, "t": 0, "d": [26], "a": 1 }, | ||||
| 						{ "px": [96,64], "src": [64,0], "f": 0, "t": 2, "d": [27], "a": 1 }, | ||||
| 						{ "px": [160,64], "src": [0,0], "f": 0, "t": 0, "d": [29], "a": 1 }, | ||||
| 						{ "px": [256,64], "src": [0,0], "f": 0, "t": 0, "d": [32], "a": 1 }, | ||||
| 						{ "px": [64,96], "src": [0,64], "f": 0, "t": 6, "d": [38], "a": 1 }, | ||||
| 						{ "px": [96,96], "src": [64,64], "f": 0, "t": 8, "d": [39], "a": 1 }, | ||||
| 						{ "px": [160,96], "src": [0,64], "f": 0, "t": 6, "d": [41], "a": 1 }, | ||||
| 						{ "px": [256,96], "src": [0,64], "f": 0, "t": 6, "d": [44], "a": 1 }, | ||||
| 						{ "px": [0,256], "src": [64,0], "f": 0, "t": 2, "d": [96], "a": 1 }, | ||||
| 						{ "px": [128,256], "src": [0,0], "f": 0, "t": 0, "d": [100], "a": 1 }, | ||||
| 						{ "px": [160,256], "src": [32,0], "f": 0, "t": 1, "d": [101], "a": 1 }, | ||||
| 						{ "px": [192,256], "src": [32,0], "f": 0, "t": 1, "d": [102], "a": 1 }, | ||||
| 						{ "px": [224,256], "src": [64,0], "f": 0, "t": 2, "d": [103], "a": 1 }, | ||||
| 						{ "px": [352,256], "src": [0,0], "f": 0, "t": 0, "d": [107], "a": 1 } | ||||
| 					], | ||||
| 					"entityInstances": [] | ||||
| 				}, | ||||
| 				{ | ||||
| 					"__identifier": "Floor", | ||||
| 					"__type": "Tiles", | ||||
| 					"__cWid": 12, | ||||
| 					"__cHei": 9, | ||||
| 					"__gridSize": 32, | ||||
| 					"__opacity": 1, | ||||
| 					"__pxTotalOffsetX": 0, | ||||
| 					"__pxTotalOffsetY": 0, | ||||
| 					"__tilesetDefUid": 2, | ||||
| 					"__tilesetRelPath": "../tilesets/base.png", | ||||
| 					"iid": "3c7c9c60-c210-11ef-bffb-dd5644ced100", | ||||
| 					"levelId": 0, | ||||
| 					"layerDefUid": 5, | ||||
| 					"pxOffsetX": 0, | ||||
| 					"pxOffsetY": 0, | ||||
| 					"visible": true, | ||||
| 					"optionalRules": [], | ||||
| 					"intGridCsv": [], | ||||
| 					"autoLayerTiles": [], | ||||
| 					"seed": 8173604, | ||||
| 					"overrideTilesetUid": null, | ||||
| 					"gridTiles": [ | ||||
| 						{ "px": [0,0], "src": [0,0], "f": 0, "t": 0, "d": [0], "a": 1 }, | ||||
| 						{ "px": [32,0], "src": [0,0], "f": 0, "t": 0, "d": [1], "a": 1 }, | ||||
| 						{ "px": [64,0], "src": [0,0], "f": 0, "t": 0, "d": [2], "a": 1 }, | ||||
| 						{ "px": [96,0], "src": [0,0], "f": 0, "t": 0, "d": [3], "a": 1 }, | ||||
| 						{ "px": [128,0], "src": [0,0], "f": 0, "t": 0, "d": [4], "a": 1 }, | ||||
| 						{ "px": [160,0], "src": [0,0], "f": 0, "t": 0, "d": [5], "a": 1 }, | ||||
| 						{ "px": [192,0], "src": [0,0], "f": 0, "t": 0, "d": [6], "a": 1 }, | ||||
| 						{ "px": [224,0], "src": [0,0], "f": 0, "t": 0, "d": [7], "a": 1 }, | ||||
| 						{ "px": [256,0], "src": [0,0], "f": 0, "t": 0, "d": [8], "a": 1 }, | ||||
| 						{ "px": [288,0], "src": [0,0], "f": 0, "t": 0, "d": [9], "a": 1 }, | ||||
| 						{ "px": [320,0], "src": [0,0], "f": 0, "t": 0, "d": [10], "a": 1 }, | ||||
| 						{ "px": [352,0], "src": [0,0], "f": 0, "t": 0, "d": [11], "a": 1 }, | ||||
| 						{ "px": [0,32], "src": [0,0], "f": 0, "t": 0, "d": [12], "a": 1 }, | ||||
| 						{ "px": [32,32], "src": [0,0], "f": 0, "t": 0, "d": [13], "a": 1 }, | ||||
| 						{ "px": [64,32], "src": [0,0], "f": 0, "t": 0, "d": [14], "a": 1 }, | ||||
| 						{ "px": [96,32], "src": [0,0], "f": 0, "t": 0, "d": [15], "a": 1 }, | ||||
| 						{ "px": [128,32], "src": [0,0], "f": 0, "t": 0, "d": [16], "a": 1 }, | ||||
| 						{ "px": [160,32], "src": [0,0], "f": 0, "t": 0, "d": [17], "a": 1 }, | ||||
| 						{ "px": [192,32], "src": [0,0], "f": 0, "t": 0, "d": [18], "a": 1 }, | ||||
| 						{ "px": [224,32], "src": [0,0], "f": 0, "t": 0, "d": [19], "a": 1 }, | ||||
| 						{ "px": [256,32], "src": [0,0], "f": 0, "t": 0, "d": [20], "a": 1 }, | ||||
| 						{ "px": [288,32], "src": [0,0], "f": 0, "t": 0, "d": [21], "a": 1 }, | ||||
| 						{ "px": [320,32], "src": [0,0], "f": 0, "t": 0, "d": [22], "a": 1 }, | ||||
| 						{ "px": [352,32], "src": [0,0], "f": 0, "t": 0, "d": [23], "a": 1 }, | ||||
| 						{ "px": [0,64], "src": [0,0], "f": 0, "t": 0, "d": [24], "a": 1 }, | ||||
| 						{ "px": [32,64], "src": [0,0], "f": 0, "t": 0, "d": [25], "a": 1 }, | ||||
| 						{ "px": [64,64], "src": [0,0], "f": 0, "t": 0, "d": [26], "a": 1 }, | ||||
| 						{ "px": [96,64], "src": [0,0], "f": 0, "t": 0, "d": [27], "a": 1 }, | ||||
| 						{ "px": [128,64], "src": [0,0], "f": 0, "t": 0, "d": [28], "a": 1 }, | ||||
| 						{ "px": [160,64], "src": [0,0], "f": 0, "t": 0, "d": [29], "a": 1 }, | ||||
| 						{ "px": [192,64], "src": [0,0], "f": 0, "t": 0, "d": [30], "a": 1 }, | ||||
| 						{ "px": [224,64], "src": [0,0], "f": 0, "t": 0, "d": [31], "a": 1 }, | ||||
| 						{ "px": [256,64], "src": [0,0], "f": 0, "t": 0, "d": [32], "a": 1 }, | ||||
| 						{ "px": [288,64], "src": [0,0], "f": 0, "t": 0, "d": [33], "a": 1 }, | ||||
| 						{ "px": [320,64], "src": [0,0], "f": 0, "t": 0, "d": [34], "a": 1 }, | ||||
| 						{ "px": [352,64], "src": [0,0], "f": 0, "t": 0, "d": [35], "a": 1 }, | ||||
| 						{ "px": [0,96], "src": [0,0], "f": 0, "t": 0, "d": [36], "a": 1 }, | ||||
| 						{ "px": [32,96], "src": [0,0], "f": 0, "t": 0, "d": [37], "a": 1 }, | ||||
| 						{ "px": [64,96], "src": [0,0], "f": 0, "t": 0, "d": [38], "a": 1 }, | ||||
| 						{ "px": [96,96], "src": [0,0], "f": 0, "t": 0, "d": [39], "a": 1 }, | ||||
| 						{ "px": [128,96], "src": [0,0], "f": 0, "t": 0, "d": [40], "a": 1 }, | ||||
| 						{ "px": [160,96], "src": [0,0], "f": 0, "t": 0, "d": [41], "a": 1 }, | ||||
| 						{ "px": [192,96], "src": [0,0], "f": 0, "t": 0, "d": [42], "a": 1 }, | ||||
| 						{ "px": [224,96], "src": [0,0], "f": 0, "t": 0, "d": [43], "a": 1 }, | ||||
| 						{ "px": [256,96], "src": [0,0], "f": 0, "t": 0, "d": [44], "a": 1 }, | ||||
| 						{ "px": [288,96], "src": [0,0], "f": 0, "t": 0, "d": [45], "a": 1 }, | ||||
| 						{ "px": [320,96], "src": [0,0], "f": 0, "t": 0, "d": [46], "a": 1 }, | ||||
| 						{ "px": [352,96], "src": [0,0], "f": 0, "t": 0, "d": [47], "a": 1 }, | ||||
| 						{ "px": [0,128], "src": [0,0], "f": 0, "t": 0, "d": [48], "a": 1 }, | ||||
| 						{ "px": [32,128], "src": [0,0], "f": 0, "t": 0, "d": [49], "a": 1 }, | ||||
| 						{ "px": [64,128], "src": [0,0], "f": 0, "t": 0, "d": [50], "a": 1 }, | ||||
| 						{ "px": [96,128], "src": [0,0], "f": 0, "t": 0, "d": [51], "a": 1 }, | ||||
| 						{ "px": [128,128], "src": [0,0], "f": 0, "t": 0, "d": [52], "a": 1 }, | ||||
| 						{ "px": [160,128], "src": [0,0], "f": 0, "t": 0, "d": [53], "a": 1 }, | ||||
| 						{ "px": [192,128], "src": [0,0], "f": 0, "t": 0, "d": [54], "a": 1 }, | ||||
| 						{ "px": [224,128], "src": [0,0], "f": 0, "t": 0, "d": [55], "a": 1 }, | ||||
| 						{ "px": [256,128], "src": [0,0], "f": 0, "t": 0, "d": [56], "a": 1 }, | ||||
| 						{ "px": [288,128], "src": [0,0], "f": 0, "t": 0, "d": [57], "a": 1 }, | ||||
| 						{ "px": [320,128], "src": [0,0], "f": 0, "t": 0, "d": [58], "a": 1 }, | ||||
| 						{ "px": [352,128], "src": [0,0], "f": 0, "t": 0, "d": [59], "a": 1 }, | ||||
| 						{ "px": [0,160], "src": [0,0], "f": 0, "t": 0, "d": [60], "a": 1 }, | ||||
| 						{ "px": [32,160], "src": [0,0], "f": 0, "t": 0, "d": [61], "a": 1 }, | ||||
| 						{ "px": [64,160], "src": [0,0], "f": 0, "t": 0, "d": [62], "a": 1 }, | ||||
| 						{ "px": [96,160], "src": [0,0], "f": 0, "t": 0, "d": [63], "a": 1 }, | ||||
| 						{ "px": [128,160], "src": [0,0], "f": 0, "t": 0, "d": [64], "a": 1 }, | ||||
| 						{ "px": [160,160], "src": [0,0], "f": 0, "t": 0, "d": [65], "a": 1 }, | ||||
| 						{ "px": [192,160], "src": [0,0], "f": 0, "t": 0, "d": [66], "a": 1 }, | ||||
| 						{ "px": [224,160], "src": [0,0], "f": 0, "t": 0, "d": [67], "a": 1 }, | ||||
| 						{ "px": [256,160], "src": [0,0], "f": 0, "t": 0, "d": [68], "a": 1 }, | ||||
| 						{ "px": [288,160], "src": [0,0], "f": 0, "t": 0, "d": [69], "a": 1 }, | ||||
| 						{ "px": [320,160], "src": [0,0], "f": 0, "t": 0, "d": [70], "a": 1 }, | ||||
| 						{ "px": [352,160], "src": [0,0], "f": 0, "t": 0, "d": [71], "a": 1 }, | ||||
| 						{ "px": [0,192], "src": [0,0], "f": 0, "t": 0, "d": [72], "a": 1 }, | ||||
| 						{ "px": [32,192], "src": [0,0], "f": 0, "t": 0, "d": [73], "a": 1 }, | ||||
| 						{ "px": [64,192], "src": [0,0], "f": 0, "t": 0, "d": [74], "a": 1 }, | ||||
| 						{ "px": [96,192], "src": [0,0], "f": 0, "t": 0, "d": [75], "a": 1 }, | ||||
| 						{ "px": [128,192], "src": [0,0], "f": 0, "t": 0, "d": [76], "a": 1 }, | ||||
| 						{ "px": [160,192], "src": [0,0], "f": 0, "t": 0, "d": [77], "a": 1 }, | ||||
| 						{ "px": [192,192], "src": [0,0], "f": 0, "t": 0, "d": [78], "a": 1 }, | ||||
| 						{ "px": [224,192], "src": [0,0], "f": 0, "t": 0, "d": [79], "a": 1 }, | ||||
| 						{ "px": [256,192], "src": [0,0], "f": 0, "t": 0, "d": [80], "a": 1 }, | ||||
| 						{ "px": [288,192], "src": [0,0], "f": 0, "t": 0, "d": [81], "a": 1 }, | ||||
| 						{ "px": [320,192], "src": [0,0], "f": 0, "t": 0, "d": [82], "a": 1 }, | ||||
| 						{ "px": [352,192], "src": [0,0], "f": 0, "t": 0, "d": [83], "a": 1 }, | ||||
| 						{ "px": [0,224], "src": [0,0], "f": 0, "t": 0, "d": [84], "a": 1 }, | ||||
| 						{ "px": [32,224], "src": [0,0], "f": 0, "t": 0, "d": [85], "a": 1 }, | ||||
| 						{ "px": [64,224], "src": [0,0], "f": 0, "t": 0, "d": [86], "a": 1 }, | ||||
| 						{ "px": [96,224], "src": [0,0], "f": 0, "t": 0, "d": [87], "a": 1 }, | ||||
| 						{ "px": [128,224], "src": [0,0], "f": 0, "t": 0, "d": [88], "a": 1 }, | ||||
| 						{ "px": [160,224], "src": [0,0], "f": 0, "t": 0, "d": [89], "a": 1 }, | ||||
| 						{ "px": [192,224], "src": [0,0], "f": 0, "t": 0, "d": [90], "a": 1 }, | ||||
| 						{ "px": [224,224], "src": [0,0], "f": 0, "t": 0, "d": [91], "a": 1 }, | ||||
| 						{ "px": [256,224], "src": [0,0], "f": 0, "t": 0, "d": [92], "a": 1 }, | ||||
| 						{ "px": [288,224], "src": [0,0], "f": 0, "t": 0, "d": [93], "a": 1 }, | ||||
| 						{ "px": [320,224], "src": [0,0], "f": 0, "t": 0, "d": [94], "a": 1 }, | ||||
| 						{ "px": [352,224], "src": [0,0], "f": 0, "t": 0, "d": [95], "a": 1 }, | ||||
| 						{ "px": [0,256], "src": [0,0], "f": 0, "t": 0, "d": [96], "a": 1 }, | ||||
| 						{ "px": [32,256], "src": [0,0], "f": 0, "t": 0, "d": [97], "a": 1 }, | ||||
| 						{ "px": [64,256], "src": [0,0], "f": 0, "t": 0, "d": [98], "a": 1 }, | ||||
| 						{ "px": [96,256], "src": [0,0], "f": 0, "t": 0, "d": [99], "a": 1 }, | ||||
| 						{ "px": [128,256], "src": [0,0], "f": 0, "t": 0, "d": [100], "a": 1 }, | ||||
| 						{ "px": [160,256], "src": [0,0], "f": 0, "t": 0, "d": [101], "a": 1 }, | ||||
| 						{ "px": [192,256], "src": [0,0], "f": 0, "t": 0, "d": [102], "a": 1 }, | ||||
| 						{ "px": [224,256], "src": [0,0], "f": 0, "t": 0, "d": [103], "a": 1 }, | ||||
| 						{ "px": [256,256], "src": [0,0], "f": 0, "t": 0, "d": [104], "a": 1 }, | ||||
| 						{ "px": [288,256], "src": [0,0], "f": 0, "t": 0, "d": [105], "a": 1 }, | ||||
| 						{ "px": [320,256], "src": [0,0], "f": 0, "t": 0, "d": [106], "a": 1 }, | ||||
| 						{ "px": [352,256], "src": [0,0], "f": 0, "t": 0, "d": [107], "a": 1 } | ||||
| 					], | ||||
| 					"entityInstances": [] | ||||
| 				} | ||||
| 			], | ||||
| 			"__neighbours": [{ "levelIid": "f2e8f060-c210-11ef-bffb-31fe7a15090b", "dir": "e" }] | ||||
| 		}, | ||||
| 		{ | ||||
| 			"identifier": "Level_1", | ||||
| 			"iid": "f2e8f060-c210-11ef-bffb-31fe7a15090b", | ||||
| 			"uid": 8, | ||||
| 			"worldX": 384, | ||||
| 			"worldY": 0, | ||||
| 			"worldDepth": 0, | ||||
| 			"pxWid": 384, | ||||
| 			"pxHei": 288, | ||||
| 			"__bgColor": "#696A79", | ||||
| 			"bgColor": null, | ||||
| 			"useAutoIdentifier": true, | ||||
| 			"bgRelPath": null, | ||||
| 			"bgPos": null, | ||||
| 			"bgPivotX": 0.5, | ||||
| 			"bgPivotY": 0.5, | ||||
| 			"__smartColor": "#ADADB5", | ||||
| 			"__bgPos": null, | ||||
| 			"externalRelPath": null, | ||||
| 			"fieldInstances": [], | ||||
| 			"layerInstances": [ | ||||
| 				{ | ||||
| 					"__identifier": "Floor_2", | ||||
| 					"__type": "Tiles", | ||||
| 					"__cWid": 12, | ||||
| 					"__cHei": 9, | ||||
| 					"__gridSize": 32, | ||||
| 					"__opacity": 1, | ||||
| 					"__pxTotalOffsetX": 0, | ||||
| 					"__pxTotalOffsetY": 0, | ||||
| 					"__tilesetDefUid": 1, | ||||
| 					"__tilesetRelPath": "../tilesets/intercut.png", | ||||
| 					"iid": "f2e8f061-c210-11ef-bffb-6f89236d491a", | ||||
| 					"levelId": 8, | ||||
| 					"layerDefUid": 7, | ||||
| 					"pxOffsetX": 0, | ||||
| 					"pxOffsetY": 0, | ||||
| 					"visible": true, | ||||
| 					"optionalRules": [], | ||||
| 					"intGridCsv": [], | ||||
| 					"autoLayerTiles": [], | ||||
| 					"seed": 9573822, | ||||
| 					"overrideTilesetUid": null, | ||||
| 					"gridTiles": [ | ||||
| 						{ "px": [32,32], "src": [0,0], "f": 0, "t": 0, "d": [13], "a": 1 }, | ||||
| 						{ "px": [64,32], "src": [32,0], "f": 0, "t": 1, "d": [14], "a": 1 }, | ||||
| 						{ "px": [96,32], "src": [64,0], "f": 0, "t": 2, "d": [15], "a": 1 }, | ||||
| 						{ "px": [256,32], "src": [0,0], "f": 0, "t": 0, "d": [20], "a": 1 }, | ||||
| 						{ "px": [288,32], "src": [32,0], "f": 0, "t": 1, "d": [21], "a": 1 }, | ||||
| 						{ "px": [320,32], "src": [64,0], "f": 0, "t": 2, "d": [22], "a": 1 }, | ||||
| 						{ "px": [32,64], "src": [32,32], "f": 0, "t": 4, "d": [25], "a": 1 }, | ||||
| 						{ "px": [64,64], "src": [32,32], "f": 0, "t": 4, "d": [26], "a": 1 }, | ||||
| 						{ "px": [96,64], "src": [32,32], "f": 0, "t": 4, "d": [27], "a": 1 }, | ||||
| 						{ "px": [256,64], "src": [0,32], "f": 0, "t": 3, "d": [32], "a": 1 }, | ||||
| 						{ "px": [288,64], "src": [32,32], "f": 0, "t": 4, "d": [33], "a": 1 }, | ||||
| 						{ "px": [320,64], "src": [64,32], "f": 0, "t": 5, "d": [34], "a": 1 }, | ||||
| 						{ "px": [32,192], "src": [0,32], "f": 0, "t": 3, "d": [73], "a": 1 }, | ||||
| 						{ "px": [64,192], "src": [32,32], "f": 0, "t": 4, "d": [74], "a": 1 }, | ||||
| 						{ "px": [96,192], "src": [64,32], "f": 0, "t": 5, "d": [75], "a": 1 }, | ||||
| 						{ "px": [256,192], "src": [0,32], "f": 0, "t": 3, "d": [80], "a": 1 }, | ||||
| 						{ "px": [288,192], "src": [32,32], "f": 0, "t": 4, "d": [81], "a": 1 }, | ||||
| 						{ "px": [320,192], "src": [64,0], "f": 0, "t": 2, "d": [82], "a": 1 }, | ||||
| 						{ "px": [32,224], "src": [0,64], "f": 0, "t": 6, "d": [85], "a": 1 }, | ||||
| 						{ "px": [64,224], "src": [32,64], "f": 0, "t": 7, "d": [86], "a": 1 }, | ||||
| 						{ "px": [96,224], "src": [64,64], "f": 0, "t": 8, "d": [87], "a": 1 }, | ||||
| 						{ "px": [256,224], "src": [0,32], "f": 0, "t": 3, "d": [92], "a": 1 }, | ||||
| 						{ "px": [288,224], "src": [32,64], "f": 0, "t": 7, "d": [93], "a": 1 }, | ||||
| 						{ "px": [320,224], "src": [64,64], "f": 0, "t": 8, "d": [94], "a": 1 } | ||||
| 					], | ||||
| 					"entityInstances": [] | ||||
| 				}, | ||||
| 				{ | ||||
| 					"__identifier": "Walls", | ||||
| 					"__type": "Tiles", | ||||
| 					"__cWid": 12, | ||||
| 					"__cHei": 9, | ||||
| 					"__gridSize": 32, | ||||
| 					"__opacity": 1, | ||||
| 					"__pxTotalOffsetX": 0, | ||||
| 					"__pxTotalOffsetY": 0, | ||||
| 					"__tilesetDefUid": 3, | ||||
| 					"__tilesetRelPath": "../tilesets/walls.png", | ||||
| 					"iid": "f2e8f062-c210-11ef-bffb-b3126f971752", | ||||
| 					"levelId": 8, | ||||
| 					"layerDefUid": 6, | ||||
| 					"pxOffsetX": 0, | ||||
| 					"pxOffsetY": 0, | ||||
| 					"visible": true, | ||||
| 					"optionalRules": [], | ||||
| 					"intGridCsv": [], | ||||
| 					"autoLayerTiles": [], | ||||
| 					"seed": 1645397, | ||||
| 					"overrideTilesetUid": null, | ||||
| 					"gridTiles": [ | ||||
| 						{ "px": [160,0], "src": [0,32], "f": 0, "t": 3, "d": [5], "a": 1 }, | ||||
| 						{ "px": [192,0], "src": [64,32], "f": 0, "t": 5, "d": [6], "a": 1 }, | ||||
| 						{ "px": [160,32], "src": [0,32], "f": 0, "t": 3, "d": [17], "a": 1 }, | ||||
| 						{ "px": [192,32], "src": [64,32], "f": 0, "t": 5, "d": [18], "a": 1 }, | ||||
| 						{ "px": [160,64], "src": [0,64], "f": 0, "t": 6, "d": [29], "a": 1 }, | ||||
| 						{ "px": [192,64], "src": [64,64], "f": 0, "t": 8, "d": [30], "a": 1 }, | ||||
| 						{ "px": [0,96], "src": [32,0], "f": 0, "t": 1, "d": [36], "a": 1 }, | ||||
| 						{ "px": [32,96], "src": [32,0], "f": 0, "t": 1, "d": [37], "a": 1 }, | ||||
| 						{ "px": [64,96], "src": [32,0], "f": 0, "t": 1, "d": [38], "a": 1 }, | ||||
| 						{ "px": [96,96], "src": [64,0], "f": 0, "t": 2, "d": [39], "a": 1 }, | ||||
| 						{ "px": [256,96], "src": [0,0], "f": 0, "t": 0, "d": [44], "a": 1 }, | ||||
| 						{ "px": [288,96], "src": [32,0], "f": 0, "t": 1, "d": [45], "a": 1 }, | ||||
| 						{ "px": [320,96], "src": [32,0], "f": 0, "t": 1, "d": [46], "a": 1 }, | ||||
| 						{ "px": [352,96], "src": [32,0], "f": 0, "t": 1, "d": [47], "a": 1 }, | ||||
| 						{ "px": [0,128], "src": [32,32], "f": 0, "t": 4, "d": [48], "a": 1 }, | ||||
| 						{ "px": [32,128], "src": [32,32], "f": 0, "t": 4, "d": [49], "a": 1 }, | ||||
| 						{ "px": [64,128], "src": [32,32], "f": 0, "t": 4, "d": [50], "a": 1 }, | ||||
| 						{ "px": [96,128], "src": [64,32], "f": 0, "t": 5, "d": [51], "a": 1 }, | ||||
| 						{ "px": [256,128], "src": [32,32], "f": 0, "t": 4, "d": [56], "a": 1 }, | ||||
| 						{ "px": [288,128], "src": [32,32], "f": 0, "t": 4, "d": [57], "a": 1 }, | ||||
| 						{ "px": [320,128], "src": [32,32], "f": 0, "t": 4, "d": [58], "a": 1 }, | ||||
| 						{ "px": [352,128], "src": [32,32], "f": 0, "t": 4, "d": [59], "a": 1 }, | ||||
| 						{ "px": [0,160], "src": [32,64], "f": 0, "t": 7, "d": [60], "a": 1 }, | ||||
| 						{ "px": [32,160], "src": [32,64], "f": 0, "t": 7, "d": [61], "a": 1 }, | ||||
| 						{ "px": [64,160], "src": [32,64], "f": 0, "t": 7, "d": [62], "a": 1 }, | ||||
| 						{ "px": [96,160], "src": [64,64], "f": 0, "t": 8, "d": [63], "a": 1 }, | ||||
| 						{ "px": [256,160], "src": [0,64], "f": 0, "t": 6, "d": [68], "a": 1 }, | ||||
| 						{ "px": [288,160], "src": [32,64], "f": 0, "t": 7, "d": [69], "a": 1 }, | ||||
| 						{ "px": [320,160], "src": [32,64], "f": 0, "t": 7, "d": [70], "a": 1 }, | ||||
| 						{ "px": [352,160], "src": [32,64], "f": 0, "t": 7, "d": [71], "a": 1 }, | ||||
| 						{ "px": [160,192], "src": [0,0], "f": 0, "t": 0, "d": [77], "a": 1 }, | ||||
| 						{ "px": [192,192], "src": [64,0], "f": 0, "t": 2, "d": [78], "a": 1 }, | ||||
| 						{ "px": [160,224], "src": [0,32], "f": 0, "t": 3, "d": [89], "a": 1 }, | ||||
| 						{ "px": [192,224], "src": [64,32], "f": 0, "t": 5, "d": [90], "a": 1 }, | ||||
| 						{ "px": [160,256], "src": [0,32], "f": 0, "t": 3, "d": [101], "a": 1 }, | ||||
| 						{ "px": [192,256], "src": [64,32], "f": 0, "t": 5, "d": [102], "a": 1 } | ||||
| 					], | ||||
| 					"entityInstances": [] | ||||
| 				}, | ||||
| 				{ | ||||
| 					"__identifier": "Floor", | ||||
| 					"__type": "Tiles", | ||||
| 					"__cWid": 12, | ||||
| 					"__cHei": 9, | ||||
| 					"__gridSize": 32, | ||||
| 					"__opacity": 1, | ||||
| 					"__pxTotalOffsetX": 0, | ||||
| 					"__pxTotalOffsetY": 0, | ||||
| 					"__tilesetDefUid": 2, | ||||
| 					"__tilesetRelPath": "../tilesets/base.png", | ||||
| 					"iid": "f2e8f063-c210-11ef-bffb-a76072bfa5d6", | ||||
| 					"levelId": 8, | ||||
| 					"layerDefUid": 5, | ||||
| 					"pxOffsetX": 0, | ||||
| 					"pxOffsetY": 0, | ||||
| 					"visible": true, | ||||
| 					"optionalRules": [], | ||||
| 					"intGridCsv": [], | ||||
| 					"autoLayerTiles": [], | ||||
| 					"seed": 1336393, | ||||
| 					"overrideTilesetUid": null, | ||||
| 					"gridTiles": [ | ||||
| 						{ "px": [0,0], "src": [0,0], "f": 0, "t": 0, "d": [0], "a": 1 }, | ||||
| 						{ "px": [32,0], "src": [0,0], "f": 0, "t": 0, "d": [1], "a": 1 }, | ||||
| 						{ "px": [64,0], "src": [0,0], "f": 0, "t": 0, "d": [2], "a": 1 }, | ||||
| 						{ "px": [96,0], "src": [0,0], "f": 0, "t": 0, "d": [3], "a": 1 }, | ||||
| 						{ "px": [128,0], "src": [0,0], "f": 0, "t": 0, "d": [4], "a": 1 }, | ||||
| 						{ "px": [160,0], "src": [0,0], "f": 0, "t": 0, "d": [5], "a": 1 }, | ||||
| 						{ "px": [192,0], "src": [0,0], "f": 0, "t": 0, "d": [6], "a": 1 }, | ||||
| 						{ "px": [224,0], "src": [0,0], "f": 0, "t": 0, "d": [7], "a": 1 }, | ||||
| 						{ "px": [256,0], "src": [0,0], "f": 0, "t": 0, "d": [8], "a": 1 }, | ||||
| 						{ "px": [288,0], "src": [0,0], "f": 0, "t": 0, "d": [9], "a": 1 }, | ||||
| 						{ "px": [320,0], "src": [0,0], "f": 0, "t": 0, "d": [10], "a": 1 }, | ||||
| 						{ "px": [352,0], "src": [0,0], "f": 0, "t": 0, "d": [11], "a": 1 }, | ||||
| 						{ "px": [0,32], "src": [0,0], "f": 0, "t": 0, "d": [12], "a": 1 }, | ||||
| 						{ "px": [32,32], "src": [0,0], "f": 0, "t": 0, "d": [13], "a": 1 }, | ||||
| 						{ "px": [64,32], "src": [0,0], "f": 0, "t": 0, "d": [14], "a": 1 }, | ||||
| 						{ "px": [96,32], "src": [0,0], "f": 0, "t": 0, "d": [15], "a": 1 }, | ||||
| 						{ "px": [128,32], "src": [0,0], "f": 0, "t": 0, "d": [16], "a": 1 }, | ||||
| 						{ "px": [160,32], "src": [0,0], "f": 0, "t": 0, "d": [17], "a": 1 }, | ||||
| 						{ "px": [192,32], "src": [0,0], "f": 0, "t": 0, "d": [18], "a": 1 }, | ||||
| 						{ "px": [224,32], "src": [0,0], "f": 0, "t": 0, "d": [19], "a": 1 }, | ||||
| 						{ "px": [256,32], "src": [0,0], "f": 0, "t": 0, "d": [20], "a": 1 }, | ||||
| 						{ "px": [288,32], "src": [0,0], "f": 0, "t": 0, "d": [21], "a": 1 }, | ||||
| 						{ "px": [320,32], "src": [0,0], "f": 0, "t": 0, "d": [22], "a": 1 }, | ||||
| 						{ "px": [352,32], "src": [0,0], "f": 0, "t": 0, "d": [23], "a": 1 }, | ||||
| 						{ "px": [0,64], "src": [0,0], "f": 0, "t": 0, "d": [24], "a": 1 }, | ||||
| 						{ "px": [32,64], "src": [0,0], "f": 0, "t": 0, "d": [25], "a": 1 }, | ||||
| 						{ "px": [64,64], "src": [0,0], "f": 0, "t": 0, "d": [26], "a": 1 }, | ||||
| 						{ "px": [96,64], "src": [0,0], "f": 0, "t": 0, "d": [27], "a": 1 }, | ||||
| 						{ "px": [128,64], "src": [0,0], "f": 0, "t": 0, "d": [28], "a": 1 }, | ||||
| 						{ "px": [160,64], "src": [0,0], "f": 0, "t": 0, "d": [29], "a": 1 }, | ||||
| 						{ "px": [192,64], "src": [0,0], "f": 0, "t": 0, "d": [30], "a": 1 }, | ||||
| 						{ "px": [224,64], "src": [0,0], "f": 0, "t": 0, "d": [31], "a": 1 }, | ||||
| 						{ "px": [256,64], "src": [0,0], "f": 0, "t": 0, "d": [32], "a": 1 }, | ||||
| 						{ "px": [288,64], "src": [0,0], "f": 0, "t": 0, "d": [33], "a": 1 }, | ||||
| 						{ "px": [320,64], "src": [0,0], "f": 0, "t": 0, "d": [34], "a": 1 }, | ||||
| 						{ "px": [352,64], "src": [0,0], "f": 0, "t": 0, "d": [35], "a": 1 }, | ||||
| 						{ "px": [0,96], "src": [0,0], "f": 0, "t": 0, "d": [36], "a": 1 }, | ||||
| 						{ "px": [32,96], "src": [0,0], "f": 0, "t": 0, "d": [37], "a": 1 }, | ||||
| 						{ "px": [64,96], "src": [0,0], "f": 0, "t": 0, "d": [38], "a": 1 }, | ||||
| 						{ "px": [96,96], "src": [0,0], "f": 0, "t": 0, "d": [39], "a": 1 }, | ||||
| 						{ "px": [128,96], "src": [0,0], "f": 0, "t": 0, "d": [40], "a": 1 }, | ||||
| 						{ "px": [160,96], "src": [0,0], "f": 0, "t": 0, "d": [41], "a": 1 }, | ||||
| 						{ "px": [192,96], "src": [0,0], "f": 0, "t": 0, "d": [42], "a": 1 }, | ||||
| 						{ "px": [224,96], "src": [0,0], "f": 0, "t": 0, "d": [43], "a": 1 }, | ||||
| 						{ "px": [256,96], "src": [0,0], "f": 0, "t": 0, "d": [44], "a": 1 }, | ||||
| 						{ "px": [288,96], "src": [0,0], "f": 0, "t": 0, "d": [45], "a": 1 }, | ||||
| 						{ "px": [320,96], "src": [0,0], "f": 0, "t": 0, "d": [46], "a": 1 }, | ||||
| 						{ "px": [352,96], "src": [0,0], "f": 0, "t": 0, "d": [47], "a": 1 }, | ||||
| 						{ "px": [0,128], "src": [0,0], "f": 0, "t": 0, "d": [48], "a": 1 }, | ||||
| 						{ "px": [32,128], "src": [0,0], "f": 0, "t": 0, "d": [49], "a": 1 }, | ||||
| 						{ "px": [64,128], "src": [0,0], "f": 0, "t": 0, "d": [50], "a": 1 }, | ||||
| 						{ "px": [96,128], "src": [0,0], "f": 0, "t": 0, "d": [51], "a": 1 }, | ||||
| 						{ "px": [128,128], "src": [0,0], "f": 0, "t": 0, "d": [52], "a": 1 }, | ||||
| 						{ "px": [160,128], "src": [0,0], "f": 0, "t": 0, "d": [53], "a": 1 }, | ||||
| 						{ "px": [192,128], "src": [0,0], "f": 0, "t": 0, "d": [54], "a": 1 }, | ||||
| 						{ "px": [224,128], "src": [0,0], "f": 0, "t": 0, "d": [55], "a": 1 }, | ||||
| 						{ "px": [256,128], "src": [0,0], "f": 0, "t": 0, "d": [56], "a": 1 }, | ||||
| 						{ "px": [288,128], "src": [0,0], "f": 0, "t": 0, "d": [57], "a": 1 }, | ||||
| 						{ "px": [320,128], "src": [0,0], "f": 0, "t": 0, "d": [58], "a": 1 }, | ||||
| 						{ "px": [352,128], "src": [0,0], "f": 0, "t": 0, "d": [59], "a": 1 }, | ||||
| 						{ "px": [0,160], "src": [0,0], "f": 0, "t": 0, "d": [60], "a": 1 }, | ||||
| 						{ "px": [32,160], "src": [0,0], "f": 0, "t": 0, "d": [61], "a": 1 }, | ||||
| 						{ "px": [64,160], "src": [0,0], "f": 0, "t": 0, "d": [62], "a": 1 }, | ||||
| 						{ "px": [96,160], "src": [0,0], "f": 0, "t": 0, "d": [63], "a": 1 }, | ||||
| 						{ "px": [128,160], "src": [0,0], "f": 0, "t": 0, "d": [64], "a": 1 }, | ||||
| 						{ "px": [160,160], "src": [0,0], "f": 0, "t": 0, "d": [65], "a": 1 }, | ||||
| 						{ "px": [192,160], "src": [0,0], "f": 0, "t": 0, "d": [66], "a": 1 }, | ||||
| 						{ "px": [224,160], "src": [0,0], "f": 0, "t": 0, "d": [67], "a": 1 }, | ||||
| 						{ "px": [256,160], "src": [0,0], "f": 0, "t": 0, "d": [68], "a": 1 }, | ||||
| 						{ "px": [288,160], "src": [0,0], "f": 0, "t": 0, "d": [69], "a": 1 }, | ||||
| 						{ "px": [320,160], "src": [0,0], "f": 0, "t": 0, "d": [70], "a": 1 }, | ||||
| 						{ "px": [352,160], "src": [0,0], "f": 0, "t": 0, "d": [71], "a": 1 }, | ||||
| 						{ "px": [0,192], "src": [0,0], "f": 0, "t": 0, "d": [72], "a": 1 }, | ||||
| 						{ "px": [32,192], "src": [0,0], "f": 0, "t": 0, "d": [73], "a": 1 }, | ||||
| 						{ "px": [64,192], "src": [0,0], "f": 0, "t": 0, "d": [74], "a": 1 }, | ||||
| 						{ "px": [96,192], "src": [0,0], "f": 0, "t": 0, "d": [75], "a": 1 }, | ||||
| 						{ "px": [128,192], "src": [0,0], "f": 0, "t": 0, "d": [76], "a": 1 }, | ||||
| 						{ "px": [160,192], "src": [0,0], "f": 0, "t": 0, "d": [77], "a": 1 }, | ||||
| 						{ "px": [192,192], "src": [0,0], "f": 0, "t": 0, "d": [78], "a": 1 }, | ||||
| 						{ "px": [224,192], "src": [0,0], "f": 0, "t": 0, "d": [79], "a": 1 }, | ||||
| 						{ "px": [256,192], "src": [0,0], "f": 0, "t": 0, "d": [80], "a": 1 }, | ||||
| 						{ "px": [288,192], "src": [0,0], "f": 0, "t": 0, "d": [81], "a": 1 }, | ||||
| 						{ "px": [320,192], "src": [0,0], "f": 0, "t": 0, "d": [82], "a": 1 }, | ||||
| 						{ "px": [352,192], "src": [0,0], "f": 0, "t": 0, "d": [83], "a": 1 }, | ||||
| 						{ "px": [0,224], "src": [0,0], "f": 0, "t": 0, "d": [84], "a": 1 }, | ||||
| 						{ "px": [32,224], "src": [0,0], "f": 0, "t": 0, "d": [85], "a": 1 }, | ||||
| 						{ "px": [64,224], "src": [0,0], "f": 0, "t": 0, "d": [86], "a": 1 }, | ||||
| 						{ "px": [96,224], "src": [0,0], "f": 0, "t": 0, "d": [87], "a": 1 }, | ||||
| 						{ "px": [128,224], "src": [0,0], "f": 0, "t": 0, "d": [88], "a": 1 }, | ||||
| 						{ "px": [160,224], "src": [0,0], "f": 0, "t": 0, "d": [89], "a": 1 }, | ||||
| 						{ "px": [192,224], "src": [0,0], "f": 0, "t": 0, "d": [90], "a": 1 }, | ||||
| 						{ "px": [224,224], "src": [0,0], "f": 0, "t": 0, "d": [91], "a": 1 }, | ||||
| 						{ "px": [256,224], "src": [0,0], "f": 0, "t": 0, "d": [92], "a": 1 }, | ||||
| 						{ "px": [288,224], "src": [0,0], "f": 0, "t": 0, "d": [93], "a": 1 }, | ||||
| 						{ "px": [320,224], "src": [0,0], "f": 0, "t": 0, "d": [94], "a": 1 }, | ||||
| 						{ "px": [352,224], "src": [0,0], "f": 0, "t": 0, "d": [95], "a": 1 }, | ||||
| 						{ "px": [0,256], "src": [0,0], "f": 0, "t": 0, "d": [96], "a": 1 }, | ||||
| 						{ "px": [32,256], "src": [0,0], "f": 0, "t": 0, "d": [97], "a": 1 }, | ||||
| 						{ "px": [64,256], "src": [0,0], "f": 0, "t": 0, "d": [98], "a": 1 }, | ||||
| 						{ "px": [96,256], "src": [0,0], "f": 0, "t": 0, "d": [99], "a": 1 }, | ||||
| 						{ "px": [128,256], "src": [0,0], "f": 0, "t": 0, "d": [100], "a": 1 }, | ||||
| 						{ "px": [160,256], "src": [0,0], "f": 0, "t": 0, "d": [101], "a": 1 }, | ||||
| 						{ "px": [192,256], "src": [0,0], "f": 0, "t": 0, "d": [102], "a": 1 }, | ||||
| 						{ "px": [224,256], "src": [0,0], "f": 0, "t": 0, "d": [103], "a": 1 }, | ||||
| 						{ "px": [256,256], "src": [0,0], "f": 0, "t": 0, "d": [104], "a": 1 }, | ||||
| 						{ "px": [288,256], "src": [0,0], "f": 0, "t": 0, "d": [105], "a": 1 }, | ||||
| 						{ "px": [320,256], "src": [0,0], "f": 0, "t": 0, "d": [106], "a": 1 }, | ||||
| 						{ "px": [352,256], "src": [0,0], "f": 0, "t": 0, "d": [107], "a": 1 } | ||||
| 					], | ||||
| 					"entityInstances": [] | ||||
| 				} | ||||
| 			], | ||||
| 			"__neighbours": [{ "levelIid": "f7eda580-c210-11ef-bffb-6b05aa089ccc", "dir": "w" }] | ||||
| 		} | ||||
| 	], | ||||
| 	"worlds": [], | ||||
| 	"dummyWorldIid": "f7ed7e71-c210-11ef-bffb-e5502bfa23c6" | ||||
| } | ||||
							
								
								
									
										61
									
								
								src/art/mapdata/zoo.mapfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								src/art/mapdata/zoo.mapfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | ||||
| architecture: | ||||
|  | ||||
| -------------- | ||||
| provinces: | ||||
|  | ||||
| -------------- | ||||
| { | ||||
|     "provinces": { | ||||
|         "a": "Zoo", | ||||
|         "b": "Gator Pen", | ||||
|         "c": "Food Storage" | ||||
|     }, | ||||
|     "architecture": { | ||||
|         "@": "entrance", | ||||
|         "#": "wall", | ||||
|         " ": "floor", | ||||
|         "*": { "item": "gecko" }, | ||||
|         ".": { | ||||
|             "pickup": [ | ||||
|                 "AGI", "AGI", "AGI", "AGI", | ||||
|                 "PSI", "PSI", | ||||
|                 "EXP" | ||||
|             ] | ||||
|         }, | ||||
|         "!": { "item": "colonialGoose" }, | ||||
|         "1": { | ||||
|             "label": "The gator pen appears to be locked. Some bats behind the barred gate are amusing themselves by swooping and darting just out of the alligators' reach.", | ||||
|             "checks": [ | ||||
|                 { | ||||
|                     "skills": ["lore1"], | ||||
|                     "locked": "That wall sure does look impenetrable.", | ||||
|                     "unlockable": "Notice a failure in the construction.", | ||||
|                     "unlockScene": [ | ||||
|                         "I dig my clawed fingers into a crack between the bricks and feel the concrete give way.", | ||||
|                         "This structure, built by mortals, is impermanent. Soon none of it will exist.", | ||||
|                         "I rip another clump of brittle earth from the crack, no longer invisible.", | ||||
|                         "And another. When the gap's wide enough to crawl through, I climb in." | ||||
|                     ] | ||||
|                 }, | ||||
|                 { | ||||
|                     "skills": ["stare0"], | ||||
|                     "locked": "The bats are happy by themselves.", | ||||
|                     "unlockable": "These bats could be enjoying themselves so much more.", | ||||
|                     "unlockScene": [ | ||||
|                         "I hold my face to the bars. One bat looks at me.", | ||||
|                         "\"Here, little bat\" -- I think before I say it. No, relate to it as an equal.", | ||||
|                         "What does it really want?", | ||||
|                         "What does any mortal want? It wants to feel good --"", | ||||
|                         "So stare --", | ||||
|                         "...", | ||||
|                         "... Now it breaks. Like any mortal.", | ||||
|                         "Still dripping, it flaps unsurely to the door and -- with only a little coaxing -- it opens the lock." | ||||
|                     ] | ||||
|                 } | ||||
|             ] | ||||
|         }, | ||||
|         "2": { | ||||
|             "label": | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -84,6 +84,14 @@ export class Size { | ||||
|   add(other: Size) { | ||||
|     return new Size(this.w + other.w, this.h + other.h); | ||||
|   } | ||||
|  | ||||
|   equals(other: Size) { | ||||
|     return this.w == other.w && this.h == other.h; | ||||
|   } | ||||
|  | ||||
|   toString(): string { | ||||
|     return `${this.w}x${this.h}` | ||||
|   } | ||||
| } | ||||
|  | ||||
| export class Rect { | ||||
| @@ -121,6 +129,18 @@ export class Grid<T> { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   static createGridFromMultilineString(multiline: string): Grid<string> { | ||||
|     let lines = [] | ||||
|     for (let line of multiline.split("\n")) { | ||||
|       let trimmedLine = line.trim(); | ||||
|       if (trimmedLine == "") { | ||||
|         continue; | ||||
|       } | ||||
|       lines.push(trimmedLine) | ||||
|     } | ||||
|     return this.createGridFromStringArray(lines); | ||||
|   } | ||||
|  | ||||
|   static createGridFromStringArray(ary: Array<string>): Grid<string> { | ||||
|     let w = 0; | ||||
|     let h = ary.length; | ||||
|   | ||||
							
								
								
									
										209
									
								
								src/huntmode.ts
									
									
									
									
									
								
							
							
						
						
									
										209
									
								
								src/huntmode.ts
									
									
									
									
									
								
							| @@ -1,39 +1,24 @@ | ||||
| import {Grid, Point, Rect, Size} from "./engine/datatypes.ts"; | ||||
| import {ALL_STATS, Resource, Stat} from "./datatypes.ts"; | ||||
| import {Point, Rect, Size} from "./engine/datatypes.ts"; | ||||
| import {ALL_STATS, Stat} from "./datatypes.ts"; | ||||
| import {DrawPile} from "./drawpile.ts"; | ||||
| import {D} from "./engine/public.ts"; | ||||
| import {sprDrips, sprLadder, sprRaccoonWalking, sprResourcePickup, sprStatPickup} from "./sprites.ts"; | ||||
| import {sprDrips, sprRaccoonWalking, sprResourcePickup, sprStatPickup} from "./sprites.ts"; | ||||
| import {BG_INSET, FG_TEXT} from "./colors.ts"; | ||||
| import {getPlayerProgress} from "./playerprogress.ts"; | ||||
| import {generate} from "./mapgen.ts"; | ||||
| import {Architecture, CellView, LoadedNewMap} from "./newmap.ts"; | ||||
|  | ||||
| export type MapCellContent = | ||||
|   {type: "statPickup", stat: Stat} | | ||||
|   {type: "resourcePickup", resource: Resource} | | ||||
|   {type: "stairs"} | | ||||
|   {type: "empty"} | | ||||
|   {type: "block"} | ||||
|  | ||||
| export type MapCell = { | ||||
|   content: MapCellContent, | ||||
|   isValidSpawn: boolean, | ||||
|   revealed: boolean, | ||||
|   nextMoveAccessible: boolean, | ||||
| } | ||||
|  | ||||
| export type LoadedMap = { | ||||
|   cells: Grid<MapCell>, | ||||
|   player: Point | ||||
| } | ||||
|  | ||||
| export class HuntMode { | ||||
|   map: LoadedMap | ||||
|   map: LoadedNewMap | ||||
|   player: Point | ||||
|  | ||||
|   drawpile: DrawPile | ||||
|   frame: number | ||||
|   depth: number | ||||
|  | ||||
|   constructor(depth: number) { | ||||
|     this.map = generate(); // initialized in replaceMap when the game is started | ||||
|   constructor(depth: number, map: LoadedNewMap) { | ||||
|     this.map = map; | ||||
|     this.player = map.entrance; | ||||
|  | ||||
|     this.drawpile = new DrawPile(); | ||||
|     this.frame = 0; | ||||
| @@ -47,73 +32,76 @@ export class HuntMode { | ||||
|  | ||||
|   // == update logic == | ||||
|   #updateVisibilityAndPossibleMoves() { | ||||
|     for (let x = 0; x < this.map.cells.size.w; x++) { | ||||
|       for (let y = 0; y < this.map.cells.size.h; y++) { | ||||
|         let position = new Point(x, y); | ||||
|         let data = this.map.cells.get(position); | ||||
|  | ||||
|         data.nextMoveAccessible = false; | ||||
|         if ( | ||||
|           Math.abs(x - this.map.player.x) <= 1 && | ||||
|           Math.abs(y - this.map.player.y) <= 1 | ||||
|         ) { | ||||
|           data.revealed = true; | ||||
|           if (!this.map.player.equals(position)) { | ||||
|             data.nextMoveAccessible = true; | ||||
|           } | ||||
|     let revealAt = (depth: number, xStart: number, yStart: number) => { | ||||
|       let cell = this.map.get(new Point(xStart, yStart)); | ||||
|       cell.revealed = true; | ||||
|       if (depth <= 0 || cell.architecture == Architecture.Wall) { | ||||
|         return; | ||||
|       } | ||||
|       for (let dx = -1; dx <= 1; dx++) { | ||||
|         for (let dy = -1; dy <= 1; dy++) { | ||||
|           let position = new Point(xStart + dx, yStart + dy); | ||||
|           revealAt(depth - 1, position.x, position.y); | ||||
|         } | ||||
|  | ||||
|       } | ||||
|     } | ||||
|     // NOTE: Depth 1 to reveal slightly less | ||||
|     revealAt(2, this.player.x, this.player.y); | ||||
|   } | ||||
|  | ||||
|   #collectResources() { | ||||
|     let present = this.map.cells.get(this.map.player); | ||||
|     let cell = this.map.get(this.player); | ||||
|  | ||||
|     /* | ||||
|     if (present.content.type == "stairs") { | ||||
|       getPlayerProgress().addBlood(1000); | ||||
|       initHuntMode(new HuntMode(this.depth + 1)); | ||||
|     } | ||||
|      */ | ||||
|  | ||||
|     if (present.content.type == "statPickup") { | ||||
|       let stat = present.content.stat; | ||||
|       let amount = 1; | ||||
|       present.content = {type: "empty"}; | ||||
|       getPlayerProgress().add(stat, amount); | ||||
|       getPlayerProgress().purloinItem(); | ||||
|     } | ||||
|  | ||||
|     if (present.content.type == "resourcePickup") { | ||||
|       let resource = present.content.resource; | ||||
|       switch(resource) { | ||||
|     let pickup = cell.pickup; | ||||
|     if (pickup != null) { | ||||
|       switch (pickup) { | ||||
|         case "AGI": | ||||
|         case "INT": | ||||
|         case "CHA": | ||||
|         case "PSI": | ||||
|           getPlayerProgress().add(pickup, 1); | ||||
|           getPlayerProgress().purloinItem(); | ||||
|           break; | ||||
|         case "EXP": | ||||
|           getPlayerProgress().addExperience(25); | ||||
|           getPlayerProgress().purloinItem(); | ||||
|           break; | ||||
|         default: | ||||
|           throw `not sure how to add ${resource}` | ||||
|           throw `not sure how to handle ${pickup}` | ||||
|       } | ||||
|       cell.pickup = null; | ||||
|     } | ||||
|  | ||||
|     present.content = {type: "empty"}; | ||||
|   } | ||||
|  | ||||
|   #computeCostToMoveTo(mapPosition: Point): number | null { | ||||
|     let present = this.map.cells.get(mapPosition); | ||||
|     if (present.content.type == "statPickup" || present.content.type == "resourcePickup") { | ||||
|       return 100; | ||||
|     let present = this.map.get(mapPosition); | ||||
|  | ||||
|     if (present.architecture != Architecture.Floor) { | ||||
|       return null; | ||||
|     } | ||||
|     if (present.content.type == "stairs") { | ||||
|       return 0; | ||||
|     } | ||||
|     if (present.content.type == "empty") { | ||||
|       return 10; | ||||
|     } | ||||
|     return null; | ||||
|  | ||||
|     let dist = Math.max( | ||||
|       Math.abs(mapPosition.x - this.player.x), | ||||
|       Math.abs(mapPosition.y - this.player.y) | ||||
|     ); | ||||
|  | ||||
|     if (dist != 1) { return null; } | ||||
|  | ||||
|     let pickup = present.pickup; | ||||
|     if (pickup == null) { return 10; } | ||||
|     return 100;  // any other pickup (EXP, stats, etc) | ||||
|   } | ||||
|  | ||||
|   movePlayerTo(newPosition: Point) { | ||||
|     this.map.player = newPosition; | ||||
|     this.player = newPosition; | ||||
|     this.#updateVisibilityAndPossibleMoves(); | ||||
|     this.#collectResources(); | ||||
|   } | ||||
| @@ -124,22 +112,21 @@ export class HuntMode { | ||||
|     this.drawpile.clear(); | ||||
|  | ||||
|     let globalOffset = | ||||
|       new Point(this.map.player.x * MAP_CELL_ONSCREEN_SIZE.w, this.map.player.y * MAP_CELL_ONSCREEN_SIZE.h).offset( | ||||
|       new Point(this.player.x * MAP_CELL_ONSCREEN_SIZE.w, this.player.y * MAP_CELL_ONSCREEN_SIZE.h).offset( | ||||
|         new Point(-192, -192) | ||||
|       ) | ||||
|  | ||||
|     let map = this.map.cells; | ||||
|     for (let y = 0; y < map.size.h; y += 1) { | ||||
|       for (let x = 0; x < map.size.w; x += 1) { | ||||
|     for (let y = 0; y < this.map.size.h; y += 1) { | ||||
|       for (let x = 0; x < this.map.size.w; x += 1) { | ||||
|         let cellOffset = new Point(x * MAP_CELL_ONSCREEN_SIZE.w, y * MAP_CELL_ONSCREEN_SIZE.h).offset(globalOffset.negate()); | ||||
|         let cellData = this.map.cells.get(new Point(x, y)) | ||||
|         let cell = this.map.get(new Point(x, y)) | ||||
|         let belowIsBlock = true; | ||||
|         if (y < map.size.h - 1) { | ||||
|           let below = this.map.cells.get(new Point(x, y + 1)); | ||||
|           belowIsBlock = !below.revealed || below.content.type == "block"; | ||||
|         if (y < this.map.size.h - 1) { | ||||
|           let below = this.map.get(new Point(x, y + 1)); | ||||
|           belowIsBlock = !below.revealed || below.architecture == Architecture.Wall; | ||||
|         } | ||||
|  | ||||
|         this.#drawMapCell(cellOffset, new Point(x, y), cellData, belowIsBlock); | ||||
|         this.#drawMapCell(cellOffset, new Point(x, y), cell, belowIsBlock); | ||||
|       } | ||||
|     } | ||||
|     this.#drawPlayer(globalOffset); | ||||
| @@ -154,7 +141,7 @@ export class HuntMode { | ||||
|   #drawMapCell( | ||||
|     cellOffset: Point, | ||||
|     mapPosition: Point, | ||||
|     cellData: MapCell, | ||||
|     cellData: CellView, | ||||
|     belowIsBlock: boolean | ||||
|   ) { | ||||
|     const OFFSET_FLOOR = -256; | ||||
| @@ -170,7 +157,7 @@ export class HuntMode { | ||||
|     let cellTopLeft = cellOffset.offset(new Size(-MAP_CELL_ONSCREEN_SIZE.w / 2, -MAP_CELL_ONSCREEN_SIZE.h / 2)); | ||||
|     let cellSize = MAP_CELL_ONSCREEN_SIZE; | ||||
|  | ||||
|     if (cellData.content.type == "block") { | ||||
|     if (cellData.architecture == Architecture.Wall) { | ||||
|       if (!belowIsBlock) { | ||||
|         this.drawpile.add(inAir, () => { | ||||
|           D.drawSprite(sprDrips, cellOffset.offset(new Point(0, -cellSize.h / 2)), 1, {xScale: 3, yScale: 3}) | ||||
| @@ -185,13 +172,16 @@ export class HuntMode { | ||||
|       (hover: boolean) => { | ||||
|         D.fillRect(cellTopLeft, cellSize, hover ? FG_TEXT : BG_INSET) | ||||
|  | ||||
|         /* | ||||
|         // TODO: Stairs | ||||
|         if (cellData.content.type == "stairs") { | ||||
|           // draw ladder if applicable | ||||
|           D.drawSprite(sprLadder, cellTopLeft, 0, {xScale: 3, yScale: 3}); | ||||
|         } | ||||
|          */ | ||||
|       }, | ||||
|       new Rect(cellTopLeft, cellSize), | ||||
|       cellData.nextMoveAccessible && cost != null && cost <= getPlayerProgress().getBlood(), | ||||
|       cost != null && cost <= getPlayerProgress().getBlood(), | ||||
|       () => { | ||||
|         if (cost != null) { | ||||
|           getPlayerProgress().spendBlood(cost); | ||||
| @@ -208,44 +198,47 @@ export class HuntMode { | ||||
|       }) | ||||
|     } | ||||
|  | ||||
|     if (cellData.content.type == "statPickup") { | ||||
|       let content = cellData.content; | ||||
|       let extraXOffset = 0; // Math.cos(this.frame / 80 + mapPosition.x + mapPosition.y) * 1; | ||||
|       let extraYOffset = Math.sin(this.frame / 50 + mapPosition.x * 2+ mapPosition.y * 0.75) * 6 - 18; | ||||
|       this.drawpile.add(inAir, () => { | ||||
|         D.drawSprite( | ||||
|           sprStatPickup, | ||||
|           cellOffset.offset(new Point(extraXOffset, extraYOffset)), | ||||
|           ALL_STATS.indexOf(content.stat), | ||||
|           { | ||||
|             xScale: 3, | ||||
|             yScale: 3, | ||||
|           } | ||||
|         ) | ||||
|       }); | ||||
|     } | ||||
|     let pickup = cellData.pickup; | ||||
|     if (pickup != null) { | ||||
|       let statIndex = ALL_STATS.indexOf(pickup as Stat); | ||||
|       if (statIndex != -1) { | ||||
|         let extraXOffset = 0; // Math.cos(this.frame / 80 + mapPosition.x + mapPosition.y) * 1; | ||||
|         let extraYOffset = Math.sin(this.frame / 50 + mapPosition.x * 2 + mapPosition.y * 0.75) * 6 - 18; | ||||
|         this.drawpile.add(inAir, () => { | ||||
|           D.drawSprite( | ||||
|             sprStatPickup, | ||||
|             cellOffset.offset(new Point(extraXOffset, extraYOffset)), | ||||
|             statIndex, | ||||
|             { | ||||
|               xScale: 3, | ||||
|               yScale: 3, | ||||
|             } | ||||
|           ) | ||||
|         }); | ||||
|       } | ||||
|  | ||||
|     if (cellData.content.type == "resourcePickup" && cellData.content.resource == "EXP") { | ||||
|       this.drawpile.add(inAir, () => { | ||||
|         D.drawSprite( | ||||
|           sprResourcePickup, | ||||
|           cellOffset.offset(new Point(0, -16 * 3)), | ||||
|           0, | ||||
|           { | ||||
|             xScale: 3, | ||||
|             yScale: 3, | ||||
|           } | ||||
|         ); | ||||
|       }); | ||||
|       if (pickup == "EXP") { | ||||
|         this.drawpile.add(inAir, () => { | ||||
|           D.drawSprite( | ||||
|             sprResourcePickup, | ||||
|             cellOffset.offset(new Point(0, -16 * 3)), | ||||
|             0, | ||||
|             { | ||||
|               xScale: 3, | ||||
|               yScale: 3, | ||||
|             } | ||||
|           ); | ||||
|         }); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   #drawPlayer(globalOffset: Point) { | ||||
|     let cellOffset = new Point( | ||||
|       this.map.player.x * MAP_CELL_ONSCREEN_SIZE.w, | ||||
|       this.map.player.y * MAP_CELL_ONSCREEN_SIZE.h | ||||
|       this.player.x * MAP_CELL_ONSCREEN_SIZE.w, | ||||
|       this.player.y * MAP_CELL_ONSCREEN_SIZE.h | ||||
|     ).offset(globalOffset.negate()) | ||||
|     this.drawpile.add(this.map.player.y, () => { | ||||
|     this.drawpile.add(this.player.y, () => { | ||||
|       D.drawSprite( | ||||
|         sprRaccoonWalking, | ||||
|         cellOffset.offset(new Point(0, 22)), | ||||
|   | ||||
| @@ -1,92 +0,0 @@ | ||||
| import {ConceptualCell, maps} from "./maps.ts"; | ||||
| import {Grid, Point, Size} from "./engine/datatypes.ts"; | ||||
| import {ALL_STATS} from "./datatypes.ts"; | ||||
| import {LoadedMap, MapCell, MapCellContent} from "./huntmode.ts"; | ||||
| import {choose} from "./utils.ts"; | ||||
|  | ||||
| export function generate(): LoadedMap { | ||||
|   let mapNames: Array<string> = Object.keys(maps); | ||||
|   let mapName = mapNames[Math.floor(Math.random() * mapNames.length)]; | ||||
|   let map = maps[mapName]; | ||||
|  | ||||
|   let baseCells = map.map((ccell, _xy) => { | ||||
|     return generateCell(ccell); | ||||
|   }) | ||||
|  | ||||
|   let cells = new Grid( | ||||
|     new Size(baseCells.size.w + 2, baseCells.size.h + 2), (xy) => { | ||||
|       let offset = xy.offset(new Point(-1, -1)); | ||||
|       if (offset.x == -1 || offset.y == -1 || offset.x == baseCells.size.w || offset.y == baseCells.size.h) { | ||||
|         return generateBoundaryCell(); | ||||
|       } | ||||
|       return baseCells.get(offset) | ||||
|     } | ||||
|   ) | ||||
|  | ||||
|   let validSpawns = []; | ||||
|   for (let x = 0; x < cells.size.w; x++) { | ||||
|     for (let y = 0; y < cells.size.h; y++) { | ||||
|       let position = new Point(x, y); | ||||
|       if (cells.get(position).isValidSpawn)  { | ||||
|         validSpawns.push(position); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   let player = choose(validSpawns); | ||||
|   cells.get(player).content = {type: "empty"}; | ||||
|  | ||||
|   let nStairs = choose([1, 1, 1, 0]); | ||||
|   for (let i = 0; i < nStairs; i++) { | ||||
|     while (true) { | ||||
|       let x = Math.floor(Math.random() * cells.size.w); | ||||
|       let y = Math.floor(Math.random() * cells.size.h); | ||||
|       let xy = new Point(x, y); | ||||
|  | ||||
|       let item = cells.get(new Point(x, y)); | ||||
|       if (player.equals(xy)) { | ||||
|         continue; | ||||
|       } | ||||
|       if (item.content.type == "block" || item.content.type == "stairs") { | ||||
|         continue; | ||||
|       } | ||||
|       item.content = {type: "stairs"} | ||||
|       break; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   return { | ||||
|     cells, | ||||
|     player, | ||||
|   } | ||||
| } | ||||
|  | ||||
| function generateCell(conceptual: ConceptualCell): MapCell { | ||||
|   switch (conceptual) { | ||||
|     case "X": | ||||
|       return { content: {type: "block"}, revealed: false, isValidSpawn: false, nextMoveAccessible: false}; | ||||
|     case " ": | ||||
|       return { content: generateContent(), revealed: false, isValidSpawn: false, nextMoveAccessible: false }; | ||||
|     case ".": | ||||
|       return { content: generateContent(), revealed: false, isValidSpawn: true, nextMoveAccessible: false }; | ||||
|   } | ||||
| } | ||||
|  | ||||
| function generateBoundaryCell() { | ||||
|   return generateCell("X"); | ||||
| } | ||||
|  | ||||
| function generateContent(): MapCellContent { | ||||
|   // stat pickup | ||||
|   let gsp = (): MapCellContent => { | ||||
|     return {type: "statPickup", stat: choose(ALL_STATS)} | ||||
|   }; | ||||
|   let exp = (): MapCellContent => { | ||||
|     return {type: "resourcePickup", resource: "EXP"} | ||||
|   } | ||||
|   // TODO: Other objects? | ||||
|   return choose([ | ||||
|     gsp, gsp, gsp, gsp, | ||||
|     exp, | ||||
|   ])(); | ||||
| } | ||||
|  | ||||
							
								
								
									
										62
									
								
								src/maps.ts
									
									
									
									
									
								
							
							
						
						
									
										62
									
								
								src/maps.ts
									
									
									
									
									
								
							| @@ -1,62 +0,0 @@ | ||||
| import {Grid} from "./engine/datatypes.ts"; | ||||
|  | ||||
| export type ConceptualCell = "X" | "." | " "; | ||||
|  | ||||
| function loadMap(map: Array<string>): Grid<ConceptualCell> { | ||||
|   let src = Grid.createGridFromStringArray(map); | ||||
|   return src.map((char: string): ConceptualCell => { | ||||
|     switch(char) { | ||||
|       case "X": return "X"; | ||||
|       case ".": return "."; | ||||
|       case " ": return " "; | ||||
|       default: | ||||
|         throw `map element not valid: ${char}` | ||||
|   }}); | ||||
| } | ||||
|  | ||||
| export let maps: Record<string, Grid<ConceptualCell>> = { | ||||
|   map0: loadMap([ | ||||
|     "XX        XX", | ||||
|     "X.        .X", | ||||
|     "            ", | ||||
|     "            ", | ||||
|     "            ", | ||||
|     "            ", | ||||
|     "            ", | ||||
|     "X.        .X", | ||||
|     "XX        XX", | ||||
|   ]), | ||||
|   map1: loadMap([ | ||||
|     "XX.       XX", | ||||
|     "XXX    X  .X", | ||||
|     ".XX    XX   ", | ||||
|     "       .XX  ", | ||||
|     "            ", | ||||
|     "  XX.       ", | ||||
|     "   XX    XX.", | ||||
|     "X.  X    XXX", | ||||
|     "XX       .XX", | ||||
|   ]), | ||||
|   map2: loadMap([ | ||||
|     "XX  XXXX  XX", | ||||
|     "X. XXXXXX .X", | ||||
|     "   XX..XX   ", | ||||
|     "            ", | ||||
|     "            ", | ||||
|     "            ", | ||||
|     "   XX..XX   ", | ||||
|     "X. XXXXXX .X", | ||||
|     "XX  XXXX  XX", | ||||
|   ]), | ||||
|   map3: loadMap([ | ||||
|     "X   XXXX   X", | ||||
|     " .        . ", | ||||
|     "   .    .   ", | ||||
|     "X   XXXX   X", | ||||
|     "X   XXXX   X", | ||||
|     "X   XXXX   X", | ||||
|     "   .    .   ", | ||||
|     " .        . ", | ||||
|     "X   XXXX   X", | ||||
|   ]), | ||||
| } | ||||
							
								
								
									
										211
									
								
								src/newmap.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										211
									
								
								src/newmap.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,211 @@ | ||||
| import {Resource, Skill, Stat} from "./datatypes.ts"; | ||||
| import {Grid, Point, Size} from "./engine/datatypes.ts"; | ||||
| import {choose} from "./utils.ts"; | ||||
| import {VNScene} from "./vnscene.ts"; | ||||
|  | ||||
| export type Province = "a" | "b" | "c"; | ||||
| export type Check = "1" | "2"; | ||||
| export type Progress = Stat | Resource | ||||
| export type Pickup = Progress; // TODO: Items | ||||
| export type NewMapInput = { | ||||
|   id: string, | ||||
|   data: { | ||||
|     architecture: string, | ||||
|     provinces: string, | ||||
|   } | ||||
|   pickups: { | ||||
|     "*"?: string, | ||||
|     stat: {primary: Stat, secondary: Stat}, | ||||
|     "!"?: string, | ||||
|   }, | ||||
|   provinces: Record<Province, string>, | ||||
|   checks: Record<Check, CheckData>, | ||||
| } | ||||
| export type CheckData = { | ||||
|   label: string, | ||||
|   options: CheckDataOption[], | ||||
| } | ||||
| export type CheckDataOption = { | ||||
|   skills: () => Skill[], | ||||
|   locked: string, | ||||
|   unlockable: string, | ||||
|   unlockScene: VNScene, | ||||
| } | ||||
|  | ||||
| export enum Architecture { Wall, Floor } | ||||
|  | ||||
| export class LoadedNewMap { | ||||
|   #id: string | ||||
|   #size: Size | ||||
|   #entrance: Point | null | ||||
|   #architecture: Grid<Architecture> | ||||
|   #pickups: Grid<Pickup | null> | ||||
|   #provinces: Grid<string | null> | ||||
|   #checks: Grid<CheckData | null> | ||||
|   #revealed: Grid<boolean> | ||||
|  | ||||
|   constructor(id: string, size: Size) { | ||||
|     this.#id = id; | ||||
|     this.#size = size; | ||||
|     this.#entrance = null; | ||||
|     this.#architecture = new Grid<Architecture>(size, () => Architecture.Wall); | ||||
|     this.#pickups = new Grid<Pickup | null>(size, () => null); | ||||
|     this.#provinces = new Grid<string | null>(size, () => null); | ||||
|     this.#checks = new Grid<CheckData | null>(size, () => null); | ||||
|     this.#revealed = new Grid<boolean>(size, () => false); | ||||
|   } | ||||
|  | ||||
|   set entrance(point: Point) { | ||||
|     this.#entrance = point; | ||||
|   } | ||||
|  | ||||
|   get entrance(): Point { | ||||
|     if (this.#entrance == null) { | ||||
|       throw `${this.#id}: this.#entrance was never initialized` | ||||
|     } | ||||
|     return this.#entrance; | ||||
|   } | ||||
|  | ||||
|   get size(): Size { | ||||
|     return this.#size; | ||||
|   } | ||||
|  | ||||
|   get(point: Point): CellView { | ||||
|     return new CellView(this, point) | ||||
|   } | ||||
|  | ||||
|   setArchitecture(point: Point, value: Architecture) { | ||||
|     this.#architecture.set(point, value); | ||||
|   } | ||||
|  | ||||
|   getArchitecture(point: Point): Architecture { | ||||
|     return this.#architecture.get(point); | ||||
|   } | ||||
|  | ||||
|   setPickup(point: Point, value: Pickup | null) { | ||||
|     this.#pickups.set(point, value); | ||||
|   } | ||||
|  | ||||
|   getPickup(point: Point): Pickup | null { | ||||
|     return this.#pickups.get(point); | ||||
|   } | ||||
|  | ||||
|   setProvince(point: Point, value: string | null) { | ||||
|     this.#provinces.set(point, value); | ||||
|   } | ||||
|  | ||||
|   getProvince(point: Point): string | null { | ||||
|     return this.#provinces.get(point); | ||||
|   } | ||||
|  | ||||
|   setCheck(point: Point, value: CheckData | null) { | ||||
|     this.#checks.set(point, value); | ||||
|   } | ||||
|  | ||||
|   getCheck(point: Point): CheckData | null { | ||||
|     return this.#checks.get(point); | ||||
|   } | ||||
|  | ||||
|   setRevealed(point: Point, value: boolean) { | ||||
|     this.#revealed.set(point, value) | ||||
|   } | ||||
|  | ||||
|   getRevealed(point: Point): boolean { | ||||
|     return this.#revealed.get(point); | ||||
|   } | ||||
| } | ||||
|  | ||||
| export class CellView { | ||||
|   #map: LoadedNewMap | ||||
|   #point: Point | ||||
|  | ||||
|   constructor(map: LoadedNewMap, point: Point) { | ||||
|     this.#map = map; | ||||
|     this.#point = point; | ||||
|   } | ||||
|  | ||||
|   set architecture(value: Architecture) { this.#map.setArchitecture(this.#point, value) } | ||||
|   get architecture(): Architecture { return this.#map.getArchitecture(this.#point) } | ||||
|  | ||||
|   set pickup(value: Pickup | null) { this.#map.setPickup(this.#point, value) } | ||||
|   get pickup(): Pickup | null { return this.#map.getPickup(this.#point) } | ||||
|  | ||||
|   set province(value: string | null) { this.#map.setProvince(this.#point, value) } | ||||
|   get province(): string | null { return this.#map.getProvince(this.#point) } | ||||
|  | ||||
|   set check(value: CheckData | null) { this.#map.setCheck(this.#point, value) } | ||||
|   get check(): CheckData | null { return this.#map.getCheck(this.#point) } | ||||
|  | ||||
|   set revealed(value: boolean) { this.#map.setRevealed(this.#point, value) } | ||||
|   get revealed(): boolean { return this.#map.getRevealed(this.#point) } | ||||
|  | ||||
|   copyFrom(cell: CellView) { | ||||
|     this.architecture = cell.architecture; | ||||
|     this.pickup = cell.pickup; | ||||
|     this.province = cell.province; | ||||
|     this.check = cell.check; | ||||
|     this.revealed = cell.revealed; | ||||
|   } | ||||
| } | ||||
|  | ||||
| export type NewMap = () => LoadedNewMap; | ||||
|  | ||||
| export function compileNewMap(input: NewMapInput): NewMap { | ||||
|   let {architecture: architectureInput, provinces: provincesInput} = input.data; | ||||
|   let architecture = Grid.createGridFromMultilineString(architectureInput); | ||||
|   let provinces = Grid.createGridFromMultilineString(provincesInput); | ||||
|  | ||||
|   let size = architecture.size; | ||||
|   if (!size.equals(provinces.size)) { | ||||
|     throw `${input.id}: malformed, wrong province size (${provinces.size})`; | ||||
|   } | ||||
|  | ||||
|   return () => { | ||||
|     let map = new LoadedNewMap(input.id, size); | ||||
|  | ||||
|     for (let y = 0; y < size.h; y++) { | ||||
|       for (let x = 0; x < size.w; x++) { | ||||
|         let xy = new Point(x, y); | ||||
|         let cell = map.get(xy); | ||||
|  | ||||
|         // set up the wall | ||||
|         let arch = architecture.get(xy); | ||||
|         cell.architecture = Architecture.Floor; | ||||
|         if (arch == "#") { | ||||
|           cell.architecture = Architecture.Wall; | ||||
|         } else if (arch == "@") { | ||||
|           map.entrance = xy; | ||||
|         } else if (arch == " " || arch == "-") { | ||||
|  | ||||
|         } | ||||
|         // player resources: pickups | ||||
|         else if (arch == ".") { | ||||
|           let stat = choose([ | ||||
|             input.pickups.stat.primary, | ||||
|             input.pickups.stat.primary, | ||||
|             input.pickups.stat.secondary | ||||
|           ]) | ||||
|           cell.pickup = choose<Progress>([stat, stat, stat, "EXP"]); | ||||
|         } else if (arch == "*") { | ||||
|           // TODO: Common item | ||||
|         } else if (arch == "!") { | ||||
|           // TODO: Artifact | ||||
|         } | ||||
|         // stat checks | ||||
|         else if (input.checks.hasOwnProperty(arch)) { | ||||
|           cell.check = input.checks[arch as Check]; | ||||
|         } else { | ||||
|           throw `${input.id}: unrecognized architecture cell: ${arch}` | ||||
|         } | ||||
|  | ||||
|         // set province | ||||
|         let provinceId = provinces.get(xy); | ||||
|         if (input.provinces.hasOwnProperty(provinceId)) { | ||||
|           cell.province = input.provinces[provinceId as Province]; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     return map; | ||||
|   } | ||||
| } | ||||
							
								
								
									
										11
									
								
								src/newmaps/bloodBank/architecture.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/bloodBank/architecture.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #  #   #  # | ||||
| #  #   2  # | ||||
| -  #   #  # | ||||
| #  #   #  # | ||||
| #  #####  # | ||||
| #      1  # | ||||
| #     ##### | ||||
| #         # | ||||
| #####     # | ||||
| ########### | ||||
							
								
								
									
										27
									
								
								src/newmaps/bloodBank/map.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/newmaps/bloodBank/map.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| import architecture from "./architecture.txt?raw"; | ||||
| import provinces from "./provinces.txt?raw"; | ||||
| import {compileNewMap} from "../../newmap.ts"; | ||||
|  | ||||
| const mapBloodBank = compileNewMap({ | ||||
|   id: "mapBloodBank", | ||||
|   data: { | ||||
|     architecture: architecture, | ||||
|     provinces: provinces, | ||||
|   }, | ||||
|   pickups: { | ||||
|     // "*": itemGecko, | ||||
|     stat: {primary: "AGI", secondary: "INT"}, | ||||
|     // "!": {"item": "colonialGoose"}, | ||||
|   }, | ||||
|   provinces: { | ||||
|     a: "Blood Bank", | ||||
|     b: "Special Reserve", | ||||
|     c: "Freezer", | ||||
|   }, | ||||
|   checks: { | ||||
|     1: null!, | ||||
|     2: null!, | ||||
|   } | ||||
| }) | ||||
|  | ||||
| export default mapBloodBank; | ||||
							
								
								
									
										11
									
								
								src/newmaps/bloodBank/provinces.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/bloodBank/provinces.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #aa#ccc#bb# | ||||
| #aa#ccc bb# | ||||
| -aa#ccc#bb# | ||||
| #aa#ccc#bb# | ||||
| #aa#####bb# | ||||
| #aaaaaa bb# | ||||
| #aaaaa##### | ||||
| #aaaaaaaaa# | ||||
| #####aaaaa# | ||||
| ########### | ||||
							
								
								
									
										11
									
								
								src/newmaps/club/architecture.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/club/architecture.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #         # | ||||
| #         # | ||||
| ########  # | ||||
| #      1  # | ||||
| #  #####  - | ||||
| #  #   #  # | ||||
| #  #   #  # | ||||
| #  2   #  # | ||||
| #  #   #  # | ||||
| ########### | ||||
							
								
								
									
										27
									
								
								src/newmaps/club/map.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/newmaps/club/map.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| import architecture from "./architecture.txt?raw"; | ||||
| import provinces from "./provinces.txt?raw"; | ||||
| import {compileNewMap} from "../../newmap.ts"; | ||||
|  | ||||
| const mapClub = compileNewMap({ | ||||
|   id: "mapClub", | ||||
|   data: { | ||||
|     architecture: architecture, | ||||
|     provinces: provinces, | ||||
|   }, | ||||
|   pickups: { | ||||
|     // "*": itemGecko, | ||||
|     stat: {primary: "CHA", secondary: "PSI"}, | ||||
|     // "!": {"item": "colonialGoose"}, | ||||
|   }, | ||||
|   provinces: { | ||||
|     a: "Club", | ||||
|     b: "Poker Game", | ||||
|     c: "Trophy Collection", | ||||
|   }, | ||||
|   checks: { | ||||
|     1: null!, | ||||
|     2: null!, | ||||
|   } | ||||
| }) | ||||
|  | ||||
| export default mapClub; | ||||
							
								
								
									
										11
									
								
								src/newmaps/club/provinces.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/club/provinces.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #aaaaaaaaa# | ||||
| #aaaaaaaaa# | ||||
| ########aa# | ||||
| #bbbbbb aa# | ||||
| #bb#####aa- | ||||
| #bb#ccc#aa# | ||||
| #bb#ccc#aa# | ||||
| #bb ccc#aa# | ||||
| #bb#ccc#aa# | ||||
| ########### | ||||
							
								
								
									
										11
									
								
								src/newmaps/coffeeShop/architecture.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/coffeeShop/architecture.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #   #     # | ||||
| #   2     # | ||||
| #   #     # | ||||
| #   #####1# | ||||
| #    #    # | ||||
| #    #    # | ||||
| ######    # | ||||
| #         # | ||||
| #         # | ||||
| ###### #### | ||||
							
								
								
									
										27
									
								
								src/newmaps/coffeeShop/map.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/newmaps/coffeeShop/map.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| import architecture from "./architecture.txt?raw"; | ||||
| import provinces from "./provinces.txt?raw"; | ||||
| import {compileNewMap} from "../../newmap.ts"; | ||||
|  | ||||
| const mapCoffeeShop = compileNewMap({ | ||||
|   id: "mapCoffeeShop", | ||||
|   data: { | ||||
|     architecture: architecture, | ||||
|     provinces: provinces, | ||||
|   }, | ||||
|   pickups: { | ||||
|     // "*": itemGecko, | ||||
|     stat: {primary: "PSI", secondary: "CHA"}, | ||||
|     // "!": {"item": "colonialGoose"}, | ||||
|   }, | ||||
|   provinces: { | ||||
|     a: "Coffee Shop", | ||||
|     b: "Studio", | ||||
|     c: "Personal Photo Room", | ||||
|   }, | ||||
|   checks: { | ||||
|     1: null!, | ||||
|     2: null!, | ||||
|   } | ||||
| }) | ||||
|  | ||||
| export default mapCoffeeShop; | ||||
							
								
								
									
										11
									
								
								src/newmaps/coffeeShop/provinces.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/coffeeShop/provinces.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #ccc#bbbbb# | ||||
| #ccc bbbbb# | ||||
| #ccc#bbbbb# | ||||
| #ccc##### # | ||||
| #cccc#aaaa# | ||||
| #cccc#aaaa# | ||||
| ######aaaa# | ||||
| #aaaaaaaaa# | ||||
| #aaaaaaaaa# | ||||
| ###### #### | ||||
							
								
								
									
										59
									
								
								src/newmaps/hub/map.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								src/newmaps/hub/map.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,59 @@ | ||||
| import metamap from "./metamap.txt?raw"; | ||||
| import {Architecture, LoadedNewMap, NewMap} from "../../newmap.ts"; | ||||
| import {Grid, Point} from "../../engine/datatypes.ts"; | ||||
| import mapZoo from "../zoo/map.ts"; | ||||
| import mapOptometrist from "../optometrist/map.ts"; | ||||
| import mapBloodBank from "../bloodBank/map.ts"; | ||||
| import mapCoffeeShop from "../coffeeShop/map.ts"; | ||||
| import mapClub from "../club/map.ts"; | ||||
| import mapManor from "../manor/map.ts"; | ||||
| import mapLibrary from "../library/map.ts"; | ||||
|  | ||||
| const mapHub: NewMap = () => { | ||||
|   let metamapLayer = Grid.createGridFromMultilineString(metamap); | ||||
|  | ||||
|   // NOTE: We could deduce this from the file -- | ||||
|   // BUT, for now, let's just use the maps directly | ||||
|   let blits = [ | ||||
|     {at: new Point(2, 0), map: mapOptometrist()}, | ||||
|     {at: new Point(0, 12), map: mapZoo()}, | ||||
|     {at: new Point(13, 9), map: mapBloodBank()}, | ||||
|     {at: new Point(24, 9), map: mapCoffeeShop()}, | ||||
|     {at: new Point(0, 22), map: mapClub()}, | ||||
|     {at: new Point(13, 22), map: mapManor(), useEntrance: true}, | ||||
|     {at: new Point(26, 22), map: mapLibrary()}, | ||||
|   ]; | ||||
|  | ||||
|   let metamapContent = new LoadedNewMap("hub", metamapLayer.size); | ||||
|  | ||||
|   for (let y = 0; y < metamapLayer.size.h; y++) { | ||||
|     for (let x = 0; x < metamapLayer.size.w; x++) { | ||||
|       let src = new Point(x, y); | ||||
|       let cell = metamapContent.get(src); | ||||
|       if (metamapLayer.get(src) == "#") { | ||||
|         cell.architecture = Architecture.Wall; | ||||
|       } else if (metamapLayer.get(src) == " ") { | ||||
|         cell.architecture = Architecture.Floor; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   for (let {at, map, useEntrance} of blits.values()) { | ||||
|     for (let srcY = 0; srcY < map.size.h; srcY++) { | ||||
|       for (let srcX = 0; srcX < map.size.w; srcX++) { | ||||
|         let src = new Point(srcX, srcY); | ||||
|         let dst = at.offset(new Point(srcX, srcY)); | ||||
|         metamapContent.get(dst).copyFrom(map.get(src)) | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     if (useEntrance ?? false) { | ||||
|       console.log("beep"); | ||||
|       metamapContent.entrance = at.offset(map.entrance); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   return metamapContent; | ||||
| } | ||||
|  | ||||
| export default mapHub; | ||||
							
								
								
									
										33
									
								
								src/newmaps/hub/metamap.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								src/newmaps/hub/metamap.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| ##11111111111######################## | ||||
| ##11111111111######################## | ||||
| ##11111111111######################## | ||||
| ##11111111111######################## | ||||
| ##11111111111######################## | ||||
| ##11111111111######################## | ||||
| ##11111111111######################## | ||||
| ##11111111111######################## | ||||
| ##11111111111######################## | ||||
| ##111111111113333333333344444444444## | ||||
| ##111111111113333333333344444444444## | ||||
| 22222222222  3333333333344444444444## | ||||
| 22222222222  3333333333344444444444## | ||||
| 22222222222  3333333333344444444444## | ||||
| 22222222222  3333333333344444444444## | ||||
| 22222222222  3333333333344444444444## | ||||
| 22222222222  3333333333344444444444## | ||||
| 22222222222  3333333333344444444444## | ||||
| 22222222222  3333333333344444444444## | ||||
| 22222222222  3333333333344444444444## | ||||
| 22222222222                    ###### | ||||
| 22222222222                    ###### | ||||
| 55555555555  66666666666  77777777777 | ||||
| 55555555555  66666666666  77777777777 | ||||
| 55555555555  66666666666  77777777777 | ||||
| 55555555555  66666666666  77777777777 | ||||
| 55555555555  66666666666##77777777777 | ||||
| 55555555555##66666666666##77777777777 | ||||
| 55555555555##66666666666##77777777777 | ||||
| 55555555555##66666666666##77777777777 | ||||
| 55555555555##66666666666##77777777777 | ||||
| 55555555555##66666666666##77777777777 | ||||
| 55555555555##66666666666##77777777777 | ||||
							
								
								
									
										
											BIN
										
									
								
								src/newmaps/hub/overworld.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/newmaps/hub/overworld.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 912 B | 
							
								
								
									
										11
									
								
								src/newmaps/library/architecture.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/library/architecture.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #  #      # | ||||
| #  #      # | ||||
| -  #      # | ||||
| # ######2## | ||||
| #  1      # | ||||
| #  #      # | ||||
| #  #      # | ||||
| #  #      # | ||||
| #  #      # | ||||
| ########### | ||||
							
								
								
									
										27
									
								
								src/newmaps/library/map.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/newmaps/library/map.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| import architecture from "./architecture.txt?raw"; | ||||
| import provinces from "./provinces.txt?raw"; | ||||
| import {compileNewMap} from "../../newmap.ts"; | ||||
|  | ||||
| const mapLibrary = compileNewMap({ | ||||
|   id: "mapLibrary", | ||||
|   data: { | ||||
|     architecture: architecture, | ||||
|     provinces: provinces, | ||||
|   }, | ||||
|   pickups: { | ||||
|     // "*": itemGecko, | ||||
|     stat: {primary: "INT", secondary: "CHA"}, | ||||
|     // "!": {"item": "colonialGoose"}, | ||||
|   }, | ||||
|   provinces: { | ||||
|     a: "Library", | ||||
|     b: "Computer Room", | ||||
|     c: "Special Collection", | ||||
|   }, | ||||
|   checks: { | ||||
|     1: null!, | ||||
|     2: null!, | ||||
|   } | ||||
| }) | ||||
|  | ||||
| export default mapLibrary; | ||||
							
								
								
									
										11
									
								
								src/newmaps/library/provinces.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/library/provinces.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #aa#cccccc# | ||||
| #aa#cccccc# | ||||
| -aa#cccccc# | ||||
| #a###### ## | ||||
| #aa bbbbbb# | ||||
| #aa#bbbbbb# | ||||
| #aa#bbbbbb# | ||||
| #aa#bbbbbb# | ||||
| #aa#bbbbbb# | ||||
| ########### | ||||
							
								
								
									
										11
									
								
								src/newmaps/manor/architecture.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/manor/architecture.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ####   #### | ||||
| #  #   #  # | ||||
| #  ## ##  # | ||||
| #   # #   # | ||||
| #         # | ||||
| ##### ##### | ||||
| #   # #   # | ||||
| #         # | ||||
| #    @    # | ||||
| #         # | ||||
| ########### | ||||
							
								
								
									
										27
									
								
								src/newmaps/manor/map.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/newmaps/manor/map.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| import architecture from "./architecture.txt?raw"; | ||||
| import provinces from "./provinces.txt?raw"; | ||||
| import {compileNewMap} from "../../newmap.ts"; | ||||
|  | ||||
| const mapManor = compileNewMap({ | ||||
|   id: "mapManor", | ||||
|   data: { | ||||
|     architecture: architecture, | ||||
|     provinces: provinces, | ||||
|   }, | ||||
|   pickups: { | ||||
|     // "*": itemGecko, | ||||
|     stat: {primary: "AGI", secondary: "PSI"},  // doesn't matter | ||||
|     // "!": {"item": "colonialGoose"}, | ||||
|   }, | ||||
|   provinces: { | ||||
|     a: "Bedroom", | ||||
|     b: "Thrall Bedroom", | ||||
|     c: "Thrall Bedroom", | ||||
|   }, | ||||
|   checks: { | ||||
|     1: null!, | ||||
|     2: null!, | ||||
|   } | ||||
| }) | ||||
|  | ||||
| export default mapManor; | ||||
							
								
								
									
										11
									
								
								src/newmaps/manor/provinces.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/manor/provinces.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ####   #### | ||||
| #bb#   #cc# | ||||
| #bb## ##cc# | ||||
| #bbb# #ccc# | ||||
| #bbb   ccc# | ||||
| ##### ##### | ||||
| #aaa# #aaa# | ||||
| #aaaaaaaaa# | ||||
| #aaaaaaaaa# | ||||
| #aaaaaaaaa# | ||||
| ########### | ||||
							
								
								
									
										11
									
								
								src/newmaps/optometrist/architecture.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/optometrist/architecture.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #         # | ||||
| #         # | ||||
| #         # | ||||
| #   ###   # | ||||
| ##2## ##### | ||||
| #     #   # | ||||
| #     #   # | ||||
| #  ##1# # # | ||||
| #  #    # # | ||||
| ######### # | ||||
							
								
								
									
										27
									
								
								src/newmaps/optometrist/map.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/newmaps/optometrist/map.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| import architecture from "./architecture.txt?raw"; | ||||
| import provinces from "./provinces.txt?raw"; | ||||
| import {compileNewMap} from "../../newmap.ts"; | ||||
|  | ||||
| const mapOptometrist = compileNewMap({ | ||||
|   id: "mapOptometrist", | ||||
|   data: { | ||||
|     architecture: architecture, | ||||
|     provinces: provinces, | ||||
|   }, | ||||
|   pickups: { | ||||
|     // "*": itemGecko, | ||||
|     stat: {primary: "PSI", secondary: "PSI"}, | ||||
|     // "!": {"item": "colonialGoose"}, | ||||
|   }, | ||||
|   provinces: { | ||||
|     a: "Optometrist's Office", | ||||
|     b: "Glasses Fitting", | ||||
|     c: "Eyeball Machine", | ||||
|   }, | ||||
|   checks: { | ||||
|     1: null!, | ||||
|     2: null!, | ||||
|   } | ||||
| }) | ||||
|  | ||||
| export default mapOptometrist; | ||||
							
								
								
									
										11
									
								
								src/newmaps/optometrist/provinces.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/optometrist/provinces.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #ccccccccc# | ||||
| #ccccccccc# | ||||
| #ccccccccc# | ||||
| #ccc###ccc# | ||||
| ## ## ##### | ||||
| #bbbbb#aaa# | ||||
| #bbbbb#aaa# | ||||
| #bb## #a#a# | ||||
| #bb#aaaa#a# | ||||
| ######### # | ||||
							
								
								
									
										11
									
								
								src/newmaps/zoo/architecture.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/zoo/architecture.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #    # ** # | ||||
| # !  # .. # | ||||
| #    # .. # | ||||
| ##2### ## - | ||||
| #   #* .. - | ||||
| # . ## ## - | ||||
| # .. # .. # | ||||
| # .. 1 .. # | ||||
| # .. # ** # | ||||
| ########### | ||||
							
								
								
									
										83
									
								
								src/newmaps/zoo/map.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								src/newmaps/zoo/map.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,83 @@ | ||||
| import architecture from "./architecture.txt?raw"; | ||||
| import provinces from "./provinces.txt?raw"; | ||||
| import {bat2, lore1, stare0} from "../../skills.ts"; | ||||
| import {compileNewMap} from "../../newmap.ts"; | ||||
| import {compile} from "../../vnscene.ts"; | ||||
|  | ||||
| const mapZoo = compileNewMap({ | ||||
|   id: "mapZoo", | ||||
|   data: { | ||||
|     architecture: architecture, | ||||
|     provinces: provinces, | ||||
|   }, | ||||
|   pickups: { | ||||
|     // "*": itemGecko, | ||||
|     stat: {primary: "AGI", secondary: "PSI"}, | ||||
|     // "!": {"item": "colonialGoose"}, | ||||
|   }, | ||||
|   provinces: { | ||||
|     a: "Zoo", | ||||
|     b: "Gator Pen", | ||||
|     c: "Food Storage" | ||||
|   }, | ||||
|   checks: { | ||||
|     1: { | ||||
|       label: | ||||
|         "The gator pen appears to be locked. " + | ||||
|         "Some bats behind the barred gate are amusing " + | ||||
|         "themselves by swooping and darting just out of the alligators' reach.", | ||||
|       options: [ | ||||
|         { | ||||
|           skills: () => [lore1], | ||||
|           locked: "That wall sure does look impenetrable.", | ||||
|           unlockable: "I see a failure in the construction.", | ||||
|           unlockScene: compile([ | ||||
|             "I dig my clawed fingers into a crack between the bricks and feel the concrete give way.", | ||||
|             "This structure, built by mortals, is impermanent. Soon none of it will exist.", | ||||
|             "I rip another clump of brittle earth from the crack, no longer invisible.", | ||||
|             "And another. When the gap's wide enough to crawl through, I climb in." | ||||
|           ]) | ||||
|         }, | ||||
|         { | ||||
|           skills: () => [stare0], | ||||
|           locked: "The bats are happy by themselves.", | ||||
|           unlockable: "These bats could be enjoying themselves so much more.", | ||||
|           unlockScene: compile([ | ||||
|             "I hold my face to the bars. One bat looks at me.", | ||||
|             "\"Here, little bat\" -- I think before I say it. No, relate to it as an equal.", | ||||
|             "What does it really want?", | ||||
|             "What does any mortal want? It wants to feel a whole lot better --", | ||||
|             "So stare --", | ||||
|             "...", | ||||
|             "... Now it breaks. Like any mortal, but with a loud, high-pitched squeal.", | ||||
|             "Still dripping, it flaps unsurely to the door and -- with only a little coaxing -- it opens the lock." | ||||
|           ]) | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     2: { | ||||
|       label: | ||||
|         "The unattended food storage cabinet is secure. " + | ||||
|         "The shiny surface, which I lack a reflection in, repels direct attack. " + | ||||
|         "Through the keyhole I can see something delicious.", | ||||
|       options: [ | ||||
|         { | ||||
|           skills: () => [bat2], | ||||
|           locked: "If only were smaller...", | ||||
|           unlockable: "I am small enough to crawl through.", | ||||
|           unlockScene: compile([ | ||||
|             "There's a bat inside me. I guess it's like that with every vampire.", | ||||
|             "I can fight, if I try, to keep it inside. But that's not how we want it.", | ||||
|             "And in the second before I let it out -- as the soft fur behind my ears begins to sprout -- I feel a sense of relief.", | ||||
|             "A sense of gratitude.", | ||||
|             "I can't resist it now. It's urgent. I shed the rest of my mass.", | ||||
|             "Now I'm as sleek and narrow as a dart --", | ||||
|             "I'm inside." | ||||
|           ]) | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|   } | ||||
| }) | ||||
|  | ||||
| export default mapZoo; | ||||
							
								
								
									
										11
									
								
								src/newmaps/zoo/provinces.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/newmaps/zoo/provinces.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| ########### | ||||
| #cccc#aaaa# | ||||
| #cccc#aaaa# | ||||
| #cccc#aaaa# | ||||
| ## ###a##a- | ||||
| #bbb#aaaaa- | ||||
| #bbb##a##a- | ||||
| #bbbb#aaaa# | ||||
| #bbbb aaaa# | ||||
| #bbbb#aaaa# | ||||
| ########### | ||||
| @@ -5,6 +5,8 @@ import {getVNModal} from "./vnmodal.ts"; | ||||
| import {getScorer} from "./scorer.ts"; | ||||
| import {getEndgameModal} from "./endgamemodal.ts"; | ||||
| import {SuccessorOption, Wish} from "./datatypes.ts"; | ||||
| import mapZoo from "./newmaps/zoo/map.ts"; | ||||
| import mapHub from "./newmaps/hub/map.ts"; | ||||
|  | ||||
| const N_TURNS: number = 9; | ||||
|  | ||||
| @@ -21,7 +23,7 @@ export class StateManager { | ||||
|  | ||||
|   startGame(asSuccessor: SuccessorOption, withWish: Wish | null) { | ||||
|     this.#turn = 1; | ||||
|     initHuntMode(new HuntMode(1)); | ||||
|     initHuntMode(new HuntMode(1, mapHub())); | ||||
|     initPlayerProgress(asSuccessor, withWish); | ||||
|   } | ||||
|  | ||||
| @@ -32,7 +34,7 @@ export class StateManager { | ||||
|       this.#turn += 1; | ||||
|       getPlayerProgress().applyEndOfTurn(); | ||||
|       getPlayerProgress().refill(); | ||||
|       initHuntMode(new HuntMode(getHuntMode().depth)); | ||||
|       initHuntMode(new HuntMode(getHuntMode().depth, mapHub())); | ||||
|     } else { | ||||
|       // TODO: Play a specific scene | ||||
|       let ending = getScorer().pickEnding(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user