gros dev pre proto
* Changement de l'UI, ajouts de l'inspecteur par carte et changement de police * Ajout d'un semblant d'exploration * Ajout de la sauvegarde des entités * Restructuration mineure de l'arborescence * Fix divers et réécriture des textes
This commit is contained in:
@@ -18,7 +18,7 @@ func get_mutation_description() -> String:
|
||||
func get_day_factor():
|
||||
return max(1, DEFAULT_DAY_FACTOR - level + 1)
|
||||
|
||||
func mutate_score(plant : Plant, score) -> int:
|
||||
if plant.state != Plant.State.MATURE:
|
||||
func mutate_score(plant_state : Plant.State, plant : Plant, score) -> int:
|
||||
if plant_state != Plant.State.MATURE:
|
||||
return score
|
||||
return score + floori(plant.day / get_day_factor())
|
||||
@@ -13,8 +13,10 @@ func get_mutation_name() -> String:
|
||||
func get_mutation_description() -> String:
|
||||
return "When mature, add [b]%d[/b] to the score for each plant of the same species around, but score become 0 if none is around." % level
|
||||
|
||||
func mutate_score(plant : Plant, score) -> int:
|
||||
if plant.state != Plant.State.MATURE:
|
||||
func mutate_score(plant_state : Plant.State, plant : Plant, score) -> int:
|
||||
if plant.influence_zone == null:
|
||||
return score
|
||||
if plant_state != Plant.State.MATURE:
|
||||
return score
|
||||
var plant_count = 0
|
||||
|
||||
|
||||
@@ -2,23 +2,25 @@ extends PlantMutation
|
||||
class_name ErmitMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/seedling-off.svg")
|
||||
return preload("res://common/icons/seedling-off.svg")
|
||||
|
||||
func get_base_rarity() -> int:
|
||||
return 0
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Ermit"
|
||||
return "Ermit"
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "Multiply the score by [b]%d[/b] if no plant is near, but set it to 0 otherwise." % get_score_multiplier()
|
||||
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
|
||||
return level + 1
|
||||
|
||||
func mutate_score(plant : Plant, score) -> int:
|
||||
for area in plant.influence_zone.get_overlapping_areas():
|
||||
if area is Plant and area != plant:
|
||||
return 0
|
||||
func mutate_score(_plant_state : Plant.State, plant : Plant, score) -> int:
|
||||
if plant.influence_zone == null:
|
||||
return score
|
||||
for area in plant.influence_zone.get_overlapping_areas():
|
||||
if area is Plant and area != plant:
|
||||
return 0
|
||||
|
||||
return score * get_score_multiplier()
|
||||
return score * get_score_multiplier()
|
||||
|
||||
@@ -13,5 +13,5 @@ func get_mutation_name() -> String:
|
||||
func get_mutation_description() -> String:
|
||||
return "Add [b]%d[/b] to the score while the plant is growing" % level
|
||||
|
||||
func mutate_score(plant : Plant, score) -> int:
|
||||
return score + (0 if plant.state == Plant.State.MATURE else level)
|
||||
func mutate_score(plant_state : Plant.State, _plant : Plant, score) -> int:
|
||||
return score + (0 if plant_state == Plant.State.MATURE else level)
|
||||
@@ -13,5 +13,5 @@ func get_mutation_name() -> String:
|
||||
func get_mutation_description() -> String:
|
||||
return "Add [b]%d[/b] to the score if the plant is mature." % level
|
||||
|
||||
func mutate_score(plant : Plant, score : int) -> int:
|
||||
return score + (level if plant.state == Plant.State.MATURE else 0)
|
||||
func mutate_score(plant_state : Plant.State, _plant : Plant, score : int) -> int:
|
||||
return score + (level if plant_state == Plant.State.MATURE else 0)
|
||||
@@ -18,8 +18,10 @@ func get_mutation_description() -> String:
|
||||
func get_score_bonus():
|
||||
return (level + 2)
|
||||
|
||||
func mutate_score(plant : Plant, score) -> int:
|
||||
if plant.state != Plant.State.MATURE:
|
||||
func mutate_score(plant_state : Plant.State, plant : Plant, score) -> int:
|
||||
if plant.influence_zone == null:
|
||||
return score
|
||||
if plant_state != Plant.State.MATURE:
|
||||
return score
|
||||
var plant_count = 0
|
||||
|
||||
|
||||
@@ -16,5 +16,5 @@ func get_mutation_description() -> String:
|
||||
func get_score_multiplier():
|
||||
return float(level)/2.
|
||||
|
||||
func mutate_score(_plant : Plant, score: int) -> int:
|
||||
func mutate_score(_plant_state : Plant.State, _plant : Plant, score: int) -> int:
|
||||
return score + roundi(score * get_score_multiplier())
|
||||
Reference in New Issue
Block a user