Indefinite adjective quis or qui...?

…Question from Ovid:

'…At si quis vestrae deus esset originis auctor
in tam praecipiti tempore ferret opem."

But if some god should be the begetter of you
in such dangerous times he could bring you help.

  • I think is what it means.

My question, however, is this.

‘quis’ in ‘…At si quis…’ is an indefinite adjective. These are given by Gavin Betts as follows:

qui/quis, quae/qua, quod…etc.

What determines whether you would use ‘quis…deum’ or ‘qui…deum’?

Adriane Gratias tibi ago. Hoc repperi modo!