I know what it does, but I don't understand how it actually works in terms to game mechanics and DB.xml files; the way the ability is defined in spellDB it doesn't look like it should actually do anything: <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>
It makes you attack every target around you (4 tiles that directly touch the one you are standing on).
I get that, but what in the code actually makes you do that. A template is defined, but it doesn't seem to be set to do anything on the relevant squares except play an animation. Where in the spell definition does it call for those attacks: Again, here is how it is defined in spellDB: <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>
By laying an additional template on your attack pattern. Sort of like Thibault's Trompement, only without the need to activate it and without any changes in damage.
That's what I was wondering about too, but it's not unheard of for some things to be hard-coded (like the 'attack="1"' thing not being required in some circumstances) in some cases. And here what is happening is that the spell is applying a temporary template on top of your attack pattern, so it's not that you get another attack but rather that the attack you are doing gets expanded in its coverage.
That's what I was thinking, but I thought that clockwork threshing was based on somebody's mod (or am I completely wrong about that?), in which case it wouldn't have been hardcoded originally and so the code would have been added needlessly
Ah, it's a proc. It may be that on-attack procs that trigger templates automatically expand the attack pattern.
It could've been a feature coded in before that. After all, activated abilities that apply templates to your attacks (like Thibault's Trompement) do need some sort of base, so it's not impossible for them to had thought ahead and put something like that into the game.