ajout de 3 nouvelles plantes : ferno, philea et solita #93
@ -26,8 +26,11 @@ func all_plant_types() -> Array[PlantType]:
|
||||
return [
|
||||
preload("res://entities/plants/resources/plant_types/champ.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/chardi.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/ferno.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/maias.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/philea.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/pili.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/solita.tres"),
|
||||
]
|
||||
|
||||
func all_machines() -> Array[MachineType]:
|
||||
|
||||
@ -39,10 +39,10 @@ func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
|
||||
func dig(areas: Array[Area2D], player: Player):
|
||||
for area in areas :
|
||||
if area is Plant:
|
||||
if area and area is Plant:
|
||||
player.play_sfx("harvest")
|
||||
area.harvest()
|
||||
if area is UndergroundLoot:
|
||||
if area and area is UndergroundLoot:
|
||||
player.play_sfx("dig")
|
||||
area.dig()
|
||||
await player.get_tree().create_timer(USE_INTERVAL).timeout
|
||||
|
||||
|
Before Width: | Height: | Size: 96 KiB |
BIN
entities/plants/assets/sprites/ferno/growing.png
Normal file
|
After Width: | Height: | Size: 150 KiB |
40
entities/plants/assets/sprites/ferno/growing.png.import
Normal file
@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ds1nf2876m6bh"
|
||||
path="res://.godot/imported/growing.png-0397882e264ff91cc96e415be3ae1543.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/plants/assets/sprites/ferno/growing.png"
|
||||
dest_files=["res://.godot/imported/growing.png-0397882e264ff91cc96e415be3ae1543.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
entities/plants/assets/sprites/ferno/mature.png
Normal file
|
After Width: | Height: | Size: 111 KiB |
40
entities/plants/assets/sprites/ferno/mature.png.import
Normal file
@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bfj6wji21amgk"
|
||||
path="res://.godot/imported/mature.png-e7dca043959ac892503be612a2dc85b8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/plants/assets/sprites/ferno/mature.png"
|
||||
dest_files=["res://.godot/imported/mature.png-e7dca043959ac892503be612a2dc85b8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
entities/plants/assets/sprites/philea/growing.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
40
entities/plants/assets/sprites/philea/growing.png.import
Normal file
@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dna7x371cs0tu"
|
||||
path="res://.godot/imported/growing.png-6680673773f3b22171cacdd2f4db1f47.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/plants/assets/sprites/philea/growing.png"
|
||||
dest_files=["res://.godot/imported/growing.png-6680673773f3b22171cacdd2f4db1f47.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
entities/plants/assets/sprites/philea/mature.png
Normal file
|
After Width: | Height: | Size: 357 KiB |
@ -2,22 +2,24 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c6vby5r0pfni2"
|
||||
path="res://.godot/imported/default_plant.png-0e29f01fe7666058a9a8c53076d3ea4d.ctex"
|
||||
uid="uid://bj801geprrhfu"
|
||||
path="res://.godot/imported/mature.png-5a510079f351d9ec4d59ef93a0592812.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/plants/assets/sprites/default_plant.png"
|
||||
dest_files=["res://.godot/imported/default_plant.png-0e29f01fe7666058a9a8c53076d3ea4d.ctex"]
|
||||
source_file="res://entities/plants/assets/sprites/philea/mature.png"
|
||||
dest_files=["res://.godot/imported/mature.png-5a510079f351d9ec4d59ef93a0592812.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
@ -25,6 +27,10 @@ mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
BIN
entities/plants/assets/sprites/solita/growing.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
40
entities/plants/assets/sprites/solita/growing.png.import
Normal file
@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c00jac2jlgdfu"
|
||||
path="res://.godot/imported/growing.png-47abe743f83ddd7bdc16b98f9d66692f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/plants/assets/sprites/solita/growing.png"
|
||||
dest_files=["res://.godot/imported/growing.png-47abe743f83ddd7bdc16b98f9d66692f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 169 KiB |
@ -3,21 +3,23 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b3wom2xu26g43"
|
||||
path="res://.godot/imported/default_plant_glowing.png-1922303555901146cff9778bc5fe2dcb.ctex"
|
||||
path="res://.godot/imported/mature.png-834a1cd5820fc22805f96d5019fd7c30.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/plants/assets/sprites/default_plant_glowing.png"
|
||||
dest_files=["res://.godot/imported/default_plant_glowing.png-1922303555901146cff9778bc5fe2dcb.ctex"]
|
||||
source_file="res://entities/plants/assets/sprites/solita/mature.png"
|
||||
dest_files=["res://.godot/imported/mature.png-834a1cd5820fc22805f96d5019fd7c30.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
@ -25,6 +27,10 @@ mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
@ -1,4 +1,4 @@
|
||||
[gd_resource type="Resource" script_class="PlantType" load_steps=10 format=3 uid="uid://cxrc5wchpqm18"]
|
||||
[gd_resource type="Resource" script_class="PlantType" load_steps=9 format=3 uid="uid://cxrc5wchpqm18"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ceqx5va1ormau" path="res://entities/plants/scripts/plant_effects/produce_seeds.gd" id="1_cf34j"]
|
||||
[ext_resource type="Script" uid="uid://jnye5pe1bgqw" path="res://entities/plants/scripts/plant_type.gd" id="1_ipcpv"]
|
||||
@ -11,10 +11,6 @@
|
||||
script = ExtResource("1_cf34j")
|
||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_cf34j"]
|
||||
script = ExtResource("1_cf34j")
|
||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_my6by"]
|
||||
atlas = ExtResource("6_liopn")
|
||||
region = Rect2(610, 315, 124, 180)
|
||||
@ -22,11 +18,10 @@ region = Rect2(610, 315, 124, 180)
|
||||
[resource]
|
||||
script = ExtResource("1_ipcpv")
|
||||
name = "Champ"
|
||||
description = "A cool fluorescent plant. Some say that it has a big network of roots underground."
|
||||
description = "A cool fluorescent mushroom that reproduce very fast."
|
||||
default_growing_time = 3
|
||||
seed_texture = SubResource("AtlasTexture_my6by")
|
||||
growing_texture = ExtResource("2_l2hi3")
|
||||
mature_texture = ExtResource("3_y8qve")
|
||||
default_harvest_effects = Array[ExtResource("1_l2hi3")]([SubResource("Resource_cf34j"), null])
|
||||
default_cyclic_effects = Array[ExtResource("1_l2hi3")]([SubResource("Resource_l2hi3")])
|
||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||
|
||||
@ -24,7 +24,7 @@ region = Rect2(1140, 345, 141, 128)
|
||||
[resource]
|
||||
script = ExtResource("1_moyj3")
|
||||
name = "Chardi"
|
||||
description = "This plant remove a lot of contamination around when it becomes mature."
|
||||
description = "This fern use the bas component of the ground to grow."
|
||||
seed_texture = SubResource("AtlasTexture_qt76e")
|
||||
growing_texture = ExtResource("1_prk5s")
|
||||
mature_texture = ExtResource("3_40c3e")
|
||||
|
||||
33
entities/plants/resources/plant_types/ferno.tres
Normal file
@ -0,0 +1,33 @@
|
||||
[gd_resource type="Resource" script_class="PlantType" load_steps=11 format=3 uid="uid://djap3rggcdf3r"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bpycohqas4hff" path="res://entities/plants/scripts/plant_effect.gd" id="1_srjq6"]
|
||||
[ext_resource type="Script" uid="uid://jnye5pe1bgqw" path="res://entities/plants/scripts/plant_type.gd" id="2_72r72"]
|
||||
[ext_resource type="Script" uid="uid://ceqx5va1ormau" path="res://entities/plants/scripts/plant_effects/produce_seeds.gd" id="2_rb4mq"]
|
||||
[ext_resource type="Script" uid="uid://cgscbuxe4dawb" path="res://entities/plants/scripts/plant_effects/decontaminate_terrain_effect.gd" id="3_s6g12"]
|
||||
[ext_resource type="Texture2D" uid="uid://ds1nf2876m6bh" path="res://entities/plants/assets/sprites/ferno/growing.png" id="4_5qaoo"]
|
||||
[ext_resource type="Texture2D" uid="uid://bfj6wji21amgk" path="res://entities/plants/assets/sprites/ferno/mature.png" id="5_er4cp"]
|
||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="7_0y7r8"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_0ofiq"]
|
||||
script = ExtResource("2_rb4mq")
|
||||
level = 1
|
||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7wddl"]
|
||||
script = ExtResource("3_s6g12")
|
||||
level = 1
|
||||
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g1td4"]
|
||||
atlas = ExtResource("7_0y7r8")
|
||||
region = Rect2(57, 620, 159, 99)
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_72r72")
|
||||
name = "Ferno"
|
||||
description = "This mysterious flower emmit a strong signal in the ground when harvested."
|
||||
seed_texture = SubResource("AtlasTexture_g1td4")
|
||||
growing_texture = ExtResource("4_5qaoo")
|
||||
mature_texture = ExtResource("5_er4cp")
|
||||
default_harvest_effects = Array[ExtResource("1_srjq6")]([SubResource("Resource_0ofiq"), SubResource("Resource_7wddl")])
|
||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||
29
entities/plants/resources/plant_types/philea.tres
Normal file
@ -0,0 +1,29 @@
|
||||
[gd_resource type="Resource" script_class="PlantType" load_steps=9 format=3 uid="uid://dr4omh4gf85hl"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bpycohqas4hff" path="res://entities/plants/scripts/plant_effect.gd" id="1_mi4ef"]
|
||||
[ext_resource type="Script" uid="uid://ceqx5va1ormau" path="res://entities/plants/scripts/plant_effects/produce_seeds.gd" id="2_jyjjp"]
|
||||
[ext_resource type="Script" uid="uid://jnye5pe1bgqw" path="res://entities/plants/scripts/plant_type.gd" id="2_lqh06"]
|
||||
[ext_resource type="Texture2D" uid="uid://dna7x371cs0tu" path="res://entities/plants/assets/sprites/philea/growing.png" id="3_n0hvm"]
|
||||
[ext_resource type="Texture2D" uid="uid://bj801geprrhfu" path="res://entities/plants/assets/sprites/philea/mature.png" id="4_cafy4"]
|
||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_oaspo"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_0x8ki"]
|
||||
script = ExtResource("2_jyjjp")
|
||||
level = 1
|
||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ogrgq"]
|
||||
atlas = ExtResource("6_oaspo")
|
||||
region = Rect2(322, 598, 159, 136)
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_lqh06")
|
||||
name = "Philea"
|
||||
description = "A very cool shurb that glow in the night."
|
||||
default_growing_time = 5
|
||||
default_plant_score = 3
|
||||
seed_texture = SubResource("AtlasTexture_ogrgq")
|
||||
growing_texture = ExtResource("3_n0hvm")
|
||||
mature_texture = ExtResource("4_cafy4")
|
||||
default_mature_effects = Array[ExtResource("1_mi4ef")]([SubResource("Resource_0x8ki")])
|
||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||
@ -24,9 +24,8 @@ region = Rect2(1415, 91, 149, 102)
|
||||
[resource]
|
||||
script = ExtResource("1_vn146")
|
||||
name = "Pili"
|
||||
description = "Pili slowly decontaminate each day when mature. Effect end in four days."
|
||||
default_growing_time = 4
|
||||
default_plant_score = 2
|
||||
description = "This cool plant produce softs and warms blue flames."
|
||||
default_growing_time = 3
|
||||
seed_texture = SubResource("AtlasTexture_kidty")
|
||||
growing_texture = ExtResource("2_k4b1k")
|
||||
mature_texture = ExtResource("3_8fstu")
|
||||
|
||||
29
entities/plants/resources/plant_types/solita.tres
Normal file
@ -0,0 +1,29 @@
|
||||
[gd_resource type="Resource" script_class="PlantType" load_steps=9 format=3 uid="uid://cuk3hl5tkjhmg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bpycohqas4hff" path="res://entities/plants/scripts/plant_effect.gd" id="1_mksys"]
|
||||
[ext_resource type="Script" uid="uid://ceqx5va1ormau" path="res://entities/plants/scripts/plant_effects/produce_seeds.gd" id="2_1q5bp"]
|
||||
[ext_resource type="Script" uid="uid://jnye5pe1bgqw" path="res://entities/plants/scripts/plant_type.gd" id="2_x4nie"]
|
||||
[ext_resource type="Texture2D" uid="uid://c00jac2jlgdfu" path="res://entities/plants/assets/sprites/solita/growing.png" id="3_j4n5p"]
|
||||
[ext_resource type="Texture2D" uid="uid://b3wom2xu26g43" path="res://entities/plants/assets/sprites/solita/mature.png" id="4_njidq"]
|
||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_yn0yu"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_3fdsj"]
|
||||
script = ExtResource("2_1q5bp")
|
||||
level = 1
|
||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_auuc2"]
|
||||
atlas = ExtResource("6_yn0yu")
|
||||
region = Rect2(335, 74, 134, 142)
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_x4nie")
|
||||
name = "Solita"
|
||||
description = "A magnificient flower that reflect the light of nearest star."
|
||||
default_growing_time = 3
|
||||
default_plant_score = 2
|
||||
seed_texture = SubResource("AtlasTexture_auuc2")
|
||||
growing_texture = ExtResource("3_j4n5p")
|
||||
mature_texture = ExtResource("4_njidq")
|
||||
default_harvest_effects = Array[ExtResource("1_mksys")]([SubResource("Resource_3fdsj")])
|
||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||
@ -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)
|
||||