As I understand it, Goliath didn't have any defensive magic running that could have helped, such as displacement or mirror image. So under the assumption that the bible setting has a 20-20 autokill rule, it's a failure to IP proof, as well as dumb luck on David's side. God would not have to be involved.