コード例 #1
0
        public static short GetHitPointsPNP(NWN2CreatureTemplate creature)
        {
            int maxHP = CalcMaxHitpointsFromHitDice(creature) / 2;

            int newHP = (int)((float)maxHP / (float)creature.GetStatsCore().GetLevel() / 2);
            newHP += creature.GetStatsCore().CalcHitPointModsFromFeats(1);
            newHP += CalcHitPointModsFromStats(creature);
            return (short)newHP;
        }
コード例 #2
0
 public static short GetHitPointsMax(NWN2CreatureTemplate creature)
 {
     int newHP = CalcMaxHitpointsFromHitDice(creature);
     newHP += creature.GetStatsCore().CalcHitPointModsFromFeats(1);
     newHP += CalcHitPointModsFromStats(creature);
     return (short)newHP;
 }
コード例 #3
0
 public static bool GetIsConstruct(NWN2CreatureTemplate creature)
 {
     if (creature.Variables.GetVariable("ACR_CRE_ISCONSTRUCT").ValueInt == 1) return true;
     if (creature.Variables.GetVariable("ACR_CRE_ISCONSTRUCT").ValueInt == 2) return false;
     if (creature.Race.Row == 10) return true;
     if (creature.GetStatsCore().GetHasClass(13) == 1) return true;
     return false;
 }
コード例 #4
0
 public static bool GetIsUndead(NWN2CreatureTemplate creature)
 {
     if (creature.Variables.GetVariable("ACR_CRE_ISUNDEAD").ValueInt == 1) return true;
     if (creature.Variables.GetVariable("ACR_CRE_ISUNDEAD").ValueInt == 2) return false;
     if (creature.Race.Row == 24) return true;
     if (creature.GetStatsCore().GetHasClass(19) == 1) return true;
     return false;
 }
コード例 #5
0
 public static int CalcHitPointModsFromStats(NWN2CreatureTemplate creature)
 {
     if (GetIsUndead(creature)) return 0;
     if (GetIsConstruct(creature)) return 0;
     return creature.GetStatsCore().CalcHitPointModsFromStats();
 }
コード例 #6
0
 public static int CalcMaxHitpointsFromHitDice(NWN2CreatureTemplate creature)
 {
     if (GetIsUndead(creature)) return creature.GetStatsCore().GetLevel() * 12;
     return creature.GetStatsCore().CalcMaxHitpointsFromHitDice();
 }