Exemple #1
0
        public StateBuff AddStateBuff(Fighter target, SpellStateRecord stateRecord, FightDispellableEnum dispelable)
        {
            int       id   = target.BuffIdProvider.Pop();
            StateBuff buff = new StateBuff(id, target, Source, this.SpellLevel, Effect, this.SpellId, Critical, dispelable, stateRecord);

            target.AddAndApplyBuff(buff);
            return(buff);
        }
Exemple #2
0
        /// <summary>
        /// Ajoute au royalmouth un buff d'invulnérabilité
        /// </summary>
        private void AddInvulnerabilityBuff()
        {
            StateBuff buff = new StateBuff(this.Fighter.BuffIdProvider.Pop(),
                                           this.Fighter,
                                           this.Fighter,
                                           this.InitmouthLevel,
                                           this.InvulnerabilityEffect,
                                           InitmouthSpellId,
                                           false,
                                           FightDispellableEnum.REALLY_NOT_DISPELLABLE,
                                           SpellStateRecord.GetState(this.InvulnerabilityEffect.Value));

            this.Fighter.AddAndApplyBuff(buff);
        }
Exemple #3
0
        public override bool Apply(Fighter[] targets)
        {
            SpellStateRecord stateRecord = SpellStateRecord.GetState(Effect.Value);

            if (stateRecord != null)
            {
                foreach (var target in targets)
                {
                    base.AddStateBuff(target, stateRecord, Protocol.Enums.FightDispellableEnum.DISPELLABLE_BY_STRONG_DISPEL);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #4
0
 public StateBuff(Fighter source, Fighter target, short delta,
                  EffectInstance effect, ushort spellId, SpellStateRecord stateRecord)
     : base(source, target, delta, effect, spellId)
 {
     this.StateRecord = stateRecord;
 }
Exemple #5
0
 public StateBuff(int id, Fighter target, Fighter caster, SpellLevelRecord level, EffectInstance effect,
                  ushort spellId, bool critical, FightDispellableEnum dispelable, SpellStateRecord stateRecord)
     : base(id, target, caster, level, effect, spellId, critical, dispelable)
 {
     this.StateRecord = stateRecord;
 }