JTP wrote: So
ch->player.time.birth -= 1;
Why -= ?
It needs to make the receiver of the spell 1 year older, each time haste is cast on them. Not the caster, or else the caster wont help anyone i think haha.
Makes good sinde that the receiver gets older from fighting more
Did you try
Code:
if (!IS_NPC(victim))
victim->player.time.birth -= 1;
Also - what currently happens with age is that the hitpoint, movement and mana gains are adjusted according to the current age. Quotes from limits.c:
Code:
/* When age < 15 return the value p0
When age is 15..29 calculate the line between p1 & p2
When age is 30..44 calculate the line between p2 & p3
When age is 45..59 calculate the line between p3 & p4
When age is 60..79 calculate the line between p4 & p5
When age >= 80 return the value p6 */
// mana:
gain = graf(age(ch)->year, 4, 8, 12, 16, 12, 10, 8);
// hit:
gain = graf(age(ch)->year, 8, 12, 20, 32, 16, 10, 4);
// move
gain = graf(age(ch)->year, 16, 20, 24, 20, 16, 12, 10);
So, in the age interval 45..59 you are most "vital" and will recover your points more quickly.
When you get above 80, expect to spend a lot of time sleeping to recover your points.
In some muds I have played, there have been higher consequences for high age:
- you hit slower with your weapons; instead of 1 attack/round (per attack you have), you may only get 85% change of a strike if you are too old.
- you may miscast magic (instead of the spell you were trying, you fire another spell. This can give hilarious results)
- you suffer from nearsightedness (so you miss more often, or hit the wrong people)
- you become worse at skills you don't use regularly.
- you use more movement points to get around (you are exhausted faster)
One mud I played had a pretty draconian rule - if you got over 90 years old, you perma-died. And the solutions to get 5 years younger were much more elaborate than the haste spell (think mud-day long rituals with lots of ingredients vs a simple cast). The haste spell didn't add full years in that game, though, so for most it wasn't a problem. But then I found a weapon with aff_haste. I aged at twice the rate when using it. I hit twice as often, though, so it was worth it.
To make something similar in tbamud, I would exploit that all age-calculations are done in the utils.c function age() and add a running tally of "mud days under influence of the haste spell" and "rejuvenations" and then add/subtract in the age function.