Welcome to the Builder Academy

Question Age question - Down side to using a spell

More
14 May 2017 17:09 #6731 by JTP
I do think that tbamud has something with age. I think regeneration is slower when getting old.

I have looked and looked and tried what i could come to think off. Without luck.

If anyone find something usefull in the code, pls post here.

Please Log in or Create an account to join the conversation.

More
14 May 2017 17:51 #6732 by JTP
Or other ideas to give a downside to using haste, is also welcome.

Please Log in or Create an account to join the conversation.

More
14 May 2017 20:22 #6734 by thomas

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.

Please Log in or Create an account to join the conversation.

More
14 May 2017 20:33 #6735 by JTP
if (!IS_NPC(victim))
victim->player.time.birth -= 1;


Age didnt change when casting haste on a player :/

Please Log in or Create an account to join the conversation.

More
15 May 2017 23:47 #6736 by Parnassus
Try making an object with an age apply and see if you get older when you use it and younger when you remove it.

Please Log in or Create an account to join the conversation.

More
16 May 2017 00:40 #6738 by WhiskyTest
What if haste made the user blind too haha
Or unable to talk because they speak way too fast

Please Log in or Create an account to join the conversation.

Time to create page: 0.206 seconds