public void discard(dynamic card = null) { Obj_Item_Weapon_Hand H = null; if (!Lang13.Bool(card)) { return; } H = new Obj_Item_Weapon_Hand(this.loc); H.concealed = false; H.update_conceal(); H.cards.Add(card); this.cards.Remove(card); H.update_icon(); if (!(H != null)) { Task13.Crash("" + "code/modules/games/cards.dm" + ":" + 169 + ":Assertion Failed: " + "H"); } Task13.User.visible_message(new Txt().The(Task13.User).item().str(" plays ").the(card.name).item().str(".").ToString()); H.loc = Map13.GetStep(Task13.User, Task13.User.dir); this.update_icon(); return; }
// Function from file: cards.dm public void dealTo(dynamic target = null, dynamic source = null) { dynamic card = null; Obj_Item_Weapon_Hand H = null; if (!(this.cards.len != 0)) { source.show_message("There are no cards in the deck."); return; } card = this.cards[1]; this.cards.Remove(card); H = new Obj_Item_Weapon_Hand(GlobalFuncs.get_turf(this)); H.concealed = true; H.update_conceal(); H.cards.Add(card); H.update_icon(); ((Ent_Static)source).visible_message(new Txt().The(source).item().str(" deals a card to ").the(target).item().str(".").ToString()); H.throw_at(Map13.GetStep(target, Convert.ToInt32(target.dir)), 10, 1, source); return; }