public override void Init(BaseSkill baseSkill)
    {
        base.Init(baseSkill);
        var skill = (CreaterSkill)baseSkill;

        BaseEffect         = skill.BaseEffect;
        isDestroyOnTrigger = skill.isDestroyOnTrigger;
    }
Exemple #2
0
    public bool AddPoring(Poring poring)
    {
        poring.transform.position = transform.position;
        poring.Node = this;
        porings.Add(poring);
        if (porings.Count > 1 &&
            porings[0].CheckHasStatus(SkillStatus.Ambursh) &&
            !poring.CheckHasStatus(SkillStatus.Ambursh))
        {
            porings[0].Animator.Play("Skill");
            float damage = porings[0].Property.CurrentPAtk;
            damage *= porings[0].GetBlessingBuff();
            EffectReceiver maximizePower = poring.GetStatus(SkillStatus.MaximizePower);
            damage *= (maximizePower != null) ? maximizePower.Damage : 1;
            if (porings[0].CheckHasStatus(SkillStatus.Blind))
            {
                damage = 0;
            }

            poring.TakeDamage(porings[0], damage, porings[0].Property.NormalAttackEffect);
        }

        TileProperty.OnEnter(poring, this);
        List <EffectReceiver> effectsResult = new List <EffectReceiver>();

        for (int i = 0; i < effectsOnTile.Count; i++)
        {
            BaseEffectOnTile      baseFx     = effectsOnTile[i];
            List <EffectReceiver> listEffect = baseFx.OnEnter(this);
            effectsResult.AddRange(listEffect);
        }
        bool isAlive = poring.OnReceiverEffect(effectsResult);

        if (!isAlive)
        {
            return(false);
        }
        foreach (var fx in effectsResult)
        {
            SkillStatus e = SkillStatus.Freeze | SkillStatus.Root | SkillStatus.Sleep | SkillStatus.Stun;
            if (fx.Status.CheckHasStatus(e))
            {
                return(false);
            }
        }
        return(true);
    }