示例#1
0
文件: Mob.cs 项目: Hyftar/ZodFortress
 /// <summary>
 /// Attacks the specified player.
 /// </summary>
 /// <param name="player">Attacked player</param>
 /// <param name="attackStrength">Strength of the attack</param>
 /// <returns>True if the attack killed the player</returns>
 public Tuple<int, bool> AttackPlayer(Player player, int attackStrength)
 {
     return Tuple.Create(player.ReceiveDamage(attackStrength + (int) Math.Floor(this.AttackStat * (this.OffensiveSlot == null ? 1 : this.OffensiveSlot.AttackMultiplier))), player.Health < 1);
 }
示例#2
0
 /// <summary>
 /// Attacks the specified player.
 /// </summary>
 /// <param name="player">Attacked player</param>
 /// <param name="attackStrength">Strength of the attack</param>
 /// <returns>True if the attack killed the player</returns>
 public Tuple <int, bool> AttackPlayer(Player player, int attackStrength)
 {
     return(Tuple.Create(player.ReceiveDamage(attackStrength + (int)Math.Floor(this.AttackStat * (this.OffensiveSlot == null ? 1 : this.OffensiveSlot.AttackMultiplier))), player.Health < 1));
 }