Beispiel #1
0
 public override IEnumerator Apply(EntityPlayer player, EntityAlive target, OptionEffect opt)
 {
     Zombiome.Routines.Start(Particles._Next(player), "Gravity-Particle");
     Printer.Log(40, "Gravity() AddBuff", target);
     target.Buffs.AddBuff(this.opt.OptionEntity.buff); // avant c'était juste player
     player.Buffs.AddBuff(this.opt.OptionEntity.buff); // easier debug
     yield break;
 }
Beispiel #2
0
        public override IEnumerator Apply(EntityPlayer player, EntityAlive target, OptionEffect opt)
        {
            Zombiome.Routines.Start(Particles._Next(player), "Jumping-Particles");
            // EntityMover mover = new EntityMover(2, 0.2f, 1); // randomize
            SdtdUtils.EffectsItem.SpawnParticle(target.GetPosition(), "treeGib_birch_small", biome.groundColor);
            int         len   = 5 + (int)(this.rand.RandomFloat * 5);
            EntityMover mover = new EntityMover(len, 0.5f, 1); // tres bien : petit saut

            mover.Apply(target, Vectors.Float.UnitY);
            yield break;
        }
Beispiel #3
0
 public override IEnumerator Apply(EntityPlayer player, EntityAlive target, OptionEffect opt)
 {
     Zombiome.Routines.Start(Particles._Next(player), "RandomSize-Particles");
     if (target is EntityZombie || target is EntityAnimal)
     {
         if (!target.IsDead())
         {
             SdtdUtils.EffectsItem.SpawnParticle(target.GetPosition(), "wire_tool_sparks",
                                                 biome.groundColor, "electric_fence_impact");
             int index = rand.RandomRange(buffs.Length);
             // target.Buffs.AddBuff(buffs[index]);
             // rm others, otherwise they would set back scaling=1 when gone but the neew buff still runs
             for (int k = 0; k < buffs.Length; k++)
             {
                 if (k != index && target.Buffs.HasBuff(buffs[k]))
                 {
                     target.Buffs.RemoveBuff(buffs[k]);
                 }
             }
             target.Buffs.AddBuff(buffs[index]);
         }
     }
     yield break;
 }