Nicolas Weeger wrote: > I checked on cf.mf.net why my dragon didn't have any special > cold/fire/poison attack with clawing. > > Apparently, something is broken in attack type & such. > I have 'clawing' skill, type 43 subtype 31. > Then i have archetypes 'fire_clawing', 'poison_clawing', and so on. > > In player.c, dragon_ability_gain() checks treasure list's items for type > '43' (skill). Except archetypes fire_clawing/... have the type 74 > (skilltool). > So my player has (global) attack type 1 (physical) only, and all > archetypes for fire/electric/... attacks.... Looking at the code, it appears the code should be changed. That is because other code looks for objects of type skill, with skill name 'clawing' when we need to insert that skill object into the players inventory to hold experience. That is to say, if you change the archetype, then first time someone goes to use clawing, it may add the 'fire_clawing' archetype as the holder of skill exp. I'm not 100% satisfied that the method I coded, but this gets messy with the clawing code - I think right now that is the only skill where there are different skill type objects that give the exp into one skill. For example, there is only one 'two_handed_weapon' skill, and it basically gives the exp to itself. In any case, I'll update the code to check for the appropriate type. > > Now I don't know if the archetypes are not updated, or it the code > checks the wrong thing. > Also, should the attacktype be set for the player itself, or on a skill > base? (ie set in the 'clawing' skill item, or on the player's attacktype?). the clawing skill. If it gets set in the player attacktype, that gets reset the next time fix_player() is called (that goes and examines everything the player has equipped, and sets attacktype appropriate). In the case of using skills, when you go and use a combat skill (like clawing), it is marked as applied, so the fix_player sees that, and then sets the player attacktype appropriate. (interestingly enough, you could do something like have 'fire kung fu', which attacks with fire, simply by making the attacktype in that skill new skill fire). Now the one thing I do see that seems odd is that the attacktype of the new clawing ability is or'd with the existing attacktype. That would seem to mean that a dragon character could attack with fire, ice, poisoning, and electricity all with the claw attack. That seems wrong to me, so I'll fix that up. > > Side note: i have in inventory multiple 'one handed weapons' (even > though i'm a dragon) It's odd you have more than one. I could see that you would have exactly 1 (there isn't anything preventing you from learning the skill, even though you'd never be able to use it). But in that case, you should only have one. _______________________________________________ crossfire-devel mailing list crossfire-devel at lists.real-time.com https://mailman.real-time.com/mailman/listinfo/crossfire-devel