Generate Heist Language: Ada Assembly Bash C# C++ (gcc) C++ (clang) C++ (vc++) C (gcc) C (clang) C (vc) Client Side Clojure Common Lisp D Elixir Erlang F# Fortran Go Haskell Java Javascript Kotlin Lua MySql Node.js Ocaml Octave Objective-C Oracle Pascal Perl Php PostgreSQL Prolog Python Python 3 R Rust Ruby Scala Scheme Sql Server Swift Tcl Visual Basic Layout: Vertical Horizontal /* package whatever; // don't place package name! */ import java.io.*; import java.util.*; class Rextester { public static void main(String[] args){ generateHeist(); } public static void generateHeist(){ System.out.println("The target is: "); generateTarget(d6()); System.out.println("But here's the sitch, It's guarded by: "); generateCatch(d6()); System.out.println("We're going to do this because: "); generateMotivation(d6()); System.out.println("We're being hired because: "); generateBenefactorMotivation(d6()); System.out.println("Unfortunately, there's a wrinkle in the plan: "); generateWrinkle(d6()); System.out.println("The location is: "); generateLocation(d6()); System.out.println("You should know this about the target's current owner: "); generateOwner(d6()); System.out.println("We will succeed where others have failed because we've beeen given a: "); generateAdvantage(d6()); System.out.println("If we're caught, the defenders will attempt to: "); generateDefenderMethod(d6()); System.out.println("But the party doesn't know: "); generateUnknown(d6()); System.out.println("The target would be impossible to steal, if it wasn't for one weakness: "); generateWeakness(d6()); } public static int d6(){ Random rand = new Random(); int result = rand.nextInt(6) + 1; //System.out.println(result); return result; } public static void generateTarget(int x){ if(x == 1) System.out.println("A Magic item"); else if(x == 2) System.out.println("A person (rescue/capture mission)"); else if(x == 3) System.out.println("A Weapon"); else if(x == 4) System.out.println("A Piece of art"); else if (x == 5) System.out.println("A Reverse heist: Plant an object"); else System.out.println("No target, just steal a lot"); } public static void generateCatch(int x){ if(x == 1) System.out.println("Magic"); else if(x == 2) System.out.println("Riddle"); else if(x == 3) System.out.println("Masterwork Lock"); else if(x == 4) System.out.println("Traps"); else if (x == 5) System.out.println("Monsters"); else System.out.println("Rival adventuring party"); } public static void generateMotivation(int x){ if(x == 1) System.out.println("Wealth"); else if(x == 2) System.out.println("Thwart evil"); else if(x == 3) System.out.println("Revenge"); else if(x == 4) System.out.println("Fame/prestige"); else if (x == 5) System.out.println("Powerful Item"); else System.out.println("Impress a benefactor"); } public static void generateBenefactorMotivation(int x){ if(x == 1) System.out.println("Evil; the party is unwittingly furthering the cause of evil"); else if(x == 2) System.out.println("Red herring; the heist is a distraction from another plot"); else if(x == 3) System.out.println("Betray party; it's a set up!"); else if(x == 4) System.out.println("Test; benefactor wants to test the party before giving them a more important mission"); else if (x == 5) System.out.println("Test; benefactor is sending the party to steal from himself to test his own defenses"); else System.out.println("Discredit a rival"); } public static void generateWrinkle(int x){ if(x == 1) System.out.println("Time constraint; heist needs to be done too soon for proper planning/prep"); else if(x == 2) System.out.println("Too many innocents; the target is surrounded by bystanders and innocents"); else if(x == 3) System.out.println("The target knows the party's face/names/exploits"); else if(x == 4) System.out.println("If the party is detected, there's a limited amount of time to complete the heist"); else if (x == 5) System.out.println("The target is protected by some kind of shadowy contractor"); else System.out.println("The target is inherently dangerous to handle"); } public static void generateLocation(int x){ if(x == 1) System.out.println("Public; the target is on display, out in the open, like in a museum"); else if(x == 2) System.out.println("Secret; the target is being kept somewhere well hidden"); else if(x == 3) System.out.println("Magical; the target is in a pocket dimension, another plane, or in a dragon's dream"); else if(x == 4) System.out.println("Religious; the target is in a church, cultist hangout, or some other location of religious significance"); else if (x == 5) System.out.println("Inhospitable; the target is on a dangerous plane, in blizzard-wracked mountains, the underdark, or somewhere else where no one wants to go"); else System.out.println("Important; the target is in a government building, dragon's hoard, or somewhere else that is doubly protected because the location itself is important"); } public static void generateOwner(int x){ if(x == 1) System.out.println("Evil"); else if(x == 2) System.out.println("Good"); else if(x == 3) System.out.println("Naive; doesn't know what the object is or if it's dangerous"); else if(x == 4) System.out.println("A thief/adventurer/pirate"); else if (x == 5) System.out.println("An outsider (fiend, celestial, aberration, etc)"); else System.out.println("A friend from the party's past"); } public static void generateAdvantage(int x){ if(x == 1) System.out.println("Secret passcode to circumvent some challenges"); else if(x == 2) System.out.println("A magic item to help overcome defenses/obstacles"); else if(x == 3) System.out.println("An infiltration device, like a Ring of Waterbreathing"); else if(x == 4) System.out.println("A mole working from inside the defenses"); else if (x == 5) System.out.println("A distraction to draw defenders/resources away"); else System.out.println("Surprise; no else is dumb enough to attempt this heist"); } public static void generateDefenderMethod(int x){ if(x == 1) System.out.println("Kill"); else if(x == 2) System.out.println("Arrest"); else if(x == 3) System.out.println("Add party to the exhibits"); else if(x == 4) System.out.println("Kick party out"); else if (x == 5) System.out.println("Try to buy out the party's loyalty"); else System.out.println("Destroy the exhibit before it can be stolen"); } public static void generateUnknown(int x){ if(x == 1) System.out.println("Trick; the target isn't what the owner or the party thinks it is"); else if(x == 2) System.out.println("Desired by a powerful enemy; the heist upsets something much worse than the previous owner"); else if(x == 3) System.out.println("Fake; the target is a dud"); else if(x == 4) System.out.println("The target wanted to be put on display/captured/heisted"); else if (x == 5) System.out.println("The target is extremely dangerous"); else System.out.println("The target can't be taken by itself; the party will need to steal more than they bargained for"); } public static void generateWeakness(int x){ if(x == 1) System.out.println("Aquatic; the target's location can be infiltrated by swimming or diving"); else if(x == 2) System.out.println("Arial; the target's location can be infiltration by flying or dropping in"); else if(x == 3) System.out.println("Magical; the target isn't protected against teleportation, or the defendors can be defeated with illusions"); else if(x == 4) System.out.println("Low quality guards; intimidation, bribes, or deception can defeat most of the defendors"); else if (x == 5) System.out.println("A party/event; an invitation or costume can get the party close"); else System.out.println("The target location shares a wall/compound with a less well defended location (an office attached to a bank, a museum over a tunnel/cave system)"); } } [ + ] Show input Compilation time: 0.62 sec, absolute running time: 0.13 sec, cpu time: 0.06 sec, memory peak: 19 Mb, absolute service time: 0,76 sec edit mode | history The target is: A Reverse heist: Plant an object But here's the sitch, It's guarded by: Masterwork Lock We're going to do this because: Revenge We're being hired because: Test; benefactor wants to test the party before giving them a more important mission Unfortunately, there's a wrinkle in the plan: Time constraint; heist needs to be done too soon for proper planning/prep The location is: Religious; the target is in a church, cultist hangout, or some other location of religious significance You should know this about the target's current owner: A friend from the party's past We will succeed where others have failed because we've beeen given a: A magic item to help overcome defenses/obstacles If we're caught, the defenders will attempt to: Kick party out But the party doesn't know: Trick; the target isn't what the owner or the party thinks it is The target would be impossible to steal, if it wasn't for one weakness: Arial; the target's location can be infiltration by flying or dropping in