game: add enemy mods
This commit is contained in:
@@ -24,7 +24,7 @@ const GROUP_XP_ORB = "xp_orb"
|
||||
const GROUP_PICKUP = "pickup"
|
||||
const GROUP_PROJ_MANAGER = "proj_manager"
|
||||
|
||||
enum ModRarity { LEGENDARY, EPIC, RARE, NORMAL }
|
||||
enum Rarity { LEGENDARY, EPIC, RARE, NORMAL }
|
||||
|
||||
const placeholder_tex = preload("res://assets/sprites/64x64_placeholder.tres")
|
||||
|
||||
@@ -32,7 +32,7 @@ var MOD_CHOICES = [
|
||||
{
|
||||
"internal_name": "flat_health_small",
|
||||
"name": "+10 Health",
|
||||
"rarity": ModRarity.NORMAL,
|
||||
"rarity": Rarity.NORMAL,
|
||||
"tex": placeholder_tex,
|
||||
"description": "Adds 10 flat health.",
|
||||
"weight": 100,
|
||||
@@ -43,7 +43,7 @@ var MOD_CHOICES = [
|
||||
{
|
||||
"internal_name": "flat_health_med",
|
||||
"name": "+25 Health",
|
||||
"rarity": ModRarity.RARE,
|
||||
"rarity": Rarity.RARE,
|
||||
"tex": placeholder_tex,
|
||||
"description": "Adds 25 flat health.",
|
||||
"weight": 50,
|
||||
@@ -54,7 +54,7 @@ var MOD_CHOICES = [
|
||||
{
|
||||
"internal_name": "flat_health_large",
|
||||
"name": "+50 Health",
|
||||
"rarity": ModRarity.EPIC,
|
||||
"rarity": Rarity.EPIC,
|
||||
"tex": placeholder_tex,
|
||||
"description": "Adds 50 flat health.",
|
||||
"weight": 10,
|
||||
@@ -65,7 +65,7 @@ var MOD_CHOICES = [
|
||||
{
|
||||
"internal_name": "flat_crit_small",
|
||||
"name": "2.5% More Critical Chance",
|
||||
"rarity": ModRarity.RARE,
|
||||
"rarity": Rarity.RARE,
|
||||
"tex": placeholder_tex,
|
||||
"description": "Gives 2.5% more base critical hit chance",
|
||||
"weight": 50,
|
||||
@@ -76,7 +76,7 @@ var MOD_CHOICES = [
|
||||
{
|
||||
"internal_name": "flat_crit_large",
|
||||
"name": "5% More Critical Chance",
|
||||
"rarity": ModRarity.EPIC,
|
||||
"rarity": Rarity.EPIC,
|
||||
"tex": placeholder_tex,
|
||||
"description": "Gives 5% more base critical hit chance",
|
||||
"weight": 10,
|
||||
@@ -87,6 +87,17 @@ var MOD_CHOICES = [
|
||||
]
|
||||
|
||||
|
||||
func rarity_to_color(rarity: Rarity) -> Color:
|
||||
match rarity:
|
||||
Rarity.RARE:
|
||||
return Color.YELLOW
|
||||
Rarity.EPIC:
|
||||
return Color.BLUE_VIOLET
|
||||
Rarity.LEGENDARY:
|
||||
return Color.DARK_ORANGE
|
||||
return Color.WHITE
|
||||
|
||||
|
||||
func _draw_random_choice(fortune: float = 1.0) -> Dictionary:
|
||||
var total_weight: int = 0
|
||||
for choice in MOD_CHOICES:
|
||||
|
Reference in New Issue
Block a user