24 lines
730 B
GDScript
24 lines
730 B
GDScript
extends PlantMutation
|
|
class_name HumideMutation
|
|
|
|
func get_icon() -> Texture:
|
|
return preload("res://common/icons/shield.svg")
|
|
|
|
func get_mutation_id() -> String:
|
|
return "HUMIDE"
|
|
|
|
func get_mutation_name() -> String:
|
|
return tr("HUMIDE")
|
|
|
|
func get_mutation_description() -> String:
|
|
return tr("HUMIDE_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
|