Ejemplo n.º 1
0
        //Constructors
        #region constructors


        public ChampEngine() : base(0xBD2)
        {
            // default constructor
            // assgin initial values..
            Visible        = false;
            Movable        = false;
            m_ExpireTime   = DateTime.Now;
            m_SpawnTime    = DateTime.Now;
            m_RestartDelay = TimeSpan.FromMinutes(5);
            m_Monsters     = new ArrayList();
            m_FreeMonsters = new ArrayList();
            SpawnLevels    = new ArrayList();
            m_bRestart     = false;

            //load default spawn just so there's no nulls on the [props
            SpawnLevels = ChampLevelData.CreateSpawn(ChampLevelData.SpawnTypes.Abyss);
        }
Ejemplo n.º 2
0
			public ChampLevelData.SpawnTypes ChampType;	// spawn type this relates to

			//public SummonReq(){}			
			public SummonReq( Type item, int amnt, ChampLevelData.SpawnTypes cst )
			{
				//Assign properties
				ItemType = item;
				Amount = amnt;
				ChampType = cst;
			}			
Ejemplo n.º 3
0
			public SummonTimer( Item sacrifice, ChampLevelData.SpawnTypes cst, ChampSummon cs, bool gfx ) : base(TimeSpan.FromSeconds(3))
			{
				Sacrifice = sacrifice; ChampType = cst; Champ = cs; bGraphics = gfx;						
				Start();
			}
Ejemplo n.º 4
0
		//Plasma :  This code is called from OnSpeech() and is repsonsible for
		//finding a viable sacirifce and if so to start the summoning
		protected void SummonStart(ChampLevelData.SpawnTypes ChampType)
		{
			//now check the floor for the appropriate sacrifice
			SummonReq Req = null;
			ArrayList Reqs = new ArrayList();			

			//Check through requirements array and add all for this type of spawn
			for( int i = 0; i < m_SummonReqs.GetLength(0); ++i )
				if( m_SummonReqs[i].ChampType == ChampType )
					Reqs.Add( m_SummonReqs[i] );

			//Now search the floor for appropriate sacrifice(s)
			if( Reqs.Count > 0 )
			{						
				//pla: 08/26 changed range to 1
				IPooledEnumerable eable = m_Speaker.GetItemsInRange(1);
				foreach( Item item in eable)
				{
					for( int count = 0; count < Reqs.Count; ++count )
					{
						Req = ((SummonReq)Reqs[count]);						
						if( item.GetType().IsAssignableFrom( Req.ItemType ) && item.Amount >= Req.Amount /*  || item.GetType().IsSubclassOf( Req.ItemType ) */ )
						{							
							//Found sacrifice, make it non-movable whilst the summon is in progress
							item.Movable=false;
							m_SummonTimer = null;
							//Start summon timer
							m_Summoning = true;
							m_SummonTimer = new SummonTimer( item, Req.ChampType, this, m_bGraphics );
							eable.Free();
							return;
						}
					}							
				}						
				eable.Free();
			}
			this.PublicOverheadMessage( 0, 0x3B2, false, "The Champion does not see a worthy sacrifice");				
		}