Christopher Reyes Gonzaga, 45, is standing trial in the Victorian Supreme Court for allegedly murdering Gregory Tan in western Melbourne on April 15, 2024.
He did not dispute that he delivered the deadly blows, his barrister told a jury on TuesdayÂ
But the case would centre on what prosecutors could prove about his state of mind at the time, John Lavery said.
Following his arrest, Gonzaga told police Mr Tan had been under the influence of drugs and had threatened him with a screwdriver.
"You'll need to have an understanding of Greg Tan's reputation," Mr Lavery told the jury.
Mr Tan, 45, was struck dozens of times, including suffering blows to the front and back of his head, neck and torso.
His right hand was also partially severed, and his arms were cut to the bone in what prosecutors allege were defensive wounds.
The alleged attack took place in an empty home in the suburb of Deer Park, next door to where Mr Tan lived with his brother, both the men's partners, and another friend.
The home had been empty since the previous tenant, a woman, had died.
In a post-arrest interview, Gonzaga told police he and Mr Tan had entered the home looking for things including a potential stash of money hidden in the ceiling.
Communicating with police with the help of a Filipino interpreter, Gonzaga who came to Australia in 2019 said Mr Tan told him the lady who previously lived in the home was a witch and that she had died from an overdose.
"I was like what the f***? You kill that girl," Gonzaga told police.
"They overdosed the girl so they can claim all the stuff."
Gonzaga said at the time Mr Tan had been on "juice" - a common street name for GHB - and that he had threatened him with a screwdriver.
"He was acting like he was going to stab me," Gonzaga said.
Gonzaga explained to police that when people were on GHB they became volatile and dangerous and that he had needed to act for his own safety.
"It's like the body's moving but the mind's not there," he said.
"No one should ever put their life on someone that is a state of mind that juicing or like a zombie state. (sic)
"It's either you run or you fight - that's it."
A post-mortem examination of Mr Tan revealed he had drugs including methamphetamine, cannabis and GHB in his system at the time of his death.
The trial continues.