Пример #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);
 }
Пример #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));
 }
Пример #4
0
 public SpellTree(Character character)
 {
     this.character = character;
     AttackMap = new Dictionary<Type, Func<Spell>>();
     spells = new Dictionary<Type, int>();
     LoadSpells();
 }
Пример #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();
 }
Пример #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)
 {
 }
Пример #9
0
 public Fireball(Character source, GameWorld gameWorld, int range)
     : base(source, gameWorld, range)
 {
     Image = Properties.Resources.Fireball;
 }
Пример #10
0
 public void TakeDamage(IDamageBehavior damageBehavior, Character source)
 {
     Health.Use(damageBehavior.Damage);
     if (Health.Current <= 0) Killed(this, source);
 }