recently playing Nintendo Star Battle, the original character Kabi has a skill-to swallow each other and acquire each other"s abilities.
how is a function like this designed? Does
add a new function corresponding to the ability of the character to the Kabi object for each additional role, or does it implement the function of "being swallowed by Cappy" in the new role?
if the function of "being swallowed" is realized in each character, for example, each character has almost been developed, and now there is a new character A, which has the skill of "changing sheep" to change each other into a certain form. but each character changes into a different form. Are you going to modify all the role classes to achieve a "changed sheep" function?
does it seem that such a function is better written on Kabi or A?
or which other design pattern can better solve this problem?