Example #1
0
 public HomingProjectile(Game game, Creature target, Creature attacker, OnHitProjectileDelegate onHitDelegate)
     : base(game, attacker, onHitDelegate)
 {
     this.target = target;
     this.duration = null;
     onHit = onHitDelegate;
 }
Example #2
0
 public bool PreviouslyHarmed(Creature creature)
 {
     if (harmedCreatures.Contains(creature))
         return true;
     harmedCreatures.Add(creature);
     return false;
 }
Example #3
0
 protected void volleyOnHit(Projectile projectile, Creature target)
 {
     if(!data.PreviouslyHarmed(target))
     {
         target.takePhysicalDamage(damage, attacker.getFlatArmorPen(), attacker.getPercArmorPen());
         target.buffs.Add(frostShot.getFrostDebuff(target));
     }
 }
Example #4
0
 public VolleyProjectile(Game game, Creature attacker, FrostShot frostShot, float damage, float duration, AreaOfEffectTracker data)
     : base(game, attacker, null)
 {
     this.frostShot = frostShot;
     this.damage = damage;
     this.duration = TimeSpan.FromSeconds(duration);
     this.data = data;
     onHit = volleyOnHit;
 }
Example #5
0
 public Buff(Creature entity)
 {
     entity.buffs.Add(this);
     this.creature = entity;
     name = string.Empty;
     texture = null;
     debuff = false;
     duration = null;
     dispelable = true;
     modifiedStats = new List<ModifiedStat>();
 }
Example #6
0
 public static Entity.SpriteDirection GetTargetDirection(Creature creature)
 {
     float targetAngle = GetTargetAngle(creature);
         if (targetAngle < Math.PI / 2 && targetAngle > -Math.PI / 2)
             return Entity.SpriteDirection.Right;
         return Entity.SpriteDirection.Left;
 }
Example #7
0
 public static float GetTargetAngle(Creature creature)
 {
     return (float)Math.Atan2((double)(creature.target.DisplayPosition.Y - creature.DisplayPosition.Y), (double)(creature.target.DisplayPosition.X - creature.DisplayPosition.X));
 }
Example #8
0
 public void setTeam(Creature.Team team)
 {
     this.creature.team = team;
 }
 public EnchantedCrystalArrowProjectile(Game game, Creature attacker, float damage, float duration, OnHitProjectileDelegate onHit)
     : base(game, attacker, onHit)
 {
     this.damage = damage;
     this.duration = TimeSpan.FromSeconds(duration);
 }
Example #10
0
 protected void onHit(Projectile projectile, Creature target)
 {
     target.takePhysicalDamage(getDamage(), getFlatArmorPen(), getPercArmorPen());
 }
Example #11
0
 public void OnAttack(Creature target)
 {
     e.target = target;
      Attack(this, e);
 }
Example #12
0
 public Projectile(Game game, Creature attacker, OnHitProjectileDelegate onHit)
     : base(game)
 {
     this.attacker = attacker;
     this.onHit += onHit;
 }
Example #13
0
 public Buffs.Frost getFrostDebuff(Creature target)
 {
     return new Buffs.Frost(target, level);
 }