diff --git a/assets/common/entity/calendar/april_fools/aggressive/trickster.ron b/assets/common/entity/calendar/april_fools/aggressive/trickster.ron
new file mode 100644
index 0000000000..4585e2fe07
--- /dev/null
+++ b/assets/common/entity/calendar/april_fools/aggressive/trickster.ron
@@ -0,0 +1,24 @@
+#![enable(implicit_some)]
+(
+ name: Name("Trickster"),
+ body: RandomWith("draugr"),
+ alignment: Alignment(Enemy),
+ loot: LootTable("common.loot_tables.calendar.april_fools.trickster"),
+ inventory: (
+ loadout: Inline((
+ inherit: Asset("common.loadout.calendar.halloween.trickster"),
+ active_hands: InHands((Choice([
+ (1, Item("common.items.tool.instruments.double_bass")),
+ (1, Item("common.items.tool.instruments.flute")),
+ (1, Item("common.items.tool.instruments.lyre")),
+ (1, Item("common.items.tool.instruments.kalimba")),
+ (1, Item("common.items.tool.instruments.sitar")),
+ (1, Item("common.items.tool.instruments.washboard")),
+ (1, Item("common.items.tool.instruments.lute")),
+ (1, Item("common.items.tool.instruments.guitar")),
+ (1, Item("common.items.tool.instruments.melodica")),
+ ]), None)),
+ )),
+ ),
+ meta: [],
+)
\ No newline at end of file
diff --git a/assets/common/items/boss_drops/potions.ron b/assets/common/items/boss_drops/potions.ron
index 50b169ac99..c0e5333ccb 100644
--- a/assets/common/items/boss_drops/potions.ron
+++ b/assets/common/items/boss_drops/potions.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A potent healing potion.",
kind: Consumable(
kind: Drink,
- effects: [
+ effects: All([
Buff((
kind: Potion,
data: (
@@ -21,7 +21,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ ])
),
quality: High,
tags: [Potion],
diff --git a/assets/common/items/consumable/curious_potion.ron b/assets/common/items/consumable/curious_potion.ron
new file mode 100644
index 0000000000..9bbe18bf79
--- /dev/null
+++ b/assets/common/items/consumable/curious_potion.ron
@@ -0,0 +1,67 @@
+ItemDef(
+ name: "Curious Potion",
+ description: "Wonder what this does...",
+ kind: Consumable(
+ kind: Drink,
+ effects: Any([
+ Buff((
+ kind: Polymorphed(QuadrupedSmall(( species: Frog, body_type: Female ))),
+ data: (
+ strength: 0.0,
+ duration: Some(60),
+ ),
+ cat_ids: [Natural],
+ )),
+ Buff((
+ kind: Polymorphed(QuadrupedSmall(( species: Rabbit, body_type: Female ))),
+ data: (
+ strength: 0.0,
+ duration: Some(60),
+ ),
+ cat_ids: [Natural],
+ )),
+ Buff((
+ kind: Polymorphed(QuadrupedSmall(( species: Rat, body_type: Female ))),
+ data: (
+ strength: 0.0,
+ duration: Some(60),
+ ),
+ cat_ids: [Natural],
+ )),
+ Buff((
+ kind: Polymorphed(QuadrupedSmall(( species: Squirrel, body_type: Female ))),
+ data: (
+ strength: 0.0,
+ duration: Some(60),
+ ),
+ cat_ids: [Natural],
+ )),
+ Buff((
+ kind: Polymorphed(QuadrupedSmall(( species: Cat, body_type: Female ))),
+ data: (
+ strength: 0.0,
+ duration: Some(60),
+ ),
+ cat_ids: [Natural],
+ )),
+ Buff((
+ kind: Polymorphed(QuadrupedSmall(( species: Fungome, body_type: Female ))),
+ data: (
+ strength: 0.0,
+ duration: Some(60),
+ ),
+ cat_ids: [Natural],
+ )),
+ Buff((
+ kind: Polymorphed(QuadrupedSmall(( species: Pig, body_type: Female ))),
+ data: (
+ strength: 0.0,
+ duration: Some(60),
+ ),
+ cat_ids: [Natural],
+ )),
+ ])
+ ),
+ quality: Common,
+ tags: [Potion],
+)
diff --git a/assets/common/items/consumable/potion_big.ron b/assets/common/items/consumable/potion_big.ron
index 26352c6e4b..2a49103fed 100644
--- a/assets/common/items/consumable/potion_big.ron
+++ b/assets/common/items/consumable/potion_big.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Precious medicine, it makes for the largest rejuvenative flask yet.",
kind: Consumable(
kind: Drink,
- effects: [
+ effects: All([
Buff((
kind: Potion,
data: (
@@ -20,7 +20,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ ])
),
quality: Common,
tags: [Potion],
diff --git a/assets/common/items/consumable/potion_med.ron b/assets/common/items/consumable/potion_med.ron
index 63cf470144..784c0ddf66 100644
--- a/assets/common/items/consumable/potion_med.ron
+++ b/assets/common/items/consumable/potion_med.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "An innovative invention from an apothecary, better than its smaller precursors.",
kind: Consumable(
kind: Drink,
- effects: [
+ effects: All([
Buff((
kind: Potion,
data: (
@@ -20,7 +20,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ ])
),
quality: Common,
tags: [Potion],
diff --git a/assets/common/items/consumable/potion_minor.ron b/assets/common/items/consumable/potion_minor.ron
index 23f15272f0..d573b86fc9 100644
--- a/assets/common/items/consumable/potion_minor.ron
+++ b/assets/common/items/consumable/potion_minor.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A small potion concocted from apples and honey.",
kind: Consumable(
kind: Drink,
- effects: [
+ effects: All([
Buff((
kind: Potion,
data: (
@@ -20,7 +20,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ ])
),
quality: Common,
tags: [Potion],
diff --git a/assets/common/items/debug/golden_cheese.ron b/assets/common/items/debug/golden_cheese.ron
index 4f42797035..4468f66c7c 100644
--- a/assets/common/items/debug/golden_cheese.ron
+++ b/assets/common/items/debug/golden_cheese.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "They say gods eat it to get eternal youth.",
kind: Consumable(
kind: Drink,
- effects: [
+ effects: All([
Buff((
kind: Regeneration,
data: (
@@ -36,7 +36,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ ])
),
quality: Debug,
tags: [Food],
diff --git a/assets/common/items/food/apple.ron b/assets/common/items/food/apple.ron
index 9e8a9f0916..6c82e7ac64 100644
--- a/assets/common/items/food/apple.ron
+++ b/assets/common/items/food/apple.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Red and juicy",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/apple_mushroom_curry.ron b/assets/common/items/food/apple_mushroom_curry.ron
index 5fc94e0306..63fee7c3cc 100644
--- a/assets/common/items/food/apple_mushroom_curry.ron
+++ b/assets/common/items/food/apple_mushroom_curry.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Who could say no to that?",
kind: Consumable(
kind: ComplexFood,
- effects: [
+ effects: All([
Buff((
kind: Saturation,
data: (
@@ -20,7 +20,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ ])
),
quality: Moderate,
tags: [Food],
diff --git a/assets/common/items/food/apple_stick.ron b/assets/common/items/food/apple_stick.ron
index cbe5825987..c73618dcae 100644
--- a/assets/common/items/food/apple_stick.ron
+++ b/assets/common/items/food/apple_stick.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "The stick makes it easier to carry!",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/blue_cheese.ron b/assets/common/items/food/blue_cheese.ron
index 972e17a484..2b0ce8f4ee 100644
--- a/assets/common/items/food/blue_cheese.ron
+++ b/assets/common/items/food/blue_cheese.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Pungent and filling",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: High,
tags: [Food],
diff --git a/assets/common/items/food/cactus_colada.ron b/assets/common/items/food/cactus_colada.ron
index c0c1008d54..73282b8190 100644
--- a/assets/common/items/food/cactus_colada.ron
+++ b/assets/common/items/food/cactus_colada.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Giving you that special prickle.",
kind: Consumable(
kind: Drink,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Moderate,
tags: [Food],
diff --git a/assets/common/items/food/carrot.ron b/assets/common/items/food/carrot.ron
index 38b34ee525..0e16bb11dd 100644
--- a/assets/common/items/food/carrot.ron
+++ b/assets/common/items/food/carrot.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "An orange root vegetable. They say it'll improve your vision!",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/cheese.ron b/assets/common/items/food/cheese.ron
index 6ee054574a..9776ad9b31 100644
--- a/assets/common/items/food/cheese.ron
+++ b/assets/common/items/food/cheese.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Made from goat milk from the finest dwarven produce. Aromatic and nutritious!",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/coconut.ron b/assets/common/items/food/coconut.ron
index 1284bb2432..794c466cdb 100644
--- a/assets/common/items/food/coconut.ron
+++ b/assets/common/items/food/coconut.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Reliable source of water and fat. Can often be found growing on palm trees.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/coltsfoot.ron b/assets/common/items/food/coltsfoot.ron
index 97a6c35f5f..ab4172d011 100644
--- a/assets/common/items/food/coltsfoot.ron
+++ b/assets/common/items/food/coltsfoot.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A daisy-like flower often used in herbal teas.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/dandelion.ron b/assets/common/items/food/dandelion.ron
index bbcf5a0b54..d6f5489bc3 100644
--- a/assets/common/items/food/dandelion.ron
+++ b/assets/common/items/food/dandelion.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A small, yellow flower. Uses the wind to spread its seeds.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/garlic.ron b/assets/common/items/food/garlic.ron
index 5ed180aeda..43b6aea1cb 100644
--- a/assets/common/items/food/garlic.ron
+++ b/assets/common/items/food/garlic.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Make sure to brush your teeth after eating.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/honeycorn.ron b/assets/common/items/food/honeycorn.ron
index bb4016cd13..fbd9f87191 100644
--- a/assets/common/items/food/honeycorn.ron
+++ b/assets/common/items/food/honeycorn.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Sweeet",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/lettuce.ron b/assets/common/items/food/lettuce.ron
index 900a6c65d8..bf01a4bb4b 100644
--- a/assets/common/items/food/lettuce.ron
+++ b/assets/common/items/food/lettuce.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A vibrant green leafy vegetable. Lettuce make some salads!",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat.ron b/assets/common/items/food/meat.ron
index 6cc634f0ec..6fa277f5f3 100644
--- a/assets/common/items/food/meat.ron
+++ b/assets/common/items/food/meat.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Meat. The lifeblood of mankind.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/beast_large_cooked.ron b/assets/common/items/food/meat/beast_large_cooked.ron
index f5998c1a2a..251f45cbf3 100644
--- a/assets/common/items/food/meat/beast_large_cooked.ron
+++ b/assets/common/items/food/meat/beast_large_cooked.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Medium Rare.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/beast_large_raw.ron b/assets/common/items/food/meat/beast_large_raw.ron
index ffe1603bd0..490b755c2b 100644
--- a/assets/common/items/food/meat/beast_large_raw.ron
+++ b/assets/common/items/food/meat/beast_large_raw.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Chunk of beastly animal meat, best after cooking.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/beast_small_cooked.ron b/assets/common/items/food/meat/beast_small_cooked.ron
index 9f9d8252ee..88d05fb139 100644
--- a/assets/common/items/food/meat/beast_small_cooked.ron
+++ b/assets/common/items/food/meat/beast_small_cooked.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Medium Rare.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/beast_small_raw.ron b/assets/common/items/food/meat/beast_small_raw.ron
index e31f626410..80f1891173 100644
--- a/assets/common/items/food/meat/beast_small_raw.ron
+++ b/assets/common/items/food/meat/beast_small_raw.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Small hunk of beastly animal meat, best after cooking.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/bird_cooked.ron b/assets/common/items/food/meat/bird_cooked.ron
index 636072fa34..c85f79b5fe 100644
--- a/assets/common/items/food/meat/bird_cooked.ron
+++ b/assets/common/items/food/meat/bird_cooked.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Best enjoyed with one in each hand.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/bird_large_cooked.ron b/assets/common/items/food/meat/bird_large_cooked.ron
index 7d01e98e69..637cf6b913 100644
--- a/assets/common/items/food/meat/bird_large_cooked.ron
+++ b/assets/common/items/food/meat/bird_large_cooked.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Makes for a legendary meal.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/bird_large_raw.ron b/assets/common/items/food/meat/bird_large_raw.ron
index d93551c9d9..f84f1bbcc9 100644
--- a/assets/common/items/food/meat/bird_large_raw.ron
+++ b/assets/common/items/food/meat/bird_large_raw.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "It's magnificent.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/bird_raw.ron b/assets/common/items/food/meat/bird_raw.ron
index 4e285af765..7f808c12d0 100644
--- a/assets/common/items/food/meat/bird_raw.ron
+++ b/assets/common/items/food/meat/bird_raw.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A hefty drumstick.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/fish_cooked.ron b/assets/common/items/food/meat/fish_cooked.ron
index 0d86c9acd9..ce13683dd8 100644
--- a/assets/common/items/food/meat/fish_cooked.ron
+++ b/assets/common/items/food/meat/fish_cooked.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A fresh cooked seafood steak.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/fish_raw.ron b/assets/common/items/food/meat/fish_raw.ron
index b8d9075459..bee6f3381c 100644
--- a/assets/common/items/food/meat/fish_raw.ron
+++ b/assets/common/items/food/meat/fish_raw.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A steak chopped from a fish, best after cooking.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/tough_cooked.ron b/assets/common/items/food/meat/tough_cooked.ron
index cf488b3473..ebe9d121d6 100644
--- a/assets/common/items/food/meat/tough_cooked.ron
+++ b/assets/common/items/food/meat/tough_cooked.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Tastes exotic.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/meat/tough_raw.ron b/assets/common/items/food/meat/tough_raw.ron
index c4f2e12736..12b3392e81 100644
--- a/assets/common/items/food/meat/tough_raw.ron
+++ b/assets/common/items/food/meat/tough_raw.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Peculiar bit of meat, best after cooking.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/mushroom.ron b/assets/common/items/food/mushroom.ron
index 326b807249..30ea33d02b 100644
--- a/assets/common/items/food/mushroom.ron
+++ b/assets/common/items/food/mushroom.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Hopefully this one is not poisonous",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/mushroom_stick.ron b/assets/common/items/food/mushroom_stick.ron
index e06cb12278..a5402dca51 100644
--- a/assets/common/items/food/mushroom_stick.ron
+++ b/assets/common/items/food/mushroom_stick.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Roasted mushrooms on a stick for easy carrying",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/onion.ron b/assets/common/items/food/onion.ron
index 39c20acb90..55ee872059 100644
--- a/assets/common/items/food/onion.ron
+++ b/assets/common/items/food/onion.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A vegetable that's made the toughest men cry.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/plainsalad.ron b/assets/common/items/food/plainsalad.ron
index e16eeafc6f..f4311d0392 100644
--- a/assets/common/items/food/plainsalad.ron
+++ b/assets/common/items/food/plainsalad.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Literally just chopped lettuce. Does this even count as a salad?",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/pumpkin_spice_brew.ron b/assets/common/items/food/pumpkin_spice_brew.ron
index 543a92cd1d..70131ff4a6 100644
--- a/assets/common/items/food/pumpkin_spice_brew.ron
+++ b/assets/common/items/food/pumpkin_spice_brew.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Brewed from moldy pumpkins.",
kind: Consumable(
kind: Drink,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Moderate,
tags: [Food],
diff --git a/assets/common/items/food/sage.ron b/assets/common/items/food/sage.ron
index 269e172692..193c82a90e 100644
--- a/assets/common/items/food/sage.ron
+++ b/assets/common/items/food/sage.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A herb commonly used in tea.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/spore_corruption.ron b/assets/common/items/food/spore_corruption.ron
index 525d8ff927..41802fc31c 100644
--- a/assets/common/items/food/spore_corruption.ron
+++ b/assets/common/items/food/spore_corruption.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "You feel an evil force pulsating within.\n\nIt may be unwise to hold on to it for too long...",
kind: Consumable(
kind: ComplexFood,
- effects: [
+ effects: All([
Buff((
kind: Frenzied,
data: (
@@ -20,7 +20,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ ])
),
quality: Epic,
tags: [Food],
diff --git a/assets/common/items/food/sunflower_icetea.ron b/assets/common/items/food/sunflower_icetea.ron
index 5629fee79e..c3971b5434 100644
--- a/assets/common/items/food/sunflower_icetea.ron
+++ b/assets/common/items/food/sunflower_icetea.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Brewed from freshly shelled sunflower seeds",
kind: Consumable(
kind: Drink,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Moderate,
tags: [Food],
diff --git a/assets/common/items/food/tomato.ron b/assets/common/items/food/tomato.ron
index b694ff6bdb..4d92a5dc11 100644
--- a/assets/common/items/food/tomato.ron
+++ b/assets/common/items/food/tomato.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "A red fruit. It's not actually a vegetable!",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/items/food/tomatosalad.ron b/assets/common/items/food/tomatosalad.ron
index 1d4075bd37..c20825c763 100644
--- a/assets/common/items/food/tomatosalad.ron
+++ b/assets/common/items/food/tomatosalad.ron
@@ -3,7 +3,7 @@ ItemDef(
description: "Leafy salad with some chopped, juicy tomatoes mixed in.",
kind: Consumable(
kind: Food,
- effects: [
+ effects: One(
Buff((
kind: Saturation,
data: (
@@ -12,7 +12,7 @@ ItemDef(
),
cat_ids: [Natural],
)),
- ]
+ )
),
quality: Common,
tags: [Food],
diff --git a/assets/common/loot_tables/calendar/april_fools/trickster.ron b/assets/common/loot_tables/calendar/april_fools/trickster.ron
new file mode 100644
index 0000000000..96b257c1a5
--- /dev/null
+++ b/assets/common/loot_tables/calendar/april_fools/trickster.ron
@@ -0,0 +1,4 @@
+[
+ (1.0, Item("common.items.consumable.curious_potion")),
+ (19.0, Nothing),
+]
\ No newline at end of file
diff --git a/assets/voxygen/element/de_buffs/debuff_polymorphed.png b/assets/voxygen/element/de_buffs/debuff_polymorphed.png
new file mode 100644
index 0000000000..d2fafe9d1f
--- /dev/null
+++ b/assets/voxygen/element/de_buffs/debuff_polymorphed.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1fbce858438c83c8ec6416a6f4e7449e69a87c975f2fc4786e0d2c97d20e22eb
+size 279
diff --git a/assets/voxygen/i18n/en/buff.ftl b/assets/voxygen/i18n/en/buff.ftl
index 083ca58417..a572deb87e 100644
--- a/assets/voxygen/i18n/en/buff.ftl
+++ b/assets/voxygen/i18n/en/buff.ftl
@@ -76,7 +76,11 @@ buff-stat-potionsickness =
## Reckless
buff-title-reckless = Reckless
buff-desc-reckless = Your attacks are more powerful, however you are leaving your defenses open.
+## Polymorped
+buff-title-polymorphed = Polymorphed
+buff-desc-polymorphed = Your body changes form.
## Util
buff-text-over_seconds = over { $dur_secs } seconds
buff-text-for_seconds = for { $dur_secs } seconds
+buff-mysterious = Mysterious effect
buff-remove = Click to remove
diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron
index bffe0c69ca..ccb70704d3 100644
--- a/assets/voxygen/item_image_manifest.ron
+++ b/assets/voxygen/item_image_manifest.ron
@@ -3134,6 +3134,10 @@
"voxel.object.potion_red",
(0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.9,
),
+ Simple("common.items.consumable.curious_potion"): VoxTrans(
+ "voxel.object.curious_potion",
+ (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7,
+ ),
Simple("common.items.food.cheese"): VoxTrans(
"voxel.object.cheese",
(0.0, 0.0, 0.0), (-60.0, 27.0, 17.0), 0.7,
diff --git a/assets/voxygen/voxel/item_drop_manifest.ron b/assets/voxygen/voxel/item_drop_manifest.ron
index 87f4a326d3..c545b9f6b6 100644
--- a/assets/voxygen/voxel/item_drop_manifest.ron
+++ b/assets/voxygen/voxel/item_drop_manifest.ron
@@ -794,6 +794,7 @@
Simple("common.items.consumable.potion_med"): "voxel.object.potion_red",
Simple("common.items.consumable.potion_minor"): "voxel.object.potion_red",
Simple("common.items.consumable.potion_big"): "voxel.object.potion_red",
+ Simple("common.items.consumable.curious_potion"): "voxel.object.curious_potion",
Simple("common.items.boss_drops.potions"): "voxel.object.potion_red",
Simple("common.items.food.cheese"): "voxel.object.cheese",
Simple("common.items.food.blue_cheese"): "voxel.object.blue_cheese",
diff --git a/assets/voxygen/voxel/object/curious_potion.vox b/assets/voxygen/voxel/object/curious_potion.vox
new file mode 100644
index 0000000000..422a0b8eac
--- /dev/null
+++ b/assets/voxygen/voxel/object/curious_potion.vox
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4ef5b3a546363d168af0689f93f273d3b03657349a6390db998cd0bd6d0be895
+size 1800
diff --git a/assets/world/wildlife/spawn/calendar/april_fools/jungle/area.ron b/assets/world/wildlife/spawn/calendar/april_fools/jungle/area.ron
new file mode 100644
index 0000000000..59ea4f5af3
--- /dev/null
+++ b/assets/world/wildlife/spawn/calendar/april_fools/jungle/area.ron
@@ -0,0 +1,14 @@
+SpawnEntry (
+ name: "April Fools Jungle Area",
+ note: "April Fools NPCs",
+ rules: [
+ Pack(
+ groups: [
+ (3, (3, 6, "common.entity.calendar.april_fools.aggressive.trickster")),
+ ],
+ spawn_mode: Land,
+ calendar_events: Some([AprilFools]),
+ day_period: [Night, Morning, Noon, Evening],
+ ),
+ ],
+)
diff --git a/assets/world/wildlife/spawn/calendar/april_fools/taiga/core.ron b/assets/world/wildlife/spawn/calendar/april_fools/taiga/core.ron
new file mode 100644
index 0000000000..7e647543ed
--- /dev/null
+++ b/assets/world/wildlife/spawn/calendar/april_fools/taiga/core.ron
@@ -0,0 +1,14 @@
+SpawnEntry (
+ name: "April Fools Jungle Core",
+ note: "April Fools NPCs",
+ rules: [
+ Pack(
+ groups: [
+ (3, (3, 6, "common.entity.calendar.april_fools.aggressive.trickster")),
+ ],
+ spawn_mode: Land,
+ calendar_events: Some([AprilFools]),
+ day_period: [Night, Morning, Noon, Evening],
+ ),
+ ],
+)
diff --git a/assets/world/wildlife/spawn/calendar/april_fools/temperate/rainforest.ron b/assets/world/wildlife/spawn/calendar/april_fools/temperate/rainforest.ron
new file mode 100644
index 0000000000..04bd23b3d7
--- /dev/null
+++ b/assets/world/wildlife/spawn/calendar/april_fools/temperate/rainforest.ron
@@ -0,0 +1,14 @@
+SpawnEntry (
+ name: "April Fools Temperate Rainforest",
+ note: "April Fools NPCs",
+ rules: [
+ Pack(
+ groups: [
+ (3, (3, 6, "common.entity.calendar.april_fools.aggressive.trickster")),
+ ],
+ spawn_mode: Land,
+ calendar_events: Some([AprilFools]),
+ day_period: [Night, Morning, Noon, Evening],
+ ),
+ ],
+)
diff --git a/assets/world/wildlife/spawn/calendar/april_fools/tropical/rainforest.ron b/assets/world/wildlife/spawn/calendar/april_fools/tropical/rainforest.ron
new file mode 100644
index 0000000000..95c41cb95f
--- /dev/null
+++ b/assets/world/wildlife/spawn/calendar/april_fools/tropical/rainforest.ron
@@ -0,0 +1,14 @@
+SpawnEntry (
+ name: "April Fools Tropical Rainforest",
+ note: "April Fools NPCs",
+ rules: [
+ Pack(
+ groups: [
+ (3, (3, 6, "common.entity.calendar.april_fools.aggressive.trickster")),
+ ],
+ spawn_mode: Land,
+ calendar_events: Some([AprilFools]),
+ day_period: [Night, Morning, Noon, Evening],
+ ),
+ ],
+)
\ No newline at end of file
diff --git a/assets/world/wildlife/spawn/calendar/april_fools/tundra/core.ron b/assets/world/wildlife/spawn/calendar/april_fools/tundra/core.ron
new file mode 100644
index 0000000000..e4507947b3
--- /dev/null
+++ b/assets/world/wildlife/spawn/calendar/april_fools/tundra/core.ron
@@ -0,0 +1,14 @@
+SpawnEntry (
+ name: "April Fools Tundra Core",
+ note: "April Fools NPCs",
+ rules: [
+ Pack(
+ groups: [
+ (3, (3, 6, "common.entity.calendar.april_fools.aggressive.trickster")),
+ ],
+ spawn_mode: Land,
+ calendar_events: Some([AprilFools]),
+ day_period: [Night, Morning, Noon, Evening],
+ ),
+ ],
+)
diff --git a/assets/world/wildlife/spawn/calendar/april_fools/tundra/forest.ron b/assets/world/wildlife/spawn/calendar/april_fools/tundra/forest.ron
new file mode 100644
index 0000000000..920d4c967d
--- /dev/null
+++ b/assets/world/wildlife/spawn/calendar/april_fools/tundra/forest.ron
@@ -0,0 +1,14 @@
+SpawnEntry (
+ name: "April Fools Tundra Forest",
+ note: "April Fools NPCs",
+ rules: [
+ Pack(
+ groups: [
+ (3, (3, 6, "common.entity.calendar.april_fools.aggressive.trickster")),
+ ],
+ spawn_mode: Land,
+ calendar_events: Some([AprilFools]),
+ day_period: [Night, Morning, Noon, Evening],
+ ),
+ ],
+)
diff --git a/assets/world/wildlife/spawn/calendar/april_fools/tundra/snow.ron b/assets/world/wildlife/spawn/calendar/april_fools/tundra/snow.ron
new file mode 100644
index 0000000000..6957c70095
--- /dev/null
+++ b/assets/world/wildlife/spawn/calendar/april_fools/tundra/snow.ron
@@ -0,0 +1,14 @@
+SpawnEntry (
+ name: "April Fools Tundra Snow",
+ note: "April Fools NPCs",
+ rules: [
+ Pack(
+ groups: [
+ (3, (3, 6, "common.entity.calendar.april_fools.aggressive.trickster")),
+ ],
+ spawn_mode: Land,
+ calendar_events: Some([AprilFools]),
+ day_period: [Night, Morning, Noon, Evening],
+ ),
+ ],
+)
diff --git a/common/src/calendar.rs b/common/src/calendar.rs
index 740af3a648..a74b6abb7c 100644
--- a/common/src/calendar.rs
+++ b/common/src/calendar.rs
@@ -8,6 +8,7 @@ use strum::EnumIter;
pub enum CalendarEvent {
Christmas = 0,
Halloween = 1,
+ AprilFools = 2,
}
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
@@ -43,6 +44,10 @@ impl Calendar {
this.events.push(CalendarEvent::Halloween);
}
+ if now.month() == 4 && now.day() == 1 {
+ this.events.push(CalendarEvent::AprilFools);
+ }
+
this
}
}
diff --git a/common/src/cmd.rs b/common/src/cmd.rs
index 974326fc4a..adafa0a2ce 100644
--- a/common/src/cmd.rs
+++ b/common/src/cmd.rs
@@ -157,6 +157,7 @@ lazy_static! {
BuffKind::Parried => "parried",
BuffKind::PotionSickness => "potion_sickness",
BuffKind::Reckless => "reckless",
+ BuffKind::Polymorphed(_) => "polymorphed",
};
let mut buff_parser = HashMap::new();
for kind in BuffKind::iter() {
diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs
index edd12a0d86..b259123d0d 100644
--- a/common/src/comp/body.rs
+++ b/common/src/comp/body.rs
@@ -31,7 +31,7 @@ use super::{BuffKind, Collider, Density, Mass, Scale};
make_case_elim!(
body,
- #[derive(Copy, Clone, Debug, Display, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, Display, PartialEq, PartialOrd, Ord, Eq, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Body {
Humanoid(body: humanoid::Body) = 0,
@@ -54,6 +54,16 @@ make_case_elim!(
}
);
+// Implemented for Buff, to be able to implement EnumIter.
+impl Default for Body {
+ fn default() -> Self {
+ Body::QuadrupedSmall(quadruped_small::Body {
+ species: quadruped_small::Species::Frog,
+ body_type: quadruped_small::BodyType::Female,
+ })
+ }
+}
+
/// Data representing data generic to the body together with per-species data.
///
/// NOTE: Deliberately don't (yet?) implement serialize.
diff --git a/common/src/comp/body/arthropod.rs b/common/src/comp/body/arthropod.rs
index 4f38fa059b..5d76d6336e 100644
--- a/common/src/comp/body/arthropod.rs
+++ b/common/src/comp/body/arthropod.rs
@@ -1,7 +1,7 @@
use rand::{seq::SliceRandom, thread_rng};
use serde::{Deserialize, Serialize};
-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -25,7 +25,7 @@ impl From
for super::Body {
fn from(body: Body) -> Self { super::Body::Arthropod(body) }
}
-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Tarantula = 0,
@@ -99,7 +99,7 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
fn into_iter(self) -> Self::IntoIter { ALL_SPECIES.iter().copied() }
}
-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/body/biped_large.rs b/common/src/comp/body/biped_large.rs
index 00590dcd97..51db673f99 100644
--- a/common/src/comp/body/biped_large.rs
+++ b/common/src/comp/body/biped_large.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -31,7 +31,7 @@ impl From for super::Body {
make_case_elim!(
species,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Ogre = 0,
@@ -158,7 +158,7 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/body/biped_small.rs b/common/src/comp/body/biped_small.rs
index 02a5078f3e..01199cba5b 100644
--- a/common/src/comp/body/biped_small.rs
+++ b/common/src/comp/body/biped_small.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -31,7 +31,7 @@ impl From for super::Body {
make_case_elim!(
species,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Gnome = 0,
@@ -114,7 +114,7 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/body/bird_large.rs b/common/src/comp/body/bird_large.rs
index b393aa0cd0..ead5ac26ad 100644
--- a/common/src/comp/body/bird_large.rs
+++ b/common/src/comp/body/bird_large.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -31,7 +31,7 @@ impl From for super::Body {
make_case_elim!(
species,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Phoenix = 0,
@@ -98,7 +98,7 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/body/bird_medium.rs b/common/src/comp/body/bird_medium.rs
index 701354766d..2d1df42bda 100644
--- a/common/src/comp/body/bird_medium.rs
+++ b/common/src/comp/body/bird_medium.rs
@@ -5,7 +5,7 @@ use strum::{Display, EnumString};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -33,7 +33,18 @@ impl From for super::Body {
make_case_elim!(
species,
#[derive(
- Copy, Clone, Debug, Display, EnumString, PartialEq, Eq, Hash, Serialize, Deserialize,
+ Copy,
+ Clone,
+ Debug,
+ Display,
+ EnumString,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Hash,
+ Serialize,
+ Deserialize,
)]
#[repr(u32)]
pub enum Species {
@@ -134,7 +145,18 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
#[derive(
- Copy, Clone, Debug, Display, EnumString, PartialEq, Eq, Hash, Serialize, Deserialize,
+ Copy,
+ Clone,
+ Debug,
+ Display,
+ EnumString,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Hash,
+ Serialize,
+ Deserialize,
)]
#[repr(u32)]
pub enum BodyType {
diff --git a/common/src/comp/body/dragon.rs b/common/src/comp/body/dragon.rs
index 353713abf8..ad5fc97d5c 100644
--- a/common/src/comp/body/dragon.rs
+++ b/common/src/comp/body/dragon.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -31,7 +31,7 @@ impl From for super::Body {
make_case_elim!(
species,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Reddragon = 0,
@@ -68,7 +68,7 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/body/fish_medium.rs b/common/src/comp/body/fish_medium.rs
index a98788b788..9f67087dab 100644
--- a/common/src/comp/body/fish_medium.rs
+++ b/common/src/comp/body/fish_medium.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -31,7 +31,7 @@ impl From for super::Body {
make_case_elim!(
species,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Marlin = 0,
@@ -71,7 +71,7 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/body/fish_small.rs b/common/src/comp/body/fish_small.rs
index 172db783e1..c485c91679 100644
--- a/common/src/comp/body/fish_small.rs
+++ b/common/src/comp/body/fish_small.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -31,7 +31,7 @@ impl From for super::Body {
make_case_elim!(
species,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Clownfish = 0,
@@ -71,7 +71,7 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/body/golem.rs b/common/src/comp/body/golem.rs
index 706c181872..6a62739080 100644
--- a/common/src/comp/body/golem.rs
+++ b/common/src/comp/body/golem.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -31,7 +31,7 @@ impl From for super::Body {
make_case_elim!(
species,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
StoneGolem = 0,
@@ -82,7 +82,7 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/body/humanoid.rs b/common/src/comp/body/humanoid.rs
index 412499ccb7..7464e025af 100644
--- a/common/src/comp/body/humanoid.rs
+++ b/common/src/comp/body/humanoid.rs
@@ -5,7 +5,7 @@ use serde_repr::{Deserialize_repr, Serialize_repr};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -90,7 +90,7 @@ impl From for super::Body {
make_case_elim!(
species,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Danari = 0,
@@ -413,7 +413,7 @@ impl Species {
make_case_elim!(
body_type,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/body/item_drop.rs b/common/src/comp/body/item_drop.rs
index 65690d0b85..cd82e456ed 100644
--- a/common/src/comp/body/item_drop.rs
+++ b/common/src/comp/body/item_drop.rs
@@ -18,7 +18,7 @@ use vek::Vec3;
make_case_elim!(
armor,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum ItemDropArmorKind {
Shoulder = 0,
@@ -38,7 +38,7 @@ make_case_elim!(
make_case_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Body {
Tool(tool: ToolKind) = 0,
diff --git a/common/src/comp/body/object.rs b/common/src/comp/body/object.rs
index 05a28908e0..f34cd39782 100644
--- a/common/src/comp/body/object.rs
+++ b/common/src/comp/body/object.rs
@@ -9,7 +9,7 @@ use vek::Vec3;
make_case_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Body {
Arrow = 0,
diff --git a/common/src/comp/body/quadruped_low.rs b/common/src/comp/body/quadruped_low.rs
index 218f328b5a..26b3c9fd38 100644
--- a/common/src/comp/body/quadruped_low.rs
+++ b/common/src/comp/body/quadruped_low.rs
@@ -5,7 +5,7 @@ use strum::{Display, EnumString};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -35,7 +35,18 @@ impl From for super::Body {
make_case_elim!(
species,
#[derive(
- Copy, Clone, Debug, Display, EnumString, PartialEq, Eq, Hash, Serialize, Deserialize,
+ Copy,
+ Clone,
+ Debug,
+ Display,
+ EnumString,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Hash,
+ Serialize,
+ Deserialize,
)]
#[repr(u32)]
pub enum Species {
@@ -158,7 +169,18 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
#[derive(
- Copy, Clone, Debug, Display, EnumString, PartialEq, Eq, Hash, Serialize, Deserialize,
+ Copy,
+ Clone,
+ Debug,
+ Display,
+ EnumString,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Hash,
+ Serialize,
+ Deserialize,
)]
#[repr(u32)]
pub enum BodyType {
diff --git a/common/src/comp/body/quadruped_medium.rs b/common/src/comp/body/quadruped_medium.rs
index ea9c219309..0d6ac2a073 100644
--- a/common/src/comp/body/quadruped_medium.rs
+++ b/common/src/comp/body/quadruped_medium.rs
@@ -5,7 +5,7 @@ use strum::{Display, EnumString};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -32,7 +32,20 @@ impl From for super::Body {
// Renaming any enum entries here (re-ordering is fine) will require a
// database migration to ensure pets correctly de-serialize on player login.
-#[derive(Copy, Clone, Debug, Display, EnumString, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(
+ Copy,
+ Clone,
+ Debug,
+ Display,
+ EnumString,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Hash,
+ Serialize,
+ Deserialize,
+)]
#[repr(u32)]
pub enum Species {
Grolgar = 0,
@@ -213,7 +226,18 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
#[derive(
- Copy, Clone, Debug, Display, EnumString, PartialEq, Eq, Hash, Serialize, Deserialize,
+ Copy,
+ Clone,
+ Debug,
+ Display,
+ EnumString,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Hash,
+ Serialize,
+ Deserialize,
)]
#[repr(u32)]
pub enum BodyType {
diff --git a/common/src/comp/body/quadruped_small.rs b/common/src/comp/body/quadruped_small.rs
index b324507add..1717c670cb 100644
--- a/common/src/comp/body/quadruped_small.rs
+++ b/common/src/comp/body/quadruped_small.rs
@@ -5,7 +5,7 @@ use strum::{Display, EnumString};
make_proj_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -32,7 +32,20 @@ impl From for super::Body {
// Renaming any enum entries here (re-ordering is fine) will require a
// database migration to ensure pets correctly de-serialize on player login.
-#[derive(Copy, Clone, Debug, Display, EnumString, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(
+ Copy,
+ Clone,
+ Debug,
+ Display,
+ EnumString,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Hash,
+ Serialize,
+ Deserialize,
+)]
#[repr(u32)]
pub enum Species {
Pig = 0,
@@ -177,7 +190,18 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
make_case_elim!(
body_type,
#[derive(
- Copy, Clone, Debug, Display, EnumString, PartialEq, Eq, Hash, Serialize, Deserialize,
+ Copy,
+ Clone,
+ Debug,
+ Display,
+ EnumString,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Hash,
+ Serialize,
+ Deserialize,
)]
#[repr(u32)]
pub enum BodyType {
diff --git a/common/src/comp/body/ship.rs b/common/src/comp/body/ship.rs
index 45d08c68f8..e33b1df53a 100644
--- a/common/src/comp/body/ship.rs
+++ b/common/src/comp/body/ship.rs
@@ -21,7 +21,7 @@ pub const ALL_SHIPS: [Body; 2] = [Body::SailBoat, Body::Galleon];
make_case_elim!(
body,
- #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+ #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Body {
DefaultAirship = 0,
diff --git a/common/src/comp/body/theropod.rs b/common/src/comp/body/theropod.rs
index 2bc193ac77..affdf50c52 100644
--- a/common/src/comp/body/theropod.rs
+++ b/common/src/comp/body/theropod.rs
@@ -1,7 +1,7 @@
use rand::{seq::SliceRandom, thread_rng};
use serde::{Deserialize, Serialize};
-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
@@ -25,7 +25,7 @@ impl From for super::Body {
fn from(body: Body) -> Self { super::Body::Theropod(body) }
}
-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Archaeos = 0,
@@ -95,7 +95,7 @@ impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies {
fn into_iter(self) -> Self::IntoIter { ALL_SPECIES.iter().copied() }
}
-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs
index 348352713b..f80866a854 100644
--- a/common/src/comp/buff.rs
+++ b/common/src/comp/buff.rs
@@ -13,6 +13,8 @@ use serde::{Deserialize, Serialize};
use specs::{Component, DerefFlaggedStorage, VecStorage};
use strum::EnumIter;
+use super::Body;
+
/// De/buff Kind.
/// This is used to determine what effects a buff will have
#[derive(
@@ -107,6 +109,8 @@ pub enum BuffKind {
/// Results from drinking a potion.
/// Decreases the health gained from subsequent potions.
PotionSickness,
+ // Changed into another body.
+ Polymorphed(Body),
}
#[cfg(not(target_arch = "wasm32"))]
@@ -136,7 +140,8 @@ impl BuffKind {
| BuffKind::Ensnared
| BuffKind::Poisoned
| BuffKind::Parried
- | BuffKind::PotionSickness => false,
+ | BuffKind::PotionSickness
+ | BuffKind::Polymorphed(_) => false,
}
}
@@ -150,149 +155,17 @@ impl BuffKind {
/// Checks if multiple instances of the buff should be processed, instead of
/// only the strongest.
pub fn stacks(self) -> bool { matches!(self, BuffKind::PotionSickness) }
-}
-// Struct used to store data relevant to a buff
-#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
-pub struct BuffData {
- pub strength: f32,
- pub duration: Option,
- pub delay: Option,
-}
-
-#[cfg(not(target_arch = "wasm32"))]
-impl BuffData {
- pub fn new(strength: f32, duration: Option, delay: Option) -> Self {
- Self {
- strength,
- duration,
- delay,
- }
- }
-}
-
-/// De/buff category ID.
-/// Similar to `BuffKind`, but to mark a category (for more generic usage, like
-/// positive/negative buffs).
-#[derive(Clone, Copy, Eq, PartialEq, Debug, Serialize, Deserialize)]
-pub enum BuffCategory {
- Natural,
- Physical,
- Magical,
- Divine,
- PersistOnDeath,
- FromActiveAura(Uid, AuraKey),
-}
-
-#[derive(Clone, Debug, Serialize, Deserialize)]
-pub enum ModifierKind {
- Additive,
- Fractional,
-}
-
-/// Data indicating and configuring behaviour of a de/buff.
-#[derive(Clone, Debug, Serialize, Deserialize)]
-pub enum BuffEffect {
- /// Periodically damages or heals entity
- HealthChangeOverTime {
- rate: f32,
- kind: ModifierKind,
- instance: u64,
- },
- /// Periodically consume entity energy
- EnergyChangeOverTime { rate: f32, kind: ModifierKind },
- /// Changes maximum health by a certain amount
- MaxHealthModifier { value: f32, kind: ModifierKind },
- /// Changes maximum energy by a certain amount
- MaxEnergyModifier { value: f32, kind: ModifierKind },
- /// Reduces damage after armor is accounted for by this fraction
- DamageReduction(f32),
- /// Gradually changes an entities max health over time
- MaxHealthChangeOverTime {
- rate: f32,
- kind: ModifierKind,
- target_fraction: f32,
- },
- /// Modifies move speed of target
- MovementSpeed(f32),
- /// Modifies attack speed of target
- AttackSpeed(f32),
- /// Modifies ground friction of target
- GroundFriction(f32),
- /// Reduces poise damage taken after armor is accounted for by this fraction
- PoiseReduction(f32),
- /// Reduces amount healed by consumables
- HealReduction(f32),
- /// Increases poise damage dealt when health is lost
- PoiseDamageFromLostHealth { initial_health: f32, strength: f32 },
- /// Modifier to the amount of damage dealt with attacks
- AttackDamage(f32),
- /// Multiplies crit chance of attacks
- CriticalChance(f32),
-}
-
-/// Actual de/buff.
-/// Buff can timeout after some time if `time` is Some. If `time` is None,
-/// Buff will last indefinitely, until removed manually (by some action, like
-/// uncursing).
-///
-/// Buff has a kind, which is used to determine the effects in a builder
-/// function.
-///
-/// To provide more classification info when needed,
-/// buff can be in one or more buff category.
-#[derive(Clone, Debug, Serialize, Deserialize)]
-pub struct Buff {
- pub kind: BuffKind,
- pub data: BuffData,
- pub cat_ids: Vec,
- pub end_time: Option