ajout de la porte et équilibrage des mutations
This commit is contained in:
@@ -2,10 +2,7 @@ extends PlantMutation
|
||||
class_name QuickMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/chevrons-up.svg")
|
||||
|
||||
func get_base_rarity() -> int:
|
||||
return 0
|
||||
return preload("res://common/icons/hourglass-empty.svg")
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "QUICK"
|
||||
@@ -16,14 +13,17 @@ func get_mutation_name() -> String:
|
||||
func get_mutation_description() -> String:
|
||||
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:
|
||||
if not plant_data.is_mature():
|
||||
return score
|
||||
|
||||
return score + level
|
||||
|
||||
func mutate_lifetime(_plant_data: PlantData, lifetime: int) -> int:
|
||||
return max(lifetime - level, 1)
|
||||
return max(1, lifetime-get_lifetime_decrease())
|
||||
|
||||
func get_score_increase() -> int:
|
||||
return floori((level + 1.0) / 2)
|
||||
return level * 2
|
||||
|
||||
func get_lifetime_decrease() -> int:
|
||||
return maxi(0, 6 - get_score_increase())
|
||||
return 3
|
||||
|
||||
Reference in New Issue
Block a user