Skip to content

Instantly share code, notes, and snippets.

@efarraro
Created January 28, 2018 23:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efarraro/8df5b3c81bce33c8592c77e5dfebd3c8 to your computer and use it in GitHub Desktop.
Save efarraro/8df5b3c81bce33c8592c77e5dfebd3c8 to your computer and use it in GitHub Desktop.
[Serializable]
public class ZapEffect : BaseEffect {
private int[] _damagePerCharge = new int[] { 1, 2, 3 };
public override void Apply()
{
int multiplier = (Ability as Spell).Charges.Percentage == 1 ? 2 : 1;
int damage = _damagePerCharge[Ability.Level] * (Ability as Spell).Charges.Current * multiplier;
BattleApp.Instance.ResolveDamage(damage, BattleApp.Instance.CurrentPlayer, BattleApp.Instance.CurrentTarget, DamageType.Wind);
}
public override string DescriptionForLevel(int level)
{
return string.Format(Strings.CARD_ZAP_DESCRIPTION, _damagePerCharge[level]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment