Exemple #1
0
        public static bool CheckSaveVsPoisonDeath(this SavingThrowData savingThrow, int level, CharacterInstance victim)
        {
            var save = 50 + (victim.Level - level - savingThrow.SaveVsPoisonDeath) * 5;

            save = save.GetNumberThatIsBetween(5, 95);
            return(victim.Chance(save));
        }
 public SavingThrowData(SavingThrowData savingThrows)
 {
     SaveVsBreath           = savingThrows.SaveVsBreath;
     SaveVsParalysisPetrify = savingThrows.SaveVsParalysisPetrify;
     SaveVsPoisonDeath      = savingThrows.SaveVsPoisonDeath;
     SaveVsSpellStaff       = savingThrows.SaveVsSpellStaff;
     SaveVsWandRod          = savingThrows.SaveVsWandRod;
 }
Exemple #3
0
 public CharacterInstance(long id, string name)
     : base(id, name)
 {
     SavingThrows = new SavingThrowData();
     LuaVM        = new LuaInterfaceProxy();
     Timers       = new List <TimerData>();
     Act          = new ExtendedBitvector();
     AffectedBy   = new ExtendedBitvector();
 }
 public void SetSaves(int saveVsDeath, int saveVsWand, int saveVsParalysis, int saveVsBreath, int saveVsSpell)
 {
     SavingThrows = new SavingThrowData
     {
         SaveVsPoisonDeath      = saveVsDeath,
         SaveVsWandRod          = saveVsWand,
         SaveVsParalysisPetrify = saveVsParalysis,
         SaveVsBreath           = saveVsBreath,
         SaveVsSpellStaff       = saveVsSpell
     };
 }
Exemple #5
0
        public static bool CheckSaveVsWandRod(this SavingThrowData savingThrow, int level, CharacterInstance victim)
        {
            if (victim.Immunity.IsSet(ResistanceTypes.Magic))
            {
                return(true);
            }

            var save = 50 + (victim.Level - level - savingThrow.SaveVsWandRod) * 5;

            save = save.GetNumberThatIsBetween(5, 95);
            return(victim.Chance(save));
        }
        public MobileTemplate(long id, string name)
            : base(id, name)
        {
            SavingThrows = new SavingThrowData();
            HitDice      = new DiceData();
            DamageDice   = new DiceData();
            Statistics   = new Dictionary <StatisticTypes, object>();

            ShortDescription  = $"A newly created {name}";
            LongDescription   = $"Somebody abandoned a newly created {name} here.";
            Level             = 1;
            Position          = "standing";
            DefensivePosition = "standing";
            Class             = "warrior";
            Race = "human";
            Statistics[StatisticTypes.Gender] = "male";
        }