示例#1
0
        protected override bool PirateComes(Pirate pirate)
        {
            if (!Pirates.Contains(pirate))
            {
                KillFoesFor(steps[0], pirate);
            }
            steps[0].Add(pirate);

            return(true);
        }
示例#2
0
        public override void OnCreatureKilled(BaseCreature bc)
        {
            if (!(bc is ShadowguardPirate) || Pirates == null)
            {
                return;
            }

            if (Pirates.Contains(bc))
            {
                Pirates.Remove(bc);
            }

            if (Pirates.Count <= 0)
            {
                Wave++;
                Pirates.Clear();

                int toSpawn = Math.Max(3, PartySize() * 3);

                if (Wave < 4)
                {
                    for (int i = 0; i < toSpawn; i++)
                    {
                        SpawnRandomPirate();
                    }
                }
                else if (Wave == 4)
                {
                    var     pirate = new ShantyThePirate();
                    Point3D p      = SpawnPoints[Utility.Random(SpawnPoints.Length)];
                    ConvertOffset(ref p);
                    pirate.MoveToWorld(p, Map.TerMur);
                    Pirates.Add(pirate);
                }
                else
                {
                    CompleteEncounter();
                }
            }
        }