예제 #1
0
 public override void OnApply(Actor actor)
 {
     actor.Abilities.ForEach(a =>
     {
         if (a.Name.Equals(EntityNames.Abilities.Archer.AimedShot) ||
             a.Name.Equals(EntityNames.Abilities.Archer.ElectricShot) ||
             a.Name.Equals(EntityNames.Abilities.Archer.FireArrow))
         {
             a.ResourceCost = Math.Max(a.ResourceCost - 20, 0);
         }
     });
 }
예제 #2
0
 public override void OnApply(Actor actor)
 {
     // все атакующие способности на OnHit получает дополнительную способность наложить дебафф
     actor.Abilities.ForEach(a =>
         {
             a.AdditionalHitActions.Add((context, dmg) =>
                 {
                     var symb = context.Source.Symbols.FirstOrDefault(s => s.Name.Equals(this.Name));
                     if (symb != null && !symb.IsOnCD(context.CurrentTimeMS))
                     {
                         // TODO: 1. there is a chance to apply;
                         context.ScheduleApplyDeBuff(context.Target, new MarkOfDeathBuff() { Stack = symb.Rank }, null);
                         symb.LastActivatedMS = context.CurrentTimeMS;
                     }
                 });
         });
 }
예제 #3
0
 public override void OnApply(Actor actor)
 {
     // все способности на критический OnHit получает дополнительную способность наложить дебафф Рваная рана
     actor.Abilities.ForEach(a =>
     {
         a.AdditionalHitActions.Add((context, dmg) =>
         {
             if (dmg != null && dmg.IsCritical)
             {
                 var symb = context.Source.Symbols.FirstOrDefault(s => s.Name.Equals(this.Name));
                 if (symb != null && !symb.IsOnCD(context.CurrentTimeMS))
                 {
                     context.ScheduleApplyDeBuff(context.Target, new LacerationBuff() { Stack = symb.Rank }, null);
                     symb.LastActivatedMS = context.CurrentTimeMS;
                 }
             }
         });
     });
 }
예제 #4
0
 /// <summary>
 /// Actions that happens when symbol is applied to the actor
 /// </summary>
 public abstract void OnApply(Actor actor);
예제 #5
0
 public void ScheduleApplyDeBuff(Actor actor, Buff buff, int? time)
 {
 }