Thanks for the interest
There has been progress, I've just been caught up on an aggravating bug causing the game to crash when you quit from inside the tower.... I think I know where the bug is, I just need to figure out how the heck to clean it up...
It's a problem with the bitmasks I think, which definitely complicates things further, since that's not even my code, but something about the way they're deconstructed is causing problems I think...
[EDIT]: Okay, really, really, really big debate tomorrow as part of my govt. class... not in that it's long, but in that I couldn't get a hold of the other speaker or the research team until yesterday, and a large part of my grade rides on my part in the debate
Not worried about it, but I won't have much free time tonight or tomorrow, if any... Friday I'll be busy in the morning picking up a check, and that night at a dance, and Saturday I'll be gone for a few hours in the morning, hopefully to return with a new computer.... Life is crazy at the end of a school year
[EDIT2]: Fixed the problem... it was related to the bit-masks, but it wasn't an issue with their code. I was creating the bit-masks with the create_bitmask() function they provided, but I was deleting them with the delete keyword. Normally this would be that big of an issue, but the create_bitmask() function used malloc, so I was getting weird pointer and heap errors. Fixed now though, back to finishing up magic
[EDIT3]: Magic is all but finished. It's jokingly unbalanced at the moment (as in, a random spell might add 300+ to a base stat
), but once I get some multipliers in to convert the numbers into something a little more fair I should be just about ready or cleanup and a release.
Basically, magic works as follows. Energy is no longer a character statistic, it is a part of the map/surroundings. Each tile can hold energy (anything between 0 and 255), and the player draws energy from nearby tiles. The radius energy is drawn from increases with the intelligence stat, so characters with a higher intelligence will be able to draw more energy, and thus cast more powerful spells. What this means though, is that every time a spell is cast in an area, the amount of energy in that area decreases, making future spells weaker.
As you've probably figured out by now, spells don't require a preset amount of energy, but rather take all the energy they can get, and then have a magnitude decided by that amount of energy. For example, if the player is in an area with a large amount of energy, and casts a spell that heals him, it will heal him far more than if he cast the same spell in an area with less energy (or in the same place again, since it drains the energy from the surroundings).
I've also taken a bit of a sudden design turn with the magic. Rather than having preset spells in RAWs, I've opted to make it at least a little less predictable. I wanted magic to be something less normal and simplistic, and to be more seemingly random to the less experienced mage, but something seriously dangerous once understood. Basically, when you cast a spell, you put in a 4-letter sequence, and it creates a spell from the sequence. It's not entirely random, in that if you use the same sequence multiple times, you'll get the same effect. But it will vary between games, and so can't be memorized, preventing novice spell-caster characters from using powerful spells just because the player memorized a pattern from a previous game.
The spells are generate from 4 sub-strings of 2-characters each. I.E. The sequence "abcd" would be split into "ab", "bc" and "cd". Each effect type (health+, strength-, etc) is associated with a 2 character sequence (chosen at random at the beginning of a new game). So if "ab" wasn't associated with anything, but "bc" and "cd" were stre+ and dext- respectively, the spell would increase the strength of the target, and decrease the dexterity. If none of the sub-sequences are associated with an effect, the spell fizzles. The amount of energy drawn to cast the spell is divided between the effects, which means that a spell with one health- and two fizzles, would cause the same damage as one with three health- effects.
Still working out how to manage the "magic" screen though. I'm thinking what'll likely happen, is I'll have it display the "known" effects, which would be determined by a similar "spell knowledge" system as the previous game, so that effects that are cast enough will be recorded, so you know which sub-sequence is tied to which effect. Characters with a low intelligence might never memorize them, while a character with max intelligence might know all of them, even without using them.
Oh, and I almost forgot. Energy isn't displayed as a straight up integer value any more. It's a percentage now (because in a large room, with high energy, and a high intelligence, it might not fit into the small space I allotted to it...) The accuracy of the percentage is determined by your intelligence. A character with low intelligence see's the percentage rounded to the nearest 10 (unless it's less than 10%), while a character with very high intelligence can see a decimal point on top of the normal percentage.
[EDIT4]: Okay, have the multipliers in, and they're loaded from the setting file like the other settings. Seems to be fairly balanced. A character with 4 intelligence is nearly useless, while one with high intelligence is far more potent (haven't tested it with maximum intelligence, but it ought to be fun
) Just need to get the magic screen written up, and I can clean up and release