As far as grammar is concerned, the only thing that changes, is the ending, which becomes -i. The rest is just phonology and spelling conventions. In Polish, "i" is an palatalizing (softening) vowel, which means that it softens at least one preceding consonant. So in this case, ż is being softened to ź. Furthermore, spelling convention dictates that ź,ć and ś are written without the diacritical mark, when followed by the letter i. This why it's duzi, but the z is still pronounced as ź.
Here you'll find some more rules in the comments.