Photograph: Martin Poole
Heat 2 tablespoons of the oil in a large nonstick sauté pan or wok. Stir-fry the aubergine cubes over a high heat for 4-5 minutes until golden brown. Remove from the pan with a slotted spoon and transfer to a plate lined with kitchen paper. Cut the duck breasts into 1cm slices.
Return the pan to the heat. Add the chopped peanuts or cashews and fry for 3 minutes, stirring regularly over a medium heat until lightly browned. Tip into a heatproof bowl and set aside.
Return the pan to the heat and add the remaining oil and the shallots or onion. Cook over a medium heat for 2-3 minutes until lightly browned, stirring often. Add the sliced duck breasts and potatoes and stir-fry for 2 minutes until the duck is lightly coloured. Stir in the curry paste, cinnamon stick and star anise and cook for 1 minute, stirring constantly.
Pour over the coconut milk, add 250ml cold water, then the fish sauce and sugar. Bring to a simmer and cook for 15 minutes, uncovered, stirring occasionally. Add the aubergine, green beans and chopped nuts. Bring to a simmer and continue cooking for 10-15 minutes until the potatoes are tender, stirring occasionally. The sauce should be fairly liquid and the vegetables just submerged as they simmer, so add a little more water if you think the curry needs it. Serve with rice.