Exemplo n.º 1
0
 public InternalTarget(ClumsySpell owner)
     : base(12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
 }
Exemplo n.º 2
0
 public InternalTarget(ClumsySpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.Harmful)
 {
     this.m_Owner = owner;
 }
Exemplo n.º 3
0
 public InternalSphereTarget(ClumsySpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
     m_Owner.Caster.SendAsciiMessage("Selecione o alvo...");
 }
Exemplo n.º 4
0
        public virtual Spell DoCombo(Mobile c)
        {
            Spell spell = null;

            if (m_Combo == 0)
            {
                spell = new ExplosionSpell(m_Mobile, null);
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 1)
            {
                spell = new WeakenSpell(m_Mobile, null);
                ++m_Combo; // Move to next spell
            }
            else if (m_Combo == 2)
            {
                if (!c.Poisoned)
                    spell = new PoisonSpell(m_Mobile, null);
                else if (IsNecromancer)
                    spell = new StrangleSpell(m_Mobile, null);

                ++m_Combo; // Move to next spell
            }

            if (m_Combo == 3 && spell == null)
            {
                switch (Utility.Random(IsNecromancer ? 4 : 3))
                {
                    case 0:
                        {
                            if (c.Int < c.Dex)
                                spell = new FeeblemindSpell(m_Mobile, null);
                            else
                                spell = new ClumsySpell(m_Mobile, null);

                            ++m_Combo; // Move to next spell

                            break;
                        }
                    case 1:
                        {
                            spell = new EnergyBoltSpell(m_Mobile, null);
                            m_Combo = -1; // Reset combo state
                            break;
                        }
                    case 2:
                        {
                            spell = new FlameStrikeSpell(m_Mobile, null);
                            m_Combo = -1; // Reset combo state
                            break;
                        }
                    default:
                        {
                            spell = new PainSpikeSpell(m_Mobile, null);
                            m_Combo = -1; // Reset combo state
                            break;
                        }
                }
            }
            else if (m_Combo == 4 && spell == null)
            {
                spell = new MindBlastSpell(m_Mobile, null);
                m_Combo = -1;
            }

            return spell;
        }
Exemplo n.º 5
0
 public InternalTarget(ClumsySpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.Harmful)
 {
     this.m_Owner = owner;
 }
Exemplo n.º 6
0
		public Spell CheckCurse()
		{
			Mobile foe = m_Mobile.Combatant;

			if ( foe == null )
				return null;

			StatMod mod = foe.GetStatMod( "[Magic] Int Offset" );

			if ( mod != null && mod.Offset < 0 )
				return null;

			if ( m_Mobile.Skills[SkillName.Magery].Value >= 40.0 )
				return new CurseSpell( m_Mobile, null );

			int whichone = 1;
			Spell spell = null;

			if ( (mod = foe.GetStatMod( "[Magic] Str Offset" )) != null )
				whichone++;

			if ( (mod= m_Mobile.GetStatMod( "[Magic] Dex Offset" )) != null )
				whichone++;

			switch ( whichone )
			{
				case 1: spell = new FeeblemindSpell( m_Mobile, null ); break;
				case 2: spell = new WeakenSpell( m_Mobile, null ); break;
				case 3: spell = new ClumsySpell( m_Mobile, null ); break;
			}

			return spell;
		}
Exemplo n.º 7
0
 public InternalSphereTarget(ClumsySpell owner)
     : base(Core.ML ? 10 : 12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
     m_Owner.Caster.SendAsciiMessage("Selecione o alvo...");
 }
Exemplo n.º 8
0
 public InternalTarget( ClumsySpell owner )
     : base(12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
 }
Exemplo n.º 9
0
 public InternalTarget(ClumsySpell owner)
     : base(owner.Caster.EraML ? 10 : 12, false, TargetFlags.Harmful)
 {
     m_Owner = owner;
 }
Exemplo n.º 10
0
		public bool ApplyStatEffect(PlayerMobile Wearer, bool bStr, bool bDex, bool bInt, int change)
		{
			Spell spell = null;
		
			if( Wearer == null )
				return false;

			// Try to apply bless to all stats
			int BlessOffset = change;
			bool AppliedStr = false;
			bool AppliedInt = false;
			bool AppliedDex = false;
			if( bStr )
			{
				if(BlessOffset > 0)
				{
					spell = new StrengthSpell(Wearer, null);
				}
				else
					spell = new WeakenSpell(Wearer, null);

				if (Wearer.Region.OnBeginSpellCast( Wearer, spell ) == false)
				{
					Wearer.SendMessage("The magic normally within this object seems absent.");
					return false;
				}	

				AppliedStr = AddStatBonus(Wearer, BlessOffset, StatType.Str, TimeSpan.Zero);
			}
			if( bInt )
			{
				if(BlessOffset > 0)
				{
					spell = new CunningSpell(Wearer, null);
				}
				else
					spell = new FeeblemindSpell(Wearer, null);

				if (Wearer.Region.OnBeginSpellCast( Wearer, spell ) == false)
				{
					Wearer.SendMessage("The magic normally within this object seems absent.");
					return false;
				}	
				AppliedInt = AddStatBonus(Wearer, BlessOffset, StatType.Int, TimeSpan.Zero);
			}
		
			if( bDex )
			{
				if(BlessOffset > 0)
				{
					spell = new AgilitySpell(Wearer, null);
				}
				else
					spell = new ClumsySpell(Wearer, null);

				if (Wearer.Region.OnBeginSpellCast( Wearer, spell ) == false)
				{
					Wearer.SendMessage("The magic normally within this object seems absent.");
					return false;
				}	
				AppliedDex = AddStatBonus(Wearer, BlessOffset, StatType.Dex, TimeSpan.Zero);
			}
			Wearer.CheckStatTimers();
			// If any stats were adjusted, start timer to remove the stats after effect expires
			// return that spell was successful
			if (AppliedStr || AppliedInt || AppliedDex) /* 7/25/04 smerX */
			{
				if( m_StatEffectTimer != null )
				{
					m_StatEffectTimer.Stop();
					m_StatEffectTimer = null;
				}

				m_StatEffectTimer = new MagicEffectTimer(Wearer, this, TimeSpan.FromSeconds(120));

				m_StatEffectTimer.Start();
				return true;
			}
			else
			{
				return false;
			}
		}
Exemplo n.º 11
0
		public virtual Spell DoCombo( Mobile c )
		{
			Spell spell = null;

			if ( m_Combo == 0 )
			{
				spell = new ExplosionSpell( m_Mobile, null );
				++m_Combo; // Move to next spell
			}
			else if ( m_Combo == 1 )
			{
				spell = new WeakenSpell( m_Mobile, null );
				++m_Combo; // Move to next spell
			}
			else if ( m_Combo == 2 )
			{
				if ( !( ( m_Mobile is IEvoCreature || m_Mobile is EvolutionDragon ) && c is PlayerMobile ) && !c.Poisoned )
					spell = new PoisonSpell( m_Mobile, null );

				++m_Combo; // Move to next spell
			}

			if ( m_Combo == 3 && spell == null )
			{
				switch ( Utility.Random( 3 ) )
				{
					default:
					case 0:
					{
						if ( c.Int < c.Dex )
							spell = new FeeblemindSpell( m_Mobile, null );
						else
							spell = new ClumsySpell( m_Mobile, null );

						++m_Combo; // Move to next spell

						break;
					}
					case 1:
					{
						spell = new EnergyBoltSpell( m_Mobile, null );
						m_Combo = -1; // Reset combo state
						break;
					}
					case 2:
					{
						spell = new FlameStrikeSpell( m_Mobile, null );
						m_Combo = -1; // Reset combo state
						break;
					}
				}
			}
			else if ( m_Combo == 4 && spell == null )
			{
				spell = new MindBlastSpell( m_Mobile, null );
				m_Combo = -1;
			}

			return spell;
		}
Exemplo n.º 12
0
		public void ChargedAbilityAttack( Mobile attacker, Mobile defender )
		{
			if ( m_AbilityCharges <= 0 )
				return;

			AbilitySpell m_Spell = null;
			Mobile dummy = DummyCaster;

			switch ( m_ChargedAbility )
			{
				case WeaponChargedAbility.Clumsiness: m_Spell = new ClumsySpell( dummy, null ); break;
				case WeaponChargedAbility.Feeblemindedness: m_Spell = new FeeblemindSpell( dummy, null ); break;
				case WeaponChargedAbility.Weakness: m_Spell = new WeakenSpell( dummy, null ); break;
				case WeaponChargedAbility.Burning : m_Spell = new MagicArrowSpell( dummy, null ); break;
				case WeaponChargedAbility.Wounding: m_Spell = new HarmSpell( dummy, null ); break;
				case WeaponChargedAbility.DragonsBreath:
				case WeaponChargedAbility.DaemonsBreath: m_Spell = new FireballSpell( dummy, null ); break;
				case WeaponChargedAbility.Thunder: m_Spell = new LightningSpell( dummy, null ); break;
				case WeaponChargedAbility.MagesBane: m_Spell = new ManaDrainSpell( dummy, null ); break;
				case WeaponChargedAbility.GhoulsTouch: m_Spell = new ParalyzeSpell( dummy, null ); break;
				case WeaponChargedAbility.Evil: m_Spell = new CurseSpell( dummy, null ); break;
			}

			if ( m_Spell != null )
			{
				m_Spell.OnHit( attacker, defender );
				m_AbilityCharges--;
			}

			dummy.Delete();
		}
Exemplo n.º 13
0
			public InternalTarget(ClumsySpell owner)
				: base(owner.Caster.EraML ? 10 : 12, false, TargetFlags.Harmful)
			{
				m_Owner = owner;
			}