You may think you've removed all the other party definitions, but I can almost guarantee that you haven't. If you had, then that hook would be called.THOM wrote:I've erased all additions I made to the party-object - no result.
Are you importing assets/scripts/objects/generic.lua after defining the party? Because it will overwrite the party definition. Importing GrimTK? Overwrites the PartyComponent, so it will remove all your hooks. Using Skuggasveinn's winter tileset without fixing it first? It overwrites the entire party definition (for no reason!) too.
Have you done a grep for "party" in your entire dungeon folder, or shadowed defineObject() to print a special message when it encounters a definition named "party"? If not, then you shouldn't assume that you aren't redefining the party object somewhere else.
Just FYI, the hook function posted doesn't really accomplish the intended result - it gets the damage totally wrong, gets the damage type wrong if the champion is wearing an item with the "fire_gauntlets" trait, attacks HealthComponents that the party shouldn't be able to attack because they're blocked by a door, doesn't check the elevation of the HealthComponent so it can do a bunch of damage to monsters if the party's elevation doesn't match the HealthComponent's, and PartyComponent.onAttack doesn't get called for unarmed attacks at all so it won't detect those. It also probably "hits" the wrong square sometimes even when the elevations match.
There are many other possible problems with this approach as well; you should really temporarily remove the physical immunity instead of trying to use damageTile.