* 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
21 lines
551 B
GDScript
21 lines
551 B
GDScript
extends PlantMutation
|
|
class_name ErmitMutation
|
|
|
|
func get_icon() -> Texture:
|
|
return preload("res://common/icons/seedling-off.svg")
|
|
|
|
func get_base_rarity() -> int:
|
|
return 0
|
|
|
|
func get_mutation_name() -> String:
|
|
return "Ermit"
|
|
|
|
func get_mutation_description() -> String:
|
|
return "Multiply the score by %d if no plant is near, but set it to 0 otherwise." % level
|
|
|
|
func mutate_score(plant : Plant, score) -> int:
|
|
for area in plant.influence_zone.get_overlapping_areas():
|
|
if area is Plant:
|
|
return 0
|
|
|
|
return score * 2 |