public void DoCure( Mobile from ) { bool cure = false; CureLevelInfo[] info = LevelInfo; for ( int i = 0; i < info.Length; ++i ) { CureLevelInfo li = info[i]; if ( li.Poison == from.Poison && Scale( from, li.Chance ) > Utility.RandomDouble() ) { cure = true; break; } } if ( cure && from.CurePoison( from ) ) { from.SendAsciiMessage( "You feel cured of poison!" ); // You feel cured of poison! from.FixedEffect( 0x373A, 10, 15 ); from.PlaySound( 0x1E0 ); } else if ( !cure ) { from.SendAsciiMessage( "That potion was not strong enough to cure your ailment!" ); // That potion was not strong enough to cure your ailment! } }
public void FizzleStrangely(Mobile m) { m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "The spell fizzles strangely.", m.NetState); m.FixedParticles(0x3779, 1, 46, 9502, 5, 3, EffectLayer.Waist); m.FixedEffect(0x3735, 6, 30); m.PlaySound(0x5C); }
public static void FinalEffect( Mobile target, int heal ) { target.PlaySound( 0x1F2 ); target.FixedEffect( 0x376A, 9, 32 ); target.Hits += heal; target.LocalOverheadMessage( MessageType.Regular, 170, false, "+" + heal ); }
public override void OnDoubleClick( Mobile from ) { if ( from.BeginAction( typeof( RejuvinationAddonComponent ) ) ) { from.FixedEffect( 0x373A, 1, 16 ); int random = Utility.Random( 1, 4 ); if ( random == 1 || random == 4 ) { from.Hits = from.HitsMax; SendLocalizedMessageTo( from, 500801 ); // A sense of warmth fills your body! } if ( random == 2 || random == 4 ) { from.Mana = from.ManaMax; SendLocalizedMessageTo( from, 500802 ); // A feeling of power surges through your veins! } if ( random == 3 || random == 4 ) { from.Stam = from.StamMax; SendLocalizedMessageTo( from, 500803 ); // You feel as though you've slept for days! } Timer.DelayCall( TimeSpan.FromHours( 2.0 ), new TimerStateCallback( ReleaseUseLock_Callback ), new object[]{ from, random } ); } }
public void DoCure(Mobile from, double scalar) { bool cure = false; CureLevelInfo[] info = LevelInfo; for (int i = 0; i < info.Length; ++i) { CureLevelInfo li = info[i]; if (li.Poison == from.Poison && Scale(from, li.Chance - (int)Math.Floor(li.Chance * scalar) + (IntensifiedStrength ? 0.1 : 0)) > Utility.RandomDouble()) { cure = true; break; } } if (cure && from.CurePoison(from)) { from.SendLocalizedMessage(500231); // You feel cured of poison! from.FixedEffect(0x373A, 10, 15); from.PlaySound(0x1E0); } else if (!cure) { from.SendLocalizedMessage(500232); // That potion was not strong enough to cure your ailment! } }
public override void OnHit( Mobile attacker, Mobile defender, int damage ) { if( !Validate( attacker ) || !CheckMana( attacker, true ) ) return; ClearCurrentAbility( attacker ); if( Server.Items.ParalyzingBlow.IsImmune( defender ) ) //After mana consumption intentional { attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis. defender.SendLocalizedMessage( 1070813 ); // You resist paralysis. return; } attacker.SendLocalizedMessage( 1063356 ); // You cripple your target with a nerve strike! defender.SendLocalizedMessage( 1063357 ); // Your attacker dealt a crippling nerve strike! attacker.PlaySound( 0x204 ); defender.FixedEffect( 0x376A, 9, 32 ); defender.FixedParticles( 0x37C4, 1, 8, 0x13AF, 0, 0, EffectLayer.Waist ); AOS.Damage( defender, attacker, (int)(15.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 10), 100, 0, 0, 0, 0 ); //10-25 defender.Freeze( TimeSpan.FromSeconds( 2.0 ) ); Server.Items.ParalyzingBlow.BeginImmunity( defender, Server.Items.ParalyzingBlow.FreezeDelayDuration ); }
public override void OnGaveMeleeAttack( Mobile defender ) { base.OnGaveMeleeAttack( defender ); if ( 0.1 > Utility.RandomDouble() && !IsStunned( defender ) ) { /* Lightning Fist * Cliloc: 1070839 * Effect: Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x37B9" ItemIdName: "glow" FromLocation: "(884 715, 10)" ToLocation: "(884 715, 10)" Speed: "10" Duration: "5" FixedDirection: "True" Explode: "False" * Damage: 35-65, 100% energy, resistable * Freezes for 4 seconds * Effect cannot stack */ defender.FixedEffect( 0x37B9, 10, 5 ); defender.SendLocalizedMessage( 1070839 ); // The creature attacks with stunning force! // This should be done in place of the normal attack damage. //AOS.Damage( defender, this, Utility.RandomMinMax( 35, 65 ), 0, 0, 0, 0, 100 ); defender.Frozen = true; ExpireTimer timer = new ExpireTimer( defender, TimeSpan.FromSeconds( 4.0 ) ); timer.Start(); m_Table[defender] = timer; } }
public void DoCure( Mobile from ) { bool cure = false; CureLevelInfo[] info = LevelInfo; for ( int i = 0; i < info.Length; ++i ) { CureLevelInfo li = info[i]; #region Mondain's Legacy mod if ( li.Poison.RealLevel == from.Poison.RealLevel && Scale( from, li.Chance ) > Utility.RandomDouble() ) { cure = true; break; } #endregion } if ( cure && from.CurePoison( from ) ) { from.SendLocalizedMessage( 500231 ); // You feel cured of poison! from.FixedEffect( 0x373A, 10, 15 ); from.PlaySound( 0x1E0 ); } else if ( !cure ) { from.SendLocalizedMessage( 500232 ); // That potion was not strong enough to cure your ailment! } }
public override int AbsorbDamage( Mobile attacker, Mobile defender, int damage ) { damage = base.AbsorbDamage( attacker, defender, damage ); int absorb = defender.MeleeDamageAbsorb; if ( absorb > 0 ) { if ( absorb > damage ) { int react = damage / 5; if ( react <= 0 ) react = 1; defender.MeleeDamageAbsorb -= damage; damage = 0; attacker.Damage( react, defender ); attacker.PlaySound( 0x1F1 ); attacker.FixedEffect( 0x374A, 10, 16 ); } else { defender.MeleeDamageAbsorb = 0; defender.SendLocalizedMessage( 1005556 ); // Your reactive armor spell has been nullified. DefensiveSpell.Nullify( defender ); } } return damage; }
public override void OnHit( Mobile attacker, Mobile defender, int damage ) { if ( !CheckMana( attacker, true ) ) return; ClearCurrentAbility( attacker ); IMount mount = defender.Mount; if ( mount != null && !(defender is ChaosDragoonElite) ) { defender.SendLocalizedMessage( 1062315 ); // You fall off your mount! defender.PlaySound( 0x140 ); defender.FixedParticles( 0x3728, 10, 15, 9955, EffectLayer.Waist ); mount.Rider = null; BaseMount.SetMountPrevention( defender, BlockMountType.Dazed, TimeSpan.FromSeconds( 10.0 ) ); if( Core.ML && attacker is BaseCreature && ((BaseCreature)attacker).ControlMaster != null ) BaseMount.SetMountPrevention( ((BaseCreature)attacker).ControlMaster, BlockMountType.DismountRecovery, TimeSpan.FromSeconds( 3.0 ) ); else BaseMount.SetMountPrevention( attacker, BlockMountType.DismountRecovery, TimeSpan.FromSeconds( 3.0 ) ); } else { //if ( WeaponAbility.ParalyzingBlow.IsImmune( defender ) ) //{ //attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis. //defender.SendLocalizedMessage( 1070813 ); // You resist paralysis. //} //else //{ defender.FixedEffect( 0x376A, 9, 32 ); defender.PlaySound( 0x204 ); attacker.SendLocalizedMessage( 1060163 ); // You deliver a paralyzing blow! defender.SendLocalizedMessage( 1060164 ); // The attack has temporarily paralyzed you! TimeSpan duration = defender.Player ? TimeSpan.FromSeconds( 3.0 ) : TimeSpan.FromSeconds( 6.0 ); defender.Paralyze( duration ); //WeaponAbility.ParalyzingBlow.BeginImmunity( defender, duration + TimeSpan.FromSeconds( 8.0 ) ); //} } int amount = 15; switch( Utility.Random( 5 ) ) { case 0: AOS.Damage( defender, attacker, amount, 100, 0, 0, 0, 0 ); break; case 1: AOS.Damage( defender, attacker, amount, 0, 100, 0, 0, 0 ); break; case 2: AOS.Damage( defender, attacker, amount, 0, 0, 100, 0, 0 ); break; case 3: AOS.Damage( defender, attacker, amount, 0, 0, 0, 100, 0 ); break; case 4: AOS.Damage( defender, attacker, amount, 0, 0, 0, 0, 100 ); break; } }
public override void OnHit( Mobile attacker, Mobile defender, int damage ) { if ( !Validate( attacker ) ) return; ClearCurrentAbility( attacker ); Map map = attacker.Map; if ( map == null ) return; BaseWeapon weapon = attacker.Weapon as BaseWeapon; if ( weapon == null ) return; if ( !CheckMana( attacker, true ) ) return; attacker.FixedEffect( 0x3728, 10, 15 ); attacker.PlaySound( 0x2A1 ); ArrayList list = new ArrayList(); foreach ( Mobile m in attacker.GetMobilesInRange( 1 ) ) list.Add( m ); Party p = Party.Get( attacker ); for ( int i = 0; i < list.Count; ++i ) { Mobile m = (Mobile)list[i]; if (m != defender && m != attacker && SpellHelper.ValidIndirectTarget(attacker, m) && attacker.CanBeHarmful(m, false) && (p == null || !p.Contains(m))) { if ( m == null || m.Deleted || attacker.Deleted || m.Map != attacker.Map || !m.Alive || !attacker.Alive || !attacker.CanSee( m ) ) continue; if ( !attacker.InRange( m, weapon.MaxRange ) ) continue; if ( attacker.InLOS( m ) ) { attacker.RevealingAction(); attacker.SendLocalizedMessage( 1060161 ); // The whirling attack strikes a target! m.SendLocalizedMessage( 1060162 ); // You are struck by the whirling attack and take damage! weapon.OnHit( attacker, m ); } } } }
//<**Magic**> // damage = amount before BaseCreature's AlterSpellDamage To/From alterations public static double SpellDamage( Mobile from, Mobile target, double damage ) { if ( ShellSpell.IsShelled( target ) ) { damage *= 0.5; target.FixedEffect( 0x3660 /*itemid*/, 1 /*speed*/, 15 /*duration*/, 1167 /*hue*/, 4 /*renderMode*/ ); } return damage; }
public override void OfferResurrection( Mobile m ) { Direction = GetDirectionTo( m ); m.PlaySound( 0x214 ); m.FixedEffect( 0x376A, 10, 16 ); m.CloseGump( typeof( ResurrectGump ) ); m.SendGump( new ResurrectGump( m, this, m_Price ) ); }
public virtual void HealCountryman( Mobile m ) { Direction = GetDirectionTo( m ); m.PlaySound( 0x1F2 ); m.FixedEffect( 0x376A, 9, 32 ); this.Animate( 17, 5, 1, true, false, 0 ); this.Mana -= 10; m.Hits += 10; }
public virtual void OfferResurrection( Mobile m ) { Direction = GetDirectionTo( m ); Say("An Corp"); m.PlaySound(0x1F2); m.FixedEffect( 0x376A, 10, 16 ); m.CloseGump( typeof( ResurrectGump ) ); m.SendGump( new ResurrectGump( m, ResurrectMessage.Healer ) ); }
public override int AbsorbDamageAOS( Mobile attacker, Mobile defender, int damage ) { if( attacker.Guild != null && defender.Guild != null ) { if( attacker.Guild == defender.Guild ) { defender.FixedEffect( 0x37B9, 10, 16 ); damage = (int)(damage * 0.2); } else damage = (int)(damage * 1.2); } return damage; }
public bool DoStrength( Mobile from ) { if ( Spells.SpellHelper.AddStatOffset( from, StatType.Str, Scale( from, StrOffset ), Scale( from, Duration ) ) ) { from.FixedEffect( 0x375A, 10, 15 ); from.PlaySound( 0x1E7 ); return true; } from.SendLocalizedMessage( 502173 ); // You are already under a similar effect. return false; }
public override void OfferResurrection( Mobile m ) { Direction = GetDirectionTo( m ); m.PlaySound( 0x214 ); m.FixedEffect( 0x376A, 10, 16 ); //m.CloseGump( typeof( ResurrectGump ) ); //m.SendGump( new ResurrectGump( m, this, m_Price ) ); if ( m.NetState != null ) new ResurrectMenu(m, this, ResurrectMessage.Healer).SendTo(m.NetState); }
public override bool Use( Mobile from ) { if ( Faction.ClearSkillLoss( from ) ) { from.LocalOverheadMessage( Server.Network.MessageType.Regular, 2219, false, "The gem shatters as you invoke its power." ); from.PlaySound( 909 ); from.FixedEffect( 0x373A, 10, 30 ); from.PlaySound( 0x209 ); return true; } return false; }
public bool DoStrength( Mobile from ) { //Plume : Addiction if (from is PlayerMobile) { PlayerMobile drinker = from as PlayerMobile; double CurrentAddiction = drinker.CalculateStrengthAddiction(this)[0]; double GlobalAddiction = drinker.CalculateStrengthAddiction(this)[1]; int StrScalar = (int)Math.Floor(Math.Sqrt(CurrentAddiction)); double DurationScalar = GlobalAddiction * 0.95; if (GlobalAddiction > 100) { drinker.SendMessage("Votre corps ne supporte plus ce traitement"); drinker.Str--; this.Consume(); return false; } if (Spells.SpellHelper.AddStatOffset(from, StatType.Str, Scale(from, StrOffset - Math.Min(StrOffset, StrScalar)), Duration - TimeSpan.FromSeconds(DurationScalar))) { from.FixedEffect(0x375A, 10, 15); from.PlaySound(0x1E7); return true; } drinker.IncAddiction(this); } if (Spells.SpellHelper.AddStatOffset(from, StatType.Dex, Scale(from, StrOffset), Duration)) { from.FixedEffect(0x375A, 10, 15); from.PlaySound(0x1E7); return true; } from.SendLocalizedMessage( 502173 ); // You are already under a similar effect. return false; }
public bool DoStrength( Mobile from ) { // TODO: Verify scaled; is it offset, duration, or both? if ( Spells.SpellHelper.AddStatOffset( from, StatType.Str, Scale( from, StrOffset ), Duration ) ) { from.FixedEffect( 0x375A, 10, 15 ); from.PlaySound( 0x1E7 ); return true; } from.SendAsciiMessage("You are already under a similar effect."); // You are already under a similar effect. return false; }
public bool DoAgility( Mobile from ) { // TODO: Verify scaled; is it offset, duration, or both? if ( Spells.SpellHelper.AddStatOffset( from, StatType.Dex, Scale( from, DexOffset ), Duration ) ) { from.FixedEffect( 0x375A, 10, 15 ); from.PlaySound( 0x1E7 ); return true; } from.SendLocalizedMessage( 502173 ); // You are already under a similar effect. return false; }
public virtual void OfferResurrection( Mobile m ) { Direction = GetDirectionTo( m ); m.PlaySound( 0x1F2 ); m.FixedEffect( 0x376A, 10, 16 ); m.CloseGump( typeof( ResurrectGump ) ); //PlayerMobile pres = m as PlayerMobile; /*if (pres.MurderBounty > 0) m.SendGump( new ResurrectGump( m, this, pres.MurderBounty ) ); //removed for bounty system removal else*/ m.SendGump( new ResurrectGump( m, this) ); }
public override bool OnMoveOver( Mobile m ) { if ( m is Navrey ) return true; if ( AccessLevel.Player == m.AccessLevel ) { m.Paralyze( duration ); m.PlaySound( 0x204 ); m.FixedEffect( 0x376A, 10, 16 ); } return true; }
public override void OnDoubleClick( Mobile from ) { if ( !from.InRange( GetWorldLocation(), 2 ) ) from.SendLocalizedMessage( 500446 ); else { from.SendMessage( 0x35, "Quad Damage Activated!"); from.SolidHueOverride = 1150; //from.Emote( String.Format( "* {0} HAS QUAD DAMAGE *", from.Name ) ); Consume(); from.FixedEffect( 0x3728, 10, 15 ); from.PlaySound( 1002 ); AddMods( from ); new CountdownTimer( from, m_SkillMod0, m_SkillMod1 ).Start(); } }
public virtual bool Validate( Mobile m ) { if ( m == null || !m.Player || m.AccessLevel != AccessLevel.Player || Core.AOS ) return true; Guild g = m.Guild as Guild; if ( g == null || g.Type != GuildType.Chaos ) { m.FixedEffect( 0x3728, 10, 13 ); Delete(); return false; } return true; }
public override void OnHit( Mobile attacker, Mobile defender, int damage ) { if ( !Validate( attacker ) || !CheckMana( attacker, true ) ) return; ClearCurrentMove( attacker ); attacker.SendLocalizedMessage( 1060078 ); // You strike and hide in the shadows! defender.SendLocalizedMessage( 1060079 ); // You are dazed by the attack and your attacker vanishes! Effects.SendLocationParticles( EffectItem.Create( attacker.Location, attacker.Map, EffectItem.DefaultDuration ), 0x376A, 8, 12, 9943 ); attacker.PlaySound( 0x482 ); defender.FixedEffect( 0x37BE, 20, 25 ); attacker.Combatant = null; attacker.Warmode = false; attacker.Hidden = true; }
public override void OnHit(Mobile attacker, Mobile defender, int damage) { if (!Validate(attacker) || !CheckMana(attacker, true)) return; ClearCurrentAbility(attacker); bool cantpara = Server.Items.ParalyzingBlow.IsImmune(defender); if (cantpara) { attacker.SendLocalizedMessage(1070804); // Your target resists paralysis. defender.SendLocalizedMessage(1070813); // You resist paralysis. } else { attacker.SendLocalizedMessage(1063356); // You cripple your target with a nerve strike! defender.SendLocalizedMessage(1063357); // Your attacker dealt a crippling nerve strike! } attacker.PlaySound(0x204); defender.FixedEffect(0x376A, 9, 32); defender.FixedParticles(0x37C4, 1, 8, 0x13AF, 0, 0, EffectLayer.Waist); if (Core.ML) { AOS.Damage(defender, attacker, (int)(15.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + Utility.Random(10)), true, 100, 0, 0, 0, 0); //0-25 if (!cantpara && ((150.0 / 7.0 + (4.0 * attacker.Skills[SkillName.Bushido].Value) / 7.0) / 100.0) > Utility.RandomDouble()) { defender.Paralyze(TimeSpan.FromSeconds(2.0)); Server.Items.ParalyzingBlow.BeginImmunity(defender, Server.Items.ParalyzingBlow.FreezeDelayDuration); } } else if (!cantpara) { AOS.Damage(defender, attacker, (int)(15.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 10), true, 100, 0, 0, 0, 0); //10-25 defender.Freeze(TimeSpan.FromSeconds(2.0)); Server.Items.ParalyzingBlow.BeginImmunity(defender, Server.Items.ParalyzingBlow.FreezeDelayDuration); } }
public override void OnMovement(Mobile from, Point3D oldLocation) { if (!from.Alive && (from is PlayerMobile)) { if (!from.Frozen && (DateTime.UtcNow >= m_NextResurrect) && InRange(from, 4) && !InRange(oldLocation, 4) && InLOS(from)) { m_NextResurrect = DateTime.UtcNow + ResurrectDelay; if (!from.Criminal && (from.Kills < 5) && (from.Karma > 0)) { if (from.Map != null && from.Map.CanFit(from.Location, 16, false, false)) { Direction = GetDirectionTo(from); from.PlaySound(0x1F2); from.FixedEffect(0x376A, 10, 16); from.CloseGump(typeof(ResurrectGump)); from.SendGump(new ResurrectGump(from, ResurrectMessage.Healer)); } } } } }
public override int AbsorbDamage( Mobile attacker, Mobile defender, int damage ) { damage = base.AbsorbDamage( attacker, defender, damage ); if ( defender.MeleeDamageAbsorb > 0 && attacker.GetDistanceToSqrt( defender ) <= 1 ) { double absorb = (double)(damage * defender.MeleeDamageAbsorb) / 100.0; if ( absorb > damage ) absorb = damage; attacker.PlaySound( 0x1F1 ); attacker.FixedEffect( 0x374A, 10, 16 ); if ( absorb >= 1 ) { attacker.Damage( ((int)absorb + 1) / 2 ); // since damage is havled before its applied... halve it here too damage -= (int)absorb; } } return damage; }