예제 #1
0
        public void AddNormalAttackToBattleOrder(AttackData attackData)
        {
            LevelAgent attacker = attackData.fsm.levelAgent;
            LevelAgent target   = attackData.target.GetComponent <LevelAgent>();

            IAlignmentProvider alignment = attacker.configuration.alignmentProvider;

            List <BuffInfo> buffInfos = new List <BuffInfo>();
            //buffInfos.Add(new BuffInfo(eBuffType.damage, 10, 10f, "PoisonFX"));
            DamageInfo damageInfo = new DamageInfo(10, 0, buffInfos, alignment);

            BattleOrder bo = new BattleOrder();

            bo.Construct(attacker, target, damageInfo);
            battle_order.Add(bo);
        }
예제 #2
0
        public void AddSkillAttackToBattleOrder(AttackData attackData)
        {
            LevelAgent attacker = attackData.fsm.levelAgent;
            LevelAgent target   = attackData.target.GetComponent <LevelAgent>();

            List <LevelAgent> targets = new List <LevelAgent>();

            targets.Add(target);


            int             damage;
            List <BuffInfo> buffInfos = new List <BuffInfo>();

            if (attackData.skillId == 2002)
            {
                damage = 0;
                buffInfos.Add(new BuffInfo(eBuffType.damage, 5, 3f, "PoisonFX"));
            }
            else if (attackData.skillId == 2003)
            {
                damage = 10;
            }
            else
            {
                damage = 1;
            }

            DamageInfo damageInfo = new DamageInfo(damage, 0, buffInfos, attacker.configuration.alignmentProvider);

            List <DamageInfo> skillDamages = new List <DamageInfo>();

            skillDamages.Add(damageInfo);

            BattleOrder bo = new BattleOrder();

            bo.Construct(attacker, targets, skillDamages, attackData.skillId);
            battle_order.Add(bo);
        }