コード例 #1
0
        public void CheckAuroState()
        {
            foreach (LiveMonster mon in BattleManager.Instance.MonsterQueue.Enumerator)
            {
                if (mon.IsGhost || mon.Id == self.Id)
                {
                    continue;
                }
                if (target[0] != 'A' &&
                    ((BattleTargetManager.IsSpellEnemyMonster(target[0]) && self.IsLeft == mon.IsLeft) ||
                     (BattleTargetManager.IsSpellFriendMonster(target[0]) && self.IsLeft != mon.IsLeft)))
                {
                    continue;
                }
                if (targetMonsterId != 0 && mon.Avatar.Id != targetMonsterId)
                {
                    continue;
                }
                if (mon.Star > starMax || mon.Star < starMin)
                {
                    continue;
                }
                if (raceList.Count > 0 && !raceList.Contains((CardTypeSub)mon.Avatar.MonsterConfig.Type))
                {
                    continue;
                }
                if (attrList.Count > 0 && !attrList.Contains((CardElements)mon.Avatar.MonsterConfig.Attr))
                {
                    continue;
                }

                mon.AddBuff(buffId, level, 0.05);
            }
        }
コード例 #2
0
        public MonsterCollection GetRangeMonsterGhost(bool isLeft, string target, string shape, int range, Point mouse)
        {
            List <IMonster> monsters = new List <IMonster>();
            RegionTypes     rt       = BattleTargetManager.GetRegionType(shape[0]);

            foreach (var mon in BattleManager.Instance.MonsterQueue.Enumerator)
            {
                if (!mon.IsGhost)
                {
                    continue;
                }

                if ((BattleTargetManager.IsSpellEnemyMonster(target[0]) && isLeft != mon.Owner.IsLeft) || (BattleTargetManager.IsSpellFriendMonster(target[0]) && isLeft == mon.Owner.IsLeft))
                {
                    if (!BattleLocationManager.IsPointInRegionType(rt, mouse.X, mouse.Y, mon.Position, range, isLeft))
                    {
                        continue;
                    }

                    monsters.Add(mon);
                }
            }

            return(new MonsterCollection(monsters, mouse));
        }