balancing

more specific stats

Update body.rs

more balancing

non hostile catoblepas and mouflons

quad low
more adjustments
Animals with enemy alignment now deal correct damage. Made health scaling species-specific.
This commit is contained in:
Sam
2020-08-14 16:55:03 -05:00
committed by Monty Marz
parent 7ab80ef367
commit 924d09e46c
39 changed files with 767 additions and 125 deletions

View File

@ -8,5 +8,4 @@
(8, ShinyGem), (8, ShinyGem),
(15, Chest), (15, Chest),
(2, Crate), (2, Crate),
(0.25, Scarecrow),
] ]

View File

@ -0,0 +1,12 @@
Item(
name: "Purple Cultist Cape",
description: "Smells like dark magic and candles.",
kind: Armor(
(
kind: Back("DungPurp0"),
stats: (
protection: Normal(1.0),
),
)
),
)

View File

@ -0,0 +1,12 @@
Item(
name: "Cultist Belt",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Belt("Cultist"),
stats: (
protection: Normal(0.0),
),
)
),
)

View File

@ -0,0 +1,12 @@
Item(
name: "Purple Cultist Chest",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Chest("CultistPurple"),
stats: (
protection: Normal(5.0),
),
)
),
)

View File

@ -0,0 +1,12 @@
Item(
name: "Cultist Boots",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Foot("Cultist"),
stats: (
protection: Normal(1.0),
),
)
),
)

View File

@ -0,0 +1,12 @@
Item(
name: "Purple Cultist Gloves",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Hand("CultistPurple"),
stats: (
protection: Normal(2.0),
),
)
),
)

View File

@ -0,0 +1,12 @@
Item(
name: "Purple Cultist Skirt",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Pants("CultistPurple"),
stats: (
protection: Normal(10.0),
),
)
),
)

View File

@ -0,0 +1,12 @@
Item(
name: "Purple Cultist Mantle",
description: "Ceremonial attire used by members.",
kind: Armor(
(
kind: Shoulder("CultistPurple"),
stats: (
protection: Normal(5.0),
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Malachite Axe",
description: "An axe infused with malachite.",
kind: Tool(
(
kind: Axe("MalachiteAxe0"),
stats: (
equip_time_millis: 400,
power: 0.50,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Notched Axe",
description: "Every dent tells the story of a chopped tree.",
kind: Tool(
(
kind: Axe("BasicAxe"),
stats: (
equip_time_millis: 400,
power: 0.50,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Horn Bow",
description: "You don't recognize the creature these horns belong to.",
kind: Tool(
(
kind: Bow("HornLongbow0"),
stats: (
equip_time_millis: 400,
power: 0.5,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Rusty Dagger",
description: "Easily concealed.",
kind: Tool(
(
kind: Dagger("BasicDagger"),
stats: (
equip_time_millis: 300,
power: 1.00,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Empty",
description: "You expected a description?",
kind: Tool (
(
kind: Empty,
stats: (
equip_time_millis: 200,
power: 1.00,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Magical Cultist Warhammer",
description: "This belonged to an evil Cult Leader.",
kind: Tool(
(
kind: Hammer("CultPurp0"),
stats: (
equip_time_millis: 500,
power: 0.5,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Sturdy Old Hammer",
description: "'Property of...' The rest is missing.",
kind: Tool(
(
kind: Hammer("BasicHammer"),
stats: (
equip_time_millis: 500,
power: 0.50,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "A Tattered Targe",
description: "Should withstand a few more hits, hopefully...",
kind: Tool (
(
kind: Shield("BasicShield"),
stats: (
equip_time_millis: 400,
power: 1.00,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Bone Staff",
description: "There's a red gem suspended in the bones.",
kind: Tool(
(
kind: Staff("BoneStaff"),
stats: (
equip_time_millis: 300,
power: 0.8,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Cultist Staff",
description: "The fire gives off no heat.",
kind: Tool(
(
kind: Staff("CultistStaff"),
stats: (
equip_time_millis: 300,
power: 0.8,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Magical Cultist Greatsword",
description: "This belonged to an evil Cult Leader.",
kind: Tool(
(
kind: Sword("CultPurp0"),
stats: (
equip_time_millis: 500,
power: 0.5,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Magical Cultist Greatsword",
description: "This belonged to an evil Cult Leader.",
kind: Tool(
(
kind: Sword("CultPurp0"),
stats: (
equip_time_millis: 500,
power: 1.0,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Battered Sword",
description: "Held together by Rust and hope.",
kind: Tool(
(
kind: Sword("BasicSword"),
stats: (
equip_time_millis: 300,
power: 0.50,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Sturdy Zweihander",
description: "It's a big sword, and sharp too.",
kind: Tool(
(
kind: Sword("Zweihander0"),
stats: (
equip_time_millis: 500,
power: 0.6,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Broom",
description: "It's beginning to fall apart.",
kind: Tool (
(
kind: Farming("Broom"),
stats: (
equip_time_millis: 400,
power: 0.5,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Fishing Rod",
description: "Smells of fish.",
kind: Tool (
(
kind: Farming("FishingRod0"),
stats: (
equip_time_millis: 400,
power: 0.5,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Hoe",
description: "It's stained with dirt.",
kind: Tool (
(
kind: Farming("Hoe0"),
stats: (
equip_time_millis: 400,
power: 0.50,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Pickaxe",
description: "It has a chipped edge.",
kind: Tool (
(
kind: Farming("Pickaxe0"),
stats: (
equip_time_millis: 400,
power: 0.50,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Pitchfork",
description: "One of the prongs is broken.",
kind: Tool (
(
kind: Farming("Pitchfork"),
stats: (
equip_time_millis: 400,
power: 0.50,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Rake",
description: "Held together with twine.",
kind: Tool (
(
kind: Farming("Rake"),
stats: (
equip_time_millis: 400,
power: 0.50,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Shovel",
description: "It's covered in manure.",
kind: Tool (
(
kind: Farming("Shovel0"),
stats: (
equip_time_millis: 400,
power: 0.50,
),
)
),
)

View File

@ -0,0 +1,13 @@
Item(
name: "Shovel",
description: "It's been recently cleaned.",
kind: Tool (
(
kind: Farming("Shovel1"),
stats: (
equip_time_millis: 400,
power: 0.50,
),
)
),
)

View File

@ -1,5 +1,5 @@
{ {
"crafting_hammer": (("common.items.crafting_tools.craftsman_hammer", 1),[("common.items.crafting_ing.twigs", 10), ("common.items.crafting_ing.stones", 10)]), "crafting_hammer": (("common.items.crafting_tools.craftsman_hammer", 1),[("common.items.crafting_ing.twigs", 14), ("common.items.crafting_ing.stones", 12)]),
"mortar_pestle": (("common.items.crafting_tools.mortar_pestle", 1), [("common.items.crafting_ing.stones", 6), ("common.items.food.coconut", 2), ("common.items.crafting_tools.craftsman_hammer", 0)]), "mortar_pestle": (("common.items.crafting_tools.mortar_pestle", 1), [("common.items.crafting_ing.stones", 6), ("common.items.food.coconut", 2), ("common.items.crafting_tools.craftsman_hammer", 0)]),
"velorite_frag": (("common.items.ore.veloritefrag", 2), [("common.items.ore.velorite", 1), ("common.items.crafting_tools.craftsman_hammer", 0)]), "velorite_frag": (("common.items.ore.veloritefrag", 2), [("common.items.ore.velorite", 1), ("common.items.crafting_tools.craftsman_hammer", 0)]),
"potion_s": (("common.items.consumable.potion_minor", 1), [("common.items.crafting_ing.empty_vial", 1), ("common.items.ore.veloritefrag", 2)]), "potion_s": (("common.items.consumable.potion_minor", 1), [("common.items.crafting_ing.empty_vial", 1), ("common.items.ore.veloritefrag", 2)]),
@ -11,7 +11,7 @@
"firework_purple": (("common.items.utility.firework_purple", 1), [("common.items.crafting_ing.twigs", 1), ("common.items.crafting_ing.stones", 1), ("common.items.food.coconut", 1), ("common.items.ore.veloritefrag", 1), ("common.items.crafting_tools.mortar_pestle", 0)]), "firework_purple": (("common.items.utility.firework_purple", 1), [("common.items.crafting_ing.twigs", 1), ("common.items.crafting_ing.stones", 1), ("common.items.food.coconut", 1), ("common.items.ore.veloritefrag", 1), ("common.items.crafting_tools.mortar_pestle", 0)]),
"firework_red": (("common.items.utility.firework_red", 1), [("common.items.crafting_ing.twigs", 1), ("common.items.crafting_ing.stones", 1), ("common.items.food.coconut", 1), ("common.items.ore.veloritefrag", 1), ("common.items.crafting_tools.mortar_pestle", 0)]), "firework_red": (("common.items.utility.firework_red", 1), [("common.items.crafting_ing.twigs", 1), ("common.items.crafting_ing.stones", 1), ("common.items.food.coconut", 1), ("common.items.ore.veloritefrag", 1), ("common.items.crafting_tools.mortar_pestle", 0)]),
"firework_yellow": (("common.items.utility.firework_yellow", 1), [("common.items.crafting_ing.twigs", 1), ("common.items.crafting_ing.stones", 1), ("common.items.food.coconut", 1), ("common.items.ore.veloritefrag", 1), ("common.items.crafting_tools.mortar_pestle", 0)]), "firework_yellow": (("common.items.utility.firework_yellow", 1), [("common.items.crafting_ing.twigs", 1), ("common.items.crafting_ing.stones", 1), ("common.items.food.coconut", 1), ("common.items.ore.veloritefrag", 1), ("common.items.crafting_tools.mortar_pestle", 0)]),
"apple_shroom_curry": (("common.items.food.apple_mushroom_curry", 1), [("common.items.food.mushroom", 10), ("common.items.food.coconut", 1), ("common.items.food.apple", 5), ("common.items.crafting_tools.mortar_pestle", 0)]), "apple_shroom_curry": (("common.items.food.apple_mushroom_curry", 1), [("common.items.food.mushroom", 8), ("common.items.food.coconut", 1), ("common.items.food.apple", 4), ("common.items.crafting_tools.mortar_pestle", 0)]),
"apples_stick": (("common.items.food.apple_stick", 1),[("common.items.crafting_ing.twigs", 1), ("common.items.food.apple", 3)]), "apples_stick": (("common.items.food.apple_stick", 1),[("common.items.crafting_ing.twigs", 2), ("common.items.food.apple", 2)]),
"mushroom_stick": (("common.items.food.mushroom_stick", 1),[("common.items.crafting_ing.twigs", 1), ("common.items.food.mushroom", 5)]), "mushroom_stick": (("common.items.food.mushroom_stick", 1),[("common.items.crafting_ing.twigs", 2), ("common.items.food.mushroom", 3)]),
} }

View File

@ -31,7 +31,8 @@ impl Alignment {
(Alignment::Enemy, Alignment::Tame) => true, (Alignment::Enemy, Alignment::Tame) => true,
(Alignment::Wild, Alignment::Enemy) => false, (Alignment::Wild, Alignment::Enemy) => false,
(Alignment::Wild, Alignment::Wild) => false, (Alignment::Wild, Alignment::Wild) => false,
(Alignment::Npc, Alignment::Wild) => true, (Alignment::Npc, Alignment::Wild) => false,
(Alignment::Npc, Alignment::Enemy) => true,
(_, Alignment::Enemy) => true, (_, Alignment::Enemy) => true,
(Alignment::Enemy, _) => true, (Alignment::Enemy, _) => true,
_ => false, _ => false,

View File

@ -179,111 +179,354 @@ impl Body {
} }
} }
#[allow(unreachable_patterns)]
pub fn base_health(&self) -> u32 { pub fn base_health(&self) -> u32 {
match self { match self {
Body::Humanoid(_) => 520, Body::Humanoid(_) => 400,
Body::QuadrupedSmall(_) => 440, Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
Body::QuadrupedMedium(_) => 720, quadruped_small::Species::Boar => 180,
Body::BirdMedium(_) => 360, quadruped_small::Species::Batfox => 100,
Body::FishMedium(_) => 320, quadruped_small::Species::Dodarock => 320,
Body::Dragon(_) => 2560, quadruped_small::Species::Holladon => 250,
Body::BirdSmall(_) => 240, quadruped_small::Species::Hyena => 150,
Body::FishSmall(_) => 200, quadruped_small::Species::Truffler => 180,
Body::BipedLarge(_) => 1440, _ => 80,
Body::Object(_) => 1000, },
Body::Golem(_) => 1680, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
Body::Critter(_) => 320, quadruped_medium::Species::Grolgar => 300,
Body::QuadrupedLow(_) => 640, quadruped_medium::Species::Saber => 200,
quadruped_medium::Species::Tiger => 200,
quadruped_medium::Species::Tuskram => 300,
quadruped_medium::Species::Lion => 400,
quadruped_medium::Species::Tarasque => 600,
quadruped_medium::Species::Wolf => 200,
quadruped_medium::Species::Frostfang => 400,
quadruped_medium::Species::Mouflon => 300,
quadruped_medium::Species::Catoblepas => 500,
quadruped_medium::Species::Bonerattler => 300,
_ => 200,
},
Body::BirdMedium(bird_medium) => match bird_medium.species {
bird_medium::Species::Chicken => 50,
bird_medium::Species::Duck => 50,
bird_medium::Species::Goose => 60,
bird_medium::Species::Parrot => 60,
bird_medium::Species::Peacock => 55,
bird_medium::Species::Cockatrice => 110,
bird_medium::Species::Eagle => 110,
_ => 100,
},
Body::FishMedium(_) => 50,
Body::Dragon(dragon) => match dragon.species {
_ => 5000,
},
Body::BirdSmall(_) => 50,
Body::FishSmall(_) => 20,
Body::BipedLarge(biped_large) => match biped_large.species {
biped_large::Species::Ogre => 700,
biped_large::Species::Cyclops => 800,
biped_large::Species::Wendigo => 800,
biped_large::Species::Troll => 600,
biped_large::Species::Dullahan => 1200,
_ => 1000,
},
Body::Object(_) => 10000,
Body::Golem(golem) => match golem.species {
_ => 1500,
},
Body::Critter(critter) => match critter.species {
_ => 50,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Crocodile => 200,
quadruped_low::Species::Alligator => 200,
quadruped_low::Species::Salamander => 100,
quadruped_low::Species::Monitor => 80,
quadruped_low::Species::Asp => 80,
quadruped_low::Species::Tortoise => 200,
quadruped_low::Species::Rocksnapper => 500,
quadruped_low::Species::Pangolin => 60,
quadruped_low::Species::Maneater => 250,
_ => 200,
},
} }
} }
#[allow(unreachable_patterns)]
pub fn base_health_increase(&self) -> u32 { pub fn base_health_increase(&self) -> u32 {
match self { match self {
Body::Humanoid(_) => 50, Body::Humanoid(_) => 50,
Body::QuadrupedSmall(_) => 40, Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
Body::QuadrupedMedium(_) => 70, quadruped_small::Species::Boar => 20,
Body::BirdMedium(_) => 40, quadruped_small::Species::Batfox => 10,
Body::FishMedium(_) => 30, quadruped_small::Species::Dodarock => 30,
Body::Dragon(_) => 260, quadruped_small::Species::Holladon => 30,
Body::BirdSmall(_) => 20, quadruped_small::Species::Hyena => 20,
Body::FishSmall(_) => 20, quadruped_small::Species::Truffler => 20,
Body::BipedLarge(_) => 140, _ => 10,
Body::Object(_) => 0, },
Body::Golem(_) => 170, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
Body::Critter(_) => 30, quadruped_medium::Species::Grolgar => 30,
Body::QuadrupedLow(_) => 60, quadruped_medium::Species::Saber => 20,
quadruped_medium::Species::Tiger => 20,
quadruped_medium::Species::Tuskram => 30,
quadruped_medium::Species::Lion => 40,
quadruped_medium::Species::Tarasque => 60,
quadruped_medium::Species::Wolf => 20,
quadruped_medium::Species::Frostfang => 40,
quadruped_medium::Species::Mouflon => 30,
quadruped_medium::Species::Catoblepas => 50,
quadruped_medium::Species::Bonerattler => 30,
_ => 20,
},
Body::BirdMedium(bird_medium) => match bird_medium.species {
bird_medium::Species::Chicken => 10,
bird_medium::Species::Duck => 10,
bird_medium::Species::Goose => 10,
bird_medium::Species::Parrot => 10,
bird_medium::Species::Peacock => 10,
bird_medium::Species::Cockatrice => 10,
bird_medium::Species::Eagle => 10,
_ => 10,
},
Body::FishMedium(_) => 10,
Body::Dragon(dragon) => match dragon.species {
_ => 500,
},
Body::BirdSmall(_) => 10,
Body::FishSmall(_) => 10,
Body::BipedLarge(biped_large) => match biped_large.species {
biped_large::Species::Ogre => 70,
biped_large::Species::Cyclops => 80,
biped_large::Species::Wendigo => 80,
biped_large::Species::Troll => 60,
biped_large::Species::Dullahan => 120,
_ => 100,
},
Body::Object(_) => 10,
Body::Golem(golem) => match golem.species {
_ => 150,
},
Body::Critter(critter) => match critter.species {
_ => 10,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Crocodile => 20,
quadruped_low::Species::Alligator => 20,
quadruped_low::Species::Salamander => 10,
quadruped_low::Species::Monitor => 10,
quadruped_low::Species::Asp => 10,
quadruped_low::Species::Tortoise => 20,
quadruped_low::Species::Rocksnapper => 50,
quadruped_low::Species::Pangolin => 10,
quadruped_low::Species::Maneater => 30,
_ => 20,
},
} }
} }
#[allow(unreachable_patterns)]
pub fn base_exp(&self) -> u32 { pub fn base_exp(&self) -> u32 {
match self { match self {
Body::Humanoid(_) => 15, Body::Humanoid(_) => 5,
Body::QuadrupedSmall(_) => 12, Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
Body::QuadrupedMedium(_) => 28, quadruped_small::Species::Boar => 6,
Body::BirdMedium(_) => 10, quadruped_small::Species::Batfox => 6,
Body::FishMedium(_) => 8, quadruped_small::Species::Dodarock => 6,
Body::Dragon(_) => 160, quadruped_small::Species::Holladon => 8,
Body::BirdSmall(_) => 5, quadruped_small::Species::Hyena => 6,
Body::FishSmall(_) => 4, quadruped_small::Species::Truffler => 6,
Body::BipedLarge(_) => 75, _ => 4,
Body::Object(_) => 0, },
Body::Golem(_) => 75, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
Body::Critter(_) => 8, quadruped_medium::Species::Grolgar => 10,
Body::QuadrupedLow(_) => 24, quadruped_medium::Species::Saber => 8,
quadruped_medium::Species::Tiger => 8,
quadruped_medium::Species::Tuskram => 9,
quadruped_medium::Species::Lion => 10,
quadruped_medium::Species::Tarasque => 16,
quadruped_medium::Species::Wolf => 8,
quadruped_medium::Species::Frostfang => 9,
quadruped_medium::Species::Mouflon => 7,
quadruped_medium::Species::Catoblepas => 10,
quadruped_medium::Species::Bonerattler => 10,
_ => 6,
},
Body::BirdMedium(bird_medium) => match bird_medium.species {
bird_medium::Species::Chicken => 2,
bird_medium::Species::Duck => 2,
bird_medium::Species::Goose => 4,
bird_medium::Species::Parrot => 4,
bird_medium::Species::Peacock => 5,
_ => 8,
},
Body::FishMedium(_) => 2,
Body::Dragon(dragon) => match dragon.species {
_ => 1000,
},
Body::BirdSmall(_) => 2,
Body::FishSmall(_) => 2,
Body::BipedLarge(biped_large) => match biped_large.species {
biped_large::Species::Ogre => 60,
biped_large::Species::Cyclops => 70,
biped_large::Species::Wendigo => 70,
biped_large::Species::Troll => 50,
biped_large::Species::Dullahan => 100,
_ => 100,
},
Body::Object(_) => 1,
Body::Golem(golem) => match golem.species {
_ => 75,
},
Body::Critter(critter) => match critter.species {
_ => 2,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Crocodile => 10,
quadruped_low::Species::Alligator => 10,
quadruped_low::Species::Salamander => 6,
quadruped_low::Species::Monitor => 4,
quadruped_low::Species::Asp => 4,
quadruped_low::Species::Tortoise => 6,
quadruped_low::Species::Rocksnapper => 12,
quadruped_low::Species::Pangolin => 3,
quadruped_low::Species::Maneater => 14,
_ => 10,
},
} }
} }
#[allow(unreachable_patterns)]
pub fn base_exp_increase(&self) -> u32 { pub fn base_exp_increase(&self) -> u32 {
match self { match self {
Body::Humanoid(_) => 3, Body::Humanoid(_) => 2,
Body::QuadrupedSmall(_) => 2, Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
Body::QuadrupedMedium(_) => 6, _ => 1,
Body::BirdMedium(_) => 2, },
Body::FishMedium(_) => 2, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
Body::Dragon(_) => 32, _ => 1,
},
Body::BirdMedium(bird_medium) => match bird_medium.species {
_ => 1,
},
Body::FishMedium(_) => 1,
Body::Dragon(dragon) => match dragon.species {
_ => 32,
},
Body::BirdSmall(_) => 1, Body::BirdSmall(_) => 1,
Body::FishSmall(_) => 1, Body::FishSmall(_) => 1,
Body::BipedLarge(_) => 15, Body::BipedLarge(biped_large) => match biped_large.species {
_ => 5,
},
Body::Object(_) => 0, Body::Object(_) => 0,
Body::Golem(_) => 15, Body::Golem(golem) => match golem.species {
Body::Critter(_) => 2, _ => 10,
Body::QuadrupedLow(_) => 5, },
Body::Critter(critter) => match critter.species {
_ => 1,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
_ => 1,
},
} }
} }
#[allow(unreachable_patterns)]
pub fn base_dmg(&self) -> u32 { pub fn base_dmg(&self) -> u32 {
match self { match self {
Body::Humanoid(_) => 60, Body::Humanoid(_) => 50,
Body::QuadrupedSmall(_) => 80, Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
Body::QuadrupedMedium(_) => 120, quadruped_small::Species::Dodarock => 30,
Body::BirdMedium(_) => 70, quadruped_small::Species::Hyena => 40,
Body::FishMedium(_) => 60, _ => 20,
Body::Dragon(_) => 900, },
Body::BirdSmall(_) => 50, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
Body::FishSmall(_) => 30, quadruped_medium::Species::Grolgar => 50,
Body::BipedLarge(_) => 360, quadruped_medium::Species::Lion => 60,
quadruped_medium::Species::Tarasque => 70,
quadruped_medium::Species::Mouflon => 30,
quadruped_medium::Species::Catoblepas => 20,
quadruped_medium::Species::Bonerattler => 50,
_ => 40,
},
Body::BirdMedium(bird_medium) => match bird_medium.species {
bird_medium::Species::Chicken => 10,
bird_medium::Species::Duck => 10,
bird_medium::Species::Goose => 10,
bird_medium::Species::Parrot => 20,
bird_medium::Species::Peacock => 40,
bird_medium::Species::Cockatrice => 60,
bird_medium::Species::Eagle => 60,
_ => 30,
},
Body::FishMedium(_) => 10,
Body::Dragon(dragon) => match dragon.species {
_ => 5000,
},
Body::BirdSmall(_) => 10,
Body::FishSmall(_) => 10,
Body::BipedLarge(biped_large) => match biped_large.species {
biped_large::Species::Ogre => 60,
biped_large::Species::Cyclops => 60,
biped_large::Species::Wendigo => 60,
biped_large::Species::Troll => 60,
biped_large::Species::Dullahan => 80,
_ => 60,
},
Body::Object(_) => 0, Body::Object(_) => 0,
Body::Golem(_) => 360, Body::Golem(golem) => match golem.species {
Body::Critter(_) => 70, _ => 250,
Body::QuadrupedLow(_) => 110, },
Body::Critter(critter) => match critter.species {
_ => 10,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
quadruped_low::Species::Crocodile => 50,
quadruped_low::Species::Alligator => 50,
quadruped_low::Species::Salamander => 30,
quadruped_low::Species::Monitor => 30,
quadruped_low::Species::Asp => 35,
quadruped_low::Species::Tortoise => 10,
quadruped_low::Species::Rocksnapper => 80,
quadruped_low::Species::Pangolin => 10,
quadruped_low::Species::Maneater => 40,
_ => 20,
},
} }
} }
#[allow(unreachable_patterns)]
pub fn base_range(&self) -> f32 { pub fn base_range(&self) -> f32 {
match self { match self {
Body::Humanoid(_) => 5.0, Body::Humanoid(_) => 5.0,
Body::QuadrupedSmall(_) => 4.5, Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species {
Body::QuadrupedMedium(_) => 5.5, _ => 4.5,
Body::BirdMedium(_) => 3.5, },
Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species {
_ => 5.5,
},
Body::BirdMedium(bird_medium) => match bird_medium.species {
_ => 3.5,
},
Body::FishMedium(_) => 3.5, Body::FishMedium(_) => 3.5,
Body::Dragon(_) => 12.5, Body::Dragon(dragon) => match dragon.species {
_ => 12.5,
},
Body::BirdSmall(_) => 3.0, Body::BirdSmall(_) => 3.0,
Body::FishSmall(_) => 3.0, Body::FishSmall(_) => 3.0,
Body::BipedLarge(_) => 10.0, Body::BipedLarge(biped_large) => match biped_large.species {
_ => 10.0,
},
Body::Object(_) => 3.0, Body::Object(_) => 3.0,
Body::Golem(_) => 7.5, Body::Golem(golem) => match golem.species {
Body::Critter(_) => 3.0, _ => 7.5,
Body::QuadrupedLow(_) => 4.5, },
Body::Critter(critter) => match critter.species {
_ => 3.0,
},
Body::QuadrupedLow(quadruped_low) => match quadruped_low.species {
_ => 4.5,
},
} }
} }
} }

View File

@ -332,7 +332,8 @@ impl<'a> System<'a> for Sys {
inputs.move_dir = Vec2::from(bearing) inputs.move_dir = Vec2::from(bearing)
.try_normalized() .try_normalized()
.unwrap_or(Vec2::zero()) .unwrap_or(Vec2::zero())
* speed; * speed
* 0.6; //Let small/slow animals flee slower than the player
inputs.jump.set_state(bearing.z > 1.5); inputs.jump.set_state(bearing.z > 1.5);
inputs.swimup.set_state(bearing.z > 0.5); inputs.swimup.set_state(bearing.z > 0.5);
inputs.swimdown.set_state(bearing.z < 0.5); inputs.swimdown.set_state(bearing.z < 0.5);

View File

@ -194,25 +194,25 @@ impl<'a> System<'a> for Sys {
active_item, active_item,
second_item: None, second_item: None,
shoulder: Some(assets::load_expect_cloned( shoulder: Some(assets::load_expect_cloned(
"common.items.armor.shoulder.cultist_shoulder_purple", "common.items.npc_armor.shoulder.cultist_shoulder_purple",
)), )),
chest: Some(assets::load_expect_cloned( chest: Some(assets::load_expect_cloned(
"common.items.armor.chest.cultist_chest_purple", "common.items.npc_armor.chest.cultist_chest_purple",
)), )),
belt: Some(assets::load_expect_cloned( belt: Some(assets::load_expect_cloned(
"common.items.armor.belt.cultist_belt", "common.items.npc_armor.belt.cultist_belt",
)), )),
hand: Some(assets::load_expect_cloned( hand: Some(assets::load_expect_cloned(
"common.items.armor.hand.cultist_hands_purple", "common.items.npc_armor.hand.cultist_hands_purple",
)), )),
pants: Some(assets::load_expect_cloned( pants: Some(assets::load_expect_cloned(
"common.items.armor.pants.cultist_legs_purple", "common.items.npc_armor.pants.cultist_legs_purple",
)), )),
foot: Some(assets::load_expect_cloned( foot: Some(assets::load_expect_cloned(
"common.items.armor.foot.cultist_boots", "common.items.npc_armor.foot.cultist_boots",
)), )),
back: Some(assets::load_expect_cloned( back: Some(assets::load_expect_cloned(
"common.items.armor.back.dungeon_purple-0", "common.items.npc_armor.back.dungeon_purple-0",
)), )),
ring: None, ring: None,
neck: None, neck: None,
@ -223,6 +223,11 @@ impl<'a> System<'a> for Sys {
_ => LoadoutBuilder::animal(entity.body).build(), _ => LoadoutBuilder::animal(entity.body).build(),
}; };
loadout = match body {
comp::Body::Humanoid(_) => loadout,
_ => LoadoutBuilder::animal(entity.body).build(),
};
let mut scale = entity.scale; let mut scale = entity.scale;
// TODO: Remove this and implement scaling or level depending on stuff like // TODO: Remove this and implement scaling or level depending on stuff like
@ -255,7 +260,7 @@ impl<'a> System<'a> for Sys {
loadout = comp::Loadout { loadout = comp::Loadout {
active_item: Some(comp::ItemConfig { active_item: Some(comp::ItemConfig {
item: assets::load_expect_cloned( item: assets::load_expect_cloned(
"common.items.weapons.sword.zweihander_sword_0", "common.items.npc_weapons.sword.zweihander_sword_0",
), ),
ability1: Some(CharacterAbility::BasicMelee { ability1: Some(CharacterAbility::BasicMelee {
energy_cost: 0, energy_cost: 0,

View File

@ -45,50 +45,50 @@ pub fn apply_scatter_to<'a>(
// Flowers // Flowers
(BlueFlower, false, |c| { (BlueFlower, false, |c| {
( (
close(c.temp, 0.3, 0.4).min(close(c.humidity, CONFIG.forest_hum, 0.35)) close(c.temp, 0.1, 0.2).min(close(c.humidity, CONFIG.forest_hum, 0.35))
* MUSH_FACT * MUSH_FACT
* 0.5, * 0.01,
Some((48.0, 0.4)), Some((48.0, 0.2)),
) )
}), }),
(PinkFlower, false, |c| { (PinkFlower, false, |c| {
( (
close(c.temp, 0.3, 0.4).min(close(c.humidity, CONFIG.forest_hum, 0.35)) close(c.temp, 0.2, 0.2).min(close(c.humidity, CONFIG.forest_hum, 0.35))
* MUSH_FACT * MUSH_FACT
* 0.5, * 0.01,
Some((48.0, 0.4)), Some((48.0, 0.2)),
) )
}), }),
(PurpleFlower, false, |c| { (PurpleFlower, false, |c| {
( (
close(c.temp, 0.3, 0.4).min(close(c.humidity, CONFIG.forest_hum, 0.35)) close(c.temp, 0.3, 0.2).min(close(c.humidity, CONFIG.forest_hum, 0.35))
* MUSH_FACT * MUSH_FACT
* 0.5, * 0.01,
Some((48.0, 0.4)), Some((48.0, 0.2)),
) )
}), }),
(RedFlower, false, |c| { (RedFlower, false, |c| {
( (
close(c.temp, 0.3, 0.4).min(close(c.humidity, CONFIG.forest_hum, 0.35)) close(c.temp, 0.5, 0.2).min(close(c.humidity, CONFIG.forest_hum, 0.35))
* MUSH_FACT * MUSH_FACT
* 0.5, * 0.01,
Some((48.0, 0.4)), Some((48.0, 0.2)),
) )
}), }),
(WhiteFlower, false, |c| { (WhiteFlower, false, |c| {
( (
close(c.temp, 0.3, 0.4).min(close(c.humidity, CONFIG.forest_hum, 0.35)) close(c.temp, 0.0, 0.3).min(close(c.humidity, CONFIG.forest_hum, 0.35))
* MUSH_FACT * MUSH_FACT
* 0.5, * 0.01,
Some((48.0, 0.4)), Some((48.0, 0.2)),
) )
}), }),
(YellowFlower, false, |c| { (YellowFlower, false, |c| {
( (
close(c.temp, 0.3, 0.4).min(close(c.humidity, CONFIG.forest_hum, 0.35)) close(c.temp, 0.3, 0.2).min(close(c.humidity, CONFIG.forest_hum, 0.35))
* MUSH_FACT * MUSH_FACT
* 0.5, * 0.01,
Some((48.0, 0.4)), Some((48.0, 0.2)),
) )
}), }),
// Herbs and Spices // Herbs and Spices
@ -151,19 +151,19 @@ pub fn apply_scatter_to<'a>(
}), }),
(MediumGrass, false, |c| { (MediumGrass, false, |c| {
( (
close(c.temp, 0.0, 0.6).min(close(c.humidity, CONFIG.forest_hum, 0.35)) * 0.05, close(c.temp, 0.0, 0.5).min(close(c.humidity, CONFIG.forest_hum, 0.35)) * 0.05,
Some((48.0, 0.4)), Some((48.0, 0.4)),
) )
}), }),
(LongGrass, false, |c| { (LongGrass, false, |c| {
( (
close(c.temp, 0.4, 0.4).min(close(c.humidity, CONFIG.forest_hum, 0.2)) * 0.05, close(c.temp, 0.4, 0.5).min(close(c.humidity, CONFIG.forest_hum, 0.2)) * 0.05,
Some((48.0, 0.5)), Some((48.0, 0.5)),
) )
}), }),
(WheatGreen, false, |c| { (WheatGreen, false, |c| {
( (
close(c.temp, 0.4, 0.4).min(close(c.humidity, CONFIG.forest_hum, 0.1)) close(c.temp, 0.4, 0.2).min(close(c.humidity, CONFIG.forest_hum, 0.1))
* MUSH_FACT * MUSH_FACT
* 0.001, * 0.001,
None, None,

View File

@ -242,12 +242,23 @@ impl World {
} else { } else {
false false
}; };
let quadmed = comp::Body::QuadrupedMedium(quadruped_medium::Body::random()); // Not all of them are hostile so we have to do the rng here
let quadlow = comp::Body::QuadrupedLow(quadruped_low::Body::random()); // Not all of them are hostile so we have to do the rng here
let entity = EntityInfo::at(gen_entity_pos()) let entity = EntityInfo::at(gen_entity_pos())
.do_if(is_giant, |e| e.into_giant()) .do_if(is_giant, |e| e.into_giant())
.with_body(match rng.gen_range(0, 5) { .with_body(match rng.gen_range(0, 5) {
0 => { 0 => {
is_hostile = true; match quadmed {
comp::Body::QuadrupedMedium(quadruped_medium::Body::random()) comp::Body::QuadrupedMedium(quadruped_medium) => {
match quadruped_medium.species {
quadruped_medium::Species::Catoblepas => is_hostile = false,
quadruped_medium::Species::Mouflon => is_hostile = false,
_ => is_hostile = true,
}
},
_ => is_hostile = true,
};
quadmed
}, },
1 => { 1 => {
is_hostile = false; is_hostile = false;
@ -258,8 +269,18 @@ impl World {
comp::Body::Critter(critter::Body::random()) comp::Body::Critter(critter::Body::random())
}, },
3 => { 3 => {
is_hostile = false; match quadlow {
comp::Body::QuadrupedLow(quadruped_low::Body::random()) comp::Body::QuadrupedLow(quadruped_low) => {
match quadruped_low.species {
quadruped_low::Species::Crocodile => is_hostile = true,
quadruped_low::Species::Alligator => is_hostile = true,
quadruped_low::Species::Maneater => is_hostile = true,
_ => is_hostile = false,
}
},
_ => is_hostile = false,
};
quadlow
}, },
_ => { _ => {
is_hostile = false; is_hostile = false;

View File

@ -472,12 +472,12 @@ impl Floor {
.with_body(comp::Body::Humanoid(comp::humanoid::Body::random())) .with_body(comp::Body::Humanoid(comp::humanoid::Body::random()))
.with_automatic_name() .with_automatic_name()
.with_main_tool(assets::load_expect_cloned(match rng.gen_range(0, 6) { .with_main_tool(assets::load_expect_cloned(match rng.gen_range(0, 6) {
0 => "common.items.weapons.axe.starter_axe", 0 => "common.items.npc_weapons.axe.malachite_axe-0",
1 => "common.items.weapons.sword.cultist_purp_2h-0", 1 => "common.items.npc_weapons.sword.cultist_purp_2h-0",
2 => "common.items.weapons.sword.short_sword_0", 2 => "common.items.npc_weapons.sword.cultist_purp_2h-0",
3 => "common.items.weapons.hammer.cultist_purp_2h-0", 3 => "common.items.npc_weapons.hammer.cultist_purp_2h-0",
4 => "common.items.weapons.staff.cultist_staff", 4 => "common.items.npc_weapons.staff.cultist_staff",
_ => "common.items.weapons.bow.starter_bow", _ => "common.items.npc_weapons.bow.horn_longbow-0",
})); }));
supplement.add_entity(entity); supplement.add_entity(entity);
@ -509,8 +509,10 @@ impl Floor {
)) ))
.with_main_tool(assets::load_expect_cloned( .with_main_tool(assets::load_expect_cloned(
match rng.gen_range(0, 1) { match rng.gen_range(0, 1) {
//Add more possible cult leader weapons here //Add more possible cult leader npc_weapons here
_ => "common.items.weapons.sword.cultist_purp_2h-0", _ => {
"common.items.npc_weapons.sword.cultist_purp_2h_boss-0"
},
}, },
)) ))
.with_loot_drop(match rng.gen_range(0, 20) { .with_loot_drop(match rng.gen_range(0, 20) {

View File

@ -906,14 +906,14 @@ impl Settlement {
.do_if(is_human && rng.gen(), |entity| { .do_if(is_human && rng.gen(), |entity| {
entity.with_main_tool(assets::load_expect_cloned( entity.with_main_tool(assets::load_expect_cloned(
match rng.gen_range(0, 7) { match rng.gen_range(0, 7) {
0 => "common.items.weapons.tool.broom", 0 => "common.items.npc_weapons.tool.broom",
1 => "common.items.weapons.tool.hoe", 1 => "common.items.npc_weapons.tool.hoe",
2 => "common.items.weapons.tool.pickaxe", 2 => "common.items.npc_weapons.tool.pickaxe",
3 => "common.items.weapons.tool.pitchfork", 3 => "common.items.npc_weapons.tool.pitchfork",
4 => "common.items.weapons.tool.rake", 4 => "common.items.npc_weapons.tool.rake",
5 => "common.items.weapons.tool.shovel-0", 5 => "common.items.npc_weapons.tool.shovel-0",
_ => "common.items.weapons.tool.shovel-1", _ => "common.items.npc_weapons.tool.shovel-1",
//_ => "common.items.weapons.bow.starter_bow", TODO: Re-Add this when we have a better way of distributing weapons here //_ => "common.items.npc_weapons.bow.starter_bow", TODO: Re-Add this when we have a better way of distributing npc_weapons here
}, },
)) ))
}) })