Here's why:
* Adverbs modify verbs, adjectives, or other adverbs. In this case, "weakly" modifies the verb "struggled," telling us *how* Flounder struggled.
* Adverbs often end in "-ly". While not all adverbs end in "-ly", "weakly" is a good example of this pattern.