Add troll variants and roc npcs

This commit is contained in:
Snowram 2021-05-26 02:37:31 +02:00 committed by Robin Gilh
parent 4188b23cc8
commit 3df69ba11d
83 changed files with 691 additions and 103 deletions

@ -264,6 +264,18 @@
(None, "common.abilities.custom.birdlargefire.fireshockwave"),
],
),
Custom("Bird Large Basic"): (
primary: "common.abilities.custom.birdlargebreathe.firebomb",
secondary: "common.abilities.custom.birdlargebreathe.triplestrike",
abilities: [
(None, "common.abilities.custom.birdlargebasic.summontornadoes"),
],
),
Custom("Tornado"): (
primary: "common.abilities.custom.tornado.spin",
secondary: "common.abilities.empty.basic",
abilities: [],
),
Tool(Debug): (
primary: "common.abilities.debug.forwardboost",
secondary: "common.abilities.debug.upboost",

@ -0,0 +1,13 @@
BasicSummon(
buildup_duration: 0.5,
cast_duration: 1.0,
recover_duration: 0.5,
summon_amount: 6,
summon_info: (
body: Object(Tornado),
scale: None,
health_scaling: 80,
loadout_config: None,
skillset_config: None,
),
)

@ -0,0 +1,19 @@
SpinMelee(
buildup_duration: 0.2,
swing_duration: 0.6,
recover_duration: 0.2,
base_damage: 70,
base_poise_damage: 25,
knockback: ( strength: 0.0, direction: Away),
range: 3.5,
damage_effect: None,
energy_cost: 100,
is_infinite: true,
movement_behavior: AxeHover,
is_interruptible: false,
forward_speed: 0.0,
num_spins: 1,
specifier: None,
target: Some(OutOfGroup),
damage_kind: Slashing,
)

@ -0,0 +1,19 @@
ItemDef(
name: "Bird Large Basic",
description: "testing123",
kind: Tool((
kind: Natural,
hands: Two,
stats: Direct((
equip_time_secs: 0.01,
power: 1.0,
poise_strength: 1.0,
speed: 1.0,
crit_chance: 0.0625,
crit_mult: 1.9142857,
)),
)),
quality: Low,
tags: [],
ability_spec: Some(Custom("Bird Large Basic")),
)

@ -826,9 +826,17 @@
keyword: "wendigo",
generic: "Wendigo"
),
troll: (
keyword: "troll",
generic: "Troll"
troll_cave: (
keyword: "troll_cave",
generic: "Cave Troll"
),
troll_mountain: (
keyword: "troll_mountain",
generic: "Mountain Troll"
),
troll_swamp: (
keyword: "troll_swamp",
generic: "Swamp Troll"
),
dullahan: (
keyword: "dullahan",
@ -1080,6 +1088,10 @@
keyword: "cockatrice",
generic: "Cockatrice"
),
roc: (
keyword: "roc",
generic: "Roc"
),
)
),
quadruped_low: (

@ -71,6 +71,7 @@ const int BUBBLES = 29;
const int WATER = 30;
const int ICE_SPIKES = 31;
const int DRIP = 32;
const int TORNADO = 33;
// meters per second squared (acceleration)
const float earth_gravity = 9.807;
@ -543,6 +544,16 @@ void main() {
spin_in_axis(vec3(1,0,0),0)
);
break;
case TORNADO:
f_reflect = 0.0; // Fire doesn't reflect light, it emits it
attr = Attr(
//vec3(sin(lifetime * 400.0) * 3.0 * percent(), cos(lifetime * 400.0) * 3.0 * percent(), lifetime * 5.0),
spiral_motion(vec3(0, 0, 5), abs(rand0) + abs(rand1) * percent() * 3.0, percent(), 15.0 * abs(rand2), rand3),
vec3((2.5 * (1 - slow_start(0.05)))),
vec4(1.2 + 0.5 * percent(), 1.2 + 0.5 * percent(), 1.2 + 0.5 * percent(), 2.5),
spin_in_axis(vec3(rand6, rand7, rand8), percent() * 10 + 3 * rand9)
);
break;
default:
attr = Attr(
linear_motion(

@ -156,22 +156,22 @@
central: ("armor.empty"),
)
),
(Troll, Male): (
(Cavetroll, Male): (
head: (
offset: (-8.0, -8.5, -9.0),
central: ("npc.troll.male.head"),
offset: (-8.0, -8.0, -8.5),
central: ("npc.troll_cave.male.head"),
),
torso_upper: (
offset: (-8.0, -7.5, -11.0),
central: ("npc.troll.male.torso_upper"),
offset: (-8.0, -9.5, -11.0),
central: ("npc.troll_cave.male.torso_upper"),
),
torso_lower: (
offset: (-6.0, -3.5, -5.0),
central: ("npc.troll.male.torso_lower"),
offset: (-7.0, -5.5, -7.0),
central: ("npc.troll_cave.male.torso_lower"),
),
jaw: (
offset: (-4.0, 0.0, -4.5),
central: ("npc.troll.male.jaw"),
offset: (-5.0, 0.0, -4.5),
central: ("npc.troll_cave.male.jaw"),
),
tail: (
offset: (0.0, 0.0, 0.0),
@ -182,22 +182,126 @@
central: ("armor.empty"),
)
),
(Troll, Female): (
(Cavetroll, Female): (
head: (
offset: (-8.0, -8.5, -9.0),
central: ("npc.troll.male.head"),
offset: (-8.0, -8.0, -8.5),
central: ("npc.troll_cave.male.head"),
),
torso_upper: (
offset: (-8.0, -7.5, -11.0),
central: ("npc.troll.male.torso_upper"),
offset: (-8.0, -9.5, -11.0),
central: ("npc.troll_cave.male.torso_upper"),
),
torso_lower: (
offset: (-6.0, -3.5, -5.0),
central: ("npc.troll.male.torso_lower"),
offset: (-7.0, -5.5, -7.0),
central: ("npc.troll_cave.male.torso_lower"),
),
jaw: (
offset: (-5.0, 0.0, -4.5),
central: ("npc.troll_cave.male.jaw"),
),
tail: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
second: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
)
),
(Mountaintroll, Male): (
head: (
offset: (-9.0, -8.5, -10.0),
central: ("npc.troll_mountain.male.head"),
),
torso_upper: (
offset: (-9.0, -10.0, -14.5),
central: ("npc.troll_mountain.male.torso_upper"),
),
torso_lower: (
offset: (-7.0, -5.5, -7.0),
central: ("npc.troll_mountain.male.torso_lower"),
),
jaw: (
offset: (-4.0, 0.0, -4.5),
central: ("npc.troll.male.jaw"),
central: ("npc.troll_mountain.male.jaw"),
),
tail: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
second: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
)
),
(Mountaintroll, Female): (
head: (
offset: (-9.0, -8.5, -10.0),
central: ("npc.troll_mountain.male.head"),
),
torso_upper: (
offset: (-9.0, -10.0, -14.5),
central: ("npc.troll_mountain.male.torso_upper"),
),
torso_lower: (
offset: (-7.0, -5.5, -7.0),
central: ("npc.troll_mountain.male.torso_lower"),
),
jaw: (
offset: (-4.0, 0.0, -4.5),
central: ("npc.troll_mountain.male.jaw"),
),
tail: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
second: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
)
),
(Swamptroll, Male): (
head: (
offset: (-10.0, -6.5, -6.0),
central: ("npc.troll_swamp.male.head"),
),
torso_upper: (
offset: (-9.0, -9.0, -12.5),
central: ("npc.troll_swamp.male.torso_upper"),
),
torso_lower: (
offset: (-8.0, -6.5, -10.0),
central: ("npc.troll_swamp.male.torso_lower"),
),
jaw: (
offset: (-6.0, 0.0, -4.0),
central: ("npc.troll_swamp.male.jaw"),
),
tail: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
second: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
)
),
(Swamptroll, Female): (
head: (
offset: (-10.0, -6.5, -6.0),
central: ("npc.troll_swamp.male.head"),
),
torso_upper: (
offset: (-9.0, -9.0, -12.5),
central: ("npc.troll_swamp.male.torso_upper"),
),
torso_lower: (
offset: (-8.0, -6.5, -10.0),
central: ("npc.troll_swamp.male.torso_lower"),
),
jaw: (
offset: (-6.0, 0.0, -4.0),
central: ("npc.troll_swamp.male.jaw"),
),
tail: (
offset: (0.0, 0.0, 0.0),

@ -203,72 +203,208 @@
lateral: ("npc.wendigo.male.foot_r"),
),
),
(Troll, Male): (
(Cavetroll, Male): (
shoulder_l: (
offset: (-5.0, -4.5, -11.0),
lateral: ("npc.troll.male.shoulder_l"),
offset: (-5.5, -4.0, -8.0),
lateral: ("npc.troll_cave.male.shoulder_l"),
),
shoulder_r: (
offset: (-5.0, -4.5, -11.0),
lateral: ("npc.troll.male.shoulder_r"),
offset: (-5.5, -4.0, -8.0),
lateral: ("npc.troll_cave.male.shoulder_r"),
),
hand_l: (
offset: (-3.5, -4.0, -12.0),
lateral: ("npc.troll.male.hand_l"),
offset: (-4.5, -4.0, -14.0),
lateral: ("npc.troll_cave.male.hand_l"),
),
hand_r: (
offset: (-3.5, -4.0, -12.0),
lateral: ("npc.troll.male.hand_r"),
offset: (-4.5, -4.0, -14.0),
lateral: ("npc.troll_cave.male.hand_r"),
),
leg_l: (
offset: (-3.0, -2.5, -4.5),
lateral: ("npc.troll.male.leg_l"),
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_cave.male.leg_l"),
),
leg_r: (
offset: (-3.0, -2.5, -4.5),
lateral: ("npc.troll.male.leg_r"),
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_cave.male.leg_r"),
),
foot_l: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll.male.foot_l"),
lateral: ("npc.troll_cave.male.foot_l"),
),
foot_r: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll.male.foot_r"),
lateral: ("npc.troll_cave.male.foot_r"),
),
),
(Troll, Female): (
(Cavetroll, Female): (
shoulder_l: (
offset: (-5.0, -4.5, -11.0),
lateral: ("npc.troll.male.shoulder_l"),
offset: (-5.5, -4.0, -8.0),
lateral: ("npc.troll_cave.male.shoulder_l"),
),
shoulder_r: (
offset: (-5.0, -4.5, -11.0),
lateral: ("npc.troll.male.shoulder_r"),
offset: (-5.5, -4.0, -8.0),
lateral: ("npc.troll_cave.male.shoulder_r"),
),
hand_l: (
offset: (-3.5, -4.0, -12.0),
lateral: ("npc.troll.male.hand_l"),
offset: (-4.5, -4.0, -14.0),
lateral: ("npc.troll_cave.male.hand_l"),
),
hand_r: (
offset: (-3.5, -4.0, -12.0),
lateral: ("npc.troll.male.hand_r"),
offset: (-4.5, -4.0, -14.0),
lateral: ("npc.troll_cave.male.hand_r"),
),
leg_l: (
offset: (-3.0, -2.5, -4.5),
lateral: ("npc.troll.male.leg_l"),
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_cave.male.leg_l"),
),
leg_r: (
offset: (-3.0, -2.5, -4.5),
lateral: ("npc.troll.male.leg_r"),
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_cave.male.leg_r"),
),
foot_l: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll.male.foot_l"),
lateral: ("npc.troll_cave.male.foot_l"),
),
foot_r: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll.male.foot_r"),
lateral: ("npc.troll_cave.male.foot_r"),
),
),
(Mountaintroll, Male): (
shoulder_l: (
offset: (-6.5, -5.0, -8.5),
lateral: ("npc.troll_mountain.male.shoulder_l"),
),
shoulder_r: (
offset: (-6.5, -5.0, -8.5),
lateral: ("npc.troll_mountain.male.shoulder_r"),
),
hand_l: (
offset: (-5.0, -4.5, -14.0),
lateral: ("npc.troll_mountain.male.hand_l"),
),
hand_r: (
offset: (-5.0, -4.5, -14.0),
lateral: ("npc.troll_mountain.male.hand_r"),
),
leg_l: (
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_mountain.male.leg_l"),
),
leg_r: (
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_mountain.male.leg_r"),
),
foot_l: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll_mountain.male.foot_l"),
),
foot_r: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll_mountain.male.foot_r"),
),
),
(Mountaintroll, Female): (
shoulder_l: (
offset: (-6.5, -5.0, -8.5),
lateral: ("npc.troll_mountain.male.shoulder_l"),
),
shoulder_r: (
offset: (-6.5, -5.0, -8.5),
lateral: ("npc.troll_mountain.male.shoulder_r"),
),
hand_l: (
offset: (-5.0, -4.5, -14.0),
lateral: ("npc.troll_mountain.male.hand_l"),
),
hand_r: (
offset: (-5.0, -4.5, -14.0),
lateral: ("npc.troll_mountain.male.hand_r"),
),
leg_l: (
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_mountain.male.leg_l"),
),
leg_r: (
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_mountain.male.leg_r"),
),
foot_l: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll_mountain.male.foot_l"),
),
foot_r: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll_mountain.male.foot_r"),
),
),
(Swamptroll, Male): (
shoulder_l: (
offset: (-5.5, -5.0, -8.5),
lateral: ("npc.troll_swamp.male.shoulder_l"),
),
shoulder_r: (
offset: (-5.5, -5.0, -8.5),
lateral: ("npc.troll_swamp.male.shoulder_r"),
),
hand_l: (
offset: (-5.0, -4.0, -16.0),
lateral: ("npc.troll_swamp.male.hand_l"),
),
hand_r: (
offset: (-5.0, -4.0, -16.0),
lateral: ("npc.troll_swamp.male.hand_r"),
),
leg_l: (
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_swamp.male.leg_l"),
),
leg_r: (
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_swamp.male.leg_r"),
),
foot_l: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll_swamp.male.foot_l"),
),
foot_r: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll_swamp.male.foot_r"),
),
),
(Swamptroll, Female): (
shoulder_l: (
offset: (-5.5, -5.0, -8.5),
lateral: ("npc.troll_swamp.male.shoulder_l"),
),
shoulder_r: (
offset: (-5.5, -5.0, -8.5),
lateral: ("npc.troll_swamp.male.shoulder_r"),
),
hand_l: (
offset: (-5.0, -4.0, -16.0),
lateral: ("npc.troll_swamp.male.hand_l"),
),
hand_r: (
offset: (-5.0, -4.0, -16.0),
lateral: ("npc.troll_swamp.male.hand_r"),
),
leg_l: (
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_swamp.male.leg_l"),
),
leg_r: (
offset: (-3.0, -3.0, -4.0),
lateral: ("npc.troll_swamp.male.leg_r"),
),
foot_l: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll_swamp.male.foot_l"),
),
foot_r: (
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.troll_swamp.male.foot_r"),
),
),
(Dullahan, Male): (

@ -103,4 +103,56 @@
central: ("npc.cockatrice.male.tail_rear"),
)
),
(Roc, Male): (
head: (
offset: (-4.5, -4.0, -6.0),
central: ("npc.roc.male.head"),
),
beak: (
offset: (-3.5, 0.0, -8.0),
central: ("npc.roc.male.beak"),
),
neck: (
offset: (-5.5, 0.0, -10.5),
central: ("npc.roc.male.neck"),
),
chest: (
offset: (-8.5, -12.5, -13.5),
central: ("npc.roc.male.chest"),
),
tail_front: (
offset: (-4.5, -9.0, -8.0),
central: ("npc.roc.male.tail_front"),
),
tail_rear: (
offset: (-9.5, -28.0, -6.0),
central: ("npc.roc.male.tail_rear"),
)
),
(Roc, Female): (
head: (
offset: (-4.5, -4.0, -6.0),
central: ("npc.roc.male.head"),
),
beak: (
offset: (-3.5, 0.0, -8.0),
central: ("npc.roc.male.beak"),
),
neck: (
offset: (-5.5, 0.0, -10.5),
central: ("npc.roc.male.neck"),
),
chest: (
offset: (-8.5, -12.5, -13.5),
central: ("npc.roc.male.chest"),
),
tail_front: (
offset: (-4.5, -9.0, -8.0),
central: ("npc.roc.male.tail_front"),
),
tail_rear: (
offset: (-9.5, -28.0, -6.0),
central: ("npc.roc.male.tail_rear"),
)
),
})

@ -167,4 +167,88 @@
lateral: ("npc.cockatrice.male.foot_r"),
)
),
(Roc, Male): (
wing_in_l: (
offset: (-13.0, -14.0, -2.5),
lateral: ("npc.roc.male.wing_in_r"),
),
wing_in_r: (
offset: (0.0, -14.0, -2.5),
lateral: ("npc.roc.male.wing_in_r"),
),
wing_mid_l: (
offset: (-11.0, -18.0, -2.0),
lateral: ("npc.roc.male.wing_mid_r"),
),
wing_mid_r: (
offset: (0.0, -18.0, -2.0),
lateral: ("npc.roc.male.wing_mid_r"),
),
wing_out_l: (
offset: (-20.0, -18.0, -2.0),
lateral: ("npc.roc.male.wing_out_r"),
),
wing_out_r: (
offset: (0.0, -18.0, -2.0),
lateral: ("npc.roc.male.wing_out_r"),
),
leg_l: (
offset: (-4.0, -5.5, -7.5),
lateral: ("npc.roc.male.leg_r"),
),
leg_r: (
offset: (-4.0, -5.5, -7.5),
lateral: ("npc.roc.male.leg_r"),
),
foot_l: (
offset: (-5.5, -3.0, -12.0),
lateral: ("npc.roc.male.foot_r"),
),
foot_r: (
offset: (-5.5, -3.0, -12.0),
lateral: ("npc.roc.male.foot_r"),
)
),
(Roc, Female): (
wing_in_l: (
offset: (-13.0, -14.0, -2.5),
lateral: ("npc.roc.male.wing_in_r"),
),
wing_in_r: (
offset: (0.0, -14.0, -2.5),
lateral: ("npc.roc.male.wing_in_r"),
),
wing_mid_l: (
offset: (-11.0, -18.0, -2.0),
lateral: ("npc.roc.male.wing_mid_r"),
),
wing_mid_r: (
offset: (0.0, -18.0, -2.0),
lateral: ("npc.roc.male.wing_mid_r"),
),
wing_out_l: (
offset: (-20.0, -18.0, -2.0),
lateral: ("npc.roc.male.wing_out_r"),
),
wing_out_r: (
offset: (0.0, -18.0, -2.0),
lateral: ("npc.roc.male.wing_out_r"),
),
leg_l: (
offset: (-4.0, -5.5, -7.5),
lateral: ("npc.roc.male.leg_r"),
),
leg_r: (
offset: (-4.0, -5.5, -7.5),
lateral: ("npc.roc.male.leg_r"),
),
foot_l: (
offset: (-5.5, -3.0, -12.0),
lateral: ("npc.roc.male.foot_r"),
),
foot_r: (
offset: (-5.5, -3.0, -12.0),
lateral: ("npc.roc.male.foot_r"),
)
),
})

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.

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -759,4 +759,14 @@
central: ("armor.empty"),
)
),
Tornado: (
bone0: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
bone1: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
)
),
})

@ -412,6 +412,7 @@ impl Body {
Body::BirdLarge(body) => match body.species {
bird_large::Species::Cockatrice => 4000,
bird_large::Species::Phoenix => 6000,
bird_large::Species::Roc => 5000,
},
Body::Humanoid(_) => 750,
_ => 1000,
@ -477,7 +478,9 @@ impl Body {
biped_large::Species::Ogre => 3200,
biped_large::Species::Cyclops => 3200,
biped_large::Species::Wendigo => 2800,
biped_large::Species::Troll => 2400,
biped_large::Species::Cavetroll => 2400,
biped_large::Species::Mountaintroll => 2400,
biped_large::Species::Swamptroll => 2400,
biped_large::Species::Dullahan => 3000,
biped_large::Species::Mindflayer => 12500,
biped_large::Species::Tidalwarrior => 16000,
@ -594,7 +597,9 @@ impl Body {
biped_large::Species::Ogre => 70,
biped_large::Species::Cyclops => 80,
biped_large::Species::Wendigo => 80,
biped_large::Species::Troll => 60,
biped_large::Species::Cavetroll => 60,
biped_large::Species::Mountaintroll => 60,
biped_large::Species::Swamptroll => 60,
biped_large::Species::Dullahan => 120,
biped_large::Species::Yeti => 0,
biped_large::Species::Harvester => 80,

@ -37,19 +37,21 @@ make_case_elim!(
Ogre = 0,
Cyclops = 1,
Wendigo = 2,
Troll = 3,
Dullahan = 4,
Werewolf = 5,
Occultsaurok = 6,
Mightysaurok = 7,
Slysaurok = 8,
Mindflayer = 9,
Minotaur = 10,
Tidalwarrior = 11,
Yeti = 12,
Harvester = 13,
Blueoni = 14,
Redoni = 15,
Cavetroll = 3,
Mountaintroll = 4,
Swamptroll = 5,
Dullahan = 6,
Werewolf = 7,
Occultsaurok = 8,
Mightysaurok = 9,
Slysaurok = 10,
Mindflayer = 11,
Minotaur = 12,
Tidalwarrior = 13,
Yeti = 14,
Harvester = 15,
Blueoni = 16,
Redoni = 17,
}
);
@ -61,7 +63,9 @@ pub struct AllSpecies<SpeciesMeta> {
pub ogre: SpeciesMeta,
pub cyclops: SpeciesMeta,
pub wendigo: SpeciesMeta,
pub troll: SpeciesMeta,
pub troll_cave: SpeciesMeta,
pub troll_mountain: SpeciesMeta,
pub troll_swamp: SpeciesMeta,
pub dullahan: SpeciesMeta,
pub werewolf: SpeciesMeta,
pub saurok_occult: SpeciesMeta,
@ -85,7 +89,9 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
Species::Ogre => &self.ogre,
Species::Cyclops => &self.cyclops,
Species::Wendigo => &self.wendigo,
Species::Troll => &self.troll,
Species::Cavetroll => &self.troll_cave,
Species::Mountaintroll => &self.troll_mountain,
Species::Swamptroll => &self.troll_swamp,
Species::Dullahan => &self.dullahan,
Species::Werewolf => &self.werewolf,
Species::Occultsaurok => &self.saurok_occult,
@ -102,11 +108,13 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
}
}
pub const ALL_SPECIES: [Species; 16] = [
pub const ALL_SPECIES: [Species; 18] = [
Species::Ogre,
Species::Cyclops,
Species::Wendigo,
Species::Troll,
Species::Cavetroll,
Species::Mountaintroll,
Species::Swamptroll,
Species::Dullahan,
Species::Werewolf,
Species::Occultsaurok,

@ -36,6 +36,7 @@ make_case_elim!(
pub enum Species {
Phoenix = 0,
Cockatrice = 1,
Roc = 2,
}
);
@ -46,6 +47,7 @@ make_case_elim!(
pub struct AllSpecies<SpeciesMeta> {
pub phoenix: SpeciesMeta,
pub cockatrice: SpeciesMeta,
pub roc: SpeciesMeta,
}
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
@ -56,11 +58,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
match index {
Species::Phoenix => &self.phoenix,
Species::Cockatrice => &self.cockatrice,
Species::Roc => &self.roc,
}
}
}
pub const ALL_SPECIES: [Species; 2] = [Species::Phoenix, Species::Cockatrice];
pub const ALL_SPECIES: [Species; 3] = [Species::Phoenix, Species::Cockatrice, Species::Roc];
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {
type IntoIter = std::iter::Copied<std::slice::Iter<'static, Self::Item>>;

@ -88,6 +88,7 @@ make_case_elim!(
BirdMeat = 73,
FishMeat = 74,
SmallMeat = 75,
Tornado = 76,
}
);
@ -98,7 +99,7 @@ impl Body {
}
}
pub const ALL_OBJECTS: [Body; 76] = [
pub const ALL_OBJECTS: [Body; 77] = [
Body::Arrow,
Body::Bomb,
Body::Scarecrow,
@ -175,6 +176,7 @@ pub const ALL_OBJECTS: [Body; 76] = [
Body::BirdMeat,
Body::FishMeat,
Body::SmallMeat,
Body::Tornado,
];
impl From<Body> for super::Body {
@ -260,6 +262,7 @@ impl Body {
Body::BirdMeat => "bird_meat",
Body::FishMeat => "fish_meat",
Body::SmallMeat => "small_meat",
Body::Tornado => "tornado",
}
}
@ -357,6 +360,7 @@ impl Body {
Body::FishMeat => 10.0,
Body::BirdMeat => 10.0,
Body::SmallMeat => 10.0,
Body::Tornado => 50.0,
};
Mass(m)

@ -253,7 +253,13 @@ fn default_main_tool(body: &Body) -> Item {
(biped_large::Species::Ogre, biped_large::BodyType::Female) => Some(
Item::new_from_asset_expect("common.items.npc_weapons.staff.ogre_staff"),
),
(biped_large::Species::Troll, _) => Some(Item::new_from_asset_expect(
(biped_large::Species::Cavetroll, _) => Some(Item::new_from_asset_expect(
"common.items.npc_weapons.hammer.troll_hammer",
)),
(biped_large::Species::Mountaintroll, _) => Some(Item::new_from_asset_expect(
"common.items.npc_weapons.hammer.troll_hammer",
)),
(biped_large::Species::Swamptroll, _) => Some(Item::new_from_asset_expect(
"common.items.npc_weapons.hammer.troll_hammer",
)),
(biped_large::Species::Wendigo, _) => Some(Item::new_from_asset_expect(
@ -320,6 +326,9 @@ fn default_main_tool(body: &Body) -> Item {
(bird_large::Species::Phoenix, _) => Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.birdlargefire",
)),
(bird_large::Species::Roc, _) => Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.birdlargebasic",
)),
},
_ => None,
};

@ -431,7 +431,11 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc
biped_large::Species::Wendigo => {
"common.loot_tables.creature.biped_large.wendigo"
},
biped_large::Species::Troll => "common.loot_tables.creature.biped_large.troll",
biped_large::Species::Cavetroll
| biped_large::Species::Mountaintroll
| biped_large::Species::Swamptroll => {
"common.loot_tables.creature.biped_large.troll"
},
biped_large::Species::Occultsaurok
| biped_large::Species::Mightysaurok
| biped_large::Species::Slysaurok => {

@ -116,10 +116,12 @@ pub enum Tactic {
Mindflayer,
BirdLargeBreathe,
BirdLargeFire,
BirdLargeBasic,
Minotaur,
ClayGolem,
TidalWarrior,
Yeti,
Tornado,
}
#[derive(SystemData)]
@ -1605,6 +1607,7 @@ impl<'a> AgentData<'a> {
"Haniwa Sentry" => Tactic::RotatingTurret,
"Bird Large Breathe" => Tactic::BirdLargeBreathe,
"Bird Large Fire" => Tactic::BirdLargeFire,
"Bird Large Basic" => Tactic::BirdLargeBasic,
"Mindflayer" => Tactic::Mindflayer,
"Minotaur" => Tactic::Minotaur,
"Clay Golem" => Tactic::ClayGolem,
@ -1833,6 +1836,7 @@ impl<'a> AgentData<'a> {
&tgt_data,
&read_data,
),
Tactic::Tornado => self.handle_tornado_attack(controller),
Tactic::Mindflayer => self.handle_mindflayer_attack(
agent,
controller,
@ -1855,6 +1859,13 @@ impl<'a> AgentData<'a> {
&tgt_data,
&read_data,
),
Tactic::BirdLargeBasic => self.handle_birdlarge_basic_attack(
agent,
controller,
&attack_data,
&tgt_data,
&read_data,
),
Tactic::Minotaur => {
self.handle_minotaur_attack(agent, controller, &attack_data, &tgt_data, &read_data)
},
@ -2906,6 +2917,12 @@ impl<'a> AgentData<'a> {
}
}
fn handle_tornado_attack(&self, controller: &mut Controller) {
controller
.actions
.push(ControlAction::basic_input(InputKind::Primary));
}
fn handle_mindflayer_attack(
&self,
agent: &mut Agent,
@ -3261,6 +3278,29 @@ impl<'a> AgentData<'a> {
}
}
fn handle_birdlarge_basic_attack(
&self,
agent: &mut Agent,
controller: &mut Controller,
attack_data: &AttackData,
tgt_data: &TargetData,
read_data: &ReadData,
) {
if can_see_tgt(
&*read_data.terrain,
self.pos,
tgt_data.pos,
attack_data.dist_sqrd,
) && attack_data.angle < 15.0
{
controller
.actions
.push(ControlAction::basic_input(InputKind::Primary));
} else {
agent.target = None;
}
}
fn handle_minotaur_attack(
&self,
agent: &mut Agent,

@ -210,7 +210,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Female) => (1.0, 7.5),
(Cyclops, _) => (9.5, 7.5),
(Wendigo, _) => (3.0, 7.5),
(Troll, _) => (6.0, 10.0),
(Cavetroll, _) => (9.0, 7.0),
(Mountaintroll, _) => (13.0, 2.0),
(Swamptroll, _) => (11.0, 2.0),
(Dullahan, _) => (3.0, 6.0),
(Werewolf, _) => (11.5, 1.0),
(Occultsaurok, _) => (6.0, 3.5),
@ -228,7 +230,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, _) => (0.0, 0.0),
(Cyclops, _) => (-4.5, -6.0),
(Wendigo, _) => (0.0, 0.0),
(Troll, _) => (2.0, -4.0),
(Cavetroll, _) => (0.0, -4.0),
(Mountaintroll, _) => (-1.0, -8.0),
(Swamptroll, _) => (-4.0, -4.5),
(Dullahan, _) => (0.0, 0.0),
(Werewolf, _) => (5.0, -4.5),
(Occultsaurok, _) => (1.0, -2.5),
@ -247,7 +251,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Female) => (0.0, 28.0),
(Cyclops, _) => (-2.0, 31.0),
(Wendigo, _) => (-1.0, 29.0),
(Troll, _) => (-1.0, 26.5),
(Cavetroll, _) => (-1.0, 26.5),
(Mountaintroll, _) => (-1.0, 30.5),
(Swamptroll, _) => (-1.0, 28.5),
(Dullahan, _) => (0.0, 29.0),
(Werewolf, _) => (3.0, 26.0),
(Occultsaurok, _) => (3.0, 24.0),
@ -266,7 +272,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Female) => (0.0, -6.0),
(Cyclops, _) => (1.0, -8.5),
(Wendigo, _) => (-1.5, -6.0),
(Troll, _) => (1.0, -10.5),
(Cavetroll, _) => (1.0, -9.5),
(Mountaintroll, _) => (1.0, -13.5),
(Swamptroll, _) => (1.5, -11.5),
(Dullahan, _) => (0.0, -6.5),
(Werewolf, _) => (1.0, -10.0),
(Occultsaurok, _) => (0.0, -5.0),
@ -293,7 +301,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Female) => (8.0, 0.5, 2.0),
(Cyclops, _) => (15.0, 3.5, 1.5),
(Wendigo, _) => (9.0, 0.5, 2.5),
(Troll, _) => (11.0, 0.5, 4.5),
(Cavetroll, _) => (13.0, 0.0, 0.5),
(Mountaintroll, _) => (14.0, -0.5, -2.0),
(Swamptroll, _) => (14.0, 0.0, 0.0),
(Dullahan, _) => (14.0, 0.5, 3.5),
(Werewolf, _) => (9.0, 4.0, -3.0),
(Occultsaurok, _) => (7.5, 1.0, 1.5),
@ -312,7 +322,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Female) => (9.0, 0.5, -4.5),
(Cyclops, _) => (14.0, 2.0, -5.5),
(Wendigo, _) => (12.0, 0.0, -3.5),
(Troll, _) => (11.5, 0.0, -5.5),
(Cavetroll, _) => (13.5, 1.0, -6.0),
(Mountaintroll, _) => (13.5, 0.0, -10.0),
(Swamptroll, _) => (17.0, 1.0, -8.0),
(Dullahan, _) => (14.5, 0.0, -2.5),
(Werewolf, _) => (10.0, 2.5, -11.0),
(Occultsaurok, _) => (8.0, 1.5, -5.5),
@ -331,7 +343,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Female) => (0.0, 0.0, -2.0),
(Cyclops, _) => (4.5, 1.0, -8.5),
(Wendigo, _) => (2.0, 2.0, -2.5),
(Troll, _) => (5.0, 0.0, -6.0),
(Cavetroll, _) => (4.5, -1.0, -7.5),
(Mountaintroll, _) => (3.5, 0.0, -7.5),
(Swamptroll, _) => (4.5, -0.5, -7.5),
(Dullahan, _) => (0.0, 0.0, -5.0),
(Werewolf, _) => (4.5, 1.0, -5.0),
(Occultsaurok, _) => (3.0, 0.5, -4.0),
@ -350,7 +364,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Female) => (4.0, 0.5, -13.5),
(Cyclops, _) => (6.0, 3.5, -15.5),
(Wendigo, _) => (5.0, 2.5, -17.0),
(Troll, _) => (6.0, 1.5, -13.0),
(Cavetroll, _) => (5.5, 0.0, -14.0),
(Mountaintroll, _) => (4.5, 1.0, -14.0),
(Swamptroll, _) => (5.5, 0.0, -14.0),
(Dullahan, _) => (4.0, 2.5, -14.0),
(Werewolf, _) => (5.5, 3.0, -6.5),
(Occultsaurok, _) => (3.5, 3.5, -10.0),
@ -369,7 +385,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Female) => 1.12,
(Cyclops, _) => 1.28,
(Wendigo, _) => 1.1,
(Troll, _) => 1.1,
(Cavetroll, _) => 1.1,
(Mountaintroll, _) => 1.1,
(Swamptroll, _) => 1.1,
(Dullahan, _) => 1.12,
(Werewolf, _) => 1.0,
(Occultsaurok, _) => 1.0,
@ -387,7 +405,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Male) => 0.9,
(Ogre, Female) => 0.9,
(Cyclops, _) => 0.8,
(Troll, _) => 0.9,
(Cavetroll, _) => 0.9,
(Mountaintroll, _) => 0.9,
(Swamptroll, _) => 0.9,
(Dullahan, _) => 0.8,
(Minotaur, _) => 0.8,
_ => 1.0,
@ -397,7 +417,9 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Ogre, Female) => (8.0, 0.0),
(Cyclops, _) => (12.0, 0.0),
(Wendigo, _) => (15.0, 0.0),
(Troll, _) => (12.0, 0.0),
(Cavetroll, _) => (13.0, 1.5),
(Mountaintroll, _) => (13.0, 1.5),
(Swamptroll, _) => (13.0, 1.5),
(Dullahan, _) => (15.0, 0.0),
(Werewolf, _) => (13.0, 0.0),
(Occultsaurok, _) => (10.0, 0.0),
@ -428,29 +450,14 @@ impl<'a> From<&'a Body> for SkeletonAttr {
},
hhl: match (body.species, body.body_type) {
(Ogre, Male) => (-9.0, -10.0, 23.0, 1.57, -0.57, 0.0),
(Cyclops, _) => (-6.0, -10.0, 17.0, 1.57, -0.57, 0.0),
(Troll, _) => (-6.0, -10.0, 17.0, 1.57, -0.57, 0.0),
(Yeti, _) => (-6.0, -10.0, 17.0, 1.57, -0.57, 0.0),
(Blueoni, _) => (-6.0, -10.0, 17.0, 1.57, -0.57, 0.0),
(Redoni, _) => (-6.0, -10.0, 17.0, 1.57, -0.57, 0.0),
_ => (-6.0, -10.0, 17.0, 1.57, -0.57, 0.0),
},
hhr: match (body.species, body.body_type) {
(Ogre, Male) => (-5.0, -13.0, 0.0, 1.57, -0.57, 0.0),
(Cyclops, _) => (-6.0, -10.0, 0.0, 1.57, -0.57, 0.0),
(Troll, _) => (-6.0, -10.0, 0.0, 1.57, -0.57, 0.0),
(Yeti, _) => (-6.0, -10.0, 0.0, 1.57, -0.57, 0.0),
(Blueoni, _) => (-6.0, -10.0, 0.0, 1.57, -0.57, 0.0),
(Redoni, _) => (-6.0, -10.0, 0.0, 1.57, -0.57, 0.0),
_ => (-6.0, -10.0, 0.0, 1.57, -0.57, 0.0),
},
hc: match (body.species, body.body_type) {
(Ogre, Male) => (11.5, 9.0, -13.0, -0.57, -1.57, 1.0),
(Cyclops, _) => (8.5, 6.0, -12.0, -0.57, -1.57, 1.0),
(Troll, _) => (8.5, 6.0, -12.0, -0.57, -1.57, 1.0),
(Yeti, _) => (8.5, 6.0, -12.0, -0.57, -1.57, 1.0),
(Blueoni, _) => (8.5, 6.0, -12.0, -0.57, -1.57, 1.0),
(Redoni, _) => (8.5, 6.0, -12.0, -0.57, -1.57, 1.0),
_ => (8.5, 6.0, -12.0, -0.57, -1.57, 1.0),
},
sthl: match (body.species, body.body_type) {

@ -149,54 +149,67 @@ impl<'a> From<&'a Body> for SkeletonAttr {
chest: match (body.species, body.body_type) {
(Phoenix, _) => (2.5, 16.0),
(Cockatrice, _) => (2.5, 16.0),
(Roc, _) => (2.5, 27.5),
},
neck: match (body.species, body.body_type) {
(Phoenix, _) => (2.5, -5.5),
(Cockatrice, _) => (5.0, -1.5),
(Roc, _) => (9.5, -1.5),
},
head: match (body.species, body.body_type) {
(Phoenix, _) => (6.0, 12.0),
(Cockatrice, _) => (8.0, 4.5),
(Roc, _) => (17.0, -3.5),
},
beak: match (body.species, body.body_type) {
(Phoenix, _) => (5.0, 3.0),
(Cockatrice, _) => (2.0, -3.0),
(Roc, _) => (0.0, -3.0),
},
tail_front: match (body.species, body.body_type) {
(Phoenix, _) => (-9.5, -1.0),
(Cockatrice, _) => (-5.0, -2.5),
(Roc, _) => (-7.5, -3.5),
},
tail_rear: match (body.species, body.body_type) {
(Phoenix, _) => (-11.0, 0.0),
(Cockatrice, _) => (-8.0, -3.0),
(Roc, _) => (-8.0, -3.0),
},
wing_in: match (body.species, body.body_type) {
(Phoenix, _) => (3.0, 2.5, 2.0),
(Cockatrice, _) => (3.5, 7.0, 3.5),
(Roc, _) => (5.5, 7.5, -1.0),
},
wing_mid: match (body.species, body.body_type) {
(Phoenix, _) => (10.0, 1.0, 0.0),
(Cockatrice, _) => (6.0, 0.0, 0.0),
(Roc, _) => (12.0, 1.0, -0.5),
},
wing_out: match (body.species, body.body_type) {
(Phoenix, _) => (7.0, 2.0, 1.5),
(Cockatrice, _) => (4.0, -1.0, 1.0),
(Roc, _) => (10.0, -2.0, 0.0),
},
leg: match (body.species, body.body_type) {
(Phoenix, _) => (4.0, 1.5, 12.0),
(Cockatrice, _) => (3.5, 2.5, 13.0),
(Roc, _) => (5.5, -1.5, 17.5),
},
foot: match (body.species, body.body_type) {
(Phoenix, _) => (0.5, -0.5, -2.5),
(Cockatrice, _) => (0.5, -3.0, -3.0),
(Roc, _) => (2.5, -2.5, -5.5),
},
scaler: match (body.species, body.body_type) {
(Phoenix, _) => (1.0),
(Cockatrice, _) => (1.0),
(Roc, _) => (1.0),
},
feed: match (body.species, body.body_type) {
(Phoenix, _) => (-0.65),
(Cockatrice, _) => (-0.5),
(Roc, _) => (-0.65),
},
}
}

@ -83,6 +83,7 @@ pub enum ParticleMode {
Water = 30,
IceSpikes = 31,
Drip = 32,
Tornado = 33,
}
impl ParticleMode {

@ -323,6 +323,9 @@ impl ParticleMgr {
Body::Object(object::Body::BoltNature) => {
self.maintain_boltnature_particles(scene_data, pos, vel)
},
Body::Object(object::Body::Tornado) => {
self.maintain_tornado_particles(scene_data, pos, vel)
},
Body::Object(
object::Body::Bomb
| object::Body::FireworkBlue
@ -498,6 +501,26 @@ impl ParticleMgr {
);
}
fn maintain_tornado_particles(&mut self, scene_data: &SceneData, pos: &Pos, vel: Option<&Vel>) {
let time = scene_data.state.get_time();
let dt = scene_data.state.get_delta_time();
let mut rng = thread_rng();
// nature
self.particles.resize_with(
self.particles.len() + usize::from(self.scheduler.heartbeats(Duration::from_millis(5))),
|| {
Particle::new(
Duration::from_millis(1000),
time,
ParticleMode::Tornado,
pos.0.map(|e| e + rng.gen_range(-0.25..0.25))
+ vel.map_or(Vec3::zero(), |v| -v.0 * dt * rng.gen::<f32>()),
)
},
);
}
fn maintain_bomb_particles(&mut self, scene_data: &SceneData, pos: &Pos, vel: Option<&Vel>) {
span!(
_guard,

@ -489,7 +489,7 @@ pub fn apply_caves_supplement<'a>(
0 => comp::biped_large::Species::Blueoni,
_ => comp::biped_large::Species::Redoni,
},
_ => comp::biped_large::Species::Troll,
_ => comp::biped_large::Species::Cavetroll,
};
comp::biped_large::Body::random_with(dynamic_rng, &species)
.into()

@ -454,9 +454,8 @@ pub fn apply_wildlife_supplement<'a, R: Rng>(
0 => {
biped_large::Body::random_with(rng, &biped_large::Species::Ogre).into()
},
1 => {
biped_large::Body::random_with(rng, &biped_large::Species::Troll).into()
},
1 => biped_large::Body::random_with(rng, &biped_large::Species::Swamptroll)
.into(),
_ => biped_large::Body::random_with(rng, &biped_large::Species::Cyclops)
.into(),
})