mutation tooltips
This commit is contained in:
@@ -14,10 +14,16 @@ func get_mutation_name() -> String:
|
||||
return tr("QUICK")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("QUICK_EFFECT_TEXT_LEVEL_%d") % level
|
||||
return tr("QUICK_EFFECT_TEXT_LEVEL").format({"score_increase": get_score_increase(), "lifetime_decrease": get_lifetime_decrease()})
|
||||
|
||||
func mutate_score(_plant_data : PlantData, score : int) -> int:
|
||||
func mutate_score(_plant_data: PlantData, score: int) -> int:
|
||||
return score + level
|
||||
|
||||
func mutate_growing_time(_data : PlantData, grow_time : int) -> int:
|
||||
return max(grow_time - level, 1)
|
||||
func mutate_lifetime(_plant_data: PlantData, lifetime: int) -> int:
|
||||
return max(lifetime - level, 1)
|
||||
|
||||
func get_score_increase() -> int:
|
||||
return floori((level + 1.0) / 2)
|
||||
|
||||
func get_lifetime_decrease() -> int:
|
||||
return maxi(0, 6 - get_score_increase())
|
||||
|
||||
Reference in New Issue
Block a user