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); } }); }
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; } }); }); }
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; } } }); }); }
/// <summary> /// Actions that happens when symbol is applied to the actor /// </summary> public abstract void OnApply(Actor actor);
public void ScheduleApplyDeBuff(Actor actor, Buff buff, int? time) { }