Ok, have done some programming years ago, but my memory is not agreeing with HL editor. So here is what I am trying to do, create a template for an Undead Lord from Tome of Horrors. I have got most of it, but am having a brain fart on how to get these 2 working;
1-Hit Dice: An undead lord’s HD is equal to 5 or the base creature’s
HD (including class levels), whichever is greater.
2-Defensive Abilities: Undead lords retain all the defensive abilities
of the base creature, and gain the following:
Damage Reduction (Ex): Undead lords with 5 to 7 HD gain DR 5/
magic; undead lords with 8 or more HD gain damage reduction 10/
magic. If the base creature already has damage reduction /magic,
use it or the one above, whichever is better. If the base creature has
another type of damage reduction (bludgeoning, piercing, and so
on) its type modifiers stack. For example, a base creature with 5
HD and damage reduction 5/piercing that becomes an undead lord now has damage reduction 5/magic and piercing.
In 1, can't quite get minimum HD figured out, how to make sure it is 5. And in 2, not sure how to check and make sure the proper bonuses are applied for multiple reduction types. If you need/want a copy of what I have done, let me know, I can either post it here (if allowed), or email it to you (or message).
1-Hit Dice: An undead lord’s HD is equal to 5 or the base creature’s
HD (including class levels), whichever is greater.
2-Defensive Abilities: Undead lords retain all the defensive abilities
of the base creature, and gain the following:
Damage Reduction (Ex): Undead lords with 5 to 7 HD gain DR 5/
magic; undead lords with 8 or more HD gain damage reduction 10/
magic. If the base creature already has damage reduction /magic,
use it or the one above, whichever is better. If the base creature has
another type of damage reduction (bludgeoning, piercing, and so
on) its type modifiers stack. For example, a base creature with 5
HD and damage reduction 5/piercing that becomes an undead lord now has damage reduction 5/magic and piercing.
In 1, can't quite get minimum HD figured out, how to make sure it is 5. And in 2, not sure how to check and make sure the proper bonuses are applied for multiple reduction types. If you need/want a copy of what I have done, let me know, I can either post it here (if allowed), or email it to you (or message).