From 25c78dc660a7044190ab3da869c2d3e26bb9d519 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 30 Apr 2021 15:25:08 -0400 Subject: [PATCH] Removed all unique and simple tool kinds. --- .../common/abilities/ability_set_manifest.ron | 174 +++++----- .../{unique => custom}/beastclaws/basic.ron | 0 .../birdlargebreathe/firebomb.ron | 0 .../birdlargebreathe/flamethrower.ron | 0 .../birdlargebreathe/triplestrike.ron | 0 .../birdlargefire/firebomb.ron | 0 .../birdlargefire/fireshockwave.ron | 0 .../birdlargefire/flamethrower.ron | 0 .../birdlargefire/triplestrike.ron | 0 .../{unique => custom}/husk/singlestrike.ron | 0 .../{unique => custom}/husk/triplestrike.ron | 0 .../mindflayer/cursedflames.ron | 0 .../mindflayer/dimensionaldoor.ron | 0 .../mindflayer/necroticvortex.ron | 0 .../mindflayer/summonminions.ron | 0 .../quadlowbasic/singlestrike.ron | 0 .../quadlowbasic/triplestrike.ron | 0 .../quadlowbeam/healingbeam.ron | 0 .../quadlowbreathe/dash.ron | 0 .../quadlowbreathe/flamethrower.ron | 0 .../quadlowbreathe/triplestrike.ron | 0 .../{unique => custom}/quadlowquick/dash.ron | 0 .../quadlowquick/quadstrike.ron | 0 .../quadlowranged/firebomb.ron | 0 .../quadlowranged/singlestrike.ron | 0 .../quadlowtail/charged.ron | 0 .../quadlowtail/triplestrike.ron | 0 .../quadmedbasic/singlestrike.ron | 0 .../quadmedbasic/triplestrike.ron | 0 .../{unique => custom}/quadmedcharge/dash.ron | 0 .../quadmedcharge/doublestrike.ron | 0 .../{unique => custom}/quadmedhoof/basic.ron | 0 .../quadmedjump/doublestrike.ron | 0 .../{unique => custom}/quadmedjump/leap.ron | 0 .../quadmedjump/quickleap.ron | 0 .../{unique => custom}/quadmedquick/dash.ron | 0 .../quadmedquick/triplestrike.ron | 0 .../quadsmallbasic/singlestrike.ron | 0 .../stonegolemfist/shockwave.ron | 0 .../stonegolemfist/singlestrike.ron | 0 .../stonegolemfist/spin.ron | 0 .../{unique => custom}/theropodbasic/dash.ron | 0 .../theropodbasic/singlestrike.ron | 0 .../theropodbasic/triplestrike.ron | 0 .../theropodbird/singlestrike.ron | 0 .../theropodbird/triplestrike.ron | 0 .../{unique => custom}/tidalclaws/bubbles.ron | 0 .../{unique => custom}/turret/arrows.ron | 0 .../turret/flamethrower.ron | 0 .../wendigomagic/frostbomb.ron | 0 .../wendigomagic/singlestrike.ron | 0 .../items/npc_weapons/axe/minotaur_axe.ron | 3 +- .../items/npc_weapons/axe/oni_blue_axe.ron | 3 +- .../biped_small/adlet/gnoll_staff.ron | 3 +- .../biped_small/gnarling/gnoll_staff.ron | 3 +- .../biped_small/haniwa/gnoll_staff.ron | 3 +- .../biped_small/myrmidon/gnoll_staff.ron | 3 +- .../biped_small/sahagin/gnoll_staff.ron | 3 +- .../items/npc_weapons/bow/saurok_bow.ron | 3 +- .../npc_weapons/hammer/cyclops_hammer.ron | 3 +- .../npc_weapons/hammer/harvester_scythe.ron | 3 +- .../items/npc_weapons/hammer/ogre_hammer.ron | 3 +- .../npc_weapons/hammer/oni_red_hammer.ron | 3 +- .../items/npc_weapons/hammer/troll_hammer.ron | 3 +- .../items/npc_weapons/hammer/yeti_hammer.ron | 3 +- .../npc_weapons/staff/mindflayer_staff.ron | 1 + .../items/npc_weapons/staff/ogre_staff.ron | 3 +- .../items/npc_weapons/staff/saurok_staff.ron | 3 +- .../npc_weapons/sword/dullahan_sword.ron | 3 +- .../items/npc_weapons/sword/saurok_sword.ron | 3 +- .../items/npc_weapons/unique/beast_claws.ron | 3 +- .../npc_weapons/unique/birdlargebreathe.ron | 3 +- .../npc_weapons/unique/birdlargefire.ron | 3 +- .../common/items/npc_weapons/unique/husk.ron | 3 +- .../items/npc_weapons/unique/quadlowbasic.ron | 3 +- .../items/npc_weapons/unique/quadlowbeam.ron | 3 +- .../npc_weapons/unique/quadlowbreathe.ron | 3 +- .../items/npc_weapons/unique/quadlowquick.ron | 3 +- .../npc_weapons/unique/quadlowranged.ron | 3 +- .../items/npc_weapons/unique/quadlowtail.ron | 3 +- .../items/npc_weapons/unique/quadmedbasic.ron | 3 +- .../npc_weapons/unique/quadmedbasicgentle.ron | 3 +- .../npc_weapons/unique/quadmedcharge.ron | 3 +- .../items/npc_weapons/unique/quadmedhoof.ron | 3 +- .../items/npc_weapons/unique/quadmedjump.ron | 3 +- .../items/npc_weapons/unique/quadmedquick.ron | 3 +- .../npc_weapons/unique/quadsmallbasic.ron | 3 +- .../npc_weapons/unique/stone_golems_fist.ron | 3 +- .../npc_weapons/unique/theropodbasic.ron | 3 +- .../items/npc_weapons/unique/theropodbird.ron | 3 +- .../npc_weapons/unique/theropodcharge.ron | 3 +- .../items/npc_weapons/unique/tidal_claws.ron | 3 +- .../items/npc_weapons/unique/turret.ron | 3 +- .../npc_weapons/unique/wendigo_magic.ron | 3 +- common/src/comp/agent.rs | 2 +- common/src/comp/inventory/item/mod.rs | 40 ++- common/src/comp/inventory/item/modular.rs | 64 ++-- common/src/comp/inventory/item/tool.rs | 42 +-- common/src/comp/inventory/loadout_builder.rs | 4 +- server/src/persistence/json_models.rs | 14 +- server/src/sys/agent.rs | 101 +++--- voxygen/anim/src/biped_large/alpha.rs | 123 ++++--- voxygen/anim/src/biped_large/beam.rs | 2 +- voxygen/anim/src/biped_large/beta.rs | 122 ++++--- voxygen/anim/src/biped_large/blink.rs | 2 +- voxygen/anim/src/biped_large/dash.rs | 4 +- voxygen/anim/src/biped_large/idle.rs | 8 +- voxygen/anim/src/biped_large/jump.rs | 8 +- voxygen/anim/src/biped_large/run.rs | 8 +- voxygen/anim/src/biped_large/shoot.rs | 70 ++-- voxygen/anim/src/biped_large/spinmelee.rs | 2 +- voxygen/anim/src/biped_large/stunned.rs | 316 +++++++++-------- voxygen/anim/src/biped_large/summon.rs | 2 +- voxygen/anim/src/biped_large/wield.rs | 318 ++++++++++-------- voxygen/anim/src/biped_small/alpha.rs | 7 +- voxygen/anim/src/biped_small/shoot.rs | 2 +- voxygen/anim/src/biped_small/stunned.rs | 11 +- voxygen/anim/src/biped_small/wield.rs | 8 +- voxygen/anim/src/character/alpha.rs | 18 +- voxygen/anim/src/character/beta.rs | 6 +- voxygen/anim/src/character/block.rs | 4 +- voxygen/anim/src/character/chargeswing.rs | 6 +- voxygen/anim/src/character/dash.rs | 6 +- voxygen/anim/src/character/leapmelee.rs | 6 +- voxygen/anim/src/character/spin.rs | 6 +- voxygen/anim/src/character/staggered.rs | 2 +- voxygen/anim/src/character/stunned.rs | 2 +- voxygen/anim/src/character/wield.rs | 4 +- voxygen/src/hud/util.rs | 7 +- voxygen/src/scene/figure/mod.rs | 65 ++-- 130 files changed, 922 insertions(+), 791 deletions(-) rename assets/common/abilities/{unique => custom}/beastclaws/basic.ron (100%) rename assets/common/abilities/{unique => custom}/birdlargebreathe/firebomb.ron (100%) rename assets/common/abilities/{unique => custom}/birdlargebreathe/flamethrower.ron (100%) rename assets/common/abilities/{unique => custom}/birdlargebreathe/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/birdlargefire/firebomb.ron (100%) rename assets/common/abilities/{unique => custom}/birdlargefire/fireshockwave.ron (100%) rename assets/common/abilities/{unique => custom}/birdlargefire/flamethrower.ron (100%) rename assets/common/abilities/{unique => custom}/birdlargefire/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/husk/singlestrike.ron (100%) rename assets/common/abilities/{unique => custom}/husk/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/mindflayer/cursedflames.ron (100%) rename assets/common/abilities/{unique => custom}/mindflayer/dimensionaldoor.ron (100%) rename assets/common/abilities/{unique => custom}/mindflayer/necroticvortex.ron (100%) rename assets/common/abilities/{unique => custom}/mindflayer/summonminions.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowbasic/singlestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowbasic/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowbeam/healingbeam.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowbreathe/dash.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowbreathe/flamethrower.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowbreathe/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowquick/dash.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowquick/quadstrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowranged/firebomb.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowranged/singlestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowtail/charged.ron (100%) rename assets/common/abilities/{unique => custom}/quadlowtail/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedbasic/singlestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedbasic/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedcharge/dash.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedcharge/doublestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedhoof/basic.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedjump/doublestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedjump/leap.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedjump/quickleap.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedquick/dash.ron (100%) rename assets/common/abilities/{unique => custom}/quadmedquick/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/quadsmallbasic/singlestrike.ron (100%) rename assets/common/abilities/{unique => custom}/stonegolemfist/shockwave.ron (100%) rename assets/common/abilities/{unique => custom}/stonegolemfist/singlestrike.ron (100%) rename assets/common/abilities/{unique => custom}/stonegolemfist/spin.ron (100%) rename assets/common/abilities/{unique => custom}/theropodbasic/dash.ron (100%) rename assets/common/abilities/{unique => custom}/theropodbasic/singlestrike.ron (100%) rename assets/common/abilities/{unique => custom}/theropodbasic/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/theropodbird/singlestrike.ron (100%) rename assets/common/abilities/{unique => custom}/theropodbird/triplestrike.ron (100%) rename assets/common/abilities/{unique => custom}/tidalclaws/bubbles.ron (100%) rename assets/common/abilities/{unique => custom}/turret/arrows.ron (100%) rename assets/common/abilities/{unique => custom}/turret/flamethrower.ron (100%) rename assets/common/abilities/{unique => custom}/wendigomagic/frostbomb.ron (100%) rename assets/common/abilities/{unique => custom}/wendigomagic/singlestrike.ron (100%) diff --git a/assets/common/abilities/ability_set_manifest.ron b/assets/common/abilities/ability_set_manifest.ron index a412d740c7..18f67e45e6 100644 --- a/assets/common/abilities/ability_set_manifest.ron +++ b/assets/common/abilities/ability_set_manifest.ron @@ -29,9 +29,9 @@ (Some(Bow(UnlockRepeater)), "common.abilities.bow.repeater"), ], ), - Tool(Unique(Husk)): ( - primary: "common.abilities.unique.husk.singlestrike", - secondary: "common.abilities.unique.husk.triplestrike", + Custom("Husk"): ( + primary: "common.abilities.custom.husk.singlestrike", + secondary: "common.abilities.custom.husk.triplestrike", abilities: [], ), Tool(Spear): ( @@ -40,28 +40,28 @@ abilities: [], ), - Tool(HammerSimple): ( + Custom("Hammer Simple"): ( primary: "common.abilities.hammersimple.doublestrike", secondary: "common.abilities.hammersimple.doublestrike", abilities: [], ), - Tool(AxeSimple): ( + Custom("Axe Simple"): ( primary: "common.abilities.axesimple.doublestrike", secondary: "common.abilities.axesimple.dash", abilities: [], ), - Tool(SwordSimple): ( + Custom("Sword Simple"): ( primary: "common.abilities.swordsimple.doublestrike", secondary: "common.abilities.swordsimple.dash", abilities: [ ], ), - Tool(StaffSimple): ( + Custom("Staff Simple"): ( primary: "common.abilities.staffsimple.firebomb", secondary: "common.abilities.staffsimple.flamethrower", abilities: [], ), - Tool(BowSimple): ( + Custom("Bow Simple"): ( primary: "common.abilities.bowsimple.basic", secondary: "common.abilities.bowsimple.basic", abilities: [ @@ -91,134 +91,134 @@ secondary: "common.abilities.shield.block", abilities: [], ), - Tool(Unique(StoneGolemFist)): ( - primary: "common.abilities.unique.stonegolemfist.singlestrike", - secondary: "common.abilities.unique.stonegolemfist.shockwave", + Custom("Stone Golem"): ( + primary: "common.abilities.custom.stonegolemfist.singlestrike", + secondary: "common.abilities.custom.stonegolemfist.shockwave", abilities: [ - (None, "common.abilities.unique.stonegolemfist.spin"), + (None, "common.abilities.custom.stonegolemfist.spin"), ], ), - Tool(Unique(BeastClaws)): ( - primary: "common.abilities.unique.beastclaws.basic", - secondary: "common.abilities.unique.beastclaws.basic", + Custom("Beast Claws"): ( + primary: "common.abilities.custom.beastclaws.basic", + secondary: "common.abilities.custom.beastclaws.basic", abilities: [], ), - Tool(Unique(WendigoMagic)): ( - primary: "common.abilities.unique.wendigomagic.frostbomb", - secondary: "common.abilities.unique.wendigomagic.singlestrike", + Custom("Wendigo Magic"): ( + primary: "common.abilities.custom.wendigomagic.frostbomb", + secondary: "common.abilities.custom.wendigomagic.singlestrike", abilities: [], ), - Tool(Unique(TidalClaws)): ( + Custom("Tidal Claws"): ( primary: "common.abilities.staff.flamethrower", - secondary: "common.abilities.unique.wendigomagic.singlestrike", + secondary: "common.abilities.custom.wendigomagic.singlestrike", abilities: [], ), - Tool(Unique(QuadMedQuick)): ( - primary: "common.abilities.unique.quadmedquick.triplestrike", - secondary: "common.abilities.unique.quadmedquick.dash", + Custom("Quad Med Quick"): ( + primary: "common.abilities.custom.quadmedquick.triplestrike", + secondary: "common.abilities.custom.quadmedquick.dash", abilities: [], ), - Tool(Unique(QuadMedJump)): ( - primary: "common.abilities.unique.quadmedjump.leap", - secondary: "common.abilities.unique.quadmedjump.doublestrike", + Custom("Quad Med Jump"): ( + primary: "common.abilities.custom.quadmedjump.leap", + secondary: "common.abilities.custom.quadmedjump.doublestrike", abilities: [ - (None, "common.abilities.unique.quadmedjump.quickleap"), + (None, "common.abilities.custom.quadmedjump.quickleap"), ], ), - Tool(Unique(QuadMedCharge)): ( - primary: "common.abilities.unique.quadmedcharge.doublestrike", - secondary: "common.abilities.unique.quadmedcharge.dash", + Custom("Quad Med Charge"): ( + primary: "common.abilities.custom.quadmedcharge.doublestrike", + secondary: "common.abilities.custom.quadmedcharge.dash", abilities: [], ), - Tool(Unique(QuadMedHoof)): ( - primary: "common.abilities.unique.quadmedhoof.basic", - secondary: "common.abilities.unique.quadmedhoof.basic", + Custom("Quad Med Hoof"): ( + primary: "common.abilities.custom.quadmedhoof.basic", + secondary: "common.abilities.custom.quadmedhoof.basic", abilities: [], ), - Tool(Unique(QuadMedBasic)): ( - primary: "common.abilities.unique.quadmedbasic.singlestrike", - secondary: "common.abilities.unique.quadmedbasic.triplestrike", + Custom("Quad Med Basic"): ( + primary: "common.abilities.custom.quadmedbasic.singlestrike", + secondary: "common.abilities.custom.quadmedbasic.triplestrike", abilities: [], ), - Tool(Unique(QuadLowRanged)): ( - primary: "common.abilities.unique.quadlowranged.singlestrike", - secondary: "common.abilities.unique.quadlowranged.firebomb", + Custom("Quad Low Ranged"): ( + primary: "common.abilities.custom.quadlowranged.singlestrike", + secondary: "common.abilities.custom.quadlowranged.firebomb", abilities: [], ), - Tool(Unique(QuadLowBreathe)): ( - primary: "common.abilities.unique.quadlowbreathe.flamethrower", - secondary: "common.abilities.unique.quadlowbreathe.triplestrike", + Custom("Quad Low Breathe"): ( + primary: "common.abilities.custom.quadlowbreathe.flamethrower", + secondary: "common.abilities.custom.quadlowbreathe.triplestrike", abilities: [ - (None, "common.abilities.unique.quadlowbreathe.dash"), + (None, "common.abilities.custom.quadlowbreathe.dash"), ], ), - Tool(Unique(QuadLowTail)): ( - primary: "common.abilities.unique.quadlowtail.charged", - secondary: "common.abilities.unique.quadlowtail.triplestrike", + Custom("Quad Low Tail"): ( + primary: "common.abilities.custom.quadlowtail.charged", + secondary: "common.abilities.custom.quadlowtail.triplestrike", abilities: [], ), - Tool(Unique(QuadLowQuick)): ( - primary: "common.abilities.unique.quadlowquick.dash", - secondary: "common.abilities.unique.quadlowquick.quadstrike", + Custom("Quad Low Quick"): ( + primary: "common.abilities.custom.quadlowquick.dash", + secondary: "common.abilities.custom.quadlowquick.quadstrike", abilities: [], ), - Tool(Unique(QuadLowBasic)): ( - primary: "common.abilities.unique.quadlowbasic.triplestrike", - secondary: "common.abilities.unique.quadlowbasic.singlestrike", + Custom("Quad Low Basic"): ( + primary: "common.abilities.custom.quadlowbasic.triplestrike", + secondary: "common.abilities.custom.quadlowbasic.singlestrike", abilities: [], ), - Tool(Unique(QuadLowBeam)): ( - primary: "common.abilities.unique.quadlowbeam.healingbeam", - secondary: "common.abilities.unique.quadlowbreathe.triplestrike", + Custom("Quad Low Beam"): ( + primary: "common.abilities.custom.quadlowbeam.healingbeam", + secondary: "common.abilities.custom.quadlowbreathe.triplestrike", abilities: [ - (None, "common.abilities.unique.quadlowbreathe.dash"), + (None, "common.abilities.custom.quadlowbreathe.dash"), ], ), - Tool(Unique(QuadSmallBasic)): ( - primary: "common.abilities.unique.quadsmallbasic.singlestrike", - secondary: "common.abilities.unique.quadsmallbasic.singlestrike", + Custom("Quad Small Basic"): ( + primary: "common.abilities.custom.quadsmallbasic.singlestrike", + secondary: "common.abilities.custom.quadsmallbasic.singlestrike", abilities: [], ), - Tool(Unique(TheropodBasic)): ( - primary: "common.abilities.unique.theropodbasic.triplestrike", - secondary: "common.abilities.unique.theropodbasic.triplestrike", + Custom("Theropod Basic"): ( + primary: "common.abilities.custom.theropodbasic.triplestrike", + secondary: "common.abilities.custom.theropodbasic.triplestrike", abilities: [], ), - Tool(Unique(TheropodBird)): ( - primary: "common.abilities.unique.theropodbird.triplestrike", - secondary: "common.abilities.unique.theropodbird.triplestrike", + Custom("Theropod Bird"): ( + primary: "common.abilities.custom.theropodbird.triplestrike", + secondary: "common.abilities.custom.theropodbird.triplestrike", abilities: [], ), - Tool(Unique(TheropodCharge)): ( - primary: "common.abilities.unique.theropodbird.triplestrike", - secondary: "common.abilities.unique.theropodbasic.dash", + Custom("Theropod Charge"): ( + primary: "common.abilities.custom.theropodbird.triplestrike", + secondary: "common.abilities.custom.theropodbasic.dash", abilities: [], ), - Tool(Unique(ObjectTurret)): ( - primary: "common.abilities.unique.turret.arrows", - secondary: "common.abilities.unique.turret.arrows", + Custom("Turret"): ( + primary: "common.abilities.custom.turret.arrows", + secondary: "common.abilities.custom.turret.arrows", abilities: [], ), - // Tool(Unique(MindflayerStaff)): ( - // primary: "common.abilities.unique.mindflayer.cursedflames", - // secondary: "common.abilities.unique.mindflayer.necroticvortex", - // abilities: [ - // (None, "common.abilities.unique.mindflayer.dimensionaldoor"), - // (None, "common.abilities.unique.mindflayer.summonminions"), - // ], - // ), - Tool(Unique(BirdLargeBreathe)): ( - primary: "common.abilities.unique.birdlargebreathe.firebomb", - secondary: "common.abilities.unique.birdlargebreathe.triplestrike", + Custom("Mindflayer"): ( + primary: "common.abilities.custom.mindflayer.cursedflames", + secondary: "common.abilities.custom.mindflayer.necroticvortex", abilities: [ - (None, "common.abilities.unique.birdlargebreathe.flamethrower"), + (None, "common.abilities.custom.mindflayer.dimensionaldoor"), + (None, "common.abilities.custom.mindflayer.summonminions"), ], ), - Tool(Unique(BirdLargeFire)): ( - primary: "common.abilities.unique.birdlargefire.firebomb", - secondary: "common.abilities.unique.birdlargefire.triplestrike", + Custom("Bird Large Breathe"): ( + primary: "common.abilities.custom.birdlargebreathe.firebomb", + secondary: "common.abilities.custom.birdlargebreathe.triplestrike", abilities: [ - (None, "common.abilities.unique.birdlargefire.fireshockwave"), + (None, "common.abilities.custom.birdlargebreathe.flamethrower"), + ], + ), + Custom("Bird Large Fire"): ( + primary: "common.abilities.custom.birdlargefire.firebomb", + secondary: "common.abilities.custom.birdlargefire.triplestrike", + abilities: [ + (None, "common.abilities.custom.birdlargefire.fireshockwave"), ], ), Tool(Debug): ( diff --git a/assets/common/abilities/unique/beastclaws/basic.ron b/assets/common/abilities/custom/beastclaws/basic.ron similarity index 100% rename from assets/common/abilities/unique/beastclaws/basic.ron rename to assets/common/abilities/custom/beastclaws/basic.ron diff --git a/assets/common/abilities/unique/birdlargebreathe/firebomb.ron b/assets/common/abilities/custom/birdlargebreathe/firebomb.ron similarity index 100% rename from assets/common/abilities/unique/birdlargebreathe/firebomb.ron rename to assets/common/abilities/custom/birdlargebreathe/firebomb.ron diff --git a/assets/common/abilities/unique/birdlargebreathe/flamethrower.ron b/assets/common/abilities/custom/birdlargebreathe/flamethrower.ron similarity index 100% rename from assets/common/abilities/unique/birdlargebreathe/flamethrower.ron rename to assets/common/abilities/custom/birdlargebreathe/flamethrower.ron diff --git a/assets/common/abilities/unique/birdlargebreathe/triplestrike.ron b/assets/common/abilities/custom/birdlargebreathe/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/birdlargebreathe/triplestrike.ron rename to assets/common/abilities/custom/birdlargebreathe/triplestrike.ron diff --git a/assets/common/abilities/unique/birdlargefire/firebomb.ron b/assets/common/abilities/custom/birdlargefire/firebomb.ron similarity index 100% rename from assets/common/abilities/unique/birdlargefire/firebomb.ron rename to assets/common/abilities/custom/birdlargefire/firebomb.ron diff --git a/assets/common/abilities/unique/birdlargefire/fireshockwave.ron b/assets/common/abilities/custom/birdlargefire/fireshockwave.ron similarity index 100% rename from assets/common/abilities/unique/birdlargefire/fireshockwave.ron rename to assets/common/abilities/custom/birdlargefire/fireshockwave.ron diff --git a/assets/common/abilities/unique/birdlargefire/flamethrower.ron b/assets/common/abilities/custom/birdlargefire/flamethrower.ron similarity index 100% rename from assets/common/abilities/unique/birdlargefire/flamethrower.ron rename to assets/common/abilities/custom/birdlargefire/flamethrower.ron diff --git a/assets/common/abilities/unique/birdlargefire/triplestrike.ron b/assets/common/abilities/custom/birdlargefire/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/birdlargefire/triplestrike.ron rename to assets/common/abilities/custom/birdlargefire/triplestrike.ron diff --git a/assets/common/abilities/unique/husk/singlestrike.ron b/assets/common/abilities/custom/husk/singlestrike.ron similarity index 100% rename from assets/common/abilities/unique/husk/singlestrike.ron rename to assets/common/abilities/custom/husk/singlestrike.ron diff --git a/assets/common/abilities/unique/husk/triplestrike.ron b/assets/common/abilities/custom/husk/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/husk/triplestrike.ron rename to assets/common/abilities/custom/husk/triplestrike.ron diff --git a/assets/common/abilities/unique/mindflayer/cursedflames.ron b/assets/common/abilities/custom/mindflayer/cursedflames.ron similarity index 100% rename from assets/common/abilities/unique/mindflayer/cursedflames.ron rename to assets/common/abilities/custom/mindflayer/cursedflames.ron diff --git a/assets/common/abilities/unique/mindflayer/dimensionaldoor.ron b/assets/common/abilities/custom/mindflayer/dimensionaldoor.ron similarity index 100% rename from assets/common/abilities/unique/mindflayer/dimensionaldoor.ron rename to assets/common/abilities/custom/mindflayer/dimensionaldoor.ron diff --git a/assets/common/abilities/unique/mindflayer/necroticvortex.ron b/assets/common/abilities/custom/mindflayer/necroticvortex.ron similarity index 100% rename from assets/common/abilities/unique/mindflayer/necroticvortex.ron rename to assets/common/abilities/custom/mindflayer/necroticvortex.ron diff --git a/assets/common/abilities/unique/mindflayer/summonminions.ron b/assets/common/abilities/custom/mindflayer/summonminions.ron similarity index 100% rename from assets/common/abilities/unique/mindflayer/summonminions.ron rename to assets/common/abilities/custom/mindflayer/summonminions.ron diff --git a/assets/common/abilities/unique/quadlowbasic/singlestrike.ron b/assets/common/abilities/custom/quadlowbasic/singlestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadlowbasic/singlestrike.ron rename to assets/common/abilities/custom/quadlowbasic/singlestrike.ron diff --git a/assets/common/abilities/unique/quadlowbasic/triplestrike.ron b/assets/common/abilities/custom/quadlowbasic/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadlowbasic/triplestrike.ron rename to assets/common/abilities/custom/quadlowbasic/triplestrike.ron diff --git a/assets/common/abilities/unique/quadlowbeam/healingbeam.ron b/assets/common/abilities/custom/quadlowbeam/healingbeam.ron similarity index 100% rename from assets/common/abilities/unique/quadlowbeam/healingbeam.ron rename to assets/common/abilities/custom/quadlowbeam/healingbeam.ron diff --git a/assets/common/abilities/unique/quadlowbreathe/dash.ron b/assets/common/abilities/custom/quadlowbreathe/dash.ron similarity index 100% rename from assets/common/abilities/unique/quadlowbreathe/dash.ron rename to assets/common/abilities/custom/quadlowbreathe/dash.ron diff --git a/assets/common/abilities/unique/quadlowbreathe/flamethrower.ron b/assets/common/abilities/custom/quadlowbreathe/flamethrower.ron similarity index 100% rename from assets/common/abilities/unique/quadlowbreathe/flamethrower.ron rename to assets/common/abilities/custom/quadlowbreathe/flamethrower.ron diff --git a/assets/common/abilities/unique/quadlowbreathe/triplestrike.ron b/assets/common/abilities/custom/quadlowbreathe/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadlowbreathe/triplestrike.ron rename to assets/common/abilities/custom/quadlowbreathe/triplestrike.ron diff --git a/assets/common/abilities/unique/quadlowquick/dash.ron b/assets/common/abilities/custom/quadlowquick/dash.ron similarity index 100% rename from assets/common/abilities/unique/quadlowquick/dash.ron rename to assets/common/abilities/custom/quadlowquick/dash.ron diff --git a/assets/common/abilities/unique/quadlowquick/quadstrike.ron b/assets/common/abilities/custom/quadlowquick/quadstrike.ron similarity index 100% rename from assets/common/abilities/unique/quadlowquick/quadstrike.ron rename to assets/common/abilities/custom/quadlowquick/quadstrike.ron diff --git a/assets/common/abilities/unique/quadlowranged/firebomb.ron b/assets/common/abilities/custom/quadlowranged/firebomb.ron similarity index 100% rename from assets/common/abilities/unique/quadlowranged/firebomb.ron rename to assets/common/abilities/custom/quadlowranged/firebomb.ron diff --git a/assets/common/abilities/unique/quadlowranged/singlestrike.ron b/assets/common/abilities/custom/quadlowranged/singlestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadlowranged/singlestrike.ron rename to assets/common/abilities/custom/quadlowranged/singlestrike.ron diff --git a/assets/common/abilities/unique/quadlowtail/charged.ron b/assets/common/abilities/custom/quadlowtail/charged.ron similarity index 100% rename from assets/common/abilities/unique/quadlowtail/charged.ron rename to assets/common/abilities/custom/quadlowtail/charged.ron diff --git a/assets/common/abilities/unique/quadlowtail/triplestrike.ron b/assets/common/abilities/custom/quadlowtail/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadlowtail/triplestrike.ron rename to assets/common/abilities/custom/quadlowtail/triplestrike.ron diff --git a/assets/common/abilities/unique/quadmedbasic/singlestrike.ron b/assets/common/abilities/custom/quadmedbasic/singlestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadmedbasic/singlestrike.ron rename to assets/common/abilities/custom/quadmedbasic/singlestrike.ron diff --git a/assets/common/abilities/unique/quadmedbasic/triplestrike.ron b/assets/common/abilities/custom/quadmedbasic/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadmedbasic/triplestrike.ron rename to assets/common/abilities/custom/quadmedbasic/triplestrike.ron diff --git a/assets/common/abilities/unique/quadmedcharge/dash.ron b/assets/common/abilities/custom/quadmedcharge/dash.ron similarity index 100% rename from assets/common/abilities/unique/quadmedcharge/dash.ron rename to assets/common/abilities/custom/quadmedcharge/dash.ron diff --git a/assets/common/abilities/unique/quadmedcharge/doublestrike.ron b/assets/common/abilities/custom/quadmedcharge/doublestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadmedcharge/doublestrike.ron rename to assets/common/abilities/custom/quadmedcharge/doublestrike.ron diff --git a/assets/common/abilities/unique/quadmedhoof/basic.ron b/assets/common/abilities/custom/quadmedhoof/basic.ron similarity index 100% rename from assets/common/abilities/unique/quadmedhoof/basic.ron rename to assets/common/abilities/custom/quadmedhoof/basic.ron diff --git a/assets/common/abilities/unique/quadmedjump/doublestrike.ron b/assets/common/abilities/custom/quadmedjump/doublestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadmedjump/doublestrike.ron rename to assets/common/abilities/custom/quadmedjump/doublestrike.ron diff --git a/assets/common/abilities/unique/quadmedjump/leap.ron b/assets/common/abilities/custom/quadmedjump/leap.ron similarity index 100% rename from assets/common/abilities/unique/quadmedjump/leap.ron rename to assets/common/abilities/custom/quadmedjump/leap.ron diff --git a/assets/common/abilities/unique/quadmedjump/quickleap.ron b/assets/common/abilities/custom/quadmedjump/quickleap.ron similarity index 100% rename from assets/common/abilities/unique/quadmedjump/quickleap.ron rename to assets/common/abilities/custom/quadmedjump/quickleap.ron diff --git a/assets/common/abilities/unique/quadmedquick/dash.ron b/assets/common/abilities/custom/quadmedquick/dash.ron similarity index 100% rename from assets/common/abilities/unique/quadmedquick/dash.ron rename to assets/common/abilities/custom/quadmedquick/dash.ron diff --git a/assets/common/abilities/unique/quadmedquick/triplestrike.ron b/assets/common/abilities/custom/quadmedquick/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadmedquick/triplestrike.ron rename to assets/common/abilities/custom/quadmedquick/triplestrike.ron diff --git a/assets/common/abilities/unique/quadsmallbasic/singlestrike.ron b/assets/common/abilities/custom/quadsmallbasic/singlestrike.ron similarity index 100% rename from assets/common/abilities/unique/quadsmallbasic/singlestrike.ron rename to assets/common/abilities/custom/quadsmallbasic/singlestrike.ron diff --git a/assets/common/abilities/unique/stonegolemfist/shockwave.ron b/assets/common/abilities/custom/stonegolemfist/shockwave.ron similarity index 100% rename from assets/common/abilities/unique/stonegolemfist/shockwave.ron rename to assets/common/abilities/custom/stonegolemfist/shockwave.ron diff --git a/assets/common/abilities/unique/stonegolemfist/singlestrike.ron b/assets/common/abilities/custom/stonegolemfist/singlestrike.ron similarity index 100% rename from assets/common/abilities/unique/stonegolemfist/singlestrike.ron rename to assets/common/abilities/custom/stonegolemfist/singlestrike.ron diff --git a/assets/common/abilities/unique/stonegolemfist/spin.ron b/assets/common/abilities/custom/stonegolemfist/spin.ron similarity index 100% rename from assets/common/abilities/unique/stonegolemfist/spin.ron rename to assets/common/abilities/custom/stonegolemfist/spin.ron diff --git a/assets/common/abilities/unique/theropodbasic/dash.ron b/assets/common/abilities/custom/theropodbasic/dash.ron similarity index 100% rename from assets/common/abilities/unique/theropodbasic/dash.ron rename to assets/common/abilities/custom/theropodbasic/dash.ron diff --git a/assets/common/abilities/unique/theropodbasic/singlestrike.ron b/assets/common/abilities/custom/theropodbasic/singlestrike.ron similarity index 100% rename from assets/common/abilities/unique/theropodbasic/singlestrike.ron rename to assets/common/abilities/custom/theropodbasic/singlestrike.ron diff --git a/assets/common/abilities/unique/theropodbasic/triplestrike.ron b/assets/common/abilities/custom/theropodbasic/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/theropodbasic/triplestrike.ron rename to assets/common/abilities/custom/theropodbasic/triplestrike.ron diff --git a/assets/common/abilities/unique/theropodbird/singlestrike.ron b/assets/common/abilities/custom/theropodbird/singlestrike.ron similarity index 100% rename from assets/common/abilities/unique/theropodbird/singlestrike.ron rename to assets/common/abilities/custom/theropodbird/singlestrike.ron diff --git a/assets/common/abilities/unique/theropodbird/triplestrike.ron b/assets/common/abilities/custom/theropodbird/triplestrike.ron similarity index 100% rename from assets/common/abilities/unique/theropodbird/triplestrike.ron rename to assets/common/abilities/custom/theropodbird/triplestrike.ron diff --git a/assets/common/abilities/unique/tidalclaws/bubbles.ron b/assets/common/abilities/custom/tidalclaws/bubbles.ron similarity index 100% rename from assets/common/abilities/unique/tidalclaws/bubbles.ron rename to assets/common/abilities/custom/tidalclaws/bubbles.ron diff --git a/assets/common/abilities/unique/turret/arrows.ron b/assets/common/abilities/custom/turret/arrows.ron similarity index 100% rename from assets/common/abilities/unique/turret/arrows.ron rename to assets/common/abilities/custom/turret/arrows.ron diff --git a/assets/common/abilities/unique/turret/flamethrower.ron b/assets/common/abilities/custom/turret/flamethrower.ron similarity index 100% rename from assets/common/abilities/unique/turret/flamethrower.ron rename to assets/common/abilities/custom/turret/flamethrower.ron diff --git a/assets/common/abilities/unique/wendigomagic/frostbomb.ron b/assets/common/abilities/custom/wendigomagic/frostbomb.ron similarity index 100% rename from assets/common/abilities/unique/wendigomagic/frostbomb.ron rename to assets/common/abilities/custom/wendigomagic/frostbomb.ron diff --git a/assets/common/abilities/unique/wendigomagic/singlestrike.ron b/assets/common/abilities/custom/wendigomagic/singlestrike.ron similarity index 100% rename from assets/common/abilities/unique/wendigomagic/singlestrike.ron rename to assets/common/abilities/custom/wendigomagic/singlestrike.ron diff --git a/assets/common/items/npc_weapons/axe/minotaur_axe.ron b/assets/common/items/npc_weapons/axe/minotaur_axe.ron index 18e3df5fef..e3ce3c4f9a 100644 --- a/assets/common/items/npc_weapons/axe/minotaur_axe.ron +++ b/assets/common/items/npc_weapons/axe/minotaur_axe.ron @@ -2,7 +2,7 @@ ItemDef( name: "Minotaur Axe", description: "Placeholder", kind: Tool(( - kind: AxeSimple, + kind: Axe, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Axe Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/axe/oni_blue_axe.ron b/assets/common/items/npc_weapons/axe/oni_blue_axe.ron index 7e8b7d1c0b..e75ec8033e 100644 --- a/assets/common/items/npc_weapons/axe/oni_blue_axe.ron +++ b/assets/common/items/npc_weapons/axe/oni_blue_axe.ron @@ -2,7 +2,7 @@ ItemDef( name: "Blue Oni Axe", description: "Placeholder", kind: Tool(( - kind: AxeSimple, + kind: Axe, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Axe Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/biped_small/adlet/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/adlet/gnoll_staff.ron index 74ce82f7f4..bbe530fae3 100644 --- a/assets/common/items/npc_weapons/biped_small/adlet/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/adlet/gnoll_staff.ron @@ -2,7 +2,7 @@ ItemDef( name: "Gnoll Staff", description: "eekum bokum", kind: Tool(( - kind: StaffSimple, + kind: Staff, hands: Two, stats: Direct(( equip_time_secs: 0.0, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Staff Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/biped_small/gnarling/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/gnarling/gnoll_staff.ron index fafe3067b0..a8adbd40d1 100644 --- a/assets/common/items/npc_weapons/biped_small/gnarling/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/gnarling/gnoll_staff.ron @@ -2,7 +2,7 @@ ItemDef( name: "Gnoll Staff", description: "eekum bokum", kind: Tool(( - kind: StaffSimple, + kind: Staff, hands: Two, stats: Direct(( equip_time_secs: 0.0, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Staff Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/biped_small/haniwa/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/haniwa/gnoll_staff.ron index 9464ed3b10..80339f2a1b 100644 --- a/assets/common/items/npc_weapons/biped_small/haniwa/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/haniwa/gnoll_staff.ron @@ -2,7 +2,7 @@ ItemDef( name: "Gnoll Staff", description: "eekum bokum", kind: Tool(( - kind: StaffSimple, + kind: Staff, hands: Two, stats: Direct(( equip_time_secs: 0.0, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Staff Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/biped_small/myrmidon/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/myrmidon/gnoll_staff.ron index 0ade8993ab..1b1c8db574 100644 --- a/assets/common/items/npc_weapons/biped_small/myrmidon/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/myrmidon/gnoll_staff.ron @@ -2,7 +2,7 @@ ItemDef( name: "Gnoll Staff", description: "eekum bokum", kind: Tool(( - kind: StaffSimple, + kind: Staff, hands: Two, stats: Direct(( equip_time_secs: 0.0, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Staff Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/biped_small/sahagin/gnoll_staff.ron b/assets/common/items/npc_weapons/biped_small/sahagin/gnoll_staff.ron index 37aa7c0a0a..cd63aba6cc 100644 --- a/assets/common/items/npc_weapons/biped_small/sahagin/gnoll_staff.ron +++ b/assets/common/items/npc_weapons/biped_small/sahagin/gnoll_staff.ron @@ -2,7 +2,7 @@ ItemDef( name: "Gnoll Staff", description: "eekum bokum", kind: Tool(( - kind: StaffSimple, + kind: Staff, hands: Two, stats: Direct(( equip_time_secs: 0.0, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Staff Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/bow/saurok_bow.ron b/assets/common/items/npc_weapons/bow/saurok_bow.ron index 67f0f1bfdf..eb6435716e 100644 --- a/assets/common/items/npc_weapons/bow/saurok_bow.ron +++ b/assets/common/items/npc_weapons/bow/saurok_bow.ron @@ -2,7 +2,7 @@ ItemDef( name: "Saurok bow", description: "Placeholder", kind: Tool(( - kind: BowSimple, + kind: Bow, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Bow Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/hammer/cyclops_hammer.ron b/assets/common/items/npc_weapons/hammer/cyclops_hammer.ron index 9438074410..77570b0704 100644 --- a/assets/common/items/npc_weapons/hammer/cyclops_hammer.ron +++ b/assets/common/items/npc_weapons/hammer/cyclops_hammer.ron @@ -2,7 +2,7 @@ ItemDef( name: "Cyclops Hammer", description: "Placeholder", kind: Tool(( - kind: HammerSimple, + kind: Hammer, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Hammer Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/hammer/harvester_scythe.ron b/assets/common/items/npc_weapons/hammer/harvester_scythe.ron index 904e5b1051..f1b76bd02b 100644 --- a/assets/common/items/npc_weapons/hammer/harvester_scythe.ron +++ b/assets/common/items/npc_weapons/hammer/harvester_scythe.ron @@ -2,7 +2,7 @@ ItemDef( name: "Harvester Sythe", description: "Placeholder", kind: Tool(( - kind: HammerSimple, + kind: Hammer, hands: Two, stats: Direct(( equip_time_secs: 0.001, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Hammer Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/hammer/ogre_hammer.ron b/assets/common/items/npc_weapons/hammer/ogre_hammer.ron index 57e3467ee5..9b7eba981a 100644 --- a/assets/common/items/npc_weapons/hammer/ogre_hammer.ron +++ b/assets/common/items/npc_weapons/hammer/ogre_hammer.ron @@ -2,7 +2,7 @@ ItemDef( name: "Ogre Hammer", description: "Placeholder", kind: Tool(( - kind: HammerSimple, + kind: Hammer, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Hammer Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/hammer/oni_red_hammer.ron b/assets/common/items/npc_weapons/hammer/oni_red_hammer.ron index 70cfd36888..202bdf8e94 100644 --- a/assets/common/items/npc_weapons/hammer/oni_red_hammer.ron +++ b/assets/common/items/npc_weapons/hammer/oni_red_hammer.ron @@ -2,7 +2,7 @@ ItemDef( name: "Red Oni Hammer", description: "Placeholder", kind: Tool(( - kind: HammerSimple, + kind: Hammer, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Hammer Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/hammer/troll_hammer.ron b/assets/common/items/npc_weapons/hammer/troll_hammer.ron index 2a674cfdae..37c4134806 100644 --- a/assets/common/items/npc_weapons/hammer/troll_hammer.ron +++ b/assets/common/items/npc_weapons/hammer/troll_hammer.ron @@ -2,7 +2,7 @@ ItemDef( name: "Troll Hammer", description: "Placeholder", kind: Tool(( - kind: HammerSimple, + kind: Hammer, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Hammer Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/hammer/yeti_hammer.ron b/assets/common/items/npc_weapons/hammer/yeti_hammer.ron index eccdeb5c69..941a228542 100644 --- a/assets/common/items/npc_weapons/hammer/yeti_hammer.ron +++ b/assets/common/items/npc_weapons/hammer/yeti_hammer.ron @@ -2,7 +2,7 @@ ItemDef( name: "Yeti Hammer", description: "Placeholder", kind: Tool(( - kind: HammerSimple, + kind: Hammer, hands: Two, stats: Direct(( equip_time_secs: 0.0, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Hammer Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/staff/mindflayer_staff.ron b/assets/common/items/npc_weapons/staff/mindflayer_staff.ron index b6a4c9493a..8f90f6e704 100644 --- a/assets/common/items/npc_weapons/staff/mindflayer_staff.ron +++ b/assets/common/items/npc_weapons/staff/mindflayer_staff.ron @@ -15,4 +15,5 @@ ItemDef( )), quality: Legendary, tags: [], + ability_set: Some(Custom("Mindflayer")), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/staff/ogre_staff.ron b/assets/common/items/npc_weapons/staff/ogre_staff.ron index fb9bbd9931..734d8ea5af 100644 --- a/assets/common/items/npc_weapons/staff/ogre_staff.ron +++ b/assets/common/items/npc_weapons/staff/ogre_staff.ron @@ -2,7 +2,7 @@ ItemDef( name: "Ogre Staff", description: "Placeholder", kind: Tool(( - kind: StaffSimple, + kind: Staff, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Staff Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/staff/saurok_staff.ron b/assets/common/items/npc_weapons/staff/saurok_staff.ron index 3632ce0373..1245f8a2ce 100644 --- a/assets/common/items/npc_weapons/staff/saurok_staff.ron +++ b/assets/common/items/npc_weapons/staff/saurok_staff.ron @@ -2,7 +2,7 @@ ItemDef( name: "Saurok Staff", description: "Placeholder", kind: Tool(( - kind: StaffSimple, + kind: Staff, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Staff Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/sword/dullahan_sword.ron b/assets/common/items/npc_weapons/sword/dullahan_sword.ron index 1667592b26..fe18a6df6f 100644 --- a/assets/common/items/npc_weapons/sword/dullahan_sword.ron +++ b/assets/common/items/npc_weapons/sword/dullahan_sword.ron @@ -2,7 +2,7 @@ ItemDef( name: "Dullahan Sword", description: "Placehoder", kind: Tool(( - kind: SwordSimple, + kind: Sword, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Sword Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/sword/saurok_sword.ron b/assets/common/items/npc_weapons/sword/saurok_sword.ron index 80bebe84fb..ec9217366e 100644 --- a/assets/common/items/npc_weapons/sword/saurok_sword.ron +++ b/assets/common/items/npc_weapons/sword/saurok_sword.ron @@ -2,7 +2,7 @@ ItemDef( name: "Saurok Sword", description: "Placehoder", kind: Tool(( - kind: SwordSimple, + kind: Sword, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Sword Simple"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/beast_claws.ron b/assets/common/items/npc_weapons/unique/beast_claws.ron index 47ab85c46f..90241ebc14 100644 --- a/assets/common/items/npc_weapons/unique/beast_claws.ron +++ b/assets/common/items/npc_weapons/unique/beast_claws.ron @@ -2,7 +2,7 @@ ItemDef( name: "Beast Claws", description: "Was attached to a beast.", kind: Tool(( - kind: Unique(BeastClaws), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Beast Claws") ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/birdlargebreathe.ron b/assets/common/items/npc_weapons/unique/birdlargebreathe.ron index 15b41aa6ed..42108da67f 100644 --- a/assets/common/items/npc_weapons/unique/birdlargebreathe.ron +++ b/assets/common/items/npc_weapons/unique/birdlargebreathe.ron @@ -2,7 +2,7 @@ ItemDef( name: "Bird Large Breathe", description: "testing123", kind: Tool(( - kind: Unique(BirdLargeBreathe), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Bird Large Breathe"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/birdlargefire.ron b/assets/common/items/npc_weapons/unique/birdlargefire.ron index b092a15f0f..2c37a0b3ee 100644 --- a/assets/common/items/npc_weapons/unique/birdlargefire.ron +++ b/assets/common/items/npc_weapons/unique/birdlargefire.ron @@ -2,7 +2,7 @@ ItemDef( name: "Bird Large Fire", description: "testing123", kind: Tool(( - kind: Unique(BirdLargeFire), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Bird Large Fire"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/husk.ron b/assets/common/items/npc_weapons/unique/husk.ron index ba9d250c87..9a98a8a84e 100644 --- a/assets/common/items/npc_weapons/unique/husk.ron +++ b/assets/common/items/npc_weapons/unique/husk.ron @@ -2,7 +2,7 @@ ItemDef( name: "Husk", description: "testing123", kind: Tool(( - kind: Unique(Husk), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Husk"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadlowbasic.ron b/assets/common/items/npc_weapons/unique/quadlowbasic.ron index a5ff499793..ca793fe143 100644 --- a/assets/common/items/npc_weapons/unique/quadlowbasic.ron +++ b/assets/common/items/npc_weapons/unique/quadlowbasic.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Low Basic", description: "testing123", kind: Tool(( - kind: Unique(QuadLowBasic), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Low Basic"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadlowbeam.ron b/assets/common/items/npc_weapons/unique/quadlowbeam.ron index 12399df2b4..94b14d8399 100644 --- a/assets/common/items/npc_weapons/unique/quadlowbeam.ron +++ b/assets/common/items/npc_weapons/unique/quadlowbeam.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Small Beam", description: "testing123", kind: Tool(( - kind: Unique(QuadLowBeam), + kind: Nautral, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Low Beam"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadlowbreathe.ron b/assets/common/items/npc_weapons/unique/quadlowbreathe.ron index b1ccea6ec3..4b3ab835d3 100644 --- a/assets/common/items/npc_weapons/unique/quadlowbreathe.ron +++ b/assets/common/items/npc_weapons/unique/quadlowbreathe.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Low Breathe", description: "testing123", kind: Tool(( - kind: Unique(QuadLowBreathe), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Low Breathe"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadlowquick.ron b/assets/common/items/npc_weapons/unique/quadlowquick.ron index debf0b4577..c34a50c9a8 100644 --- a/assets/common/items/npc_weapons/unique/quadlowquick.ron +++ b/assets/common/items/npc_weapons/unique/quadlowquick.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Low Quick", description: "testing123", kind: Tool(( - kind: Unique(QuadLowQuick), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Low Quick"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadlowranged.ron b/assets/common/items/npc_weapons/unique/quadlowranged.ron index e374b96d14..504c1eccd5 100644 --- a/assets/common/items/npc_weapons/unique/quadlowranged.ron +++ b/assets/common/items/npc_weapons/unique/quadlowranged.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Low Ranged", description: "testing123", kind: Tool(( - kind: Unique(QuadLowRanged), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Low Ranged"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadlowtail.ron b/assets/common/items/npc_weapons/unique/quadlowtail.ron index 296092f1d5..332eda2a39 100644 --- a/assets/common/items/npc_weapons/unique/quadlowtail.ron +++ b/assets/common/items/npc_weapons/unique/quadlowtail.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Low Tail", description: "testing123", kind: Tool(( - kind: Unique(QuadLowTail), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Low Tail"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadmedbasic.ron b/assets/common/items/npc_weapons/unique/quadmedbasic.ron index 88a5a4259d..6a7523a567 100644 --- a/assets/common/items/npc_weapons/unique/quadmedbasic.ron +++ b/assets/common/items/npc_weapons/unique/quadmedbasic.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Med Basic", description: "testing123", kind: Tool(( - kind: Unique(QuadMedBasic), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Med Basic"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadmedbasicgentle.ron b/assets/common/items/npc_weapons/unique/quadmedbasicgentle.ron index 54bb3f550d..c99ba91ebd 100644 --- a/assets/common/items/npc_weapons/unique/quadmedbasicgentle.ron +++ b/assets/common/items/npc_weapons/unique/quadmedbasicgentle.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Med Basic", description: "testing123", kind: Tool(( - kind: Unique(QuadMedBasic), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Med Basic"), ) diff --git a/assets/common/items/npc_weapons/unique/quadmedcharge.ron b/assets/common/items/npc_weapons/unique/quadmedcharge.ron index 7529bd67ca..bbf946df40 100644 --- a/assets/common/items/npc_weapons/unique/quadmedcharge.ron +++ b/assets/common/items/npc_weapons/unique/quadmedcharge.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Med Charge", description: "testing123", kind: Tool(( - kind: Unique(QuadMedCharge), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Med Charge"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadmedhoof.ron b/assets/common/items/npc_weapons/unique/quadmedhoof.ron index 39ebbadfc6..3316f245c1 100644 --- a/assets/common/items/npc_weapons/unique/quadmedhoof.ron +++ b/assets/common/items/npc_weapons/unique/quadmedhoof.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Med Hoof", description: "testing123", kind: Tool(( - kind: Unique(QuadMedHoof), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Med Hoof"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadmedjump.ron b/assets/common/items/npc_weapons/unique/quadmedjump.ron index 4f5629cfd6..7d735857a6 100644 --- a/assets/common/items/npc_weapons/unique/quadmedjump.ron +++ b/assets/common/items/npc_weapons/unique/quadmedjump.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Med Jump", description: "testing123", kind: Tool(( - kind: Unique(QuadMedJump), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Med Jump"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadmedquick.ron b/assets/common/items/npc_weapons/unique/quadmedquick.ron index 362e742f2a..8f40024609 100644 --- a/assets/common/items/npc_weapons/unique/quadmedquick.ron +++ b/assets/common/items/npc_weapons/unique/quadmedquick.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Med Quick", description: "testing123", kind: Tool(( - kind: Unique(QuadMedQuick), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Med Quick"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/quadsmallbasic.ron b/assets/common/items/npc_weapons/unique/quadsmallbasic.ron index d8b39b9788..d244a758f4 100644 --- a/assets/common/items/npc_weapons/unique/quadsmallbasic.ron +++ b/assets/common/items/npc_weapons/unique/quadsmallbasic.ron @@ -2,7 +2,7 @@ ItemDef( name: "Quad Small Basic", description: "testing123", kind: Tool(( - kind: Unique(QuadSmallBasic), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Quad Small Basic"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/stone_golems_fist.ron b/assets/common/items/npc_weapons/unique/stone_golems_fist.ron index 76d0e638c4..74e75a4bf3 100644 --- a/assets/common/items/npc_weapons/unique/stone_golems_fist.ron +++ b/assets/common/items/npc_weapons/unique/stone_golems_fist.ron @@ -2,7 +2,7 @@ ItemDef( name: "Stone Golem's Fist", description: "Was attached to a mighty stone golem.", kind: Tool(( - kind: Unique(StoneGolemFist), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.001, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Stone Golem"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/theropodbasic.ron b/assets/common/items/npc_weapons/unique/theropodbasic.ron index 508a2cb867..5634c6c599 100644 --- a/assets/common/items/npc_weapons/unique/theropodbasic.ron +++ b/assets/common/items/npc_weapons/unique/theropodbasic.ron @@ -2,7 +2,7 @@ ItemDef( name: "Theropod Basic", description: "testing123", kind: Tool(( - kind: Unique(TheropodBasic), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Theropod Basic"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/theropodbird.ron b/assets/common/items/npc_weapons/unique/theropodbird.ron index 61a8699963..fa931a0d6a 100644 --- a/assets/common/items/npc_weapons/unique/theropodbird.ron +++ b/assets/common/items/npc_weapons/unique/theropodbird.ron @@ -2,7 +2,7 @@ ItemDef( name: "Theropod Bird", description: "testing123", kind: Tool(( - kind: Unique(TheropodBird), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Theropod Bird"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/theropodcharge.ron b/assets/common/items/npc_weapons/unique/theropodcharge.ron index 4196fab6fc..7f7bfefbec 100644 --- a/assets/common/items/npc_weapons/unique/theropodcharge.ron +++ b/assets/common/items/npc_weapons/unique/theropodcharge.ron @@ -2,7 +2,7 @@ ItemDef( name: "Theropod Charge", description: "testing123", kind: Tool(( - kind: Unique(TheropodCharge), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Theropod Charge"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/tidal_claws.ron b/assets/common/items/npc_weapons/unique/tidal_claws.ron index 402db6d7b3..16adeec750 100644 --- a/assets/common/items/npc_weapons/unique/tidal_claws.ron +++ b/assets/common/items/npc_weapons/unique/tidal_claws.ron @@ -2,7 +2,7 @@ ItemDef( name: "Tidal Claws", description: "Snip snap", kind: Tool(( - kind: Unique(TidalClaws), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Tidal Claws"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/turret.ron b/assets/common/items/npc_weapons/unique/turret.ron index befcb19311..2956970863 100644 --- a/assets/common/items/npc_weapons/unique/turret.ron +++ b/assets/common/items/npc_weapons/unique/turret.ron @@ -2,7 +2,7 @@ ItemDef( name: "Turret", description: "Turret weapon", kind: Tool(( - kind: Unique(ObjectTurret), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.01, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Turret"), ) \ No newline at end of file diff --git a/assets/common/items/npc_weapons/unique/wendigo_magic.ron b/assets/common/items/npc_weapons/unique/wendigo_magic.ron index 20fc80d9f9..c0fd69c390 100644 --- a/assets/common/items/npc_weapons/unique/wendigo_magic.ron +++ b/assets/common/items/npc_weapons/unique/wendigo_magic.ron @@ -2,7 +2,7 @@ ItemDef( name: "Wendigo Magic", description: "spook.", kind: Tool(( - kind: Unique(WendigoMagic), + kind: Natural, hands: Two, stats: Direct(( equip_time_secs: 0.5, @@ -15,4 +15,5 @@ ItemDef( )), quality: Low, tags: [], + ability_set: Custom("Wendigo Magic"), ) \ No newline at end of file diff --git a/common/src/comp/agent.rs b/common/src/comp/agent.rs index 237a480119..946e937153 100644 --- a/common/src/comp/agent.rs +++ b/common/src/comp/agent.rs @@ -23,7 +23,7 @@ pub enum Tactic { Sword, Bow, Staff, - StoneGolemBoss, + StoneGolem, CircleCharge { radius: u32, circle_time: u32 }, QuadLowRanged, TailSlap, diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index a63ce8d6c5..1ab3430bd4 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -4,7 +4,7 @@ pub mod tool; // Reexports pub use modular::{ModularComponent, ModularComponentKind, ModularComponentTag}; -pub use tool::{AbilitySet, AbilitySpec, Hands, MaterialStatManifest, Tool, ToolKind, UniqueKind}; +pub use tool::{AbilitySet, AbilitySpec, Hands, MaterialStatManifest, Tool, ToolKind}; use crate::{ assets::{self, AssetExt, Error}, @@ -278,7 +278,7 @@ pub struct ItemDef { pub slots: u16, /// Used to specify a custom ability set for a weapon. Leave None (or don't /// include field in ItemDef) to use default ability set for weapon kind. - pub ability_set: Option, + pub ability_set: Option, } impl PartialEq for ItemDef { @@ -304,21 +304,27 @@ impl TryFrom<(&Item, &AbilityMap, &MaterialStatManifest)> for ItemConfig { ) -> Result { if let ItemKind::Tool(tool) = &item.kind { // If no custom ability set is specified, fall back to abilityset of tool kind. - let ability_set_key = item - .item_def - .ability_set - .as_ref() - .map_or(AbilitySpec::Tool(tool.kind), |set| { - AbilitySpec::Custom(set.to_string()) - }); - - let abilities = if let Some(set) = ability_map.get_ability_set(&ability_set_key) { - set.clone().modified_by_tool(&tool, msm, &item.components) + let tool_default = ability_map + .get_ability_set(&AbilitySpec::Tool(tool.kind)) + .cloned(); + let abilities = if let Some(set_key) = item.ability_set() { + if let Some(set) = ability_map.get_ability_set(set_key) { + set.clone().modified_by_tool(&tool, msm, &item.components) + } else { + error!( + "Custom ability set: {:?} references non-existent set, falling back to \ + default ability set.", + set_key + ); + tool_default.unwrap_or_default() + } + } else if let Some(set) = tool_default { + set.modified_by_tool(&tool, msm, &item.components) } else { error!( - "No AbilitySet in the ability map for specification: {:?} falling back to \ - default", - ability_set_key + "No ability set defined for tool: {:?}, falling back to default ability \ + set.", + tool.kind ); Default::default() }; @@ -452,7 +458,7 @@ struct RawItemDef { tags: Vec, #[serde(default)] slots: u16, - ability_set: Option, + ability_set: Option, } impl assets::Asset for RawItemDef { @@ -760,6 +766,8 @@ impl Item { _ => return None, })) } + + pub fn ability_set(&self) -> Option<&AbilitySpec> { self.item_def.ability_set.as_ref() } } /// Provides common methods providing details about an item definition diff --git a/common/src/comp/inventory/item/modular.rs b/common/src/comp/inventory/item/modular.rs index d1a8ed77cb..9b6278636b 100644 --- a/common/src/comp/inventory/item/modular.rs +++ b/common/src/comp/inventory/item/modular.rs @@ -36,34 +36,34 @@ impl TagExampleInfo for ModularComponentTag { fn name(&self) -> &'static str { match self.modkind { ModularComponentKind::Damage => match self.toolkind { - ToolKind::Sword | ToolKind::SwordSimple => "sword blade", - ToolKind::Axe | ToolKind::AxeSimple => "axe head", - ToolKind::Hammer | ToolKind::HammerSimple => "hammer head", - ToolKind::Bow | ToolKind::BowSimple => "bow limbs", + ToolKind::Sword => "sword blade", + ToolKind::Axe => "axe head", + ToolKind::Hammer => "hammer head", + ToolKind::Bow => "bow limbs", ToolKind::Dagger => "dagger blade", - ToolKind::Staff | ToolKind::StaffSimple => "staff head", + ToolKind::Staff => "staff head", ToolKind::Sceptre => "sceptre head", // TODO: naming ToolKind::Spear => "spear damage component", ToolKind::Shield => "shield damage component", - ToolKind::Unique(_) => "unique damage component", ToolKind::Debug => "debug damage component", ToolKind::Farming => "farming damage component", ToolKind::Pick => "pickaxe head", + ToolKind::Natural => "natural damage component", ToolKind::Empty => "empty damage component", }, ModularComponentKind::Held => match self.toolkind { - ToolKind::Sword | ToolKind::SwordSimple => "sword hilt", - ToolKind::Axe | ToolKind::AxeSimple => "axe shaft", - ToolKind::Hammer | ToolKind::HammerSimple => "hammer shaft", - ToolKind::Bow | ToolKind::BowSimple => "bow riser", + ToolKind::Sword => "sword hilt", + ToolKind::Axe => "axe shaft", + ToolKind::Hammer => "hammer shaft", + ToolKind::Bow => "bow riser", ToolKind::Dagger => "dagger grip", - ToolKind::Staff | ToolKind::StaffSimple => "staff shaft", + ToolKind::Staff => "staff shaft", ToolKind::Sceptre => "sceptre shaft", // TODO: naming ToolKind::Spear => "spear held component", ToolKind::Shield => "shield held component", - ToolKind::Unique(_) => "unique held component", + ToolKind::Natural => "natural held component", ToolKind::Debug => "debug held component", ToolKind::Farming => "farming held component", ToolKind::Pick => "pickaxe handle", @@ -75,48 +75,32 @@ impl TagExampleInfo for ModularComponentTag { fn exemplar_identifier(&self) -> &'static str { match self.modkind { ModularComponentKind::Damage => match self.toolkind { - ToolKind::Sword | ToolKind::SwordSimple => { - "common.items.tag_examples.modular.damage.sword" - }, - ToolKind::Axe | ToolKind::AxeSimple => { - "common.items.tag_examples.modular.damage.axe" - }, - ToolKind::Hammer | ToolKind::HammerSimple => { - "common.items.tag_examples.modular.damage.hammer" - }, - ToolKind::Bow | ToolKind::BowSimple => { - "common.items.tag_examples.modular.damage.bow" - }, + ToolKind::Sword => "common.items.tag_examples.modular.damage.sword", + ToolKind::Axe => "common.items.tag_examples.modular.damage.axe", + ToolKind::Hammer => "common.items.tag_examples.modular.damage.hammer", + ToolKind::Bow => "common.items.tag_examples.modular.damage.bow", ToolKind::Dagger => "common.items.tag_examples.modular.damage.dagger", - ToolKind::Staff | ToolKind::StaffSimple => { - "common.items.tag_examples.modular.damage.staff" - }, + ToolKind::Staff => "common.items.tag_examples.modular.damage.staff", ToolKind::Sceptre => "common.items.tag_examples.modular.damage.sceptre", ToolKind::Shield => "common.items.tag_examples.modular.damage.shield", ToolKind::Spear => "common.items.tag_examples.modular.damage.spear", - ToolKind::Unique(_) => "common.items.tag_examples.modular.damage.unique", + ToolKind::Natural => "common.items.tag_examples.modular.damage.natural", ToolKind::Debug => "common.items.tag_examples.modular.damage.debug", ToolKind::Farming => "common.items.tag_examples.modular.damage.farming", ToolKind::Pick => "common.items.tag_examples.modular.damage.pick", ToolKind::Empty => "common.items.tag_examples.modular.damage.empty", }, ModularComponentKind::Held => match self.toolkind { - ToolKind::Sword | ToolKind::SwordSimple => { - "common.items.tag_examples.modular.held.sword" - }, - ToolKind::Axe | ToolKind::AxeSimple => "common.items.tag_examples.modular.held.axe", - ToolKind::Hammer | ToolKind::HammerSimple => { - "common.items.tag_examples.modular.held.hammer" - }, - ToolKind::Bow | ToolKind::BowSimple => "common.items.tag_examples.modular.held.bow", + ToolKind::Sword => "common.items.tag_examples.modular.held.sword", + ToolKind::Axe => "common.items.tag_examples.modular.held.axe", + ToolKind::Hammer => "common.items.tag_examples.modular.held.hammer", + ToolKind::Bow => "common.items.tag_examples.modular.held.bow", ToolKind::Dagger => "common.items.tag_examples.modular.held.dagger", - ToolKind::Staff | ToolKind::StaffSimple => { - "common.items.tag_examples.modular.held.staff" - }, + ToolKind::Staff => "common.items.tag_examples.modular.held.staff", ToolKind::Sceptre => "common.items.tag_examples.modular.held.sceptre", ToolKind::Shield => "common.items.tag_examples.modular.held.shield", ToolKind::Spear => "common.items.tag_examples.modular.held.spear", - ToolKind::Unique(_) => "common.items.tag_examples.modular.held.unique", + ToolKind::Natural => "common.items.tag_examples.modular.held.natural", ToolKind::Debug => "common.items.tag_examples.modular.held.debug", ToolKind::Farming => "common.items.tag_examples.modular.held.farming", ToolKind::Pick => "common.items.tag_examples.modular.held.pick", diff --git a/common/src/comp/inventory/item/tool.rs b/common/src/comp/inventory/item/tool.rs index 5f18228e38..3f4053b9ad 100644 --- a/common/src/comp/inventory/item/tool.rs +++ b/common/src/comp/inventory/item/tool.rs @@ -17,18 +17,13 @@ pub enum ToolKind { Sword, Axe, Hammer, - HammerSimple, //simple tools utilized by small/large biped variants, to simplify movesets - SwordSimple, - StaffSimple, - BowSimple, - AxeSimple, Bow, Dagger, Staff, Sceptre, Shield, Spear, - Unique(UniqueKind), + Natural, // Intended for invisible weapons (e.g. a creature using its claws or biting) Debug, Farming, Pick, @@ -40,20 +35,15 @@ impl ToolKind { pub fn identifier_name(&self) -> &'static str { match self { ToolKind::Sword => "sword", - ToolKind::SwordSimple => "simple sword", ToolKind::Axe => "axe", - ToolKind::AxeSimple => "simple axe", ToolKind::Hammer => "hammer", - ToolKind::HammerSimple => "simple hammer", ToolKind::Bow => "bow", - ToolKind::BowSimple => "simple bow", ToolKind::Dagger => "dagger", ToolKind::Staff => "staff", - ToolKind::StaffSimple => "simple staff", ToolKind::Spear => "spear", ToolKind::Sceptre => "sceptre", ToolKind::Shield => "shield", - ToolKind::Unique(_) => "unique", + ToolKind::Natural => "natural", ToolKind::Debug => "debug", ToolKind::Farming => "farming", ToolKind::Pick => "pickaxe", @@ -424,31 +414,3 @@ impl assets::Compound for AbilityMap { )) } } - -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] -pub enum UniqueKind { - StoneGolemFist, - Husk, - BeastClaws, - WendigoMagic, - TidalClaws, - QuadMedQuick, - QuadMedJump, - QuadMedHoof, - QuadMedBasic, - QuadMedCharge, - QuadLowRanged, - QuadLowBreathe, - QuadLowTail, - QuadLowQuick, - QuadLowBasic, - QuadLowBeam, - QuadSmallBasic, - TheropodBasic, - TheropodBird, - TheropodCharge, - ObjectTurret, - WoodenSpear, - BirdLargeBreathe, - BirdLargeFire, -} diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index e1fb785727..c1f0f76e8d 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -388,7 +388,7 @@ impl LoadoutBuilder { "common.items.npc_armor.biped_small.adlet.tail.adlet", ))) .build(), - Some(ToolKind::Spear) | Some(ToolKind::StaffSimple) => LoadoutBuilder::new() + Some(ToolKind::Spear) | Some(ToolKind::Staff) => LoadoutBuilder::new() .active_item(active_item) .head(Some(Item::new_from_asset_expect( "common.items.npc_armor.biped_small.adlet.head.adlet_spear", @@ -433,7 +433,7 @@ impl LoadoutBuilder { "common.items.npc_armor.biped_small.gnarling.tail.gnarling", ))) .build(), - Some(ToolKind::StaffSimple) => LoadoutBuilder::new() + Some(ToolKind::Staff) => LoadoutBuilder::new() .active_item(active_item) .head(Some(Item::new_from_asset_expect( "common.items.npc_armor.biped_small.gnarling.head.gnarling", diff --git a/server/src/persistence/json_models.rs b/server/src/persistence/json_models.rs index 999c036d77..6dae0286f5 100644 --- a/server/src/persistence/json_models.rs +++ b/server/src/persistence/json_models.rs @@ -144,16 +144,11 @@ pub fn skill_to_db_string(skill: comp::skills::Skill) -> String { UnlockGroup(SkillGroupKind::Weapon(ToolKind::Dagger)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Shield)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Spear)) - | UnlockGroup(SkillGroupKind::Weapon(ToolKind::HammerSimple)) - | UnlockGroup(SkillGroupKind::Weapon(ToolKind::StaffSimple)) - | UnlockGroup(SkillGroupKind::Weapon(ToolKind::BowSimple)) - | UnlockGroup(SkillGroupKind::Weapon(ToolKind::AxeSimple)) - | UnlockGroup(SkillGroupKind::Weapon(ToolKind::SwordSimple)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Debug)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Farming)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Pick)) | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Empty)) - | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Unique(_))) + | UnlockGroup(SkillGroupKind::Weapon(ToolKind::Natural)) | UnlockGroup(SkillGroupKind::General) => { panic!("Tried to add unsupported skill to database: {:?}", skill) }, @@ -288,16 +283,11 @@ pub fn skill_group_to_db_string(skill_group: comp::skills::SkillGroupKind) -> St Weapon(ToolKind::Dagger) | Weapon(ToolKind::Shield) | Weapon(ToolKind::Spear) - | Weapon(ToolKind::HammerSimple) - | Weapon(ToolKind::StaffSimple) - | Weapon(ToolKind::BowSimple) - | Weapon(ToolKind::AxeSimple) - | Weapon(ToolKind::SwordSimple) | Weapon(ToolKind::Debug) | Weapon(ToolKind::Farming) | Weapon(ToolKind::Pick) | Weapon(ToolKind::Empty) - | Weapon(ToolKind::Unique(_)) => panic!( + | Weapon(ToolKind::Natural) => panic!( "Tried to add unsupported skill group to database: {:?}", skill_group ), diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index 9b4f0800c9..408091b738 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -10,7 +10,7 @@ use common::{ inventory::{item::ItemTag, slot::EquipSlot}, invite::{InviteKind, InviteResponse}, item::{ - tool::{ToolKind, UniqueKind}, + tool::{AbilitySpec, ToolKind}, Item, ItemDesc, ItemKind, }, skills::{AxeSkill, BowSkill, HammerSkill, Skill, StaffSkill, SwordSkill}, @@ -1492,56 +1492,63 @@ impl<'a> AgentData<'a> { read_data: &ReadData, ) { let min_attack_dist = self.body.map_or(3.0, |b| b.radius() * self.scale + 2.0); - let tactic = match self + + let tool_tactic = |tool_kind| match tool_kind { + ToolKind::Bow => Tactic::Bow, + ToolKind::Staff => Tactic::Staff, + ToolKind::Hammer => Tactic::Hammer, + ToolKind::Sword | ToolKind::Spear => Tactic::Sword, + ToolKind::Axe => Tactic::Axe, + _ => Tactic::Melee, + }; + + let tactic = self .inventory .equipped(EquipSlot::Mainhand) .as_ref() - .and_then(|item| { - if let ItemKind::Tool(tool) = &item.kind() { - Some(&tool.kind) + .map(|item| { + if let Some(ability_set) = item.ability_set() { + match ability_set { + AbilitySpec::Custom(spec) => match spec.as_str() { + "Axe Simple" | "Sword Simple" => Tactic::Sword, + "Staff Simple" => Tactic::Staff, + "Bow Simple" => Tactic::Bow, + "Stone Golem" => Tactic::StoneGolem, + "Quad Med Quick" => Tactic::CircleCharge { + radius: 3, + circle_time: 2, + }, + "Quad Med Jump" => Tactic::QuadMedJump, + "Quad Med Charge" => Tactic::CircleCharge { + radius: 12, + circle_time: 1, + }, + "Quad Med Basic" => Tactic::QuadMedBasic, + "Quad Low Ranged" => Tactic::QuadLowRanged, + "Quad Low Breathe" | "Quad Low Beam" => Tactic::Lavadrake, + "Quad Low Tail" => Tactic::TailSlap, + "Quad Low Quick" => Tactic::QuadLowQuick, + "Quad Low Basic" => Tactic::QuadLowBasic, + "Theropod Basic" | "Theropod Bird" => Tactic::Theropod, + "Theropod Charge" => Tactic::CircleCharge { + radius: 6, + circle_time: 1, + }, + "Turret" => Tactic::Turret, + "Bird Large Breathe" => Tactic::BirdLargeBreathe, + "Bird Large Fire" => Tactic::BirdLargeFire, + "Mindflayer" => Tactic::Mindflayer, + _ => Tactic::Melee, + }, + AbilitySpec::Tool(tool_kind) => tool_tactic(*tool_kind), + } + } else if let ItemKind::Tool(tool) = &item.kind() { + tool_tactic(tool.kind) } else { - None + Tactic::Melee } - }) { - Some(ToolKind::Bow) | Some(ToolKind::BowSimple) => Tactic::Bow, - Some(ToolKind::Staff) | Some(ToolKind::StaffSimple) => Tactic::Staff, - Some(ToolKind::Hammer) => Tactic::Hammer, - Some(ToolKind::Sword) - | Some(ToolKind::Spear) - | Some(ToolKind::SwordSimple) - | Some(ToolKind::AxeSimple) => Tactic::Sword, - Some(ToolKind::Axe) => Tactic::Axe, - Some(ToolKind::Unique(UniqueKind::StoneGolemFist)) => Tactic::StoneGolemBoss, - Some(ToolKind::Unique(UniqueKind::QuadMedQuick)) => Tactic::CircleCharge { - radius: 3, - circle_time: 2, - }, - Some(ToolKind::Unique(UniqueKind::QuadMedCharge)) => Tactic::CircleCharge { - radius: 12, - circle_time: 1, - }, - Some(ToolKind::Unique(UniqueKind::TheropodCharge)) => Tactic::CircleCharge { - radius: 6, - circle_time: 1, - }, - - Some(ToolKind::Unique(UniqueKind::QuadMedJump)) => Tactic::QuadMedJump, - Some(ToolKind::Unique(UniqueKind::QuadMedBasic)) => Tactic::QuadMedBasic, - Some(ToolKind::Unique(UniqueKind::QuadLowRanged)) => Tactic::QuadLowRanged, - Some(ToolKind::Unique(UniqueKind::QuadLowTail)) => Tactic::TailSlap, - Some(ToolKind::Unique(UniqueKind::QuadLowQuick)) => Tactic::QuadLowQuick, - Some(ToolKind::Unique(UniqueKind::QuadLowBasic)) => Tactic::QuadLowBasic, - Some(ToolKind::Unique(UniqueKind::QuadLowBreathe)) - | Some(ToolKind::Unique(UniqueKind::QuadLowBeam)) => Tactic::Lavadrake, - Some(ToolKind::Unique(UniqueKind::TheropodBasic)) => Tactic::Theropod, - Some(ToolKind::Unique(UniqueKind::TheropodBird)) => Tactic::Theropod, - Some(ToolKind::Unique(UniqueKind::ObjectTurret)) => Tactic::Turret, - // TODO: Figure this out - // Some(ToolKind::Unique(UniqueKind::MindflayerStaff)) => Tactic::Mindflayer, - Some(ToolKind::Unique(UniqueKind::BirdLargeBreathe)) => Tactic::BirdLargeBreathe, - Some(ToolKind::Unique(UniqueKind::BirdLargeFire)) => Tactic::BirdLargeFire, - _ => Tactic::Melee, - }; + }) + .unwrap_or(Tactic::Melee); // Wield the weapon as running towards the target controller.actions.push(ControlAction::Wield); @@ -2045,7 +2052,7 @@ impl<'a> AgentData<'a> { agent.target = None; } }, - Tactic::StoneGolemBoss => { + Tactic::StoneGolem => { if dist_sqrd < min_attack_dist.powi(2) && angle < 90.0 { // 2.0 is temporary correction factor to allow them to melee with their // large hitbox diff --git a/voxygen/anim/src/biped_large/alpha.rs b/voxygen/anim/src/biped_large/alpha.rs index 9859ef8175..b43b882417 100644 --- a/voxygen/anim/src/biped_large/alpha.rs +++ b/voxygen/anim/src/biped_large/alpha.rs @@ -3,7 +3,7 @@ use super::{ BipedLargeSkeleton, SkeletonAttr, }; use common::{ - comp::item::{ToolKind, UniqueKind}, + comp::item::tool::{AbilitySpec, ToolKind}, states::utils::StageSection, }; use std::f32::consts::PI; @@ -12,8 +12,8 @@ pub struct AlphaAnimation; impl Animation for AlphaAnimation { type Dependency = ( - Option, - Option, + (Option, Option), + (Option, Option), Vec3, f32, Option, @@ -28,7 +28,14 @@ impl Animation for AlphaAnimation { #[allow(clippy::approx_constant)] // TODO: Pending review in #587 fn update_skeleton_inner( skeleton: &Self::Skeleton, - (active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency, + ( + (active_tool_kind, active_tool_spec), + _second_tool, + velocity, + _global_time, + stage_section, + acc_vel, + ): Self::Dependency, anim_time: f32, rate: &mut f32, s_a: &SkeletonAttr, @@ -83,7 +90,7 @@ impl Animation for AlphaAnimation { next.hand_r.orientation = Quaternion::rotation_x(0.0); match active_tool_kind { - Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); next.control_r.position = Vec3::new(0.0, 2.0, -3.0); next.head.orientation = Quaternion::rotation_x(move1 * -0.25) @@ -107,7 +114,7 @@ impl Animation for AlphaAnimation { Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -2.0) * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0); }, - Some(ToolKind::HammerSimple) => { + Some(ToolKind::Hammer) => { next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); @@ -132,7 +139,7 @@ impl Animation for AlphaAnimation { * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0) * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8); }, - Some(ToolKind::AxeSimple) => { + Some(ToolKind::Axe) => { next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); @@ -157,51 +164,79 @@ impl Animation for AlphaAnimation { * Quaternion::rotation_y(-1.8 + move1 * -0.4 + move2 * 3.5) * Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5); }, - Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => { - next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); - next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); - next.lower_torso.orientation = Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4); + Some(ToolKind::Natural) => { + if let Some(AbilitySpec::Custom(spec)) = active_tool_spec { + match spec.as_str() { + "Wendigo Magic" => { + next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); + next.upper_torso.orientation = + Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); + next.lower_torso.orientation = + Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4); - next.control_l.position = - Vec3::new(-9.0 + move2 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5); - next.control_r.position = - Vec3::new(9.0 + move2 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5); + next.control_l.position = Vec3::new( + -9.0 + move2 * 6.0, + 19.0 + move1 * 6.0, + -13.0 + move1 * 10.5, + ); + next.control_r.position = Vec3::new( + 9.0 + move2 * -6.0, + 19.0 + move1 * 6.0, + -13.0 + move1 * 14.5, + ); - next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(-0.15) - * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6); - next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(0.15) - * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6); - next.head.orientation = Quaternion::rotation_x(move1 * 0.3); - }, - Some(ToolKind::Unique(UniqueKind::TidalClaws)) => { - next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); - next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); - next.lower_torso.orientation = Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4); + next.control_l.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(-0.15) + * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6); + next.control_r.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(0.15) + * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6); + next.head.orientation = Quaternion::rotation_x(move1 * 0.3); + }, + "Tidal Claws" => { + next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); + next.upper_torso.orientation = + Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); + next.lower_torso.orientation = + Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4); - next.shoulder_l.orientation = Quaternion::rotation_x( - move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm, - ); - next.shoulder_r.orientation = Quaternion::rotation_x( - move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm, - ); + next.shoulder_l.orientation = Quaternion::rotation_x( + move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm, + ); + next.shoulder_r.orientation = Quaternion::rotation_x( + move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm, + ); - next.control_l.position = - Vec3::new(-14.0 + move2 * 9.0, 12.0 + move1 * 6.0, -12.0 + move1 * 9.0); - next.control_r.position = - Vec3::new(14.0 + move2 * -9.0, 12.0 + move1 * 6.0, -12.0 + move1 * 9.0); + next.control_l.position = Vec3::new( + -14.0 + move2 * 9.0, + 12.0 + move1 * 6.0, + -12.0 + move1 * 9.0, + ); + next.control_r.position = Vec3::new( + 14.0 + move2 * -9.0, + 12.0 + move1 * 6.0, + -12.0 + move1 * 9.0, + ); - next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(-0.15) - * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6); - next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(0.15) - * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6); - next.head.orientation = Quaternion::rotation_x(move1 * 0.3); + next.control_l.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(-0.15) + * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6); + next.control_r.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(0.15) + * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6); + next.head.orientation = Quaternion::rotation_x(move1 * 0.3); + }, + _ => {}, + } + } }, _ => {}, } + next } } diff --git a/voxygen/anim/src/biped_large/beam.rs b/voxygen/anim/src/biped_large/beam.rs index 0acd7ab240..4f77542733 100644 --- a/voxygen/anim/src/biped_large/beam.rs +++ b/voxygen/anim/src/biped_large/beam.rs @@ -59,7 +59,7 @@ impl Animation for BeamAnimation { next.hand_l.orientation = Quaternion::rotation_x(0.0); next.hand_r.orientation = Quaternion::rotation_x(0.0); match active_tool_kind { - Some(ToolKind::StaffSimple) | Some(ToolKind::Sceptre) | Some(ToolKind::Staff) => { + Some(ToolKind::Sceptre) | Some(ToolKind::Staff) => { let (move1base, move2shake, _move2base, move3) = match stage_section { Some(StageSection::Buildup) => ( (anim_time.powf(0.25)).min(1.0), diff --git a/voxygen/anim/src/biped_large/beta.rs b/voxygen/anim/src/biped_large/beta.rs index 258000ff2e..0e42f907a2 100644 --- a/voxygen/anim/src/biped_large/beta.rs +++ b/voxygen/anim/src/biped_large/beta.rs @@ -3,7 +3,7 @@ use super::{ BipedLargeSkeleton, SkeletonAttr, }; use common::{ - comp::item::{ToolKind, UniqueKind}, + comp::item::tool::{AbilitySpec, ToolKind}, states::utils::StageSection, }; use std::f32::consts::PI; @@ -12,8 +12,8 @@ pub struct BetaAnimation; impl Animation for BetaAnimation { type Dependency = ( - Option, - Option, + (Option, Option), + (Option, Option), Vec3, f32, Option, @@ -27,7 +27,14 @@ impl Animation for BetaAnimation { #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_beta")] fn update_skeleton_inner( skeleton: &Self::Skeleton, - (active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency, + ( + (active_tool_kind, active_tool_spec), + _second_tool, + velocity, + _global_time, + stage_section, + acc_vel, + ): Self::Dependency, anim_time: f32, rate: &mut f32, s_a: &SkeletonAttr, @@ -82,7 +89,7 @@ impl Animation for BetaAnimation { next.hand_r.orientation = Quaternion::rotation_x(0.0); match active_tool_kind { - Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); next.control_r.position = Vec3::new(0.0, 2.0, -3.0); next.head.orientation = Quaternion::rotation_x(move1 * -0.25) @@ -108,7 +115,7 @@ impl Animation for BetaAnimation { Quaternion::rotation_x(-0.2 + move1 * 0.5 + move2 * -1.5) * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.0); }, - Some(ToolKind::HammerSimple) => { + Some(ToolKind::Hammer) => { next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); @@ -133,7 +140,7 @@ impl Animation for BetaAnimation { * Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0) * Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8); }, - Some(ToolKind::AxeSimple) => { + Some(ToolKind::Axe) => { next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); @@ -158,48 +165,75 @@ impl Animation for BetaAnimation { * Quaternion::rotation_y(-1.8 + move1 * 3.0 + move2 * -0.9) * Quaternion::rotation_z(move1 * -0.2 + move2 * -1.5); }, - Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => { - next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); - next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); - next.lower_torso.orientation = Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4); + Some(ToolKind::Natural) => { + if let Some(AbilitySpec::Custom(spec)) = active_tool_spec { + match spec.as_str() { + "Wendigo Magic" => { + next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); + next.upper_torso.orientation = + Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); + next.lower_torso.orientation = + Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4); - next.control_l.position = - Vec3::new(-9.0 + move2 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5); - next.control_r.position = - Vec3::new(9.0 + move2 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5); + next.control_l.position = Vec3::new( + -9.0 + move2 * 6.0, + 19.0 + move1 * 6.0, + -13.0 + move1 * 10.5, + ); + next.control_r.position = Vec3::new( + 9.0 + move2 * -6.0, + 19.0 + move1 * 6.0, + -13.0 + move1 * 14.5, + ); - next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(-0.15) - * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6); - next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(0.15) - * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6); - next.head.orientation = Quaternion::rotation_x(move1 * 0.3); - }, - Some(ToolKind::Unique(UniqueKind::TidalClaws)) => { - next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); - next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); - next.lower_torso.orientation = Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4); + next.control_l.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(-0.15) + * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6); + next.control_r.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(0.15) + * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6); + next.head.orientation = Quaternion::rotation_x(move1 * 0.3); + }, + "Tidal Claws" => { + next.torso.position = Vec3::new(0.0, 0.0, move1 * -0.3); + next.upper_torso.orientation = + Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4); + next.lower_torso.orientation = + Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4); - next.shoulder_l.orientation = Quaternion::rotation_x( - move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm, - ); - next.shoulder_r.orientation = Quaternion::rotation_x( - move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm, - ); + next.shoulder_l.orientation = Quaternion::rotation_x( + move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm, + ); + next.shoulder_r.orientation = Quaternion::rotation_x( + move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm, + ); - next.control_l.position = - Vec3::new(-14.0 + move2 * 9.0, 12.0 + move1 * 6.0, -12.0 + move1 * 9.0); - next.control_r.position = - Vec3::new(14.0 + move2 * -9.0, 12.0 + move1 * 6.0, -12.0 + move1 * 9.0); + next.control_l.position = Vec3::new( + -14.0 + move2 * 9.0, + 12.0 + move1 * 6.0, + -12.0 + move1 * 9.0, + ); + next.control_r.position = Vec3::new( + 14.0 + move2 * -9.0, + 12.0 + move1 * 6.0, + -12.0 + move1 * 9.0, + ); - next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(-0.15) - * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6); - next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(0.15) - * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6); - next.head.orientation = Quaternion::rotation_x(move1 * 0.3); + next.control_l.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(-0.15) + * Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6); + next.control_r.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(0.15) + * Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6); + next.head.orientation = Quaternion::rotation_x(move1 * 0.3); + }, + _ => {}, + } + } }, _ => {}, } diff --git a/voxygen/anim/src/biped_large/blink.rs b/voxygen/anim/src/biped_large/blink.rs index 82bda951cc..5146c5d84c 100644 --- a/voxygen/anim/src/biped_large/blink.rs +++ b/voxygen/anim/src/biped_large/blink.rs @@ -78,7 +78,7 @@ impl Animation for BlinkAnimation { next.hand_r.orientation = Quaternion::rotation_x(0.0); match active_tool_kind { - Some(ToolKind::StaffSimple) | Some(ToolKind::Staff) => { + Some(ToolKind::Staff) => { next.head.orientation = Quaternion::rotation_x(move1 * -0.3) * Quaternion::rotation_y(move1 * -0.1); next.control_l.position = Vec3::new(-1.0, 3.0, 12.0); diff --git a/voxygen/anim/src/biped_large/dash.rs b/voxygen/anim/src/biped_large/dash.rs index 575420797d..932ba3cd39 100644 --- a/voxygen/anim/src/biped_large/dash.rs +++ b/voxygen/anim/src/biped_large/dash.rs @@ -81,7 +81,7 @@ impl Animation for DashAnimation { Quaternion::rotation_x(0.6 * speednorm + (footrotl * -0.2) * speednorm); next.torso.orientation = Quaternion::rotation_z(0.0); match active_tool_kind { - Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); next.control_r.position = Vec3::new(0.0, 2.0, -3.0); next.head.orientation = Quaternion::rotation_x(move1 * -0.25) @@ -108,7 +108,7 @@ impl Animation for DashAnimation { * Quaternion::rotation_y(-0.1 + move1 * -0.5 + move2 * 1.5 + move3 * -1.0) * Quaternion::rotation_z(-move3 * -1.5); }, - Some(ToolKind::AxeSimple) => { + Some(ToolKind::Axe) => { next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move3 * 3.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); diff --git a/voxygen/anim/src/biped_large/idle.rs b/voxygen/anim/src/biped_large/idle.rs index 620e4241aa..80a2e183de 100644 --- a/voxygen/anim/src/biped_large/idle.rs +++ b/voxygen/anim/src/biped_large/idle.rs @@ -88,19 +88,19 @@ impl Animation for IdleAnimation { Quaternion::rotation_z(0.0 + slow * 0.2) * Quaternion::rotation_x(0.0); match active_tool_kind { - Some(ToolKind::BowSimple) => { + Some(ToolKind::Bow) => { next.main.position = Vec3::new(-2.0, -5.0, -6.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::StaffSimple) | Some(ToolKind::Sceptre) => { + Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { next.main.position = Vec3::new(-6.0, -5.0, -12.0); next.main.orientation = Quaternion::rotation_y(0.6) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::HammerSimple) | Some(ToolKind::AxeSimple) => { + Some(ToolKind::Hammer) | Some(ToolKind::Axe) => { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, diff --git a/voxygen/anim/src/biped_large/jump.rs b/voxygen/anim/src/biped_large/jump.rs index dd5e0ebfa7..aa88dec809 100644 --- a/voxygen/anim/src/biped_large/jump.rs +++ b/voxygen/anim/src/biped_large/jump.rs @@ -60,19 +60,19 @@ impl Animation for JumpAnimation { next.second.scale = Vec3::one() * 0.0; match active_tool_kind { - Some(ToolKind::BowSimple) => { + Some(ToolKind::Bow) => { next.main.position = Vec3::new(-2.0, -5.0, -6.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::StaffSimple) | Some(ToolKind::Sceptre) => { + Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { next.main.position = Vec3::new(-6.0, -5.0, -12.0); next.main.orientation = Quaternion::rotation_y(0.6) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::HammerSimple) | Some(ToolKind::AxeSimple) => { + Some(ToolKind::Hammer) | Some(ToolKind::Axe) => { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, diff --git a/voxygen/anim/src/biped_large/run.rs b/voxygen/anim/src/biped_large/run.rs index c48f7f8a9f..b6366f8b6f 100644 --- a/voxygen/anim/src/biped_large/run.rs +++ b/voxygen/anim/src/biped_large/run.rs @@ -292,22 +292,22 @@ impl Animation for RunAnimation { * Quaternion::rotation_z(0.0); match active_tool_kind { - Some(ToolKind::BowSimple) => { + Some(ToolKind::Bow) => { next.main.position = Vec3::new(-2.0, -5.0, -6.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::StaffSimple) | Some(ToolKind::Sceptre) => { + Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { next.main.position = Vec3::new(-6.0, -5.0, -12.0); next.main.orientation = Quaternion::rotation_y(0.6) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); }, - Some(ToolKind::HammerSimple) | Some(ToolKind::AxeSimple) => { + Some(ToolKind::Hammer) | Some(ToolKind::Axe) => { next.main.position = Vec3::new(-10.0, -8.0, 12.0); next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57); diff --git a/voxygen/anim/src/biped_large/shoot.rs b/voxygen/anim/src/biped_large/shoot.rs index fcbed1d63f..83a8efedd6 100644 --- a/voxygen/anim/src/biped_large/shoot.rs +++ b/voxygen/anim/src/biped_large/shoot.rs @@ -3,7 +3,7 @@ use super::{ BipedLargeSkeleton, SkeletonAttr, }; use common::{ - comp::item::{ToolKind, UniqueKind}, + comp::item::tool::{AbilitySpec, ToolKind}, states::utils::StageSection, }; use std::f32::consts::PI; @@ -11,8 +11,8 @@ use std::f32::consts::PI; pub struct ShootAnimation; type ShootAnimationDependency = ( - Option, - Option, + (Option, Option), + (Option, Option), Vec3, Vec3, Vec3, @@ -31,8 +31,8 @@ impl Animation for ShootAnimation { fn update_skeleton_inner( skeleton: &Self::Skeleton, ( - active_tool_kind, - _second_tool_kind, + (active_tool_kind, active_tool_spec), + _second_tool, velocity, _orientation, _last_ori, @@ -87,8 +87,9 @@ impl Animation for ShootAnimation { next.hand_l.orientation = Quaternion::rotation_x(0.0); next.hand_r.orientation = Quaternion::rotation_x(0.0); + match active_tool_kind { - Some(ToolKind::StaffSimple) | Some(ToolKind::Sceptre) => { + Some(ToolKind::Staff) | Some(ToolKind::Sceptre) => { let (move1base, move1shake, move2base, move3) = match stage_section { Some(StageSection::Buildup) => { (anim_time, (anim_time * 10.0 + PI).sin(), 0.0, 0.0) @@ -139,7 +140,7 @@ impl Animation for ShootAnimation { next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.8 + 0.6 * speednorm + (footrotl * -0.2)); }, - Some(ToolKind::BowSimple) => { + Some(ToolKind::Bow) => { let (move1base, move2base, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time, 0.0), @@ -184,27 +185,42 @@ impl Animation for ShootAnimation { next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.8 + 1.2 * speednorm + (footrotl * -0.2)); }, - Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => { - let (move1base, _move2base, move3) = match stage_section { - Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), - Some(StageSection::Swing) => (1.0, anim_time, 0.0), - Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), - _ => (0.0, 0.0, 0.0), - }; - let pullback = 1.0 - move3; - let move1 = move1base * pullback; - next.control_l.position = - Vec3::new(-9.0 + move1 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5); - next.control_r.position = - Vec3::new(9.0 + move1 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5); + Some(ToolKind::Natural) => { + if let Some(AbilitySpec::Custom(spec)) = active_tool_spec { + match spec.as_str() { + "Wendigo Magic" => { + let (move1base, _move2base, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Swing) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), + _ => (0.0, 0.0, 0.0), + }; + let pullback = 1.0 - move3; + let move1 = move1base * pullback; + next.control_l.position = Vec3::new( + -9.0 + move1 * 6.0, + 19.0 + move1 * 6.0, + -13.0 + move1 * 10.5, + ); + next.control_r.position = Vec3::new( + 9.0 + move1 * -6.0, + 19.0 + move1 * 6.0, + -13.0 + move1 * 14.5, + ); - next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(-0.15) - * Quaternion::rotation_z(move1 * 0.5); - next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) - * Quaternion::rotation_y(0.15) - * Quaternion::rotation_z(move1 * -0.5); - next.head.orientation = Quaternion::rotation_x(move1 * -0.3); + next.control_l.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(-0.15) + * Quaternion::rotation_z(move1 * 0.5); + next.control_r.orientation = + Quaternion::rotation_x(PI / 3.0 + move1 * 0.5) + * Quaternion::rotation_y(0.15) + * Quaternion::rotation_z(move1 * -0.5); + next.head.orientation = Quaternion::rotation_x(move1 * -0.3); + }, + _ => {}, + } + } }, _ => {}, } diff --git a/voxygen/anim/src/biped_large/spinmelee.rs b/voxygen/anim/src/biped_large/spinmelee.rs index 9a5f919f5e..ea485d1665 100644 --- a/voxygen/anim/src/biped_large/spinmelee.rs +++ b/voxygen/anim/src/biped_large/spinmelee.rs @@ -81,7 +81,7 @@ impl Animation for SpinMeleeAnimation { next.hand_r.orientation = Quaternion::rotation_x(0.0); match active_tool_kind { - Some(ToolKind::StaffSimple) | Some(ToolKind::Staff) => { + Some(ToolKind::Staff) => { next.head.orientation = Quaternion::rotation_x(move1 * -0.3 + move2 * 0.5); next.control_l.position = Vec3::new( -1.0 + move1 * -10.0 + move2 * -10.0, diff --git a/voxygen/anim/src/biped_large/stunned.rs b/voxygen/anim/src/biped_large/stunned.rs index 2622f289fc..d11cf37d61 100644 --- a/voxygen/anim/src/biped_large/stunned.rs +++ b/voxygen/anim/src/biped_large/stunned.rs @@ -3,7 +3,7 @@ use super::{ BipedLargeSkeleton, SkeletonAttr, }; use common::{ - comp::item::{ToolKind, UniqueKind}, + comp::item::tool::{AbilitySpec, ToolKind}, states::utils::StageSection, }; use std::f32::consts::PI; @@ -11,7 +11,12 @@ use std::f32::consts::PI; pub struct StunnedAnimation; impl Animation for StunnedAnimation { - type Dependency = (Option, Vec3, f32, Option); + type Dependency = ( + (Option, Option), + Vec3, + f32, + Option, + ); type Skeleton = BipedLargeSkeleton; #[cfg(feature = "use-dyn-lib")] @@ -20,7 +25,7 @@ impl Animation for StunnedAnimation { #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_stunned")] fn update_skeleton_inner( skeleton: &Self::Skeleton, - (active_tool_kind, velocity, acc_vel, stage_section): Self::Dependency, + ((active_tool_kind, active_tool_spec), velocity, acc_vel, stage_section): Self::Dependency, anim_time: f32, _rate: &mut f32, s_a: &SkeletonAttr, @@ -116,8 +121,9 @@ impl Animation for StunnedAnimation { Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); next.shoulder_r.orientation = Quaternion::rotation_x(0.3); } + match active_tool_kind { - Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); next.control_r.position = Vec3::new(0.0, 2.0, -3.0); @@ -135,7 +141,7 @@ impl Animation for StunnedAnimation { next.control.orientation = Quaternion::rotation_x(-0.2 + short * 0.2) * Quaternion::rotation_y(-0.1); }, - Some(ToolKind::BowSimple) | Some(ToolKind::Bow) => { + Some(ToolKind::Bow) => { next.control_l.position = Vec3::new(-1.0, -2.0, -3.0); next.control_r.position = Vec3::new(0.0, 4.0, 1.0); @@ -154,7 +160,7 @@ impl Animation for StunnedAnimation { * Quaternion::rotation_y(1.0) * Quaternion::rotation_z(-0.3); }, - Some(ToolKind::HammerSimple) | Some(ToolKind::AxeSimple) => { + Some(ToolKind::Hammer) | Some(ToolKind::Axe) => { next.control_l.position = Vec3::new(-1.0, 2.0, 12.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); @@ -171,7 +177,7 @@ impl Animation for StunnedAnimation { next.control.orientation = Quaternion::rotation_x(-1.0 + short * 0.2) * Quaternion::rotation_y(-1.8); }, - Some(ToolKind::StaffSimple) | Some(ToolKind::Staff) => { + Some(ToolKind::Staff) => { next.control_l.position = Vec3::new(-1.0, 3.0, 12.0); next.control_r.position = Vec3::new(1.0, 2.0, 2.0); @@ -190,177 +196,205 @@ impl Animation for StunnedAnimation { next.control.orientation = Quaternion::rotation_x(-0.2 + short * 0.2) * Quaternion::rotation_y(-0.1); }, - Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => { - next.control_l.position = Vec3::new(-9.0, 19.0, -13.0); - next.control_r.position = Vec3::new(9.0, 19.0, -13.0); + Some(ToolKind::Natural) => { + if let Some(AbilitySpec::Custom(spec)) = active_tool_spec { + match spec.as_str() { + "Wendigo Magic" => { + next.control_l.position = Vec3::new(-9.0, 19.0, -13.0); + next.control_r.position = Vec3::new(9.0, 19.0, -13.0); - next.control_l.orientation = - Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(-0.15); - next.control_r.orientation = - Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(0.15); - }, - Some(ToolKind::Unique(UniqueKind::TidalClaws)) => { - next.control_l.position = Vec3::new(-14.0, 12.0, -12.0); - next.control_r.position = Vec3::new(14.0, 12.0, -12.0); + next.control_l.orientation = Quaternion::rotation_x(PI / 3.0) + * Quaternion::rotation_y(-0.15); + next.control_r.orientation = + Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(0.15); + }, + "Tidal Claws" => { + next.control_l.position = Vec3::new(-14.0, 12.0, -12.0); + next.control_r.position = Vec3::new(14.0, 12.0, -12.0); - next.control_l.orientation = - Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(-0.15); - next.control_r.orientation = - Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(0.15); - }, - Some(ToolKind::Unique(UniqueKind::BeastClaws)) => { - next.shoulder_l.position = - Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); + next.control_l.orientation = Quaternion::rotation_x(PI / 3.0) + * Quaternion::rotation_y(-0.15); + next.control_r.orientation = + Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(0.15); + }, + "Beast Claws" => { + next.shoulder_l.position = + Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); - next.shoulder_r.position = - Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); + next.shoulder_r.position = + Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); - next.hand_l.position = - Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); + next.hand_l.position = + Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); - next.hand_r.position = - Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); + next.hand_r.position = + Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); - if speed < 0.5 { - next.head.position = - Vec3::new(0.0, s_a.head.0, s_a.head.1 + torso * 0.2) * 1.02; - next.head.orientation = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + if speed < 0.5 { + next.head.position = + Vec3::new(0.0, s_a.head.0, s_a.head.1 + torso * 0.2) * 1.02; + next.head.orientation = + Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); - next.upper_torso.position = - Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1 + torso * 0.5); + next.upper_torso.position = Vec3::new( + 0.0, + s_a.upper_torso.0, + s_a.upper_torso.1 + torso * 0.5, + ); - next.lower_torso.position = - Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1 + torso * 0.15); + next.lower_torso.position = Vec3::new( + 0.0, + s_a.lower_torso.0, + s_a.lower_torso.1 + torso * 0.15, + ); - next.jaw.orientation = Quaternion::rotation_x(-0.1); + next.jaw.orientation = Quaternion::rotation_x(-0.1); - next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1); - next.tail.orientation = Quaternion::rotation_z(slow * 0.2); + next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1); + next.tail.orientation = Quaternion::rotation_z(slow * 0.2); - next.second.orientation = Quaternion::rotation_x(PI); + next.second.orientation = Quaternion::rotation_x(PI); - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_y(0.0); + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_y(0.0); - next.shoulder_l.position = - Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); + next.shoulder_l.position = + Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); - next.hand_l.position = - Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); + next.hand_l.position = Vec3::new( + -s_a.hand.0, + s_a.hand.1, + s_a.hand.2 + torso * 0.6, + ); - next.hand_r.position = - Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); + next.hand_r.position = + Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); - next.leg_l.position = - Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2); - next.leg_l.orientation = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.leg_l.position = + Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2); + next.leg_l.orientation = + Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); - next.leg_r.position = - Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2); - next.leg_r.orientation = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); - } else { - next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1) * 1.02; - next.head.orientation = - Quaternion::rotation_z(short * -0.18) * Quaternion::rotation_x(-0.05); - next.head.scale = Vec3::one() * 1.02; + next.leg_r.position = + Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2); + next.leg_r.orientation = + Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + } else { + next.head.position = + Vec3::new(0.0, s_a.head.0, s_a.head.1) * 1.02; + next.head.orientation = Quaternion::rotation_z(short * -0.18) + * Quaternion::rotation_x(-0.05); + next.head.scale = Vec3::one() * 1.02; - next.upper_torso.position = - Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1 + shortalt * -1.5); - next.upper_torso.orientation = Quaternion::rotation_z(short * 0.18); + next.upper_torso.position = Vec3::new( + 0.0, + s_a.upper_torso.0, + s_a.upper_torso.1 + shortalt * -1.5, + ); + next.upper_torso.orientation = + Quaternion::rotation_z(short * 0.18); - next.lower_torso.position = - Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1); - next.lower_torso.orientation = - Quaternion::rotation_z(short * 0.15) * Quaternion::rotation_x(0.14); - next.lower_torso.scale = Vec3::one() * 1.02; + next.lower_torso.position = + Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1); + next.lower_torso.orientation = + Quaternion::rotation_z(short * 0.15) + * Quaternion::rotation_x(0.14); + next.lower_torso.scale = Vec3::one() * 1.02; - next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1); - next.jaw.orientation = Quaternion::rotation_x(0.0); - next.jaw.scale = Vec3::one() * 1.02; + next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1); + next.jaw.orientation = Quaternion::rotation_x(0.0); + next.jaw.scale = Vec3::one() * 1.02; - next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1); - next.tail.orientation = Quaternion::rotation_x(shortalt * 0.3); + next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1); + next.tail.orientation = Quaternion::rotation_x(shortalt * 0.3); - next.second.position = Vec3::new(0.0, 0.0, 0.0); - next.second.orientation = Quaternion::rotation_x(PI) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.second.scale = Vec3::one() * 0.0; + next.second.position = Vec3::new(0.0, 0.0, 0.0); + next.second.orientation = Quaternion::rotation_x(PI) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.second.scale = Vec3::one() * 0.0; - next.control.position = Vec3::new(0.0, 0.0, 0.0); - next.control.orientation = Quaternion::rotation_z(0.0); + next.control.position = Vec3::new(0.0, 0.0, 0.0); + next.control.orientation = Quaternion::rotation_z(0.0); - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_y(0.0); + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_y(0.0); - next.shoulder_l.position = Vec3::new( - -s_a.shoulder.0, - s_a.shoulder.1 + foothoril * -3.0, - s_a.shoulder.2, - ); - next.shoulder_l.orientation = Quaternion::rotation_x(footrotl * -0.36) - * Quaternion::rotation_y(0.1) - * Quaternion::rotation_z(footrotl * 0.3); + next.shoulder_l.position = Vec3::new( + -s_a.shoulder.0, + s_a.shoulder.1 + foothoril * -3.0, + s_a.shoulder.2, + ); + next.shoulder_l.orientation = + Quaternion::rotation_x(footrotl * -0.36) + * Quaternion::rotation_y(0.1) + * Quaternion::rotation_z(footrotl * 0.3); - next.shoulder_r.position = Vec3::new( - s_a.shoulder.0, - s_a.shoulder.1 + foothorir * -3.0, - s_a.shoulder.2, - ); - next.shoulder_r.orientation = Quaternion::rotation_x(footrotr * -0.36) - * Quaternion::rotation_y(-0.1) - * Quaternion::rotation_z(footrotr * -0.3); + next.shoulder_r.position = Vec3::new( + s_a.shoulder.0, + s_a.shoulder.1 + foothorir * -3.0, + s_a.shoulder.2, + ); + next.shoulder_r.orientation = + Quaternion::rotation_x(footrotr * -0.36) + * Quaternion::rotation_y(-0.1) + * Quaternion::rotation_z(footrotr * -0.3); - next.hand_l.position = Vec3::new( - -1.0 + -s_a.hand.0, - s_a.hand.1 + foothoril * -4.0, - s_a.hand.2 + foothoril * 1.0, - ); - next.hand_l.orientation = - Quaternion::rotation_x(0.15 + (handhoril * -1.2).max(-0.3)) - * Quaternion::rotation_y(handhoril * -0.1); + next.hand_l.position = Vec3::new( + -1.0 + -s_a.hand.0, + s_a.hand.1 + foothoril * -4.0, + s_a.hand.2 + foothoril * 1.0, + ); + next.hand_l.orientation = + Quaternion::rotation_x(0.15 + (handhoril * -1.2).max(-0.3)) + * Quaternion::rotation_y(handhoril * -0.1); - next.hand_r.position = Vec3::new( - 1.0 + s_a.hand.0, - s_a.hand.1 + foothorir * -4.0, - s_a.hand.2 + foothorir * 1.0, - ); - next.hand_r.orientation = - Quaternion::rotation_x(0.15 + (handhorir * -1.2).max(-0.3)) - * Quaternion::rotation_y(handhorir * 0.1); - next.hand_r.scale = Vec3::one() * 1.04; + next.hand_r.position = Vec3::new( + 1.0 + s_a.hand.0, + s_a.hand.1 + foothorir * -4.0, + s_a.hand.2 + foothorir * 1.0, + ); + next.hand_r.orientation = + Quaternion::rotation_x(0.15 + (handhorir * -1.2).max(-0.3)) + * Quaternion::rotation_y(handhorir * 0.1); + next.hand_r.scale = Vec3::one() * 1.04; - next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2) * 0.98; - next.leg_l.orientation = Quaternion::rotation_z(short * 0.18) - * Quaternion::rotation_x(foothoril * 0.3); - next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2) * 0.98; + next.leg_l.position = + Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2) * 0.98; + next.leg_l.orientation = Quaternion::rotation_z(short * 0.18) + * Quaternion::rotation_x(foothoril * 0.3); + next.leg_r.position = + Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2) * 0.98; - next.leg_r.orientation = Quaternion::rotation_z(short * 0.18) - * Quaternion::rotation_x(foothorir * 0.3); + next.leg_r.orientation = Quaternion::rotation_z(short * 0.18) + * Quaternion::rotation_x(foothorir * 0.3); - next.foot_l.position = Vec3::new( - -s_a.foot.0, - s_a.foot.1 + foothoril * 8.5, - s_a.foot.2 + ((footvertl * 6.5).max(0.0)), - ); - next.foot_l.orientation = Quaternion::rotation_x(-0.5 + footrotl * 0.85); + next.foot_l.position = Vec3::new( + -s_a.foot.0, + s_a.foot.1 + foothoril * 8.5, + s_a.foot.2 + ((footvertl * 6.5).max(0.0)), + ); + next.foot_l.orientation = + Quaternion::rotation_x(-0.5 + footrotl * 0.85); - next.foot_r.position = Vec3::new( - s_a.foot.0, - s_a.foot.1 + foothorir * 8.5, - s_a.foot.2 + ((footvertr * 6.5).max(0.0)), - ); - next.foot_r.orientation = Quaternion::rotation_x(-0.5 + footrotr * 0.85); + next.foot_r.position = Vec3::new( + s_a.foot.0, + s_a.foot.1 + foothorir * 8.5, + s_a.foot.2 + ((footvertr * 6.5).max(0.0)), + ); + next.foot_r.orientation = + Quaternion::rotation_x(-0.5 + footrotr * 0.85); - next.torso.orientation = Quaternion::rotation_x(-0.25); + next.torso.orientation = Quaternion::rotation_x(-0.25); + } + }, + _ => {}, + } } }, _ => {}, } - }; + } if s_a.float { next.upper_torso.position = Vec3::new( diff --git a/voxygen/anim/src/biped_large/summon.rs b/voxygen/anim/src/biped_large/summon.rs index c792d44266..087800441e 100644 --- a/voxygen/anim/src/biped_large/summon.rs +++ b/voxygen/anim/src/biped_large/summon.rs @@ -82,7 +82,7 @@ impl Animation for SummonAnimation { next.hand_r.orientation = Quaternion::rotation_x(0.0); match active_tool_kind { - Some(ToolKind::StaffSimple) | Some(ToolKind::Staff) => { + Some(ToolKind::Staff) => { next.head.orientation = Quaternion::rotation_x(0.0); next.control_l.position = Vec3::new(-1.0, 3.0, 12.0); next.control_r.position = Vec3::new( diff --git a/voxygen/anim/src/biped_large/wield.rs b/voxygen/anim/src/biped_large/wield.rs index 859440ed7a..de542bb968 100644 --- a/voxygen/anim/src/biped_large/wield.rs +++ b/voxygen/anim/src/biped_large/wield.rs @@ -2,13 +2,19 @@ use super::{ super::{vek::*, Animation}, BipedLargeSkeleton, SkeletonAttr, }; -use common::comp::item::{ToolKind, UniqueKind}; +use common::comp::item::tool::{AbilitySpec, ToolKind}; use std::{f32::consts::PI, ops::Mul}; pub struct WieldAnimation; impl Animation for WieldAnimation { - type Dependency = (Option, Option, Vec3, f32, f32); + type Dependency = ( + (Option, Option), + (Option, Option), + Vec3, + f32, + f32, + ); type Skeleton = BipedLargeSkeleton; #[cfg(feature = "use-dyn-lib")] @@ -17,7 +23,7 @@ impl Animation for WieldAnimation { #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_wield")] fn update_skeleton_inner( skeleton: &Self::Skeleton, - (active_tool_kind, _second_tool_kind, velocity, global_time, acc_vel): Self::Dependency, + ((active_tool_kind, active_tool_spec), _second_tool, velocity, global_time, acc_vel): Self::Dependency, anim_time: f32, _rate: &mut f32, s_a: &SkeletonAttr, @@ -151,8 +157,9 @@ impl Animation for WieldAnimation { next.shoulder_r.orientation = Quaternion::rotation_y(0.0) * Quaternion::rotation_x(0.3); } + match active_tool_kind { - Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_l.position = Vec3::new(-1.0, 1.0, 1.0); next.control_r.position = Vec3::new(0.0, 2.0, -3.0); @@ -171,7 +178,7 @@ impl Animation for WieldAnimation { next.control.orientation = Quaternion::rotation_x(-0.2 + short * 0.2) * Quaternion::rotation_y(-0.1); }, - Some(ToolKind::BowSimple) | Some(ToolKind::Bow) => { + Some(ToolKind::Bow) => { next.control_l.position = Vec3::new(-1.0, -2.0, -3.0); next.control_r.position = Vec3::new(0.0, 4.0, 1.0); @@ -191,7 +198,7 @@ impl Animation for WieldAnimation { * Quaternion::rotation_y(1.0) * Quaternion::rotation_z(-0.3); }, - Some(ToolKind::HammerSimple) | Some(ToolKind::AxeSimple) => { + Some(ToolKind::Hammer) | Some(ToolKind::Axe) => { next.control_l.position = Vec3::new(-1.0, 2.0, 12.0); next.control_r.position = Vec3::new(1.0, 2.0, -2.0); @@ -210,7 +217,7 @@ impl Animation for WieldAnimation { next.control.orientation = Quaternion::rotation_x(-1.0 + short * 0.2) * Quaternion::rotation_y(-1.8); }, - Some(ToolKind::StaffSimple) | Some(ToolKind::Staff) => { + Some(ToolKind::Staff) => { next.control_l.position = Vec3::new(-1.0, 3.0, 12.0); next.control_r.position = Vec3::new(1.0, 2.0, 2.0); @@ -229,177 +236,206 @@ impl Animation for WieldAnimation { next.control.orientation = Quaternion::rotation_x(-0.2 + short * 0.2) * Quaternion::rotation_y(-0.1); }, - Some(ToolKind::Unique(UniqueKind::WendigoMagic)) => { - next.control_l.position = Vec3::new(-9.0, 19.0, -13.0); - next.control_r.position = Vec3::new(9.0, 19.0, -13.0); + Some(ToolKind::Natural) => { + if let Some(AbilitySpec::Custom(spec)) = active_tool_spec { + match spec.as_str() { + "Wendigo Magic" => { + next.control_l.position = Vec3::new(-9.0, 19.0, -13.0); + next.control_r.position = Vec3::new(9.0, 19.0, -13.0); - next.control_l.orientation = - Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(-0.15); - next.control_r.orientation = - Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(0.15); - }, - Some(ToolKind::Unique(UniqueKind::TidalClaws)) => { - next.control_l.position = Vec3::new(-14.0, 12.0, -12.0); - next.control_r.position = Vec3::new(14.0, 12.0, -12.0); + next.control_l.orientation = Quaternion::rotation_x(PI / 3.0) + * Quaternion::rotation_y(-0.15); + next.control_r.orientation = + Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(0.15); + }, + "Tidal Claws" => { + next.control_l.position = Vec3::new(-14.0, 12.0, -12.0); + next.control_r.position = Vec3::new(14.0, 12.0, -12.0); - next.control_l.orientation = - Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(-0.15); - next.control_r.orientation = - Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(0.15); - }, - Some(ToolKind::Unique(UniqueKind::BeastClaws)) => { - next.shoulder_l.position = - Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); + next.control_l.orientation = Quaternion::rotation_x(PI / 3.0) + * Quaternion::rotation_y(-0.15); + next.control_r.orientation = + Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_y(0.15); + }, + "Beast Claws" => { + next.shoulder_l.position = + Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); - next.shoulder_r.position = - Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); + next.shoulder_r.position = + Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); - next.hand_l.position = - Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); + next.hand_l.position = + Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); - next.hand_r.position = - Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); + next.hand_r.position = + Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); - if speed < 0.5 { - next.head.position = - Vec3::new(0.0, s_a.head.0, s_a.head.1 + torso * 0.2) * 1.02; - next.head.orientation = Quaternion::rotation_z(look.x * 0.6) - * Quaternion::rotation_x(look.y * 0.6); + if speed < 0.5 { + next.head.position = + Vec3::new(0.0, s_a.head.0, s_a.head.1 + torso * 0.2) * 1.02; + next.head.orientation = Quaternion::rotation_z(look.x * 0.6) + * Quaternion::rotation_x(look.y * 0.6); - next.upper_torso.position = - Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1 + torso * 0.5); + next.upper_torso.position = Vec3::new( + 0.0, + s_a.upper_torso.0, + s_a.upper_torso.1 + torso * 0.5, + ); - next.lower_torso.position = - Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1 + torso * 0.15); + next.lower_torso.position = Vec3::new( + 0.0, + s_a.lower_torso.0, + s_a.lower_torso.1 + torso * 0.15, + ); - next.jaw.orientation = Quaternion::rotation_x(-0.1); + next.jaw.orientation = Quaternion::rotation_x(-0.1); - next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1); - next.tail.orientation = Quaternion::rotation_z(slow * 0.2 + tailmove.x); + next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1); + next.tail.orientation = + Quaternion::rotation_z(slow * 0.2 + tailmove.x); - next.second.orientation = Quaternion::rotation_x(PI); + next.second.orientation = Quaternion::rotation_x(PI); - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_y(0.0); + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_y(0.0); - next.shoulder_l.position = - Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); + next.shoulder_l.position = + Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2); - next.hand_l.position = - Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); + next.hand_l.position = Vec3::new( + -s_a.hand.0, + s_a.hand.1, + s_a.hand.2 + torso * 0.6, + ); - next.hand_r.position = - Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); + next.hand_r.position = + Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6); - next.leg_l.position = - Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2); - next.leg_l.orientation = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + next.leg_l.position = + Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2); + next.leg_l.orientation = + Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); - next.leg_r.position = - Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2); - next.leg_r.orientation = - Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); - } else { - next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1) * 1.02; - next.head.orientation = - Quaternion::rotation_z(short * -0.18) * Quaternion::rotation_x(-0.05); - next.head.scale = Vec3::one() * 1.02; + next.leg_r.position = + Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2); + next.leg_r.orientation = + Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0); + } else { + next.head.position = + Vec3::new(0.0, s_a.head.0, s_a.head.1) * 1.02; + next.head.orientation = Quaternion::rotation_z(short * -0.18) + * Quaternion::rotation_x(-0.05); + next.head.scale = Vec3::one() * 1.02; - next.upper_torso.position = - Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1 + shortalt * -1.5); - next.upper_torso.orientation = Quaternion::rotation_z(short * 0.18); + next.upper_torso.position = Vec3::new( + 0.0, + s_a.upper_torso.0, + s_a.upper_torso.1 + shortalt * -1.5, + ); + next.upper_torso.orientation = + Quaternion::rotation_z(short * 0.18); - next.lower_torso.position = - Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1); - next.lower_torso.orientation = - Quaternion::rotation_z(short * 0.15) * Quaternion::rotation_x(0.14); - next.lower_torso.scale = Vec3::one() * 1.02; + next.lower_torso.position = + Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1); + next.lower_torso.orientation = + Quaternion::rotation_z(short * 0.15) + * Quaternion::rotation_x(0.14); + next.lower_torso.scale = Vec3::one() * 1.02; - next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1); - next.jaw.orientation = Quaternion::rotation_x(0.0); - next.jaw.scale = Vec3::one() * 1.02; + next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1); + next.jaw.orientation = Quaternion::rotation_x(0.0); + next.jaw.scale = Vec3::one() * 1.02; - next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1); - next.tail.orientation = Quaternion::rotation_x(shortalt * 0.3); + next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1); + next.tail.orientation = Quaternion::rotation_x(shortalt * 0.3); - next.second.position = Vec3::new(0.0, 0.0, 0.0); - next.second.orientation = Quaternion::rotation_x(PI) - * Quaternion::rotation_y(0.0) - * Quaternion::rotation_z(0.0); - next.second.scale = Vec3::one() * 0.0; + next.second.position = Vec3::new(0.0, 0.0, 0.0); + next.second.orientation = Quaternion::rotation_x(PI) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.second.scale = Vec3::one() * 0.0; - next.control.position = Vec3::new(0.0, 0.0, 0.0); - next.control.orientation = Quaternion::rotation_z(0.0); + next.control.position = Vec3::new(0.0, 0.0, 0.0); + next.control.orientation = Quaternion::rotation_z(0.0); - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_y(0.0); + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_y(0.0); - next.shoulder_l.position = Vec3::new( - -s_a.shoulder.0, - s_a.shoulder.1 + foothoril * -3.0, - s_a.shoulder.2, - ); - next.shoulder_l.orientation = Quaternion::rotation_x(footrotl * -0.36) - * Quaternion::rotation_y(0.1) - * Quaternion::rotation_z(footrotl * 0.3); + next.shoulder_l.position = Vec3::new( + -s_a.shoulder.0, + s_a.shoulder.1 + foothoril * -3.0, + s_a.shoulder.2, + ); + next.shoulder_l.orientation = + Quaternion::rotation_x(footrotl * -0.36) + * Quaternion::rotation_y(0.1) + * Quaternion::rotation_z(footrotl * 0.3); - next.shoulder_r.position = Vec3::new( - s_a.shoulder.0, - s_a.shoulder.1 + foothorir * -3.0, - s_a.shoulder.2, - ); - next.shoulder_r.orientation = Quaternion::rotation_x(footrotr * -0.36) - * Quaternion::rotation_y(-0.1) - * Quaternion::rotation_z(footrotr * -0.3); + next.shoulder_r.position = Vec3::new( + s_a.shoulder.0, + s_a.shoulder.1 + foothorir * -3.0, + s_a.shoulder.2, + ); + next.shoulder_r.orientation = + Quaternion::rotation_x(footrotr * -0.36) + * Quaternion::rotation_y(-0.1) + * Quaternion::rotation_z(footrotr * -0.3); - next.hand_l.position = Vec3::new( - -1.0 + -s_a.hand.0, - s_a.hand.1 + foothoril * -4.0, - s_a.hand.2 + foothoril * 1.0, - ); - next.hand_l.orientation = - Quaternion::rotation_x(0.15 + (handhoril * -1.2).max(-0.3)) - * Quaternion::rotation_y(handhoril * -0.1); + next.hand_l.position = Vec3::new( + -1.0 + -s_a.hand.0, + s_a.hand.1 + foothoril * -4.0, + s_a.hand.2 + foothoril * 1.0, + ); + next.hand_l.orientation = + Quaternion::rotation_x(0.15 + (handhoril * -1.2).max(-0.3)) + * Quaternion::rotation_y(handhoril * -0.1); - next.hand_r.position = Vec3::new( - 1.0 + s_a.hand.0, - s_a.hand.1 + foothorir * -4.0, - s_a.hand.2 + foothorir * 1.0, - ); - next.hand_r.orientation = - Quaternion::rotation_x(0.15 + (handhorir * -1.2).max(-0.3)) - * Quaternion::rotation_y(handhorir * 0.1); - next.hand_r.scale = Vec3::one() * 1.04; + next.hand_r.position = Vec3::new( + 1.0 + s_a.hand.0, + s_a.hand.1 + foothorir * -4.0, + s_a.hand.2 + foothorir * 1.0, + ); + next.hand_r.orientation = + Quaternion::rotation_x(0.15 + (handhorir * -1.2).max(-0.3)) + * Quaternion::rotation_y(handhorir * 0.1); + next.hand_r.scale = Vec3::one() * 1.04; - next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2) * 0.98; - next.leg_l.orientation = Quaternion::rotation_z(short * 0.18) - * Quaternion::rotation_x(foothoril * 0.3); - next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2) * 0.98; + next.leg_l.position = + Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2) * 0.98; + next.leg_l.orientation = Quaternion::rotation_z(short * 0.18) + * Quaternion::rotation_x(foothoril * 0.3); + next.leg_r.position = + Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2) * 0.98; - next.leg_r.orientation = Quaternion::rotation_z(short * 0.18) - * Quaternion::rotation_x(foothorir * 0.3); + next.leg_r.orientation = Quaternion::rotation_z(short * 0.18) + * Quaternion::rotation_x(foothorir * 0.3); - next.foot_l.position = Vec3::new( - -s_a.foot.0, - s_a.foot.1 + foothoril * 8.5, - s_a.foot.2 + ((footvertl * 6.5).max(0.0)), - ); - next.foot_l.orientation = Quaternion::rotation_x(-0.5 + footrotl * 0.85); + next.foot_l.position = Vec3::new( + -s_a.foot.0, + s_a.foot.1 + foothoril * 8.5, + s_a.foot.2 + ((footvertl * 6.5).max(0.0)), + ); + next.foot_l.orientation = + Quaternion::rotation_x(-0.5 + footrotl * 0.85); - next.foot_r.position = Vec3::new( - s_a.foot.0, - s_a.foot.1 + foothorir * 8.5, - s_a.foot.2 + ((footvertr * 6.5).max(0.0)), - ); - next.foot_r.orientation = Quaternion::rotation_x(-0.5 + footrotr * 0.85); + next.foot_r.position = Vec3::new( + s_a.foot.0, + s_a.foot.1 + foothorir * 8.5, + s_a.foot.2 + ((footvertr * 6.5).max(0.0)), + ); + next.foot_r.orientation = + Quaternion::rotation_x(-0.5 + footrotr * 0.85); - next.torso.orientation = Quaternion::rotation_x(-0.25); + next.torso.orientation = Quaternion::rotation_x(-0.25); + } + }, + _ => {}, + } } }, _ => {}, } - }; + } if s_a.float { next.upper_torso.position = Vec3::new( diff --git a/voxygen/anim/src/biped_small/alpha.rs b/voxygen/anim/src/biped_small/alpha.rs index 0ceb8cd59e..05167722cd 100644 --- a/voxygen/anim/src/biped_small/alpha.rs +++ b/voxygen/anim/src/biped_small/alpha.rs @@ -2,10 +2,7 @@ use super::{ super::{vek::*, Animation}, BipedSmallSkeleton, SkeletonAttr, }; -use common::{ - comp::item::{ToolKind, UniqueKind}, - states::utils::StageSection, -}; +use common::{comp::item::ToolKind, states::utils::StageSection}; use std::f32::consts::PI; pub struct AlphaAnimation; @@ -119,7 +116,7 @@ impl Animation for AlphaAnimation { next.tail.orientation = Quaternion::rotation_x(0.05 * fastalt * speednormcancel) * Quaternion::rotation_z(fast * 0.15 * speednormcancel); }, - Some(ToolKind::Unique(UniqueKind::Husk)) => { + Some(ToolKind::Natural) => { next.hand_l.position = Vec3::new( -s_a.hand.0, s_a.hand.1 + move1abs * 3.0 + move2abs * 3.0, diff --git a/voxygen/anim/src/biped_small/shoot.rs b/voxygen/anim/src/biped_small/shoot.rs index 361f35dddd..9bc703c8cb 100644 --- a/voxygen/anim/src/biped_small/shoot.rs +++ b/voxygen/anim/src/biped_small/shoot.rs @@ -111,7 +111,7 @@ impl Animation for ShootAnimation { next.control.orientation = Quaternion::rotation_x(-0.3 + move1abs * 0.4) * Quaternion::rotation_y(0.5 * speednorm); }, - Some(ToolKind::Staff) | Some(ToolKind::StaffSimple) => { + Some(ToolKind::Staff) => { let (move1base, _move2base, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0), diff --git a/voxygen/anim/src/biped_small/stunned.rs b/voxygen/anim/src/biped_small/stunned.rs index 384b0d6e8b..c48b385a09 100644 --- a/voxygen/anim/src/biped_small/stunned.rs +++ b/voxygen/anim/src/biped_small/stunned.rs @@ -2,10 +2,7 @@ use super::{ super::{vek::*, Animation}, BipedSmallSkeleton, SkeletonAttr, }; -use common::{ - comp::item::{ToolKind, UniqueKind}, - states::utils::StageSection, -}; +use common::{comp::item::ToolKind, states::utils::StageSection}; use std::f32::consts::PI; pub struct StunnedAnimation; @@ -111,7 +108,7 @@ impl Animation for StunnedAnimation { next.control.orientation = Quaternion::rotation_x(-1.35 + 0.5 * speednorm); }, - Some(ToolKind::Bow) | Some(ToolKind::BowSimple) => { + Some(ToolKind::Bow) => { next.control_l.position = Vec3::new(1.0 - s_a.grip.0 * 2.0, 0.0, 0.0); next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 6.0, -2.0); @@ -130,7 +127,7 @@ impl Animation for StunnedAnimation { next.control.orientation = Quaternion::rotation_x(-0.3 + 0.5 * speednorm) * Quaternion::rotation_y(0.5 * speednorm); }, - Some(ToolKind::Staff) | Some(ToolKind::StaffSimple) => { + Some(ToolKind::Staff) => { next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0); next.control_r.position = Vec3::new(7.0 + s_a.grip.0 * 2.0, -4.0, 3.0 + speednorm * -3.0); @@ -153,7 +150,7 @@ impl Animation for StunnedAnimation { * Quaternion::rotation_y(-0.2 * speednorm) * Quaternion::rotation_z(0.5); }, - Some(ToolKind::Unique(UniqueKind::Husk)) => { + Some(ToolKind::Natural) => { next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2); next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2); diff --git a/voxygen/anim/src/biped_small/wield.rs b/voxygen/anim/src/biped_small/wield.rs index f673ff3bb0..2914e160de 100644 --- a/voxygen/anim/src/biped_small/wield.rs +++ b/voxygen/anim/src/biped_small/wield.rs @@ -2,7 +2,7 @@ use super::{ super::{vek::*, Animation}, BipedSmallSkeleton, SkeletonAttr, }; -use common::comp::item::{ToolKind, UniqueKind}; +use common::comp::item::ToolKind; use std::f32::consts::PI; pub struct WieldAnimation; @@ -97,7 +97,7 @@ impl Animation for WieldAnimation { next.control.orientation = Quaternion::rotation_x(-1.35 + 0.5 * speednorm); }, - Some(ToolKind::Bow) | Some(ToolKind::BowSimple) => { + Some(ToolKind::Bow) => { next.control_l.position = Vec3::new(1.0 - s_a.grip.0 * 2.0, 0.0, 0.0); next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 6.0, -2.0); @@ -120,7 +120,7 @@ impl Animation for WieldAnimation { next.control.orientation = Quaternion::rotation_x(-0.3 + 0.5 * speednorm) * Quaternion::rotation_y(0.5 * speednorm); }, - Some(ToolKind::Staff) | Some(ToolKind::StaffSimple) => { + Some(ToolKind::Staff) => { next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0); next.control_r.position = Vec3::new(7.0 + s_a.grip.0 * 2.0, -4.0, 3.0 + speednorm * -3.0); @@ -147,7 +147,7 @@ impl Animation for WieldAnimation { * Quaternion::rotation_y(-0.2 * speednorm) * Quaternion::rotation_z(0.5); }, - Some(ToolKind::Unique(UniqueKind::Husk)) => { + Some(ToolKind::Natural) => { next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2); next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2); diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index 2ab3349da2..b9a3cb25b0 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -49,7 +49,7 @@ impl Animation for AlphaAnimation { next.torso.orientation = Quaternion::rotation_z(0.0); match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); @@ -77,7 +77,7 @@ impl Animation for AlphaAnimation { Quaternion::rotation_z(0.0 + move1 * -1.5 + move2 * 2.5 + move3 * -1.0); }, - Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) | Some(ToolKind::Pick) => { + Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time.powf(0.25), 0.0), @@ -109,7 +109,7 @@ impl Animation for AlphaAnimation { (Some(Hands::Two), _) | (None, Some(Hands::Two)) => match ability_info .and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4); @@ -154,7 +154,7 @@ impl Animation for AlphaAnimation { s_a.ac.5 + move1 * -2.0 + move2 * -1.0 + move3 * 2.5, ) }, - Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) | Some(ToolKind::Pick) => { + Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Swing) => (1.0, anim_time, 0.0), @@ -191,7 +191,7 @@ impl Animation for AlphaAnimation { match hands { (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_l.position = Vec3::new(-7.0, 8.0, 2.0); next.control_l.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) * Quaternion::rotation_y(move1 * -1.2 + move2 * -1.5) @@ -211,7 +211,7 @@ impl Animation for AlphaAnimation { next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); next.hand_l.orientation = Quaternion::rotation_x(1.57) }, - Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) | Some(ToolKind::Pick) => { + Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { next.control_l.position = Vec3::new( -7.0, 8.0 + move1 * -4.0 + move2 * 4.0, @@ -232,7 +232,7 @@ impl Animation for AlphaAnimation { match hands { (None | Some(Hands::One), Some(Hands::One)) => { match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_r.position = Vec3::new(7.0 + move2 * 8.0, 8.0, 2.0); next.control_r.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) * Quaternion::rotation_y(move1 * -1.8 + move2 * -1.5) @@ -252,9 +252,7 @@ impl Animation for AlphaAnimation { next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); next.hand_r.orientation = Quaternion::rotation_x(1.57) }, - Some(ToolKind::Hammer) - | Some(ToolKind::HammerSimple) - | Some(ToolKind::Pick) => { + Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { next.control_r.position = Vec3::new( 7.0, 8.0 + move1 * -4.0 + move2h * 4.0, diff --git a/voxygen/anim/src/character/beta.rs b/voxygen/anim/src/character/beta.rs index c252cb2601..933878d288 100644 --- a/voxygen/anim/src/character/beta.rs +++ b/voxygen/anim/src/character/beta.rs @@ -55,7 +55,7 @@ impl Animation for BetaAnimation { (Some(Hands::Two), _) | (None, Some(Hands::Two)) => match ability_info .and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4); @@ -81,7 +81,7 @@ impl Animation for BetaAnimation { match hands { (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_l.position = Vec3::new(-12.0, 8.0, 2.0); next.control_l.orientation = Quaternion::rotation_x(1.7) * Quaternion::rotation_y(-3.7 + move1 * -0.75 + move2 * 1.0) @@ -97,7 +97,7 @@ impl Animation for BetaAnimation { match hands { (None | Some(Hands::One), Some(Hands::One)) => { match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_r.position = Vec3::new(0.0 + move1 * -8.0, 13.0, 2.0); next.control_r.orientation = Quaternion::rotation_x(1.7) * Quaternion::rotation_y(-2.3 + move1 * -2.3 + move2 * 1.0) diff --git a/voxygen/anim/src/character/block.rs b/voxygen/anim/src/character/block.rs index 8b582c6da9..cd2aa87336 100644 --- a/voxygen/anim/src/character/block.rs +++ b/voxygen/anim/src/character/block.rs @@ -76,7 +76,7 @@ impl Animation for BlockAnimation { match (hands, active_tool_kind, second_tool_kind) { ((Some(Hands::Two), _), tool, _) | ((None, Some(Hands::Two)), _, tool) => match tool { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4); @@ -116,7 +116,7 @@ impl Animation for BlockAnimation { * Quaternion::rotation_y(s_a.ac.4 + move1 * -1.8) * Quaternion::rotation_z(s_a.ac.5 + move1 * 4.0); }, - Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) | Some(ToolKind::Pick) => { + Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1 + move1 * 6.0, s_a.hhl.2 + move1 * 6.0); next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3 + move1 * -0.5) diff --git a/voxygen/anim/src/character/chargeswing.rs b/voxygen/anim/src/character/chargeswing.rs index 4be709117e..305d964555 100644 --- a/voxygen/anim/src/character/chargeswing.rs +++ b/voxygen/anim/src/character/chargeswing.rs @@ -84,7 +84,7 @@ impl Animation for ChargeswingAnimation { (Some(Hands::Two), _) | (None, Some(Hands::Two)) => match ability_info .and_then(|a| a.tool) { - Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) => { + Some(ToolKind::Hammer) => { next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + (move2 * -8.0)); next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3) @@ -114,7 +114,7 @@ impl Animation for ChargeswingAnimation { match hands { (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) => { + Some(ToolKind::Hammer) => { next.control_l.position = Vec3::new( -7.0 + move1 * 4.0, 8.0 + move1 * 2.0 + move2 * 4.0, @@ -135,7 +135,7 @@ impl Animation for ChargeswingAnimation { match hands { (None | Some(Hands::One), Some(Hands::One)) => { match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) => { + Some(ToolKind::Hammer) => { next.control_r.position = Vec3::new( 7.0 + move1 * 1.0 + move2 * -20.0, 8.0 + move1 * 1.0 + move2 * 4.0, diff --git a/voxygen/anim/src/character/dash.rs b/voxygen/anim/src/character/dash.rs index 9df25d4a36..9f986f978d 100644 --- a/voxygen/anim/src/character/dash.rs +++ b/voxygen/anim/src/character/dash.rs @@ -93,7 +93,7 @@ impl Animation for DashAnimation { match hands { (Some(Hands::Two), _) | (None, Some(Hands::Two)) => { match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4); @@ -118,7 +118,7 @@ impl Animation for DashAnimation { match hands { (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_l.position = Vec3::new(-7.0, 8.0 + move3 * 5.0, 2.0 + move1 * 4.0); next.control_l.orientation = Quaternion::rotation_x(-0.3 + move2 * 1.0 + move3 * 1.0) @@ -135,7 +135,7 @@ impl Animation for DashAnimation { match hands { (None | Some(Hands::One), Some(Hands::One)) => { match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_r.position = Vec3::new( 7.0 + move1 * 5.0 + move3 * -30.0, 8.0 + move3 * -5.0, diff --git a/voxygen/anim/src/character/leapmelee.rs b/voxygen/anim/src/character/leapmelee.rs index 116851439c..66d8ffd8b0 100644 --- a/voxygen/anim/src/character/leapmelee.rs +++ b/voxygen/anim/src/character/leapmelee.rs @@ -172,7 +172,7 @@ impl Animation for LeapAnimation { next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); next.hand_l.orientation = Quaternion::rotation_x(1.57) }, - Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) | Some(ToolKind::Pick) => { + Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { next.control_l.position = Vec3::new( -7.0, 8.0 + move2 * -5.0 + move3 * 9.0, @@ -202,9 +202,7 @@ impl Animation for LeapAnimation { next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); next.hand_r.orientation = Quaternion::rotation_x(1.57) }, - Some(ToolKind::Hammer) - | Some(ToolKind::HammerSimple) - | Some(ToolKind::Pick) => { + Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { next.control_r.position = Vec3::new( 7.0 + move2 * 3.0 + move3 * -3.0, 8.0 + move2 * -9.0 + move3 * 15.0, diff --git a/voxygen/anim/src/character/spin.rs b/voxygen/anim/src/character/spin.rs index 782ec441c0..1db1dc2113 100644 --- a/voxygen/anim/src/character/spin.rs +++ b/voxygen/anim/src/character/spin.rs @@ -125,7 +125,7 @@ impl Animation for SpinAnimation { match hands { (Some(Hands::Two), _) | (None, Some(Hands::Two)) => { match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); @@ -177,7 +177,7 @@ impl Animation for SpinAnimation { match hands { (Some(Hands::One), _) => match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_l.position = Vec3::new(-7.0 + movement2base * -5.0, 8.0, 2.0); next.control_l.orientation = Quaternion::rotation_x(1.7) * Quaternion::rotation_y(-2.7 + movement1base * -1.0 + movement2base * 2.0) @@ -205,7 +205,7 @@ impl Animation for SpinAnimation { match hands { (None | Some(Hands::One), Some(Hands::One)) => { match ability_info.and_then(|a| a.tool) { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.control_r.position = Vec3::new(15.0 + move2 * -15.0, 8.0 + move2 * 5.0, 2.0); next.control_r.orientation = Quaternion::rotation_x(1.7) diff --git a/voxygen/anim/src/character/staggered.rs b/voxygen/anim/src/character/staggered.rs index c738a88fc9..c59a5b7a7b 100644 --- a/voxygen/anim/src/character/staggered.rs +++ b/voxygen/anim/src/character/staggered.rs @@ -79,7 +79,7 @@ impl Animation for StaggeredAnimation { match (hands, active_tool_kind, second_tool_kind) { ((Some(Hands::Two), _), tool, _) | ((None, Some(Hands::Two)), _, tool) => { match tool { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4); diff --git a/voxygen/anim/src/character/stunned.rs b/voxygen/anim/src/character/stunned.rs index fa12b7a934..01aeff63f1 100644 --- a/voxygen/anim/src/character/stunned.rs +++ b/voxygen/anim/src/character/stunned.rs @@ -75,7 +75,7 @@ impl Animation for StunnedAnimation { next.second.orientation = Quaternion::rotation_z(0.0); match hands { (Some(Hands::Two), _) | (None, Some(Hands::Two)) => match active_tool_kind { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4); diff --git a/voxygen/anim/src/character/wield.rs b/voxygen/anim/src/character/wield.rs index cc4751481b..8ac758c417 100644 --- a/voxygen/anim/src/character/wield.rs +++ b/voxygen/anim/src/character/wield.rs @@ -153,7 +153,7 @@ impl Animation for WieldAnimation { } match (hands, active_tool_kind, second_tool_kind) { ((Some(Hands::Two), _), tool, _) | ((None, Some(Hands::Two)), _, tool) => match tool { - Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + Some(ToolKind::Sword) => { next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4); @@ -200,7 +200,7 @@ impl Animation for WieldAnimation { * Quaternion::rotation_y(s_a.ac.4) * Quaternion::rotation_z(s_a.ac.5); }, - Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) | Some(ToolKind::Pick) => { + Some(ToolKind::Hammer) | Some(ToolKind::Pick) => { next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2); next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3) * Quaternion::rotation_y(s_a.hhl.4) diff --git a/voxygen/src/hud/util.rs b/voxygen/src/hud/util.rs index 8b6dcf69fc..c61eee530f 100644 --- a/voxygen/src/hud/util.rs +++ b/voxygen/src/hud/util.rs @@ -184,12 +184,7 @@ fn tool_kind<'a>(tool: &Tool, i18n: &'a Localization) -> &'a str { ToolKind::Sceptre => i18n.get("common.weapons.sceptre"), ToolKind::Shield => i18n.get("common.weapons.shield"), ToolKind::Spear => i18n.get("common.weapons.spear"), - ToolKind::HammerSimple => i18n.get("common.weapons.hammer_simple"), - ToolKind::SwordSimple => i18n.get("common.weapons.sword_simple"), - ToolKind::StaffSimple => i18n.get("common.weapons.staff_simple"), - ToolKind::AxeSimple => i18n.get("common.weapons.axe_simple"), - ToolKind::BowSimple => i18n.get("common.weapons.bow_simple"), - ToolKind::Unique(_) => i18n.get("common.weapons.unique_simple"), + ToolKind::Natural => i18n.get("common.weapons.natural"), ToolKind::Debug => i18n.get("common.tool.debug"), ToolKind::Farming => i18n.get("common.tool.farming"), ToolKind::Pick => i18n.get("common.tool.pick"), diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 32c91928df..f36314894d 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -726,26 +726,23 @@ impl FigureMgr { let mut state_animation_rate = 1.0; - let active_item_kind = inventory - .and_then(|i| i.equipped(EquipSlot::Mainhand)) - .map(|i| i.kind()); - let (active_tool_kind, active_tool_hand) = - if let Some(ItemKind::Tool(tool)) = active_item_kind { - (Some(tool.kind), Some(tool.hands)) - } else { - (None, None) - }; + let tool_info = |equip_slot| { + inventory + .and_then(|i| i.equipped(equip_slot)) + .map(|i| { + if let ItemKind::Tool(tool) = i.kind() { + (Some(tool.kind), Some(tool.hands), i.ability_set().cloned()) + } else { + (None, None, None) + } + }) + .unwrap_or((None, None, None)) + }; - let second_item_kind = inventory - .and_then(|i| i.equipped(EquipSlot::Offhand)) - .map(|i| i.kind()); - - let (second_tool_kind, second_tool_hand) = - if let Some(ItemKind::Tool(tool)) = second_item_kind { - (Some(tool.kind), Some(tool.hands)) - } else { - (None, None) - }; + let (active_tool_kind, active_tool_hand, active_tool_spec) = + tool_info(EquipSlot::Mainhand); + let (second_tool_kind, second_tool_hand, second_tool_spec) = + tool_info(EquipSlot::Offhand); let hands = (active_tool_hand, second_tool_hand); @@ -3705,8 +3702,8 @@ impl FigureMgr { anim::biped_large::WieldAnimation::update_skeleton( &target_base, ( - active_tool_kind, - second_tool_kind, + (active_tool_kind, active_tool_spec), + (second_tool_kind, second_tool_spec), rel_vel, time, state.acc_vel, @@ -3720,8 +3717,8 @@ impl FigureMgr { anim::biped_large::AlphaAnimation::update_skeleton( &target_base, ( - active_tool_kind, - second_tool_kind, + (active_tool_kind, active_tool_spec), + (second_tool_kind, second_tool_spec), rel_vel, time, None, @@ -3749,8 +3746,8 @@ impl FigureMgr { anim::biped_large::ShootAnimation::update_skeleton( &target_base, ( - active_tool_kind, - second_tool_kind, + (active_tool_kind, active_tool_spec), + (second_tool_kind, second_tool_spec), rel_vel, // TODO: Update to use the quaternion. ori * anim::vek::Vec3::::unit_y(), @@ -3784,7 +3781,7 @@ impl FigureMgr { anim::biped_large::StunnedAnimation::update_skeleton( &target_base, ( - active_tool_kind, + (active_tool_kind, active_tool_spec), rel_vel, state.acc_vel, Some(s.stage_section), @@ -3843,8 +3840,8 @@ impl FigureMgr { anim::biped_large::ShootAnimation::update_skeleton( &target_base, ( - active_tool_kind, - second_tool_kind, + (active_tool_kind, active_tool_spec), + (second_tool_kind, second_tool_spec), rel_vel, // TODO: Update to use the quaternion. ori * anim::vek::Vec3::::unit_y(), @@ -3918,8 +3915,8 @@ impl FigureMgr { 1 => anim::biped_large::AlphaAnimation::update_skeleton( &target_base, ( - active_tool_kind, - second_tool_kind, + (active_tool_kind, active_tool_spec), + (second_tool_kind, second_tool_spec), rel_vel, time, Some(s.stage_section), @@ -3932,8 +3929,8 @@ impl FigureMgr { 2 => anim::biped_large::BetaAnimation::update_skeleton( &target_base, ( - active_tool_kind, - second_tool_kind, + (active_tool_kind, active_tool_spec), + (second_tool_kind, second_tool_spec), rel_vel, time, Some(s.stage_section), @@ -3946,8 +3943,8 @@ impl FigureMgr { _ => anim::biped_large::BetaAnimation::update_skeleton( &target_base, ( - active_tool_kind, - second_tool_kind, + (active_tool_kind, active_tool_spec), + (second_tool_kind, second_tool_spec), rel_vel, time, Some(s.stage_section),