コード例 #1
0
ファイル: Skill006.cs プロジェクト: zhoulk/RTSDotaClient
    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
ファイル: Skill004.cs プロジェクト: zhoulk/RTSDotaClient
    void ChangeTo(BaseHero from)
    {
        UnityTools.Log(from.name + " 对 " + from.name + " 使用 " + name);

        HeroAction treatAction1 = new HeroAction();

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

        Buff buff = new Buff();

        buff.type     = BuffType.Change1;
        buff.start    = now;
        buff.duration = changeDuration;
        from.AddBuff(buff);
    }
コード例 #3
0
ファイル: Skill003.cs プロジェクト: zhoulk/RTSDotaClient
    void SlowTo(BaseHero from, BaseHero hero)
    {
        UnityTools.Log(from.name + " 对 " + hero.name + " 使用 " + name);

        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.Slow1;
        buff.start     = now;
        buff.duration  = slowDuration;
        buff.duration2 = giftDuration;
        buff.arg1      = slowPercent;
        buff.arg2      = liftPercent;
        hero.AddBuff(buff);
    }
コード例 #4
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);
    }
コード例 #5
0
    public void BeAttack(BaseHero from)
    {
        for (int i = buffs.Count - 1; i >= 0; i--)
        {
            Buff buff = buffs[i];
            switch (buff.type)
            {
            case BuffType.Slow1:

                Buff liftBuff = new Buff();
                liftBuff.type     = BuffType.LiftSpeed;
                liftBuff.start    = GameData.g_uGameLogicFrame * GameData.g_fixFrameLen * 1000;
                liftBuff.duration = buff.duration2;
                liftBuff.arg1     = buff.arg2;
                from.AddBuff(liftBuff);

                break;
            }
        }
    }
コード例 #6
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);
    }