From 74a0c9caa39bbe7025016deeaa544d51f8a43a5a Mon Sep 17 00:00:00 2001 From: Michal Sroczynski Date: Tue, 25 Jul 2023 20:03:56 +0200 Subject: [PATCH] Revert "Potions fixes" This reverts commit 1a52c4d24dc6b131274eeffc01c45d18d778dd07. --- assets/common/loot_tables/consumable/good.ron | 14 ++++++++++++++ assets/common/loot_tables/consumable/moderate.ron | 14 ++++++++++++++ .../{consumable.ron => consumable/poor.ron} | 6 +++--- assets/common/loot_tables/dungeon/adlet/chest.ron | 2 +- .../common/loot_tables/dungeon/gnarling/chest.ron | 2 +- .../loot_tables/dungeon/gnarling/woodgolem.ron | 2 +- assets/common/loot_tables/dungeon/tier-2/chest.ron | 2 +- assets/common/loot_tables/dungeon/tier-2/enemy.ron | 9 +++++---- assets/common/loot_tables/dungeon/tier-3/chest.ron | 2 +- assets/common/loot_tables/dungeon/tier-3/enemy.ron | 7 ++++--- assets/common/loot_tables/dungeon/tier-4/chest.ron | 2 +- .../common/loot_tables/dungeon/tier-4/miniboss.ron | 2 +- assets/common/loot_tables/dungeon/tier-5/chest.ron | 2 +- .../common/loot_tables/dungeon/tier-5/miniboss.ron | 2 +- common/src/states/dash_melee.rs | 2 +- 15 files changed, 50 insertions(+), 20 deletions(-) create mode 100644 assets/common/loot_tables/consumable/good.ron create mode 100644 assets/common/loot_tables/consumable/moderate.ron rename assets/common/loot_tables/{consumable.ron => consumable/poor.ron} (69%) diff --git a/assets/common/loot_tables/consumable/good.ron b/assets/common/loot_tables/consumable/good.ron new file mode 100644 index 0000000000..fd77244152 --- /dev/null +++ b/assets/common/loot_tables/consumable/good.ron @@ -0,0 +1,14 @@ +[ + // Fireworks + (0.1, Item("common.items.utility.firework_blue")), + (0.1, Item("common.items.utility.firework_green")), + (0.1, Item("common.items.utility.firework_purple")), + (0.1, Item("common.items.utility.firework_red")), + (0.1, Item("common.items.utility.firework_white")), + (0.1, Item("common.items.utility.firework_yellow")), + // Potions + (10.0, MultiDrop(Item("common.items.consumable.potion_big"), 2, 5)), + // Misc + (2.0, MultiDrop(Item("common.items.utility.collar"), 2, 3)), + (2.0, MultiDrop(Item("common.items.utility.bomb"), 8, 10)), +] \ No newline at end of file diff --git a/assets/common/loot_tables/consumable/moderate.ron b/assets/common/loot_tables/consumable/moderate.ron new file mode 100644 index 0000000000..882b43cbb0 --- /dev/null +++ b/assets/common/loot_tables/consumable/moderate.ron @@ -0,0 +1,14 @@ +[ + // Fireworks + (0.1, Item("common.items.utility.firework_blue")), + (0.1, Item("common.items.utility.firework_green")), + (0.1, Item("common.items.utility.firework_purple")), + (0.1, Item("common.items.utility.firework_red")), + (0.1, Item("common.items.utility.firework_white")), + (0.1, Item("common.items.utility.firework_yellow")), + // Potions + (10.0, MultiDrop(Item("common.items.consumable.potion_med"), 2, 5)), + // Misc + (2.0, MultiDrop(Item("common.items.utility.collar"), 1, 2)), + (2.0, MultiDrop(Item("common.items.utility.bomb"), 3, 5)), +] \ No newline at end of file diff --git a/assets/common/loot_tables/consumable.ron b/assets/common/loot_tables/consumable/poor.ron similarity index 69% rename from assets/common/loot_tables/consumable.ron rename to assets/common/loot_tables/consumable/poor.ron index 61b27a32b6..d222d9a561 100644 --- a/assets/common/loot_tables/consumable.ron +++ b/assets/common/loot_tables/consumable/poor.ron @@ -7,8 +7,8 @@ (0.1, Item("common.items.utility.firework_white")), (0.1, Item("common.items.utility.firework_yellow")), // Potions - (3.0, MultiDrop(Item("common.items.consumable.potion_minor"), 2, 5)), + (10.0, MultiDrop(Item("common.items.consumable.potion_minor"), 2, 5)), // Misc - (0.2, Item("common.items.utility.collar")), - (0.2, Item("common.items.utility.bomb")), + (2.0, Item("common.items.utility.collar")), + (2.0, Item("common.items.utility.bomb")), ] \ No newline at end of file diff --git a/assets/common/loot_tables/dungeon/adlet/chest.ron b/assets/common/loot_tables/dungeon/adlet/chest.ron index ea77839dae..f914679105 100644 --- a/assets/common/loot_tables/dungeon/adlet/chest.ron +++ b/assets/common/loot_tables/dungeon/adlet/chest.ron @@ -13,7 +13,7 @@ (1.0, MultiDrop(Item("common.items.mineral.ingot.iron"), 3, 10)), (1.0, MultiDrop(Item("common.items.log.bamboo"), 3, 10)), // Consumables - (2.0, LootTable("common.loot_tables.consumable")), + (2.0, LootTable("common.loot_tables.consumable.poor")), // Food (1.0, MultiDrop(LootTable("common.loot_tables.food.prepared"), 1, 3)), ] diff --git a/assets/common/loot_tables/dungeon/gnarling/chest.ron b/assets/common/loot_tables/dungeon/gnarling/chest.ron index fed61da4e2..fb91d2d97f 100644 --- a/assets/common/loot_tables/dungeon/gnarling/chest.ron +++ b/assets/common/loot_tables/dungeon/gnarling/chest.ron @@ -15,7 +15,7 @@ (0.1, Item("common.items.mineral.gem.emerald")), (0.1, Item("common.items.mineral.gem.ruby")), // Consumables - (2.0, LootTable("common.loot_tables.consumable")), + (2.0, LootTable("common.loot_tables.consumable.poor")), // Food (1.0, MultiDrop(LootTable("common.loot_tables.food.prepared"), 1, 2)), ] diff --git a/assets/common/loot_tables/dungeon/gnarling/woodgolem.ron b/assets/common/loot_tables/dungeon/gnarling/woodgolem.ron index 9e14319abc..ce7fc614fa 100644 --- a/assets/common/loot_tables/dungeon/gnarling/woodgolem.ron +++ b/assets/common/loot_tables/dungeon/gnarling/woodgolem.ron @@ -2,7 +2,7 @@ // Food (1.0, LootTable("common.loot_tables.food.wild_ingredients")), // Consumables - (2.0, LootTable("common.loot_tables.consumable")), + (2.0, LootTable("common.loot_tables.consumable.poor")), // Crafting ingredients (1.0, MultiDrop(Item("common.items.log.wood"), 5, 10)), (0.1, MultiDrop(Item("common.items.log.hardwood"), 1, 2)), diff --git a/assets/common/loot_tables/dungeon/tier-2/chest.ron b/assets/common/loot_tables/dungeon/tier-2/chest.ron index 9ab9be16d9..5cc206bf31 100644 --- a/assets/common/loot_tables/dungeon/tier-2/chest.ron +++ b/assets/common/loot_tables/dungeon/tier-2/chest.ron @@ -11,7 +11,7 @@ (1.0, MultiDrop(Item("common.items.mineral.ingot.steel"), 3, 10)), (1.0, MultiDrop(Item("common.items.log.hardwood"), 3, 10)), // Consumables - (2.0, LootTable("common.loot_tables.consumable")), + (2.0, LootTable("common.loot_tables.consumable.moderate")), // Food (1.0, MultiDrop(LootTable("common.loot_tables.food.prepared"), 1, 4)), ] diff --git a/assets/common/loot_tables/dungeon/tier-2/enemy.ron b/assets/common/loot_tables/dungeon/tier-2/enemy.ron index 1143dc738f..35ed8ff5e6 100644 --- a/assets/common/loot_tables/dungeon/tier-2/enemy.ron +++ b/assets/common/loot_tables/dungeon/tier-2/enemy.ron @@ -1,10 +1,11 @@ [ // Consumables - (0.5, LootTable("common.loot_tables.consumable")), + (1.0, LootTable("common.loot_tables.consumable.moderate")), // Food - (1.5, MultiDrop(LootTable("common.loot_tables.food.prepared"), 1, 2)), + (1.0, MultiDrop(LootTable("common.loot_tables.food.prepared"), 1, 2)), + (1.0, MultiDrop(LootTable("common.loot_tables.food.wild_ingredients"), 1, 2)), // Materials - (0.5, MultiDrop(Item("common.items.crafting_ing.hide.scales"), 0, 2)), + (1.0, MultiDrop(Item("common.items.crafting_ing.hide.scales"), 1, 3)), // Nothing - (1.5, Nothing), + (0.75, Nothing), ] diff --git a/assets/common/loot_tables/dungeon/tier-3/chest.ron b/assets/common/loot_tables/dungeon/tier-3/chest.ron index 3049c4635e..db5ed55ad4 100644 --- a/assets/common/loot_tables/dungeon/tier-3/chest.ron +++ b/assets/common/loot_tables/dungeon/tier-3/chest.ron @@ -13,7 +13,7 @@ (1.0, MultiDrop(Item("common.items.log.ironwood"), 3, 7)), (2.0, MultiDrop(Item("common.items.mineral.ore.velorite"), 3, 10)), // Consumables - (2.0, LootTable("common.loot_tables.consumable")), + (2.0, LootTable("common.loot_tables.consumable.moderate")), // Food (1.0, MultiDrop(LootTable("common.loot_tables.food.prepared"), 2, 4)), ] diff --git a/assets/common/loot_tables/dungeon/tier-3/enemy.ron b/assets/common/loot_tables/dungeon/tier-3/enemy.ron index b84964a819..788e055816 100644 --- a/assets/common/loot_tables/dungeon/tier-3/enemy.ron +++ b/assets/common/loot_tables/dungeon/tier-3/enemy.ron @@ -1,8 +1,9 @@ [ // Consumables - (0.5, LootTable("common.loot_tables.consumable")), + (1.0, LootTable("common.loot_tables.consumable.moderate")), // Food - (1.5, MultiDrop(LootTable("common.loot_tables.food.prepared"), 2, 4)), + (1.0, MultiDrop(LootTable("common.loot_tables.food.prepared"), 2, 4)), + (1.0, MultiDrop(LootTable("common.loot_tables.food.prepared"), 2, 4)), // Nothing - (2.0, Nothing), + (0.75, Nothing), ] diff --git a/assets/common/loot_tables/dungeon/tier-4/chest.ron b/assets/common/loot_tables/dungeon/tier-4/chest.ron index db81e31dea..8859498edf 100644 --- a/assets/common/loot_tables/dungeon/tier-4/chest.ron +++ b/assets/common/loot_tables/dungeon/tier-4/chest.ron @@ -13,7 +13,7 @@ (1.0, MultiDrop(Item("common.items.mineral.ingot.bloodsteel"), 1, 5)), (1.0, MultiDrop(Item("common.items.log.frostwood"), 3, 6)), // Consumables - (2.0, MultiDrop(LootTable("common.loot_tables.consumable"), 1, 2)), + (2.0, LootTable("common.loot_tables.consumable.good")), // Food (1.0, MultiDrop(LootTable("common.loot_tables.food.prepared"), 2, 5)), ] diff --git a/assets/common/loot_tables/dungeon/tier-4/miniboss.ron b/assets/common/loot_tables/dungeon/tier-4/miniboss.ron index d4f7ac8717..31297a16fa 100644 --- a/assets/common/loot_tables/dungeon/tier-4/miniboss.ron +++ b/assets/common/loot_tables/dungeon/tier-4/miniboss.ron @@ -5,7 +5,7 @@ // Food (5.0, LootTable("common.loot_tables.food.prepared")), // Consumables - (5.0, MultiDrop(LootTable("common.loot_tables.consumable"), 1, 2)), + (5.0, LootTable("common.loot_tables.consumable.good")), // lantern (1.0, Item("common.items.lantern.blue_0")), // Gear diff --git a/assets/common/loot_tables/dungeon/tier-5/chest.ron b/assets/common/loot_tables/dungeon/tier-5/chest.ron index ff7350a974..59a571d22c 100644 --- a/assets/common/loot_tables/dungeon/tier-5/chest.ron +++ b/assets/common/loot_tables/dungeon/tier-5/chest.ron @@ -12,7 +12,7 @@ (1.0, MultiDrop(Item("common.items.mineral.ingot.bloodsteel"), 1, 5)), (1.0, MultiDrop(Item("common.items.log.frostwood"), 1, 5)), // Consumables - (2.0, MultiDrop(LootTable("common.loot_tables.consumable"), 1, 2)), + (2.0, LootTable("common.loot_tables.consumable.good")), (0.1, MultiDrop(Item("common.items.food.spore_corruption"), 1, 3)), // Food (1.0, MultiDrop(LootTable("common.loot_tables.food.prepared"), 3, 6)), diff --git a/assets/common/loot_tables/dungeon/tier-5/miniboss.ron b/assets/common/loot_tables/dungeon/tier-5/miniboss.ron index 39821e4d8c..706ff34223 100644 --- a/assets/common/loot_tables/dungeon/tier-5/miniboss.ron +++ b/assets/common/loot_tables/dungeon/tier-5/miniboss.ron @@ -4,7 +4,7 @@ // Food (5.0, LootTable("common.loot_tables.food.prepared")), // Consumables - (5.0, MultiDrop(LootTable("common.loot_tables.consumable"), 1, 2)), + (5.0, LootTable("common.loot_tables.consumable.good")), // Back (1.0, Item("common.items.armor.misc.back.dungeon_purple")), // Ring diff --git a/common/src/states/dash_melee.rs b/common/src/states/dash_melee.rs index 7388915fbc..6676f8987e 100644 --- a/common/src/states/dash_melee.rs +++ b/common/src/states/dash_melee.rs @@ -92,7 +92,7 @@ impl CharacterBehavior for Data { if self.timer < self.charge_end_timer && (input_is_pressed(data, self.static_data.ability_info.input) || (self.auto_charge && self.timer < self.static_data.charge_duration)) - && update.energy.current() >= 0.0 + && update.energy.current() > 0.0 { // Forward movement let charge_frac = (self.timer.as_secs_f32()