When your bad karma is fructifying your right decisions and efforts will be changed into wrong, such is the power of bad karma, as also when your good karma is maturing then your wrong decisions and actions will be turned into right and favorable, such is the power of good karma.
LAW OF KARMA IS IMMUTABLE.
Therefore, when your good karma is fructifying, when one undergoes favorable time, healthy, wealthy and happy time, one should do more wholesome and good karma, because that is the time when you cultivate good fortune by doing right and auspicious karma, by practicing righteousness. Then all your decisions right or wrong are in your favour. You can cultivate much much more good karma. But alas! People forget this major thing, and give themselves to surpassing pleasure, luxury and comfort. But wise ones do cultivate more good karma during favorable time. Pleasure and Pain deviate simple minded one from the Wisdom, but by association with wise people one can remain in equanimity and cultivate more good karma which gives later on more happiness.
But an enlightened one remains beyond the effects of good or bad karma just by practicing EQUAINIMITY.
Equanimity is the greatest Merit which is keeps one beyond the effect of Karma. By this vehicle only one can break the cycle of Karma. The Law of Karma binds one to rebirths to undergo the fruit of good karma or bad karma. But there is way to escape from the effect of karma. If there had not been any Escape of Karma then no one would have attained Salvation or Nirvana from cycle of Karma, which bind one to rebirths. EQUANIMITY IS ONLY THE WAY TO REMAIN UNAFFECTED BY THE LAW OF KARMA. BY EQUANIMITY ONE ATTAINS SALVATION FROM CYCLE OF BIRTHS AND DEATHS.