comment addressing, cave tweaks

This commit is contained in:
jshipsey 2021-06-02 00:26:19 -04:00 committed by Marcel Märtens
parent 0e269b59d7
commit 9034d0f25d
50 changed files with 542 additions and 159 deletions

View File

@ -1,12 +1,12 @@
BasicMelee( BasicMelee(
energy_cost: 0, energy_cost: 0,
buildup_duration: 0.6, buildup_duration: 0.25,
swing_duration: 0.1, swing_duration: 0.05,
recover_duration: 0.15, recover_duration: 0.075,
base_damage: 50, base_damage: 50,
base_poise_damage: 0, base_poise_damage: 0,
knockback: ( strength: 0.0, direction: Away), knockback: ( strength: 0.0, direction: Away),
range: 3.5, range: 4.5,
max_angle: 20.0, max_angle: 20.0,
damage_effect: None, damage_effect: None,
damage_kind: Piercing, damage_kind: Piercing,

View File

@ -0,0 +1,15 @@
[
(30, Velorite),
(40, VeloriteFrag),
(70, ShortGrass),
(10, CaveMushroom),
(10, AmethystSmall),
(10, TopazSmall),
(16, SapphireSmall),
(60, CrystalHigh),
(12, EmeraldSmall),
(10, RubySmall),
(8, DiamondSmall),
(5, Chest),
(15, Crate),
]

View File

@ -6,7 +6,7 @@
(10, AmethystSmall), (10, AmethystSmall),
(10, TopazSmall), (10, TopazSmall),
(16, SapphireSmall), (16, SapphireSmall),
(60, Crystal), (60, CrystalLow),
(12, EmeraldSmall), (12, EmeraldSmall),
(30, Cobalt), (30, Cobalt),
(10, Bloodstone), (10, Bloodstone),

View File

@ -0,0 +1,5 @@
[
(120, Liana),
(30, AmethystSmall),
(15, TopazSmall),
]

View File

@ -29,7 +29,7 @@ loot_tables: [
(0.2, true, "common.loot_tables.food.prepared"), (0.2, true, "common.loot_tables.food.prepared"),
// TODO: Change consumables and split them up // TODO: Change consumables and split them up
(1.0, true, "common.loot_tables.consumable.default"), (1.0, true, "common.loot_tables.consumable.default"),
(0.5, false, "common.loot_tables.trading"), (10.5, true, "common.loot_tables.trading"),
], ],
// this is the amount of that good the most common item represents // this is the amount of that good the most common item represents
// so basically this table balances the goods against each other (higher=less valuable) // so basically this table balances the goods against each other (higher=less valuable)

View File

@ -1,9 +0,0 @@
ItemDef(
name: "Cloth Scraps",
description: "Looted from humanoids and their houses.",
kind: Ingredient(
kind: "ClothScraps",
),
quality: Common,
tags: [Textile],
)

View File

@ -1,9 +0,0 @@
ItemDef(
name: "Red Cloth Scraps",
description: "Dyed red with flower pigments.",
kind: Ingredient(
kind: "ClothScrapsRed",
),
quality: Common,
tags: [Textile],
)

View File

@ -1,6 +1,6 @@
ItemDef( ItemDef(
name: "Linen", name: "Linen",
description: "A textile made from the fibers of a plant.", description: "A textile made from flax fibers.",
kind: Ingredient( kind: Ingredient(
kind: "Linen", kind: "Linen",
), ),

View File

@ -0,0 +1,9 @@
ItemDef(
name: "Red Linen",
description: "A flax fiber textile, dyed to stand out.",
kind: Ingredient(
kind: "LinenRed",
),
quality: Low,
tags: [Textile],
)

View File

@ -8,7 +8,7 @@ ItemDef(
equip_time_secs: 0.25, equip_time_secs: 0.25,
power: 0.75, power: 0.75,
poise_strength: 0.25, poise_strength: 0.25,
speed: 0.75, speed: 1.3,
crit_chance: 0.0, crit_chance: 0.0,
crit_mult: 1.0, crit_mult: 1.0,
)), )),

View File

@ -1,3 +1,3 @@
[ [
(1.0, Item("common.items.crafting_ing.cloth.wool", 2, 5)), (1.0, ItemQuantity("common.items.crafting_ing.cloth.wool", 2, 5)),
] ]

View File

@ -1,6 +1,5 @@
[ [
(1.0, Item("common.items.crafting_ing.bowl")), (1.0, Item("common.items.crafting_ing.bowl")),
(1.0, Item("common.items.crafting_ing.empty_vial")), (1.0, Item("common.items.crafting_ing.empty_vial")),
(2.0, Item("common.items.crafting_ing.cloth.cloth_scraps")),
(1.0, Item("common.items.crafting_ing.leather.leather_strips")), (1.0, Item("common.items.crafting_ing.leather.leather_strips")),
] ]

View File

@ -1,5 +1,20 @@
// Loot table that exists purely for price rationalisation // Loot table that exists purely for price rationalisation
[ [
(1.0, Item("common.items.crafting_ing.honey")), (1.0, Item("common.items.crafting_ing.honey")),
(0.5, Item("common.items.crafting_ing.animal_misc.icy_fang")), (0.2, Item("common.items.mineral.ore.bloodstone")),
(1.0, Item("common.items.mineral.ore.coal")),
(0.4, Item("common.items.mineral.ore.cobalt")),
(2.5, Item("common.items.mineral.ore.copper")),
(0.05, Item("common.items.mineral.ore.gold")),
(1.2, Item("common.items.mineral.ore.iron")),
(0.07, Item("common.items.mineral.ore.silver")),
(2.5, Item("common.items.mineral.ore.tin")),
(1.2, Item("common.items.mineral.ore.velorite")),
(0.6, Item("common.items.mineral.ore.veloritefrag")),
(0.8, Item("common.items.mineral.gem.amethyst")),
(0.2, Item("common.items.mineral.gem.diamond")),
(0.6, Item("common.items.mineral.gem.emerald")),
(0.4, Item("common.items.mineral.gem.ruby")),
(0.4, Item("common.items.mineral.gem.sapphire")),
(0.9, Item("common.items.mineral.gem.topaz")),
] ]

View File

@ -20,7 +20,7 @@
output: ("common.items.crafting_tools.sewing_set", 1), output: ("common.items.crafting_tools.sewing_set", 1),
inputs: [ inputs: [
(Item("common.items.crafting_ing.cloth.linen"), 1), (Item("common.items.crafting_ing.cloth.linen"), 1),
(Item("common.items.mineral.ore.tin"), 1), (Item("common.items.mineral.ingot.tin"), 1),
], ],
craft_sprite: Some(CraftingBench), craft_sprite: Some(CraftingBench),
), ),
@ -269,8 +269,8 @@
"bronze ingot": ( "bronze ingot": (
output: ("common.items.mineral.ingot.bronze", 2), output: ("common.items.mineral.ingot.bronze", 2),
inputs: [ inputs: [
(Item("common.items.mineral.ore.copper"), 1), (Item("common.items.mineral.ingot.copper"), 1),
(Item("common.items.mineral.ore.tin"), 1), (Item("common.items.mineral.ingot.tin"), 1),
], ],
craft_sprite: Some(Forge), craft_sprite: Some(Forge),
), ),
@ -361,7 +361,7 @@
inputs: [ inputs: [
(Item("common.items.crafting_ing.twigs"), 5), (Item("common.items.crafting_ing.twigs"), 5),
(Item("common.items.crafting_ing.leather.leather_strips"), 5), (Item("common.items.crafting_ing.leather.leather_strips"), 5),
(Item("common.items.crafting_ing.cloth.cloth_scraps"), 10), (Item("common.items.crafting_ing.cloth.linen"), 10),
(Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.tool.craftsman_hammer"), 0),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
], ],
@ -371,7 +371,7 @@
output: ("common.items.glider.glider_basic_red", 1), output: ("common.items.glider.glider_basic_red", 1),
inputs: [ inputs: [
(Item("common.items.crafting_ing.twigs"), 5), (Item("common.items.crafting_ing.twigs"), 5),
(Item("common.items.crafting_ing.cloth.cloth_scraps_red"), 10), (Item("common.items.crafting_ing.cloth.linen_red"), 10),
(Item("common.items.crafting_ing.leather.thick_leather"), 4), (Item("common.items.crafting_ing.leather.thick_leather"), 4),
(Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.tool.craftsman_hammer"), 0),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
@ -383,7 +383,7 @@
inputs: [ inputs: [
(Item("common.items.crafting_ing.twigs"), 5), (Item("common.items.crafting_ing.twigs"), 5),
(Item("common.items.crafting_ing.leather.thick_leather"), 4), (Item("common.items.crafting_ing.leather.thick_leather"), 4),
(Item("common.items.crafting_ing.cloth.cloth_scraps"), 5), (Item("common.items.crafting_ing.cloth.linen"), 5),
(Item("common.items.mineral.gem.emerald"), 1), (Item("common.items.mineral.gem.emerald"), 1),
(Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.tool.craftsman_hammer"), 0),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
@ -396,7 +396,7 @@
(Item("common.items.crafting_ing.animal_misc.raptor_feather"), 6), (Item("common.items.crafting_ing.animal_misc.raptor_feather"), 6),
(Item("common.items.crafting_ing.twigs"), 5), (Item("common.items.crafting_ing.twigs"), 5),
(Item("common.items.crafting_ing.leather.thick_leather"), 4), (Item("common.items.crafting_ing.leather.thick_leather"), 4),
(Item("common.items.crafting_ing.cloth.cloth_scraps"), 5), (Item("common.items.crafting_ing.cloth.linen"), 5),
(Item("common.items.mineral.gem.ruby"), 1), (Item("common.items.mineral.gem.ruby"), 1),
(Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.tool.craftsman_hammer"), 0),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
@ -409,7 +409,7 @@
(Item("common.items.crafting_ing.animal_misc.raptor_feather"), 6), (Item("common.items.crafting_ing.animal_misc.raptor_feather"), 6),
(Item("common.items.crafting_ing.twigs"), 5), (Item("common.items.crafting_ing.twigs"), 5),
(Item("common.items.crafting_ing.leather.thick_leather"), 4), (Item("common.items.crafting_ing.leather.thick_leather"), 4),
(Item("common.items.crafting_ing.cloth.cloth_scraps"), 5), (Item("common.items.crafting_ing.cloth.linen"), 5),
(Item("common.items.crafting_ing.animal_misc.icy_fang"), 1), (Item("common.items.crafting_ing.animal_misc.icy_fang"), 1),
(Item("common.items.mineral.gem.ruby"), 1), (Item("common.items.mineral.gem.ruby"), 1),
(Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.tool.craftsman_hammer"), 0),
@ -423,7 +423,7 @@
(Item("common.items.crafting_ing.animal_misc.raptor_feather"), 6), (Item("common.items.crafting_ing.animal_misc.raptor_feather"), 6),
(Item("common.items.crafting_ing.twigs"), 15), (Item("common.items.crafting_ing.twigs"), 15),
(Item("common.items.crafting_ing.leather.leather_strips"), 5), (Item("common.items.crafting_ing.leather.leather_strips"), 5),
(Item("common.items.crafting_ing.cloth.cloth_scraps"), 5), (Item("common.items.crafting_ing.cloth.linen"), 5),
(Item("common.items.mineral.gem.ruby"), 1), (Item("common.items.mineral.gem.ruby"), 1),
(Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.tool.craftsman_hammer"), 0),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
@ -1590,7 +1590,7 @@
"Seashell Necklace": ( "Seashell Necklace": (
output: ("common.items.armor.misc.neck.shell", 1), output: ("common.items.armor.misc.neck.shell", 1),
inputs: [ inputs: [
(Item("common.items.crafting_ing.cloth.cloth_scraps"), 2), (Item("common.items.crafting_ing.cloth.linen"), 2),
(Item("common.items.mineral.gem.sapphire"), 1), (Item("common.items.mineral.gem.sapphire"), 1),
(Item("common.items.crafting_ing.seashells"), 3), (Item("common.items.crafting_ing.seashells"), 3),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
@ -1598,9 +1598,9 @@
craft_sprite: Some(CraftingBench), craft_sprite: Some(CraftingBench),
), ),
"red cloth": ( "red cloth": (
output: ("common.items.crafting_ing.cloth.cloth_scraps_red", 1), output: ("common.items.crafting_ing.cloth.linen_red", 1),
inputs: [ inputs: [
(Item("common.items.crafting_ing.cloth.cloth_scraps"), 1), (Item("common.items.crafting_ing.cloth.linen"), 1),
(Item("common.items.flowers.red"), 1), (Item("common.items.flowers.red"), 1),
(Item("common.items.crafting_tools.mortar_pestle"), 0), (Item("common.items.crafting_tools.mortar_pestle"), 0),
], ],
@ -1608,7 +1608,7 @@
"tiny red pouch": ( "tiny red pouch": (
output: ("common.items.armor.misc.bag.tiny_red_pouch", 1), output: ("common.items.armor.misc.bag.tiny_red_pouch", 1),
inputs: [ inputs: [
(Item("common.items.crafting_ing.cloth.cloth_scraps_red"), 3), (Item("common.items.crafting_ing.cloth.linen_red"), 3),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
], ],
), ),
@ -1622,7 +1622,7 @@
"knitted red pouch": ( "knitted red pouch": (
output: ("common.items.armor.misc.bag.knitted_red_pouch", 1), output: ("common.items.armor.misc.bag.knitted_red_pouch", 1),
inputs: [ inputs: [
(Item("common.items.crafting_ing.cloth.cloth_scraps_red"), 3), (Item("common.items.crafting_ing.cloth.linen_red"), 3),
(Item("common.items.armor.misc.bag.tiny_red_pouch"), 2), (Item("common.items.armor.misc.bag.tiny_red_pouch"), 2),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
], ],
@ -1630,7 +1630,7 @@
"woven red bag": ( "woven red bag": (
output: ("common.items.armor.misc.bag.woven_red_bag", 1), output: ("common.items.armor.misc.bag.woven_red_bag", 1),
inputs: [ inputs: [
(Item("common.items.crafting_ing.cloth.cloth_scraps_red"), 6), (Item("common.items.crafting_ing.cloth.linen_red"), 6),
(Item("common.items.armor.misc.bag.knitted_red_pouch"), 1), (Item("common.items.armor.misc.bag.knitted_red_pouch"), 1),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
], ],
@ -1640,7 +1640,7 @@
inputs: [ inputs: [
(Item("common.items.mineral.gem.diamond"), 2), (Item("common.items.mineral.gem.diamond"), 2),
(Item("common.items.crafting_ing.twigs"), 2), (Item("common.items.crafting_ing.twigs"), 2),
(Item("common.items.crafting_ing.cloth.cloth_scraps"), 3), (Item("common.items.crafting_ing.cloth.linen"), 3),
(Item("common.items.crafting_ing.leather.leather_strips"), 3), (Item("common.items.crafting_ing.leather.leather_strips"), 3),
(Item("common.items.armor.misc.bag.tiny_leather_pouch"), 2), (Item("common.items.armor.misc.bag.tiny_leather_pouch"), 2),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
@ -1651,7 +1651,7 @@
output: ("common.items.armor.misc.bag.sturdy_red_backpack", 1), output: ("common.items.armor.misc.bag.sturdy_red_backpack", 1),
inputs: [ inputs: [
(Item("common.items.mineral.gem.diamond"), 2), (Item("common.items.mineral.gem.diamond"), 2),
(Item("common.items.crafting_ing.cloth.cloth_scraps_red"), 3), (Item("common.items.crafting_ing.cloth.linen_red"), 3),
(Item("common.items.crafting_ing.leather.thick_leather"), 3), (Item("common.items.crafting_ing.leather.thick_leather"), 3),
(Item("common.items.armor.misc.bag.woven_red_bag"), 1), (Item("common.items.armor.misc.bag.woven_red_bag"), 1),
(Item("common.items.crafting_tools.sewing_set"), 0), (Item("common.items.crafting_tools.sewing_set"), 0),
@ -1679,14 +1679,14 @@
"pickaxe": ( "pickaxe": (
output: ("common.items.tool.pick", 1), output: ("common.items.tool.pick", 1),
inputs: [ inputs: [
(Item("common.items.crafting_ing.cloth.cloth_scraps"), 1), // TODO: Replace with plant fiber when obtainable (Item("common.items.crafting_ing.cloth.linen"), 1), // TODO: Replace with plant fiber when obtainable
(Item("common.items.crafting_ing.stones"), 5), // TODO: Replace with iron ingots when obtainable (Item("common.items.crafting_ing.stones"), 5), // TODO: Replace with iron ingots when obtainable
(Item("common.items.crafting_ing.twigs"), 4), (Item("common.items.crafting_ing.twigs"), 4),
(Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.tool.craftsman_hammer"), 0),
], ],
craft_sprite: Some(Anvil), craft_sprite: Some(Anvil),
), ),
"cloth_scraps": ( "linen": (
output: ("common.items.crafting_ing.cloth.linen", 1), output: ("common.items.crafting_ing.cloth.linen", 1),
inputs: [ inputs: [
(Tag(Material((material: Linen))), 1), (Tag(Material((material: Linen))), 1),

View File

@ -2573,6 +2573,10 @@
"voxel.sprite.crafting_ing.cloth.sunsilk", "voxel.sprite.crafting_ing.cloth.sunsilk",
(0.0, 0.0, 0.0), (-65.0, 0.0, 20.0), 0.9, (0.0, 0.0, 0.0), (-65.0, 0.0, 20.0), 0.9,
), ),
Ingredient("LinenRed"): VoxTrans(
"voxel.sprite.crafting_ing.cloth.linen_red",
(0.0, 0.0, 0.0), (-65.0, 0.0, 20.0), 0.9,
),
Ingredient("SilverIngot"): VoxTrans( Ingredient("SilverIngot"): VoxTrans(
"voxel.sprite.mineral.ingot.silver", "voxel.sprite.mineral.ingot.silver",
(0.0, 0.0, 0.0), (70.0, 30.0, 170.0), 0.85, (0.0, 0.0, 0.0), (70.0, 30.0, 170.0), 0.85,
@ -2651,12 +2655,6 @@
Ingredient("TrollLeather"): Png( Ingredient("TrollLeather"): Png(
"element.items.item_leather_green", "element.items.item_leather_green",
), ),
Ingredient("ClothScraps"): Png(
"element.items.item_cloth0",
),
Ingredient("ClothScrapsRed"): Png(
"element.items.item_cloth_red",
),
Ingredient("MortarPestle"): Png( Ingredient("MortarPestle"): Png(
"element.items.item_mortarpestlecoco", "element.items.item_mortarpestlecoco",
), ),

View File

@ -70,6 +70,7 @@ const int LASER = 28;
const int BUBBLES = 29; const int BUBBLES = 29;
const int WATER = 30; const int WATER = 30;
const int ICE_SPIKES = 31; const int ICE_SPIKES = 31;
const int DUST = 31;
// meters per second squared (acceleration) // meters per second squared (acceleration)
const float earth_gravity = 9.807; const float earth_gravity = 9.807;
@ -531,6 +532,17 @@ void main() {
spin_in_axis(vec3(1,0,0),0) spin_in_axis(vec3(1,0,0),0)
); );
break; break;
case DUST:
attr = Attr(
linear_motion(
vec3(0),
normalize(vec3(rand4, rand5, rand6)) + grav_vel(earth_gravity)
),
vec3((2.0 * (1 - slow_start(0.2)))),
vec4(1, 1, 0, 1),
spin_in_axis(vec3(1,0,0),0)
);
break;
default: default:
attr = Attr( attr = Attr(
linear_motion( linear_motion(

BIN
assets/voxygen/voxel/sprite/crafting_ing/cloth/linen_red.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -574,7 +574,7 @@ Liana: Some((
lod_axes: (0.0, 0.0, 0.5), lod_axes: (0.0, 0.0, 0.5),
), ),
], ],
wind_sway: 0.05, wind_sway: 0.0,
)), )),
// Velorite // Velorite
@ -2982,15 +2982,110 @@ Gold: Some((
], ],
wind_sway: 0.0, wind_sway: 0.0,
)), )),
Crystal: Some(( CrystalHigh: Some((
variations: [ variations: [
( (
model: "voxygen.voxel.sprite.mineral.gem.crystal-0", model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.blue-0",
offset: (-8.5, -8.5, 0.0), offset: (-8.5, -9.0, -7.0),
lod_axes: (0.0, 0.0, 0.0), lod_axes: (1.0, 1.0, 1.0),
), ),
], (
wind_sway: 0.0, model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.blue-1",
offset: (-8.0, -8.0, -10.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.blue-2",
offset: (-11.5, -12.5, -9.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.purple-0",
offset: (-8.5, -9.0, -7.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.purple-1",
offset: (-8.0, -8.0, -10.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.purple-2",
offset: (-11.5, -12.5, -9.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.purple-3",
offset: (-11.5, -12.5, -49.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.green-0",
offset: (-8.5, -9.0, -7.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.green-1",
offset: (-8.0, -8.0, -10.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.ceiling.green-2",
offset: (-11.5, -12.5, -9.0),
lod_axes: (1.0, 1.0, 1.0),
)
],
wind_sway: 0.0,
)),
CrystalLow: Some((
variations: [
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.floor.blue-0",
offset: (-8.5, -9.0, 0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.floor.blue-1",
offset: (-8.0, -8.0, 0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.floor.blue-2",
offset: (-11.5, -12.5, 0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.floor.purple-0",
offset: (-8.5, -9.0, 0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.floor.purple-1",
offset: (-8.0, -8.0, 0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.floor.purple-2",
offset: (-11.5, -12.5, 0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.floor.green-0",
offset: (-8.5, -9.0, 0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.floor.green-1",
offset: (-8.0, -8.0, 0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.mineral.deposit.crystal.floor.green-2",
offset: (-11.5, -12.5, 0.0),
lod_axes: (1.0, 1.0, 1.0),
)
],
wind_sway: 0.0,
)), )),
Cotton: Some(( Cotton: Some((
variations: [ variations: [
@ -3000,7 +3095,7 @@ Cotton: Some((
lod_axes: (0.0, 0.0, 0.0), lod_axes: (0.0, 0.0, 0.0),
), ),
], ],
wind_sway: 0.0, wind_sway: 0.4,
)), )),
Moonbell: Some(( Moonbell: Some((
variations: [ variations: [

View File

@ -59,7 +59,12 @@
deep_stone_color: (125, 120, 130), deep_stone_color: (125, 120, 130),
layer: ( layer: (
bridge: (80, 80, 100), bridge: (80, 80, 100),
stalagtite: (77, 91, 161), stalagtite: (90, 71, 112),
cave_floor: (42, 39, 82),
cave_roof: (38, 21, 79),
dirt: (69, 48, 15),
scaffold: (195, 190, 212),
vein: (222, 140, 39),
), ),
site: ( site: (
castle: (), castle: (),

View File

@ -859,12 +859,12 @@ impl Item {
SpriteKind::Diamond => "common.items.mineral.gem.diamond", SpriteKind::Diamond => "common.items.mineral.gem.diamond",
SpriteKind::Sapphire => "common.items.mineral.gem.sapphire", SpriteKind::Sapphire => "common.items.mineral.gem.sapphire",
SpriteKind::Topaz => "common.items.mineral.gem.topaz", SpriteKind::Topaz => "common.items.mineral.gem.topaz",
SpriteKind::Emerald => "common.items.mineral.emerald", SpriteKind::Emerald => "common.items.mineral.gem.emerald",
SpriteKind::AmethystSmall => "common.items.mineral.gem.amethyst", SpriteKind::AmethystSmall => "common.items.mineral.gem.amethyst",
SpriteKind::TopazSmall => "common.items.mineral.gem.topaz", SpriteKind::TopazSmall => "common.items.mineral.gem.topaz",
SpriteKind::DiamondSmall => "common.items.mineral.gem.diamond", SpriteKind::DiamondSmall => "common.items.mineral.gem.diamond",
SpriteKind::RubySmall => "common.items.mineral.gem.ruby", SpriteKind::RubySmall => "common.items.mineral.gem.ruby",
SpriteKind::EmeraldSmall => "common.items.mineral.emerald", SpriteKind::EmeraldSmall => "common.items.mineral.gem.emerald",
SpriteKind::SapphireSmall => "common.items.mineral.gem.sapphire", SpriteKind::SapphireSmall => "common.items.mineral.gem.sapphire",
SpriteKind::Bloodstone => "common.items.mineral.ore.bloodstone", SpriteKind::Bloodstone => "common.items.mineral.ore.bloodstone",
SpriteKind::Coal => "common.items.mineral.ore.coal", SpriteKind::Coal => "common.items.mineral.ore.coal",

View File

@ -176,7 +176,10 @@ impl Block {
| SpriteKind::WallSconce | SpriteKind::WallSconce
| SpriteKind::FireBowlGround => Some(16), | SpriteKind::FireBowlGround => Some(16),
SpriteKind::Velorite | SpriteKind::VeloriteFrag => Some(6), SpriteKind::Velorite | SpriteKind::VeloriteFrag => Some(6),
SpriteKind::CaveMushroom | SpriteKind::CookingPot | SpriteKind::Crystal => Some(16), SpriteKind::CaveMushroom
| SpriteKind::CookingPot
| SpriteKind::CrystalHigh
| SpriteKind::CrystalLow => Some(16),
SpriteKind::Amethyst SpriteKind::Amethyst
| SpriteKind::Ruby | SpriteKind::Ruby
| SpriteKind::Sapphire | SpriteKind::Sapphire

View File

@ -156,7 +156,7 @@ make_case_elim!(
DungeonChest5 = 0x81, DungeonChest5 = 0x81,
Loom = 0x82, Loom = 0x82,
SpinningWheel = 0x83, SpinningWheel = 0x83,
Crystal = 0x84, CrystalHigh = 0x84,
Bloodstone = 0x85, Bloodstone = 0x85,
Coal = 0x86, Coal = 0x86,
Cobalt = 0x87, Cobalt = 0x87,
@ -170,6 +170,7 @@ make_case_elim!(
Pyrebloom = 0x8F, Pyrebloom = 0x8F,
TanningRack = 0x90, TanningRack = 0x90,
WildFlax = 0x91, WildFlax = 0x91,
CrystalLow = 0x92,
} }
); );
@ -244,7 +245,7 @@ impl SpriteKind {
// TODO: Figure out if this should be solid or not. // TODO: Figure out if this should be solid or not.
SpriteKind::Shelf => 1.0, SpriteKind::Shelf => 1.0,
SpriteKind::Lantern => 0.9, SpriteKind::Lantern => 0.9,
SpriteKind::Crystal => 1.5, SpriteKind::CrystalHigh | SpriteKind::CrystalLow => 1.5,
SpriteKind::Bloodstone SpriteKind::Bloodstone
| SpriteKind::Coal | SpriteKind::Coal
| SpriteKind::Cobalt | SpriteKind::Cobalt

View File

@ -90,9 +90,9 @@ SET item_definition_id = 'common.items.crafting_ing.hide.carapace' WHERE item_de
UPDATE item UPDATE item
SET item_definition_id = 'common.items.crafting_ing.animal_misc.claw' WHERE item_definition_id = 'common.items.crafting_ing.claw'; SET item_definition_id = 'common.items.crafting_ing.animal_misc.claw' WHERE item_definition_id = 'common.items.crafting_ing.claw';
UPDATE item UPDATE item
SET item_definition_id = 'common.items.crafting_ing.cloth.cloth_scraps' WHERE item_definition_id = 'common.items.crafting_ing.cloth_scraps'; SET item_definition_id = 'common.items.crafting_ing.cloth.cloth_scraps' WHERE item_definition_id = 'common.items.crafting_ing.linen';
UPDATE item UPDATE item
SET item_definition_id = 'common.items.crafting_ing.cloth.cloth_scraps_red' WHERE item_definition_id = 'common.items.crafting_ing.cloth_scraps_red'; SET item_definition_id = 'common.items.crafting_ing.cloth.cloth_scraps_red' WHERE item_definition_id = 'common.items.crafting_ing.linen_red';
UPDATE item UPDATE item
SET item_definition_id = 'common.items.mineral.ore.coal' WHERE item_definition_id = 'common.items.crafting_ing.coal'; SET item_definition_id = 'common.items.mineral.ore.coal' WHERE item_definition_id = 'common.items.crafting_ing.coal';
UPDATE item UPDATE item

View File

@ -82,6 +82,7 @@ pub enum ParticleMode {
Bubbles = 29, Bubbles = 29,
Water = 30, Water = 30,
IceSpikes = 31, IceSpikes = 31,
Dust = 32,
} }
impl ParticleMode { impl ParticleMode {

View File

@ -1047,6 +1047,14 @@ impl ParticleMgr {
mode: ParticleMode::Leaf, mode: ParticleMode::Leaf,
cond: |_| true, cond: |_| true,
}, },
BlockParticles {
blocks: |boi| &boi.dust,
range: 4,
rate: 0.004,
lifetime: 20.0,
mode: ParticleMode::Dust,
cond: |_| true,
},
BlockParticles { BlockParticles {
blocks: |boi| &boi.fires, blocks: |boi| &boi.fires,
range: 2, range: 2,

View File

@ -16,6 +16,7 @@ pub enum Interaction {
#[derive(Default)] #[derive(Default)]
pub struct BlocksOfInterest { pub struct BlocksOfInterest {
pub leaves: Vec<Vec3<i32>>, pub leaves: Vec<Vec3<i32>>,
pub dust: Vec<Vec3<i32>>,
pub grass: Vec<Vec3<i32>>, pub grass: Vec<Vec3<i32>>,
pub river: Vec<Vec3<i32>>, pub river: Vec<Vec3<i32>>,
pub fires: Vec<Vec3<i32>>, pub fires: Vec<Vec3<i32>>,
@ -41,6 +42,7 @@ impl BlocksOfInterest {
pub fn from_chunk(chunk: &TerrainChunk) -> Self { pub fn from_chunk(chunk: &TerrainChunk) -> Self {
span!(_guard, "from_chunk", "BlocksOfInterest::from_chunk"); span!(_guard, "from_chunk", "BlocksOfInterest::from_chunk");
let mut leaves = Vec::new(); let mut leaves = Vec::new();
let mut dust = Vec::new();
let mut grass = Vec::new(); let mut grass = Vec::new();
let mut river = Vec::new(); let mut river = Vec::new();
let mut fires = Vec::new(); let mut fires = Vec::new();
@ -70,6 +72,7 @@ impl BlocksOfInterest {
.for_each(|(pos, block)| { .for_each(|(pos, block)| {
match block.kind() { match block.kind() {
BlockKind::Leaves if thread_rng().gen_range(0..16) == 0 => leaves.push(pos), BlockKind::Leaves if thread_rng().gen_range(0..16) == 0 => leaves.push(pos),
BlockKind::WeakRock if thread_rng().gen_range(0..6) == 0 => dust.push(pos),
BlockKind::Grass => { BlockKind::Grass => {
if thread_rng().gen_range(0..16) == 0 { if thread_rng().gen_range(0..16) == 0 {
grass.push(pos); grass.push(pos);
@ -101,6 +104,7 @@ impl BlocksOfInterest {
}, },
Some(SpriteKind::WallSconce) => fire_bowls.push(pos + Vec3::unit_z()), Some(SpriteKind::WallSconce) => fire_bowls.push(pos + Vec3::unit_z()),
Some(SpriteKind::Beehive) => beehives.push(pos), Some(SpriteKind::Beehive) => beehives.push(pos),
Some(SpriteKind::CrystalHigh) => fireflies.push(pos),
Some(SpriteKind::Reed) => { Some(SpriteKind::Reed) => {
reeds.push(pos); reeds.push(pos);
fireflies.push(pos); fireflies.push(pos);
@ -152,6 +156,7 @@ impl BlocksOfInterest {
Self { Self {
leaves, leaves,
dust,
grass, grass,
river, river,
fires, fires,

View File

@ -30,6 +30,11 @@ use vek::*;
pub struct Colors { pub struct Colors {
pub bridge: (u8, u8, u8), pub bridge: (u8, u8, u8),
pub stalagtite: (u8, u8, u8), pub stalagtite: (u8, u8, u8),
pub cave_floor: (u8, u8, u8),
pub cave_roof: (u8, u8, u8),
pub dirt: (u8, u8, u8),
pub scaffold: (u8, u8, u8),
pub vein: (u8, u8, u8),
} }
const EMPTY_AIR: Block = Block::air(SpriteKind::Empty); const EMPTY_AIR: Block = Block::air(SpriteKind::Empty);
@ -118,6 +123,8 @@ pub fn apply_caves_to(canvas: &mut Canvas, rng: &mut impl Rng) {
let cave_x = (cave_dist / cave.width).min(1.0); let cave_x = (cave_dist / cave.width).min(1.0);
// Relative units // Relative units
let cave_depth = (col.alt - cave.alt).max(0.0);
let cave_floor = 0.0 - 0.5 * (1.0 - cave_x.powi(2)).max(0.0).sqrt() * cave.width; let cave_floor = 0.0 - 0.5 * (1.0 - cave_x.powi(2)).max(0.0).sqrt() * cave.width;
let cave_height = (1.0 - cave_x.powi(2)).max(0.0).sqrt() * cave.width; let cave_height = (1.0 - cave_x.powi(2)).max(0.0).sqrt() * cave.width;
@ -144,7 +151,26 @@ pub fn apply_caves_to(canvas: &mut Canvas, rng: &mut impl Rng) {
}); });
} }
} }
let noisy_color = |color: Rgb<u8>, factor: u32| {
let nz = RandomField::new(0).get(Vec3::new(wpos2d.x, wpos2d.y, surface_z));
color.map(|e| {
(e as u32 + nz % (factor * 2))
.saturating_sub(factor)
.min(255) as u8
})
};
let difficulty = cave_depth / 100.0;
let ridge_condition = cave_depth % 10.0 > 8.0;
let pit_condition = cave_depth % 35.0 > 30.0 && cave_x > 0.4 && cave_depth > 200.0;
let pit_depth = 30;
let floor_dist = pit_condition as i32 * pit_depth as i32;
let vein_condition =
cave_depth % 12.0 > 11.8 && cave_x > 0.4 && cave_x < 0.65 && cave_depth > 200.0;
let stalagtite_condition = cave_depth > 150.0;
let vein_dist = 2;
let vein_floor = cave_base - vein_dist;
// Stalagtites // Stalagtites
let stalagtites = info let stalagtites = info
.index() .index()
@ -164,61 +190,216 @@ pub fn apply_caves_to(canvas: &mut Canvas, rng: &mut impl Rng) {
if canvas if canvas
.get(Vec3::new(wpos2d.x, wpos2d.y, cave_roof)) .get(Vec3::new(wpos2d.x, wpos2d.y, cave_roof))
.is_filled() .is_filled()
&& stalagtite_condition
{ {
for z in cave_roof - stalagtites..cave_roof { for z in cave_roof - stalagtites..cave_roof {
canvas.set( canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z), Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new( Block::new(
BlockKind::WeakRock, BlockKind::WeakRock,
info.index().colors.layer.stalagtite.into(), noisy_color(info.index().colors.layer.stalagtite.into(), 8),
), ),
); );
} }
} }
let cave_depth = (col.alt - cave.alt).max(0.0); let ground_colors = if cave_roof - cave_base > 23 {
let difficulty = cave_depth / 100.0; noisy_color(info.index().colors.layer.cave_floor.into(), 8)
} else {
noisy_color(info.index().colors.layer.dirt.into(), 8)
};
//make pits
for z in cave_base - pit_depth..cave_base {
if pit_condition && (cave_roof - cave_base) > 10 {
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(
BlockKind::Air,
noisy_color(info.index().colors.layer.scaffold.into(), 8),
),
);
}
}
//fill bottom of pits
for z in cave_base - pit_depth
..cave_base - pit_depth + ((cave_x.powf(4.0) * pit_depth as f32 + 3.0) as i32) + 1
{
if (cave_roof - cave_base) > 10 && pit_condition {
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(BlockKind::WeakRock, ground_colors),
);
}
}
//empty veins
for z in cave_base - vein_dist..cave_base {
if vein_condition {
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(
BlockKind::Air,
noisy_color(info.index().colors.layer.scaffold.into(), 8),
),
);
}
}
//fill veins except bottom later
for z in cave_base - vein_dist + 1..cave_base {
if vein_condition {
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(
BlockKind::WeakRock,
noisy_color(info.index().colors.layer.vein.into(), 8),
),
);
}
}
//fill some of bottom
for z in cave_base - vein_dist..cave_base - vein_dist + 1 {
if rng.gen::<f32>() < 0.5 && vein_condition {
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(
BlockKind::WeakRock,
noisy_color(info.index().colors.layer.vein.into(), 8),
),
);
}
}
if vein_condition && cave_base < surface_z as i32 - 25 {
let kind = *Lottery::<SpriteKind>::load_expect("common.cave_scatter.deep_floor")
.read()
.choose();
canvas.map(Vec3::new(wpos2d.x, wpos2d.y, vein_floor), |block| {
block.with_sprite(kind)
});
}
//fill normal floor
for z in cave_base..cave_base + 1 {
if cave_depth > 15.0
&& (cave_roof - cave_base) > 10
&& !pit_condition
&& !vein_condition
{
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(BlockKind::WeakRock, ground_colors),
);
}
}
//fill roof
for z in cave_roof - 1..cave_roof {
if cave_depth > 30.0 && (cave_roof - cave_base) > 10 {
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(
BlockKind::WeakRock,
noisy_color(info.index().colors.layer.cave_roof.into(), 8),
),
);
}
}
//add ridges
for z in cave_roof - 4..cave_roof {
if cave_depth > 50.0 && ridge_condition && (cave_roof - cave_base) > 10 {
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(
BlockKind::WeakRock,
noisy_color(info.index().colors.layer.scaffold.into(), 8),
),
);
}
}
let cave_roof_adjusted = if (cave_roof - cave_base) > 10 {
cave_roof - 1
} else {
cave_roof
};
let cave_floor_adjusted = if (cave_roof - cave_base) > 10 {
cave_base + 1 - floor_dist
} else {
cave_base - floor_dist
};
// Scatter things in caves // Scatter things in caves
if difficulty.round() < 2.0 { if cave_depth < 80.0 {
if rng.gen::<f32>() if rng.gen::<f32>()
< 0.75 * (difficulty / 2.0).powf(2.5) * (cave_x.max(0.5).powf(4.0)) < 0.3 * (difficulty / 3.0).powf(2.5) * (cave_x.max(0.5).powf(4.0))
&& cave_base < surface_z as i32 - 25 && !vein_condition
{ {
let kind = *Lottery::<SpriteKind>::load_expect("common.cave_scatter.shallow") let kind =
.read() *Lottery::<SpriteKind>::load_expect("common.cave_scatter.deep_floor")
.choose(); .read()
canvas.map(Vec3::new(wpos2d.x, wpos2d.y, cave_base), |block| { .choose();
block.with_sprite(kind) canvas.map(
}); Vec3::new(wpos2d.x, wpos2d.y, cave_floor_adjusted),
let kind2 = *Lottery::<SpriteKind>::load_expect("common.cave_scatter.shallow") |block| block.with_sprite(kind),
.read() );
.choose(); }
canvas.map(Vec3::new(wpos2d.x, wpos2d.y, cave_roof - 1), |block| { if rng.gen::<f32>() < 0.3 * (difficulty / 3.0).powf(2.5) && !ridge_condition {
block.with_sprite(kind2) let kind =
}); *Lottery::<SpriteKind>::load_expect("common.cave_scatter.shallow_ceiling")
.read()
.choose();
canvas.map(
Vec3::new(wpos2d.x, wpos2d.y, cave_roof_adjusted - 1),
|block| block.with_sprite(kind),
);
}
} else if cave_depth < 150.0 {
if rng.gen::<f32>()
< 0.3 * (difficulty / 3.0).powf(2.5) * (cave_x.max(0.5).powf(4.0))
&& !vein_condition
{
let kind =
*Lottery::<SpriteKind>::load_expect("common.cave_scatter.deep_floor")
.read()
.choose();
canvas.map(
Vec3::new(wpos2d.x, wpos2d.y, cave_floor_adjusted),
|block| block.with_sprite(kind),
);
}
if rng.gen::<f32>() < 0.3 * (difficulty / 3.0).powf(2.5) && !ridge_condition {
let kind =
*Lottery::<SpriteKind>::load_expect("common.cave_scatter.deep_ceiling")
.read()
.choose();
canvas.map(
Vec3::new(wpos2d.x, wpos2d.y, cave_roof_adjusted - 1),
|block| block.with_sprite(kind),
);
} }
} else { } else {
if rng.gen::<f32>() if rng.gen::<f32>()
< 0.3 * (difficulty / 3.0).powf(2.5) * (cave_x.max(0.5).powf(4.0)) < 0.3 * (difficulty / 3.0).powf(2.5) * (cave_x.max(0.5).powf(4.0))
&& cave_base < surface_z as i32 - 25 && !vein_condition
{ {
let kind = *Lottery::<SpriteKind>::load_expect("common.cave_scatter.deep") let kind =
.read() *Lottery::<SpriteKind>::load_expect("common.cave_scatter.shallow_floor")
.choose(); .read()
canvas.map(Vec3::new(wpos2d.x, wpos2d.y, cave_base), |block| { .choose();
block.with_sprite(kind) canvas.map(
}); Vec3::new(wpos2d.x, wpos2d.y, cave_floor_adjusted),
|block| block.with_sprite(kind),
);
} }
if rng.gen::<f32>() < 0.3 * (difficulty / 3.0).powf(2.5) if rng.gen::<f32>() < 0.3 * (difficulty / 3.0).powf(2.5) && !ridge_condition {
&& cave_base < surface_z as i32 - 25 let kind =
{ *Lottery::<SpriteKind>::load_expect("common.cave_scatter.shallow_ceiling")
let kind = *Lottery::<SpriteKind>::load_expect("common.cave_scatter.deep") .read()
.read() .choose();
.choose(); canvas.map(
canvas.map(Vec3::new(wpos2d.x, wpos2d.y, cave_roof - 1), |block| { Vec3::new(wpos2d.x, wpos2d.y, cave_roof_adjusted - 1),
block.with_sprite(kind) |block| block.with_sprite(kind),
}); );
} }
}; };
} }
@ -260,7 +441,7 @@ pub fn apply_caves_supplement<'a>(
// Abs units // Abs units
let cave_base = (cave.alt + cave_floor) as i32; let cave_base = (cave.alt + cave_floor) as i32;
let cave_depth = (col_sample.alt - cave.alt).max(0.0); let cave_depth = (col_sample.alt - cave.alt).max(0.0); //slightly different from earlier cave depth?
let difficulty = cave_depth / 50.0; let difficulty = cave_depth / 50.0;
// Scatter things in caves // Scatter things in caves
@ -273,49 +454,44 @@ pub fn apply_caves_supplement<'a>(
wpos2d.y as f32, wpos2d.y as f32,
cave_base as f32, cave_base as f32,
)) ))
.with_body(match difficulty.round() as i32 { .with_body(if cave_depth < 80.0 {
0 | 1 | 2 => { is_hostile = false;
is_hostile = false; let species = match dynamic_rng.gen_range(0..4) {
let species = match dynamic_rng.gen_range(0..4) { 0 => comp::quadruped_small::Species::Truffler,
0 => comp::quadruped_small::Species::Truffler, 1 => comp::quadruped_small::Species::Dodarock,
1 => comp::quadruped_small::Species::Dodarock, 2 => comp::quadruped_small::Species::Holladon,
2 => comp::quadruped_small::Species::Holladon, _ => comp::quadruped_small::Species::Batfox,
_ => comp::quadruped_small::Species::Batfox, };
}; comp::quadruped_small::Body::random_with(dynamic_rng, &species).into()
comp::quadruped_small::Body::random_with(dynamic_rng, &species).into() } else if cave_depth < 130.0 {
}, is_hostile = true;
3 => { let species = match dynamic_rng.gen_range(0..3) {
is_hostile = true; 0 => comp::quadruped_low::Species::Rocksnapper,
let species = match dynamic_rng.gen_range(0..3) { 1 => comp::quadruped_low::Species::Salamander,
0 => comp::quadruped_low::Species::Rocksnapper, _ => comp::quadruped_low::Species::Asp,
1 => comp::quadruped_low::Species::Salamander, };
_ => comp::quadruped_low::Species::Asp, comp::quadruped_low::Body::random_with(dynamic_rng, &species).into()
}; } else if cave_depth < 250.0 {
comp::quadruped_low::Body::random_with(dynamic_rng, &species).into() is_hostile = true;
}, let species = match dynamic_rng.gen_range(0..3) {
4 => { 0 => comp::quadruped_low::Species::Rocksnapper,
is_hostile = true; 1 => comp::quadruped_low::Species::Lavadrake,
let species = match dynamic_rng.gen_range(0..3) { _ => comp::quadruped_low::Species::Basilisk,
0 => comp::quadruped_low::Species::Rocksnapper, };
1 => comp::quadruped_low::Species::Lavadrake, comp::quadruped_low::Body::random_with(dynamic_rng, &species).into()
_ => comp::quadruped_low::Species::Basilisk, } else {
}; is_hostile = true;
comp::quadruped_low::Body::random_with(dynamic_rng, &species).into() let species = match dynamic_rng.gen_range(0..5) {
}, 0 => comp::biped_large::Species::Ogre,
_ => { 1 => comp::biped_large::Species::Cyclops,
is_hostile = true; 2 => comp::biped_large::Species::Wendigo,
let species = match dynamic_rng.gen_range(0..5) { 3 => match dynamic_rng.gen_range(0..2) {
0 => comp::biped_large::Species::Ogre, 0 => comp::biped_large::Species::Blueoni,
1 => comp::biped_large::Species::Cyclops, _ => comp::biped_large::Species::Redoni,
2 => comp::biped_large::Species::Wendigo, },
3 => match dynamic_rng.gen_range(0..2) { _ => comp::biped_large::Species::Troll,
0 => comp::biped_large::Species::Blueoni, };
_ => comp::biped_large::Species::Redoni, comp::biped_large::Body::random_with(dynamic_rng, &species).into()
},
_ => comp::biped_large::Species::Troll,
};
comp::biped_large::Body::random_with(dynamic_rng, &species).into()
},
}) })
.with_alignment(if is_hostile { .with_alignment(if is_hostile {
comp::Alignment::Enemy comp::Alignment::Enemy
@ -397,10 +573,7 @@ pub fn apply_coral_to(canvas: &mut Canvas) {
}); });
if is_coral { if is_coral {
let _ = canvas.set( let _ = canvas.set(wpos, Block::new(BlockKind::Rock, Rgb::new(170, 220, 210)));
wpos,
Block::new(BlockKind::WeakRock, Rgb::new(170, 220, 210)),
);
} }
} }
}); });

View File

@ -163,7 +163,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) {
((c.rockiness - 0.5).max(0.025) * 1.0e-3, None) ((c.rockiness - 0.5).max(0.025) * 1.0e-3, None)
}), }),
(Copper, false, |c, _| { (Copper, false, |c, _| {
((c.rockiness - 0.5).max(0.025) * 1.5e-3, None) ((c.rockiness - 0.1).max(0.025) * 1.5e-3, None)
}), }),
(Tin, false, |c, _| { (Tin, false, |c, _| {
((c.rockiness - 0.5).max(0.025) * 1.5e-3, None) ((c.rockiness - 0.5).max(0.025) * 1.5e-3, None)
@ -283,7 +283,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) {
}), }),
(Pyrebloom, false, |c, _| { (Pyrebloom, false, |c, _| {
( (
close(c.temp, 1.0, 0.95).min(close(c.humidity, 0.0, 0.3)) * MUSH_FACT * 0.75, close(c.temp, 1.0, 0.95).min(close(c.humidity, 0.0, 0.3)) * MUSH_FACT * 0.35,
None, None,
) )
}), }),

View File

@ -1224,7 +1224,7 @@ fn mini_boss_1(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3<i32>) -> Vec<Entit
} }
fn mini_boss_2(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3<i32>) -> Vec<EntityInfo> { fn mini_boss_2(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3<i32>) -> Vec<EntityInfo> {
let chosen = Lottery::<LootSpec>::load_expect("common.loot_tables.creature.quad_low.default"); let chosen = Lottery::<LootSpec>::load_expect("common.loot_tables.creature.quad_low.fanged");
let mut entities = Vec::new(); let mut entities = Vec::new();
entities.resize_with(6, || { entities.resize_with(6, || {
EntityInfo::at(tile_wcenter.map(|e| e as f32)) EntityInfo::at(tile_wcenter.map(|e| e as f32))
@ -1242,7 +1242,7 @@ fn mini_boss_2(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3<i32>) -> Vec<Entit
fn mini_boss_3(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3<i32>) -> Vec<EntityInfo> { fn mini_boss_3(dynamic_rng: &mut impl Rng, tile_wcenter: Vec3<i32>) -> Vec<EntityInfo> {
let chosen = let chosen =
Lottery::<LootSpec>::load_expect("common.loot_tables.creature.quad_medium.default"); Lottery::<LootSpec>::load_expect("common.loot_tables.creature.quad_medium.carapace");
let mut entities = Vec::new(); let mut entities = Vec::new();
entities.resize_with(3, || { entities.resize_with(3, || {
EntityInfo::at(tile_wcenter.map(|e| e as f32)) EntityInfo::at(tile_wcenter.map(|e| e as f32))