Shield

Shield overview
To a fighter, the shield is almost the most important tool for defense but also attack ! The shield is the only way to completely nullify any damage when dodging is not an option. You can even repel bullets !

This technology generate an energy field that prevents everything from outside to come inside. Its means you can keep shooting while shielding.

Of course, this shield comes with a cost : as long as you maintain it, it will drain your energy stock.(5 per tick ) IMPORTANT ; You CAN'T use your shield while taking damage ! The shield engine can't start until all the energy from the enemy bullet is dispersed. Therefore you must activate it BEFORE getting hit. In case of rapid fire, you may not be able to raise the shield at all if the first hit connect ! (See Hit-stun for more info)

Energy overview
The energy is generated and stocked by your ship to be consumed by the shield.

Your energy stock is visible in the energy bar just under the health bar. At the duel starts, the shields bar are empty.

The ships slowly generate energy over time (1 per tick) when the shield is inactive.

You can gain bonus energy by destroying energy orbs or by grazing bullets (to be confirmed).

How to use the shield :
When a player push the shield button, the shield will deploy almost instantly (in 1 frame) and start consuming the energy stocked. As long as you push the button, the shield remains and drain the energy bar.

As soon as a player release the button, the shield is dispatched. The energy start rising again.

As the shield is just activating, it sends out a small burst of light and energy. This special burst can deflect bullets and send them back. This technique is called a parry.

Advanced play : The parry
The parry : To pull off the parry, you have to activate your shield just at the moment bullets collides (collision must be detected between the first and the 5th frames of the shield animation). If you succeed, the bullet is not destroyed but repelled.

The perfect parry : To pull off the perfect parry, you must activate and deactivate the shield almost instantly (between 1 and 5 frames). You deflect the bullet and gain bonus to your ultra bar. This high risk high reward technique enable the player to use the perfect parry combo system !

The perfect parry is the most efficient use for you shield as it minimizes the consumption of you energy stock !

The perfect parry combo system : If you time perfectly your parries, you can cancel all damage from a full volley, repel all bullets AND gain even higher ultra bar bonus ! You can even gain addition points to your bonus upgrade weapon bar ! (to be confirmed)

The parry duel - A parry duel starts when both players deflects the same bullets more than once ! This sub-type duel can decide the match because the more a bullet bounces, the more speed and damage it gather !

Additional side effects and mechanics :

- Your opponent won't get bonus for his upgrade bar since damage is prevented.

- Shield is not limited to enemy player bullets, it can protect you from incoming asteroids, kamikaze droids, or NPC bullets AND you will get the bonuses as well.

- You can parry combo from Environment bullets AND you can combo from multiple sources at the same time !

- You can shield yourself from you own bullets.

- You can get more shield by grazing bullets.

- You can get more shield by picking up an energy orb (bonus object)

- Shield stun, hit lag and Knock back ?

Numbers (can be slightly more or less for special ships) :

 * Energy charge rate : 1 per second
 * Shield consumption rate while active : 5 per second
 * Perfect parry average consumption : 1 per parry
 * perfect parry window : 5 frames
 * Development idea to implement it : Binding a "weapon" to the shield button. On push it fires a non moving bullet lasting 5 frame. It overlaps the player ship with a collision mask detection set to repel bullets.

Bubble shield
This specific type of shield allows the player to generate a small static energy field every few seconds. It behave like a bubble and hover around in the location it was activated in. The bubble will stay active a second before popping. As long as the bubble is active, it can stop one bullet or repel one of the bigger obstacles. Note that it will pop on hit so it should stop one attack only. I say "should" because it can be seen to block 2 simultaneous attacks. Strategies :
 * No energy bar
 * Available every 4 seconds
 * Last for 1 second
 * Can stop one attack whatever it's power
 * Can't stop multiple attaks since the first hit will pop the bubble
 * The bubble will pop against your own weapons
 * The player can hide beneath the bubble to hide his mouvement
 * The bubble can be used offensively to push certain big objects
 * Moving outside the protection of the bubble is a very common mistake