Dev 0.2.0
* Ajout de la déblocage des mutation du mode infini dans le mode histoire * Ajout de plus de caverne * Rework de l'emplacement des distributeurs/cavernes * Rework de l'influence, plus de clarté sur les plantes influencées * 4 d'inventaire dans le mode infini * Fix du tuto de mouvement en 3D * Déblocage de toutes le mutations à la fin du jeu * Fix de bug de chargelent de scène multiple
This commit is contained in:
@@ -12,4 +12,4 @@ func get_3d_scene() -> PackedScene:
|
||||
return preload("res://common/game_data/scripts/artefacts/talion_soil/talion_soil.blend")
|
||||
|
||||
func modify_plant_influence_radius(plant_influence_radius : float) -> float:
|
||||
return plant_influence_radius * 1.5
|
||||
return plant_influence_radius + Region.TILE_SIZE
|
||||
@@ -1,6 +1,8 @@
|
||||
extends ProgressionData
|
||||
class_name InfiniteProgressionData
|
||||
|
||||
@export var mutation_unlocked := StoryProgressionData.START_UNLOCKED_MUTATIONS
|
||||
|
||||
func get_story_step() -> StoryStep:
|
||||
return InfiniteStoryStep.new(run_number)
|
||||
|
||||
@@ -25,8 +27,14 @@ func are_all_mutations_unlocked() -> bool:
|
||||
func unlock_new_mutation() -> PlantMutation:
|
||||
return null
|
||||
|
||||
func unlock_all_mutation() -> void:
|
||||
pass
|
||||
|
||||
func get_available_mutations() -> Array[PlantMutation]:
|
||||
return get_all_mutations()
|
||||
if GameInfo.story_game_data and GameInfo.story_game_data.progression_data:
|
||||
mutation_unlocked = max(mutation_unlocked,GameInfo.story_game_data.progression_data.mutations_unlocked)
|
||||
|
||||
return get_all_mutations().slice(0, mutation_unlocked)
|
||||
|
||||
func set_best_run(v := best_run):
|
||||
if best_run < 10 and v == 10:
|
||||
|
||||
@@ -21,6 +21,8 @@ class_name ProgressionData
|
||||
|
||||
@abstract func unlock_new_mutation() -> PlantMutation
|
||||
|
||||
@abstract func unlock_all_mutation() -> void
|
||||
|
||||
func set_best_run(v := best_run):
|
||||
best_run = v
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ const DEFAULT_LIFETIME = 6
|
||||
const DEFAULT_BASE_SCORE = 1
|
||||
const DEFAULT_SEED_NUMBER = 2
|
||||
const DEFAULT_SEED_RANDOM_LOOSE = 1
|
||||
const DEFAULT_PLANT_INFLUENCE_RADIUS = 100
|
||||
const DEFAULT_PLANT_INFLUENCE_RADIUS = Region.TILE_SIZE
|
||||
const DEFAULT_MUTATION_PROBABILITY = 0.3
|
||||
const DEFAULT_MUTATION_MAX_NUMBER = 2
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ func get_player_max_energy(_difficulty_setting : int) -> int:
|
||||
return 4
|
||||
|
||||
func get_player_max_inventory(_difficulty_setting : int) -> int:
|
||||
return 3
|
||||
return 4
|
||||
|
||||
func get_objective_for_region(level : int, _difficulty_setting : int) -> int:
|
||||
return basic_objective_for_region(level)
|
||||
|
||||
func get_cave_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 0
|
||||
func has_cave_modifier(_level : int, _difficulty_setting : int) -> bool:
|
||||
return false
|
||||
|
||||
func is_region_sequence_infinite() -> bool:
|
||||
return true
|
||||
@@ -36,7 +36,7 @@ func get_region_sequence_length(_difficulty_setting) -> int:
|
||||
return 1000
|
||||
|
||||
func is_run_point_dangerous(level : int, _difficulty_setting : int) -> bool:
|
||||
return level%6 == 0 and level != 0
|
||||
return level%5 == 0 and level != 0
|
||||
|
||||
func get_destination_text() -> String:
|
||||
return ""
|
||||
|
||||
@@ -48,19 +48,33 @@ func get_region_sequence_length(difficulty_setting : int) -> int:
|
||||
return 6
|
||||
return 8
|
||||
|
||||
func get_first_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 2
|
||||
func has_cave_modifier(level : int, _difficulty_setting : int) -> bool:
|
||||
match level:
|
||||
1: return false
|
||||
2: return false
|
||||
3: return true
|
||||
4: return false
|
||||
5: return true
|
||||
6: return true
|
||||
7: return false
|
||||
8: return true
|
||||
_: return level % 2 == 0
|
||||
|
||||
func get_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 3
|
||||
func has_vending_machine_modifier(level : int, _difficulty_setting : int) -> bool:
|
||||
match level:
|
||||
1: return false
|
||||
2: return true
|
||||
3: return false
|
||||
4: return true
|
||||
5: return false
|
||||
6: return false
|
||||
7: return true
|
||||
8: return false
|
||||
_: return (level + 1) % 3 == 0
|
||||
|
||||
func get_first_cave_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 1
|
||||
|
||||
func get_cave_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 3
|
||||
|
||||
func get_challenge_chance(_level : int, _difficulty_setting : int) -> float:
|
||||
func get_challenge_chance(level : int, difficulty_setting : int) -> float:
|
||||
if is_run_point_dangerous(level, difficulty_setting):
|
||||
return 0.
|
||||
return 0.15
|
||||
|
||||
func get_run_point_number(level : int, difficulty_setting : int) -> int:
|
||||
@@ -120,17 +134,11 @@ func get_gameplay_modifiers_for_region(level : int, difficulty_setting : int) ->
|
||||
var modifiers : Array[RegionModifier] = []
|
||||
|
||||
if need_gameplay_modifier(level,difficulty_setting):
|
||||
var first_vending = get_first_vending_machine_occurence(level, difficulty_setting)
|
||||
var vending_occurence = get_vending_machine_occurence(level, difficulty_setting)
|
||||
if vending_occurence > 0 and level >= first_vending:
|
||||
if (level - first_vending)%vending_occurence == 0:
|
||||
modifiers.append(VendingMachineModifier.new())
|
||||
if has_vending_machine_modifier(level, difficulty_setting):
|
||||
modifiers.append(VendingMachineModifier.new())
|
||||
|
||||
var first_cave = get_first_cave_occurence(level, difficulty_setting)
|
||||
var cave_occurence = get_cave_occurence(level, difficulty_setting)
|
||||
if cave_occurence > 0 and level >= first_cave:
|
||||
if (level - first_cave)%cave_occurence == 0:
|
||||
modifiers.append(CaveModifier.new())
|
||||
if has_cave_modifier(level, difficulty_setting):
|
||||
modifiers.append(CaveModifier.new())
|
||||
|
||||
return modifiers
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@ func get_logs() -> Array[Log]:
|
||||
)
|
||||
]
|
||||
|
||||
func get_cave_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 2
|
||||
|
||||
func get_region_sequence_length(_difficulty_setting : int) -> int:
|
||||
return 5
|
||||
|
||||
@@ -37,18 +34,23 @@ func get_objective_multiplier() -> float:
|
||||
func is_run_point_dangerous(_level : int, _difficulty_setting : int) -> bool:
|
||||
return false
|
||||
|
||||
func get_first_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 0
|
||||
func has_cave_modifier(level : int, _difficulty_setting : int) -> bool:
|
||||
match level:
|
||||
1: return false
|
||||
2: return true
|
||||
3: return false
|
||||
4: return false
|
||||
_: return false
|
||||
|
||||
func get_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 0
|
||||
func has_vending_machine_modifier(_level : int, _difficulty_setting : int) -> bool:
|
||||
return false
|
||||
|
||||
func get_challenge_chance(_level : int, _difficulty_setting : int) -> float:
|
||||
return 0.
|
||||
|
||||
func get_ship_dialog_path(level : int, difficulty_setting : int ,ship_in_space := true) -> String:
|
||||
if ship_in_space and level + 1 == get_cave_occurence(level, difficulty_setting):
|
||||
if ship_in_space and has_cave_modifier(level + 1, difficulty_setting):
|
||||
return CAVE_DIALOG_PATH
|
||||
if ship_in_space and is_run_finished(level + 1, difficulty_setting):
|
||||
return MERCURY_ARRIVAL_DIALOG_PATH
|
||||
return ""
|
||||
return ""
|
||||
|
||||
@@ -36,6 +36,26 @@ func get_player_max_inventory(_difficulty_setting) -> int:
|
||||
func get_objective_multiplier() -> float:
|
||||
return 1.2
|
||||
|
||||
func has_cave_modifier(level : int, _difficulty_setting : int) -> bool:
|
||||
match level:
|
||||
1: return false
|
||||
2: return true
|
||||
3: return false
|
||||
4: return true
|
||||
5: return false
|
||||
6: return true
|
||||
_: return level % 2 == 0
|
||||
|
||||
func has_vending_machine_modifier(level : int, _difficulty_setting : int) -> bool:
|
||||
match level:
|
||||
1: return true
|
||||
2: return false
|
||||
3: return false
|
||||
4: return false
|
||||
5: return true
|
||||
6: return false
|
||||
_: return (level + 1) % 3 == 0
|
||||
|
||||
func get_ship_dialog_path(level : int, _difficulty_setting : int, _ship_in_space := true) -> String:
|
||||
if level == 5:
|
||||
return AQUA_TRAVEL_PHONE_CALL_DIALOG_PATH
|
||||
|
||||
@@ -37,6 +37,26 @@ func get_player_max_inventory(_difficulty_setting : int) -> int:
|
||||
func get_objective_multiplier() -> float:
|
||||
return 1.4
|
||||
|
||||
func has_cave_modifier(level : int, _difficulty_setting : int) -> bool:
|
||||
match level:
|
||||
1: return false
|
||||
2: return true
|
||||
3: return true
|
||||
4: return false
|
||||
5: return false
|
||||
6: return true
|
||||
_: return level % 2 == 0
|
||||
|
||||
func has_vending_machine_modifier(level : int, _difficulty_setting : int) -> bool:
|
||||
match level:
|
||||
1: return false
|
||||
2: return false
|
||||
3: return false
|
||||
4: return true
|
||||
5: return true
|
||||
6: return false
|
||||
_: return (level + 1) % 3 == 0
|
||||
|
||||
func get_ship_dialog_path(level : int, _difficulty_setting : int, _ship_in_space := true) -> String:
|
||||
if level == 5:
|
||||
return TRAVEL_PHONE_CALL_DIALOG_PATH
|
||||
|
||||
@@ -37,7 +37,10 @@ func get_player_max_inventory(_difficulty_setting : int) -> int:
|
||||
func get_objective_multiplier() -> float:
|
||||
return 1.6
|
||||
|
||||
func get_region_sequence_length(_difficulty_setting : int) -> int:
|
||||
return 9
|
||||
|
||||
func get_ship_dialog_path(level : int, _difficulty_setting : int, _ship_in_space := true) -> String:
|
||||
if level == 5:
|
||||
if level == 6:
|
||||
return TRAVEL_PHONE_CALL_DIALOG_PATH
|
||||
return ""
|
||||
@@ -1,9 +1,11 @@
|
||||
extends ProgressionData
|
||||
class_name StoryProgressionData
|
||||
|
||||
const START_UNLOCKED_MUTATIONS = 8
|
||||
|
||||
@export var planted_mutation_ids: Array[String] = []
|
||||
@export var story_step_i := 0
|
||||
@export var mutations_unlocked = 8
|
||||
@export var mutations_unlocked = START_UNLOCKED_MUTATIONS
|
||||
|
||||
func get_story_step() -> StoryStep:
|
||||
return get_all_story_steps()[story_step_i]
|
||||
@@ -33,4 +35,7 @@ func are_all_mutations_unlocked() -> bool:
|
||||
func unlock_new_mutation() -> PlantMutation:
|
||||
var new_mutation = get_all_mutations()[mutations_unlocked]
|
||||
mutations_unlocked += 1
|
||||
return new_mutation
|
||||
return new_mutation
|
||||
|
||||
func unlock_all_mutation() -> void:
|
||||
mutations_unlocked = len(get_all_mutations()) + 1
|
||||
Reference in New Issue
Block a user