plant tester + shado assets
This commit is contained in:
23
entities/plants/scripts/plant_mutation/ephemeral_mutation.gd
Normal file
23
entities/plants/scripts/plant_mutation/ephemeral_mutation.gd
Normal file
@@ -0,0 +1,23 @@
|
||||
extends PlantMutation
|
||||
class_name EphemeralMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/chevrons-up.svg")
|
||||
|
||||
func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
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_LEVEL_%d") % level
|
||||
|
||||
func mutate_lifetime(_plant_data: PlantData, lifetime: int) -> int:
|
||||
return lifetime - ceil(0.5 * level)
|
||||
|
||||
func mutate_seed_number(_plant_data: PlantData, seed_number: int):
|
||||
return seed_number + level
|
||||
@@ -0,0 +1 @@
|
||||
uid://bmo42h1p554nv
|
||||
21
entities/plants/scripts/plant_mutation/fertile_mutation.gd
Normal file
21
entities/plants/scripts/plant_mutation/fertile_mutation.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
extends PlantMutation
|
||||
class_name FertileMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/chevrons-up.svg")
|
||||
|
||||
func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "FERTILE"
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return tr("FERTILE")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("FERTILE_EFFECT_TEXT_LEVEL_%d") % level
|
||||
|
||||
func mutate_lifetime(_plant_data : PlantData, lifetime : int) -> int:
|
||||
print("TODO:: Implemnt FERTILE lifetime based on plants around")
|
||||
return lifetime + level
|
||||
@@ -0,0 +1 @@
|
||||
uid://eslsw42a0ylv
|
||||
@@ -0,0 +1,21 @@
|
||||
extends PlantMutation
|
||||
class_name PurificationMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/chevrons-up.svg")
|
||||
|
||||
func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "PURIFICATION"
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return tr("PURIFICATION")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("PURIFICATION_EFFECT_TEXT_LEVEL_%d") % level
|
||||
|
||||
func _start_maturation_effect(_plant : Plant):
|
||||
print("Implement purification maturation effect")
|
||||
pass
|
||||
@@ -0,0 +1 @@
|
||||
uid://buwy5v4yi3piv
|
||||
@@ -16,5 +16,8 @@ func get_mutation_name() -> String:
|
||||
func get_mutation_description() -> String:
|
||||
return tr("QUICK_EFFECT_TEXT_LEVEL_%d") % level
|
||||
|
||||
func mutate_score(_plant_data : PlantData, score : int) -> int:
|
||||
return score + level
|
||||
|
||||
func mutate_growing_time(_data : PlantData, grow_time : int) -> int:
|
||||
return max(grow_time - level, 0)
|
||||
return max(grow_time - level, 1)
|
||||
|
||||
21
entities/plants/scripts/plant_mutation/social_mutation.gd
Normal file
21
entities/plants/scripts/plant_mutation/social_mutation.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
extends PlantMutation
|
||||
class_name SocialMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/chevrons-up.svg")
|
||||
|
||||
func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "SOCIAL"
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return tr("SOCIAL")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("SOCIAL_EFFECT_TEXT_LEVEL_%d") % level
|
||||
|
||||
func mutate_score(_plant_data : PlantData, score : int) -> int:
|
||||
printerr("TODO:: implement SOCIAL score based on plants around")
|
||||
return score + level
|
||||
@@ -0,0 +1 @@
|
||||
uid://bhej2wpdfveu5
|
||||
23
entities/plants/scripts/plant_mutation/tough_mutation.gd
Normal file
23
entities/plants/scripts/plant_mutation/tough_mutation.gd
Normal file
@@ -0,0 +1,23 @@
|
||||
extends PlantMutation
|
||||
class_name ToughMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/chevrons-up.svg")
|
||||
|
||||
func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "TOUGH"
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return tr("TOUGH")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("TOUGH_EFFECT_TEXT_LEVEL_%d") % level
|
||||
|
||||
func mutate_score_multiplier(_plant_data: PlantData, multiplier: int) -> int:
|
||||
return multiplier + 2
|
||||
|
||||
func mutate_growing_time(_plant_data: PlantData, growing_time: int) -> int:
|
||||
return growing_time + maxi(0, 3 - level)
|
||||
@@ -0,0 +1 @@
|
||||
uid://bwsnyirytbnqj
|
||||
Reference in New Issue
Block a user