示例#1
0
    public override void Explode()
    {
        ErrorHandler.Parse(
            SkillDetails.CreateCreationAround(mBullet.FirerAttr, mBullet.CreationOnArrive, mBullet.GetPosition(), mBullet.GetDirection()),
            "failed to create creature on bullet arrived"
            );

        // 爆炸特效, 仅在子弹到达终点时播放, 即, 子弹没有命中足够的人.
        if (mBullet.CurrentHittedCount < mBullet.MaxHitCount)
        {
            SkillClientBehaviour.AddSceneEffect(mBullet.ExplodeEffect, mBullet.GetPosition(), mBullet.GetDirection());
        }

        // 用碰撞来模拟爆炸, 从而使得技能效果的方向沿着子弹的飞行方向.
        if (mBullet.TargetSelectionOnArrive != uint.MaxValue && mBullet.SkillEffectOnArrive != uint.MaxValue)
        {
            TargetSelectionTableItem targetSel = DataManager.TargetSelectionTable[mBullet.TargetSelectionOnArrive] as TargetSelectionTableItem;

            ArrayList targets = SkillUtilities.SelectTargets(mBullet.FirerAttr, mBullet.GetPosition(), mBullet.GetDirection(), targetSel);

            AttackerAttr other = mBullet.FirerAttr;
            other.SetEffectStartLocation(mBullet.GetPosition(), mBullet.GetDirection());

            foreach (BattleUnit t in targets)
            {
                SkillDetails.AddSkillEffectByResource(other, t, mBullet.SkillEffectOnArrive);
            }
        }
    }
示例#2
0
    protected override void onStopped(SkillEffectStopReason stopReason)
    {
        if (getState(StateEnabled))
        {
            ErrorHandler.Parse(enable(false, stopReason));
        }

        // buff被回收时, 不会再继续触发效果.
        if (stopReason != SkillEffectStopReason.Recycled)
        {
            // 消失时的特效.
            SkillClientBehaviour.AddEffect2Object(mOwner, mBuffRes.endEffectID, mBuffRes.endEffectBindpoint, 0f);

            // buff死亡创建.
            // 对buff拥有者产生效果.
            SkillDetails.AddSkillEffectByResource(mAttackerAttr, mOwner, mBuffRes.effect2OwnerOnExpired);

            // 对buff拥有者周围产生效果.
            SkillDetails.SelectTargetAndAddSkillEffect(mAttackerAttr, mOwner.GetPosition(),
                                                       mOwner.GetDirection(),
                                                       mBuffRes.targetSelectionOnExpired, mBuffRes.effect2OthersOnExpired
                                                       );

            // 在buff拥有者周围进行创建.
            SkillDetails.CreateCreationAround(mAttackerAttr, mBuffRes.creationAroundOwnerOnExpired, mOwner.GetPosition(), mOwner.GetDirection());
        }

        base.onStopped(stopReason);
    }
示例#3
0
    public override bool RunScript(RandEventArg argument)
    {
        ErrorHandler.Parse(
            SkillDetails.CreateCreationAround(createrAttr, creationId, mOwner.GetPosition(), mOwner.GetDirection()),
            "failed to run script SS_DeathCreation"
            );

        return(true);
    }
示例#4
0
    private bool CreateCreation(ObjectBase obj, ArrayList param)
    {
        if (param.Count == 0)
        {
            return(false);
        }

        uint creationResID = Convert.ToUInt32(param[0]);

        return(ErrorHandler.Parse(SkillDetails.CreateCreationAround(
                                      new AttackerAttr(obj as BattleUnit), creationResID,
                                      obj.GetPosition(), obj.GetDirection())
                                  ));
    }
示例#5
0
    public override void Explode()
    {
        ErrorHandler.Parse(
            SkillDetails.CreateCreationAround(mBullet.FirerAttr, mBullet.CreationOnArrive, mBullet.GetPosition(), mBullet.GetDirection()),
            "failed to create creature on bullet arrived"
            );

        SkillClientBehaviour.AddSceneEffect(mBullet.ExplodeEffect, mBullet.GetPosition(), mBullet.GetDirection());

        // 检查该种子弹是否可以产生爆炸伤害.
        SkillDetails.SelectTargetAndAddSkillEffect(
            mBullet.FirerAttr, mBullet.GetPosition(), mBullet.GetDirection(),
            mBullet.TargetSelectionOnArrive,
            mBullet.SkillEffectOnArrive
            );
    }
    protected override void onStopped(bool finished)
    {
        base.onStopped(finished);

        if (finished)
        {
            // 结束时给自己的效果.
            SkillDetails.AddSkillEffectByResource(mAttackerAttr, mOwner, mDisplacementResource.skillEffect2SelfOnArrive);

            // 结束时给目标的效果.
            SkillDetails.SelectTargetAndAddSkillEffect(mAttackerAttr,
                                                       mOwner.GetPosition(), mOwner.GetDirection(), mDisplacementResource.targetSelectionOnArrive,
                                                       mDisplacementResource.skillEffect2OthersOnArrive);

            // 在位移目标的周围创建.
            SkillDetails.CreateCreationAround(mAttackerAttr, mDisplacementResource.creationOnArrive, mOwner.GetPosition(), mOwner.GetDirection());
        }
    }