When you say Code Design, what differentiates that between say just plain Boss Design or Game Design in general? And specifically platformers? If the goal is to create a satisfying boss fight, there are probably a few common paradigms to consider.
The easiest paradigm to implement would probably be a simple Boss Pattern design where the boss cycles through a certain attack pattern in a specific order until either you or him are defeated. You’d design a set of attack blocks or pieces of the pattern and run through each one until you’ve hit your last block before repeating. If you designed some arbitrary N attack blocks, you program the boss AI to run like this:
Do Attack Block 1 → Do Attack Block 2 → … → Do Attack Block N → Do Attack Block 1 → …
While perhaps dumb, the simple structure allows the player an macro obstacle to handle in that they’ll have to discover the attack blocks, then discover the looping pattern, and slowly plan how to successfully traverse and resolve each attack block in relation to the broader boss pattern.
I haven’t seen Naruto in years, but I remember Kisame being fairly strong physically, had a large spiky shark greatsword (Samehada?) that shaved chakra, and used water ninpou. So, for example, here’s a sample boss pattern:
Attack Block 1 could just be following the player before initiating a short attack string in a single direction once in range.
Attack Block 2 could be a short dash at the player’s location followed up by a delayed long reaching sword swing in the dash direction.
Attack Block 3 could be him surrounding himself with a water barrier that blocks damage at his current location that explodes outward, damaging and pushing away the player in a small area.
The first two attack blocks would be simple attacks with obvious vulnerabilities to exploit. The design of an enemy attacking in a singular direction that can be easily exploited by getting out of range of the attack before following up is pretty simple, but the process of learning when/where to attack is part of the process of the player learning and solving the problems of defeating the boss.
Attack Block 3 could be part of a kind of fight reset to force the player and boss be in a state to repeat the play pattern from the beginning. Or perhaps the player could be allowed to exploit position after the barrier explodes.
Learning the broader boss pattern, gives an additional layer for the player to recognize and plan against. Maybe attack blocks 1 and 2 have very few points of vulnerability and the period after the third attack block has the longest vulnerable period. Maybe the player has some special attacks that have some wind up period that can be timed for the period of vulnerability and player slowly starts to learn, plan, experiment, and execute.
The fun is specifically the learning, planning, experimenting, and executing. The traditional boss fight is essentially a much more challenging test of those skills that you’d have in typically game encounters and their design is learning how to craft encounters that are challenging and interesting.
I’d first try to build a boss fight following the simple boss pattern paradigm and then start experimenting with additions and mutation to the design. Some things to think about:
Conditionally branching attack blocks (conditionally branch between Attack Block 2A or Attack Block 2B)
Conditionally branching boss pattern (boss pattern may change dependent on what you did prior/during fight e.g. player completed a specific quest or has a certain item/stats)
Boss fight opt-in/waiver (allow player to partake/skip boss fight under the appropriate conditions)
From a design philosophy standpoint, try to think of ways to make the boss either challenging or interesting to solve. While you still ultimately need to implement the bosses, take a step back and ask what makes a boss fight actually fun.