* Changement de l'UI, ajouts de l'inspecteur par carte et changement de police * Ajout d'un semblant d'exploration * Ajout de la sauvegarde des entités * Restructuration mineure de l'arborescence * Fix divers et réécriture des textes
24 lines
675 B
GDScript
24 lines
675 B
GDScript
extends PlantMutation
|
|
class_name AncientMutation
|
|
|
|
const DEFAULT_DAY_FACTOR = 5
|
|
|
|
func get_icon() -> Texture:
|
|
return preload("res://common/icons/wood.svg")
|
|
|
|
func get_base_rarity() -> int:
|
|
return 0
|
|
|
|
func get_mutation_name() -> String:
|
|
return "Ancient"
|
|
|
|
func get_mutation_description() -> String:
|
|
return "When mature, add [b]1[/b] to the score for each [b]%d[/b] days passed" % get_day_factor()
|
|
|
|
func get_day_factor():
|
|
return max(1, DEFAULT_DAY_FACTOR - level + 1)
|
|
|
|
func mutate_score(plant_state : Plant.State, plant : Plant, score) -> int:
|
|
if plant_state != Plant.State.MATURE:
|
|
return score
|
|
return score + floori(plant.day / get_day_factor()) |