summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrique Alves <henriquelalves@gmail.com>2022-07-17 02:24:30 -0300
committerHenrique Alves <henriquelalves@gmail.com>2022-07-17 02:24:30 -0300
commitbf7250a32bc8c4c7d36292edb18bf5e4f8a22b75 (patch)
tree66a9182c9cff385f1795732fecb8ab5ed446d983
parenta965d83578a726624c8b4455867b307174a82047 (diff)
parent0e611ff0207e553c3449d9f5e28fa9c229e40884 (diff)
downloadgamejam-gmtk-2022-bf7250a32bc8c4c7d36292edb18bf5e4f8a22b75.tar.gz
gamejam-gmtk-2022-bf7250a32bc8c4c7d36292edb18bf5e4f8a22b75.tar.bz2
gamejam-gmtk-2022-bf7250a32bc8c4c7d36292edb18bf5e4f8a22b75.zip
Merge remote-tracking branch 'origin/main'
-rw-r--r--Scenes/Builder.gd43
1 files changed, 40 insertions, 3 deletions
diff --git a/Scenes/Builder.gd b/Scenes/Builder.gd
index 98cbfe6..b0d4166 100644
--- a/Scenes/Builder.gd
+++ b/Scenes/Builder.gd
@@ -74,7 +74,7 @@ const available_layouts = [
func build(player : Entity, dungeon):
dungeon.add_child(player)
- var current_stage = randi() % 6 # Global.current_stage
+ var current_stage = min(Global.current_stage, 5)
var room_count = room_counts[current_stage]
var start = randi() % 4
@@ -272,8 +272,11 @@ func build_layout(corner : Vector2, crystals : int, current_stage : int, dungeon
Layout.NORMAL_2:
return build_layout_normal_2(crystals, space)
- _:
- return build_layout_tutorial(crystals, space)
+ Layout.NORMAL_3:
+ return build_layout_normal_3(crystals, space)
+
+ Layout.HARD:
+ return build_layout_hard(crystals, space)
func build_layout_tutorial(crystals : int, space : Space):
space.build_crystal(Vector2(2, 4), Vector2(3, 4))
@@ -348,6 +351,40 @@ func build_layout_normal_2(crystals : int, space : Space):
return space.pos(Vector2(1, 5))
+func build_layout_normal_3(crystals : int, space : Space):
+ if crystals >= 1:
+ space.build_crystal(Vector2(5, 5), Vector2(4, 5))
+
+ if crystals >= 2:
+ space.build_crystal(Vector2(3, 4), Vector2(3, 3))
+
+ space.build_monster_square(Vector2(4, 2))
+ space.build_monster_square(Vector2(1, 4))
+
+ space.build_plate_damage(Vector2(0, 2))
+ space.build_plate_damage(Vector2(2, 2))
+
+ return space.pos(Vector2(0, 1))
+
+func build_layout_hard(crystals : int, space : Space):
+ if crystals >= 1:
+ space.build_crystal(Vector2(2, 5), Vector2(5, 3))
+
+ if crystals >= 2:
+ space.build_crystal(Vector2(3, 1), Vector2(2, 1))
+
+ space.build_monster_square(Vector2(4, 4))
+ space.build_monster_random(Vector2(1, 4))
+ space.build_monster_rand_cardinal(Vector2(3, 0))
+
+ space.build_plate_damage(Vector2(0, 2))
+ space.build_plate_damage(Vector2(2, 2))
+ space.build_plate_damage(Vector2(3, 2))
+ space.build_plate_damage(Vector2(5, 2))
+ space.build_plate_bounce(Vector2(1, 2), 0)
+
+ return space.pos(Vector2(0, 3))
+
func choose_layout(current_stage : int) -> int:
var options = available_layouts[current_stage]
return options[randi() % options.size()]