Beispiel #1
0
        public void Update(Card card)
        {
            var a = Anyfin?.Update(card) ?? false;
            var b = NZoth?.Update(card) ?? false;
            var c = Resurrect?.Update(card) ?? false;

            if (!(a || b || c))
            {
                Normal?.Update(card);
            }
        }
Beispiel #2
0
        public void PlayerGraveyardUpdate(Card card)
        {
            var any    = Anyfin?.Update(card) ?? false;
            var nzoth  = NZoth?.Update(card) ?? false;
            var rez    = Resurrect?.Update(card) ?? false;
            var guldan = Guldan?.Update(card) ?? false;

            if (!(any || nzoth || rez || guldan))
            {
                Normal?.Update(card);
            }
        }
Beispiel #3
0
        public Graveyard()
        {
            // Create container
            _verticalEnemy                 = new StackPanel();
            _verticalEnemy.Orientation     = Orientation.Vertical;
            _verticalEnemy.RenderTransform = new ScaleTransform(
                Config.Instance.OverlayOpponentScaling / 100,
                Config.Instance.OverlayOpponentScaling / 100);
            Core.OverlayCanvas.Children.Add(_verticalEnemy);

            // Stick to the Right of the player panal
            var border = Core.OverlayCanvas.FindName("BorderStackPanelOpponent") as Border;

            DependencyPropertyDescriptor.FromProperty(Canvas.LeftProperty, typeof(Border))
            .AddValueChanged(border, Layout);
            DependencyPropertyDescriptor.FromProperty(Canvas.TopProperty, typeof(Border))
            .AddValueChanged(border, Layout);
            DependencyPropertyDescriptor.FromProperty(StackPanel.ActualWidthProperty, typeof(StackPanel))
            .AddValueChanged(_verticalEnemy, Layout);

            // Create container
            _vertical                 = new StackPanel();
            _vertical.Orientation     = Orientation.Vertical;
            _vertical.RenderTransform = new ScaleTransform(
                Config.Instance.OverlayPlayerScaling / 100,
                Config.Instance.OverlayPlayerScaling / 100);
            Core.OverlayCanvas.Children.Add(_vertical);

            // Stick to the left of the player panal
            border = Core.OverlayCanvas.FindName("BorderStackPanelPlayer") as Border;
            DependencyPropertyDescriptor.FromProperty(Canvas.LeftProperty, typeof(Border))
            .AddValueChanged(border, Layout);
            DependencyPropertyDescriptor.FromProperty(Canvas.TopProperty, typeof(Border))
            .AddValueChanged(border, Layout);
            DependencyPropertyDescriptor.FromProperty(StackPanel.ActualWidthProperty, typeof(StackPanel))
            .AddValueChanged(_vertical, Layout);

            // Connect events
            GameEvents.OnGameStart.Add(Reset);
            GameEvents.OnGameEnd.Add(Reset);
            DeckManagerEvents.OnDeckSelected.Add(d => Reset());
            GameEvents.OnPlayerPlayToGraveyard.Add(Update);

            GameEvents.OnOpponentPlayToGraveyard.Add(c => {
                Anyfin?.Update(c);
                Enemy?.Update(c);
            });
            GameEvents.OnPlayerPlay.Add(c => Anyfin?.UpdateDamage());
            GameEvents.OnOpponentPlay.Add(c => Anyfin?.UpdateDamage());
        }
Beispiel #4
0
        public void PlayerGraveyardUpdate(Card card)
        {
            var any    = Anyfin?.Update(card) ?? false;
            var nzoth  = NZoth?.Update(card) ?? false;
            var hadr   = Hadronox?.Update(card) ?? false;
            var guldan = Guldan?.Update(card) ?? false;
            var rez    = Resurrect?.Update(card) ?? false;
            var ninel  = NineLives?.Update(card) ?? false;
            var witch  = WitchingHour?.Update(card) ?? false;

            if (!(any || nzoth || hadr || guldan || rez || ninel || witch))
            {
                Normal?.Update(card);
            }
        }
Beispiel #5
0
        public void PlayerGraveyardUpdate(Card card)
        {
            var any         = Anyfin?.Update(card) ?? false;
            var deathrattle = Deathrattle?.Update(card) ?? false;
            var nzoth       = NZoth?.Update(card) ?? false;
            var hadr        = Hadronox?.Update(card) ?? false;
            var guldan      = Guldan?.Update(card) ?? false;
            var rez         = Resurrect?.Update(card) ?? false;
            var mulch       = Mulchmuncher?.Update(card) ?? false;
            var kangor      = Kangor?.Update(card) ?? false;
            var witching    = WitchingHour?.Update(card) ?? false;

            if (!(any || deathrattle || nzoth || hadr || guldan || rez || mulch || kangor || witching))
            {
                Normal?.Update(card);
            }
        }
Beispiel #6
0
        public void PlayerGraveyardUpdate(Card card)
        {
            var any           = Anyfin?.Update(card) ?? false;
            var deathrattle   = Deathrattle?.Update(card) ?? false;
            var nzoth         = NZoth?.Update(card) ?? false;
            var hadr          = Hadronox?.Update(card) ?? false;
            var guldan        = Guldan?.Update(card) ?? false;
            var rez           = Resurrect?.Update(card) ?? false;
            var mulch         = Mulchmuncher?.Update(card) ?? false;
            var kangor        = Kangor?.Update(card) ?? false;
            var witching      = WitchingHour?.Update(card) ?? false;
            var hoardpillager = HoardPillager?.Update(card) ?? false;
            var nzothgotd     = NZothGotD?.Update(card) ?? false;
            var rally         = Rally?.Update(card) ?? false;
            var saurfang      = Saurfang?.Update(card) ?? false;

            if (!(any || deathrattle || nzoth || hadr || guldan || rez || mulch || kangor || witching || hoardpillager || nzothgotd || rally || saurfang))
            {
                Normal?.Update(card);
            }
        }
Beispiel #7
0
        public void PlayerGraveyardUpdate(Card card)
        {
            var any         = Anyfin?.Update(card) ?? false;
            var deathrattle = Deathrattle?.Update(card) ?? false;

            LastPlayed?.UpdateMonstrousParrot(card);
            var nzoth         = NZoth?.Update(card) ?? false;
            var hadr          = Hadronox?.Update(card) ?? false;
            var guldan        = Guldan?.Update(card) ?? false;
            var rez           = Resurrect?.Update(card) ?? false;
            var mulch         = Mulchmuncher?.Update(card) ?? false;
            var kangor        = Kangor?.Update(card) ?? false;
            var witching      = WitchingHour?.Update(card) ?? false;
            var hoardpillager = HoardPillager?.Update(card) ?? false;
            var nzothgotd     = NZothGotD?.Update(card) ?? false;
            var rally         = ((rez && RallyView.IsAlwaysSeparate) || !rez) && (Rally?.Update(card) ?? false);
            var saurfang      = Saurfang?.Update(card) ?? false;
            var elwynnboar    = ((deathrattle && ElwynnBoarView.IsAlwaysSeparate) || !deathrattle) && (ElwynnBoar?.Update(card) ?? false);

            if (!(any || deathrattle || nzoth || hadr || guldan || rez || mulch || kangor || witching || hoardpillager || nzothgotd || rally || saurfang || elwynnboar))
            {
                Normal?.Update(card);
            }
        }
Beispiel #8
0
 public void EnemyGraveyardUpdate(Card card)
 {
     Anyfin?.Update(card);
     Enemy?.Update(card);
 }