Zoom, nouvelles mutations et cie

* ajout d'une aide de jeu directement dans l'interface
* ajout de 8 nouvelles mutations (Productif, pressé, pur, vivace, généreux, robuste, protecteur et prolifique)
* changements d'icône pour plus de clarté
* changement de l'animation de recharge pour montrer le temps qui passe
* ajout des mutations rare et de la possibilité d'avoir des mutation niveau 2 dès le départ
* ajout d'un zoom
* correction de bugs (déplacement au dialogue, problème de score au load d'une région)
This commit is contained in:
2026-03-20 17:16:56 +01:00
parent 76707171fa
commit 4b16d52740
52 changed files with 1217 additions and 272 deletions

View File

@@ -4,6 +4,9 @@ class_name FertileMutation
func get_icon() -> Texture:
return preload("res://common/icons/seedling.svg")
func get_base_rarity() -> int:
return 1
func get_mutation_id() -> String:
return "FERTILE"
@@ -13,11 +16,19 @@ func get_mutation_name() -> String:
func get_mutation_description() -> String:
return tr("FERTILE_EFFECT_TEXT").format({
"seed_buff": get_seed_buff(),
"seed_icon": Text.bbcode_icon(Plant.SEED_ICON)
"seed_icon": Text.bbcode_icon(Plant.SEED_ICON),
"score_change": get_score_change(),
"score_icon": Text.bbcode_icon(Plant.SCORE_ICON),
})
func mutate_seed_buff(_plant_data: PlantData, seed_buff) -> int:
return seed_buff + get_seed_buff()
func mutate_score(_plant_data: PlantData, score: int) -> int:
return score + get_score_change()
func get_seed_buff():
return level
return level
func get_score_change():
return -1

View File

@@ -0,0 +1,30 @@
extends PlantMutation
class_name GenerousMutation
func get_icon() -> Texture:
return preload("res://common/icons/carambola.svg")
func get_base_rarity() -> int:
return 1
func get_mutation_id() -> String:
return "GENEROUS"
func get_mutation_description() -> String:
return tr("GENEROUS_EFFECT_TEXT").format({
"score_buff": get_score_buff(),
"score_icon": Text.bbcode_icon(Plant.SCORE_ICON)
})
func mutate_score_multiplier(plant_data: PlantData, multiplier: int) -> int:
if plant_data.get_state() == PlantData.State.MATURE:
return 0
return multiplier
func mutate_score_buff(plant_data: PlantData, score_buff : int) -> int:
if plant_data.get_state() == PlantData.State.MATURE:
return score_buff + get_score_buff()
return score_buff
func get_score_buff():
return level

View File

@@ -0,0 +1 @@
uid://7bfgsrkp6gaq

View File

@@ -0,0 +1,23 @@
extends PlantMutation
class_name HurriedMutation
func get_icon() -> Texture:
return preload("res://common/icons/chevrons-up.svg")
func get_base_rarity() -> int:
return 1
func get_mutation_id() -> String:
return "HURRIED"
func get_mutation_description() -> String:
return tr("HURRIED_EFFECT_TEXT").format({
"growing_time_change": get_growing_time_change(),
"growing_time_icon": Text.bbcode_icon(Plant.GROWING_ICON)
})
func mutate_growing_time(_plant_data: PlantData, growing_time: int) -> int:
return growing_time + get_growing_time_change()
func get_growing_time_change():
return -level

View File

@@ -0,0 +1 @@
uid://ch44r5vkwpkwc

View File

@@ -0,0 +1,20 @@
extends PlantMutation
class_name ProlificMutation
func get_icon() -> Texture:
return preload("res://common/icons/droplets.svg")
func get_mutation_id() -> String:
return "PROLIFIC"
func get_mutation_description() -> String:
return tr("PROLIFIC_EFFECT_TEXT").format({
"seeds_change": get_seed_change(),
"seeds_icon": Text.bbcode_icon(Plant.SEED_ICON)
})
func mutate_seed_number(_plant_data: PlantData, seed_number: int) -> int:
return get_seed_change() + seed_number
func get_seed_change():
return level

View File

@@ -0,0 +1 @@
uid://csk5xull465m3

View File

@@ -0,0 +1,20 @@
extends PlantMutation
class_name ProtectiveMutation
func get_icon() -> Texture:
return preload("res://common/icons/tree.svg")
func get_mutation_id() -> String:
return "PROTECTIVE"
func get_mutation_description() -> String:
return tr("PROTECTIVE_EFFECT_TEXT").format({
"lifetime_buff": get_lifetime_buff(),
"lifetime_icon": Text.bbcode_icon(Plant.LIFETIME_ICON)
})
func mutate_lifetime_buff(_plant_data: PlantData, lifetime_buff : int) -> int:
return lifetime_buff + get_lifetime_buff()
func get_lifetime_buff():
return level

View File

@@ -0,0 +1 @@
uid://b5nc8f0gnalxu

View File

@@ -0,0 +1,25 @@
extends PlantMutation
class_name PureMutation
func get_icon() -> Texture:
return preload("res://common/icons/north-star.svg")
func get_mutation_id() -> String:
return "PURE"
func get_base_rarity() -> int:
return 1
func get_mutation_description() -> String:
return tr("PURE_EFFECT_TEXT").format({
"score_icon": Text.bbcode_icon(Plant.SCORE_ICON),
"score_multiplier": get_score_multiplier(),
})
func mutate_score_multiplier(plant_data: PlantData, multiplier: int) -> int:
if plant_data.decontamination_area_factor == 1.0:
return multiplier * get_score_multiplier()
return multiplier
func get_score_multiplier()->int:
return level

View File

@@ -0,0 +1 @@
uid://dh5m6tvkewad6

View File

@@ -2,17 +2,11 @@ extends PlantMutation
class_name QualityMutation
func get_icon() -> Texture:
return preload("res://common/icons/north-star.svg")
func get_base_rarity() -> int:
return 0
return preload("res://common/icons/growth.svg")
func get_mutation_id() -> String:
return "QUALITY"
func get_mutation_name() -> String:
return tr("QUALITY")
func get_mutation_description() -> String:
return tr("QUALITY_EFFECT_TEXT").format({
"score": get_score(),

View File

@@ -0,0 +1,20 @@
extends PlantMutation
class_name RobustMutation
func get_icon() -> Texture:
return preload("res://common/icons/clock.svg")
func get_mutation_id() -> String:
return "ROBUST"
func get_mutation_description() -> String:
return tr("ROBUST_EFFECT_TEXT").format({
"lifetime_change": get_lifetime_change(),
"lifetime_icon": Text.bbcode_icon(Plant.LIFETIME_ICON)
})
func mutate_lifetime(_plant_data: PlantData, lifetime: int) -> int:
return lifetime + get_lifetime_change()
func get_lifetime_change():
return level * 2

View File

@@ -0,0 +1 @@
uid://cjcylscs6qn4x

View File

@@ -0,0 +1,22 @@
extends PlantMutation
class_name VivaciousMutation
func get_icon() -> Texture:
return preload("res://common/icons/bolt.svg")
func get_mutation_id() -> String:
return "VIVACIOUS"
func get_mutation_description() -> String:
return tr("VIVACIOUS_EFFECT_TEXT").format({
"score_change": get_score_change(),
"score_icon": Text.bbcode_icon(Plant.SCORE_ICON)
})
func mutate_score(data : PlantData, score : int) -> int:
if data.day == data.get_growing_time():
return score + get_score_change()
return score
func get_score_change():
return level * 2

View File

@@ -0,0 +1 @@
uid://boq38l1dmjvot