示例#1
0
    void AttackTo(BaseHero from, BaseHero hero)
    {
        from.ReduceMP(expend);
        hero.ReduceHP(attackHP);
        UnityTools.Log(from.name + " 使用 " + name + " 攻击 " + hero.name + " 造成 " + attackHP + " 点伤害,眩晕" + dizzDuration + "毫秒,消耗 " + expend + "点MP");

        HeroAction treatAction = new HeroAction();

        treatAction.action = HeroActionType.Skill;
        SkillAction skillAction = new SkillAction();

        skillAction.action = SkillActionType.MiniMP;
        skillAction.args   = new object[] { expend };
        treatAction.args   = new object[] { from, hero, this, skillAction };
        from.AddAction(treatAction);

        HeroAction treatAction1 = new HeroAction();

        treatAction1.action = HeroActionType.Skill;
        SkillAction skillAction1 = new SkillAction();

        skillAction1.action = SkillActionType.MiniHP;
        skillAction1.args   = new object[] { attackHP };
        treatAction1.args   = new object[] { from, hero, this, skillAction1 };
        hero.AddAction(treatAction1);

        Buff buff = new Buff();

        buff.type     = BuffType.Dizzy;
        buff.start    = now;
        buff.duration = dizzDuration;
        hero.AddBuff(buff);
    }
示例#2
0
    void CoverTo(BaseHero from, BaseHero hero)
    {
        from.ReduceMP(expend);
        UnityTools.Log(from.name + " 对 " + hero.name + " 使用 " + name + "消耗 " + expend + "点MP");

        HeroAction treatAction1 = new HeroAction();

        treatAction1.action = HeroActionType.Skill;
        treatAction1.args   = new object[] { from, hero, this };
        hero.AddAction(treatAction1);

        Buff buff = new Buff();

        buff.type     = BuffType.Cover1;
        buff.start    = now;
        buff.duration = converDuration;
        buff.arg1     = Fix64.Zero;
        buff.arg2     = converDamage;
        hero.AddBuff(buff);
    }
示例#3
0
    void AttackTo(BaseHero from, BaseHero hero)
    {
        from.ReduceMP(expend);
        UnityTools.Log(from.name + " 使用 " + name + " 攻击 " + hero.name + " 消耗 " + expend + "点MP");

        HeroAction treatAction = new HeroAction();

        treatAction.action = HeroActionType.Skill;
        treatAction.args   = new object[] { from, hero, this };
        from.AddAction(treatAction);

        HeroAction treatAction1 = new HeroAction();

        treatAction1.action = HeroActionType.Skill;
        treatAction1.args   = new object[] { from, hero, this };
        hero.AddAction(treatAction1);

        Buff buff = new Buff();

        buff.type     = BuffType.Focus;
        buff.start    = now;
        buff.duration = Fix64.One * -1;
        hero.AddBuff(buff);
    }
示例#4
0
    void AttackToAll(BaseHero from)
    {
        from.ReduceMP(expend);

        foreach (var hero in GameData.g_listHero)
        {
            if (hero.group == from.group)
            {
                continue;
            }

            hero.ReduceHP(attackHP);
            UnityTools.Log(from.name + " 使用 " + name + " 攻击 " + hero.name + " 造成 " + attackHP + " 点伤害,减甲" + reduceArmor + ",消耗 " + expend + "点MP");

            HeroAction treatAction1 = new HeroAction();
            treatAction1.action = HeroActionType.Skill;
            SkillAction skillAction1 = new SkillAction();
            skillAction1.action = SkillActionType.MiniHP;
            skillAction1.args   = new object[] { attackHP };
            treatAction1.args   = new object[] { from, hero, this, skillAction1 };
            hero.AddAction(treatAction1);

            Buff buff = new Buff();
            buff.type     = BuffType.ReduceArmor;
            buff.start    = now;
            buff.duration = reduceDuration;
            buff.arg1     = reduceArmor;
            hero.AddBuff(buff);
        }

        HeroAction treatAction = new HeroAction();

        treatAction.action = HeroActionType.Skill;
        treatAction.args   = new object[] { from, null, this };
        from.AddAction(treatAction);
    }