Encore du dev pour la béta 1
* Suppression de la mutation éphémère * Ajout des modificateur de régions normaux Sableux et Toxique * Ajout de modificateurs challenge (Rocheux, Radioactif et Contaminé) * Ajout du modificateur de région bénéfique Résonnance * Ajout d'un distributeur toutes les 3 régions * Ajout des régions challenge * Bouclage sur les couleurs des mutations après le niveau 4 * Ajout de deux nouveaux panneaux de tutoriel, un sur les informations de plantes et l'autre sur le vaisseau
This commit is contained in:
@@ -2,7 +2,6 @@ extends InspectableEntity
|
||||
class_name Plant
|
||||
|
||||
const PLANT_AREA_RADIUS = 20
|
||||
const PLANT_INFLUENCE_RADIUS = 100
|
||||
const HARVESTED_SEED_DISPLACEMENT_FACTOR = 100
|
||||
|
||||
const RANDOM_MAX_GROW_INTERVAL = Region.MIN_PASS_DAY_ANIMATION_TIME/2. - 0.1
|
||||
@@ -76,7 +75,7 @@ func generate_collision_shape() -> CollisionShape2D:
|
||||
return collision
|
||||
|
||||
func generate_influence_zone() -> PlantInfluenceZone:
|
||||
var zone = PlantInfluenceZone.new(PLANT_INFLUENCE_RADIUS)
|
||||
var zone = PlantInfluenceZone.new(data.get_influence_radius())
|
||||
|
||||
add_child(zone)
|
||||
|
||||
|
||||
@@ -113,6 +113,9 @@ func get_seed_random_loose():
|
||||
|
||||
return seed_random_loose
|
||||
|
||||
func get_influence_radius():
|
||||
return get_plant_info().get_influence_radius()
|
||||
|
||||
func get_random_seed_income():
|
||||
return max(
|
||||
get_seed_number() - randi_range(0, get_seed_random_loose()),
|
||||
@@ -142,6 +145,7 @@ func get_score_buff() -> int:
|
||||
buff = m.mutate_score_buff(self, buff)
|
||||
|
||||
return buff
|
||||
|
||||
|
||||
func disappear():
|
||||
disappeared.emit(self )
|
||||
|
||||
@@ -16,7 +16,7 @@ func _init(_radius = 100):
|
||||
func _ready():
|
||||
sprite = Circle.new()
|
||||
# sprite.z_index = 100
|
||||
sprite.radius = 100
|
||||
sprite.radius = radius
|
||||
sprite.fill = false
|
||||
sprite.width = 1
|
||||
sprite.opacity = 0.5
|
||||
|
||||
@@ -110,4 +110,4 @@ static func get_rarity_color(rarity: int) -> Color:
|
||||
Color("FFA617"),
|
||||
]
|
||||
|
||||
return rarity_colors[min(rarity, len(rarity_colors) - 1)]
|
||||
return rarity_colors[min(rarity, len(rarity_colors) - 1)%len(rarity_colors)]
|
||||
@@ -1,33 +0,0 @@
|
||||
extends PlantMutation
|
||||
class_name EphemeralMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/butterfly.svg")
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "EPHEMERAL"
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return tr("EPHEMERAL")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("EPHEMERAL_EFFECT_TEXT").format({
|
||||
"seed_number": level,
|
||||
"seed_icon": Text.bbcode_icon(Plant.SEED_ICON),
|
||||
"lifetime_change": get_lifetime_change(),
|
||||
"lifetime_icon": Text.bbcode_icon(Plant.LIFETIME_ICON),
|
||||
})
|
||||
|
||||
func mutate_lifetime(_plant_data: PlantData, lifetime: int) -> int:
|
||||
return lifetime + get_lifetime_change()
|
||||
|
||||
func mutate_seed_number(plant_data: PlantData, seed_number: int):
|
||||
if plant_data.get_state() == PlantData.State.MATURE:
|
||||
return seed_number + level + 1
|
||||
return seed_number
|
||||
|
||||
func get_seed_increase() -> int:
|
||||
return floori((level + 1.0) / 2)
|
||||
|
||||
func get_lifetime_change() -> int:
|
||||
return -1
|
||||
@@ -1 +0,0 @@
|
||||
uid://bmo42h1p554nv
|
||||
Reference in New Issue
Block a user