It?s kinda the way I did it.
Every time a beam is fired, the projectile is created with the corresponding flags (separate variables), depending on the enabled beams. So, firing while having Ice+Plasma whould create the object with ice=1; plasma=1; spazer=0; wave=0.
Then on collisions I check those.
There are different sprites for every combination, chosen with those variables too.
Here?s a brief description of my beams system.
The base damage is 5, and with every beam upgrade you get this base is multiplied by 1.5, this is permanent once you get the upgrades and doesn?t require to have all the beams enabled.
Now, I?m trying to give this some variety. An actual reason to switch the beam effects, so every beam type has its pros and cons.
- Freezes Enemies, they can be used as platforms
- The first hit always freezes, even if the enemy should die in one shot.
- It fires like in the original Metroid 2, alternating upwards and downwars, and oscillating. It can be tricky to aim. When combined with spazer, you get the classic 3 waving beams.
- Goes through enemies, hitting multiple times (once every 3 steps)
- Damage is reduced by half, so it should hit more than 2 times to be effective. Larger enemies are more affected by this.
- Beams split in 3, covering a slightly larger area
- Damage reduced by half. You should hit the enemies with the 3 beams to inflict 1.5 damage.
Charge Beam just multiplies the resulting damage *3.
I?m still tweaking this, since I?m trying to design situations where a certain beam combination could prove more useful. That is, before getting them all and having all of them enabled.
So, this is the order you get the beams. It should play like this:
- First ruins: You get Ice Beam, you get more damage and freeze enemies. Yay.
- Second ruins: You get wave beam, but only use it on certain situations where you can use the terrain at your advantage.
- Third ruins: You get Plasma, and sometimes disable Ice to kill enemies in one shot.
- Fourth ruins: You get Spazer. Wave beam is now easier to aim, and Ice beam shots now kill in one hit (if the enemy is weak enough). From now on all the beams enabled are the best option.
By this time also, missiles become obsolete in normal combat, an play only the role of Metroid killing.
Tell me what you think about this system. I?m trying to make it as balanced as possible.