protected override void CompleteAttack(IList <object> data) { List <MapObject> targets = FindAllTargets(7, CurrentLocation); if (targets.Count == 0) { return; } for (int i = 0; i < targets.Count; i++) { Target = targets[i]; if (Target == null || !Target.IsFriendlyTarget(this) || Target.CurrentMap != CurrentMap || Target.Node == null) { continue; } BuffType type = Info.AI == 41 ? BuffType.BlessedArmour : BuffType.UltimateEnhancer; var stats = new Stats { [type == BuffType.BlessedArmour ? Stat.MaxAC: Stat.MaxDC] = Target.Level / 7 + 4 }; Target.AddBuff(type, this, Settings.Second * 5, stats); Target.OperateTime = 0; } }
public override void Attach(BaseGameEntity target) { base.Attach(target); Target.AddBuff(this); OnEnter(); OldScale = target.transform.localScale; }
protected override void ProcessTarget() { if (Target == null || Target.Dead) { FindTarget(); return; } Direction = Functions.DirectionFromPoint(CurrentLocation, Target.CurrentLocation); if (InAttackRange()) { if (Envir.Time > AttackTime) { Attack(); if (Envir.Time > debuffTime) { Target.AddBuff(new Buff { Caster = this, ExpireTime = Envir.Time + (DebuffDuration * Settings.Minute), ObjectID = Target.ObjectID, Type = BuffType.MobDebuff, Values = DebuffAmount }); Target.ApplyPoison(new Poison { Duration = Envir.Random.Next(3, 5), Owner = this, PType = PoisonType.Slow, TickSpeed = 1000, Value = GetAttackPower(MinDC, MaxDC) }); AddBuff(new Buff { Caster = this, Values = StolenStats, ExpireTime = Envir.Time + (StealDuration * Settings.Minute), Type = BuffType.MobDebuff, ObjectID = ObjectID }); DebuffDuration = Envir.Random.Next(1, 10); StealDuration = DebuffDuration; DebuffAmount[0] = Envir.Random.Next(50, 200); //hp StolenStats[0] = DebuffAmount[0]; DebuffAmount[1] = Envir.Random.Next(50, 200); //mp DebuffAmount[5] = Envir.Random.Next(10, 40); //AC StolenStats[5] = DebuffAmount[5]; DebuffAmount[6] = Envir.Random.Next(10, 40); //AMC StolenStats[6] = DebuffAmount[6]; DebuffAmount[7] = Envir.Random.Next(10, 40); //crit dmg DebuffAmount[8] = Envir.Random.Next(10, 40); //reflect DebuffAmount[9] = Envir.Random.Next(10, 40); //HP drain debuffTime = Envir.Time + (DebuffDuration * Settings.Minute); } AttackTime = Envir.Time + AttackSpeed; } } if (Envir.Time < ShockTime) { Target = null; return; } if (Target.Dead) { FindTarget(); return; } if (!InAttackRange()) { MoveTo(Target.CurrentLocation); } }
public override void Apply() { var id = Target.PopNextBuffId(); var buff = new TriggerBuff(id, Target, Caster, EffectHandler, Spell, Spell, Critical, Dispellable, Priority, EvasionBuffTrigger); buff.SetTrigger(BuffTriggerType.OnDamaged); Target.AddBuff(buff); base.Apply(); }
public override void Perform(SimulationState state, CombatUnit unit) { if (Target == null) { return; } if (unit.FramesUntilNextAttack > 0) { return; } if (unit.AdditionalAttacksRemaining > 0 && unit.PreviousAttackTarget.Tag != Target.Tag) { unit.AdditionalAttacksRemaining = 0; } CombatWeapon picked = unit.GetWeapon(Target); if (picked == null) { return; } if (unit.DistSq(Target) > picked.Range * picked.Range) { unit.Move(Target.Pos); return; } unit.Attack(state, picked, Target, false); foreach (Buff buff in Target.Buffs) { if (buff is ConcussiveShell) { buff.ExpireFrame = state.SimulationFrame + 24; return; } } Target.AddBuff(new ConcussiveShell(state.SimulationFrame + 24)); }
protected override void CompleteAttack(IList <object> data) { List <MapObject> targets = FindAllTargets(7, CurrentLocation); if (targets.Count == 0) { return; } for (int i = 0; i < targets.Count; i++) { Target = targets[i]; if (Target.IsFriendlyTarget(this)) { BuffType bufftype = Info.AI == 41 ? BuffType.BlessedArmour : BuffType.UltimateEnhancer; Target.AddBuff(new Buff { Type = bufftype, Caster = this, ExpireTime = Envir.Time + 5 * 1000, Values = new int[] { Target.Level / 7 + 4 } }); Target.OperateTime = 0; } } }
public override void OnApply() { Target.TakeDamage(School, DamageMultiplier, Caster); Target.AddBuff(Debuff); Depth--; if (Depth > 0) { foreach (var grid in Target.GridCell.Neighbours) { foreach (var mob in grid.MobEntities.Values) { if (Target != mob && mob.Health.Value > 0 && Vector3.SqrDistance(mob.Position, Target.Position) < SqrBounceDistance) { previousTarget = Target; Target = mob; State = SkillState.OnCasted; break; } } } } }
public override void OnApply() { Target.TakeDamage(School, DamageMultiplier, Caster); Target.AddBuff(Debuff); }
public override void OnApply() { Target.AddBuff(Buff); }
public override void Attach(BaseGameEntity target) { base.Attach(target); Target.AddBuff(this); OnEnter(); }
protected override void Attack() { if (!Target.IsAttackTarget(this)) { Target = null; return; } ShockTime = 0; Direction = Functions.DirectionFromPoint(CurrentLocation, Target.CurrentLocation); Broadcast(new S.ObjectRangeAttack { ObjectID = ObjectID, Direction = Direction, Location = CurrentLocation, TargetID = Target.ObjectID, Type = 0 }); int damage = GetAttackPower(MinDC, MaxDC); if (damage == 0) { return; } int delay = Functions.MaxDistance(CurrentLocation, Target.CurrentLocation) * 50 + 500; //50 MS per Step DelayedAction action = new DelayedAction(DelayedType.RangeDamage, Envir.Time + delay, Target, damage, DefenceType.ACAgility); ActionList.Add(action); if (Envir.Time > debuffTime) { Target.AddBuff(new Buff { Caster = this, ExpireTime = Envir.Time + (DebuffDuration * Settings.Minute), ObjectID = Target.ObjectID, Type = BuffType.MobDebuff, Values = DebuffAmount }); if (Info.Name == "SnowFlower") { DebuffDuration = Envir.Random.Next(1, 10); StealDuration = DebuffDuration; DebuffAmount[0] = Envir.Random.Next(50, 200); //hp StolenStats[0] = DebuffAmount[0]; DebuffAmount[1] = Envir.Random.Next(50, 200); //mp DebuffAmount[2] = Envir.Random.Next(10, 40); //DC StolenStats[2] = DebuffAmount[2]; DebuffAmount[3] = Envir.Random.Next(10, 40); //DC StolenStats[3] = DebuffAmount[3]; DebuffAmount[4] = Envir.Random.Next(10, 40); //DC StolenStats[4] = DebuffAmount[4]; Target.ApplyPoison(new Poison { Duration = Envir.Random.Next(10, 30), Owner = this, PType = PoisonType.Red, TickSpeed = 1000, Value = GetAttackPower(MinDC, MaxDC) }); AddBuff(new Buff { Caster = this, Values = StolenStats, ExpireTime = Envir.Time + (StealDuration * Settings.Minute), Type = BuffType.MobDebuff, ObjectID = ObjectID }); } else if (Info.Name == "SnowFlowerQueen") { DebuffDuration = Envir.Random.Next(1, 10); StealDuration = DebuffDuration; DebuffAmount[7] = Envir.Random.Next(10, 40); //crit dmg DebuffAmount[8] = Envir.Random.Next(10, 40); //reflect DebuffAmount[9] = Envir.Random.Next(10, 40); //HP drain DebuffAmount[5] = Envir.Random.Next(10, 40); //AC StolenStats[5] = DebuffAmount[5]; DebuffAmount[6] = Envir.Random.Next(10, 40); //AMC StolenStats[6] = DebuffAmount[6]; Target.ApplyPoison(new Poison { Duration = Envir.Random.Next(10, 30), Owner = this, PType = PoisonType.Red, TickSpeed = 1000, Value = GetAttackPower(MinDC, MaxDC) }); AddBuff(new Buff { Caster = this, Values = StolenStats, ExpireTime = Envir.Time + (StealDuration * Settings.Minute), Type = BuffType.MobDebuff, ObjectID = ObjectID }); } else if (Info.Name == "FrozenWarewolf") { DebuffDuration = Envir.Random.Next(1, 10); StealDuration = DebuffDuration; DebuffAmount[7] = Envir.Random.Next(10, 40); //crit dmg DebuffAmount[8] = Envir.Random.Next(10, 40); //reflect DebuffAmount[9] = Envir.Random.Next(10, 40); //HP drain DebuffAmount[5] = Envir.Random.Next(10, 40); //AC StolenStats[5] = DebuffAmount[5]; DebuffAmount[6] = Envir.Random.Next(10, 40); //AMC StolenStats[6] = DebuffAmount[6]; Target.ApplyPoison(new Poison { Duration = Envir.Random.Next(3, 5), Owner = this, PType = PoisonType.Frozen, TickSpeed = 1000, Value = GetAttackPower(MinDC, MaxDC) }); AddBuff(new Buff { Caster = this, Values = StolenStats, ExpireTime = Envir.Time + (StealDuration * Settings.Minute), Type = BuffType.MobDebuff, ObjectID = ObjectID }); } debuffTime = Envir.Time + (Envir.Random.Next(2, 6) * Settings.Minute); } if (Target.Dead) { FindTarget(); } }