Dev 0.1
* Ajout des modes de jeu * Dev de subterra et estia * Ajout de tous les dialogues et traduction * Ajout d'un splashscreen
This commit is contained in:
@@ -17,20 +17,29 @@ func get_respawn_scene() -> Scene:
|
||||
true
|
||||
)
|
||||
|
||||
func get_cave_occurence(_level : int) -> int:
|
||||
func get_player_max_energy(_difficulty_setting : int) -> int:
|
||||
return 4
|
||||
|
||||
func get_player_max_inventory(_difficulty_setting : int) -> int:
|
||||
return 3
|
||||
|
||||
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 is_region_sequence_infinite() -> bool:
|
||||
return true
|
||||
|
||||
func get_region_sequence_length() -> int:
|
||||
func get_region_sequence_length(_difficulty_setting) -> int:
|
||||
return 1000
|
||||
|
||||
func is_run_point_dangerous(level : int) -> bool:
|
||||
func is_run_point_dangerous(level : int, _difficulty_setting : int) -> bool:
|
||||
return level%6 == 0 and level != 0
|
||||
|
||||
func get_destination_text() -> String:
|
||||
return tr("INFINITE")
|
||||
return ""
|
||||
|
||||
func get_destination_scene() -> Scene:
|
||||
return BoreaScene.new()
|
||||
return BoreaScene.new()
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
extends Resource
|
||||
class_name StoryStep
|
||||
|
||||
const COSY_ENERGY_ADDITION = 2
|
||||
const COSY_OBJECTIVE_FACTOR = 0.5
|
||||
|
||||
#region ------------------ Story ------------------
|
||||
|
||||
@abstract func get_respawn_scene() -> Scene
|
||||
@@ -11,98 +14,120 @@ class_name StoryStep
|
||||
func get_destination_scene() -> Scene:
|
||||
return BoreaScene.new()
|
||||
|
||||
func get_run_progress(level : int) -> int:
|
||||
func get_run_progress(level : int, difficulty_setting : int) -> int:
|
||||
if is_region_sequence_infinite():
|
||||
return 0
|
||||
return get_region_sequence_length() - level
|
||||
return get_region_sequence_length(difficulty_setting) - level
|
||||
|
||||
func get_ship_dialog_path(_level : int, _ship_in_space := true) -> String:
|
||||
func get_ship_dialog_path(_level : int, _difficulty_setting : int, _ship_in_space := true) -> String:
|
||||
return ""
|
||||
#region ------------------ Run ------------------
|
||||
|
||||
func is_run_finished(level : int) -> bool:
|
||||
func is_run_finished(level : int, difficulty_setting : int) -> bool:
|
||||
if is_region_sequence_infinite():
|
||||
return false
|
||||
return level == get_region_sequence_length() - 1
|
||||
return level == get_region_sequence_length(difficulty_setting) - 1
|
||||
|
||||
func is_region_sequence_infinite() -> bool:
|
||||
return false
|
||||
|
||||
func get_player_max_energy() -> int:
|
||||
func get_player_max_energy(difficulty_setting : int) -> int:
|
||||
if difficulty_setting == 0:
|
||||
return PlayerData.DEFAULT_MAX_ENERGY + COSY_ENERGY_ADDITION
|
||||
return PlayerData.DEFAULT_MAX_ENERGY
|
||||
|
||||
func get_player_max_inventory() -> int:
|
||||
func get_player_max_inventory(_difficulty_setting : int) -> int:
|
||||
return PlayerData.DEFAULT_INVENTORY_SIZE
|
||||
|
||||
func get_region_sequence_length() -> int:
|
||||
return 3 #TOCHANGE TO 7
|
||||
func get_region_sequence_length(_difficulty_setting : int) -> int:
|
||||
return 8
|
||||
|
||||
func get_first_vending_machine_occurence(_level : int) -> int:
|
||||
func get_first_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 2
|
||||
|
||||
func get_vending_machine_occurence(_level : int) -> int:
|
||||
func get_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 3
|
||||
|
||||
func get_first_cave_occurence(level : int) -> int:
|
||||
return get_cave_occurence(level)
|
||||
func get_first_cave_occurence(level : int, difficulty_setting : int) -> int:
|
||||
return get_cave_occurence(level, difficulty_setting)
|
||||
|
||||
func get_cave_occurence(_level : int) -> int:
|
||||
func get_cave_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 3
|
||||
|
||||
func get_challenge_chance(_level : int) -> float:
|
||||
func get_challenge_chance(_level : int, _difficulty_setting : int) -> float:
|
||||
return 0.15
|
||||
|
||||
func get_run_point_number(level : int) -> int:
|
||||
if is_run_finished(level):
|
||||
func get_run_point_number(level : int, difficulty_setting : int) -> int:
|
||||
if is_run_finished(level, difficulty_setting):
|
||||
return 1
|
||||
return 2
|
||||
|
||||
func get_charge_number(_level : int) -> int:
|
||||
func get_charge_number(_level : int, _difficulty_setting : int) -> int:
|
||||
return 10
|
||||
|
||||
func is_run_point_dangerous(level : int) -> bool:
|
||||
func is_run_point_dangerous(level : int, difficulty_setting : int) -> bool:
|
||||
if is_region_sequence_infinite():
|
||||
return false
|
||||
return level == get_region_sequence_length() - 2
|
||||
return level == get_region_sequence_length(difficulty_setting) - 2
|
||||
|
||||
func get_objective_for_region(level : int) -> int:
|
||||
static func basic_objective_for_region(level : int) -> int:
|
||||
match level:
|
||||
1: return 10
|
||||
2: return 15
|
||||
3: return 20
|
||||
4: return 30
|
||||
5: return 45
|
||||
_: return get_objective_for_region(level-1) + (level-2) * 5
|
||||
_: return basic_objective_for_region(level-1) + (level-2) * 5
|
||||
|
||||
func get_story_modifiers_for_region(level : int) -> Array[RegionModifier]:
|
||||
static func difficult_objective_for_region(level : int) -> int:
|
||||
match level:
|
||||
1: return 10
|
||||
2: return 20
|
||||
3: return 30
|
||||
_: return difficult_objective_for_region(level-1) + (level-1) * 5
|
||||
|
||||
func get_objective_multiplier() -> float:
|
||||
return 1.
|
||||
|
||||
func get_objective_for_region(level : int, difficulty_setting : int) -> int:
|
||||
var objective = basic_objective_for_region(level)
|
||||
|
||||
if difficulty_setting == 0:
|
||||
objective = roundi(objective * COSY_OBJECTIVE_FACTOR)
|
||||
elif difficulty_setting == 2:
|
||||
return difficult_objective_for_region(level)
|
||||
|
||||
return max(1,roundi(objective * get_objective_multiplier()))
|
||||
|
||||
func get_story_modifiers_for_region(level : int, difficulty_setting : int) -> Array[RegionModifier]:
|
||||
var modifiers : Array[RegionModifier] = []
|
||||
if is_run_finished(level):
|
||||
if is_run_finished(level, difficulty_setting):
|
||||
var dest_mod = DestinationModifier.new()
|
||||
dest_mod.destination_scene = get_destination_scene()
|
||||
modifiers.append(dest_mod)
|
||||
|
||||
return modifiers
|
||||
|
||||
func get_gameplay_modifiers_for_region(level : int) -> Array[RegionModifier]:
|
||||
func get_gameplay_modifiers_for_region(level : int, difficulty_setting : int) -> Array[RegionModifier]:
|
||||
var modifiers : Array[RegionModifier] = []
|
||||
|
||||
if need_gameplay_modifier(level):
|
||||
var first_vending = get_first_vending_machine_occurence(level)
|
||||
var vending_occurence = get_vending_machine_occurence(level)
|
||||
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())
|
||||
|
||||
var first_cave = get_first_cave_occurence(level)
|
||||
var cave_occurence = get_cave_occurence(level)
|
||||
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())
|
||||
|
||||
return modifiers
|
||||
|
||||
func need_gameplay_modifier(level : int):
|
||||
if is_run_finished(level):
|
||||
func need_gameplay_modifier(level : int, difficulty_setting : int):
|
||||
if is_run_finished(level, difficulty_setting):
|
||||
return false
|
||||
return true
|
||||
|
||||
|
||||
@@ -9,16 +9,16 @@ func get_respawn_scene() -> Scene:
|
||||
func get_destination_text() -> String:
|
||||
return ""
|
||||
|
||||
func get_region_sequence_length() -> int:
|
||||
func get_region_sequence_length(_difficulty_setting : int) -> int:
|
||||
return 1
|
||||
|
||||
func get_destination_scene() -> Scene: return null
|
||||
|
||||
func need_gameplay_modifier(_level : int): return false
|
||||
func need_gameplay_modifier(_level : int, _difficulty_setting : int): return false
|
||||
|
||||
func get_objective_for_region(_level : int) -> int: return 3
|
||||
func get_objective_for_region(_level : int, _difficulty_setting : int) -> int: return 3
|
||||
|
||||
func get_story_modifiers_for_region(_n : int) -> Array[RegionModifier]:
|
||||
func get_story_modifiers_for_region(_n : int, _difficulty_setting : int) -> Array[RegionModifier]:
|
||||
return [
|
||||
TutorialModifier.new()
|
||||
]
|
||||
|
||||
@@ -16,33 +16,30 @@ func get_destination_scene() -> Scene:
|
||||
"001"
|
||||
)
|
||||
|
||||
func get_cave_occurence(_level : int) -> int:
|
||||
func get_cave_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 2
|
||||
|
||||
func get_region_sequence_length() -> int:
|
||||
func get_region_sequence_length(_difficulty_setting : int) -> int:
|
||||
return 5
|
||||
|
||||
func get_objective_for_region(level : int) -> int:
|
||||
match level:
|
||||
1: return 6
|
||||
2: return 10
|
||||
3: return 16
|
||||
4: return 24
|
||||
5: return 34
|
||||
_: return get_objective_for_region(level-1) + (level-2) * 5
|
||||
func get_objective_multiplier() -> float:
|
||||
return 0.6
|
||||
|
||||
func get_first_vending_machine_occurence(_level : int) -> int:
|
||||
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 get_vending_machine_occurence(_level : int) -> int:
|
||||
func get_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int:
|
||||
return 0
|
||||
|
||||
func get_challenge_chance(_level : int) -> float:
|
||||
func get_challenge_chance(_level : int, _difficulty_setting : int) -> float:
|
||||
return 0.
|
||||
|
||||
func get_ship_dialog_path(level : int, ship_in_space := true) -> String:
|
||||
if ship_in_space and level == get_cave_occurence(level) - 1:
|
||||
func get_ship_dialog_path(level : int, difficulty_setting : int ,ship_in_space := true) -> String:
|
||||
if ship_in_space and level == get_cave_occurence(level, difficulty_setting) - 1:
|
||||
return CAVE_DIALOG_PATH
|
||||
if ship_in_space and is_run_finished(level + 1):
|
||||
if ship_in_space and is_run_finished(level + 1, difficulty_setting):
|
||||
return MERCURY_ARRIVAL_DIALOG_PATH
|
||||
return ""
|
||||
@@ -23,11 +23,11 @@ func get_destination_scene() -> Scene:
|
||||
"002"
|
||||
)
|
||||
|
||||
func get_ship_dialog_path(level : int, ship_in_space := true) -> String:
|
||||
func get_ship_dialog_path(level : int, difficulty_setting : int, ship_in_space := true) -> String:
|
||||
if level == 0:
|
||||
return MERCURY_DEPARTURE_DIALOG_PATH
|
||||
if level == 2:
|
||||
return VENDING_MACHINE_DIALOG_PATH
|
||||
if ship_in_space and is_run_finished(level + 1):
|
||||
if ship_in_space and is_run_finished(level + 1, difficulty_setting):
|
||||
return VENUS_ARRIVAL_DIALOG_PATH
|
||||
return ""
|
||||
@@ -16,11 +16,13 @@ func get_destination_text() -> String:
|
||||
func get_destination_scene() -> Scene:
|
||||
return BoreaScene.new()
|
||||
|
||||
func get_player_max_energy() -> int:
|
||||
func get_player_max_energy(difficulty_setting := 1) -> int:
|
||||
if difficulty_setting == 0:
|
||||
return 4 + COSY_ENERGY_ADDITION
|
||||
return 4
|
||||
|
||||
func get_player_max_inventory() -> int:
|
||||
func get_player_max_inventory(_difficulty_setting := 1) -> int:
|
||||
return 3
|
||||
|
||||
func get_ship_dialog_path(_level : int, _ship_in_space := true) -> String:
|
||||
func get_ship_dialog_path(_level : int, _difficulty_setting : int, _ship_in_space := true) -> String:
|
||||
return VENUS_DEPARTURE_DIALOG_PATH
|
||||
@@ -16,13 +16,15 @@ func get_destination_text() -> String:
|
||||
func get_destination_scene() -> Scene:
|
||||
return AquaScene.new()
|
||||
|
||||
func get_player_max_energy() -> int:
|
||||
func get_player_max_energy(difficulty_setting) -> int:
|
||||
if difficulty_setting == 0:
|
||||
return 4 + COSY_ENERGY_ADDITION
|
||||
return 4
|
||||
|
||||
func get_player_max_inventory() -> int:
|
||||
func get_player_max_inventory(_difficulty_setting) -> int:
|
||||
return 4
|
||||
|
||||
func get_ship_dialog_path(level : int, _ship_in_space := true) -> String:
|
||||
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
|
||||
return ""
|
||||
@@ -16,13 +16,15 @@ func get_destination_text() -> String:
|
||||
func get_destination_scene() -> Scene:
|
||||
return SubterraScene.new()
|
||||
|
||||
func get_player_max_energy() -> int:
|
||||
func get_player_max_energy(difficulty_setting : int) -> int:
|
||||
if difficulty_setting == 0:
|
||||
return 4 + COSY_ENERGY_ADDITION
|
||||
return 4
|
||||
|
||||
func get_player_max_inventory() -> int:
|
||||
func get_player_max_inventory(_difficulty_setting : int) -> int:
|
||||
return 5
|
||||
|
||||
func get_ship_dialog_path(level : int, _ship_in_space := true) -> String:
|
||||
func get_ship_dialog_path(level : int, _difficulty_setting : int, _ship_in_space := true) -> String:
|
||||
if level == 5:
|
||||
return TRAVEL_PHONE_CALL_DIALOG_PATH
|
||||
return ""
|
||||
@@ -16,13 +16,15 @@ func get_destination_text() -> String:
|
||||
func get_destination_scene() -> Scene:
|
||||
return EstiaScene.new()
|
||||
|
||||
func get_player_max_energy() -> int:
|
||||
func get_player_max_energy(difficulty_setting : int) -> int:
|
||||
if difficulty_setting == 0:
|
||||
return 5 + COSY_ENERGY_ADDITION
|
||||
return 5
|
||||
|
||||
func get_player_max_inventory() -> int:
|
||||
func get_player_max_inventory(_difficulty_setting : int) -> int:
|
||||
return 5
|
||||
|
||||
func get_ship_dialog_path(level : int, _ship_in_space := true) -> String:
|
||||
func get_ship_dialog_path(level : int, _difficulty_setting : int, _ship_in_space := true) -> String:
|
||||
if level == 5:
|
||||
return TRAVEL_PHONE_CALL_DIALOG_PATH
|
||||
return ""
|
||||
@@ -16,13 +16,15 @@ func get_destination_text() -> String:
|
||||
func get_destination_scene() -> Scene:
|
||||
return AstraEndScene.new()
|
||||
|
||||
func get_player_max_energy() -> int:
|
||||
func get_player_max_energy(difficulty_setting : int) -> int:
|
||||
if difficulty_setting == 0:
|
||||
return 6 + COSY_ENERGY_ADDITION
|
||||
return 5
|
||||
|
||||
func get_player_max_inventory() -> int:
|
||||
func get_player_max_inventory(_difficulty_setting : int) -> int:
|
||||
return 6
|
||||
|
||||
func get_ship_dialog_path(level : int, _ship_in_space := true) -> String:
|
||||
func get_ship_dialog_path(level : int, _difficulty_setting : int, _ship_in_space := true) -> String:
|
||||
if level == 4:
|
||||
return TRAVEL_PHONE_CALL_DIALOG_PATH
|
||||
return ""
|
||||
Reference in New Issue
Block a user