Skip to content

Commit

Permalink
Considered making crater bombs fall from above so they could be place…
Browse files Browse the repository at this point in the history
…d over the whole OMT randomly

Works fine but #59781 means it looks bad
  • Loading branch information
Procyonae committed Jun 28, 2023
1 parent 2bd2684 commit 139cd1e
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 28 deletions.
99 changes: 82 additions & 17 deletions data/json/mapgen/crater.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,50 @@
"flags": [ "BOMB", "TRADER_AVOID" ],
"melee_damage": { "bash": 20 }
},
{
"id": "crater_bomb_small",
"type": "TOOL",
"category": "weapons",
"name": { "str": "active alien bomb" },
"description": "This item is used to make a hole for a crater. It should not otherwise appear in game.",
"weight": "4400 g",
"volume": "10 L",
"price": 0,
"to_hit": -5,
"material": [ "steel" ],
"symbol": "(",
"color": "light_red",
"initial_charges": 1,
"max_charges": 1,
"turns_per_charge": 1,
"explode_in_fire": true,
"explosion": { "power": 12500, "max_noise": 0 },
"use_action": {
"type": "explosion",
"no_deactivate_msg": "You've already activated the bomb - clear the area immediately!",
"explosion": { "power": 12500, "max_noise": 0 }
},
"flags": [ "BOMB", "TRADER_AVOID" ],
"melee_damage": { "bash": 20 }
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "crater_bomb",
"object": {
"mapgensize": [ 1, 1 ],
"place_item": [ { "item": "crater_bomb", "x": 0, "y": 0, "custom-flags": [ "ACTIVATE_ON_PLACE" ] } ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "crater_bomb_small",
"object": {
"mapgensize": [ 1, 1 ],
"place_item": [ { "item": "crater_bomb_small", "x": 0, "y": 0, "custom-flags": [ "ACTIVATE_ON_PLACE" ] } ]
}
},
{
"type": "mapgen",
"method": "json",
Expand All @@ -47,7 +91,7 @@
"type": "mapgen",
"method": "json",
"object": {
"fallback_predecessor_mapgen": "field",
"fill_ter": "t_region_groundcover_barren",
"rows": [
"........................",
"........................",
Expand All @@ -57,14 +101,14 @@
"........................",
"........................",
"........................",
"........00000000........",
"........00000000........",
"........00000000........",
"........00000000........",
"........00000000........",
"........00000000........",
"........00000000........",
"........00000000........",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
"........................",
Expand All @@ -74,15 +118,36 @@
"........................",
"........................"
],
"palettes": [ "crater_palette" ],
"//": "It's important that the bombs get placed on tiles without wreckage, otherwise they can get destroyed before they explode",
"palettes": [ "crater_palette" ]
}
},
{
"om_terrain": "meteor",
"type": "mapgen",
"method": "json",
"object": {
"fill_ter": "t_open_air",
"place_nested": [
{ "chunks": [ "crater_bomb" ], "x": [ 8, 11 ], "y": [ 8, 11 ] },
{ "chunks": [ "crater_bomb" ], "x": [ 8, 11 ], "y": [ 12, 15 ] },
{ "chunks": [ "crater_bomb" ], "x": [ 12, 15 ], "y": [ 8, 11 ] },
{ "chunks": [ "crater_bomb" ], "x": [ 12, 15 ], "y": [ 12, 15 ] }
],
"flags": [ "DISMANTLE_ALL_BEFORE_PLACING_TERRAIN" ]
{ "chunks": [ [ "crater_bomb", 2 ], [ "null", 1 ] ], "x": [ 6, 17 ], "y": [ 6, 17 ] },
{ "chunks": [ [ "crater_bomb", 2 ], [ "null", 1 ] ], "x": [ 6, 17 ], "y": [ 6, 17 ] },
{ "chunks": [ [ "crater_bomb", 2 ], [ "null", 1 ] ], "x": [ 6, 17 ], "y": [ 6, 17 ] },
{ "chunks": [ "crater_bomb_small", "null" ], "x": [ 6, 17 ], "y": [ 6, 17 ] },
{ "chunks": [ "crater_bomb_small", "null" ], "x": [ 6, 17 ], "y": [ 6, 17 ] },
{ "chunks": [ "crater_bomb_small", "null" ], "x": [ 6, 17 ], "y": [ 6, 17 ] }
]
}
},
{
"om_terrain": "meteor_small",
"type": "mapgen",
"method": "json",
"object": {
"fill_ter": "t_open_air",
"place_nested": [
{ "chunks": [ "crater_bomb_small", "null" ], "x": [ 6, 17 ], "y": [ 6, 17 ] },
{ "chunks": [ "crater_bomb_small", "null" ], "x": [ 6, 17 ], "y": [ 6, 17 ] },
{ "chunks": [ "crater_bomb_small", "null" ], "x": [ 6, 17 ], "y": [ 6, 17 ] }
]
}
},
{
Expand Down
9 changes: 0 additions & 9 deletions data/json/mapgen/map_extras/crater.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "crater_bomb",
"object": {
"mapgensize": [ 1, 1 ],
"place_item": [ { "item": "crater_bomb", "x": 0, "y": 0, "custom-flags": [ "ACTIVATE_ON_PLACE" ] } ]
}
},
{
"type": "mapgen",
"method": "json",
Expand Down
8 changes: 7 additions & 1 deletion data/json/overmap/overmap_mutable/crater.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"south": { "id": "crater_to_crater", "type": "available" },
"west": { "id": "crater_to_crater", "type": "available" }
},
"crater_core_duplicate": { "overmap": "crater_core", "locations": [ "crater_core" ] }
"crater_core_duplicate": { "overmap": "crater_core", "locations": [ "crater_core" ] },
"meteor": { "overmap": "meteor" },
"meteor_small": { "overmap": "meteor_small" }
},
"root": "crater_core_root",
"phases": [
Expand All @@ -36,10 +38,12 @@
"name": "crater_outer",
"chunk": [
{ "overmap": "crater_to_crater", "pos": [ 0, 0, 10 ] },
{ "overmap": "meteor", "pos": [ 0, 0, 1 ] },
{ "overmap": "crater", "pos": [ -1, -1, 0 ] },
{ "overmap": "crater_root", "pos": [ 0, -1, 0 ] },
{ "overmap": "crater", "pos": [ 1, -1, 0 ] },
{ "overmap": "crater", "pos": [ -1, 0, 0 ] },
{ "overmap": "meteor_small", "pos": [ -1, 0, 1 ] },
{ "overmap": "crater", "pos": [ 1, 0, 0 ] },
{ "overmap": "crater", "pos": [ -1, 1, 0 ] },
{ "overmap": "crater", "pos": [ 0, 1, 0 ] },
Expand All @@ -53,6 +57,7 @@
"name": "crater_whole",
"chunk": [
{ "overmap": "crater_core", "pos": [ 0, 0, 0 ] },
{ "overmap": "meteor", "pos": [ 0, 0, 1 ] },
{ "overmap": "crater_to_crater", "pos": [ 0, 0, 10 ] },
{ "overmap": "crater", "pos": [ -1, -1, 0 ] },
{ "overmap": "crater_core_duplicate", "pos": [ 0, -1, 0 ] },
Expand All @@ -69,6 +74,7 @@
"name": "crater_whole",
"chunk": [
{ "overmap": "crater_core", "pos": [ 0, 0, 0 ] },
{ "overmap": "meteor", "pos": [ 0, 0, 1 ] },
{ "overmap": "crater_to_crater", "pos": [ -1, 0, 10 ] },
{ "overmap": "crater", "pos": [ -1, -1, 0 ] },
{ "overmap": "crater", "pos": [ 0, -1, 0 ] },
Expand Down
8 changes: 7 additions & 1 deletion data/json/overmap/overmap_terrain/overmap_terrain.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,13 @@
"type": "overmap_terrain",
"id": "crater_core",
"sym": "O",
"copy-from": "crater"
"copy-from": "crater",
"flags": [ "NO_ROTATE" ]
},
{
"type": "overmap_terrain",
"id": [ "meteor", "meteor_small" ],
"copy-from": "special_air"
},
{
"type": "overmap_terrain",
Expand Down

0 comments on commit 139cd1e

Please sign in to comment.