コード例 #1
0
ファイル: Player.cs プロジェクト: AidanMM/ProjectGreco
        public void UseSkill(int skillIndex)
        {
            if (availableSkills.Count == 0)
            {
                return;
            }
            if (skillIndex >= availableSkills.Count)
            {
                skillIndex = availableSkills.Count - 1;
            }
            switch (availableSkills[skillIndex])
            {
            case ActionSkills.ChaoticReset:
                ChaoticReset myChaoticReset = new ChaoticReset(this);
                break;

            case ActionSkills.ConfuseRay:
                ConfuseRay myConfuseRay = new ConfuseRay(this);
                break;

            case ActionSkills.Exile:
                Exile myExile = new Exile(this);
                break;

            case ActionSkills.Ghost:
                Ghost myGhost = new Ghost(this);
                break;

            case ActionSkills.LightJump:
                LightJump myLightJump = new LightJump(this);
                break;

            case ActionSkills.LightWall:
                LightWall myLightWall = new LightWall(this);
                break;

            case ActionSkills.ShadowDagger:
                ShadowDagger myShadowDagger = new ShadowDagger(this);
                break;

            case ActionSkills.ShadowHold:
                ShadowHold myShadowHold = new ShadowHold(this);
                break;

            case ActionSkills.ShadowPush:
                ShadowPush myShadowPush = new ShadowPush(this);
                break;

            default:
                break;
            }
        }
コード例 #2
0
ファイル: ActiveGame.cs プロジェクト: Stormmworld/GameRoom
        public ActiveGame()
        {
            ActivePlayerIndex = 0;
            Ante              = new Ante();
            Exile             = new Exile();
            Stack             = new Stack();
            ActivePhase       = GamePhases.None;
            OverrideNextPhase = GamePhases.None;

            _PendingActions     = new List <IPendingAction>();
            _Players            = new List <Player>();
            _SkipPhases         = new List <GamePhases>();
            _Modifiers          = new List <GameModifier>();
            _ActiveEffects      = new List <Effect>();
            _Attackers          = new List <AttackingCreature>();
            _UpkeepRequirements = new List <UpkeepRequirement>();
        }
コード例 #3
0
        public BuddyInfo(Widget parent) : base(parent)
        {
            av = new AvatarView(this);

            tbName = new TextBox(this);
            tbName.Move(10, 100);
            tbName.Resize(150, 20);
            tbName.KeyDown += OnNameTextBoxKeyDown;

            btnChat = new Button(this, 20);
            btnChat.Move(10, 165);
            btnChat.Text   = "Private chat";
            btnChat.Click += () => Chat.Raise();

            btnRemove = new Button(this, 20);
            btnRemove.Move(10, 188);
            btnRemove.Click += () => RemoveBuddy.Raise();

            btnInvite = new Button(this, 20);
            btnInvite.Move(10, 211);
            btnInvite.Text   = "Invite to party";
            btnInvite.Click += () => Invite.Raise();

            btnDescribe = new Button(this, 20);
            btnDescribe.Move(10, 234);
            btnDescribe.Text   = "Describe to...";
            btnDescribe.Click += () => Describe.Raise();

            btnExile = new Button(this, 20);
            btnExile.Move(10, 257);
            btnExile.Text   = "Exile";
            btnExile.Click += () => Exile.Raise();

            lblLastSeen          = new Label(this, Fonts.LabelText);
            lblLastSeen.AutoSize = true;
            lblLastSeen.Move(10, 150);

            groupSelector = new GroupSelector(this);
            groupSelector.Move(8, 128);
            groupSelector.Select += group => ChangeGroup.Raise(group);

            Clear();
        }
コード例 #4
0
        void r_RSET(object sender, serverReturnEventArgs e)
        {
            Application.Current.Dispatcher.Invoke(new Action(delegate()
            {
                Deck.Clear();
                Hand.Clear();
                MyBoard.Clear();
                OppBoard.Clear();
                Exile.Clear();
                Grave.Clear();
                MYPV  = 20;
                HISPV = 20;
            }), null);
            MoveToEventArgs args = new MoveToEventArgs("Room");
            EventHandler <MoveToEventArgs> handler = this.getMoveTo();

            if (handler != null)
            {
                handler(this, args);
            }
        }
コード例 #5
0
ファイル: ActiveGame.cs プロジェクト: Stormmworld/GameRoom
        private void OnAddCardToZone(object sender, EventArgs e)
        {
            AddCardToZoneEventArgs args = (AddCardToZoneEventArgs)e;

            switch (args.TargetZone)
            {
            case TargetZone.Ante:
                Ante.Add(args.Card);
                break;

            case TargetZone.Battlefield:
                args.ZoneOwner.Battlefield.Add(args.Card);
                break;

            case TargetZone.Command:
                args.ZoneOwner.Command.Add(args.Card);
                break;

            case TargetZone.Exile:
                Exile.Add(args.Card);
                break;

            case TargetZone.Graveyard:
                args.ZoneOwner.Graveyard.Add(args.Card);
                break;

            case TargetZone.Hand:
                args.ZoneOwner.Hand.Add(args.Card);
                break;

            case TargetZone.Library:
                args.ZoneOwner.Library.Add(args.Card);
                break;

            case TargetZone.Stack:
                Stack.Add(args.Card);
                break;
            }
        }