public static void DodgeBuffEffect(Fighter fighter, SpellLevelRecord level, ExtendedSpellEffect effect, List <Fighter> affected, short castcellid)
 {
     foreach (var target in affected)
     {
         DodgeBuff buff = new DodgeBuff((uint)target.BuffIdProvider.Pop(), effect.BaseEffect.DiceSide, effect.BaseEffect.Duration, fighter.ContextualId, (short)level.SpellId, effect.BaseEffect.Delay);
         target.AddBuff(buff);
     }
 }
Esempio n. 2
0
		public override bool Apply()
		{
			foreach (FightActor current in base.GetAffectedActors())
			{
				DodgeBuff buff = new DodgeBuff(current.PopNextBuffId(), current, base.Caster, base.Dice, base.Spell, base.Critical, true, (int)base.Dice.DiceNum, (int)base.Dice.DiceFace);
				current.AddAndApplyBuff(buff, true);
			}
			return true;
		}
Esempio n. 3
0
        protected override bool InternalApply()
        {
            foreach (var actor in GetAffectedActors())
            {
                if (actor.GetBuffs(x => x is DodgeBuff).Any())
                {
                    continue;
                }

                var buff = new DodgeBuff(actor.PopNextBuffId(), actor, Caster, this, Spell, Critical, FightDispellableEnum.DISPELLABLE, Dice.DiceNum, Dice.DiceFace);
                actor.AddBuff(buff);
            }

            return(true);
        }
Esempio n. 4
0
    private void Confirm()
    {
        var buff = new DodgeBuff(1, dodgeSkill.EName);

        character.GetComponent <CharacterStatus>().Buffs.Add(buff);
        if (chooseTrickUI)
        {
            UnityEngine.Object.Destroy(chooseTrickUI);
        }
        if (confirmUI)
        {
            UnityEngine.Object.Destroy(confirmUI);
        }
        skillState = SkillState.confirm;
        character.GetComponent <Unit>().OnUnitEnd();   //真正的回合结束所应执行的逻辑。
        RoundManager.GetInstance().EndTurn();
    }
Esempio n. 5
0
    private void Confirm(GameObject btn)
    {
        var buff = new DodgeBuff(1, dodgeSkill.EName);

        if (dodgeSkill is INinjaTool)
        {
            buff.itemData = buttonRecord[btn];
            ((INinjaTool)dodgeSkill).RemoveSelf(character);
        }

        character.GetComponent <CharacterStatus>().Buffs.Add(buff);
        if (chooseTrickUI)
        {
            UnityEngine.Object.Destroy(chooseTrickUI);
        }
        if (confirmUI)
        {
            UnityEngine.Object.Destroy(confirmUI);
        }
        skillState = SkillState.confirm;
        character.GetComponent <Unit>().OnUnitEnd();   //真正的回合结束所应执行的逻辑。
        RoundManager.GetInstance().EndTurn();
    }
Esempio n. 6
0
 public static void DodgeBuffEffect(Fighter fighter, SpellLevelRecord level, ExtendedSpellEffect effect, List<Fighter> affected, short castcellid)
 {
     foreach (var target in affected)
     {
         DodgeBuff buff = new DodgeBuff((uint)target.BuffIdProvider.Pop(), effect.BaseEffect.DiceSide, effect.BaseEffect.Duration, fighter.ContextualId, (short)level.SpellId, effect.BaseEffect.Delay);
         target.AddBuff(buff);
     }
 }