Et toujours du dev pour la béta
* Evolution de l'histoire avec de nouveaux dialogues, une plus grande durée de vie du jeu, des nouvelles zones d'histoire... * Suppression du mode infini * Ajout d'un écran des mutations découvertes * Ajout d'un nouveau mécanisme de respawn situé dans le vaissau * Ajout de 2 nouveaux modificateurs de région * Quatre nouveaux artefacts * Visuel de la décontamination de la planète 3D en cours de la partie * Ajout d'une annonce visuelle des scène du jeu * Fix sur la mutation Généreux pour être en accord avec sa description * Amélioration de l'effet de la mutation Purification * Fix de la mutation sociale aux niveau supérieurs * Ajout d'un effet visuel de réacteur sur le joueur 3D * Fix sur l'annonce de nouveaux objets qui se déclenchaient à une nouvelle run * Amélioration des animation et des informations données dans le vaisseau * Correction mineure des traductions
This commit is contained in:
@@ -20,6 +20,8 @@ func current_is_tool() -> bool:
|
||||
return current_item_ind <= len(tools)
|
||||
|
||||
func set_current_item(new_ind: int):
|
||||
if new_ind < 0:
|
||||
new_ind += (len(tools) + len(seeds))
|
||||
if new_ind != current_item_ind:
|
||||
current_item_ind = new_ind % (len(tools) + len(seeds))
|
||||
updated.emit(self)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
extends Item
|
||||
class_name Seed
|
||||
|
||||
const MUTATION_PROBABILITY = 0.3
|
||||
|
||||
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")
|
||||
@@ -21,10 +19,18 @@ func _init(
|
||||
random_seed = randi()
|
||||
|
||||
static func generate_from_parent(plant_data : PlantData) -> Seed:
|
||||
if randf() < MUTATION_PROBABILITY:
|
||||
var mutations : Array[PlantMutation] = plant_data.mutations
|
||||
var mutation_probability = GameInfo.game_data.current_run.plant_info.get_mutation_probability()
|
||||
|
||||
# Mutate for every time mutation probability exceed 1
|
||||
while mutation_probability > 1:
|
||||
mutations = mutate_mutations(plant_data.mutations)
|
||||
mutation_probability -= 1
|
||||
|
||||
if randf() < GameInfo.game_data.current_run.plant_info.get_mutation_probability():
|
||||
return Seed.new(
|
||||
plant_data.plant_name,
|
||||
mutate_mutations(plant_data)
|
||||
mutate_mutations(mutations)
|
||||
)
|
||||
else :
|
||||
return Seed.new(
|
||||
@@ -144,19 +150,19 @@ static func generate_first_mutation(rarity := 0) -> PlantMutation:
|
||||
|
||||
return possible_mutation
|
||||
|
||||
static func mutate_mutations(parent : PlantData) -> Array[PlantMutation]:
|
||||
static func mutate_mutations(mutations : Array[PlantMutation]) -> Array[PlantMutation]:
|
||||
|
||||
var mutation_possibility : Array[MutationPossibility] = [
|
||||
AddMutation.new()
|
||||
]
|
||||
|
||||
if (
|
||||
len(parent.mutations) >= GameInfo.game_data.progression_data.max_mutations_by_plant
|
||||
len(mutations) >= GameInfo.game_data.current_run.plant_info.get_mutation_max_number()
|
||||
):
|
||||
mutation_possibility = [
|
||||
UpgradeMutation.new(),
|
||||
]
|
||||
elif len(parent.mutations) > 0:
|
||||
elif len(mutations) > 0:
|
||||
mutation_possibility = [
|
||||
AddMutation.new(),
|
||||
UpgradeMutation.new(),
|
||||
@@ -164,20 +170,20 @@ static func mutate_mutations(parent : PlantData) -> Array[PlantMutation]:
|
||||
|
||||
var chosen_mutation_possibility = mutation_possibility.pick_random()
|
||||
|
||||
return chosen_mutation_possibility.mutate(parent)
|
||||
return chosen_mutation_possibility.mutate(mutations)
|
||||
|
||||
class MutationPossibility:
|
||||
func mutate(_parent : PlantData)-> Array[PlantMutation]:
|
||||
func mutate(_mutations : Array[PlantMutation])-> Array[PlantMutation]:
|
||||
return []
|
||||
|
||||
class AddMutation extends MutationPossibility:
|
||||
func mutate(parent : PlantData)-> Array[PlantMutation]:
|
||||
var new_mutations = parent.mutations.duplicate_deep()
|
||||
func mutate(mutations : Array[PlantMutation])-> Array[PlantMutation]:
|
||||
var new_mutations = mutations.duplicate_deep()
|
||||
var possible_new_mutations = GameInfo.game_data.progression_data.available_mutations.duplicate_deep()
|
||||
|
||||
possible_new_mutations = possible_new_mutations.filter(
|
||||
func (m : PlantMutation):
|
||||
return parent.mutations.find_custom(func(m2: PlantMutation): return m2.name == m.name) == -1
|
||||
return mutations.find_custom(func(m2: PlantMutation): return m2.name == m.name) == -1
|
||||
)
|
||||
|
||||
if len(possible_new_mutations):
|
||||
@@ -187,17 +193,17 @@ class AddMutation extends MutationPossibility:
|
||||
|
||||
class UpgradeMutation extends MutationPossibility:
|
||||
func mutate(
|
||||
parent : PlantData
|
||||
mutations : Array[PlantMutation]
|
||||
) -> Array[PlantMutation]:
|
||||
var new_mutations = parent.mutations.duplicate_deep()
|
||||
var new_mutations = mutations.duplicate_deep()
|
||||
|
||||
new_mutations.pick_random().level += 1
|
||||
|
||||
return new_mutations
|
||||
|
||||
class RemoveMutation extends MutationPossibility:
|
||||
func mutate(parent : PlantData)-> Array[PlantMutation]:
|
||||
var new_mutations = parent.mutations.duplicate_deep()
|
||||
func mutate(mutations : Array[PlantMutation])-> Array[PlantMutation]:
|
||||
var new_mutations = mutations.duplicate_deep()
|
||||
|
||||
var mut_to_remove = new_mutations.pick_random()
|
||||
if mut_to_remove.level > 1:
|
||||
|
||||
@@ -32,5 +32,5 @@ func use_text() -> String:
|
||||
return tr("SHIP_TELEPORT_USE_TEXT")
|
||||
|
||||
func use(_player : Player, _zone: Player.ActionZone):
|
||||
SceneManager.change_to_scene_id('COCKPIT')
|
||||
SceneManager.change_to_scene(CockpitScene.new())
|
||||
AudioManager.play_sfx("Teleportation")
|
||||
@@ -33,7 +33,7 @@ func _init(region : Region, pos : Vector2):
|
||||
signals.append(
|
||||
DetectorSignalIndividual.new(
|
||||
(pos - e.global_position).normalized().angle(),
|
||||
(e as Door).icon,
|
||||
(e as Door).to_scene.get_scene_icon(),
|
||||
Color("ffa617ff")
|
||||
),
|
||||
)
|
||||
|
||||
@@ -135,6 +135,79 @@ tracks/0/keys = {
|
||||
"update": 0,
|
||||
"values": [Vector2(0.99999994, -17)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("PlayerSprite:modulate:a")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [1.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("PlayerSprite/CPUParticles2D:emitting")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/3/type = "bezier"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("PlayerSprite:position:y")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(-17, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_qiwj3"]
|
||||
resource_name = "fall"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("PlayerSprite:modulate:a")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0.1, 0.43333334, 1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 1.0, 1.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("PlayerSprite/CPUParticles2D:emitting")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0.56666666, 0.7),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true]
|
||||
}
|
||||
tracks/2/type = "bezier"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("PlayerSprite:position:y")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 2, 1, 2),
|
||||
"points": PackedFloat32Array(-181, -0.25, 0, 0.36666667, 89, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -17, -0.16666669, -18, 0, 0),
|
||||
"times": PackedFloat32Array(0.1, 0.5, 0.6666667, 1)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_8fjmc"]
|
||||
resource_name = "float"
|
||||
@@ -156,6 +229,7 @@ tracks/0/keys = {
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qiwj3"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_fkugw"),
|
||||
&"fall": SubResource("Animation_qiwj3"),
|
||||
&"float": SubResource("Animation_8fjmc")
|
||||
}
|
||||
|
||||
@@ -213,6 +287,6 @@ stream = ExtResource("7_qiwj3")
|
||||
volume_db = -3.0
|
||||
bus = &"Sfx"
|
||||
|
||||
[node name="FloatAnimationPlayer" type="AnimationPlayer" parent="." unique_id=793749564]
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=793749564]
|
||||
unique_name_in_owner = true
|
||||
libraries/ = SubResource("AnimationLibrary_qiwj3")
|
||||
autoplay = &"float"
|
||||
|
||||
@@ -17,7 +17,7 @@ var region : Region :
|
||||
var data : PlayerData
|
||||
var last_action_area_movement_timer : float = 100.
|
||||
|
||||
var controlling_player : bool = true :
|
||||
var controlling_player : bool = false :
|
||||
set(v):
|
||||
controlling_player = v
|
||||
velocity = Vector2.ZERO
|
||||
@@ -34,6 +34,13 @@ func _ready():
|
||||
Pointer.player = self
|
||||
setup_preview_zone(data.inventory.get_item())
|
||||
|
||||
func appear(with_falling_animation = true):
|
||||
if with_falling_animation:
|
||||
%AnimationPlayer.play("fall")
|
||||
await %AnimationPlayer.animation_finished
|
||||
controlling_player = true
|
||||
%AnimationPlayer.play("float")
|
||||
|
||||
func _input(_event) -> void:
|
||||
if Input.is_action_pressed("change_item_left"):
|
||||
data.inventory.change_current_item(1)
|
||||
|
||||
Reference in New Issue
Block a user