new mutations wip

This commit is contained in:
Altaezio
2026-05-28 17:05:04 +02:00
parent 4c4b051f3f
commit e03bfc580e
132 changed files with 321 additions and 135 deletions

View File

@@ -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