City State "Defense" score:
* First off is the base reluctance of -110
* If your non-war influence is less than -30, take a -300 penalty
* If you're trying to bully for a unit (aka worker) and the city state is less than size 4, -300
* Otherwise if you're trying to bully for a worker take off -30
* If you've bullied the city state within the last 10 turns, -300
* For bullying within the last 20 turns, -40
* If the city has an ally, -10
* If the city has a pledge of protection, -20
* If the city is militaristic, -10
* If the city is hostile, -10
Your "attack" score:
* Overall military power of all remaining major civs is ranked, with the first place getting 100 and the remaining getting decreasing amounts of 100 / [number of civs]. For example, for 5 civs this is 100/80/60/40/20
* Local military power in a radius of 5 (increases with larger map sizes) around the city state is compared. Depending on the ratio of the power of your units and the city state units, you get 100 / 80 / 60 / 40 / 20 for 3x / 2x / 1.5x / 1x / 0.5x the power
Unless they have the mechanics of this of course. One change that I know of is that if you have selected a certain autocracy tenet (gunboat) your local military strength is treated as 50% stronger.
Edit :This mean that if you have bullied the city state recently or if your non-war influence is less that -30 (so the -300 reluctance kicks in) it is impossible to anything unless that modifier has been removed.
Edit: And yeah, the total needs to be positive in order to succeed.