ajout de la porte et équilibrage des mutations

This commit is contained in:
2026-03-06 18:15:10 +01:00
parent 263f6c42a7
commit 2cd16acd6a
92 changed files with 1420 additions and 582 deletions

View File

@@ -1,11 +1,10 @@
extends PlantMutation
class_name SocialMutation
func get_icon() -> Texture:
return preload("res://common/icons/chevrons-up.svg")
const DEFAULT_PLANT_BY_POINT = 4
func get_base_rarity() -> int:
return 0
func get_icon() -> Texture:
return preload("res://common/icons/users-group.svg")
func get_mutation_id() -> String:
return "SOCIABLE"
@@ -14,11 +13,21 @@ func get_mutation_name() -> String:
return tr("SOCIABLE")
func get_mutation_description() -> String:
return tr("SOCIABLE_EFFECT_TEXT_LEVEL").format({"near_amount": get_near_plants_around()})
return tr("SOCIABLE_EFFECT_TEXT_LEVEL").format(
{
"near_amount": get_near_plants_around(),
"score_increase": get_score_increase()
}
)
func mutate_score(_plant_data: PlantData, score: int) -> int:
printerr("TODO:: implement SOCIABLE score based on plants around")
return score + level
func mutate_score(plant_data: PlantData, score: int) -> int:
if plant_data.get_state() != PlantData.State.MATURE:
return score
return score + get_score_increase() * floori(len(plant_data.nearby_plants)/get_near_plants_around())
func get_near_plants_around():
return 5 - level
return max(DEFAULT_PLANT_BY_POINT - level,1)
func get_score_increase():
return max(level - DEFAULT_PLANT_BY_POINT,1)