Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Experience



> From: Colin writes:
> 
> I have inadvertantly discovered a very real problem with 
> invoking spells.
> 
> As a matter of habit from the days when I used to cheat
> I got used to invoking all my spells. Now with the new skills
> I can raise my level in any skill I wish merely by
> using invoke while my skill field is set to whatever
> skill I wish to improve in.
> 
	Indeed. I just checked this out. I will send a patch
	to Mark as soon as I can find a good solution for it.
	The one I am thinking of now will work; but will treat
	the invoke command a "special case" in the code. Kinda
	yucky solution if you ask me.

> 
> Can this be easily fixed or is it as I think something
> inherent in the game setting the skill flag when you invoke
> a spell doesn't stop you from barging off and fighting
> something thereby changing your skill flag.
> 
	The fix is fairly easy (if you dont care about its 'beauty').
	The problem comes because when you gain experience the 
	code is set up to add exp to the experience category of the 
	current skill in use. In the case where we might gain xp
	from an object controlled by the player (like killing stuff 
	with spells eg. 'golem' or 'fireball') the controlled object
	gets a pointer set to the appropriate experience category
	(based on the current skill in use). Objects created by the spell
	object (such as the exploding fragments of a bomb) inherit the 
	pointer. Thus, if you cast a spell, then decide to pick a lock 
	while the spell is still killing stuff, the gained xp still 
	goes to the right place.

	The problem with invoking spells is that the correct skill
	is never readied by the code; at first look this is a result
	of the NO_AUTO_SKILL_SWITCH, but I am not sure yet. Again,
	I will post a patch to Mark when I have it figured out.
 
					-b.t.