Finite magnetic well effects on resistive and drift-resistive ballooning modes in a shaped tokamak. (1st July 2022)