Skip to content

Instantly share code, notes, and snippets.

View efarraro's full-sized avatar

Eric Farraro efarraro

View GitHub Profile
using UnityEngine;
using System.Collections;
using System;
using System.Runtime.Serialization;
[Serializable]
public class BaseEffect {
[NonSerialized]
public Unit AttachedUnit;
[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);
void test(String s) {
int i = 0;
i++;
}