diff --git a/assets/common/abilities/unique/theropodbasic/dash.ron b/assets/common/abilities/unique/theropodbasic/dash.ron new file mode 100644 index 0000000000..110a20edc5 --- /dev/null +++ b/assets/common/abilities/unique/theropodbasic/dash.ron @@ -0,0 +1,19 @@ +DashMelee( + energy_cost: 0, + base_damage: 150, + scaled_damage: 40, + base_poise_damage: 0, + scaled_poise_damage: 0, + base_knockback: 8.0, + scaled_knockback: 17.0, + range: 4.0, + angle: 45.0, + energy_drain: 0, + forward_speed: 2.0, + buildup_duration: 0.5, + charge_duration: 1.2, + swing_duration: 0.1, + recover_duration: 1.1, + infinite_charge: true, + is_interruptible: false, +) \ No newline at end of file diff --git a/assets/common/abilities/weapon_ability_manifest.ron b/assets/common/abilities/weapon_ability_manifest.ron index 915b48c981..6d2e628ee0 100644 --- a/assets/common/abilities/weapon_ability_manifest.ron +++ b/assets/common/abilities/weapon_ability_manifest.ron @@ -184,6 +184,11 @@ secondary: "common.abilities.unique.theropodbird.triplestrike", abilities: [], ), + Unique(TheropodCharge): ( + primary: "common.abilities.unique.theropodbird.triplestrike", + secondary: "common.abilities.unique.theropodbasic.dash", + abilities: [], + ), Unique(ObjectTurret): ( primary: "common.abilities.unique.turret.arrows", secondary: "common.abilities.unique.turret.arrows", diff --git a/assets/common/items/npc_weapons/unique/theropodcharge.ron b/assets/common/items/npc_weapons/unique/theropodcharge.ron new file mode 100644 index 0000000000..4196fab6fc --- /dev/null +++ b/assets/common/items/npc_weapons/unique/theropodcharge.ron @@ -0,0 +1,18 @@ +ItemDef( + name: "Theropod Charge", + description: "testing123", + kind: Tool(( + kind: Unique(TheropodCharge), + hands: Two, + stats: Direct(( + equip_time_secs: 0.01, + power: 1.0, + poise_strength: 1.0, + speed: 1.0, + crit_chance: 0.1, + crit_mult: 2.0, + )), + )), + quality: Low, + tags: [], +) \ No newline at end of file diff --git a/assets/voxygen/voxel/npc/moose/female/ears.vox b/assets/voxygen/voxel/npc/moose/female/ears.vox index d8ac946666..5183ca3d6a 100644 --- a/assets/voxygen/voxel/npc/moose/female/ears.vox +++ b/assets/voxygen/voxel/npc/moose/female/ears.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a5ffd3ea8d0466847577a0a11dcf7a2a815a7d3709219e1534b347a4d0f5bb68 +oid sha256:3c6c7a82c6f30c7aaf71fc0d98134e601c447a7235b28e267cd7334a40a2ba38 size 1216 diff --git a/assets/voxygen/voxel/npc/moose/female/foot_bl.vox b/assets/voxygen/voxel/npc/moose/female/foot_bl.vox deleted file mode 100644 index f8c5adbc81..0000000000 --- a/assets/voxygen/voxel/npc/moose/female/foot_bl.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8442e4e4cb94116ee88fa29b5be6e7f9ed8bb7a9004b76fa4a0a713960cbfaa9 -size 1448 diff --git a/assets/voxygen/voxel/npc/moose/female/foot_br.vox b/assets/voxygen/voxel/npc/moose/female/foot_br.vox index e6d24ca20c..7ba7380624 100644 --- a/assets/voxygen/voxel/npc/moose/female/foot_br.vox +++ b/assets/voxygen/voxel/npc/moose/female/foot_br.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da0816d52ab158c33c5713866ccbf7d8105083868b6234b0d2551b9fcf88ff11 +oid sha256:7b4f7aa1efbe4085b0228345c9629849a1d1cd1f17052150e3668698b08e76aa size 1448 diff --git a/assets/voxygen/voxel/npc/moose/female/foot_fl.vox b/assets/voxygen/voxel/npc/moose/female/foot_fl.vox deleted file mode 100644 index fd28f1714d..0000000000 --- a/assets/voxygen/voxel/npc/moose/female/foot_fl.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b927676da8ab831e28206db97d50c646c63e4858a07c9bb298149b9270b02f7 -size 1540 diff --git a/assets/voxygen/voxel/npc/moose/female/foot_fr.vox b/assets/voxygen/voxel/npc/moose/female/foot_fr.vox index 2993f1a1cd..27b46f455f 100644 --- a/assets/voxygen/voxel/npc/moose/female/foot_fr.vox +++ b/assets/voxygen/voxel/npc/moose/female/foot_fr.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54e4263dc842f988f17818dfa05ee15152e42333e8bbac4691a20bbd474f498d +oid sha256:8bf55483ddb5f281cc09b29fdc96de5e0d9a9994c50e06ee6437110f98df3374 size 1540 diff --git a/assets/voxygen/voxel/npc/moose/female/head.vox b/assets/voxygen/voxel/npc/moose/female/head.vox index 11cf9bb73c..a4d0780cdc 100644 --- a/assets/voxygen/voxel/npc/moose/female/head.vox +++ b/assets/voxygen/voxel/npc/moose/female/head.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4d48f51916b1cdcb4c59a8792bb300481fa7462995c070eac23beca29f9ffd49 +oid sha256:7cef72a47cabc13528300ab6dcda3d7cdc8ed31263ac32ed12b81678ffbc348e size 3256 diff --git a/assets/voxygen/voxel/npc/moose/female/jaw.vox b/assets/voxygen/voxel/npc/moose/female/jaw.vox index fded39b437..1de97033f9 100644 --- a/assets/voxygen/voxel/npc/moose/female/jaw.vox +++ b/assets/voxygen/voxel/npc/moose/female/jaw.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f87c4825a69ff08cb8205208093b1a7936e7b04e6303125b0500f5770c06aa3c +oid sha256:843fcaf6901d8680d1464146d9e91e5430bc34d501fc52e56283ab82078940ba size 1264 diff --git a/assets/voxygen/voxel/npc/moose/female/leg_bl.vox b/assets/voxygen/voxel/npc/moose/female/leg_bl.vox deleted file mode 100644 index cea4afb2dc..0000000000 --- a/assets/voxygen/voxel/npc/moose/female/leg_bl.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9eafafe36e64455b75c79e684d3e4af44e4f9c82eccf57b5d3fb04c85dd09cd -size 2496 diff --git a/assets/voxygen/voxel/npc/moose/female/leg_br.vox b/assets/voxygen/voxel/npc/moose/female/leg_br.vox index b890f86084..6fee937da6 100644 --- a/assets/voxygen/voxel/npc/moose/female/leg_br.vox +++ b/assets/voxygen/voxel/npc/moose/female/leg_br.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a51ce7c4ab52d16f4806e9639c30cbcf69877668f96084cd210828eeb8fa64dd +oid sha256:2783b09046f932c961889c7c1c1ca94d76590ac6c6fba843f967daa530b3c2fa size 2496 diff --git a/assets/voxygen/voxel/npc/moose/female/leg_fl.vox b/assets/voxygen/voxel/npc/moose/female/leg_fl.vox deleted file mode 100644 index 0347e37d71..0000000000 --- a/assets/voxygen/voxel/npc/moose/female/leg_fl.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b93708370c6857d1c5c12d377d8efbabbebc9fefd7f655e39968c939785f1f4e -size 2324 diff --git a/assets/voxygen/voxel/npc/moose/female/leg_fr.vox b/assets/voxygen/voxel/npc/moose/female/leg_fr.vox index 38f1cf7302..422b6741e8 100644 --- a/assets/voxygen/voxel/npc/moose/female/leg_fr.vox +++ b/assets/voxygen/voxel/npc/moose/female/leg_fr.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfd5e2a81efe59c42a466a83a18ccbf40bf81768eae18a26dd015f464038a2ac +oid sha256:7a0b6c39212b41e44a31e60836d49bc6e3bf7789480f388d3f0d4e1423b03e77 size 2324 diff --git a/assets/voxygen/voxel/npc/moose/female/neck.vox b/assets/voxygen/voxel/npc/moose/female/neck.vox index 3192b02b21..9dd8ffe23b 100644 --- a/assets/voxygen/voxel/npc/moose/female/neck.vox +++ b/assets/voxygen/voxel/npc/moose/female/neck.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61f93173b202c415bbf276152cf54a872ac97d4d213d63dd81c17bd5bf8314d4 +oid sha256:26afffd0ca0dc50459f7ade66caf30f4b40a774373bc0207cd2208101d6eae0a size 5680 diff --git a/assets/voxygen/voxel/npc/moose/female/tail.vox b/assets/voxygen/voxel/npc/moose/female/tail.vox index f98e3a6ec3..ea52ddd915 100644 --- a/assets/voxygen/voxel/npc/moose/female/tail.vox +++ b/assets/voxygen/voxel/npc/moose/female/tail.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84873e5af67f49f8f95fbb2aa12f7b0e509f5fe0b7994a7f033781b5d0455a82 +oid sha256:992cff96ac2622a4d0b6d65dd3b5e97f063413b6f16f597df359d75ea8803bfb size 1256 diff --git a/assets/voxygen/voxel/npc/moose/female/torso_back.vox b/assets/voxygen/voxel/npc/moose/female/torso_back.vox index 578269fc89..0e1969efae 100644 --- a/assets/voxygen/voxel/npc/moose/female/torso_back.vox +++ b/assets/voxygen/voxel/npc/moose/female/torso_back.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f07a852d620504521484fdae46d9fe4839be256d73e8a84470e428df1670a554 +oid sha256:e07d01dac5045377361199014b6a214022677fd145164f0c604cadf5e65889a5 size 8456 diff --git a/assets/voxygen/voxel/npc/moose/female/torso_front.vox b/assets/voxygen/voxel/npc/moose/female/torso_front.vox index 385f90ea52..ebf52624ee 100644 --- a/assets/voxygen/voxel/npc/moose/female/torso_front.vox +++ b/assets/voxygen/voxel/npc/moose/female/torso_front.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e77648a5519aafc5892dbb5dc77b5238279d016604e462780b33a8f8dd68b2a +oid sha256:1bfdd1cf8bc1fe000df1939c94f7920d8366b47f706c2d8d23ea70b35b00fd8c size 7640 diff --git a/assets/voxygen/voxel/npc/moose/male/ears.vox b/assets/voxygen/voxel/npc/moose/male/ears.vox index 092674c966..601cbc3894 100644 --- a/assets/voxygen/voxel/npc/moose/male/ears.vox +++ b/assets/voxygen/voxel/npc/moose/male/ears.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:342692f8596578c997a204d84b849980d42de4e45ec028b6e2c2d29f9af8466e +oid sha256:be78bcff5b721906b0acc7f3177fe5843961c02c6797743d077b989339e1368b size 1192 diff --git a/assets/voxygen/voxel/npc/moose/male/foot_br.vox b/assets/voxygen/voxel/npc/moose/male/foot_br.vox index 9a0b8fd026..52b107518a 100644 --- a/assets/voxygen/voxel/npc/moose/male/foot_br.vox +++ b/assets/voxygen/voxel/npc/moose/male/foot_br.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:774064a4da626cc2f3c37bb8ee51bb56bb8c39280ebf21c9b411af12d7fdc9da +oid sha256:50120983cfc5654a2c45d21bdd681e6064b4340646db5d4ab4f7b0c55ffaebb1 size 1448 diff --git a/assets/voxygen/voxel/npc/moose/male/foot_fr.vox b/assets/voxygen/voxel/npc/moose/male/foot_fr.vox index 5ba9518968..d9ca5033c9 100644 --- a/assets/voxygen/voxel/npc/moose/male/foot_fr.vox +++ b/assets/voxygen/voxel/npc/moose/male/foot_fr.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:25aaf04920b90490d9cefa050350e24454ee3eb6cf8868791d5aa0bd46876892 +oid sha256:bf706df6621be57cbb35012775e74b4c7a594bccab4563876972295f3258dd0a size 1540 diff --git a/assets/voxygen/voxel/npc/moose/male/head.vox b/assets/voxygen/voxel/npc/moose/male/head.vox index 75d1775624..0e9f4e58e1 100644 --- a/assets/voxygen/voxel/npc/moose/male/head.vox +++ b/assets/voxygen/voxel/npc/moose/male/head.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b151be7f2006539213b1192058118baef4f7491f4ad0886b1f9f15a74c7f1f66 +oid sha256:f67d780c2d3e9ba161c00d1b458cf4f6288dba22d56a61fce83ebd3b76f25a47 size 4080 diff --git a/assets/voxygen/voxel/npc/moose/male/jaw.vox b/assets/voxygen/voxel/npc/moose/male/jaw.vox index b7f6b728f2..8cb8b61182 100644 --- a/assets/voxygen/voxel/npc/moose/male/jaw.vox +++ b/assets/voxygen/voxel/npc/moose/male/jaw.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7b5328dd86556d83e941ed1c158ad278cefb8213880eb638c740133120d759a9 +oid sha256:80c10ba83df857f3c2ba087a4acb8201847a66cfc2ce709b0c03b4bc489bd4b9 size 1264 diff --git a/assets/voxygen/voxel/npc/moose/male/leg_br.vox b/assets/voxygen/voxel/npc/moose/male/leg_br.vox index e75c39fc67..a9c8d19493 100644 --- a/assets/voxygen/voxel/npc/moose/male/leg_br.vox +++ b/assets/voxygen/voxel/npc/moose/male/leg_br.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93fd92cc6d2aec0f62307eb24afdc3979dbafd8a14789face51ccae0195f285d +oid sha256:740df0e5a68ea18b4703d2377869d42b88ab1e230d75f8641cdc15bc78e53469 size 2496 diff --git a/assets/voxygen/voxel/npc/moose/male/leg_fr.vox b/assets/voxygen/voxel/npc/moose/male/leg_fr.vox index 82e2af6cda..d4ed04f6ab 100644 --- a/assets/voxygen/voxel/npc/moose/male/leg_fr.vox +++ b/assets/voxygen/voxel/npc/moose/male/leg_fr.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c876231d09441c35916672815e9b22cce7cbfa49351f9850f2bbaea7f7a2d0da +oid sha256:88d4ef700c57873ddce841d5bf58c8d32910b71aaf23b440d2143417e6800bf0 size 2324 diff --git a/assets/voxygen/voxel/npc/moose/male/neck.vox b/assets/voxygen/voxel/npc/moose/male/neck.vox index 22e9e10ec6..9db388fe41 100644 --- a/assets/voxygen/voxel/npc/moose/male/neck.vox +++ b/assets/voxygen/voxel/npc/moose/male/neck.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19fddfcfa878cdb7bfc54a2f421e54cf18801fa968fc0416ede81cda142da684 +oid sha256:96b940688cd2d6b31dd68d9af664f9ce182ee699331a884cd7e232f574e3f179 size 5680 diff --git a/assets/voxygen/voxel/npc/moose/male/tail.vox b/assets/voxygen/voxel/npc/moose/male/tail.vox index 95b2b0283b..2bb95f2310 100644 --- a/assets/voxygen/voxel/npc/moose/male/tail.vox +++ b/assets/voxygen/voxel/npc/moose/male/tail.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a79ed935516c85dbb3fb842d3de5bb125bfe3a5f6d2cff20f91c388802c0f95 +oid sha256:f7994e6737f5462cab375f4b10c912716b1927c779edfa52875a035ac7071229 size 1256 diff --git a/assets/voxygen/voxel/npc/moose/male/torso_back.vox b/assets/voxygen/voxel/npc/moose/male/torso_back.vox index 8ff4efbce4..ba51b237d1 100644 --- a/assets/voxygen/voxel/npc/moose/male/torso_back.vox +++ b/assets/voxygen/voxel/npc/moose/male/torso_back.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b1875373430699cbd21e3a8ef0d4f9b163143d691236ffe01890c9504da84613 +oid sha256:33e4b818536af2b08cdd5d96b9fb03f8bc82fdeb590d8b33939b674eb6da3cb8 size 8456 diff --git a/assets/voxygen/voxel/npc/moose/male/torso_front.vox b/assets/voxygen/voxel/npc/moose/male/torso_front.vox index 05d36c15da..3407db4b46 100644 --- a/assets/voxygen/voxel/npc/moose/male/torso_front.vox +++ b/assets/voxygen/voxel/npc/moose/male/torso_front.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84dec623e3c13b665ce3cb93235b942ef3beb43f19597f7392ef910d5c08edda +oid sha256:65681ac06a7c2676b5f5882d5e1256fd3778e42761bd3524a1ec7d478c3a73bf size 7640 diff --git a/assets/voxygen/voxel/npc/ntouka/male/foot_l.vox b/assets/voxygen/voxel/npc/ntouka/male/foot_l.vox deleted file mode 100644 index c274493e15..0000000000 --- a/assets/voxygen/voxel/npc/ntouka/male/foot_l.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e65d1d2b2baa3a8d169ad0f77a26332b04519909b66856fb13e643a48c3ca500 -size 2620 diff --git a/assets/voxygen/voxel/npc/ntouka/male/hand_l.vox b/assets/voxygen/voxel/npc/ntouka/male/hand_l.vox deleted file mode 100644 index c35aacc4a7..0000000000 --- a/assets/voxygen/voxel/npc/ntouka/male/hand_l.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6b795271f423cd4cbdefbdcf31eba7f94c4d0189e9f495aec902ee1d8cc1801 -size 1320 diff --git a/assets/voxygen/voxel/npc/ntouka/male/leg_l.vox b/assets/voxygen/voxel/npc/ntouka/male/leg_l.vox deleted file mode 100644 index 5b6d02cd0d..0000000000 --- a/assets/voxygen/voxel/npc/ntouka/male/leg_l.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45e27150eb291355ff409df3248ef6a5d2d4159ad6e050bcc8c5556af5085ea1 -size 2096 diff --git a/assets/voxygen/voxel/npc/yale/male/foot_l.vox b/assets/voxygen/voxel/npc/yale/male/foot_l.vox deleted file mode 100644 index 4d24079430..0000000000 --- a/assets/voxygen/voxel/npc/yale/male/foot_l.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8babfa1f3e4228544888d800166c144ed53a1ec85e340cb81c4787e0588e4e49 -size 1876 diff --git a/assets/voxygen/voxel/npc/yale/male/hand_l.vox b/assets/voxygen/voxel/npc/yale/male/hand_l.vox deleted file mode 100644 index d37189e91a..0000000000 --- a/assets/voxygen/voxel/npc/yale/male/hand_l.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e84af9754c0b096bd950fed627e84a74cd005e35b07215cdd9aa0d8c3ff87de6 -size 1488 diff --git a/assets/voxygen/voxel/npc/yale/male/leg_l.vox b/assets/voxygen/voxel/npc/yale/male/leg_l.vox deleted file mode 100644 index cd47d02b90..0000000000 --- a/assets/voxygen/voxel/npc/yale/male/leg_l.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a5f6981007516a7441a6b80a88d191a0e393150446b3bca227aa7ac69cc5bb9 -size 2036 diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index cb93e2f39e..bb331f3a54 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -197,7 +197,7 @@ impl Body { theropod::Species::Woodraptor => 1.5, theropod::Species::Archaeos => 3.5, theropod::Species::Odonto => 3.5, - theropod::Species::Yale => 1.3, + theropod::Species::Yale => 0.8, theropod::Species::Ntouka => 3.0, _ => 1.8, }, @@ -249,6 +249,8 @@ impl Body { quadruped_medium::Species::Saber => 2.0, quadruped_medium::Species::Catoblepas => 2.9, quadruped_medium::Species::Barghest => 2.5, + quadruped_medium::Species::Dreadhorn => 2.5, + quadruped_medium::Species::Moose => 2.5, _ => 1.6, }, Body::QuadrupedLow(body) => match body.species { @@ -263,7 +265,7 @@ impl Body { theropod::Species::Sandraptor => 2.6, theropod::Species::Woodraptor => 2.6, theropod::Species::Sunlizard => 2.5, - theropod::Species::Yale => 2.8, + theropod::Species::Yale => 3.0, _ => 8.0, }, Body::BirdMedium(body) => match body.species { diff --git a/common/src/comp/inventory/item/tool.rs b/common/src/comp/inventory/item/tool.rs index 6b1aeec171..2e79b9a53a 100644 --- a/common/src/comp/inventory/item/tool.rs +++ b/common/src/comp/inventory/item/tool.rs @@ -421,6 +421,7 @@ pub enum UniqueKind { QuadSmallBasic, TheropodBasic, TheropodBird, + TheropodCharge, ObjectTurret, WoodenSpear, } diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index 5b8432345d..6f89b197f0 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -191,12 +191,16 @@ impl LoadoutBuilder { Body::Theropod(theropod) => match theropod.species { theropod::Species::Sandraptor | theropod::Species::Snowraptor - | theropod::Species::Woodraptor - | theropod::Species::Yale => { + | theropod::Species::Woodraptor => { main_tool = Some(Item::new_from_asset_expect( "common.items.npc_weapons.unique.theropodbird", )); }, + theropod::Species::Yale => { + main_tool = Some(Item::new_from_asset_expect( + "common.items.npc_weapons.unique.theropodcharge", + )); + }, _ => { main_tool = Some(Item::new_from_asset_expect( "common.items.npc_weapons.unique.theropodbasic", diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index daef971747..18c5ad61e3 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -1008,7 +1008,11 @@ impl<'a> AgentData<'a> { circle_time: 2, }, Some(ToolKind::Unique(UniqueKind::QuadMedCharge)) => Tactic::CircleCharge { - radius: 15, + radius: 12, + circle_time: 1, + }, + Some(ToolKind::Unique(UniqueKind::TheropodCharge)) => Tactic::CircleCharge { + radius: 6, circle_time: 1, }, diff --git a/voxygen/anim/src/quadruped_medium/mod.rs b/voxygen/anim/src/quadruped_medium/mod.rs index c1209c065a..2a2c6ea2a2 100644 --- a/voxygen/anim/src/quadruped_medium/mod.rs +++ b/voxygen/anim/src/quadruped_medium/mod.rs @@ -519,15 +519,15 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Roshwalr, _) => (1.3), (Barghest, _) => (1.5), (Antelope, _) => (1.2), - (Kelpie, _) => (1.4), + (Kelpie, _) => (1.35), (Donkey, _) => (1.2), - (Horse, _) => (1.45), + (Horse, _) => (1.42), (Zebra, _) => (1.3), (Cattle, _) => (1.7), (Highland, _) => (1.7), (Bear, _) => (1.7), (Yak, _) => (1.7), - (Camel, _) => (1.45), + (Camel, _) => (1.42), (Dreadhorn, _) => (2.0), (Moose, _) => (1.1), (Snowleopard, _) => (1.2), diff --git a/voxygen/anim/src/theropod/alpha.rs b/voxygen/anim/src/theropod/alpha.rs index ef2fb77811..a420a9832f 100644 --- a/voxygen/anim/src/theropod/alpha.rs +++ b/voxygen/anim/src/theropod/alpha.rs @@ -3,7 +3,6 @@ use super::{ SkeletonAttr, TheropodSkeleton, }; use common::states::utils::StageSection; -//use std::ops::Rem; pub struct AlphaAnimation; diff --git a/voxygen/anim/src/theropod/dash.rs b/voxygen/anim/src/theropod/dash.rs new file mode 100644 index 0000000000..e028f8f4c2 --- /dev/null +++ b/voxygen/anim/src/theropod/dash.rs @@ -0,0 +1,96 @@ +use super::{ + super::{vek::*, Animation}, + SkeletonAttr, TheropodSkeleton, +}; +use common::states::utils::StageSection; + +pub struct DashAnimation; + +impl Animation for DashAnimation { + type Dependency = (f32, f32, Option, f32); + type Skeleton = TheropodSkeleton; + + #[cfg(feature = "use-dyn-lib")] + const UPDATE_FN: &'static [u8] = b"theropod_dash\0"; + + #[cfg_attr(feature = "be-dyn-lib", export_name = "theropod_dash")] + fn update_skeleton_inner( + skeleton: &Self::Skeleton, + (_velocity, global_time, stage_section, timer): Self::Dependency, + anim_time: f32, + _rate: &mut f32, + _s_a: &SkeletonAttr, + ) -> Self::Skeleton { + let mut next = (*skeleton).clone(); + + let (movement1base, chargemovementbase, movement2base, movement3, legtell) = + match stage_section { + Some(StageSection::Buildup) => (anim_time.sqrt(), 0.0, 0.0, 0.0, anim_time), + Some(StageSection::Charge) => (1.0, 1.0, 0.0, 0.0, 0.0), + Some(StageSection::Swing) => (1.0, 1.0, anim_time.powi(4), 0.0, 1.0), + Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time, 1.0), + _ => (0.0, 0.0, 0.0, 0.0, 0.0), + }; + let pullback = 1.0 - movement3; + let subtract = global_time - timer; + let check = subtract - subtract.trunc(); + let mirror = (check - 0.5).signum(); + let movement1 = mirror * movement1base * pullback; + let movement2 = mirror * movement2base * pullback; + let movement1abs = movement1base * pullback; + let movement2abs = movement2base * pullback; + let legtwitch = (legtell * 6.0).sin() * pullback; + let legswing = legtell * pullback; + let chargeanim = (chargemovementbase * anim_time * 15.0).sin(); + + next.head.orientation = + Quaternion::rotation_x(movement1abs * -0.3 + chargeanim * 0.02 + movement2abs * 0.9) + * Quaternion::rotation_y(movement1 * 0.1 + movement2 * 0.2); + next.neck.orientation = + Quaternion::rotation_x(movement1abs * -0.8 + chargeanim * 0.05 + movement2abs * 0.9) + * Quaternion::rotation_y(movement1 * 0.1 + movement2 * 0.1); + + next.jaw.orientation = Quaternion::rotation_x(movement1abs * -0.3 + movement2abs * 0.5); + + next.chest_front.orientation = Quaternion::rotation_x(movement1abs * -0.2); + next.chest_back.orientation = + Quaternion::rotation_x(movement1abs * 0.2 + chargeanim * -0.05); + + next.leg_l.orientation = Quaternion::rotation_x(movement1abs * -0.1); + + next.leg_r.orientation = Quaternion::rotation_x(movement1abs * -0.1); + next.foot_l.orientation = Quaternion::rotation_x(movement1abs * -0.3); + next.foot_r.orientation = Quaternion::rotation_x(movement1abs * -0.3); + + next.tail_front.orientation = + Quaternion::rotation_x( + 0.1 + movement1abs * -0.1 + chargeanim * -0.05 + movement2abs * -0.3, + ) * Quaternion::rotation_z(movement1 * -0.1 + movement2 * -0.2); + + next.tail_back.orientation = + Quaternion::rotation_x( + 0.1 + movement1abs * -0.1 + chargeanim * -0.05 + movement2abs * -0.3, + ) * Quaternion::rotation_z(movement1 * -0.1 + movement2 * -0.2); + + if legtell > 0.0 { + if mirror.is_sign_positive() { + next.leg_l.orientation = Quaternion::rotation_x(legswing * 1.1); + + next.foot_l.orientation = Quaternion::rotation_x(legswing * -1.1 + legtwitch * 0.5); + + next.leg_r.orientation = Quaternion::rotation_x(0.0); + + next.foot_r.orientation = Quaternion::rotation_x(0.0); + } else { + next.leg_l.orientation = Quaternion::rotation_x(0.0); + + next.foot_l.orientation = Quaternion::rotation_x(0.0); + + next.leg_r.orientation = Quaternion::rotation_x(legswing * 1.1); + + next.foot_r.orientation = Quaternion::rotation_x(legswing * -1.1 + legtwitch * 0.5); + } + }; + next + } +} diff --git a/voxygen/anim/src/theropod/mod.rs b/voxygen/anim/src/theropod/mod.rs index 6fe60f322a..66c9fb265b 100644 --- a/voxygen/anim/src/theropod/mod.rs +++ b/voxygen/anim/src/theropod/mod.rs @@ -1,13 +1,14 @@ pub mod alpha; pub mod beta; +pub mod dash; pub mod idle; pub mod jump; pub mod run; // Reexports pub use self::{ - alpha::AlphaAnimation, beta::BetaAnimation, idle::IdleAnimation, jump::JumpAnimation, - run::RunAnimation, + alpha::AlphaAnimation, beta::BetaAnimation, dash::DashAnimation, idle::IdleAnimation, + jump::JumpAnimation, run::RunAnimation, }; use super::{make_bone, vek::*, FigureBoneData, Skeleton}; diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index bd0998d292..db5146c923 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -3151,6 +3151,36 @@ impl FigureMgr { ), } }, + CharacterState::DashMelee(s) => { + let stage_time = s.timer.as_secs_f32(); + let stage_progress = match s.stage_section { + StageSection::Buildup => { + stage_time / s.static_data.buildup_duration.as_secs_f32() + }, + StageSection::Charge => { + stage_time / s.static_data.charge_duration.as_secs_f32() + }, + StageSection::Swing => { + stage_time / s.static_data.swing_duration.as_secs_f32() + }, + StageSection::Recover => { + stage_time / s.static_data.recover_duration.as_secs_f32() + }, + _ => 0.0, + }; + anim::theropod::DashAnimation::update_skeleton( + &target_base, + ( + vel.0.magnitude(), + time, + Some(s.stage_section), + state.state_time, + ), + stage_progress, + &mut state_animation_rate, + skeleton_attr, + ) + }, // TODO! _ => target_base, }; diff --git a/voxygen/src/ui/widgets/item_tooltip.rs b/voxygen/src/ui/widgets/item_tooltip.rs deleted file mode 100644 index 31f16e6007..0000000000 --- a/voxygen/src/ui/widgets/item_tooltip.rs +++ /dev/null @@ -1,508 +0,0 @@ -use super::image_frame::ImageFrame; -use conrod_core::{ - builder_method, builder_methods, image, input::global::Global, position::Dimension, text, - widget, widget_ids, Color, Colorable, FontSize, Positionable, Sizeable, Ui, UiCell, Widget, - WidgetCommon, WidgetStyle, -}; -use std::time::{Duration, Instant}; -#[derive(Copy, Clone)] -struct Hover(widget::Id, [f64; 2]); -#[derive(Copy, Clone)] -enum HoverState { - Hovering(Hover), - Fading(Instant, Hover, Option<(Instant, widget::Id)>), - Start(Instant, widget::Id), - None, -} - -// Spacing between the tooltip and mouse -const MOUSE_PAD_Y: f64 = 15.0; -const TEXT_COLOR: Color = Color::Rgba(1.0, 1.0, 1.0, 1.0); // Default text color - -pub struct ItemTooltipManager { - tooltip_id: widget::Id, - state: HoverState, - // How long before a tooltip is displayed when hovering - hover_dur: Duration, - // How long it takes a tooltip to disappear - fade_dur: Duration, - // Current scaling of the ui - logical_scale_factor: f64, -} -impl ItemTooltipManager { - pub fn new( - mut generator: widget::id::Generator, - hover_dur: Duration, - fade_dur: Duration, - logical_scale_factor: f64, - ) -> Self { - Self { - tooltip_id: generator.next(), - state: HoverState::None, - hover_dur, - fade_dur, - logical_scale_factor, - } - } - - pub fn maintain(&mut self, input: &Global, logical_scale_factor: f64) { - self.logical_scale_factor = logical_scale_factor; - - let current = &input.current; - - if let Some(um_id) = current.widget_under_mouse { - match self.state { - HoverState::Hovering(hover) if um_id == hover.0 => (), - HoverState::Hovering(hover) => { - self.state = - HoverState::Fading(Instant::now(), hover, Some((Instant::now(), um_id))) - }, - HoverState::Fading(_, _, Some((_, id))) if um_id == id => {}, - HoverState::Fading(start, hover, _) => { - self.state = HoverState::Fading(start, hover, Some((Instant::now(), um_id))) - }, - HoverState::Start(_, id) if um_id == id => (), - HoverState::Start(_, _) | HoverState::None => { - self.state = HoverState::Start(Instant::now(), um_id) - }, - } - } else { - match self.state { - HoverState::Hovering(hover) => { - self.state = HoverState::Fading(Instant::now(), hover, None) - }, - HoverState::Fading(start, hover, Some((_, _))) => { - self.state = HoverState::Fading(start, hover, None) - }, - HoverState::Start(_, _) => self.state = HoverState::None, - HoverState::Fading(_, _, None) | HoverState::None => (), - } - } - - // Handle fade timing - if let HoverState::Fading(start, _, maybe_hover) = self.state { - if start.elapsed() > self.fade_dur { - self.state = match maybe_hover { - Some((start, hover)) => HoverState::Start(start, hover), - None => HoverState::None, - }; - } - } - } - - #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 - fn set_tooltip( - &mut self, - tooltip: &ItemTooltip, - title_text: &str, - desc_text: &str, - title_col: Color, - img_id: Option, - image_dims: Option<(f64, f64)>, - src_id: widget::Id, - ui: &mut UiCell, - ) { - let tooltip_id = self.tooltip_id; - let mp_h = MOUSE_PAD_Y / self.logical_scale_factor; - - let tooltip = |transparency, mouse_pos: [f64; 2], ui: &mut UiCell| { - // Fill in text and the potential image beforehand to get an accurate size for - // spacing - let tooltip = tooltip - .clone() - .title(title_text) - .desc(desc_text) - .title_col(title_col) - .image(img_id) - .image_dims(image_dims); - - let [t_w, t_h] = tooltip.get_wh(ui).unwrap_or([0.0, 0.0]); - let [m_x, m_y] = [mouse_pos[0], mouse_pos[1]]; - let (w_w, w_h) = (ui.win_w, ui.win_h); - - // Determine position based on size and mouse position - // Flow to the top left of the mouse when there is space - let x = if (m_x + w_w / 2.0) > t_w { - m_x - t_w / 2.0 - } else { - m_x + t_w / 2.0 - }; - let y = if w_h - (m_y + w_h / 2.0) > t_h + mp_h { - m_y + mp_h + t_h / 2.0 - } else { - m_y - mp_h - t_h / 2.0 - }; - tooltip - .floating(true) - .transparency(transparency) - .x_y(x, y) - .set(tooltip_id, ui); - }; - - match self.state { - HoverState::Hovering(Hover(id, xy)) if id == src_id => tooltip(1.0, xy, ui), - HoverState::Fading(start, Hover(id, xy), _) if id == src_id => tooltip( - (0.1f32 - start.elapsed().as_millis() as f32 / self.hover_dur.as_millis() as f32) - .max(0.0), - xy, - ui, - ), - HoverState::Start(start, id) if id == src_id && start.elapsed() > self.hover_dur => { - let xy = ui.global_input().current.mouse.xy; - self.state = HoverState::Hovering(Hover(id, xy)); - tooltip(1.0, xy, ui); - }, - _ => (), - } - } -} - -pub struct ItemTooltipped<'a, W> { - inner: W, - tooltip_manager: &'a mut ItemTooltipManager, - title_text: &'a str, - desc_text: &'a str, - img_id: Option, - image_dims: Option<(f64, f64)>, - tooltip: &'a ItemTooltip<'a>, - title_col: Color, -} -impl<'a, W: Widget> ItemTooltipped<'a, W> { - pub fn tooltip_image(mut self, img_id: image::Id) -> Self { - self.img_id = Some(img_id); - self - } - - pub fn tooltip_image_dims(mut self, dims: (f64, f64)) -> Self { - self.image_dims = Some(dims); - self - } - - pub fn set(self, id: widget::Id, ui: &mut UiCell) -> W::Event { - let event = self.inner.set(id, ui); - self.tooltip_manager.set_tooltip( - self.tooltip, - self.title_text, - self.desc_text, - self.title_col, - self.img_id, - self.image_dims, - id, - ui, - ); - event - } -} - -pub trait ItemTooltipable { - // If `Tooltip` is expensive to construct accept a closure here instead. - fn with_item_tooltip<'a>( - self, - tooltip_manager: &'a mut ItemTooltipManager, - title_text: &'a str, - desc_text: &'a str, - tooltip: &'a ItemTooltip<'a>, - title_col: Color, - ) -> ItemTooltipped<'a, Self> - where - Self: std::marker::Sized; -} -impl ItemTooltipable for W { - fn with_item_tooltip<'a>( - self, - tooltip_manager: &'a mut ItemTooltipManager, - title_text: &'a str, - desc_text: &'a str, - tooltip: &'a ItemTooltip<'a>, - title_col: Color, - ) -> ItemTooltipped<'a, W> { - ItemTooltipped { - inner: self, - tooltip_manager, - title_text, - desc_text, - img_id: None, - image_dims: None, - tooltip, - title_col, - } - } -} - -/// Vertical spacing between elements of the tooltip -const V_PAD: f64 = 10.0; -/// Horizontal spacing between elements of the tooltip -const H_PAD: f64 = 10.0; -/// Default portion of inner width that goes to an image -const IMAGE_W_FRAC: f64 = 0.3; -/// Default width multiplied by the description font size -const DEFAULT_CHAR_W: f64 = 30.0; -/// Text vertical spacing factor to account for overhanging text -const TEXT_SPACE_FACTOR: f64 = 0.35; - -/// A widget for displaying tooltips -#[derive(Clone, WidgetCommon)] -pub struct ItemTooltip<'a> { - #[conrod(common_builder)] - common: widget::CommonBuilder, - title_text: &'a str, - desc_text: &'a str, - title_col: Color, - image: Option, - image_dims: Option<(f64, f64)>, - style: Style, - transparency: f32, - image_frame: ImageFrame, -} - -#[derive(Clone, Debug, Default, PartialEq, WidgetStyle)] -pub struct Style { - #[conrod(default = "Color::Rgba(1.0, 1.0, 1.0, 1.0)")] - pub color: Option, - title: widget::text::Style, - desc: widget::text::Style, - // add background imgs here -} - -widget_ids! { - struct Ids { - title, - desc, - image_frame, - image, - } -} - -pub struct State { - ids: Ids, -} - -impl<'a> ItemTooltip<'a> { - builder_methods! { - pub desc_text_color { style.desc.color = Some(Color) } - pub title_font_size { style.title.font_size = Some(FontSize) } - pub desc_font_size { style.desc.font_size = Some(FontSize) } - pub title_justify { style.title.justify = Some(text::Justify) } - pub desc_justify { style.desc.justify = Some(text::Justify) } - image { image = Option } - title { title_text = &'a str } - desc { desc_text = &'a str } - image_dims { image_dims = Option<(f64, f64)> } - transparency { transparency = f32 } - title_col { title_col = Color} - } - - pub fn new(image_frame: ImageFrame) -> Self { - ItemTooltip { - common: widget::CommonBuilder::default(), - style: Style::default(), - title_text: "", - desc_text: "", - transparency: 1.0, - image_frame, - image: None, - image_dims: None, - title_col: TEXT_COLOR, - } - } - - /// Align the text to the left of its bounding **Rect**'s *x* axis range. - //pub fn left_justify(self) -> Self { - // self.justify(text::Justify::Left) - //} - - /// Align the text to the middle of its bounding **Rect**'s *x* axis range. - //pub fn center_justify(self) -> Self { - // self.justify(text::Justify::Center) - //} - - /// Align the text to the right of its bounding **Rect**'s *x* axis range. - //pub fn right_justify(self) -> Self { - // self.justify(text::Justify::Right) - //} - - fn text_image_width(&self, total_width: f64) -> (f64, f64) { - let inner_width = (total_width - H_PAD * 2.0).max(0.0); - // Image defaults to 30% of the width - let image_w = if self.image.is_some() { - match self.image_dims { - Some((w, _)) => w, - None => (inner_width - H_PAD).max(0.0) * IMAGE_W_FRAC, - } - } else { - 0.0 - }; - // Text gets the remaining width - let text_w = (inner_width - - if self.image.is_some() { - image_w + H_PAD - } else { - 0.0 - }) - .max(0.0); - - (text_w, image_w) - } - - /// Specify the font used for displaying the text. - pub fn font_id(mut self, font_id: text::font::Id) -> Self { - self.style.title.font_id = Some(Some(font_id)); - self.style.desc.font_id = Some(Some(font_id)); - self - } -} - -impl<'a> Widget for ItemTooltip<'a> { - type Event = (); - type State = State; - type Style = Style; - - fn init_state(&self, id_gen: widget::id::Generator) -> Self::State { - State { - ids: Ids::new(id_gen), - } - } - - fn style(&self) -> Self::Style { self.style.clone() } - - fn update(self, args: widget::UpdateArgs) { - let widget::UpdateArgs { - id, - state, - rect, - style, - ui, - .. - } = args; - - // Widths - let (text_w, image_w) = self.text_image_width(rect.w()); - - // Apply transparency - let color = style.color(ui.theme()).alpha(self.transparency); - - // Background image frame - self.image_frame - .wh(rect.dim()) - .xy(rect.xy()) - .graphics_for(id) - .parent(id) - .color(color) - .set(state.ids.image_frame, ui); - - // Image - if let Some(img_id) = self.image { - widget::Image::new(img_id) - .w_h(image_w, self.image_dims.map_or(image_w, |(_, h)| h)) - .graphics_for(id) - .parent(id) - .color(Some(color)) - .top_left_with_margins_on(state.ids.image_frame, V_PAD, H_PAD) - .set(state.ids.image, ui); - } - - // Spacing for overhanging text - let title_space = self.style.title.font_size(&ui.theme) as f64 * TEXT_SPACE_FACTOR; - - // Title of tooltip - if !self.title_text.is_empty() { - let title = widget::Text::new(self.title_text) - .w(text_w) - .graphics_for(id) - .parent(id) - .with_style(self.style.title) - // Apply transparency - .color(self.title_col); - - if self.image.is_some() { - title - .right_from(state.ids.image, H_PAD) - .align_top_of(state.ids.image) - } else { - title.top_left_with_margins_on(state.ids.image_frame, V_PAD, H_PAD) - } - .set(state.ids.title, ui); - } - - // Description of tooltip - let desc = widget::Text::new(self.desc_text) - .w(text_w) - .graphics_for(id) - .parent(id) - // Apply transparency - .color(style.desc.color(ui.theme()).alpha(self.transparency)) - .with_style(self.style.desc); - - if !self.title_text.is_empty() { - desc.down_from(state.ids.title, V_PAD * 0.5 + title_space) - .align_left_of(state.ids.title) - } else if self.image.is_some() { - desc.right_from(state.ids.image, H_PAD) - .align_top_of(state.ids.image) - } else { - desc.top_left_with_margins_on(state.ids.image_frame, V_PAD, H_PAD) - } - .set(state.ids.desc, ui); - } - - /// Default width is based on the description font size unless the text is - /// small enough to fit on a single line - fn default_x_dimension(&self, ui: &Ui) -> Dimension { - let single_line_title_w = widget::Text::new(self.title_text) - .with_style(self.style.title) - .get_w(ui) - .unwrap_or(0.0); - let single_line_desc_w = widget::Text::new(self.desc_text) - .with_style(self.style.desc) - .get_w(ui) - .unwrap_or(0.0); - - let text_w = single_line_title_w.max(single_line_desc_w); - let inner_w = if self.image.is_some() { - match self.image_dims { - Some((w, _)) => w + text_w + H_PAD, - None => text_w / (1.0 - IMAGE_W_FRAC) + H_PAD, - } - } else { - text_w - }; - - let width = - inner_w.min(self.style.desc.font_size(&ui.theme) as f64 * DEFAULT_CHAR_W) + 2.0 * H_PAD; - Dimension::Absolute(width) - } - - fn default_y_dimension(&self, ui: &Ui) -> Dimension { - let (text_w, image_w) = self.text_image_width(self.get_w(ui).unwrap_or(0.0)); - let title_h = if self.title_text.is_empty() { - 0.0 - } else { - widget::Text::new(self.title_text) - .with_style(self.style.title) - .w(text_w) - .get_h(ui) - .unwrap_or(0.0) - + self.style.title.font_size(&ui.theme) as f64 * TEXT_SPACE_FACTOR - + 0.5 * V_PAD - }; - let desc_h = if self.desc_text.is_empty() { - 0.0 - } else { - widget::Text::new(self.desc_text) - .with_style(self.style.desc) - .w(text_w) - .get_h(ui) - .unwrap_or(0.0) - + self.style.desc.font_size(&ui.theme) as f64 * TEXT_SPACE_FACTOR - }; - // Image defaults to square shape - let image_h = self.image_dims.map_or(image_w, |(_, h)| h); - // Title height + desc height + padding/spacing - let height = (title_h + desc_h).max(image_h) + 2.0 * V_PAD; - Dimension::Absolute(height) - } -} - -impl<'a> Colorable for ItemTooltip<'a> { - builder_method!(color { style.color = Some(Color) }); -} diff --git a/world/src/layer/mod.rs b/world/src/layer/mod.rs index 90e0a74a31..854eb18072 100644 --- a/world/src/layer/mod.rs +++ b/world/src/layer/mod.rs @@ -289,7 +289,7 @@ pub fn apply_caves_supplement<'a>( 3 => match dynamic_rng.gen_range(0..2) { 0 => comp::biped_large::Species::Blueoni, _ => comp::biped_large::Species::Redoni, - } + }, _ => comp::biped_large::Species::Troll, }; comp::biped_large::Body::random_with(dynamic_rng, &species).into() diff --git a/world/src/layer/wildlife.rs b/world/src/layer/wildlife.rs index c6c3d2b712..0516bfcbb6 100644 --- a/world/src/layer/wildlife.rs +++ b/world/src/layer/wildlife.rs @@ -119,6 +119,43 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( is_underwater: false, get_density: |c, _col| close(c.temp, CONFIG.snow_temp, 0.15) * BASE_DENSITY * 0.1, }, + // Tundra rock solitary ennemies + Entry { + make_entity: |pos, rng| { + EntityInfo::at(pos) + .with_body( + quadruped_low::Body::random_with(rng, &quadruped_low::Species::Rocksnapper) + .into(), + ) + .with_alignment(Alignment::Enemy) + }, + group_size: 1..2, + is_underwater: false, + get_density: |c, col| { + close(c.temp, CONFIG.snow_temp, 0.15) * BASE_DENSITY * col.rock * 1.0 + }, + }, + // Taiga rare solitary ennemies + Entry { + make_entity: |pos, rng| { + EntityInfo::at(pos) + .with_body(match rng.gen_range(0..3) { + 0 => biped_large::Body::random_with(rng, &biped_large::Species::Wendigo) + .into(), + _ => quadruped_medium::Body::random_with( + rng, + &quadruped_medium::Species::Dreadhorn, + ) + .into(), + }) + .with_alignment(Alignment::Enemy) + }, + group_size: 1..2, + is_underwater: false, + get_density: |c, col| { + close(c.temp, CONFIG.snow_temp + 0.2, 0.2) * col.tree_density * BASE_DENSITY * 0.2 + }, + }, // Taiga pack ennemies Entry { make_entity: |pos, rng| { @@ -166,7 +203,7 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( Entry { make_entity: |pos, rng| { EntityInfo::at(pos) - .with_body(match rng.gen_range(0..6) { + .with_body(match rng.gen_range(0..5) { 0 => { bird_medium::Body::random_with(rng, &bird_medium::Species::Eagle).into() }, @@ -181,11 +218,6 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( &quadruped_medium::Species::Moose, ) .into(), - 4 => quadruped_medium::Body::random_with( - rng, - &quadruped_medium::Species::Dreadhorn, - ) - .into(), _ => quadruped_medium::Body::random_with( rng, &quadruped_medium::Species::Tuskram, @@ -198,22 +230,6 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( is_underwater: false, get_density: |c, _col| close(c.temp, CONFIG.snow_temp + 0.2, 0.6) * BASE_DENSITY * 5.0, }, - // Tundra rock solitary ennemies - Entry { - make_entity: |pos, rng| { - EntityInfo::at(pos) - .with_body( - quadruped_low::Body::random_with(rng, &quadruped_low::Species::Rocksnapper) - .into(), - ) - .with_alignment(Alignment::Enemy) - }, - group_size: 1..2, - is_underwater: false, - get_density: |c, col| { - close(c.temp, CONFIG.snow_temp, 0.15) * BASE_DENSITY * col.rock * 1.0 - }, - }, // Temperate solitary ennemies Entry { make_entity: |pos, rng| { @@ -247,7 +263,10 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( group_size: 1..2, is_underwater: false, get_density: |c, col| { - close(c.temp, CONFIG.temperate_temp, 0.35) * col.tree_density * BASE_DENSITY * 1.0 + close(c.temp, CONFIG.temperate_temp + 0.1, 0.5) + * col.tree_density + * BASE_DENSITY + * 1.0 }, }, // Temperate pack wild @@ -318,8 +337,8 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( group_size: 1..8, is_underwater: false, get_density: |c, _col| { - close(c.temp, CONFIG.temperate_temp, 0.5) - * close(c.humidity, CONFIG.forest_hum, 0.4) + close(c.temp, CONFIG.temperate_temp + 0.1, 0.6) + * close(c.humidity, CONFIG.forest_hum, 0.6) //* col.tree_density * BASE_DENSITY * 4.0 @@ -329,7 +348,7 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( Entry { make_entity: |pos, rng| { EntityInfo::at(pos) - .with_body(match rng.gen_range(0..12) { + .with_body(match rng.gen_range(0..11) { 0 => quadruped_small::Body { species: quadruped_small::Species::Fox, body_type: quadruped_small::BodyType::Male, @@ -370,12 +389,7 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( &quadruped_medium::Species::Hirdrasil, ) .into(), - 9 => quadruped_medium::Body::random_with( - rng, - &quadruped_medium::Species::Kelpie, - ) - .into(), - 10 => quadruped_small::Body::random_with( + 9 => quadruped_small::Body::random_with( rng, &quadruped_small::Species::Truffler, ) @@ -391,9 +405,9 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( group_size: 1..2, is_underwater: false, get_density: |c, _col| { - close(c.temp, CONFIG.temperate_temp, 0.5) + close(c.temp, CONFIG.temperate_temp + 0.1, 0.6) * BASE_DENSITY - * close(c.humidity, CONFIG.forest_hum, 0.4) + * close(c.humidity, CONFIG.forest_hum, 0.6) * 8.0 }, }, @@ -421,7 +435,7 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( Entry { make_entity: |pos, rng| { EntityInfo::at(pos) - .with_body(match rng.gen_range(0..3) { + .with_body(match rng.gen_range(0..4) { 0 => quadruped_small::Body::random_with( rng, &quadruped_small::Species::Beaver, @@ -432,6 +446,11 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( body_type: quadruped_low::BodyType::Female, } .into(), + 2 => quadruped_medium::Body::random_with( + rng, + &quadruped_medium::Species::Kelpie, + ) + .into(), _ => { bird_medium::Body::random_with(rng, &bird_medium::Species::Duck).into() }, @@ -499,7 +518,7 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( .into() }, 1 => quadruped_low::Body::random_with(rng, &quadruped_low::Species::Asp) - .into(), + .into(), _ => quadruped_medium::Body::random_with( rng, &quadruped_medium::Species::Tiger, @@ -511,8 +530,8 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( group_size: 1..2, is_underwater: false, get_density: |c, _col| { - close(c.temp, CONFIG.tropical_temp + 0.1, 0.3) - * close(c.humidity, CONFIG.jungle_hum, 0.3) + close(c.temp, CONFIG.tropical_temp + 0.2, 0.2) + * close(c.humidity, CONFIG.jungle_hum, 0.2) * BASE_DENSITY * 3.0 }, @@ -539,8 +558,8 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( group_size: 1..2, is_underwater: false, get_density: |c, _col| { - close(c.temp, CONFIG.tropical_temp + 0.1, 0.3) - * close(c.humidity, CONFIG.jungle_hum, 0.3) + close(c.temp, CONFIG.tropical_temp + 0.2, 0.2) + * close(c.humidity, CONFIG.jungle_hum, 0.2) * BASE_DENSITY * 0.8 }, @@ -573,8 +592,8 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( group_size: 1..2, is_underwater: false, get_density: |c, _col| { - close(c.temp, CONFIG.tropical_temp, 0.4) - * close(c.humidity, CONFIG.jungle_hum, 0.3) + close(c.temp, CONFIG.tropical_temp + 0.2, 0.3) + * close(c.humidity, CONFIG.jungle_hum, 0.2) * BASE_DENSITY * 8.0 }, @@ -853,13 +872,12 @@ pub fn apply_wildlife_supplement<'a, R: Rng>( make_entity: |pos, rng| { EntityInfo::at(pos) .with_body( - quadruped_low::Body::random_with(rng, &quadruped_low::Species::Crocodile) - .into(), + fish_medium::Body::random_with(rng, &fish_medium::Species::Icepike).into(), ) .with_alignment(Alignment::Enemy) }, group_size: 1..3, - is_underwater: false, + is_underwater: true, get_density: |c, col| { close(c.temp, CONFIG.snow_temp, 0.15) * col.tree_density * BASE_DENSITY * 5.0 }, diff --git a/world/src/site/settlement/mod.rs b/world/src/site/settlement/mod.rs index 2cd8985cc3..0c297c3fa7 100644 --- a/world/src/site/settlement/mod.rs +++ b/world/src/site/settlement/mod.rs @@ -902,12 +902,11 @@ impl Settlement { object::Body::TrainingDummy.into() }, 0 => { - let species = match dynamic_rng.gen_range(0..6) { + let species = match dynamic_rng.gen_range(0..5) { 0 => quadruped_small::Species::Pig, 1 => quadruped_small::Species::Sheep, 2 => quadruped_small::Species::Goat, 3 => quadruped_small::Species::Dog, - 4 => quadruped_small::Species::Goat, _ => quadruped_small::Species::Cat, }; is_human = false;