ajout des mutation et refonte de l'inspecteur
* 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
This commit is contained in:
17
entities/plants/scripts/plant_mutation/quality_mutation.gd
Normal file
17
entities/plants/scripts/plant_mutation/quality_mutation.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
extends PlantMutation
|
||||
class_name QualityMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/north-star.svg")
|
||||
|
||||
func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Quality"
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "Add [b]%d[/b] to the score if the plant is mature." % level
|
||||
|
||||
func mutate_score(plant : Plant, score : int) -> int:
|
||||
return score + (level if plant.state == Plant.State.MATURE else 0)
|
||||
Reference in New Issue
Block a user