From fec55d9150ba9f81a12d3819d4c57c3d815232db Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Sat, 22 Aug 2020 23:37:45 +0000 Subject: [PATCH] Fixes Fix Cave NPCs only spawning very deep inside caves Increase twig density Adjust armour values and ingredients for starter sword fix healing rod using the wrong model Hung up the lianas again --- assets/common/cave_scatter.ron | 17 ++++++------- .../items/armor/chest/leather_adventurer.ron | 2 +- .../items/armor/pants/leather_adventurer.ron | 2 +- .../armor/shoulder/leather_adventurer.ron | 2 +- .../common/items/weapons/sword/wood_sword.ron | 4 +-- assets/common/recipe_book.ron | 4 +-- assets/voxygen/item_image_manifest.ron | 2 +- .../voxel/humanoid_main_weapon_manifest.ron | 2 +- .../voxel/weapon/staff/wood-nature.vox | Bin 1680 -> 1448 bytes .../voxel/weapon/sword/wood_ore_2h.vox | Bin 0 -> 1536 bytes common/src/comp/inventory/item/mod.rs | 23 +++++++++++------- common/src/sys/agent.rs | 4 ++- world/src/block/mod.rs | 2 +- world/src/layer/mod.rs | 8 +++--- 14 files changed, 39 insertions(+), 33 deletions(-) create mode 100644 assets/voxygen/voxel/weapon/sword/wood_ore_2h.vox diff --git a/assets/common/cave_scatter.ron b/assets/common/cave_scatter.ron index 85cc78cfb2..eb24ac85da 100644 --- a/assets/common/cave_scatter.ron +++ b/assets/common/cave_scatter.ron @@ -1,11 +1,10 @@ [ - (20, Velorite), - (30, VeloriteFrag), - (60, Stones), - (15, PurpleFlower), - (130, ShortGrass), - (120, Mushroom), - (8, ShinyGem), - (15, Chest), - (2, Crate), + (10, Velorite), + (15, VeloriteFrag), + (110, Stones), + (150, ShortGrass), + (60, Mushroom), + (2, ShinyGem), + (2, Chest), + (15, Crate), ] diff --git a/assets/common/items/armor/chest/leather_adventurer.ron b/assets/common/items/armor/chest/leather_adventurer.ron index a2c90a5f69..705a045221 100644 --- a/assets/common/items/armor/chest/leather_adventurer.ron +++ b/assets/common/items/armor/chest/leather_adventurer.ron @@ -5,7 +5,7 @@ Item( ( kind: Chest("Leather2"), stats: ( - protection: Normal(6.0), + protection: Normal(8.0), ), ) ), diff --git a/assets/common/items/armor/pants/leather_adventurer.ron b/assets/common/items/armor/pants/leather_adventurer.ron index 994cd00036..1ab8986285 100644 --- a/assets/common/items/armor/pants/leather_adventurer.ron +++ b/assets/common/items/armor/pants/leather_adventurer.ron @@ -5,7 +5,7 @@ Item( ( kind: Pants("Leather2"), stats: ( - protection: Normal(8.0), + protection: Normal(6.0), ), ) ), diff --git a/assets/common/items/armor/shoulder/leather_adventurer.ron b/assets/common/items/armor/shoulder/leather_adventurer.ron index 8fe773a58d..0da79970e3 100644 --- a/assets/common/items/armor/shoulder/leather_adventurer.ron +++ b/assets/common/items/armor/shoulder/leather_adventurer.ron @@ -5,7 +5,7 @@ Item( ( kind: Shoulder("Leather2"), stats: ( - protection: Normal(6.0), + protection: Normal(8.0), ), ) ), diff --git a/assets/common/items/weapons/sword/wood_sword.ron b/assets/common/items/weapons/sword/wood_sword.ron index a8b9d3a140..59b674ee19 100644 --- a/assets/common/items/weapons/sword/wood_sword.ron +++ b/assets/common/items/weapons/sword/wood_sword.ron @@ -1,6 +1,6 @@ Item( - name: "Wooden Sword", - description: "It's not sharp.", + name: "Forest Spirit", + description: "The resin glows.", kind: Tool( ( kind: Sword("WoodTraining"), diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index 7277199e25..534e273b75 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -22,8 +22,8 @@ // Weapons "velorite_sceptre": (("common.items.weapons.staff.sceptre_velorite_0", 1),[("common.items.crafting_ing.twigs", 20), ("common.items.ore.veloritefrag", 10), ("common.items.crafting_ing.shiny_gem", 4), ("common.items.crafting_tools.craftsman_hammer", 0)]), // Enhanced starting weapons - "better bow": (("common.items.weapons.bow.wood_shortbow-0", 1), [("common.items.crafting_ing.leather_scraps", 8),("common.items.crafting_ing.twigs", 4), ("common.items.crafting_ing.stones", 0)]), - "better sword": (("common.items.weapons.sword.wood_sword", 1), [("common.items.crafting_ing.leather_scraps", 4),("common.items.crafting_ing.twigs", 8), ("common.items.crafting_ing.stones", 0)]), + "better bow": (("common.items.weapons.bow.wood_shortbow-0", 1), [("common.items.crafting_ing.leather_scraps", 8),("common.items.crafting_ing.twigs", 6), ("common.items.crafting_ing.stones", 0)]), + "better sword": (("common.items.weapons.sword.wood_sword", 1), [("common.items.crafting_ing.leather_scraps", 4),("common.items.crafting_ing.twigs", 10), ("common.items.ore.veloritefrag", 1), ("common.items.crafting_ing.stones", 0)]), // Adventurer/Beginner Leather Set "adventure back": (("common.items.armor.back.leather_adventurer", 1),[("common.items.crafting_ing.leather_scraps", 4)]), "adventure belt": (("common.items.armor.belt.leather_adventurer", 1),[("common.items.crafting_ing.leather_scraps", 2)]), diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index 3ccf57427c..7e2ebda6f1 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -67,7 +67,7 @@ (0.0, 0.0, 0.0), (-135.0, 90.0, 0.0), 1.2, ), Tool(Sword("WoodTraining")): VoxTrans( - "voxel.weapon.sword.wood_2h", + "voxel.weapon.sword.wood_ore_2h", (0.0, 0.0, 0.0), (-135.0, 90.0, 0.0), 1.3, ), Tool(Sword("LongFine3")): VoxTrans( diff --git a/assets/voxygen/voxel/humanoid_main_weapon_manifest.ron b/assets/voxygen/voxel/humanoid_main_weapon_manifest.ron index 8e9d389fee..79969d1c5c 100644 --- a/assets/voxygen/voxel/humanoid_main_weapon_manifest.ron +++ b/assets/voxygen/voxel/humanoid_main_weapon_manifest.ron @@ -8,7 +8,7 @@ color: None ), Sword("WoodTraining"): ( - vox_spec: ("weapon.sword.wood_2h", (-1.5, -6.5, -4.0)), + vox_spec: ("weapon.sword.wood_ore_2h", (-1.5, -6.5, -4.0)), color: None ), Sword("Zweihander0"): ( diff --git a/assets/voxygen/voxel/weapon/staff/wood-nature.vox b/assets/voxygen/voxel/weapon/staff/wood-nature.vox index 892591cdf942ba3996cf743d855bea5f0c563ea4..7a414f822f1b107803febfb13faa6c5c9e352b22 100644 GIT binary patch delta 578 zcmWlV&1+LZ6vfYbbLYLp*J#t$^do5!s)$XYl15Uhg&-IuiVZ~wO;NCE(ng~dL~t3X z-MDH+aV1n2f-5(5lSZpsp}2A5#+84_?Rf*gxp(H=Id^9EVxNOjA&(I9Js zO~}9oB-VnQVjgKj{2nCQgX8t!5;;TdG`*-Bt_@?PD|OiDCM-ou5vC6tY{13{4IO(3 zgYOVxaRkTt2A3G(yFX!_BY4ga__hwm?ZahLkDi7RatP0*X6o=|8K4(fu~uBmzVJP6F$Gm@C7E?KG<=Ool+14IyM~FY&NU;=_xJFUeGIZ(^_84YxTy0 z?(L-X%ZDlb`zxpae$VLpUFg?O(BnSz{~x^Bm9^^3xr8pxW%PFGqPA-D+PMXNc^|s} z99r9cp~dusR&wX{UU62RU0={zE};)EC$+G2Q_JlKS|}9s_58kG%74_WueJ|LcG)=r DCz^t| delta 764 zcmWmAy-pNi6vpv$X3jY?vkS_TX`-fvRR`HHXDmGnA;B zUXC>{$6}IGjzH1Ot>5Y`X42Yp1Z?7u`ovJ{px7h> z0yagTI@2KS&Y3y_HcdysX8x+r@K2C7OGm)w=yT^9q|KkJBVY^kg^>nncSq_7*y5;G zU%b#*WLV;2iB8(`g*pPZLSH%1Ano3PIs&#zU)|FnZEa5-fxNRX*4b0*3^G!jjtmm? z;JnGAv#-{z2I}2`Mt5-aL;q>s@ApqW=4)L^Daq|^lAD_(*VjqL<0Pl2N$NVu?(WGb z|ByeNpFL^Y+LOuM^)&PTd79sPnwI*H)9SMasrRUx?)R1xJE^&!{=AvWpI@49UA?s} F{SV$XnT-Gd diff --git a/assets/voxygen/voxel/weapon/sword/wood_ore_2h.vox b/assets/voxygen/voxel/weapon/sword/wood_ore_2h.vox new file mode 100644 index 0000000000000000000000000000000000000000..8630f433ba4454004242919bda09962d7277d043 GIT binary patch literal 1536 zcmb`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")), BlockKind::Chest => { - let chosen = match rng.gen_range(0, 5) { - 0 => { - assets::load_expect::>("common.loot_tables.loot_table_food") - }, - 1 => assets::load_expect::>( - "common.loot_tables.loot_table_crafting", - ), - 2 => assets::load_expect::>( + let chosen = match rng.gen_range(0, 7) { + 0 => assets::load_expect::>( "common.loot_tables.loot_table_weapon_uncommon", ), + 1 => assets::load_expect::>( + "common.loot_tables.loot_weapon_common", + ), + 2 => assets::load_expect::>( + "common.loot_tables.loot_table_armor_light", + ), 3 => assets::load_expect::>( + "common.loot_tables.loot_table_armor_cloth", + ), + 4 => assets::load_expect::>( + "common.loot_tables.loot_table_armor_heavy", + ), + _ => assets::load_expect::>( "common.loot_tables.loot_table_armor_misc", ), - _ => assets::load_expect::>("common.loot_tables.loot_table"), }; let chosen = chosen.choose(); Some(assets::load_expect_cloned(chosen)) diff --git a/common/src/sys/agent.rs b/common/src/sys/agent.rs index d4a3960518..1cc870b3b5 100644 --- a/common/src/sys/agent.rs +++ b/common/src/sys/agent.rs @@ -525,7 +525,9 @@ impl<'a> System<'a> for Sys { // Attack owner's attacker let owner_stats = stats.get(owner)?; - if owner_stats.health.last_change.0 < 5.0 { + if owner_stats.health.last_change.0 < 5.0 + && owner_stats.health.last_change.1.amount < 0 + { if let comp::HealthSource::Attack { by } = owner_stats.health.last_change.1.cause { diff --git a/world/src/block/mod.rs b/world/src/block/mod.rs index 6d34ccc466..8e482d4c92 100644 --- a/world/src/block/mod.rs +++ b/world/src/block/mod.rs @@ -571,6 +571,7 @@ pub fn block_from_structure( )), // None of these BlockKinds has an orientation, so we just use zero for the other color // bits. + StructureBlock::Liana => Some(Block::new(BlockKind::Liana, Rgb::zero())), StructureBlock::Fruit => Some(if field.get(pos + structure_pos) % 3 > 0 { Block::empty() } else { @@ -592,7 +593,6 @@ pub fn block_from_structure( | StructureBlock::PalmLeavesInner | StructureBlock::PalmLeavesOuter | StructureBlock::Acacia - | StructureBlock::Liana | StructureBlock::Mangrove => sblock .elim_case_pure(&index.colors.block.structure_blocks) .as_ref() diff --git a/world/src/layer/mod.rs b/world/src/layer/mod.rs index c47c7336da..c9947b1bbd 100644 --- a/world/src/layer/mod.rs +++ b/world/src/layer/mod.rs @@ -130,10 +130,10 @@ pub fn apply_scatter_to<'a>( // Collecable Objects // Only spawn twigs in temperate forests (Twigs, false, |c| { - ((c.tree_density - 0.5).max(0.0) * MUSH_FACT * 0.5, None) + ((c.tree_density - 0.5).max(0.0) * 0.001, None) }), (Stones, false, |c| { - ((c.rockiness - 0.5).max(0.0) * MUSH_FACT * 0.5, None) + ((c.rockiness - 0.5).max(0.0) * 0.05, None) }), // Don't spawn Mushrooms in snowy regions (Mushroom, false, |c| { @@ -494,7 +494,7 @@ pub fn apply_caves_to<'a>( let difficulty = cave_depth / 100.0; // Scatter things in caves - if RandomField::new(index.seed).chance(wpos2d.into(), 0.002 * difficulty.powf(1.5)) + if RandomField::new(index.seed).chance(wpos2d.into(), 0.001 * difficulty.powf(1.5)) && cave_base < surface_z as i32 - 25 { let kind = *assets::load_expect::>("common.cave_scatter") @@ -547,7 +547,7 @@ pub fn apply_caves_supplement<'a>( let difficulty = cave_depth / 200.0; // Scatter things in caves - if RandomField::new(index.seed).chance(wpos2d.into(), 0.000005 * difficulty) + if RandomField::new(index.seed).chance(wpos2d.into(), 0.001 * difficulty) && cave_base < surface_z as i32 - 40 { let is_hostile: bool;