Esempio n. 1
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);
            }
        }
Esempio n. 2
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);
         }
     }
 }
Esempio n. 3
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);
         }
     }
 }