I'm trying to figure out if it's possible to make a double attack with a weapon or crossbow, but despite looking through some spell effects that do similar things I haven't made any progress. Clockwork Threshing from the Clockwork Knight skill tree is basically what I want, EXCEPT that it should only ever proc once per attack and Clockwork Threshing can trigger itself multiple times (Because it's "targetHitEffectBuff"). Furthermore, I can't actually find the piece of code in the spellDB.xml that triggers the additional attacks. It just somehow works on its own, because copy and pasting the spell into a mod file and renaming them (just to see if it will still work) suddenly makes it not function anymore. I fear it might be hardcoded and trying to use Clockwork Threshing as a base is a dead end. I have an idea on an alternate route to take, but I would really appreciate some insight into the Clockwork Threshing mystery. Also, I still have no clue on how to trigger a second crossbow shot.
I'm assuming Clockwork Threshing has the attack="1" tag, or something like that, I don't remember the exact syntax. It causes you to include a melee attack in the spell. I'd suggest a spell that triggers a blank subspell with attack="1" twice. I don't believe there's a shoot="1" tag, mostly because a melee attack will always do the same thing but a ranged attack is dependent on the ammunition.
Code: <spell name="Threshed" type="template" anchored="1" templateID="30"> <anim sprite="sprites/sfx/impact_slash/impact_slash" frames="6" framerate="60" centerEffect="0" sfx="chain" /> </spell> <spell name="Clockwork Threshing" type="self"> <effect type="trigger" spell="Threshed"/> <anim sprite="sprites/sfx/impact_slash/impact_slash" frames="6" framerate="60" centerEffect="0" sfx="chain" /> </spell> This is Clockwork Threshing, as I found it in my game files. There is no attack="1", which just mystifys me on how it actually functions. I'm also trying to figure out Clockwork Reflexes which basically has the same code (different templateID, and anchored is inverted, but that is literally the only difference) I took the skill approach (based on Puissant Touch from the Warlock tree) and it worked wonderfully, but I would rather try to make it happen after a normal attack if possible. I'm just not sure how to avoid recursion. Perhaps if it applied a dummy buff at the same time as the second attack, and the skill had requirebuffonnottrigger="(dummy buff)"?
Have a look at Essence's Drunken Boxing coding. The capstone skill is the drunken uber combo, which allows you to hit the enemy 3 times while the buff is active. I do not believe that it works for crossbows.
You should I think be able to do something like cast spell A, this triggers spell B twice which has attack="1" on it, I'm pretty sure. See eg Two Attacks, One Dagger Code: <spell name="Two Attacks One Dagger!" type="target" attack="1" > <effect type="damage" piercing="1" piercingF="0.15" secondaryScale="12" /> <!-- scale by sneak --> <!-- sneak in an extra attack --> </spell> Which has a 30% chance of triggering on hit. If you just took out the bonus damage, and called the spell twice, I think it would work.
Using multibuff="x" in a buff will allow you to attack x number of times in the turn. Example: Code: <spell name="Haste" type="self" > <buff useTimer="1" time="15" allowstacking="0" icon="skills/warrior/axemanship2_64.png" smallicon="skills/warrior/axemanship2_32.png"> <halo name="sprites/sfx/bladewallblock/bladewallblock" first="0" num="4" frameRate="100" centerEffect="0"/> <multibuff amount="2"/> </buff> <effect type="heal" amount="20" /> <description text="You're moving at a blur! Hack and slash!" /> </spell>
@tentacled-godqueen I've played around with that already, and it seems to function in an unintuitive way... If a spell has the attack="1", then it will perform a regular attack, which is partially what I want, but it will also trigger any targetHitEffectBuff on melee attacks too. So if I use targetHitEffectBuff to proc the second attack, then the second attack will trigger a third attack, and so on. Oddly enough, adding an effect with type="damage" will remove the regular attack altogether and replace it with the effect. @Iccorp2 I didn't know multibuff was a thing that existed. I would have preferred to do it as part of a regular attack without a buff (or a cast spell to apply the buff) but I guess it's not a huge deal if it was implemented as a type of stance. Now, if only I could figure out if it is possible to do it with crossbows instead of melee attacks :S
Confirmed from the devs: there is not, and will never be, a double-throw or double-crossbow mechanic. Your best bet is to add a proc that adds damage, but it can't really be based directly on your weapon damage.