public Attack AttackTarget(ICombatable target, IEventDispatcher eventDispatcher) { Attack attack = new PhysicalAttack(this, MinAttack, MaxAttack, Hitrate, Luck); if (DamageType == DamageType.Magical) { attack = new MagicAttack(this, Intelligence); } return(target.ReceiveAttack(attack, eventDispatcher)); }
public Attack AttackTarget(ICombatable target, IEventDispatcher eventDispatcher) { Attack attack = new PhysicalAttack(this, Monster.MinAttack, Monster.MaxAttack, Monster.Hitrate, Monster.GetCriticalHitChance(), 2, 0); if (Monster.DamageType == DamageType.Magical) { attack = new MagicAttack(this, Monster.MaxAttack); } return(target.ReceiveAttack(attack, eventDispatcher)); }
public override async Task <DougResponse> Activate(User user, ICombatable target, string channel) { if (!CanActivateSkill(user, out var response)) { return(response); } var message = string.Format(DougMessages.UserActivatedSkill, _userService.Mention(user), Name); await _slack.BroadcastMessage(message, channel); var attack = new MagicAttack(user, user.TotalIntelligence()); target.ReceiveAttack(attack, _eventDispatcher); await _combatService.DealDamage(user, attack, target, channel); return(new DougResponse()); }
public override async Task <DougResponse> Activate(User user, ICombatable target, string channel) { if (!CanActivateSkill(user, target, channel, out var response)) { return(response); } var message = string.Format(DougMessages.UserActivatedSkill, _userService.Mention(user), Name); await _slack.BroadcastMessage(message, channel); var damage = 5 * user.TotalAgility() + user.Level * 8; var attack = new PhysicalAttack(user, damage, int.MaxValue); target.ReceiveAttack(attack, _eventDispatcher); await _combatService.DealDamage(user, attack, target, channel); return(new DougResponse()); }