ajout de 3 nouvelles plantes : ferno, philea et solita #93
This commit is contained in:
@@ -17,7 +17,7 @@ func mutate_score(plant : Plant, score) -> int:
|
||||
var plant_count = 0
|
||||
|
||||
for area in plant.influence_zone.get_overlapping_areas():
|
||||
if area is Plant and area.plant_type.name == plant.plant_type.name:
|
||||
if area is Plant and area != plant and area.plant_type.name == plant.plant_type.name:
|
||||
plant_count += 1
|
||||
|
||||
if plant_count == 0:
|
||||
|
||||
@@ -11,11 +11,14 @@ func get_mutation_name() -> String:
|
||||
return "Ermit"
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "Multiply the score by %d if no plant is near, but set it to 0 otherwise." % level
|
||||
return "Multiply the score by [b]%d[/b] if no plant is near, but set it to 0 otherwise." % get_score_multiplier()
|
||||
|
||||
func get_score_multiplier():
|
||||
return level + 1
|
||||
|
||||
func mutate_score(plant : Plant, score) -> int:
|
||||
for area in plant.influence_zone.get_overlapping_areas():
|
||||
if area is Plant:
|
||||
if area is Plant and area != plant:
|
||||
return 0
|
||||
|
||||
return score * 2
|
||||
return score * get_score_multiplier()
|
||||
@@ -22,7 +22,7 @@ func mutate_score(plant : Plant, score) -> int:
|
||||
var plant_count = 0
|
||||
|
||||
for area in plant.influence_zone.get_overlapping_areas():
|
||||
if area is Plant:
|
||||
if area is Plant and area != plant :
|
||||
plant_count += 1
|
||||
|
||||
return score + (get_score_bonus() if plant_count >= NEAR_PLANT_NEEDED else 0)
|
||||
Reference in New Issue
Block a user