Eval Collection: Black Shield (League of Legends)

morgana_0

Black Shield is a skill used by Morgana in League of Legends. It grants the target a shield that blocks incoming magical damage and renders the target immune to crowd control for the duration or until the shield breaks.

Requirements:

♦ YEP_BuffsStatesCore.js

 

  1. First we need to create the Black Shield skill. This skill will add the Black Shield state.
  2. Create the Black Shield state.
  3. In the state’s notebox use this code:

<Custom Apply Effect>
// The strength of the shield. Default is 350 + 70% of caster's MAT.
target._blackShield = 350 + origin.mat * 0.7;

// Remember to change the 132 to your state's ID !
target.setStateCounter(132, target._blackShield);
</Custom Apply Effect>

<Custom React Effect>
if (this.isMagical()) {
if (target._blackShield - value > 0) {
target._blackShield -= value;

// Remember to change the 132 to your state's ID !
target.setStateCounter(132, target._blackShield);
value = 0;
} else {
value -= target._blackShield;

// Remember to change the 132 to your state's ID !
target.removeState(132);

};
};
</Custom React Effect>

4. For the immunity towards crowd control effects just use the Traits tab (Rate > State Resist) and add each state that should no longer be addable as long as the shield is up.

Lines 3, 6, 15 and 21 require your attention. The comments will tell you what to do!

Advertisements

Write a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s