Beispiel #1
0
        public void sync(Player o)
        {
            id      = o.id;
            name    = o.name;
            state   = o.state;
            message = o.message;
            ai      = o.ai;
            for (int i = 0; i < items.Length; i++)
            {
                items[i] = o.items[i];
            }
            //
            fdead              = o.fdead;
            deadReason         = o.deadReason;
            deadid             = o.deadid;
            discoverer         = o.discoverer;
            murderer           = o.murderer;
            murdererTurn       = o.murdererTurn;
            dayDiscovere       = o.dayDiscovere;
            dayDead            = o.dayDead;
            dayKill            = o.dayKill;
            dayMurdererSuccess = o.dayMurdererSuccess;
            dayUseItem         = o.dayUseItem;

            dayNoonCount = o.dayNoonCount;
            dayNightVote = o.dayNightVote;
            dayMidKnifeP = o.dayMidKnifeP;
            //
            net_opp  = o.net_opp;
            net_item = o.net_item;
        }
Beispiel #2
0
 // dead
 public void dead(DEAD_REASON reason, int p2)
 {
     dayDead    = true;
     fdead      = true;
     deadReason = reason;
     deadid     = p2;
     discoverer = 0;
 }
Beispiel #3
0
        private void killSub(Player murderer, Player opponent, ITEM murdere_item)
        {
            // kill
            murderer.addMessage(opponent.name + "さんの殺害に成功しました");
            murderer.killSuccess(opponent.id);
            murderer.state      = PLAYER_STATE.MIDNIGHT_KILL_ITEM_SELECT;
            murderer.dayUseItem = ITEM.NONE;
            DEAD_REASON reason = DEAD_REASON.NONE;

            if (murdere_item == ITEM.KNIFE)
            {
                reason = DEAD_REASON.KNIFE;
            }
            else if (murdere_item == ITEM.MURDERE_KNIFE)
            {
                reason = DEAD_REASON.MURDERER_KNIFE;
                murderer.dayMurdererSuccess = true;
            }

            // die
            int oppo_item_mknife_index = opponent.getItemIndex(ITEM.MURDERE_KNIFE);

            if (oppo_item_mknife_index != -1)
            {
                // 手放す
                opponent.setItem(oppo_item_mknife_index, ITEM.NONE);

                //自分も死んでればランダム
                if (murderer.fdead)
                {
                    randMurdererKnifeMove();
                }
                else
                {
                    // 殺人包丁をもっている場合は手に入れる
                    murderer.addItem(ITEM.MURDERE_KNIFE);
                    murderer.addMessage(opponent.name + "さんは狂気の殺人包丁を持っていました");
                    murderer.addMessage("狂気の殺人包丁を手に入れました");
                }
            }
            //アイテムをなくす
            opponent.dead(reason, murderer.id);
            opponent.addMessage("あなたは殺されました");
            opponent.state = PLAYER_STATE.MIDNIGHT_KILL_ITEM_SELECT_WAIT;
        }