public TriggerBuff AddTriggerBuff(FightActor target, bool dispelable, BuffTriggerType trigger, TriggerBuffApplyHandler applyTrigger, TriggerBuffRemoveHandler removeTrigger)
        {
            int         id          = target.PopNextBuffId();
            TriggerBuff triggerBuff = new TriggerBuff(id, target, this.Caster, this.Dice, this.Spell, this.Critical, dispelable, trigger, applyTrigger, removeTrigger);

            target.AddAndApplyBuff(triggerBuff, true);
            return(triggerBuff);
        }
        public StateBuff AddStateBuff(FightActor target, bool dispelable, SpellState state)
        {
            int       id        = target.PopNextBuffId();
            StateBuff stateBuff = new StateBuff(id, target, this.Caster, this.Dice, this.Spell, dispelable, state);

            target.AddAndApplyBuff(stateBuff, true);
            return(stateBuff);
        }
        public StatBuff AddStatBuff(FightActor target, short value, PlayerFields caracteritic, bool dispelable, CustomActionsEnum customAction)
        {
            int      id       = target.PopNextBuffId();
            StatBuff statBuff = new StatBuff(id, target, this.Caster, this.Effect, this.Spell, value, caracteritic, this.Critical, dispelable, (short)customAction);

            target.AddAndApplyBuff(statBuff, true);
            return(statBuff);
        }
Esempio n. 4
0
 public override void Execute()
 {
     if (!this.m_initialized)
     {
         this.Initialize();
     }
     if (base.Handlers.Length == 1)
     {
         this.m_affectedActors = base.Handlers[0].GetAffectedActors().ToArray <FightActor>();
         FightActor[] affectedActors = this.m_affectedActors;
         for (int i = 0; i < affectedActors.Length; i++)
         {
             FightActor fightActor = affectedActors[i];
             int        id         = fightActor.PopNextBuffId();
             fightActor.AddAndApplyBuff(new TriggerBuff(id, fightActor, base.Caster, base.Handlers[0].Dice, base.Spell, false, false, BuffTriggerType.BEFORE_ATTACKED, new TriggerBuffApplyHandler(this.ChakraConcentrationBuffTrigger))
             {
                 Duration = 1
             }, true);
         }
     }
 }