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:
2026-04-17 17:32:58 +02:00
parent 563e16eabf
commit 7ae362a3a5
78 changed files with 1674 additions and 262 deletions

View File

@@ -113,12 +113,14 @@ fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(1, 0.5)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6w4e0"]
radius = 38.0
height = 80.0
radius = 29.70824
height = 62.292908
[node name="Door" type="Area2D" unique_id=2053096538]
process_mode = 4
script = ExtResource("1_8kdwv")
icon = ExtResource("2_6w4e0")
default_interact_text = "ENTER"
available = false
metadata/_custom_type_script = "uid://dyprcd68fjstf"

View File

@@ -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)

View File

@@ -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 )

View File

@@ -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

View File

@@ -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)]

View File

@@ -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

View File

@@ -1 +0,0 @@
uid://bmo42h1p554nv

View File

@@ -39,6 +39,7 @@ func add_item(item: Item) -> bool:
func add_tool(tool: Item) -> bool:
if not has_item_with_name(tool.get_item_name()):
tools.append(tool)
current_item_ind += 1
updated.emit(self)
tool_added.emit(tool)
return true

View File

@@ -7,8 +7,6 @@ const SHOVEL_ICON = preload("res://common/icons/shovel.svg")
const GROWING_ICON = preload("res://common/icons/chevrons-up.svg")
const SCORE_ICON = preload("res://common/icons/growth.svg")
const RARITY_POOL : Array[int] = [0,0,0,0,0,0,0,1,1,1]
@export var plant_name : String
@export var plant_mutations: Array[PlantMutation]
@export var random_seed : int
@@ -29,15 +27,15 @@ static func generate_from_parent(plant_data : PlantData) -> Seed:
mutate_mutations(plant_data)
)
else :
return Seed.new(
return Seed.new(
plant_data.plant_name,
plant_data.mutations.duplicate_deep()
)
static func generate_random() -> Seed:
static func generate_random(rarity := 0) -> Seed:
var new_seed = Seed.new(
Random.generate_random_word(),
[generate_first_mutation()]
[generate_first_mutation(rarity)]
)
return new_seed
@@ -134,8 +132,7 @@ func get_particles() -> Array[EffectParticles.Parameters]:
return param
static func generate_first_mutation() -> PlantMutation:
var rarity : int = RARITY_POOL.pick_random()
static func generate_first_mutation(rarity := 0) -> PlantMutation:
var possible_mutation : PlantMutation = GameInfo.game_data.progression_data.available_mutations.filter(
func (m : PlantMutation): return m.get_base_rarity() <= rarity

View File

@@ -20,7 +20,7 @@ func get_artefacts() -> Array[Artefact]:
return GameInfo.game_data.current_run.artefacts
return []
func _on_artefacts_updated(artefacts : Array[Artefact]):
func update_with_artefacts(artefacts : Array[Artefact]):
inventory.seeds_size = calculate_inventory_size(artefacts)
max_energy = calculate_max_energy(artefacts)
updated.emit()