How to achieve this function of Kabi in "Nintendo Star Battle" to acquire the skills of his opponent?

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?


the game has not been bought yet. It should leave a slot for the Kabi object. Kabi will put the character in this slot when swallowing a character. Kabi uses the devouring character's ability to call the method of the object in the slot.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3164a-2bd75.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3164a-2bd75.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?