Ajout des mutation Nettoyage, Ermite, Tropicale, Rhizome et Spontanée
This commit is contained in:
23
entities/plants/scripts/plant_mutation/tropical_mutation.gd
Normal file
23
entities/plants/scripts/plant_mutation/tropical_mutation.gd
Normal file
@@ -0,0 +1,23 @@
|
||||
extends PlantMutation
|
||||
class_name TropicalMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/cloud-rain.svg")
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "TROPICAL"
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return tr("TROPICAL")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("TROPICAL_EFFECT_TEXT").format({
|
||||
"score_icon": Text.bbcode_icon(Plant.SCORE_ICON),
|
||||
"score_multiplier": get_score_multiplier() + 1.,
|
||||
})
|
||||
|
||||
func mutate_score_multiplier(_plant_data: PlantData, multiplier: float) -> float:
|
||||
return multiplier + (get_score_multiplier() if GameInfo.game_data.current_region_data.meteo_type == Meteo.Type.RAINY else 0.0)
|
||||
|
||||
func get_score_multiplier()->float:
|
||||
return 0.5 * level
|
||||
Reference in New Issue
Block a user