(a) Character Evidence Generally. Evidence of a person's character or a trait of his character is not admissible for the purpose of proving that he acted in conformity therewith on a particular occasion, except:
(1) Character of accused. Evidence of a pertinent trait of his character offered by an accused, or by the prosecution to rebut the same;
(2) Character of victim. Evidence of a pertinent trait of character of the victim of the crime offered by an accused, or by the prosecution to rebut the same, or evidence of a character trait of peacefulness of the victim offered by the prosecution in a homicide case to rebut evidence that the victim was the first aggressor;
(3) Character of witness. Evidence of the character of a witness, as provided in Rules 607, 608, and 609.
(b) Other Crimes, Wrongs, or Acts. Evidence of other crimes, wrongs, or acts is not admissible to prove the character of a person in order to show that he acted in conformity therewith. It may, however, be admissible for other purposes, such as proof of motive, opportunity, intent, preparation, plan, knowledge, identity, or absence of mistake or accident.