public Vorrax(SceneGame world) : base(world) { Name = "Vorrax"; Description = "Hungry hungry sea demon"; Render = new CreatureDirectionalRender() { Sprite = SpriteLoader.Instance.AddSprite("content/fish"), Color = ColorMatrix.TwoColorLight(Color.Black, new Color(255, 160, 64)) }; Mask.Add(Point.Zero); Effect.ApplyInnate(new EffectStat(this, Stat.HP, 30)); Effect.ApplyInnate(new EffectStat(this, Stat.Attack, 80)); Effect.ApplyInnate(new EffectFamily(this, Family.Fish)); Effect.ApplyInnate(new EffectMovementType(this, MovementType.WaterOnly, 10)); Skills.Add(new SkillAttack()); Skills.Add(new SkillVenomSpit()); Skills.Add(new SkillDevour()); Skills.Add(new SkillRegurgitate()); Skills.Add(new SkillDive()); }
public override void Activate(Creature creature) { var particle = SpriteLoader.Instance.AddSprite("content/rock"); var cloak = new Cloak(creature, 10); cloak.OnUpdate += (c) => { float size = 0.15f + 0.15f * Random.NextFloat(); size *= (float)LerpHelper.CircularOut(1, 0.5, c.Frame.GetSubSlide(10, c.Frame.EndTime)); if (c.Frame.Time % 1 == 0) { var pos = c.Creature.VisualTarget; int totaltime = 5 + Random.Next(10); float bigSize = 1.5f + Random.NextFloat(); Color color = new Color(64, 128, 255); new ParticleCutter(World, totaltime + Random.Next(4)) { Sprite = SpriteLoader.Instance.AddSprite("content/cutter"), FadeSlide = 0.75f, Position = pos, Angle = Random.NextAngle(), RotationStart = -MathHelper.TwoPi / totaltime, RotationEnd = -(MathHelper.TwoPi / totaltime) * 0.5f, AngleLerp = LerpHelper.Linear, Scale = size, ScaleEnd = size * bigSize, ScaleLerp = LerpHelper.CircularOut, Color = color, Pass = DrawPass.EffectAdditive, }; } if (c.Frame.Time % 2 == 0) { for (int i = 0; i < 3; i++) { float angle = Random.NextFloat() * MathHelper.TwoPi; float distance = 12 + Random.NextFloat() * 12; int time = Random.Next(10) + 10; var iceParticle = new ParticleThrow(World, particle, creature.VisualTarget + Util.AngleToVector(angle) * 4, creature.VisualTarget + Util.AngleToVector(angle) * distance, 4 + Random.NextFloat() * 8, LerpHelper.Linear, LerpHelper.QuadraticOut, time, 0.7f) { SubImage = Random.Next(particle.SubImageCount), Angle = Random.NextAngle(), ColorMatrix = ColorMatrix.TwoColorLight(Color.Blue, Color.White), Pass = DrawPass.EffectAdditive, }; } } }; }
public override void Activate(Creature creature) { var particle = SpriteLoader.Instance.AddSprite("content/rock"); for (int i = 0; i < 12; i++) { float angle = Random.NextFloat() * MathHelper.TwoPi; float distance = 4 + Random.NextFloat() * 12; int time = Random.Next(10) + 10; var iceParticle = new ParticleThrow(World, particle, creature.VisualTarget + Util.AngleToVector(angle) * 2, creature.VisualTarget + Util.AngleToVector(angle) * distance, 4 + Random.NextFloat() * 8, LerpHelper.Linear, LerpHelper.QuadraticOut, time, 0.7f) { SubImage = Random.Next(particle.SubImageCount), Angle = Random.NextAngle(), ColorMatrix = ColorMatrix.TwoColorLight(Color.Blue, Color.White), Pass = DrawPass.EffectAdditive, }; } creature.FlashHelper.AddFlash(ColorMatrix.Flat(Color.White), LerpHelper.QuadraticOut, 5); creature.FlashHelper.AddFlash(ColorMatrix.TwoColorLight(Color.SkyBlue, Color.White), 10); }
public override void Activate(Creature creature) { var fire_big = SpriteLoader.Instance.AddSprite("content/fire_big"); var fire_small = SpriteLoader.Instance.AddSprite("content/fire_small"); var explosion = new ParticleExplosion(World, fire_big, Vector2.Zero, LerpHelper.Linear, LerpHelper.Linear, 20) { Position = creature.VisualTarget, }; explosion.OnUpdate += (particle) => { if (particle.Frame.Time > 5 && particle.Frame.Time % 3 == 0) { var flame = new ParticleExplosion(World, fire_small, Vector2.Zero, LerpHelper.Linear, LerpHelper.Linear, 6) { Position = creature.VisualPosition() + creature.Mask.GetRandomPixel(Random), }; } }; creature.FlashHelper.AddFlash(ColorMatrix.TwoColorLight(Color.OrangeRed, Color.Orange), LerpHelper.QuadraticOut, 40); }
public override void Activate(Creature creature) { var blob_water = SpriteLoader.Instance.AddSprite("content/pop_blob_water"); var particle_water = SpriteLoader.Instance.AddSprite("content/bullet_water"); var particle_ice = SpriteLoader.Instance.AddSprite("content/rock"); var explosion = new ParticleExplosion(World, blob_water, Vector2.Zero, LerpHelper.Linear, LerpHelper.Linear, 10) { Position = creature.VisualTarget, Pass = DrawPass.EffectAdditive, }; for (int i = 0; i < 6; i++) { float angle = Random.NextFloat() * MathHelper.TwoPi; float distance = 4 + Random.NextFloat() * 12; int time = Random.Next(10) + 10; var waterParticle = new ParticleThrow(World, particle_water, creature.VisualTarget, creature.VisualTarget + Util.AngleToVector(angle) * distance, 4 + Random.NextFloat() * 8, LerpHelper.Linear, LerpHelper.QuadraticOut, time, 0.7f) { Scale = Random.NextFloat() * 0.75f + 0.25f, Pass = DrawPass.EffectAdditive, }; } for (int i = 0; i < 12; i++) { float angle = Random.NextFloat() * MathHelper.TwoPi; float distance = 4 + Random.NextFloat() * 12; int time = Random.Next(10) + 10; var iceParticle = new ParticleThrow(World, particle_ice, creature.VisualTarget + Util.AngleToVector(angle) * 2, creature.VisualTarget + Util.AngleToVector(angle) * distance, 4 + Random.NextFloat() * 8, LerpHelper.Linear, LerpHelper.QuadraticOut, time, 0.7f) { SubImage = Random.Next(particle_ice.SubImageCount), Angle = Random.NextAngle(), ColorMatrix = ColorMatrix.TwoColorLight(Color.Blue, Color.White), Pass = DrawPass.EffectAdditive, }; } }