* ajout des mutations #86 * changement de l'objectif #85 * refonte de l'inspecteur #71 * changement léger de la plantation * les plantes ne donnent que des graines de leurs espèces * refonte partielle du code, refacto
23 lines
573 B
GDScript
23 lines
573 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 "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 : Plant, score) -> int:
|
|
|
|
return score + floori(plant.day / get_day_factor()) |