new mutations + plant part data structure simplified
This commit is contained in:
23
entities/plants/scripts/plant_mutation/humide_mutation.gd
Normal file
23
entities/plants/scripts/plant_mutation/humide_mutation.gd
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
Reference in New Issue
Block a user