Excalibur

The sorcerer Merlin (Nicol Williamson) retrieves Excalibur from the Lady of the Lake for Uther Pendragon (Gabriel Byrne), who secures a brief alliance with Gorlois, the Duke of Cornwall. Uther's lust for Cornwall's wife Igrayne (Katrine Boorman) soon ruins the truce, and Merlin agrees to help Uther to seduce Igrayne on the condition that he gives Merlin whatever results from his lust. Merlin transforms Uther into Cornwall's likeness with the Charm of Making. Cornwall's daughter Morgana senses her father's mortal injury during his assault on Uther's camp; and, while Igrayne is fooled by the disguise and Uther impregnates her, Morgana sees through it, watching Uther as Cornwall dies in battle. Nine months later, Merlin takes Uther's son Arthur. Uther pursues but is mortally wounded by Gorlois' knights. Uther thrusts Excalibur into a stone, crying that "None shall wield Excalibur, but me!", and Merlin proclaims, "He who draws the sword from the stone, he shall be king."
Years later Sir Ector and his sons, Kay and Arthur (Nigel Terry) attend a jousting tournament. Sir Leondegrance (Patrick Stewart) wins the chance to try pulling Excalibur from the stone, but he fails. Kay's sword is later stolen, and Arthur pulls Excalibur from the stone while trying to replace the stolen sword. Word spreads, and Merlin announces to the crowd that Arthur is Uther's son and, hence, the rightful ruler. Leondegrance immediately proclaims his support for the new king, but not all are willing to accept. While the others argue, Merlin and Arthur enter the forest, where Merlin tells Arthur that he is the rightful king and that the king and the land are one. Overwhelmed, Arthur falls into a long sleep. When he wakes, Arthur goes to aid Leondegrance, whose castle is under siege by Arthur's enemies, led by Sir Uryens. During the battle, Arthur defeats Uryens and then demands Uryens knight him, handing him Excalibur to do so. Uryens is tempted to kill him but is deeply moved by Arthur's display of faith and decides to knight him (Merlin is stunned by something he did not foresee). Uryens falls to his knees to declare his loyalty, which leads the others to follow suit. Arthur meets Leondegrance's daughter Guinevere soon afterwards and is smitten but Merlin foresees trouble.
Years later, the undefeated knight Lancelot (Nicholas Clay) blocks a bridge and will not move until he is defeated in single combat, seeking a king worthy of his sword. Lancelot defeats Arthur and his knights, so Arthur summons Excalibur's magic and defeats Lancelot but breaks Excalibur. Arthur is ashamed of abusing the sword's power to serve his own vanity and throws the sword's remains into the lake, while admitting his mistake. The Lady of the Lake offers a restored Excalibur to the king, Lancelot is revived and Arthur and his knights unify the land. Arthur creates the Round Table, builds Camelot and marries Guinevere (Cherie Lunghi); Lancelot confesses that he has fallen in love with her too. Arthur's half-sister Morgana (Helen Mirren), a budding sorceress and still bitter towards Arthur, becomes apprenticed to Merlin in hopes of learning the Charm of Making from him.
Lancelot stays away from the Round Table to avoid Guenevere. He meets Perceval (Paul Geoffrey), a peasant boy and takes him to Camelot to become a squire. Sir Gawain (Liam Neeson), under Morgana's influence, accuses Guinevere of driving Lancelot away, "driven from us by a woman's desire", forcing Lancelot to duel with Gawain to defend his and Guinevere's honour. The preceding night, Lancelot is attacked by himself in a nightmare and awakens to find himself wounded by his own sword. Arthur hastily knights Perceval when Lancelot is late to the duel but Lancelot appears just in time and defeats Gawain, while nearly dying from his wounds. Merlin heals him and he rides out to the forest to rest. Guenevere realises her feelings for Lancelot and they consummate their love in the forest; meanwhile, Merlin lures Morgana to his lair to trap her, suspecting that she is plotting against Arthur.
Arthur finds Guenevere and Lancelot asleep together. Heartbroken at their betrayal, he thrusts Excalibur into the ground between the sleeping couple. Merlin's magical link to the land impales him on the sword and Morgana seizes the opportunity to trap him in a crystal, with the Charm of Making. Morgana takes the form of Guinevere and seduces Arthur. On awakening to the sight of Excalibur, Lancelot flees in shame and Guinevere lies weeping.
Morgana bears a son, Mordred and a curse caused by Mordred's unnatural, incestuous origin, strikes the land with famine and sickness. A broken Arthur sends his knights on a quest for the Holy Grail, in hopes of restoring the land. Many of his knights die or are bewitched by Morgana. Morgana captures Perceval, who narrowly escapes. Perceval encounters an ugly bearded old man with armour under his tattered robes, who preaches to followers that the kingdom has fallen because of "the sin of Pride". A shocked Perceval recognises the man as Lancelot. After Perceval fails to convince Lancelot to come to Arthur's aid, Lancelot and his followers throw Perceval into a river. Perceval has a vision of the Grail, during which he realises that Arthur and the land are one. Upon answering the riddle he gains the Grail and takes it to Arthur, who drinks from it and is revitalised, as is the land, which springs into blossom.
Arthur finds Guinevere at a convent and they reconcile. She gives him Excalibur, which she has kept safe since the day she fled. Frustrated in preparation for battle against Morgana's allies, Arthur calls to Merlin, unknowingly awakening the wizard from his enchanted slumber. Merlin and Arthur have a last conversation before Merlin vanishes. The wizard then appears to Morgana as a shadow and tricks her into uttering the Charm of Making, producing a fog from the breath of the Dragon, and exhausting her own magical powers which had kept her young. She rapidly ages and her own son kills her, repulsed by the sight of his once beautiful mother now reduced to a decrepit old crone.
Arthur and Mordred's forces meet in battle, with Arthur's army benefiting from the fog that conceals their small size. Lancelot arrives unexpectedly and turns the tide of battle, later collapsing from his old, self-inflicted wound which had never healed. Arthur and Lancelot reconcile and Lancelot dies with honour. Mordred stabs Arthur with a spear but Arthur further impales himself to get closer and kills Mordred with Excalibur. Perceval refuses to carry out Arthur's dying wish, that he throw Excalibur into a pool of calm water, reasoning that the sword is too valuable to be lost. Arthur tells him to do as he commands and reassures him that one day a new king will come and the sword will return again. Perceval throws Excalibur into the pool, where the Lady of the Lake catches it. Perceval returns to see Arthur lying on a ship, attended by three ladies clad in white, sailing into the sun toward the Isle of Avalon.

Question: How did Lancelot become wounded?
Answer: With his own sword during a nightmare.