The Challenge: -Develop a turn based combat system that implements the following choices that occur during the player's turns: --Fight (Straight Damage) --Item (Use an object from a choice of your design) --Ability (Use an ability from a choice of your design) --Run (Flee the battle)
The Deadline: - 2017-12-14 00:00
The rest is up to you.
Name:
Anonymous2017-12-03 8:50
out: while(true){ println("You've encountered a monster!!"); int health=randInt(10)+5; println("It has "+health+" health!!!"); while(true){ println("WHAT THE FUCK WILL YOU DO NOW??"); println("1. --Fight"); println("2. --Item"); println("3. --Ability"); println("4. --Run"); int choice=getNextInt(); int dmg=0; switch(choice){ case 1: println("You swing your feeble nerd arms at monster!"); dmg=randInt(4); if(dmg==0) println("LOLOL YOU MISSED!"); else println("You did "+dmg+" damage!!!!!!"); break; case 2: println("You use an item!!!"); println("Your item is a SICP snake!!!"); dmg=randInt(2)+1; println("Snake does "+dmg+" damage!!!!!!); break; case 3: println("You use ability!!!!"); println("Your ability is... HAX ANUS"); dmg= health%2==0?3:0; if(dmg==0) println("Monster's anus could not be haxed!"); else println("Monster's anus is haxed for 3 damage!!"); break; case 4: println("You try to run!! *cough*pussy*cough"); if(randInt(1)==0){ println("You get away!!"); continue out; }else{ println("There's no way out!!"); } break; } health-=dmg; if(health<=0){ println("You defeated the monster!!"); break; } println("Monster has "+health+" life remaining!!!"); println("Monster attacks you!!!"); println("The power of SICP protects you!"); } }