mutation tooltips
This commit is contained in:
@@ -14,10 +14,16 @@ func get_mutation_name() -> String:
|
||||
return tr("EPHEMERAL")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("EPHEMERAL_EFFECT_TEXT_LEVEL_%d") % level
|
||||
return tr("EPHEMERAL_EFFECT_TEXT_LEVEL").format({"seed_number": level, "lifetime_change": get_lifetime_change()})
|
||||
|
||||
func mutate_lifetime(_plant_data: PlantData, lifetime: int) -> int:
|
||||
return lifetime - ceil(0.5 * level)
|
||||
return lifetime - get_lifetime_change()
|
||||
|
||||
func mutate_seed_number(_plant_data: PlantData, seed_number: int):
|
||||
return seed_number + level
|
||||
|
||||
func get_seed_increase() -> int:
|
||||
return floori((level + 1.0) / 2)
|
||||
|
||||
func get_lifetime_change() -> int:
|
||||
return maxi(0, 6 - get_seed_increase())
|
||||
|
||||
@@ -14,8 +14,11 @@ func get_mutation_name() -> String:
|
||||
return tr("PURIFICATION")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("PURIFICATION_EFFECT_TEXT_LEVEL_%d") % level
|
||||
return tr("PURIFICATION_EFFECT_TEXT_LEVEL_%d") % get_purification_radius()
|
||||
|
||||
func _start_maturation_effect(_plant : Plant):
|
||||
print("Implement purification maturation effect")
|
||||
pass
|
||||
|
||||
func get_purification_radius() -> int:
|
||||
return level
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -8,14 +8,17 @@ func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "SOCIAL"
|
||||
return "SOCIABLE"
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return tr("SOCIAL")
|
||||
return tr("SOCIABLE")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("SOCIAL_EFFECT_TEXT_LEVEL_%d") % level
|
||||
return tr("SOCIABLE_EFFECT_TEXT_LEVEL").format({"near_amount": get_near_plants_around()})
|
||||
|
||||
func mutate_score(_plant_data : PlantData, score : int) -> int:
|
||||
printerr("TODO:: implement SOCIAL score based on plants around")
|
||||
func mutate_score(_plant_data: PlantData, score: int) -> int:
|
||||
printerr("TODO:: implement SOCIABLE score based on plants around")
|
||||
return score + level
|
||||
|
||||
func get_near_plants_around():
|
||||
return 5 - level
|
||||
|
||||
@@ -14,10 +14,13 @@ func get_mutation_name() -> String:
|
||||
return tr("TOUGH")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("TOUGH_EFFECT_TEXT_LEVEL_%d") % [3 - level]
|
||||
return tr("TOUGH_EFFECT_TEXT_LEVEL_%d") % get_growing_time_increase()
|
||||
|
||||
func mutate_score_multiplier(_plant_data: PlantData, multiplier: int) -> int:
|
||||
return multiplier + 2
|
||||
return multiplier * 2
|
||||
|
||||
func mutate_growing_time(_plant_data: PlantData, growing_time: int) -> int:
|
||||
return growing_time + maxi(0, 3 - level)
|
||||
return growing_time + get_growing_time_increase()
|
||||
|
||||
func get_growing_time_increase()->int:
|
||||
return maxi(0, 3 - level)
|
||||
|
||||
Reference in New Issue
Block a user