Пример #1
0
 public override void OnApply(BuffInstance instance)
 {
     instance.ApplyBuffMod(AttackModHandler.Generate(EventFlag.ATTACKED,
                                                     (atkInst) =>
     {
         atkInst.IsDefended = true;
     }));
 }
Пример #2
0
 public override void OnApply(BuffInstance instance)
 {
     instance.ApplyBuffMod(AttackModHandler.Generate(EventFlag.HIT_BY_ATTACK,
                                                     (atkInst) =>
     {
         OnTick(instance);
     }));
 }
Пример #3
0
        public override void OnApply(BuffInstance instance)
        {
            instance.Target.GetComponent <AbilityCaster>().AddDisabler();

            instance.ApplyBuffMod(AttackModHandler.Generate(EventFlag.HIT_BY_ATTACK,
                                                            (atkInst) =>
            {
                DamageInstance.Damage(instance.OriginEffect, instance.Caster, instance.Target,
                                      instance.Data.MainValue * (atkInst.IsCrit ? 2 : 1), instance.Data.MainType);
                instance.Remove();
            }));
        }