Ambrosia Garden Archive
    • Fiendish Magery


      draining the life force of a mortal

      Hi everyone.

      I am making a lich for my game, and wanted him to have his very own spell: draining. If the player does not resist his attack (vitality), he will drain 20-40% of the player's hit points and add them to his own. Now I wonder, is this even possible to do? And if so, how would I do it?

      Thank you,
      Ledorax

    • I haven't attempted this so I'm reluctant to say that I know you can or you can't. There's "duration" of a spell that drains an NPC's stamina over a period of time, I think. But that's not "hit" points. Do you mean minimum damage and maximum damage? While you would be able to read min/max damage by placing specific globals for each NPC, I don't think that you can change the min/max damage capability of an NPC.

    • Hit Points (HP) means how much damage a character can take before dying. So, yes, it is the same thing as stamina.

    • The problem, as I see it, is not so much draining the player's stamina. This could be done as part of contact event. But I don't know any way of altering (increasing) an NPC's stats other than having him kill himself and replace himself with a look-alike with higher stats. However, you want to increase with a percentage of the player's max_stamina (and a variable percentage at that) which makes the situation exceedingly more complex.

      Since the player never really gets to see the NPC's stats, why not put a vial of max_stamina increaser in the NPC's inventory? The NPC does not "use" his inventory up the way a player does, so you have to consider the possibility of his max_stamina continuing to grow.

    • I don't think you understand what I want. What a drain spell would do is that it would "steal" HP (stamina) from the player and add them to the Lich's HP. So, this is what would happen: the lich casts a spell, the player takes (for example) 43 damage, and the lich heals 43 damage...

    • Okay, so it's stamina instead of max_stamina. I don't see how you can "heal" the NPC when the points are deducted from the player.

    • Well, all right. I suppose I'll just have to use fixed values...

      Thanks anyway.

    • None of this means that you can't try and see if it'll work. Many times I've stared at my computer having no clue whatsoever how to achieve a complex event. I just start out and try things. And now I'm much better at doing something! Just yesterday I made a series of events to make a complex patterned event array without testing each one. Then when I tested it, to my surprise, I did it all correctly!! There's all sorts of avenues you can take to try to see if this will work for you. I'm not inclined to figure it out as I have enough challenges of my own, but why not you try? Does it take time and effort? Sure. But so what? Go for it, my friend. If it doesn't work, I'll bet you anything that you'll see something better that does! At least, that's my experience.

    • I think you could do this (sort of) by putting sevral items in the lich's inventory that would do 3 things:

      1 Only be able to use item if gb_Lich is = to 1.

      2 Make gb_Lich = 0

      3 Heal Lich in the same amount of damage as the spell would to the player (it can't be exact)

      Then you have the lich spell set gb_Lich to 1, then he uses a item and heals himself (I think..)

    • Yoggy, on Apr 21 2005, 04:17 PM, said:

      I think you could do this (sort of) by putting sevral items in the lich's inventory that would do 3 things:

      1 Only be able to use item if gb_Lich is = to 1.

      2 Make gb_Lich = 0

      3 Heal Lich in the same amount of damage as the spell would to the player (it can't be exact)

      Then you have the lich spell set gb_Lich to 1, then he uses a item and heals himself (I think..)
      View Post

      I am not quite sure I understand that, but I suppose I could make a healing spell which damages the player. Hey, if I make several the lich would randomly choose from them, no? But then he wouldn't cast anything else... <_<