コード例 #1
0
ファイル: GiftOfLife.cs プロジェクト: jaryn-kubik/RazorEx
 private static void BuffIcons_Added(BuffIcon buffID, BuffInfo buff)
 {
     if (buffID == BuffIcon.GiftOfLife && buff.Duration > 15)
     {
         if (timer != null)
             timer.Stop();
         timer = Timer.DelayedCallback(TimeSpan.FromSeconds(buff.Duration - 15), OnTimer);
         timer.Start();
     }
 }
コード例 #2
0
ファイル: GUICombatMain.cs プロジェクト: floatyears/Decrypt
 public void OnBuffAddEvent(int slot, int serialID, BuffInfo info, float duration, int stackCount)
 {
     if (0 <= slot && slot < 5)
     {
         this.mHeroSummonLayer.OnBuffAddEvent(slot, serialID, info, duration, stackCount);
     }
     else if (5 <= slot && slot < 10)
     {
         this.mCombatMainPvp4TargetInfo.OnBuffAddEvent(slot - 5, serialID, info, duration, stackCount);
     }
 }
コード例 #3
0
ファイル: BloodOath.cs プロジェクト: jaryn-kubik/RazorEx
 private static void BuffIcons_Added(BuffIcon buffId, BuffInfo info)
 {
     if (buffId == BuffIcon.BloodOathCurse)
     {
         Mobile mobile = World.FindMobile(lastSerial);
         if (mobile == null)
             return;
         lastOath = lastSerial;
         if (Utility.Distance(mobile.Position, World.Player.Position) < 2)
         {
             WorldEx.SendToServer(new SetWarMode(true));
             WorldEx.SendToServer(new SetWarMode(false));
             WorldEx.OverHeadMessage("!Blood Oath!", 0x0017);
         }
     }
 }
コード例 #4
0
 public void OnBuffAddEvent(int slot, int serialID, BuffInfo info, float duration, int stackCount)
 {
     if (slot < 0)
     {
         slot = 5;
     }
     if (slot >= 6)
     {
         return;
     }
     if (string.IsNullOrEmpty(info.Icon))
     {
         return;
     }
     GameObject gameObject = null;
     if (!this.actorUIInfos[slot].BuffIcons.TryGetValue(serialID, out gameObject))
     {
         this.actorUIInfos[slot].OriginalBuffItem.SetActive(true);
         gameObject = Tools.AddChild(this.actorUIInfos[slot].BuffGrid.gameObject, this.actorUIInfos[slot].OriginalBuffItem);
         this.actorUIInfos[slot].OriginalBuffItem.SetActive(false);
         UISprite component = gameObject.transform.Find("buffImage").GetComponent<UISprite>();
         component.spriteName = info.Icon;
         UISprite component2 = component.gameObject.transform.Find("buffCD").GetComponent<UISprite>();
         if (info.MaxDuration <= 0f)
         {
             component2.fillAmount = 0f;
         }
         else
         {
             component2.gameObject.AddComponent<GameUIAutoCoolTimer>().PlayCool(component2, info.MaxDuration - duration, info.MaxDuration);
         }
         this.actorUIInfos[slot].BuffIcons.Add(serialID, gameObject);
         this.actorUIInfos[slot].BuffGrid.repositionNow = true;
     }
     else
     {
         Transform transform = gameObject.transform.Find("buffImage/buffCD");
         if (transform != null)
         {
             GameUIAutoCoolTimer component3 = transform.GetComponent<GameUIAutoCoolTimer>();
             if (component3 != null)
             {
                 component3.PlayCool(transform.GetComponent<UISprite>(), info.MaxDuration - duration, info.MaxDuration);
             }
         }
     }
 }
コード例 #5
0
ファイル: BuffCoverPolicy.cs プロジェクト: wuxin0602/Nothing
		internal override BattleFighterBuff optionBuffByType(BattleBuffManager manager, BuffInfo info)
		{
			IBuffAction _action = info.BuffAction;
			BuffTypeHolder _holder = manager.getBuffTypeHolder(_action);
			BattleFighterBuff _buff = _holder.getBuff(_action.TypeB);
			BattleFighterBuff _resultBuff = null;
			IBuffAction _hadBuffAction = _buff.BuffAction;
			if (_action.priority() > _hadBuffAction.priority())
			{
				_resultBuff = replaceBuff(manager, _buff, info);
			}
			else
			{
				_resultBuff = _buff;
			}
			return _resultBuff;
		}
コード例 #6
0
ファイル: ApprenticeRegion.cs プロジェクト: Ravenwolfe/xrunuo
        public override void OnEnter( Mobile m )
        {
            base.OnEnter( m );

            if ( m is PlayerMobile )
            {
                PlayerMobile player = (PlayerMobile) m;

                for ( int i = 0; i < player.Quests.Count; i++ )
                {
                    BaseQuest quest = player.Quests[i];

                    for ( int j = 0; j < quest.Objectives.Count; j++ )
                    {
                        BaseObjective objective = quest.Objectives[j];

                        if ( objective is ApprenticeObjective && !objective.Completed )
                        {
                            ApprenticeObjective apprentice = (ApprenticeObjective) objective;

                            if ( IsPartOf( apprentice.Region ) )
                            {
                                if ( apprentice.Enter is int )
                                    player.SendLocalizedMessage( (int) apprentice.Enter );
                                else if ( apprentice.Enter is string )
                                    player.SendMessage( (string) apprentice.Enter );

                                BuffInfo info = new BuffInfo( BuffIcon.ArcaneEmpowerment, 1078511 ); // Accelerated Skillgain
                                BuffInfo.AddBuff( m, info );
                                m_Table[m] = info;
                            }
                        }
                    }
                }
            }
        }
コード例 #7
0
ファイル: MagicReflect.cs プロジェクト: jaedan/runuo
        public override void OnCast()
        {
            if (Core.AOS)
            {
                /* The magic reflection spell decreases the caster's physical resistance, while increasing the caster's elemental resistances.
                 * Physical decrease = 25 - (Inscription/20).
                 * Elemental resistance = +10 (-20 physical, +10 elemental at GM Inscription)
                 * The magic reflection spell has an indefinite duration, becoming active when cast, and deactivated when re-cast.
                 * Reactive Armor, Protection, and Magic Reflection will stay oneven after logging out, even after dyinguntil you turn them off by casting them again.
                 */

                if (CheckSequence())
                {
                    Mobile targ = Caster;

                    ResistanceMod[] mods = (ResistanceMod[])m_Table[targ];

                    if (mods == null)
                    {
                        targ.PlaySound(0x1E9);
                        targ.FixedParticles(0x375A, 10, 15, 5037, EffectLayer.Waist);

                        int physiMod = -25 + (int)(targ.Skills[SkillName.Inscribe].Value / 20);
                        int otherMod = 10;

                        mods = new ResistanceMod[5]
                        {
                            new ResistanceMod(ResistanceType.Physical, physiMod),
                            new ResistanceMod(ResistanceType.Fire, otherMod),
                            new ResistanceMod(ResistanceType.Cold, otherMod),
                            new ResistanceMod(ResistanceType.Poison, otherMod),
                            new ResistanceMod(ResistanceType.Energy, otherMod)
                        };

                        m_Table[targ] = mods;

                        for (int i = 0; i < mods.Length; ++i)
                        {
                            targ.AddResistanceMod(mods[i]);
                        }

                        string buffFormat = String.Format("{0}\t+{1}\t+{1}\t+{1}\t+{1}", physiMod, otherMod);

                        BuffInfo.AddBuff(targ, new BuffInfo(BuffIcon.MagicReflection, 1075817, buffFormat, true));
                    }
                    else
                    {
                        targ.PlaySound(0x1ED);
                        targ.FixedParticles(0x375A, 10, 15, 5037, EffectLayer.Waist);

                        m_Table.Remove(targ);

                        for (int i = 0; i < mods.Length; ++i)
                        {
                            targ.RemoveResistanceMod(mods[i]);
                        }

                        BuffInfo.RemoveBuff(targ, BuffIcon.MagicReflection);
                    }
                }

                FinishSequence();
            }
            else
            {
                if (Caster.MagicDamageAbsorb > 0)
                {
                    Caster.SendLocalizedMessage(1005559); // This spell is already in effect.
                }
                else if (!Caster.CanBeginAction(typeof(DefensiveSpell)))
                {
                    Caster.SendLocalizedMessage(1005385); // The spell will not adhere to you at this time.
                }
                else if (CheckSequence())
                {
                    if (Caster.BeginAction(typeof(DefensiveSpell)))
                    {
                        int value = (int)(Caster.Skills[SkillName.Magery].Value + Caster.Skills[SkillName.Inscribe].Value);
                        value = (int)(8 + (value / 200) * 7.0);//absorb from 8 to 15 "circles"

                        Caster.MagicDamageAbsorb = value;

                        Caster.FixedParticles(0x375A, 10, 15, 5037, EffectLayer.Waist);
                        Caster.PlaySound(0x1E9);
                    }
                    else
                    {
                        Caster.SendLocalizedMessage(1005385); // The spell will not adhere to you at this time.
                    }
                }

                FinishSequence();
            }
        }
コード例 #8
0
ファイル: HonorableExecution.cs プロジェクト: ygtkms/ServUO
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!Validate(attacker) || !CheckMana(attacker, true))
            {
                return;
            }

            ClearCurrentMove(attacker);

            HonorableExecutionInfo info = m_Table[attacker] as HonorableExecutionInfo;

            if (info != null)
            {
                info.Clear();

                if (info.m_Timer != null)
                {
                    info.m_Timer.Stop();
                }
            }

            if (!defender.Alive)
            {
                attacker.FixedParticles(0x373A, 1, 17, 0x7E2, EffectLayer.Waist);

                double bushido = attacker.Skills[SkillName.Bushido].Value;

                attacker.Hits += 20 + (int)((bushido * bushido) / 480.0);

                int swingBonus = Math.Max(1, (int)((bushido * bushido) / 720.0));

                info         = new HonorableExecutionInfo(attacker, swingBonus);
                info.m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(20.0), new TimerStateCallback(EndEffect), info);

                BuffInfo.AddBuff(attacker, new BuffInfo(BuffIcon.HonorableExecution, 1060595, 1153807, TimeSpan.FromSeconds(20.0), attacker, string.Format("{0}", swingBonus)));

                m_Table[attacker] = info;
            }
            else
            {
                ArrayList mods = new ArrayList();

                mods.Add(new ResistanceMod(ResistanceType.Physical, -40));
                mods.Add(new ResistanceMod(ResistanceType.Fire, -40));
                mods.Add(new ResistanceMod(ResistanceType.Cold, -40));
                mods.Add(new ResistanceMod(ResistanceType.Poison, -40));
                mods.Add(new ResistanceMod(ResistanceType.Energy, -40));

                double resSpells = attacker.Skills[SkillName.MagicResist].Value;

                if (resSpells > 0.0)
                {
                    mods.Add(new DefaultSkillMod(SkillName.MagicResist, true, -resSpells));
                }

                info         = new HonorableExecutionInfo(attacker, mods);
                info.m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(7.0), new TimerStateCallback(EndEffect), info);

                BuffInfo.AddBuff(attacker, new BuffInfo(BuffIcon.HonorableExecution, 1060595, 1153808, TimeSpan.FromSeconds(7.0), attacker, String.Format("{0}\t40\t40\t40\t40\t40", resSpells)));

                m_Table[attacker] = info;
            }

            attacker.Delta(MobileDelta.WeaponDamage);
            CheckGain(attacker);
        }
コード例 #9
0
        public void Target(Mobile m)
        {
            if (CheckBSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                /* Attempts to remove all Curse effects from Target.
                 * Curses include Mage spells such as Clumsy, Weaken, Feeblemind and Paralyze
                 * as well as all Necromancer curses.
                 * Chance of removing curse is affected by Caster's Karma.
                 */

                int chance = 0;

                if (Caster.Karma < -5000)
                {
                    chance = 0;
                }
                else if (Caster.Karma < 0)
                {
                    chance = (int)Math.Sqrt(20000 + Caster.Karma) - 122;
                }
                else if (Caster.Karma < 5625)
                {
                    chance = (int)Math.Sqrt(Caster.Karma) + 25;
                }
                else
                {
                    chance = 100;
                }

                if (chance > Utility.Random(100))
                {
                    m.PlaySound(0xF6);
                    m.PlaySound(0x1F7);
                    m.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head);

                    IEntity from = new Entity(Serial.Zero, new Point3D(m.X, m.Y, m.Z - 10), Caster.Map);
                    IEntity to   = new Entity(Serial.Zero, new Point3D(m.X, m.Y, m.Z + 50), Caster.Map);
                    Effects.SendMovingParticles(from, to, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100);

                    StatMod mod;

                    mod = m.GetStatMod("[Magic] Str Offset");
                    if (mod != null && mod.Offset < 0)
                    {
                        m.RemoveStatMod("[Magic] Str Offset");
                    }

                    mod = m.GetStatMod("[Magic] Dex Offset");
                    if (mod != null && mod.Offset < 0)
                    {
                        m.RemoveStatMod("[Magic] Dex Offset");
                    }

                    mod = m.GetStatMod("[Magic] Int Offset");
                    if (mod != null && mod.Offset < 0)
                    {
                        m.RemoveStatMod("[Magic] Int Offset");
                    }

                    m.Paralyzed = false;

                    EvilOmenSpell.TryEndEffect(m);
                    StrangleSpell.RemoveCurse(m);
                    CorpseSkinSpell.RemoveCurse(m);
                    CurseSpell.RemoveEffect(m);
                    MortalStrike.EndWound(m);
                    if (Core.ML)
                    {
                        BloodOathSpell.RemoveCurse(m);
                    }
                    MindRotSpell.ClearMindRotScalar(m);

                    BuffInfo.RemoveBuff(m, BuffIcon.Clumsy);
                    BuffInfo.RemoveBuff(m, BuffIcon.FeebleMind);
                    BuffInfo.RemoveBuff(m, BuffIcon.Weaken);
                    BuffInfo.RemoveBuff(m, BuffIcon.Curse);
                    BuffInfo.RemoveBuff(m, BuffIcon.MassCurse);
                    BuffInfo.RemoveBuff(m, BuffIcon.MortalStrike);
                    BuffInfo.RemoveBuff(m, BuffIcon.Mindrot);

                    // TODO: Should this remove blood oath? Pain spike?
                }
                else
                {
                    m.PlaySound(0x1DF);
                }
            }

            FinishSequence();
        }
コード例 #10
0
 // whether the buff ID is one of the ascended states.
 public static bool IsAscended(BuffInfo buff)
 {
     return(buff == ASSJ || buff == USSJ);
 }
コード例 #11
0
        public void Target(Mobile m)
        {
            if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                /* Transmogrifies the flesh of the target creature or player to resemble rotted corpse flesh,
                 * making them more vulnerable to Fire and Poison damage,
                 * but increasing their resistance to Physical and Cold damage.
                 *
                 * The effect lasts for ((Spirit Speak skill level - target's Resist Magic skill level) / 25 ) + 40 seconds.
                 *
                 * NOTE: Algorithm above is fixed point, should be:
                 * ((ss-mr)/2.5) + 40
                 *
                 * NOTE: Resistance is not checked if targeting yourself
                 */

                ExpireTimer timer = (ExpireTimer)m_Table[m];

                if (timer != null)
                {
                    timer.DoExpire();
                }
                else
                {
                    m.SendLocalizedMessage(1061689);                       // Your skin turns dry and corpselike.
                }
                if (m.Spell != null)
                {
                    m.Spell.OnCasterHurt();
                }
                m.FixedParticles(0x373A, 1, 15, 9913, 67, 7, EffectLayer.Head);
                m.PlaySound(0x1BB);

                double ss = GetDamageSkill(Caster);
                double mr = (Caster == m ? 0.0 : GetResistSkill(m));
                m.CheckSkill(SkillName.MagicResist, 0.0, 120.0);                        //Skill check for gain

                TimeSpan duration = TimeSpan.FromSeconds(((ss - mr) / 2.5) + 40.0);

                ResistanceMod[] mods = new ResistanceMod[4]
                {
                    new ResistanceMod(ResistanceType.Fire, -15),
                    new ResistanceMod(ResistanceType.Poison, -15),
                    new ResistanceMod(ResistanceType.Cold, +10),
                    new ResistanceMod(ResistanceType.Physical, +10)
                };

                timer = new ExpireTimer(m, mods, duration);
                timer.Start();

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.CorpseSkin, 1075663, duration, m));

                m_Table[m] = timer;

                for (int i = 0; i < mods.Length; ++i)
                {
                    m.AddResistanceMod(mods[i]);
                }
            }

            FinishSequence();
        }
コード例 #12
0
ファイル: RemoveBuffPacket.cs プロジェクト: xrunuo/xrunuo
		public RemoveBuffPacket( Mobile mob, BuffInfo info )
			: this( mob, info.Id )
		{
		}
コード例 #13
0
ファイル: BattleFighter.cs プロジェクト: wuxin0602/Nothing
		public virtual void addBuff(BuffInfo buffInfo)
		{
			if (!hasHp())
			{
				return;
			}
			buffManager.addBuff(buffInfo);
		}
コード例 #14
0
        public static TimeSpan OnUse(Mobile m)
        {
            m.RevealingAction();

            if (m.Target != null)
            {
                m.SendLocalizedMessage(501845);                   // You are busy doing something else and cannot focus.

                return(TimeSpan.FromSeconds(2.5));
            }
            else if (!Core.AOS && m.Hits < (m.HitsMax / 10))      // Less than 10% health
            {
                m.SendLocalizedMessage(501849);                   // The mind is strong but the body is weak.

                return(TimeSpan.FromSeconds(2.5));
            }
            else if (m.Mana >= m.ManaMax)
            {
                m.SendLocalizedMessage(501846);                   // You are at peace.

                return(TimeSpan.FromSeconds(Core.AOS ? 10.0 : 5.0));
            }
            else if ((Core.AOS && RegenRates.GetArmorOffset(m) > 0.0) || CannotMeditateWithArmor(m))
            {
                m.SendLocalizedMessage(500135);                   // Regenative forces cannot penetrate your armor!

                return(TimeSpan.FromSeconds(2.0));
            }
            else
            {
                Item oneHanded = m.FindItemOnLayer(Layer.OneHanded);
                Item twoHanded = m.FindItemOnLayer(Layer.TwoHanded);

                if (Core.AOS)
                {
                    if (!CheckOkayHolding(oneHanded))
                    {
                        m.AddToBackpack(oneHanded);
                    }

                    if (!CheckOkayHolding(twoHanded))
                    {
                        m.AddToBackpack(twoHanded);
                    }
                }
                else if (!CheckOkayHolding(oneHanded) || !CheckOkayHolding(twoHanded))
                {
                    m.SendLocalizedMessage(502626);                       // Your hands must be free to cast spells or meditate.

                    return(TimeSpan.FromSeconds(2.5));
                }

                //double skillVal = m.Skills[SkillName.Meditation].Value;
                //double chance = (50.0 + (( skillVal - ( m.ManaMax - m.Mana ) ) * 2)) / 100;

                //if ( chance > Utility.RandomDouble() )
                if (m.CheckSkill(SkillName.Meditation, 0.0, 100.0))
                {
                    //m.CheckSkill( SkillName.Meditation, 0.0, 100.0 );

                    m.SendLocalizedMessage(501851);                       // You enter a meditative trance.
                    m.Meditating = true;
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.ActiveMeditation, 1075657));

                    if (m.Player || m.Body.IsHuman)
                    {
                        m.PlaySound(0xF9);
                    }
                }
                else
                {
                    m.SendLocalizedMessage(501850);                       // You cannot focus your concentration.
                }

                return(TimeSpan.FromSeconds(5.0));
            }
        }
コード例 #15
0
ファイル: ShieldBash.cs プロジェクト: Rhinoffensive/ServUO
 public override void EndEffects()
 {
     BuffInfo.RemoveBuff(Caster, BuffIcon.ShieldBash);
 }
コード例 #16
0
ファイル: ActorController.cs プロジェクト: floatyears/Decrypt
    private bool IsBuffResist(BuffInfo info)
    {
        if (info == null)
        {
            return true;
        }
        for (int i = 0; i < info.EffectType.Count; i++)
        {
            if (info.EffectType[i] == 0)
            {
                continue;
            }
            int num2 = 0;
            EBuffEffectType type = (EBuffEffectType)info.EffectType[i];
            switch (type)
            {
                case EBuffEffectType.EBET_Fear:
                    if (!this.immuneControl)
                    {
                        goto Label_00D0;
                    }
                    return true;

                case EBuffEffectType.EBET_HitBack:
                    if (!this.immuneControl)
                    {
                        goto Label_00EB;
                    }
                    return true;

                case EBuffEffectType.EBET_HitDown:
                    if (!this.immuneControl)
                    {
                        goto Label_0106;
                    }
                    return true;

                case EBuffEffectType.EBET_ChangeFaction:
                    goto Label_00A8;

                default:
                    switch (type)
                    {
                        case EBuffEffectType.EBET_Root:
                            if (!this.immuneControl)
                            {
                                break;
                            }
                            return true;

                        case EBuffEffectType.EBET_Silence:
                            if (!this.immuneControl)
                            {
                                break;
                            }
                            return true;

                        case EBuffEffectType.EBET_Stun:
                            goto Label_00A8;

                        default:
                            goto Label_0114;
                    }
                    num2 = this.resist[2];
                    goto Label_0114;
            }
            num2 = this.resist[6];
            goto Label_0114;
        Label_00A8:
            if (this.immuneControl)
            {
                return true;
            }
            num2 = this.resist[1];
            goto Label_0114;
        Label_00D0:
            num2 = this.resist[3];
            goto Label_0114;
        Label_00EB:
            num2 = this.resist[4];
            goto Label_0114;
        Label_0106:
            num2 = this.resist[5];
        Label_0114:
            if (UtilFunc.RangeRandom(0, 0x2710) <= num2)
            {
                return true;
            }
        }
        return false;
    }
コード例 #17
0
ファイル: ActorController.cs プロジェクト: floatyears/Decrypt
 public void BuffChangeModel(BuffInfo info, int effectIndex, bool apply)
 {
     if (info == null || effectIndex < 0 || effectIndex >= info.EffectType.Count)
     {
         return;
     }
     if (apply)
     {
         ModelController component = base.GetComponent<ModelController>();
         if (component != null)
         {
             component.SetModelState(1);
             this.animationCtrler.UpdateAnimCtrl();
         }
     }
     else
     {
         if (!string.IsNullOrEmpty(info.RemoveAction))
         {
             this.PlayAction(info.RemoveAction, null);
         }
         ModelController component2 = base.GetComponent<ModelController>();
         if (component2 != null)
         {
             component2.SetModelState(0);
             this.animationCtrler.UpdateAnimCtrl();
         }
     }
     this.ChangeSkill(0, info.Value1[effectIndex], apply);
     this.ChangeSkill(1, info.Value2[effectIndex], apply);
 }
コード例 #18
0
		public virtual void optionBuff(BattleBuffManager manager, BuffInfo info)
		{
			BattleFighterBuff _buff = optionBuffByType(manager, info);
			manager.putBuff(_buff);
		}
コード例 #19
0
		internal abstract BattleFighterBuff optionBuffByType(BattleBuffManager manager, BuffInfo info);
コード例 #20
0
ファイル: BuffPolicyEnum.cs プロジェクト: wuxin0602/Nothing
		public virtual void addBuff(BattleBuffManager manager, BuffInfo info)
		{
			IBuffAddPolicy _policy = Policy;
			_policy.optionBuff(manager, info);
		}
コード例 #21
0
 protected override void OnTick()
 {
     StopCountering(this.m_Mobile);
     BuffInfo.RemoveBuff(m_Mobile, BuffIcon.CounterAttack);
     this.m_Mobile.SendLocalizedMessage(1063119); // You return to your normal stance.
 }
コード例 #22
0
ファイル: ActorManager.cs プロジェクト: floatyears/Decrypt
 public void OnBuffUpdate(ActorController actor, int serialID, BuffInfo info, float duration, int stackCount)
 {
     if (this.BuffUpdateEvent == null)
     {
         return;
     }
     int actorSlot = this.GetActorSlot(actor);
     if (actorSlot != -2)
     {
         this.BuffUpdateEvent(actorSlot, serialID, info, duration, stackCount);
     }
 }
コード例 #23
0
        public static void OnVirtueUsed(Mobile from)
        {
            if (VirtueHelper.GetLevel(from, VirtueName.Humility) < VirtueLevel.Seeker)
            {
                from.SendLocalizedMessage(1155812); // You must be at least a Seeker of Humility to Invoke this ability.
            }
            else if (from.Alive)
            {
                from.SendLocalizedMessage(1155817); // Target the pet you wish to embrace with your Humility.
                from.BeginTarget(
                    10,
                    false,
                    TargetFlags.None,
                    (m, targeted) =>
                {
                    if (targeted is BaseCreature)
                    {
                        var bc = (BaseCreature)targeted;

                        if (!bc.Alive)
                        {
                            from.SendLocalizedMessage(1155815);     // You cannot embrace Humility on the dead!
                        }
                        else if (VirtueHelper.GetLevel(m, VirtueName.Humility) < VirtueLevel.Seeker)
                        {
                            from.SendLocalizedMessage(1155812);     // You must be at least a Seeker of Humility to Invoke this ability.
                        }
                        else if (!bc.Controlled && !bc.Summoned)
                        {
                            from.SendLocalizedMessage(1155813);     // You can only embrace your Humility on a pet.
                        }
                        else if (ActiveTable.ContainsKey(bc))
                        {
                            from.SendLocalizedMessage(1156047);     // That pet has already embraced Humility.
                        }
                        else
                        {
                            VirtueHelper.Atrophy(from, VirtueName.Humility, 3200);

                            from.SendLocalizedMessage(1155818);     // You have lost some Humility.

                            ActiveTable[bc] = from;

                            m.PrivateOverheadMessage(
                                MessageType.Regular,
                                1150,
                                1155819,
                                from.NetState);     // *Your pet surges with the power of your Humility!*

                            bc.FixedEffect(0x373A, 10, 16);

                            BuffInfo.AddBuff(
                                from,
                                new BuffInfo(
                                    BuffIcon.Humility,
                                    1156049,
                                    1156050,
                                    TimeSpan.FromMinutes(20),
                                    from,
                                    string.Format("{0}\t{1}", bc.Name, GetRegenBonus(bc))));     // Pet: ~1_NAME~<br>+~2_VAL~ HPR<br>

                            CheckTimer();
                            bc.ResetStatTimers();

                            Timer.DelayCall(
                                TimeSpan.FromMinutes(20),
                                mob =>
                            {
                                if (mob != null && ActiveTable.ContainsKey(mob))
                                {
                                    var user = ActiveTable[mob];
                                    ActiveTable.Remove(mob);

                                    BuffInfo.RemoveBuff(user, BuffIcon.Humility);

                                    user.PrivateOverheadMessage(
                                        MessageType.Regular,
                                        1150,
                                        1155823,
                                        from.NetState);         // *Your pet's power returns to normal*

                                    CheckTimer();
                                }
                            },
                                bc);
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(1155813);     // You can only embrace your Humility on a pet.
                    }
                });
            }
        }
コード例 #24
0
		public void AddBuff( BuffInfo b )
		{
			if( !BuffInfo.Enabled || b == null )
				return;

			RemoveBuff( b );	//Check & subsequently remove the old one.

			if( m_BuffTable == null )
				m_BuffTable = new Dictionary<BuffIcon, BuffInfo>();

			m_BuffTable.Add( b.ID, b );

			NetState state = this.NetState;

			if( state != null && state.BuffIcon )
			{
				state.Send( new AddBuffPacket( this, b ) );
			}
		}
コード例 #25
0
        public static int RemoveCurses(Mobile m)
        {
            int curseLevel = 0;

            if (SleepSpell.IsUnderSleepEffects(m))
            {
                SleepSpell.EndSleep(m);
                curseLevel += 2;
            }

            if (EvilOmenSpell.TryEndEffect(m))
            {
                curseLevel += 1;
            }

            if (StrangleSpell.RemoveCurse(m))
            {
                curseLevel += 2;
            }

            if (CorpseSkinSpell.RemoveCurse(m))
            {
                curseLevel += 3;
            }

            if (CurseSpell.UnderEffect(m))
            {
                CurseSpell.RemoveEffect(m);
                curseLevel += 4;
            }

            if (BloodOathSpell.RemoveCurse(m))
            {
                curseLevel += 3;
            }

            if (MindRotSpell.HasMindRotScalar(m))
            {
                MindRotSpell.ClearMindRotScalar(m);
                curseLevel += 2;
            }

            if (SpellPlagueSpell.HasSpellPlague(m))
            {
                SpellPlagueSpell.RemoveFromList(m);
                curseLevel += 4;
            }

            if (FeeblemindSpell.IsUnderEffects(m))
            {
                FeeblemindSpell.RemoveEffects(m);
                curseLevel += 1;
            }

            if (ClumsySpell.IsUnderEffects(m))
            {
                ClumsySpell.RemoveEffects(m);
                curseLevel += 1;
            }

            if (WeakenSpell.IsUnderEffects(m))
            {
                WeakenSpell.RemoveEffects(m);
                curseLevel += 1;
            }

            BuffInfo.RemoveBuff(m, BuffIcon.Clumsy);
            BuffInfo.RemoveBuff(m, BuffIcon.FeebleMind);
            BuffInfo.RemoveBuff(m, BuffIcon.Weaken);
            BuffInfo.RemoveBuff(m, BuffIcon.Curse);
            BuffInfo.RemoveBuff(m, BuffIcon.MassCurse);
            BuffInfo.RemoveBuff(m, BuffIcon.MortalStrike);
            BuffInfo.RemoveBuff(m, BuffIcon.Mindrot);
            BuffInfo.RemoveBuff(m, BuffIcon.CorpseSkin);
            BuffInfo.RemoveBuff(m, BuffIcon.Strangle);
            BuffInfo.RemoveBuff(m, BuffIcon.EvilOmen);

            return(curseLevel);
        }
コード例 #26
0
ファイル: BattleFighter.cs プロジェクト: wuxin0602/Nothing
		public virtual void addBuff(int buffId)
		{
			BuffInfo _info = new BuffInfo(buffId, null);
			addBuff(_info);

		}
コード例 #27
0
 // Therefore this will be called. Then the variable outside can also be updated?
 void UpdateBuff(BuffInfo inBuff)
 {
     if ((inBuff.time -= deltaUpdates) <= 0)
     {
         if (!inBuff.prevInfinite)
         {
             inBuff.power = 1;
             inBuff.time = 0;
         }
         else
             inBuff.SwapInfinite();
     }
 }
コード例 #28
0
ファイル: EnemyOfOne.cs プロジェクト: nogu3ira/xrunuo
 private void UpdateBuffInfo()
 {
     // TODO: display friendly name attribute when target is not null.
     BuffInfo.AddBuff(m_Owner, new BuffInfo(BuffIcon.EnemyOfOne, 1075653, 1075902, m_Expire - DateTime.Now, m_Owner, String.Format("{0}\t{1}", m_DamageScalar.ToString(), 100.ToString())));
 }
コード例 #29
0
        public override void OnCast()
        {
            if (CheckSequence())
            {

                if (contemMagia.ContainsKey(Caster))
                {
                    Caster.SendLocalizedMessage(1005559); // This spell is already in effect.
                    return;
                }

                Caster.PlaySound(0x1E9);
                Caster.FixedParticles(0x375A, 9, 20, 5016, EffectLayer.Waist);

                //valor da proteção
                int protecao = (int) (Caster.Skills[DamageSkill].Value / 5.0) + Utility.Random(2);

                ResistanceMod[] resistencias = new ResistanceMod[5];

                resistencias[0] = new ResistanceMod(ResistanceType.Physical, protecao);
                resistencias[1] = new ResistanceMod(ResistanceType.Fire, protecao);
                resistencias[2] = new ResistanceMod(ResistanceType.Cold, protecao);
                resistencias[3] = new ResistanceMod(ResistanceType.Energy, protecao);
                resistencias[4] = new ResistanceMod(ResistanceType.Poison, protecao);

                Caster.AddResistanceMod(resistencias[0]);
                Caster.AddResistanceMod(resistencias[1]);
                Caster.AddResistanceMod(resistencias[2]);
                Caster.AddResistanceMod(resistencias[3]);
                Caster.AddResistanceMod(resistencias[4]);

                //marca que ele contem a magia
                contemMagia.Add(Caster, Caster);

                string args = String.Format("{0}", protecao);

                //adiciona o buff de armadura arcana
                BuffInfo armaduraArcana = new BuffInfo(BuffIcon.Protection, 1075814, 1075815, args.ToString());
                BuffInfo.AddBuff(Caster, armaduraArcana);

                //calculo da duracao
                int intDuracao = (int) (Caster.Skills[CastSkill].Value / 10) + Utility.Random(2);
                TimeSpan duracao = TimeSpan.FromMinutes(intDuracao);

                //Tempo para remover
                Timer remover = new InternalTimer(Caster, resistencias, armaduraArcana, duracao);
                remover.Start();
            }
            FinishSequence();
        }
コード例 #30
0
ファイル: LichForm.cs プロジェクト: Jascen/UOSmart
 public override void DoEffect(Mobile m)
 {
     m.PlaySound(0x19C);
     m.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot);
     BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.LichForm, 1060515, 1044109, false));
 }
コード例 #31
0
        // wipes out all transformation buffs, requires them to be a part of the AllBuffs() union (it's a bunch of lists joined together).
        public static void ClearAllTransformations(Player player, bool isPoweringDown, bool isOneStep, BuffInfo transformationToKeep = null)
        {
            foreach (BuffInfo buff in AllBuffs())
            {
                // don't clear buffs the player doesn't have, obviously.
                if (!player.HasBuff(buff.GetBuffId()))
                {
                    continue;
                }

                //dont clear the buff we want to keep
                if (buff == transformationToKeep)
                {
                    continue;
                }

                RemoveTransformation(player, buff.BuffKeyName);
            }
        }
コード例 #32
0
ファイル: LichForm.cs プロジェクト: Jascen/UOSmart
 public override void RemoveEffect(Mobile m)
 {
     BuffInfo.RemoveBuff(m, BuffIcon.LichForm);
 }
コード例 #33
0
        public static void OnMasteryChanged(Mobile m, SkillName oldMastery)
        {
            PassiveSpell passive    = GetActivePassive(m);
            SkillName    newMastery = m.Skills.CurrentMastery;

            if (oldMastery != newMastery)
            {
                List <SkillMasterySpell> list = SkillMasterySpell.GetSpells(m);

                if (list != null)
                {
                    list.ForEach(spell =>
                    {
                        spell.Expire();
                    });

                    ColUtility.Free(list);
                }

                if (m is PlayerMobile && oldMastery == SkillName.Necromancy)
                {
                    ((PlayerMobile)m).AllFollowers.IterateReverse(mob =>
                    {
                        if (mob is BaseCreature && CommandUndeadSpell.ValidateTarget((BaseCreature)mob))
                        {
                            ((BaseCreature)mob).SetControlMaster(null);
                        }
                    });
                }

                SpecialMove move = SpecialMove.GetCurrentMove(m);

                if (move is SkillMasteryMove)
                {
                    SpecialMove.ClearCurrentMove(m);
                }

                m.RemoveStatMod("SavingThrow_Str");

                ColUtility.Free(list);
                RemovePassiveBuffs(m);
            }

            if (passive != PassiveSpell.None && passive != PassiveSpell.AnticipateHit)
            {
                switch (passive)
                {
                case PassiveSpell.EnchantedSummoning:
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.EnchantedSummoning, 1155904, 1156090, string.Format("{0}\t{0}", EnchantedSummoningBonus(m).ToString()), true));     // +~1_STAMINA~ Stamina Regeneration and +~2_HP~% Hit Points for summoned pets.<br>Increased difficulty for summoned pets to be dispelled.
                    break;

                case PassiveSpell.Intuition:
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Intuition, 1155907, 1156089, IntuitionBonus(m).ToString(), true));     // Mana Increase ~1_VAL~
                    break;

                case PassiveSpell.SavingThrow:
                {
                    string args = null;

                    switch (GetMasteryLevel(m, newMastery))
                    {
                    default: args = "5\t0\t0\t0"; break;

                    case 2: args = "5\t5\t0\t0"; break;

                    case 3: args = "5\t5\t5\t5"; break;
                    }

                    m.AddStatMod(new StatMod(StatType.Str, "SavingThrow_Str", 5, TimeSpan.Zero));
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.SavingThrow, 1156031, 1156032, args, true));         // Provides a chance to block disarm attempts based on Mastery level, weapon skill level and tactics skill level.
                }
                break;

                case PassiveSpell.Potency:
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Potency, 1155928, 1156195, NonPoisonConsumeChance(m).ToString(), true));     // ~1_VAL~% chance to not consume poison charges when using infecting strike or injected strike.
                    break;

                case PassiveSpell.Knockout:
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Knockout, 1155931, 1156030, string.Format("{0}\t{1}", GetKnockoutModifier(m).ToString(), GetKnockoutModifier(m, true).ToString(), true)));     // Wrestling Damage Bonus:<br>+~1_VAL~% PvM<br>+~2_VAL~% PvP
                    break;

                case PassiveSpell.Boarding:
                    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Boarding, 1155934, 1156194, BoardingSlotIncrease(m).ToString(), true));     // Your number of stable slots has been increased by ~1_VAL~.
                    break;
                }

                m.Delta(MobileDelta.WeaponDamage);
                m.UpdateResistances();

                if (m.Mana > m.ManaMax)
                {
                    m.Mana = m.ManaMax;
                }
            }

            if (m.Backpack != null)
            {
                foreach (Item item in m.Backpack.FindItemsByType(typeof(BookOfMasteries)))
                {
                    BookOfMasteries book = item as BookOfMasteries;

                    if (book != null)
                    {
                        book.InvalidateProperties();
                    }
                }
            }

            foreach (Item item in m.Items.Where(i => i is BookOfMasteries))
            {
                BookOfMasteries book = item as BookOfMasteries;

                if (book != null)
                {
                    book.InvalidateProperties();
                }
            }
        }
コード例 #34
0
 void Awake()
 {
     _Buffinstance = this;
 }
コード例 #35
0
 public override void RemoveEffect(Mobile m)
 {
     BuffInfo.RemoveBuff(Caster, BuffIcon.PoisonImmunity);
     BuffInfo.RemoveBuff(Caster, BuffIcon.VampiricEmbrace);
 }
コード例 #36
0
        public override void OnCast()
        {
            if (!Caster.CanBeginAction(typeof(PolymorphSpell)))
            {
                Caster.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
            }
            else if (TransformationSpellHelper.UnderTransformation(Caster))
            {
                Caster.SendLocalizedMessage(1063219); // You cannot mimic an animal while in that form.
            }
            else if (!Caster.CanBeginAction(typeof(IncognitoSpell)) || (Caster.IsBodyMod && AnimalForm.GetContext(Caster) == null))
            {
                DoFizzle();
            }
            else if (CheckSequence())
            {
                AnimalFormContext context = AnimalForm.GetContext(Caster);
                int mana = ScaleMana(RequiredMana);

                AnimalForm.AddLastAnimalForm(Caster, 16);

                if (mana > Caster.Mana)
                {
                    Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
                }
                else if (context != null)
                {
                    AnimalForm.RemoveContext(Caster, context, true);
                    Caster.Mana -= mana;

                    BuffInfo.RemoveBuff(Caster, BuffIcon.WhiteTigerForm);

                    FinishSequence();
                    return;
                }
                else
                {
                    double ninjitsu = Caster.Skills.Ninjitsu.Value;

                    if (ninjitsu < RequiredSkill + 37.5)
                    {
                        double chance = (ninjitsu - RequiredSkill) / 37.5;

                        if (chance < Utility.RandomDouble())
                        {
                            DoFizzle();
                            FinishSequence();
                            return;
                        }
                    }
                }

                Caster.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);
                Caster.Mana -= mana;

                Caster.CheckSkill(SkillName.Ninjitsu, 0.0, 90.0);

                BaseMount.Dismount(Caster);

                int bodyMod = Caster.Female ? 1255 : 1254;
                int hueMod  = 2500;

                Caster.BodyMod = bodyMod;
                Caster.HueMod  = hueMod;

                Caster.SendSpeedControl(SpeedControlType.MountSpeed);

                Timer timer = new AnimalFormTimer(Caster, bodyMod, hueMod);
                timer.Start();

                int skills = (int)((Caster.Skills[CastSkill].Value + Caster.Skills[DamageSkill].Value + (GetMasteryLevel() * 40)) / 3);

                AnimalForm.AddContext(Caster, new AnimalFormContext(timer, null, true, typeof(WildWhiteTiger), null));
                Caster.CheckStatTimers();

                int bleedMod = (int)(((Caster.Skills[SkillName.Ninjitsu].Value + Caster.Skills[SkillName.Stealth].Value + (GetMasteryLevel() * 40)) / 3) / 10);
                BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.WhiteTigerForm, 1155911, 1156060, String.Format("{0}\t{1}\t{2}\t{3}", "20", "5", "", bleedMod.ToString())));
                // +~1_ARG~ Defense Chance Increase.<br>+~2_ARG~ Max Defense Chance Increase Cap.<br> Chance to evade attacks.<br>Applies bleed to victim with a max damage of ~4_ARG~.

                Caster.Delta(MobileDelta.WeaponDamage);
            }

            FinishSequence();
        }
コード例 #37
0
ファイル: FocusedEye.cs プロジェクト: vsemchenkov/ServUO
 public override void OnExpire()
 {
     BuffInfo.RemoveBuff(Caster, BuffIcon.FocusedEye);
 }
コード例 #38
0
 public static bool BuffIsIn(BuffInfo buff, BuffInfo[] buffs)
 {
     return(buffs.Contains(buff));
 }
コード例 #39
0
ファイル: PurgeMagicSpell.cs プロジェクト: Tauriella/ServUO-1
        public void OnTarget(object o)
        {
            Mobile target = o as Mobile;

            if (target == null)
            {
                return;
            }

            if (m_CurseTable.ContainsKey(Caster))
            {
                Caster.SendLocalizedMessage(1154212); //You may not use the Purge Magic spell while you are under its curse.
            }
            else if (m_ImmuneTable.ContainsKey(target) || m_CurseTable.ContainsKey(target))
            {
                Caster.SendLocalizedMessage(1080119); // Your Purge Magic has been resisted!
            }
            else if (CheckHSequence(target))
            {
                if (CheckResisted(target))
                {
                    target.SendLocalizedMessage(501783);  // You feel yourself resisting magical energy.
                    Caster.SendLocalizedMessage(1080119); //Your Purge Magic has been resisted!
                }
                else
                {
                    SpellHelper.CheckReflect((int)Circle, Caster, ref target);

                    Caster.PlaySound(0x655);
                    Effects.SendLocationParticles(EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x3728, 1, 13, 0x834, 0, 0x13B2, 0);

                    BuffType type = GetRandomBuff(target);

                    if (type != BuffType.None)
                    {
                        string arg = "";

                        switch (type)
                        {
                        case BuffType.MagicReflect:
                            MagicReflectSpell.EndReflect(target);
                            arg = "magic reflect";
                            break;

                        case BuffType.ReactiveArmor:
                            ReactiveArmorSpell.EndArmor(target);
                            arg = "reactive armor";
                            break;

                        case BuffType.Protection:
                            ProtectionSpell.EndProtection(target);
                            arg = "protection";
                            break;

                        case BuffType.Transformation:
                            TransformationSpellHelper.RemoveContext(target, true);
                            arg = "transformation spell";
                            break;

                        case BuffType.StrBonus:
                            arg = "strength bonus";
                            target.RemoveStatMod("[Magic] Str Buff");
                            BuffInfo.RemoveBuff(target, BuffIcon.Strength);
                            break;

                        case BuffType.DexBonus:
                            arg = "dexterity bonus";
                            target.RemoveStatMod("[Magic] Dex Buff");
                            BuffInfo.RemoveBuff(target, BuffIcon.Agility);
                            break;

                        case BuffType.IntBonus:
                            arg = "intelligence bonus";
                            target.RemoveStatMod("[Magic] Int Buff");
                            BuffInfo.RemoveBuff(target, BuffIcon.Cunning);
                            break;

                        case BuffType.BarrabHemolymph:
                            arg = "Barrab hemolymph";
                            EodonianPotion.RemoveEffects(target, PotionEffect.Barrab);
                            break;

                        case BuffType.UraliTrance:
                            arg = "Urali Trance";
                            EodonianPotion.RemoveEffects(target, PotionEffect.Urali);
                            break;

                        case BuffType.Bless:
                            arg = "bless";
                            target.RemoveStatMod("[Magic] Str Buff");
                            target.RemoveStatMod("[Magic] Dex Buff");
                            target.RemoveStatMod("[Magic] Int Buff");
                            BuffInfo.RemoveBuff(target, BuffIcon.Bless);
                            BlessSpell.RemoveBless(target);
                            break;
                        }

                        target.SendLocalizedMessage(1080117, arg); //Your ~1_ABILITY_NAME~ has been purged.
                        Caster.SendLocalizedMessage(1080118, arg); //Your target's ~1_ABILITY_NAME~ has been purged.

                        int duration = (int)((Caster.Skills[CastSkill].Value + Caster.Skills[DamageSkill].Value) / 15);

                        if (duration <= 0)
                        {
                            duration = 1;
                        }

                        m_ImmuneTable.Add(target, new ImmuneTimer(target, TimeSpan.FromSeconds(duration)));
                    }
                    else
                    {
                        Caster.SendLocalizedMessage(1080120); //Your target has no magic that can be purged.

                        int duration = (int)((Caster.Skills[CastSkill].Value + Caster.Skills[DamageSkill].Value) / 28);

                        if (duration <= 0)
                        {
                            duration = 1;
                        }

                        m_CurseTable.Add(target, new CurseTimer(target, Caster, TimeSpan.FromSeconds(duration)));
                    }
                }
            }

            FinishSequence();
        }
コード例 #40
0
 // whether the buff Id is one of the "normal" SSJ States (1, 2, 3, G)
 public static bool IsSSJ(BuffInfo buff)
 {
     return(SSJBuffs().Contains(buff));
 }
コード例 #41
0
ファイル: Perseverance.cs プロジェクト: Argalep/ServUO
 public override void RemovePartyEffects(Mobile m)
 {
     BuffInfo.RemoveBuff(m, BuffIcon.Perseverance);
 }
コード例 #42
0
 // FAIRY special state, whether the player is in Nuova's Dev form, SPECTRUM, which is fabulous.
 public static bool IsSpectrum(BuffInfo buff)
 {
     return(Spectrum.GetBuffId() == buff.GetBuffId());
 }
コード例 #43
0
 void ApplyBuff(BuffInfo buffInfo) {
     switch (buffInfo.buffType) {
         case "Speed":
             speed += buffInfo.buffAmount;
             break;
         case "Health":
             hittable.maxHealth += buffInfo.buffAmount;
             break;
         case "Attack":
             attackBoost += buffInfo.buffAmount;
             break;
         default:
             break;
     }
 }
コード例 #44
0
 // whether the buff ID is Kaioken
 public static bool IsAnyKaioken(BuffInfo buff)
 {
     return(IsKaioken(buff) || IsSuperKaioken(buff));
 }
コード例 #45
0
ファイル: BuffCoverPolicy.cs プロジェクト: wuxin0602/Nothing
		/// <summary>
		/// 1.remove old buff; 2. add new buff </summary>
		/// <param name="manager"> </param>
		/// <param name="toReplaceBuff"> </param>
		/// <param name="addBuffAction">
		/// @return </param>
		protected internal virtual BattleFighterBuff replaceBuff(BattleBuffManager manager, BattleFighterBuff toReplaceBuff, BuffInfo buffInfo)
		{
			manager.removeSingleBuff(toReplaceBuff);
			BattleFighterBuff _resultBuff = manager.putToBuffHolder(buffInfo);
			return _resultBuff;
		}
コード例 #46
0
ファイル: Buff.cs プロジェクト: floatyears/Decrypt
 public void Init(ActorController owner, ActorController caster, BuffInfo info, int serialID)
 {
     this.Owner = owner;
     this.Caster = caster;
     this.Info = info;
     this.SerialID = serialID;
     this.StackCount = info.InitStackCount;
     this.duration = info.MaxDuration;
     if (this.duration <= 0f)
     {
         this.permanent = true;
     }
     this.periodic = info.PeriodicTime;
     if (this.Info.TickType == 2)
     {
         this.periodic = 0f;
     }
     for (int i = 0; i < this.Info.EffectType.Count; i++)
     {
         if (this.Info.EffectType[i] == 11)
         {
             this.Value += this.Info.Value3[i];
         }
     }
 }
コード例 #47
0
            public InternalTimer( Mobile m, Mobile from, int duracao )
                : base(TimeSpan.FromSeconds( 1 ), TimeSpan.FromSeconds( 2 ), duracao)
            {
                alvo = m;
                caster = from;
                this.duracao = duracao;

                bf = new BuffInfo( BuffIcon.Bless, 1075843, new TextDefinition("Toque da Regeneração"));
                BuffInfo.AddBuff( alvo,  bf);
            }
コード例 #48
0
ファイル: BuffInfo.cs プロジェクト: Ravenwolfe/xrunuo
        public static void RemoveBuff( Mobile m, BuffInfo b )
        {
            PlayerMobile pm = m as PlayerMobile;

            if ( pm != null )
                pm.RemoveBuff( b );
        }
コード例 #49
0
 // whether the buff ID is Kaioken
 public static bool IsSuperKaioken(BuffInfo buff)
 {
     return(buff.GetBuffId() == SuperKaioken.GetBuffId());
 }
コード例 #50
0
		internal override BattleFighterBuff optionBuffByType(BattleBuffManager manager, BuffInfo info)
		{
			BattleFighterBuff _buff = manager.getBattleBuff(info.BuffAction);
			_buff.stackingBuff(info);
			return _buff;
		}
コード例 #51
0
		internal override BattleFighterBuff optionBuffByType(BattleBuffManager manager, BuffInfo info)
		{
			manager.createBuffHolder(info.BuffAction);
			return manager.putToBuffHolder(info);
		}
コード例 #52
0
 public static bool IsDevBuffed(BuffInfo buff)
 {
     return(IsSpectrum(buff));
 }
コード例 #53
0
            public InternalTimer(Mobile m, ResistanceMod[] resistencias, TimeSpan delay )
                : base(delay)
            {
                alvo = m;
                this.resistencias = resistencias;

                bf = new BuffInfo( BuffIcon.Bless, 1075843, new TextDefinition("Proteção Frio"));
                BuffInfo.AddBuff( m,  bf);
            }
コード例 #54
0
 // a bool for whether the player is in a state other than Kaioken (a form)
 public static bool IsAnythingOtherThanKaioken(BuffInfo buff)
 {
     return(IsLSSJ(buff) || IsSSJ(buff) || IsSSJG(buff) || IsDevBuffed(buff) || IsAscended(buff));
 }
コード例 #55
0
 // whether the buff ID is one of the legendary states; caution, this includes SSJ1 for "Next/Previous" behavior reasons.
 public static bool IsLSSJ(BuffInfo buff)
 {
     return(LegendaryBuffs().Contains(buff));
 }
コード例 #56
0
 // whether the buff is SSJG, specifically
 public static bool IsSSJG(BuffInfo buff)
 {
     return(SSJG.GetBuffId() == buff.GetBuffId());
 }
コード例 #57
0
		public void RemoveBuff( BuffInfo b )
		{
			if( b == null )
				return;

			RemoveBuff( b.ID );
		}
コード例 #58
0
 public InternalTimer(Mobile caster, ResistanceMod[] resistencias, BuffInfo armaduraArcana, TimeSpan duracao)
     : base(duracao)
 {
     this.caster = caster;
     this.resistencias = resistencias;
     this.armaduraArcana = armaduraArcana;
 }