From 1d98050f282490d10aef79f0ce5a138f8bf6b7c8 Mon Sep 17 00:00:00 2001 From: flo666 Date: Wed, 19 Oct 2022 23:25:10 +0200 Subject: [PATCH] halloween npcs: in forests, spawn harvester or dullahans or tricksters with custom halloween loot: facegourd, pumpkin_spice_brew, honeygourd --- .../aggressive/halloween_dullahan.ron | 11 ++++ .../aggressive/halloween_harvester.ron | 11 ++++ .../halloween/aggressive/trickster.ron | 24 +++++++++ .../items/armor/misc/head/facegourd.ron | 13 +++++ assets/common/items/food/honeycorn.ron | 22 ++++++++ .../common/items/food/pumpkin_spice_brew.ron | 22 ++++++++ .../loadout/calendar/halloween/trickster.ron | 31 +++++++++++ .../calendar/halloween/halloween_dullahan.ron | 4 ++ .../halloween/halloween_harvester.ron | 9 ++++ .../calendar/halloween/trickster.ron | 4 ++ assets/voxygen/item_image_manifest.ron | 12 +++++ .../voxel/armor/misc/head/facegourd.vox | 3 ++ .../voxel/humanoid_armor_head_manifest.ron | 49 +++++++++++++++++ assets/voxygen/voxel/item_drop_manifest.ron | 3 ++ assets/voxygen/voxel/object/honeycorn.vox | 3 ++ .../voxel/object/pumpkin_spice_brew.vox | 3 ++ .../spawn/calendar/halloween/halloween.ron | 17 ++++++ world/src/layer/wildlife.rs | 53 +++++++++++++++++++ 18 files changed, 294 insertions(+) create mode 100644 assets/common/entity/calendar/halloween/aggressive/halloween_dullahan.ron create mode 100644 assets/common/entity/calendar/halloween/aggressive/halloween_harvester.ron create mode 100644 assets/common/entity/calendar/halloween/aggressive/trickster.ron create mode 100644 assets/common/items/armor/misc/head/facegourd.ron create mode 100644 assets/common/items/food/honeycorn.ron create mode 100644 assets/common/items/food/pumpkin_spice_brew.ron create mode 100644 assets/common/loadout/calendar/halloween/trickster.ron create mode 100644 assets/common/loot_tables/calendar/halloween/halloween_dullahan.ron create mode 100644 assets/common/loot_tables/calendar/halloween/halloween_harvester.ron create mode 100644 assets/common/loot_tables/calendar/halloween/trickster.ron create mode 100644 assets/voxygen/voxel/armor/misc/head/facegourd.vox create mode 100644 assets/voxygen/voxel/object/honeycorn.vox create mode 100644 assets/voxygen/voxel/object/pumpkin_spice_brew.vox create mode 100644 assets/world/wildlife/spawn/calendar/halloween/halloween.ron diff --git a/assets/common/entity/calendar/halloween/aggressive/halloween_dullahan.ron b/assets/common/entity/calendar/halloween/aggressive/halloween_dullahan.ron new file mode 100644 index 0000000000..41f19ca040 --- /dev/null +++ b/assets/common/entity/calendar/halloween/aggressive/halloween_dullahan.ron @@ -0,0 +1,11 @@ +#![enable(implicit_some)] +( + name: Name("Dullahan"), + body: RandomWith("dullahan"), + alignment: Alignment(Enemy), + loot: LootTable("common.loot_tables.calendar.halloween.halloween_dullahan"), + inventory: ( + loadout: FromBody, + ), + meta: [], +) \ No newline at end of file diff --git a/assets/common/entity/calendar/halloween/aggressive/halloween_harvester.ron b/assets/common/entity/calendar/halloween/aggressive/halloween_harvester.ron new file mode 100644 index 0000000000..5fbb1d351f --- /dev/null +++ b/assets/common/entity/calendar/halloween/aggressive/halloween_harvester.ron @@ -0,0 +1,11 @@ +#![enable(implicit_some)] +( + name: Name("Harvester"), + body: RandomWith("harvester"), + alignment: Alignment(Enemy), + loot: LootTable("common.loot_tables.calendar.halloween.halloween_harvester"), + inventory: ( + loadout: FromBody, + ), + meta: [], +) \ No newline at end of file diff --git a/assets/common/entity/calendar/halloween/aggressive/trickster.ron b/assets/common/entity/calendar/halloween/aggressive/trickster.ron new file mode 100644 index 0000000000..103b00d8a7 --- /dev/null +++ b/assets/common/entity/calendar/halloween/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.halloween.trickster"), + inventory: ( + loadout: Inline(( + inherit: Asset("common.loadout.calendar.halloween.trickster"), + active_hands: InHands((Choice([ + (1, Item("common.items.weapons.tool.broom")), + (1, Item("common.items.weapons.tool.hoe")), + (1, Item("common.items.weapons.tool.pickaxe")), + (1, Item("common.items.weapons.tool.rake")), + (1, Item("common.items.weapons.tool.shovel-0")), + (1, Item("common.items.weapons.tool.shovel-1")), + ]), None)), + )), + items: [ + (10, "common.items.consumable.potion_big"), + ], + ), + meta: [], +) \ No newline at end of file diff --git a/assets/common/items/armor/misc/head/facegourd.ron b/assets/common/items/armor/misc/head/facegourd.ron new file mode 100644 index 0000000000..90882a7e88 --- /dev/null +++ b/assets/common/items/armor/misc/head/facegourd.ron @@ -0,0 +1,13 @@ +ItemDef( + name: "Pumpkin Head.", + description: "Halloween attire.", + kind: Armor(( + kind: Head, + stats: Direct(( + energy_max: Some(4.0), + energy_reward: Some(0.04), + )), + )), + quality: Common, + tags: [], +) diff --git a/assets/common/items/food/honeycorn.ron b/assets/common/items/food/honeycorn.ron new file mode 100644 index 0000000000..0ce7dd0fb5 --- /dev/null +++ b/assets/common/items/food/honeycorn.ron @@ -0,0 +1,22 @@ +ItemDef( + name: "Honeycorn", + description: "Sweeet", + kind: Consumable( + kind: Food, + effects: [ + Buff(( + kind: Saturation, + data: ( + strength: 4.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + 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 new file mode 100644 index 0000000000..1d928e84c0 --- /dev/null +++ b/assets/common/items/food/pumpkin_spice_brew.ron @@ -0,0 +1,22 @@ +ItemDef( + name: "Pumpkin Spice Brew", + description: "Brewed from moldy pumpkins.", + kind: Consumable( + kind: Drink, + effects: [ + Buff(( + kind: Saturation, + data: ( + strength: 10.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), + quality: Moderate, + tags: [Food], +) diff --git a/assets/common/loadout/calendar/halloween/trickster.ron b/assets/common/loadout/calendar/halloween/trickster.ron new file mode 100644 index 0000000000..d81718ed85 --- /dev/null +++ b/assets/common/loadout/calendar/halloween/trickster.ron @@ -0,0 +1,31 @@ +#![enable(implicit_some)] +( + head: Choice([ + (1, Item("common.items.armor.misc.head.bamboo_twig")), + (1, Item("common.items.armor.misc.head.boreal_warhelm")), + (1, Item("common.items.armor.misc.head.crown")), + (1, Item("common.items.armor.misc.head.facegourd")), + (1, Item("common.items.armor.misc.head.headband")), + (1, Item("common.items.armor.misc.head.helmet")), + (1, Item("common.items.armor.misc.head.hog_hood")), + (1, Item("common.items.armor.misc.head.hood")), + (1, Item("common.items.armor.misc.head.hood_dark")), + (1, Item("common.items.armor.misc.head.mitre")), + (1, Item("common.items.armor.misc.head.spikeguard")), + (1, Item("common.items.armor.misc.head.straw")), + (1, Item("common.items.armor.misc.head.wanderers_hat")), + (1, Item("common.items.armor.misc.head.winged_coronet")), + (1, Item("common.items.armor.misc.head.bandana.red")), + (1, Item("common.items.armor.misc.head.bandana.thief")), + ]), + chest: Choice([ + (1, Item("common.items.armor.leather_plate.chest")), + ]), + legs: Choice([ + (1, Item("common.items.armor.leather_plate.pants")), + ]), + feet: Choice([ + (1, Item("common.items.armor.misc.foot.sandals")), + (1, Item("common.items.armor.cloth_blue.foot")), + ]), +) \ No newline at end of file diff --git a/assets/common/loot_tables/calendar/halloween/halloween_dullahan.ron b/assets/common/loot_tables/calendar/halloween/halloween_dullahan.ron new file mode 100644 index 0000000000..c5bef9a83c --- /dev/null +++ b/assets/common/loot_tables/calendar/halloween/halloween_dullahan.ron @@ -0,0 +1,4 @@ +[ + (1.0, Item("common.items.food.pumpkin_spice_brew")), + (5.0, Item("common.items.food.honeycorn")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/calendar/halloween/halloween_harvester.ron b/assets/common/loot_tables/calendar/halloween/halloween_harvester.ron new file mode 100644 index 0000000000..dbdc8e14d4 --- /dev/null +++ b/assets/common/loot_tables/calendar/halloween/halloween_harvester.ron @@ -0,0 +1,9 @@ +[ + // Weapons + (5.0, LootTable("common.loot_tables.weapons.tier-3")), + // Armor + (5.0, LootTable("common.loot_tables.armor.tier-3")), + // Misc + (2.0, Item("common.items.armor.misc.head.facegourd")), + (2.0, Item("common.items.lantern.pumpkin")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/calendar/halloween/trickster.ron b/assets/common/loot_tables/calendar/halloween/trickster.ron new file mode 100644 index 0000000000..c5bef9a83c --- /dev/null +++ b/assets/common/loot_tables/calendar/halloween/trickster.ron @@ -0,0 +1,4 @@ +[ + (1.0, Item("common.items.food.pumpkin_spice_brew")), + (5.0, Item("common.items.food.honeycorn")), +] \ No newline at end of file diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index b9fd836549..13d82e3621 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -2858,6 +2858,10 @@ "voxel.armor.misc.head.spikeguard", (0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 1.3, ), + Simple("common.items.armor.misc.head.facegourd"): VoxTrans( + "voxel.armor.misc.head.facegourd", + (0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 1.3, + ), Simple("common.items.armor.misc.head.winged_coronet"): VoxTrans( "voxel.armor.misc.head.winged_coronet", (0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 1.3, @@ -3129,6 +3133,14 @@ "voxel.object.sunflower_ice_tea", (0.0, 0.0, 0.0), (-50.0, -60.0, -35.0), 0.9, ), + Simple("common.items.food.pumpkin_spice_brew"): VoxTrans( + "voxel.object.pumpkin_spice_brew", + (0.0, 0.0, 0.0), (-50.0, -60.0, -35.0), 0.9, + ), + Simple("common.items.food.honeycorn"): VoxTrans( + "voxel.object.honeycorn", + (0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9, + ), Simple("common.items.food.carrot"): VoxTrans( "voxel.sprite.carrot.carrot", (0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9, diff --git a/assets/voxygen/voxel/armor/misc/head/facegourd.vox b/assets/voxygen/voxel/armor/misc/head/facegourd.vox new file mode 100644 index 0000000000..a023cc7088 --- /dev/null +++ b/assets/voxygen/voxel/armor/misc/head/facegourd.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:510deb53420937ac57b054883d213306fd7bea81d7fe19749dac450e67019ddc +size 21464 diff --git a/assets/voxygen/voxel/humanoid_armor_head_manifest.ron b/assets/voxygen/voxel/humanoid_armor_head_manifest.ron index e384d08181..a2ad6c7e07 100644 --- a/assets/voxygen/voxel/humanoid_armor_head_manifest.ron +++ b/assets/voxygen/voxel/humanoid_armor_head_manifest.ron @@ -960,6 +960,55 @@ vox_spec: ("armor.misc.head.spikeguard", (-3.0, -5.0, 7.0)), color: None ), + // + (Human, Female, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-4.0, -5.0, -1.0)), + color: None + ), + (Human, Male, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-4.0, -5.0, -1.0)), + color: None + ), + (Elf, Female, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-3.0, -5.0, -1.0)), + color: None + ), + (Elf, Male, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-3.0, -5.0, -1.0)), + color: None + ), + (Orc, Female, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-3.0, -3.0, -1.0)), + color: None + ), + (Orc, Male, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-3.0, -6.0, 2.0)), + color: None + ), + (Dwarf, Female, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-5.0, -4.0, -1.0)), + color: None + ), + (Dwarf, Male, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-3.0, -3.0, -1.0)), + color: None + ), + (Draugr, Female, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-6.0, -5.0, -1.0)), + color: None + ), + (Draugr, Male, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-6.0, -5.0, 1.0)), + color: None + ), + (Danari, Female, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-2.0, -5.0, 1.0)), + color: None + ), + (Danari, Male, "common.items.armor.misc.head.facegourd"): ( + vox_spec: ("armor.misc.head.facegourd", (-2.0, -5.0, -1.0)), + color: None + ), // Merchant Turban (Human, Male, "common.items.armor.merchant.turban"): ( vox_spec: ("armor.merchant.turban", (-4.0, -7.0, -6.0)), diff --git a/assets/voxygen/voxel/item_drop_manifest.ron b/assets/voxygen/voxel/item_drop_manifest.ron index 4e6d908d7a..432766f6ed 100644 --- a/assets/voxygen/voxel/item_drop_manifest.ron +++ b/assets/voxygen/voxel/item_drop_manifest.ron @@ -720,6 +720,7 @@ Simple("common.items.armor.misc.head.crown"): "voxel.armor.misc.head.crown", Simple("common.items.armor.misc.head.mitre"): "voxel.armor.misc.head.mitre", Simple("common.items.armor.misc.head.spikeguard"): "voxel.armor.misc.head.spikeguard", + Simple("common.items.armor.misc.head.facegourd"): "voxel.armor.misc.head.facegourd", Simple("common.items.armor.misc.head.winged_coronet"): "voxel.armor.misc.head.winged_coronet", Simple("common.items.armor.misc.head.boreal_warhelm"): "voxel.armor.misc.head.boreal_warhelm", Simple("common.items.calendar.christmas.armor.misc.head.woolly_wintercap"): "voxel.armor.misc.head.woolly_wintercap", @@ -793,6 +794,8 @@ Simple("common.items.food.apple_stick"): "voxel.object.apple_stick", Simple("common.items.food.mushroom_stick"): "voxel.object.mushroom_stick", Simple("common.items.food.sunflower_icetea"): "voxel.object.sunflower_ice_tea", + Simple("common.items.food.pumpkin_spice_brew"): "voxel.object.pumpkin_spice_brew", + Simple("common.items.food.honeycorn"): "voxel.object.honeycorn", Simple("common.items.food.carrot"): "voxel.sprite.carrot.carrot", Simple("common.items.food.tomato"): "voxel.sprite.tomato.tomato", Simple("common.items.food.lettuce"): "voxel.sprite.cabbage.cabbage", diff --git a/assets/voxygen/voxel/object/honeycorn.vox b/assets/voxygen/voxel/object/honeycorn.vox new file mode 100644 index 0000000000..ad87dc056e --- /dev/null +++ b/assets/voxygen/voxel/object/honeycorn.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f88142e5e06e25dcf7c832d4f7145b3d945d38e266e5eaf2530c50c5a8330e8 +size 1420 diff --git a/assets/voxygen/voxel/object/pumpkin_spice_brew.vox b/assets/voxygen/voxel/object/pumpkin_spice_brew.vox new file mode 100644 index 0000000000..f0402b0fac --- /dev/null +++ b/assets/voxygen/voxel/object/pumpkin_spice_brew.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47d695c2c8e0a14ffd3cad448e6f5cd12f7139561b8b6b55fb19ddf7b07b3e89 +size 2592 diff --git a/assets/world/wildlife/spawn/calendar/halloween/halloween.ron b/assets/world/wildlife/spawn/calendar/halloween/halloween.ron new file mode 100644 index 0000000000..5322859b7e --- /dev/null +++ b/assets/world/wildlife/spawn/calendar/halloween/halloween.ron @@ -0,0 +1,17 @@ +SpawnEntry ( + name: "Halloween NPCs", + note: "Search for them in forests.", + rules: [ + Pack( + groups: [ + (1, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_harvester")), + (1, (4, 8, "common.entity.calendar.halloween.aggressive.halloween_dullahan")), + (1, (6, 10, "common.entity.calendar.halloween.aggressive.trickster")), + + ], + spawn_mode: Land, + calendar_events: Some([Halloween]), + day_period: [Night, Morning, Noon, Evening], + ), + ], +) diff --git a/world/src/layer/wildlife.rs b/world/src/layer/wildlife.rs index a268ee0472..138e8f3e02 100644 --- a/world/src/layer/wildlife.rs +++ b/world/src/layer/wildlife.rs @@ -167,6 +167,10 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> { "world.wildlife.spawn.calendar.christmas.tundra.core", |c, _col| close(c.temp, CONFIG.snow_temp, 0.15) * BASE_DENSITY * 0.5, ), + ( + "world.wildlife.spawn.calendar.halloween.halloween", + |c, _col| close(c.temp, CONFIG.snow_temp, 0.15) * BASE_DENSITY * 0.5, + ), // Snowy animals ("world.wildlife.spawn.tundra.snow", |c, col| { close(c.temp, CONFIG.snow_temp, 0.3) * BASE_DENSITY * col.snow_cover as i32 as f32 * 1.0 @@ -181,6 +185,15 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> { * 1.0 }, ), + ( + "world.wildlife.spawn.calendar.halloween.halloween", + |c, col| { + close(c.temp, CONFIG.snow_temp, 0.3) + * BASE_DENSITY + * col.snow_cover as i32 as f32 + * 1.0 + }, + ), // Forest animals ("world.wildlife.spawn.tundra.forest", |c, col| { close(c.temp, CONFIG.snow_temp, 0.3) * col.tree_density * BASE_DENSITY * 1.4 @@ -190,6 +203,10 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> { "world.wildlife.spawn.calendar.christmas.tundra.forest", |c, col| close(c.temp, CONFIG.snow_temp, 0.3) * col.tree_density * BASE_DENSITY * 1.4, ), + ( + "world.wildlife.spawn.calendar.halloween.halloween", + |c, col| close(c.temp, CONFIG.snow_temp, 0.3) * col.tree_density * BASE_DENSITY * 1.4, + ), // **Taiga** // Forest core animals ("world.wildlife.spawn.taiga.core_forest", |c, col| { @@ -202,6 +219,12 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> { close(c.temp, CONFIG.snow_temp + 0.2, 0.2) * col.tree_density * BASE_DENSITY * 0.4 }, ), + ( + "world.wildlife.spawn.calendar.halloween.halloween", + |c, col| { + close(c.temp, CONFIG.snow_temp + 0.2, 0.2) * col.tree_density * BASE_DENSITY * 0.4 + }, + ), // Core animals ("world.wildlife.spawn.taiga.core", |c, _col| { close(c.temp, CONFIG.snow_temp + 0.2, 0.2) * BASE_DENSITY * 1.0 @@ -243,6 +266,16 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> { * BASE_DENSITY * 4.0 }), + // Temperate Rainforest animals event + ( + "world.wildlife.spawn.calendar.halloween.halloween", + |c, _col| { + close(c.temp, CONFIG.temperate_temp + 0.1, 0.6) + * close(c.humidity, CONFIG.forest_hum, 0.6) + * BASE_DENSITY + * 4.0 + }, + ), // Water animals ("world.wildlife.spawn.temperate.water", |c, col| { close(c.temp, CONFIG.temperate_temp, 1.0) * col.tree_density * BASE_DENSITY * 5.0 @@ -262,6 +295,16 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> { * BASE_DENSITY * 8.0 }), + // Jungle animals event + ( + "world.wildlife.spawn.calendar.halloween.halloween", + |c, _col| { + close(c.temp, CONFIG.tropical_temp + 0.2, 0.3) + * close(c.humidity, CONFIG.jungle_hum, 0.2) + * BASE_DENSITY + * 8.0 + }, + ), // **Tropical** // Rare river animals ("world.wildlife.spawn.tropical.river_rare", |_c, col| { @@ -308,6 +351,16 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> { * BASE_DENSITY * 2.0 }), + // Tropical Rainforest animals event + ( + "world.wildlife.spawn.calendar.halloween.halloween", + |c, _col| { + close(c.temp, CONFIG.tropical_temp + 0.1, 0.4) + * close(c.humidity, CONFIG.desert_hum, 0.4) + * BASE_DENSITY + * 2.0 + }, + ), // Rock animals ("world.wildlife.spawn.tropical.rock", |c, col| { close(c.temp, CONFIG.tropical_temp + 0.1, 0.5) * col.rock_density * BASE_DENSITY * 5.0