public Llatext.Instructions.Instruction Use(string parameter) { if (parameter.Equals("ATM")) { if (InventoryHandling.HasItem("paycheck")) { InevitableGUI.Output("You insert the paycheck into the ATM. You get some cash in return. Hooray"); InventoryHandling.RemoveItem("banknote"); InventoryHandling.RemoveItem("paycheck"); InventoryHandling.AddItem(new InventoryItem("cash", "Money Money Money")); return(new Instruction()); } else { InevitableGUI.Output("You don't have your paycheck"); return(new Instruction()); } } else { InevitableGUI.Output("You can't use that"); return(new Instruction()); } }
public Llatext.Instructions.Instruction Use(string[] items) { if (items.Contains("ATM")) { if (items.Contains("HAMMERDRIVER") && InventoryHandling.HasItem("hammerdriver")) { InevitableGUI.Output("You raise your hammerdriver, but then think better of it"); } else if (items.Contains("PAYCHECK") && InventoryHandling.HasItem("paycheck")) { InevitableGUI.Output("You insert the paycheck into the ATM. You get some cash in return. Hooray"); InventoryHandling.RemoveItem("banknote"); InventoryHandling.RemoveItem("paycheck"); InventoryHandling.AddItem(new InventoryItem("cash", "Money Money Money")); } else { InevitableGUI.Output("That won't work"); } } else if (items.Contains("RECEPTIONIST")) { if (items.Contains("BANKNOTE") && InventoryHandling.HasItem("banknote")) { InevitableGUI.Output("He sneers at you 'That's not nearly enough'"); } else if (items.Contains("CASH") && InventoryHandling.HasItem("cash")) { if (hasKey) { InevitableGUI.Output("You've already paid him"); } else { InevitableGUI.Output("He takes some of your money, handing you the rest and opens a room for you."); InevitableGUI.Output("You can go North now"); hasKey = true; } } else if (items.Contains("HAMMERDRIVER") && InventoryHandling.HasItem("hammerdriver")) { InevitableGUI.Output("You raise the hammerdriver threatiningly. The receptionist fears for his life and pulls out a shotgun from his desk"); InevitableGUI.Output("You are shot. You die"); return(new Instruction(InstructionType.DEATH, "Had too much lead in his diet. Survived till day 0.6")); } else { InevitableGUI.Output("That won't work"); } } else { InevitableGUI.Output("That won't work"); } return(new Instruction()); }
public Llatext.Instructions.Instruction Use(string[] items) { if (items.Contains("pspray")) { if (!InventoryHandling.HasItem("pspray")) { InevitableGUI.Output("You don't have that in your inventory"); return(new Instruction()); } } throw new NotImplementedException(); }
public Llatext.Instructions.Instruction Use(string[] items) { if (items.Contains("BEGGAR") && beggerThere) { if (items.Contains("BANKNOTE")) { if (InventoryHandling.HasItem("banknote")) { InevitableGUI.Output("You hand the beggar the cash. He smiles at you and hands you a Get Out Of Death Free card. He then disappears in a puff of smoke"); InventoryHandling.AddGODFC(); InventoryHandling.RemoveItem("banknote"); beggerThere = false; } else { InevitableGUI.Output("You don't have that item"); } } else if (items.Contains("HAMMERDRIVER")) { if (InventoryHandling.HasItem("hammerdriver")) { InevitableGUI.Output("You whack the beggar with your hammer driver. He runs away screaming"); InevitableGUI.Output("You chase him but eventually give up."); beggerThere = false; } else { InevitableGUI.Output("You don't have that item"); } } else { InevitableGUI.Output("You don't have that item"); } } else { InevitableGUI.Output("You can't use those two together"); } return(new Instruction()); }
public Llatext.Instructions.Instruction Use(string[] items) { if (items.Contains("HAMMERDRIVER")) { if (!InventoryHandling.HasItem("hammerdriver")) { InevitableGUI.Output("You don't have that item"); return(new Instruction()); } if (items.Contains("THUNDERBEAK") || items.Contains("CHICKEN")) { InevitableGUI.Output("The poor chicken! Leave her alone"); return(new Instruction()); } } InevitableGUI.Output("You can't use those two together"); return(new Instruction()); }
public Llatext.Instructions.Instruction Use(string[] items) { if (items.Contains("HAMMERDRIVER") && InventoryHandling.HasItem("hammerdriver")) { if (items.Contains("ATM")) { InevitableGUI.Output("You smash the ATM with the hammerdriver. The ATM's security system kicks in and delivers a high voltage shock through the hammer"); return(new Instruction(InstructionType.DEATH, "ATM Security Victim. Survived till day 1")); } else if (items.Contains("DESK")) { InevitableGUI.Output("The proprietor won't be too happy with you smashing his desk"); return(new Instruction()); } return(new Instruction()); } else { InevitableGUI.Output("That won't work"); return(new Instruction()); } }