Exemplo n.º 1
0
 protected Spell(Character source, GameWorld gameWorld, int range)
 {
     Source = source;
     GameWorld = gameWorld;
     Range = range;
     Init();
 }
 public SpellShieldNova(Character source, GameWorld gameWorld, int range)
     : base(source, gameWorld, range)
 {
     Image = Properties.Resources.SpellNova;
     DrawBehavior.IsCircle = true;
     MotionBehavior = new StationaryMotionBehavior(this, gameWorld);
 }
Exemplo n.º 3
0
 public Frostball(Character source, GameWorld gameWorld, int range)
     : base(source, gameWorld, range)
 {
     Image = Properties.Resources.Frostbolt_small;
     if(!SpellHandler.Cooldowns.ContainsKey(typeof(IceGround)))
         SpellHandler.Cooldowns.Add(typeof(IceGround), new Cooldown(0));
 }
Exemplo n.º 4
0
 public SpellTree(Character character)
 {
     this.character = character;
     AttackMap = new Dictionary<Type, Func<Spell>>();
     spells = new Dictionary<Type, int>();
     LoadSpells();
 }
Exemplo n.º 5
0
 public IceGround(Character source, GameWorld gameWorld, int range) : base(source, gameWorld, range)
 {
     Image = Properties.Resources.IceGround;
     this.MotionBehavior = new StationaryMotionBehavior(this, gameWorld);
     Paralax = Paralax.Background;
     affectedCharacters = new List<Character>();
     Cost = 0;
     gameWorld.Split += gameWorld_Split;
     SlowPercentage = 25;
     Exit();
 }
Exemplo n.º 6
0
 public SpellHandler(GameWorld gameWorld, Character source)
 {
     this.GameWorld = gameWorld;
     this.Source = source;
     Init();
 }
 public NormalDamageBehavior(Character source, IEnumerable<Type> targetTypes, int damage)
 {
     Damage = damage;
     this.Source = source;
     this.TargetTypes = targetTypes.ToList();
 }
 public Lightningbolt(Character source, GameWorld gameWorld, int range)
     : base(source, gameWorld, range)
 {
 }
Exemplo n.º 9
0
 public Fireball(Character source, GameWorld gameWorld, int range)
     : base(source, gameWorld, range)
 {
     Image = Properties.Resources.Fireball;
 }
Exemplo n.º 10
0
 public void TakeDamage(IDamageBehavior damageBehavior, Character source)
 {
     Health.Use(damageBehavior.Damage);
     if (Health.Current <= 0) Killed(this, source);
 }