new mutations wip
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
extends PlantMutation
|
||||
class_name SpontaneousMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/droplet.svg")
|
||||
|
||||
func get_base_rarity() -> int:
|
||||
return 1
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "SPONTANEOUS"
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return tr("SPONTANEOUS")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("SPONTANEOUS_EFFECT_TEXT").format({
|
||||
"bonus_seed": get_bonus_seed()
|
||||
})
|
||||
|
||||
func produce_seeds() -> bool:
|
||||
return false
|
||||
|
||||
func mutate_seed_number(_plant_data: PlantData, seed_number: int) -> int:
|
||||
return seed_number + get_bonus_seed()
|
||||
|
||||
func _start_maturation_effect(plant: Plant):
|
||||
for i in range(plant.data.get_seed_number()):
|
||||
await plant.produce_seed()
|
||||
|
||||
func get_bonus_seed() -> int:
|
||||
return level - 1
|
||||
Reference in New Issue
Block a user