Esempio n. 1
0
 // Function from file: holo_effect.dm
 public override dynamic activate(Obj_Machinery_Computer_Holodeck HC = null)
 {
     this.D = new Obj_Item_Toy_Cards_Deck(this.loc);
     this.safety(!Lang13.Bool(HC.emagged) ?1:0);
     this.D.holo = HC;
     return(this.D);
 }
Esempio n. 2
0
        // Function from file: toys.dm
        public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null)
        {
            dynamic choice = null;
            Obj_Item_Toy_Cards_Singlecard H = null;
            Obj_Item_Toy_Cards_Deck       O = null;


            if (Lang13.Bool(a.lying))
            {
                return(null);
            }
            choice = null;

            if (this.cards.len == 0)
            {
                this.icon_state = "deck_" + this.deckstyle + "_empty";
                a.WriteMsg("<span class='warning'>There are no more cards to draw!</span>");
                return(null);
            }
            H = new Obj_Item_Toy_Cards_Singlecard(a.loc);

            if (this.holo != null)
            {
                this.holo.spawned += H;
            }
            choice       = this.cards[1];
            H.cardname   = choice;
            H.parentdeck = this;
            O            = this;
            H.apply_card_vars(H, O);
            this.cards -= choice;
            H.pickup(a);
            ((Mob)a).put_in_hands(H);
            ((Ent_Static)a).visible_message("" + a + " draws a card from the deck.", "<span class='notice'>You draw a card from the deck.</span>");

            if (this.cards.len > 26)
            {
                this.icon_state = "deck_" + this.deckstyle + "_full";
            }
            else if (this.cards.len > 10)
            {
                this.icon_state = "deck_" + this.deckstyle + "_half";
            }
            else if (this.cards.len > 1)
            {
                this.icon_state = "deck_" + this.deckstyle + "_low";
            }
            return(null);
        }