While I do understand it is just beginner Course, I want to point out teaching an anty-pattern here. The question is “where?”.
We should not make index “Hardcoded”, because once we add “multi-dmg” feature, we will get right dmg effect while look will be not… adequate? Just saying, but Basing index on “HP” would be much more convinient, cuz you will have soft design, without magic numbers, yet once you add dmg buffers you will have to change script once again…
BR
Black