Encore du dev pour la béta 1
* Suppression de la mutation éphémère * Ajout des modificateur de régions normaux Sableux et Toxique * Ajout de modificateurs challenge (Rocheux, Radioactif et Contaminé) * Ajout du modificateur de région bénéfique Résonnance * Ajout d'un distributeur toutes les 3 régions * Ajout des régions challenge * Bouclage sur les couleurs des mutations après le niveau 4 * Ajout de deux nouveaux panneaux de tutoriel, un sur les informations de plantes et l'autre sur le vaisseau
This commit is contained in:
@@ -39,6 +39,7 @@ func add_item(item: Item) -> bool:
|
||||
func add_tool(tool: Item) -> bool:
|
||||
if not has_item_with_name(tool.get_item_name()):
|
||||
tools.append(tool)
|
||||
current_item_ind += 1
|
||||
updated.emit(self)
|
||||
tool_added.emit(tool)
|
||||
return true
|
||||
|
||||
@@ -7,8 +7,6 @@ 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")
|
||||
|
||||
const RARITY_POOL : Array[int] = [0,0,0,0,0,0,0,1,1,1]
|
||||
|
||||
@export var plant_name : String
|
||||
@export var plant_mutations: Array[PlantMutation]
|
||||
@export var random_seed : int
|
||||
@@ -29,15 +27,15 @@ static func generate_from_parent(plant_data : PlantData) -> Seed:
|
||||
mutate_mutations(plant_data)
|
||||
)
|
||||
else :
|
||||
return Seed.new(
|
||||
return Seed.new(
|
||||
plant_data.plant_name,
|
||||
plant_data.mutations.duplicate_deep()
|
||||
)
|
||||
|
||||
static func generate_random() -> Seed:
|
||||
static func generate_random(rarity := 0) -> Seed:
|
||||
var new_seed = Seed.new(
|
||||
Random.generate_random_word(),
|
||||
[generate_first_mutation()]
|
||||
[generate_first_mutation(rarity)]
|
||||
)
|
||||
|
||||
return new_seed
|
||||
@@ -134,8 +132,7 @@ func get_particles() -> Array[EffectParticles.Parameters]:
|
||||
|
||||
return param
|
||||
|
||||
static func generate_first_mutation() -> PlantMutation:
|
||||
var rarity : int = RARITY_POOL.pick_random()
|
||||
static func generate_first_mutation(rarity := 0) -> PlantMutation:
|
||||
|
||||
var possible_mutation : PlantMutation = GameInfo.game_data.progression_data.available_mutations.filter(
|
||||
func (m : PlantMutation): return m.get_base_rarity() <= rarity
|
||||
|
||||
@@ -20,7 +20,7 @@ func get_artefacts() -> Array[Artefact]:
|
||||
return GameInfo.game_data.current_run.artefacts
|
||||
return []
|
||||
|
||||
func _on_artefacts_updated(artefacts : Array[Artefact]):
|
||||
func update_with_artefacts(artefacts : Array[Artefact]):
|
||||
inventory.seeds_size = calculate_inventory_size(artefacts)
|
||||
max_energy = calculate_max_energy(artefacts)
|
||||
updated.emit()
|
||||
|
||||
Reference in New Issue
Block a user