Among the storylines devised by the scriptwiter, David Yallop, were an IRA bomb, armed robbery, suicide and fatal disease.
Mr Yallop said the show's producers used acting ability as a key factor in deciding which members of the cast to get rid of.
Few of the soap's characters would be left untouched by tragedy as favourite personalities were killed off.
'When it became apparent that the producer required the removal of certain members of the cast, the reasons being given were in some instances, delicate.
'They concerned the professional view the producer had of various actors and actresses.'
Mr Yallop told the court that the cast list would be marked with black asterisks, signifying an untimely death.
'I had a list of the cast in front of me. Some would be written out just naturally, others would be more painfully removed.'
Asked by Judge Gervase Sheldon whether the black stars were painful, he replied: 'Very painful.'
Mr Yallop, of Hornsey, north London, was hired by the BBC to write a year's supply of storylines for EastEnders. He was asked to cut the cast by 10 to beat Coronation Street in the BBC's ratings war with ITV.
He and the producer, Mike Gibbon, decided the cast's fate in a two-week brainstorming session in September 1989.
One of the first characters to go was to be the illegitimate child of Wicksey, the barman.
Mr Yallop said: 'We had to reach a decision with the illegitimate child who was in the process of being born as a result of an earlier storyline.
'We wanted to know what to do with it. Either the child would be allowed to live or it would die.'
They decided to make the child 'seriously ill', but the reprieve was temporary. Mr Yallop said: 'In episode 606 I resolved the problem.'
He said that on his draft storyline he wrote the words 'Baby die'.
The court was told that he and Mr Gibbon arranged a two-day seminar for the series scriptwriters to explain the dramatic change of direction that was to take place in the soap.
However, it did not take place, Mr Yallop said, 'because the producer, Mr Gibbon, was removed from the series and my services were no longer required'.
Mr Yallop, author of In God's Name, a book which alleges that Pope John Paul I was murdered, was given a pounds 7,500 fee from the BBC.
He alleges the corporation is in breach of contract and claims to have spent 70 days working to create 100,000 words of story outlines.
He is also claiming more than pounds 70,000 in unpaid fees.
The hearing continues.Reuse content