Пример #1
0
 public AbilityCalcContainer()
 {
     this.BlockCalc    = new BlockCalculator();
     this.CritCalc     = new CritCalculator();
     this.DmgCalc      = new DamageCalculator();
     this.DodgeCalc    = new DodgeCalculator();
     this.HeadShotCalc = new HeadShotCalculator();
     this.ParryCalc    = new ParryCalculator();
     this.ResistCalc   = new ResistCalculator();
 }
Пример #2
0
        public void CalcValue_50ConDebuff_Minus6()
        {
            var npc = NewNPC();

            npc.DebuffCategory[eProperty.Constitution] = 50;

            int actual = ResistCalculator.CalcValue(npc, SomeResistProperty);

            Assert.AreEqual(-6, actual);
        }
Пример #3
0
        public void CalcValue_50ConBuff_6()
        {
            var npc = NewNPC();

            npc.BaseBuffBonusCategory[eProperty.Constitution] = 50;

            int actual = ResistCalculator.CalcValue(npc, SomeResistProperty);

            Assert.AreEqual(6, actual);
        }
Пример #4
0
        public override void ProcessEnterZone(TileMoveData moveData)
        {
            base.ProcessEnterZone(moveData);
            var resist = new ResistCalculator();

            if (!resist.DidResist(moveData.Target, this._data.Effect, this._data.ResistBase))
            {
                var slime = this.GetSlimeEffect();
                this._data.Effect.ApplyEffectFx(moveData.Target.Tile);
                moveData.Target.Proxy.AddEffect(slime);
            }
        }
Пример #5
0
 public override void TryProcessHit(MHit hit, bool prediction)
 {
     base.TryProcessHit(hit, prediction);
     if (base.CheckConditions(hit))
     {
         var calc    = new ResistCalculator();
         var tgt     = hit.Data.Target.Current as CChar;
         var offense = hit.Data.Source.Proxy.GetStat(this.Data.OffensiveResist);
         if (!prediction && !calc.DidResist(tgt, this.Data.Resist, offense))
         {
             FHit.SetPushTrue(hit.Data.Flags);
             tgt.Proxy.AddEffect(this);
         }
     }
 }
Пример #6
0
 public override void TryProcessHit(MHit hit, bool prediction)
 {
     base.TryProcessHit(hit, prediction);
     if (base.CheckConditions(hit))
     {
         var calc    = new ResistCalculator();
         var tgt     = hit.Data.Target.Current as CChar;
         var offense = hit.Data.Source.Proxy.GetStat(this.Data.OffensiveResist);
         if (!prediction && !calc.DidResist(tgt, this.Data.Resist, offense))
         {
             FCharacterStatus.SetStunnedTrue(tgt.Proxy.GetStatusFlags());
             FHit.SetStunTrue(hit.Data.Flags);
             hit.AddEffect(this);
             tgt.Proxy.AddEffect(this);
         }
         else if (!prediction)
         {
             VCombatController.Instance.DisplayText("Resist", tgt, CombatGUIParams.WHITE);
         }
     }
 }