本文整理汇总了C#中Server.Mobile.FixedEffect方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.FixedEffect方法的具体用法?C# Mobile.FixedEffect怎么用?C# Mobile.FixedEffect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.FixedEffect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoCure
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!
}
}
示例2: FizzleStrangely
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);
}
示例3: FinalEffect
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 );
}
示例4: OnDoubleClick
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 } );
}
}
示例5: DoCure
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!
}
}
示例6: OnHit
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 );
}
示例7: OnGaveMeleeAttack
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;
}
}
示例8: DoCure
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!
}
}
示例9: AbsorbDamage
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;
}
示例10: OnHit
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;
}
}
示例11: OnHit
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 );
}
}
}
}
示例12: SpellDamage
//<**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;
}
示例13: OfferResurrection
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 ) );
}
示例14: HealCountryman
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;
}
示例15: OfferResurrection
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 ) );
}