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:
@@ -20,6 +20,8 @@ func current_is_tool() -> bool:
|
||||
return current_item_ind <= len(tools)
|
||||
|
||||
func set_current_item(new_ind: int):
|
||||
if new_ind < 0:
|
||||
new_ind += (len(tools) + len(seeds))
|
||||
if new_ind != current_item_ind:
|
||||
current_item_ind = new_ind % (len(tools) + len(seeds))
|
||||
updated.emit(self)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
extends Item
|
||||
class_name Seed
|
||||
|
||||
const MUTATION_PROBABILITY = 0.3
|
||||
|
||||
const SHOVEL_ICON = preload("res://common/icons/shovel.svg")
|
||||
const GROWING_ICON = preload("res://common/icons/chevrons-up.svg")
|
||||
const SCORE_ICON = preload("res://common/icons/growth.svg")
|
||||
@@ -21,10 +19,18 @@ func _init(
|
||||
random_seed = randi()
|
||||
|
||||
static func generate_from_parent(plant_data : PlantData) -> Seed:
|
||||
if randf() < MUTATION_PROBABILITY:
|
||||
var mutations : Array[PlantMutation] = plant_data.mutations
|
||||
var mutation_probability = GameInfo.game_data.current_run.plant_info.get_mutation_probability()
|
||||
|
||||
# Mutate for every time mutation probability exceed 1
|
||||
while mutation_probability > 1:
|
||||
mutations = mutate_mutations(plant_data.mutations)
|
||||
mutation_probability -= 1
|
||||
|
||||
if randf() < GameInfo.game_data.current_run.plant_info.get_mutation_probability():
|
||||
return Seed.new(
|
||||
plant_data.plant_name,
|
||||
mutate_mutations(plant_data)
|
||||
mutate_mutations(mutations)
|
||||
)
|
||||
else :
|
||||
return Seed.new(
|
||||
@@ -144,19 +150,19 @@ static func generate_first_mutation(rarity := 0) -> PlantMutation:
|
||||
|
||||
return possible_mutation
|
||||
|
||||
static func mutate_mutations(parent : PlantData) -> Array[PlantMutation]:
|
||||
static func mutate_mutations(mutations : Array[PlantMutation]) -> Array[PlantMutation]:
|
||||
|
||||
var mutation_possibility : Array[MutationPossibility] = [
|
||||
AddMutation.new()
|
||||
]
|
||||
|
||||
if (
|
||||
len(parent.mutations) >= GameInfo.game_data.progression_data.max_mutations_by_plant
|
||||
len(mutations) >= GameInfo.game_data.current_run.plant_info.get_mutation_max_number()
|
||||
):
|
||||
mutation_possibility = [
|
||||
UpgradeMutation.new(),
|
||||
]
|
||||
elif len(parent.mutations) > 0:
|
||||
elif len(mutations) > 0:
|
||||
mutation_possibility = [
|
||||
AddMutation.new(),
|
||||
UpgradeMutation.new(),
|
||||
@@ -164,20 +170,20 @@ static func mutate_mutations(parent : PlantData) -> Array[PlantMutation]:
|
||||
|
||||
var chosen_mutation_possibility = mutation_possibility.pick_random()
|
||||
|
||||
return chosen_mutation_possibility.mutate(parent)
|
||||
return chosen_mutation_possibility.mutate(mutations)
|
||||
|
||||
class MutationPossibility:
|
||||
func mutate(_parent : PlantData)-> Array[PlantMutation]:
|
||||
func mutate(_mutations : Array[PlantMutation])-> Array[PlantMutation]:
|
||||
return []
|
||||
|
||||
class AddMutation extends MutationPossibility:
|
||||
func mutate(parent : PlantData)-> Array[PlantMutation]:
|
||||
var new_mutations = parent.mutations.duplicate_deep()
|
||||
func mutate(mutations : Array[PlantMutation])-> Array[PlantMutation]:
|
||||
var new_mutations = mutations.duplicate_deep()
|
||||
var possible_new_mutations = GameInfo.game_data.progression_data.available_mutations.duplicate_deep()
|
||||
|
||||
possible_new_mutations = possible_new_mutations.filter(
|
||||
func (m : PlantMutation):
|
||||
return parent.mutations.find_custom(func(m2: PlantMutation): return m2.name == m.name) == -1
|
||||
return mutations.find_custom(func(m2: PlantMutation): return m2.name == m.name) == -1
|
||||
)
|
||||
|
||||
if len(possible_new_mutations):
|
||||
@@ -187,17 +193,17 @@ class AddMutation extends MutationPossibility:
|
||||
|
||||
class UpgradeMutation extends MutationPossibility:
|
||||
func mutate(
|
||||
parent : PlantData
|
||||
mutations : Array[PlantMutation]
|
||||
) -> Array[PlantMutation]:
|
||||
var new_mutations = parent.mutations.duplicate_deep()
|
||||
var new_mutations = mutations.duplicate_deep()
|
||||
|
||||
new_mutations.pick_random().level += 1
|
||||
|
||||
return new_mutations
|
||||
|
||||
class RemoveMutation extends MutationPossibility:
|
||||
func mutate(parent : PlantData)-> Array[PlantMutation]:
|
||||
var new_mutations = parent.mutations.duplicate_deep()
|
||||
func mutate(mutations : Array[PlantMutation])-> Array[PlantMutation]:
|
||||
var new_mutations = mutations.duplicate_deep()
|
||||
|
||||
var mut_to_remove = new_mutations.pick_random()
|
||||
if mut_to_remove.level > 1:
|
||||
|
||||
@@ -32,5 +32,5 @@ func use_text() -> String:
|
||||
return tr("SHIP_TELEPORT_USE_TEXT")
|
||||
|
||||
func use(_player : Player, _zone: Player.ActionZone):
|
||||
SceneManager.change_to_scene_id('COCKPIT')
|
||||
SceneManager.change_to_scene(CockpitScene.new())
|
||||
AudioManager.play_sfx("Teleportation")
|
||||
@@ -33,7 +33,7 @@ func _init(region : Region, pos : Vector2):
|
||||
signals.append(
|
||||
DetectorSignalIndividual.new(
|
||||
(pos - e.global_position).normalized().angle(),
|
||||
(e as Door).icon,
|
||||
(e as Door).to_scene.get_scene_icon(),
|
||||
Color("ffa617ff")
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user