IsIndexFriend() 보호된 정적인 메소드

protected static IsIndexFriend ( int index ) : bool
index int
리턴 bool
예제 #1
0
        public override void EmulateBattle(int[] hps, int[] damages)
        {
            if (!IsAvailable)
            {
                return;
            }

            for (int i = 0; i < hps.Length; i++)
            {
                AddDamage(hps, i, Damages[i]);
            }

            for (int i = 0; i < damages.Length; i++)
            {
                damages[i] += AttackDamages[i];
            }

            for (int i = 0; i < Targets.Length; i++)
            {
                if (Targets[i] > 0)
                {
                    int target = Targets[i] - 1;
                    if (target >= 6)
                    {
                        target += 6;
                    }
                    if (PhaseBase.IsIndexFriend(i))
                    {
                        target += 6;
                    }

                    BattleDetails.Add(new BattleDayDetail(_battleData, i, target, new int[] { AttackDamages[i] }, new int[] { CriticalFlags[i] }, -1));
                }
            }
        }
예제 #2
0
        public override void EmulateBattle(int[] hps, int[] damages)
        {
            if (!IsAvailable)
            {
                return;
            }

            // 表示上は逐次ダメージ反映のほうが都合がいいが、AddDamage を逐次的にやるとダメコン判定を誤るため
            int[] currentHP = new int[hps.Length];
            Array.Copy(hps, currentHP, currentHP.Length);

            for (int i = 0; i < Targets.Length; i++)
            {
                if (Targets[i] > 0)
                {
                    int target = Targets[i] - 1;
                    if (target >= 6)
                    {
                        target += 6;
                    }
                    if (PhaseBase.IsIndexFriend(i))
                    {
                        target += 6;
                    }
                    if (PhaseBase.IsIndexEnemy(i) && IsShortFormat && IsCombined)
                    {
                        target += 12;
                    }

                    BattleDetails.Add(new BattleDayDetail(_battleData, i, target, new double[] { AttackDamages[i] + Damages[target] - Math.Floor(Damages[target]) },                            //propagates "guards flagship" flag
                                                          new int[] { CriticalFlags[i] }, -1, null, currentHP[target]));
                    currentHP[target] -= Math.Max(AttackDamages[i], 0);
                }
            }

            for (int i = 0; i < hps.Length; i++)
            {
                AddDamage(hps, i, (int)Damages[i]);
                damages[i] += AttackDamages[i];
            }
        }
        public override void EmulateBattle(int[] hps, int[] damages)
        {
            if (!IsAvailable)
            {
                return;
            }

            // 表示上は逐次ダメージ反映のほうが都合がいいが、AddDamage を逐次的にやるとダメコン判定を誤るため
            int[] currentHP = new int[hps.Length];
            Array.Copy(hps, currentHP, currentHP.Length);

            for (int i = 0; i < Targets.Length; i++)
            {
                if (Targets[i] > 0)
                {
                    int target = Targets[i] - 1;
                    if (target >= 6)
                    {
                        target += 6;
                    }
                    if (PhaseBase.IsIndexFriend(i))
                    {
                        target += 6;
                    }

                    BattleDetails.Add(new BattleDayDetail(_battleData, i, target, new int[] { AttackDamages[i] }, new int[] { CriticalFlags[i] }, -1, currentHP[target]));
                    currentHP[target] -= Math.Max(AttackDamages[i], 0);
                }
            }

            for (int i = 0; i < hps.Length; i++)
            {
                AddDamage(hps, i, Damages[i]);
                damages[i] += AttackDamages[i];
            }
        }