/// <summary> /// Determines the level. /// </summary> /// <param name="skills">The skills.</param> /// <param name="weapon">The weapon.</param> public static int DetermineCombatLevel(SkillsContainer skills, Weapon weapon) { double a = skills.Attack + weapon.APoints; double d = skills.Defense / skills.Handicap; return(Convert.ToInt32(Math.Ceiling(a + d))); }
/// <summary> /// Determines the level. /// </summary> /// <param name="skills">The skills.</param> /// <param name="weapon">The weapon.</param> public static int DetermineCombatLevel(SkillsContainer skills, Weapon weapon) { double a = skills.Attack + weapon.APoints; double d = skills.Defense / skills.Handicap; return Convert.ToInt32(Math.Ceiling(a + d)); }
/// <summary> /// Initializes a new instance of the <see cref="Samurai" /> class. /// </summary> /// <param name="weaponHandler">The weapon handler.</param> /// <param name="theQualities">The qualities.</param> public Samurai(WeaponHandler weaponHandler, SkillsContainer theQualities) { this.weaponHandler = weaponHandler; this.qualities = theQualities; }
/// <summary> /// Instructs new warriors. /// </summary> /// <param name="o">The offense.</param> /// <param name="d">The defense.</param> /// <param name="p">The penalty.</param> /// <returns> /// A new warrior. /// </returns> public Warrior instruct(double o, double d, int p) { var sc = new SkillsContainer(o, d, p); return new AncientGreek(new SpearHandlerImpl(), sc); }
/// <summary> /// Initializes a new instance of the <see cref="AncientGreek" /> class. /// </summary> /// <param name="weaponHandler">The weapon handler.</param> /// <param name="qualities">The qualities.</param> public AncientGreek(WeaponHandler weaponHandler, SkillsContainer qualities) { this.weaponHandler = weaponHandler; this.qualities = qualities; }
/// <summary> /// Initializes a new instance of the <see cref="Elf" /> class. /// </summary> /// <param name="weaponHandler">The weapon handler.</param> /// <param name="qualities">The qualities.</param> public Elf(WeaponHandler weaponHandler, SkillsContainer qualities) { this.weaponHandler = weaponHandler; this.qualities = qualities; }
/// <summary> /// Instructs new warriors. /// </summary> /// <param name="o">The offense.</param> /// <param name="d">The defense.</param> /// <param name="p">The penalty.</param> /// <returns> /// A new warrior. /// </returns> public Warrior instruct(double o, double d, int p) { var sc = new SkillsContainer(o, d, p); return new Samurai(new SwordHandlerImpl(), sc); }
/// <summary> /// Instructs new warriors. /// </summary> /// <param name="o">The offense.</param> /// <param name="d">The defense.</param> /// <param name="p">The penalty.</param> /// <returns> /// A new warrior. /// </returns> public Warrior instruct(double o, double d, int p) { var sc = new SkillsContainer(o, d, p); return new Elf(new BowHandlerImpl(), sc); }