protected override void DoAction(Character character) { double experienceDifference = character.GetAbility(Topic).Experience - Student.GetAbility(Topic).Experience; if (experienceDifference <= 0) { throw new ArgumentOutOfRangeException("Teacher has nothing to teach this student!"); } double quality = character.GetAbility(Abilities.Teaching).Value + character.GetAttributeValue(AttributeType.Communication) + 6; Student.Advance(new Learn(quality, character.GetAbility(Topic).Value, Topic, character)); Completed = true; }
protected override void DoAction(Character character) { double experienceDifference = character.GetAbility(Topic).Experience - Student.GetAbility(Topic).Experience; if (experienceDifference <= 0) { throw new ArgumentOutOfRangeException("Teacher has nothing to teach this student!"); } double quality = character.GetAbility(Abilities.Teaching).Value + character.GetAttributeValue(AttributeType.Communication) + 6; Student.Advance(new Learn(quality, character.GetAbility(Topic).Value, Topic, character)); Completed = true; }