Et toujours du dev pour la béta
* Evolution de l'histoire avec de nouveaux dialogues, une plus grande durée de vie du jeu, des nouvelles zones d'histoire... * Suppression du mode infini * Ajout d'un écran des mutations découvertes * Ajout d'un nouveau mécanisme de respawn situé dans le vaissau * Ajout de 2 nouveaux modificateurs de région * Quatre nouveaux artefacts * Visuel de la décontamination de la planète 3D en cours de la partie * Ajout d'une annonce visuelle des scène du jeu * Fix sur la mutation Généreux pour être en accord avec sa description * Amélioration de l'effet de la mutation Purification * Fix de la mutation sociale aux niveau supérieurs * Ajout d'un effet visuel de réacteur sur le joueur 3D * Fix sur l'annonce de nouveaux objets qui se déclenchaient à une nouvelle run * Amélioration des animation et des informations données dans le vaisseau * Correction mineure des traductions
This commit is contained in:
@@ -18,6 +18,33 @@ func modify_player_max_energy(v : int) -> int:
|
||||
func modify_player_inventory_size(v : int) -> int:
|
||||
return v
|
||||
|
||||
func modify_seed_rarity_pool(seed_rarity_pool : Array[int]) -> Array[int]:
|
||||
return seed_rarity_pool
|
||||
|
||||
func modify_plant_growing_time(plant_growing_time : int) -> int:
|
||||
return plant_growing_time
|
||||
|
||||
func modify_plant_lifetime(plant_lifetime : int) -> int:
|
||||
return plant_lifetime
|
||||
|
||||
func modify_plant_seed_number(plant_seed_number : int) -> int:
|
||||
return plant_seed_number
|
||||
|
||||
func modify_plant_base_score(plant_base_score : int) -> int:
|
||||
return plant_base_score
|
||||
|
||||
func modify_plant_seed_random_loose(plant_seed_random_loose : int) -> int:
|
||||
return plant_seed_random_loose
|
||||
|
||||
func modify_plant_influence_radius(plant_influence_radius : float) -> float:
|
||||
return plant_influence_radius
|
||||
|
||||
func modify_mutation_probability(plant_mutation_probability) -> float:
|
||||
return plant_mutation_probability
|
||||
|
||||
func modify_mutation_max_number(plant_mutation_max_number) -> int:
|
||||
return plant_mutation_max_number
|
||||
|
||||
func card_info() -> CardInfo:
|
||||
var info = CardInfo.new(
|
||||
get_artefact_name(),
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,68 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://xwjwwmhd4b7t"
|
||||
path="res://.godot/imported/stabilisator.blend-3a4d21b03376590b925002fb56f41279.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/game_data/scripts/artefacts/stabilisator/stabilisator.blend"
|
||||
dest_files=["res://.godot/imported/stabilisator.blend-3a4d21b03376590b925002fb56f41279.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Material": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
|
||||
"use_external/path": "uid://dvvi1k5c5iowc"
|
||||
}
|
||||
}
|
||||
}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/gpu_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
gltf/naming_version=2
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
@tool
|
||||
extends Artefact
|
||||
class_name StabilisatorArtefact
|
||||
|
||||
func get_artefact_name() -> String:
|
||||
return "STABILISATOR"
|
||||
|
||||
func get_artefact_desc() -> String:
|
||||
return "STABILISATOR_DESC_TEXT"
|
||||
|
||||
func get_3d_scene() -> PackedScene:
|
||||
return preload("res://common/game_data/scripts/artefacts/stabilisator/stabilisator.blend")
|
||||
|
||||
func modify_plant_lifetime(plant_lifetime : int) -> int:
|
||||
return plant_lifetime + 1
|
||||
@@ -0,0 +1 @@
|
||||
uid://dg52pvxfbowo5
|
||||
Binary file not shown.
@@ -0,0 +1,68 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bb4675xxby4li"
|
||||
path="res://.godot/imported/talion_overloader.blend-8cbf53dd089d03a7feecf8f09620bb83.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/game_data/scripts/artefacts/talion_overloader/talion_overloader.blend"
|
||||
dest_files=["res://.godot/imported/talion_overloader.blend-8cbf53dd089d03a7feecf8f09620bb83.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Material": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
|
||||
"use_external/path": "uid://dvvi1k5c5iowc"
|
||||
}
|
||||
}
|
||||
}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/gpu_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
gltf/naming_version=2
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
@tool
|
||||
extends Artefact
|
||||
class_name TalionOverloaderArtefact
|
||||
|
||||
func get_artefact_name() -> String:
|
||||
return "TALION_OVERLOADER"
|
||||
|
||||
func get_artefact_desc() -> String:
|
||||
return "TALION_OVERLOADER_DESC_TEXT"
|
||||
|
||||
func get_3d_scene() -> PackedScene:
|
||||
return preload("res://common/game_data/scripts/artefacts/talion_overloader/talion_overloader.blend")
|
||||
|
||||
func modify_mutation_max_number(plant_mutation_max_number) -> int:
|
||||
return plant_mutation_max_number + 1
|
||||
@@ -0,0 +1 @@
|
||||
uid://bcc71agce2ewf
|
||||
Binary file not shown.
@@ -0,0 +1,68 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bv12sx67hij1s"
|
||||
path="res://.godot/imported/talion_relay.blend-7f1bb942cac95750ceb5345d8092e7ac.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/game_data/scripts/artefacts/talion_relay/talion_relay.blend"
|
||||
dest_files=["res://.godot/imported/talion_relay.blend-7f1bb942cac95750ceb5345d8092e7ac.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Material": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
|
||||
"use_external/path": "uid://dvvi1k5c5iowc"
|
||||
}
|
||||
}
|
||||
}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/gpu_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
gltf/naming_version=2
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
@tool
|
||||
extends Artefact
|
||||
class_name TalionRelayArtifact
|
||||
|
||||
func get_artefact_name() -> String:
|
||||
return "TALION_RELAY"
|
||||
|
||||
func get_artefact_desc() -> String:
|
||||
return "TALION_RELAY_DESC_TEXT"
|
||||
|
||||
func get_3d_scene() -> PackedScene:
|
||||
return preload("res://common/game_data/scripts/artefacts/talion_relay/talion_relay.blend")
|
||||
|
||||
func modify_mutation_probability(plant_mutation_probability) -> float:
|
||||
return plant_mutation_probability * 1.5
|
||||
@@ -0,0 +1 @@
|
||||
uid://djyy1207gsj4d
|
||||
BIN
common/game_data/scripts/artefacts/talion_soil/talion_soil.blend
Normal file
BIN
common/game_data/scripts/artefacts/talion_soil/talion_soil.blend
Normal file
Binary file not shown.
@@ -0,0 +1,68 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bpvk3ldu7pkyv"
|
||||
path="res://.godot/imported/talion_soil.blend-37ee0f905ace3681bafa4c72e1bfb134.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/game_data/scripts/artefacts/talion_soil/talion_soil.blend"
|
||||
dest_files=["res://.godot/imported/talion_soil.blend-37ee0f905ace3681bafa4c72e1bfb134.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Material": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
|
||||
"use_external/path": "uid://dvvi1k5c5iowc"
|
||||
}
|
||||
}
|
||||
}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/gpu_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
gltf/naming_version=2
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
@tool
|
||||
extends Artefact
|
||||
class_name TalionSoilArtifact
|
||||
|
||||
func get_artefact_name() -> String:
|
||||
return "TALION_SOIL"
|
||||
|
||||
func get_artefact_desc() -> String:
|
||||
return "TALION_SOIL_DESC_TEXT"
|
||||
|
||||
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.4
|
||||
@@ -0,0 +1 @@
|
||||
uid://blxufp4ue4b1i
|
||||
@@ -1,13 +1,15 @@
|
||||
extends Resource
|
||||
class_name GameData
|
||||
|
||||
enum GameMode {STORY,INFINITE}
|
||||
enum GameMode {STORY}
|
||||
|
||||
signal current_run_updated(r : RunData)
|
||||
signal current_region_data_updated(p : RegionData)
|
||||
|
||||
@export var player_data : PlayerData = PlayerData.new()
|
||||
|
||||
@export var progression_data : ProgressionData = ProgressionData.new()
|
||||
|
||||
@export var current_run : RunData = start_run() :
|
||||
set(v):
|
||||
current_run = v
|
||||
@@ -18,29 +20,31 @@ signal current_region_data_updated(p : RegionData)
|
||||
current_region_data = v
|
||||
current_region_data_updated.emit(v)
|
||||
|
||||
@export var progression_data : ProgressionData = ProgressionData.new()
|
||||
|
||||
@export var last_game_scene : Scene = null
|
||||
|
||||
@export var ship_in_space = false
|
||||
|
||||
@export var tutorial_done = false
|
||||
@export var ship_tutorial_done = false
|
||||
|
||||
@export var incubator_used = []
|
||||
@export var dead_orchid_position : Vector3
|
||||
@export var dead_orchid_rotation : Vector3
|
||||
|
||||
@export var item_announced = []
|
||||
|
||||
@export var game_mode : GameMode = GameMode.STORY
|
||||
|
||||
@export var dialogs_done : Array[String] = [] #Chemin des dialogues démarrés
|
||||
@export var dialogs_done : Array[String] = [] #Chemin des dialogues terminés
|
||||
|
||||
func start_run() -> RunData:
|
||||
player_data.clear_inventory()
|
||||
player_data.update_with_artefacts([])
|
||||
current_run = RunData.new()
|
||||
current_run.story_step = progression_data.story_step.duplicate_deep()
|
||||
current_run.generate_next_run_points()
|
||||
current_run.current_run_point_changed.connect(
|
||||
func(rp : RunPoint):
|
||||
start_region(rp.region_parameter)
|
||||
)
|
||||
ship_in_space = false
|
||||
return current_run
|
||||
|
||||
func reset_player():
|
||||
@@ -52,19 +56,14 @@ func reset_all():
|
||||
|
||||
func start_region(region_param : RegionParameter):
|
||||
current_region_data = RegionData.new(region_param)
|
||||
GameInfo.save_game_data()
|
||||
|
||||
func give_up():
|
||||
current_region_data = null
|
||||
current_run = null
|
||||
start_run()
|
||||
SceneManager.change_to_scene(progression_data.story_step.get_respawn_scene())
|
||||
|
||||
func start_tutorial():
|
||||
current_region_data = RegionData.new(
|
||||
RegionParameter.new(
|
||||
0,
|
||||
tr("ASTRA_BASE"),
|
||||
["tutorial"],
|
||||
[],
|
||||
randi()
|
||||
)
|
||||
)
|
||||
func finish_story_step():
|
||||
progression_data.next_story_step()
|
||||
current_region_data = null
|
||||
start_run()
|
||||
|
||||
@@ -1,27 +1,57 @@
|
||||
extends Resource
|
||||
class_name ProgressionData
|
||||
|
||||
@export var available_mutations: Array[PlantMutation] = [
|
||||
AncientMutation.new(),
|
||||
FertileMutation.new(),
|
||||
GenerousMutation.new(),
|
||||
HurriedMutation.new(),
|
||||
PrecociousMutation.new(),
|
||||
ProlificMutation.new(),
|
||||
ProtectiveMutation.new(),
|
||||
PureMutation.new(),
|
||||
PurificationMutation.new(),
|
||||
QualityMutation.new(),
|
||||
QuickMutation.new(),
|
||||
RobustMutation.new(),
|
||||
SocialMutation.new(),
|
||||
ToughMutation.new(),
|
||||
VivaciousMutation.new(),
|
||||
]
|
||||
|
||||
@export var available_artefacts: Array[Artefact] = [
|
||||
PileArtefact.new(),
|
||||
SeedCaseArtefact.new()
|
||||
]
|
||||
@export var planted_mutation_ids: Array[String] = []
|
||||
@export var story_step_i := 0
|
||||
@export var ship_tutorial_done = false
|
||||
|
||||
@export var max_mutations_by_plant : int = 2
|
||||
var all_mutations: Array[PlantMutation] : get = get_all_mutations
|
||||
var available_mutations: Array[PlantMutation] : get = get_all_mutations
|
||||
var available_artefacts: Array[Artefact] : get = get_all_artifacts
|
||||
var story_step : StoryStep : get = get_story_step
|
||||
|
||||
func get_story_step() -> StoryStep:
|
||||
return get_all_story_steps()[story_step_i]
|
||||
|
||||
func next_story_step() -> void:
|
||||
get_story_step()._on_finish()
|
||||
if story_step_i + 1 < len(get_all_story_steps()):
|
||||
story_step_i += 1
|
||||
|
||||
func get_all_mutations() -> Array[PlantMutation]:
|
||||
return [
|
||||
AncientMutation.new(),
|
||||
FertileMutation.new(),
|
||||
GenerousMutation.new(),
|
||||
HurriedMutation.new(),
|
||||
PrecociousMutation.new(),
|
||||
ProlificMutation.new(),
|
||||
ProtectiveMutation.new(),
|
||||
PureMutation.new(),
|
||||
PurificationMutation.new(),
|
||||
QualityMutation.new(),
|
||||
QuickMutation.new(),
|
||||
RobustMutation.new(),
|
||||
SocialMutation.new(),
|
||||
ToughMutation.new(),
|
||||
VivaciousMutation.new(),
|
||||
]
|
||||
|
||||
func get_all_artifacts() -> Array[Artefact]:
|
||||
return [
|
||||
PileArtefact.new(),
|
||||
SeedCaseArtefact.new(),
|
||||
StabilisatorArtefact.new(),
|
||||
TalionOverloaderArtefact.new(),
|
||||
TalionSoilArtifact.new(),
|
||||
]
|
||||
|
||||
|
||||
func get_all_story_steps() -> Array[StoryStep]:
|
||||
return [
|
||||
TutorialStoryStep.new(),
|
||||
AstraStoryStep.new(),
|
||||
MercuryStoryStep.new(),
|
||||
BetaStoryStep.new()
|
||||
]
|
||||
|
||||
@@ -1,103 +1,85 @@
|
||||
extends Resource
|
||||
class_name RunData
|
||||
|
||||
enum State {STARTED, IN_PROGRESS, FINISHED}
|
||||
|
||||
const RUN_POINTS_NEXT_NUMBER : int = 2
|
||||
const RUN_POINT_MAX_LEVEL = 5 # TODO
|
||||
const VENDING_MACHINE_OCCURENCE = 3
|
||||
const CHALLENGE_CHANCE = 0.25
|
||||
|
||||
signal current_run_point_changed(rp : RunPoint)
|
||||
signal artefacts_changed(artefact : Array[Artefact])
|
||||
|
||||
var run_seed = randi()
|
||||
@export var next_run_points : Array[RunPoint] = generate_next_run_points()
|
||||
|
||||
@export var level = 0
|
||||
@export var story_step : StoryStep
|
||||
@export var next_run_points : Array[RunPoint]
|
||||
@export var current_run_point : RunPoint = null :
|
||||
set(v):
|
||||
current_run_point = v
|
||||
current_run_point_changed.emit(v)
|
||||
@export var visited_run_points : Array[RunPoint] = []
|
||||
|
||||
@export var last_used_modifier_name = ""
|
||||
|
||||
@export var artefacts : Array[Artefact] = []
|
||||
|
||||
var plant_info = RunDataPlantInfo.new(self)
|
||||
|
||||
func get_state() -> State:
|
||||
if not current_run_point:
|
||||
return State.STARTED
|
||||
elif current_run_point.level == RUN_POINT_MAX_LEVEL:
|
||||
return State.FINISHED
|
||||
else :
|
||||
return State.IN_PROGRESS
|
||||
func is_finished() -> bool:
|
||||
return story_step.is_run_finished(level)
|
||||
|
||||
func get_progress() -> int:
|
||||
return story_step.get_run_progress(level)
|
||||
|
||||
#region ------------------ Run Points ------------------
|
||||
|
||||
func generate_next_run_points(level = 0) -> Array[RunPoint]:
|
||||
|
||||
func generate_next_run_points() -> Array[RunPoint]:
|
||||
next_run_points = []
|
||||
|
||||
if level == RUN_POINT_MAX_LEVEL and GameInfo.game_data.game_mode == GameData.GameMode.STORY:
|
||||
return [
|
||||
generate_borea_base_run_point()
|
||||
]
|
||||
|
||||
for i in range(RUN_POINTS_NEXT_NUMBER):
|
||||
for i in range(story_step.get_run_point_number(level+1)):
|
||||
next_run_points.append(
|
||||
generate_next_run_point(level)
|
||||
generate_next_run_point()
|
||||
)
|
||||
|
||||
return next_run_points
|
||||
|
||||
func generate_next_run_point(level = 0) -> RunPoint:
|
||||
func generate_next_run_point() -> RunPoint:
|
||||
var region_parameter = RegionParameter.new()
|
||||
|
||||
var is_challenge = randf() < CHALLENGE_CHANCE
|
||||
if is_challenge:
|
||||
region_parameter.modifiers = [
|
||||
generate_challenge_modifiers().pick_random(),
|
||||
generate_benefic_modifiers().pick_random()
|
||||
] as Array[RegionModifier]
|
||||
else:
|
||||
region_parameter.modifiers = [
|
||||
generate_normal_modifiers().pick_random()
|
||||
] as Array[RegionModifier]
|
||||
var next_level = level+1
|
||||
|
||||
if story_step.need_gameplay_modifier(next_level):
|
||||
var is_challenge = randf() < story_step.get_challenge_chance(next_level)
|
||||
if is_challenge:
|
||||
region_parameter.modifiers = [
|
||||
generate_challenge_modifiers().pick_random(),
|
||||
generate_benefic_modifiers().pick_random()
|
||||
] as Array[RegionModifier]
|
||||
else:
|
||||
region_parameter.modifiers = [
|
||||
generate_normal_modifiers().pick_random()
|
||||
] as Array[RegionModifier]
|
||||
|
||||
|
||||
var first_vending = story_step.get_first_vending_machine_occurence(next_level)
|
||||
var vending_occurence = story_step.get_vending_machine_occurence(next_level)
|
||||
if vending_occurence > 0:
|
||||
if (level - first_vending)%vending_occurence == 0:
|
||||
region_parameter.modifiers.append(VendingMachineModifier.new())
|
||||
|
||||
if level%VENDING_MACHINE_OCCURENCE == 0:
|
||||
region_parameter.modifiers.append(VendingMachineModifier.new())
|
||||
region_parameter.modifiers.append_array(
|
||||
story_step.get_story_modifiers_for_region(next_level)
|
||||
)
|
||||
|
||||
region_parameter.level = level
|
||||
region_parameter.objective = story_step.get_objective_for_region(next_level)
|
||||
|
||||
return RunPoint.new(
|
||||
level,
|
||||
region_parameter
|
||||
)
|
||||
|
||||
func generate_borea_base_run_point() -> RunPoint:
|
||||
var region_parameter = RegionParameter.new()
|
||||
region_parameter.level = RUN_POINT_MAX_LEVEL
|
||||
region_parameter.region_name = tr("BOREA_BASE")
|
||||
|
||||
return RunPoint.new(
|
||||
RUN_POINT_MAX_LEVEL,
|
||||
region_parameter
|
||||
)
|
||||
|
||||
func get_next_run_points() -> Array[RunPoint]:
|
||||
if current_run_point and current_run_point.level == RUN_POINT_MAX_LEVEL:
|
||||
return []
|
||||
return next_run_points
|
||||
|
||||
func choose_next_run_point(run_point : RunPoint) -> RunPoint:
|
||||
if current_run_point:
|
||||
visited_run_points.append(current_run_point)
|
||||
func choose_next_run_point(run_point : RunPoint = null) -> RunPoint:
|
||||
if run_point == null:
|
||||
run_point = generate_next_run_point()
|
||||
level += 1
|
||||
current_run_point = run_point
|
||||
GameInfo.game_data.start_region(run_point.region_parameter)
|
||||
next_run_points = generate_next_run_points(current_run_point.level + 1)
|
||||
if len(current_run_point.region_parameter.modifiers):
|
||||
last_used_modifier_name = current_run_point.region_parameter.modifiers[0].get_modifier_name()
|
||||
next_run_points = generate_next_run_points()
|
||||
return current_run_point
|
||||
|
||||
#endregion
|
||||
@@ -118,7 +100,8 @@ func generate_normal_modifiers() -> Array[RegionModifier]:
|
||||
func generate_benefic_modifiers() -> Array[RegionModifier]:
|
||||
return [
|
||||
VendingMachineModifier.new(),
|
||||
ResonnanceModifier.new()
|
||||
ResonnanceModifier.new(),
|
||||
InstableModifier.new(),
|
||||
]
|
||||
|
||||
|
||||
@@ -127,6 +110,7 @@ func generate_challenge_modifiers() -> Array[RegionModifier]:
|
||||
RockyModifier.new(),
|
||||
RadioactiveModifier.new(),
|
||||
ContaminatedModifier.new(),
|
||||
StormModifier.new(),
|
||||
]
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
extends Node
|
||||
class_name RunDataPlantInfo
|
||||
|
||||
signal updated
|
||||
|
||||
const DEFAULT_GROWING_TIME = 2
|
||||
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_MUTATION_PROBABILITY = 0.3
|
||||
const DEFAULT_MUTATION_MAX_NUMBER = 2
|
||||
|
||||
var run_data : RunData
|
||||
|
||||
@@ -24,6 +24,9 @@ func get_growing_time() -> int:
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
growing_time = rm.modify_plant_growing_time(growing_time)
|
||||
|
||||
for a in run_data.artefacts:
|
||||
growing_time = a.modify_plant_growing_time(growing_time)
|
||||
|
||||
return max(0, growing_time)
|
||||
|
||||
@@ -32,6 +35,9 @@ func get_lifetime() -> int:
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
lifetime = rm.modify_plant_lifetime(lifetime)
|
||||
|
||||
for a in run_data.artefacts:
|
||||
lifetime = a.modify_plant_lifetime(lifetime)
|
||||
|
||||
return max(0, lifetime)
|
||||
|
||||
@@ -40,6 +46,9 @@ func get_base_score() -> int:
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
base_score = rm.modify_plant_base_score(base_score)
|
||||
|
||||
for a in run_data.artefacts:
|
||||
base_score = a.modify_plant_base_score(base_score)
|
||||
|
||||
return max(0, base_score)
|
||||
|
||||
@@ -48,6 +57,9 @@ func get_seed_number() -> int:
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
seed_number = rm.modify_plant_seed_number(seed_number)
|
||||
|
||||
for a in run_data.artefacts:
|
||||
seed_number = a.modify_plant_seed_number(seed_number)
|
||||
|
||||
return max(0, seed_number)
|
||||
|
||||
@@ -56,6 +68,9 @@ func get_seed_random_loose() -> int:
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
seed_random_loose = rm.modify_plant_seed_random_loose(seed_random_loose)
|
||||
|
||||
for a in run_data.artefacts:
|
||||
seed_random_loose = a.modify_plant_seed_random_loose(seed_random_loose)
|
||||
|
||||
return min(max(0, seed_random_loose),get_seed_number())
|
||||
|
||||
@@ -64,9 +79,33 @@ func get_influence_radius() -> int:
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
influence_radius = rm.modify_plant_influence_radius(influence_radius)
|
||||
|
||||
for a in run_data.artefacts:
|
||||
influence_radius = a.modify_plant_influence_radius(influence_radius)
|
||||
|
||||
return max(0, influence_radius)
|
||||
|
||||
func get_mutation_probability() -> float:
|
||||
var mutation_probability = DEFAULT_MUTATION_PROBABILITY
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
mutation_probability = rm.modify_mutation_probability(mutation_probability)
|
||||
|
||||
for a in run_data.artefacts:
|
||||
mutation_probability = a.modify_mutation_probability(mutation_probability)
|
||||
|
||||
return max(0., mutation_probability)
|
||||
|
||||
func get_mutation_max_number() -> int:
|
||||
var mutation_max_number = DEFAULT_MUTATION_MAX_NUMBER
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
mutation_max_number = rm.modify_mutation_max_number(mutation_max_number)
|
||||
|
||||
for a in run_data.artefacts:
|
||||
mutation_max_number = a.modify_mutation_max_number(mutation_max_number)
|
||||
|
||||
return max(0., mutation_max_number)
|
||||
|
||||
func get_region_modifiers() -> Array[RegionModifier]:
|
||||
if run_data.current_run_point and run_data.current_run_point.region_parameter:
|
||||
|
||||
@@ -7,25 +7,21 @@ const TYPE_ICON = preload("res://common/icons/map-pin.svg")
|
||||
const OBJECTIVE_ICON = preload("res://common/icons/growth.svg")
|
||||
const CHARGE_ICON = preload("res://common/icons/bolt.svg")
|
||||
|
||||
@export var level : int = 0 # X pos along the planet, and difficulty
|
||||
@export var region_parameter : RegionParameter = RegionParameter.new() :
|
||||
set(v):
|
||||
region_parameter = v
|
||||
@export var position : float = 0
|
||||
|
||||
func _init(
|
||||
_level : int = 0,
|
||||
_region_parameter : RegionParameter = RegionParameter.new(),
|
||||
_position : float = randf_range(0.,1.),
|
||||
):
|
||||
level = _level
|
||||
region_parameter = _region_parameter
|
||||
region_parameter.level = level
|
||||
position = _position
|
||||
|
||||
func card_info() -> CardInfo:
|
||||
var info = CardInfo.new(
|
||||
region_parameter.region_name,
|
||||
region_parameter.get_region_name(),
|
||||
tr("REGION_TO_VISIT")
|
||||
)
|
||||
|
||||
|
||||
33
common/game_data/scripts/story/astra_story_step.gd
Normal file
33
common/game_data/scripts/story/astra_story_step.gd
Normal file
@@ -0,0 +1,33 @@
|
||||
extends StoryStep
|
||||
class_name AstraStoryStep
|
||||
|
||||
const MERCURY_ARRIVAL_DIALOG_PATH="res://dialogs/timelines/astra/mercury_arrival.dtl"
|
||||
|
||||
func get_respawn_scene() -> Scene:
|
||||
return AstraScene.new()
|
||||
|
||||
func get_destination_text() -> String:
|
||||
return tr("RELAY_BASE_X") % tr("MERCURY")
|
||||
|
||||
func get_destination_scene() -> Scene:
|
||||
return RelayBaseScene.new(
|
||||
"MERCURY",
|
||||
"001"
|
||||
)
|
||||
|
||||
func get_region_sequence_length() -> int:
|
||||
return 4
|
||||
|
||||
func get_first_vending_machine_occurence(_level : int) -> int:
|
||||
return 0
|
||||
|
||||
func get_vending_machine_occurence(_level : int) -> int:
|
||||
return 0
|
||||
|
||||
func get_challenge_chance(_level : int) -> float:
|
||||
return 0.
|
||||
|
||||
func get_ship_dialog_path(level : int, ship_in_space := true) -> String:
|
||||
if ship_in_space and level == get_region_sequence_length() - 1:
|
||||
return MERCURY_ARRIVAL_DIALOG_PATH
|
||||
return ""
|
||||
1
common/game_data/scripts/story/astra_story_step.gd.uid
Normal file
1
common/game_data/scripts/story/astra_story_step.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dolti22admdm8
|
||||
31
common/game_data/scripts/story/beta_story_step.gd
Normal file
31
common/game_data/scripts/story/beta_story_step.gd
Normal file
@@ -0,0 +1,31 @@
|
||||
extends StoryStep
|
||||
class_name BetaStoryStep
|
||||
|
||||
const VENUS_DEPARTURE_DIALOG_PATH = "res://dialogs/timelines/beta/venus_departure.dtl"
|
||||
|
||||
func get_respawn_scene() -> Scene:
|
||||
return RelayBaseScene.new(
|
||||
"VENUS",
|
||||
"002",
|
||||
true
|
||||
)
|
||||
|
||||
func get_objective_for_region(l : int) -> int:
|
||||
match l:
|
||||
0: return 8
|
||||
1: return 15
|
||||
_: return get_objective_for_region(l-1) + l * 5
|
||||
|
||||
|
||||
func get_region_sequence_length() -> int:
|
||||
return 10
|
||||
|
||||
func get_destination_text() -> String:
|
||||
return tr("SECRET_SCENE")
|
||||
|
||||
func get_destination_scene() -> Scene:
|
||||
return BoreaScene.new()
|
||||
|
||||
|
||||
func get_ship_dialog_path(_level : int, _ship_in_space := true) -> String:
|
||||
return VENUS_DEPARTURE_DIALOG_PATH
|
||||
1
common/game_data/scripts/story/beta_story_step.gd.uid
Normal file
1
common/game_data/scripts/story/beta_story_step.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://da8kqgl0xnkpi
|
||||
35
common/game_data/scripts/story/mercury_story_step.gd
Normal file
35
common/game_data/scripts/story/mercury_story_step.gd
Normal file
@@ -0,0 +1,35 @@
|
||||
extends StoryStep
|
||||
class_name MercuryStoryStep
|
||||
|
||||
|
||||
const MERCURY_DEPARTURE_DIALOG_PATH = "res://dialogs/timelines/mercury/mercury_departure.dtl"
|
||||
const VENUS_ARRIVAL_DIALOG_PATH = "res://dialogs/timelines/mercury/venus_arrival.dtl"
|
||||
|
||||
func get_respawn_scene() -> Scene:
|
||||
return RelayBaseScene.new(
|
||||
"MERCURY",
|
||||
"001",
|
||||
true
|
||||
)
|
||||
|
||||
func get_destination_text() -> String:
|
||||
return tr("RELAY_BASE_X") % tr("VENUS")
|
||||
|
||||
func get_destination_scene() -> Scene:
|
||||
return RelayBaseScene.new(
|
||||
"VENUS",
|
||||
"002"
|
||||
)
|
||||
|
||||
func get_first_vending_machine_occurence(_level : int) -> int:
|
||||
return 0
|
||||
|
||||
func get_vending_machine_occurence(_level : int) -> int:
|
||||
return 2
|
||||
|
||||
func get_ship_dialog_path(level : int, ship_in_space := true) -> String:
|
||||
if level == 0:
|
||||
return MERCURY_DEPARTURE_DIALOG_PATH
|
||||
if ship_in_space and level == get_region_sequence_length() - 1:
|
||||
return VENUS_ARRIVAL_DIALOG_PATH
|
||||
return ""
|
||||
1
common/game_data/scripts/story/mercury_story_step.gd.uid
Normal file
1
common/game_data/scripts/story/mercury_story_step.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cni314l8gb0qx
|
||||
67
common/game_data/scripts/story/story_step.gd
Normal file
67
common/game_data/scripts/story/story_step.gd
Normal file
@@ -0,0 +1,67 @@
|
||||
@abstract
|
||||
extends Resource
|
||||
class_name StoryStep
|
||||
|
||||
#region ------------------ Story ------------------
|
||||
|
||||
@abstract func get_respawn_scene() -> Scene
|
||||
|
||||
@abstract func get_destination_text() -> String
|
||||
|
||||
func get_destination_scene() -> Scene:
|
||||
return BoreaScene.new()
|
||||
|
||||
func get_run_progress(level : int) -> int:
|
||||
return get_region_sequence_length() - level
|
||||
|
||||
func get_ship_dialog_path(_level : int, _ship_in_space := true) -> String:
|
||||
return ""
|
||||
#region ------------------ Run ------------------
|
||||
|
||||
func is_run_finished(level : int) -> bool:
|
||||
return level == get_region_sequence_length()
|
||||
|
||||
func get_region_sequence_length() -> int:
|
||||
return 6
|
||||
|
||||
func get_first_vending_machine_occurence(_level : int) -> int:
|
||||
return 2
|
||||
|
||||
func get_vending_machine_occurence(_level : int) -> int:
|
||||
return 4
|
||||
|
||||
func get_challenge_chance(_level : int) -> float:
|
||||
return 0.3
|
||||
|
||||
func get_run_point_number(level : int) -> int:
|
||||
if is_run_finished(level):
|
||||
return 1
|
||||
return 2
|
||||
|
||||
func get_objective_for_region(level : int) -> int:
|
||||
match level:
|
||||
0: return 1
|
||||
1: return 8
|
||||
2: return 10
|
||||
3: return 15
|
||||
4: return 20
|
||||
5: return 30
|
||||
_: return get_objective_for_region(level-1) + (level-3) * 5
|
||||
|
||||
func get_story_modifiers_for_region(level : int) -> Array[RegionModifier]:
|
||||
var modifiers : Array[RegionModifier] = []
|
||||
if is_run_finished(level):
|
||||
var dest_mod = DestinationModifier.new()
|
||||
dest_mod.destination_scene = get_destination_scene()
|
||||
modifiers.append(dest_mod)
|
||||
return modifiers
|
||||
|
||||
func need_gameplay_modifier(level : int):
|
||||
if is_run_finished(level):
|
||||
return false
|
||||
return true
|
||||
|
||||
func _on_finish():
|
||||
GameInfo.game_data.incubator_used = []
|
||||
GameInfo.game_data.dead_orchid_position = Vector3.ZERO
|
||||
GameInfo.game_data.dead_orchid_rotation = Vector3.ZERO
|
||||
1
common/game_data/scripts/story/story_step.gd.uid
Normal file
1
common/game_data/scripts/story/story_step.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://djyuru5v3rgbb
|
||||
24
common/game_data/scripts/story/tutorial_story_step.gd
Normal file
24
common/game_data/scripts/story/tutorial_story_step.gd
Normal file
@@ -0,0 +1,24 @@
|
||||
extends StoryStep
|
||||
class_name TutorialStoryStep
|
||||
|
||||
const INTRO_DIALOG = "res://dialogs/timelines/tutorial/demeter_intro.dtl"
|
||||
|
||||
func get_respawn_scene() -> Scene:
|
||||
return AstraScene.new()
|
||||
|
||||
func get_destination_text() -> String:
|
||||
return ""
|
||||
|
||||
func get_region_sequence_length() -> int:
|
||||
return 1
|
||||
|
||||
func get_destination_scene() -> Scene: return null
|
||||
|
||||
func get_story_modifiers_for_region(_n : int) -> Array[RegionModifier]:
|
||||
return [
|
||||
TutorialModifier.new()
|
||||
]
|
||||
|
||||
func _on_finish():
|
||||
pass
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://c5xggvi0aifed
|
||||
Reference in New Issue
Block a user