diff --git a/Scenes/Levels/SMB1/World6/6-2.tscn b/Scenes/Levels/SMB1/World6/6-2.tscn index 09985ae5..1b7b4f65 100644 --- a/Scenes/Levels/SMB1/World6/6-2.tscn +++ b/Scenes/Levels/SMB1/World6/6-2.tscn @@ -253,13 +253,8 @@ position = Vector2(2624, -32) pipe_id = 3 exit_only = true -[node name="Checkpoint2" parent="." instance=ExtResource("10_q2h2g")] -position = Vector2(1296, 0) -optional = true - [node name="CheckpointFlag" parent="." instance=ExtResource("24_v8ufo")] position = Vector2(1296, 0) -optional = true [connection signal="block_destroyed" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active_2"] [connection signal="block_emptied" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active"] diff --git a/Scenes/Levels/SMBLL/World3/3-2.tscn b/Scenes/Levels/SMBLL/World3/3-2.tscn index bf43233e..b9493969 100644 --- a/Scenes/Levels/SMBLL/World3/3-2.tscn +++ b/Scenes/Levels/SMBLL/World3/3-2.tscn @@ -204,6 +204,7 @@ position = Vector2(2200, -136) [node name="CheckpointFlag" parent="." node_paths=PackedStringArray("nodes_to_delete") instance=ExtResource("22_686wu")] position = Vector2(1328, 0) nodes_to_delete = [NodePath("../Enemies/Blooper6")] +optional = true [node name="EntityGenerator" parent="." instance=ExtResource("22_lnx6r")] position = Vector2(-72, -176) diff --git a/Scenes/Levels/SMBS/World2/2-1.tscn b/Scenes/Levels/SMBS/World2/2-1.tscn index f0d0c83e..e720e3d0 100644 --- a/Scenes/Levels/SMBS/World2/2-1.tscn +++ b/Scenes/Levels/SMBS/World2/2-1.tscn @@ -236,6 +236,7 @@ position = Vector2(3432, -120) [node name="CheckpointFlag" parent="." instance=ExtResource("24_osugw")] position = Vector2(2056, -64) +optional = true [node name="BrickBlock" parent="." instance=ExtResource("21_u54v8")] position = Vector2(2040, -120) diff --git a/Scripts/Classes/Entities/Objects/CheckpointFlag.gd b/Scripts/Classes/Entities/Objects/CheckpointFlag.gd index f1516630..7976d6ef 100644 --- a/Scripts/Classes/Entities/Objects/CheckpointFlag.gd +++ b/Scripts/Classes/Entities/Objects/CheckpointFlag.gd @@ -6,9 +6,6 @@ static var character_save := "Mario" func _ready() -> void: activated.get_node("ResourceSetterNew").resource_json = load(get_character_sprite_path(0)) - if Settings.file.difficulty.checkpoint_style == 0 and (Global.current_game_mode != Global.GameMode.LEVEL_EDITOR and Global.current_game_mode != Global.GameMode.CUSTOM_LEVEL) or Global.current_campaign == "SMBANN": - owner.queue_free() - return owner.show() if owner.passed: sprite.hide() diff --git a/Scripts/Classes/Entities/Player.gd b/Scripts/Classes/Entities/Player.gd index 24524a71..66d0ff0e 100644 --- a/Scripts/Classes/Entities/Player.gd +++ b/Scripts/Classes/Entities/Player.gd @@ -161,6 +161,8 @@ const ANIMATION_FALLBACKS := { "CrouchJump": "Crouch", "CrouchBump": "Bump", "CrouchMove": "Crouch", + "WaterCrouchMove": "CrouchMove", + "WingCrouchMove": "WaterCrouchMove", "IdleAttack": "MoveAttack", "CrouchAttack": "IdleAttack", "MoveAttack": "Attack", @@ -247,7 +249,7 @@ func apply_character_physics(apply: bool) -> void: for i in get_tree().get_nodes_in_group("SmallCollisions"): var hitbox_scale = json.get("small_hitbox_scale", [1, 1]) if apply else [1, 1] - i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75) if apply else 0.5) + i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75) if apply else 0.75) i._physics_process(0) for i in get_tree().get_nodes_in_group("BigCollisions"): var hitbox_scale = json.get("big_hitbox_scale", [1, 1]) if apply else [1, 1] diff --git a/Scripts/Classes/States/Player/Normal.gd b/Scripts/Classes/States/Player/Normal.gd index 5bba4ce3..12dac5f7 100644 --- a/Scripts/Classes/States/Player/Normal.gd +++ b/Scripts/Classes/States/Player/Normal.gd @@ -221,13 +221,19 @@ func get_animation_name() -> String: return "CrouchJump" elif player.is_actually_on_floor(): if abs(player.velocity.x) >= 5 and not player.is_actually_on_wall(): - return "CrouchMove" - elif player.in_water: - return "WaterCrouch" - elif player.flight_meter > 0: - return "WingCrouch" + if player.in_water: + return "WaterCrouchMove" + elif player.flight_meter > 0: + return "WingCrouchMove" + else: + return "CrouchMove" else: - return "Crouch" + if player.in_water: + return "WaterCrouch" + elif player.flight_meter > 0: + return "WingCrouch" + else: + return "Crouch" if player.is_actually_on_floor(): if player.skidding: return "Skid" diff --git a/Scripts/Parts/Checkpoint.gd b/Scripts/Parts/Checkpoint.gd index 589d2475..2a6d8542 100644 --- a/Scripts/Parts/Checkpoint.gd +++ b/Scripts/Parts/Checkpoint.gd @@ -27,7 +27,7 @@ func _enter_tree() -> void: LevelPersistance.active_nodes = old_state.duplicate(true) func _ready() -> void: - if [Global.GameMode.CHALLENGE, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) or Global.current_campaign == "SMBANN": + if [Global.GameMode.CHALLENGE, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) or Global.current_campaign == "SMBANN" or (Settings.file.difficulty.extra_checkpoints == 0 and optional): queue_free() return if has_meta("is_flag") == false: @@ -71,6 +71,3 @@ func get_id() -> String: return str(Global.level_editor.sub_level_id) + "," + str(Vector2i(global_position)) + "," + get_parent().name else: return Global.current_level.scene_file_path + "," + str(Vector2i(global_position)) + "," + get_parent().name - -func on_tree_exiting() -> void: - pass # Replace with function body. diff --git a/Scripts/Parts/EndFlagpole.gd b/Scripts/Parts/EndFlagpole.gd index e2f9f9f2..e2e87544 100644 --- a/Scripts/Parts/EndFlagpole.gd +++ b/Scripts/Parts/EndFlagpole.gd @@ -2,6 +2,8 @@ extends Node2D const FLAG_POINTS := [100, 400, 800, 2000, 5000] +const FLAG_POINTS_MODERN := [100, 200, 800, 4000, 8000] + signal player_reached signal sequence_begin @@ -42,8 +44,10 @@ func player_touch(player: Player) -> void: func give_points(player: Player) -> void: var value = clamp(int(lerp(0, 4, (player.global_position.y / -144))), 0, 4) var nearest_value = FLAG_POINTS[value] + if Settings.file.difficulty.flagpole_lives: + nearest_value = FLAG_POINTS_MODERN[value] $Score.text = str(nearest_value) - if nearest_value == 5000 and Settings.file.difficulty.flagpole_lives and not [Global.GameMode.CHALLENGE, Global.GameMode.BOO_RACE].has(Global.current_game_mode) and not Settings.file.difficulty.inf_lives: + if nearest_value == 8000 and not [Global.GameMode.CHALLENGE, Global.GameMode.BOO_RACE].has(Global.current_game_mode) and not Settings.file.difficulty.inf_lives: AudioManager.play_sfx("1_up", global_position) Global.lives += 1 $ScoreNoteSpawner.spawn_one_up_note()