Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. System.out.println(ch1.getName()+ "'s CL:" + Dm1);
  2. System.out.println(" ");
  3. CL1=CL1 - y;
  4. Dm1=CL1;
  5. //player 1 attacks player 2 with random roll of dice times 4
  6. System.out.println("JOE Attack:");
  7.  
  8.  
  9. System.out.println( ch1.getName() + " Attacks " + ch2.getName1());
  10. System.out.println("Attacks:" + (x= A1 + dice.roll2()));
  11. System.out.println(ch2.getName1()+ "'s CL:" + Dm2);
  12. System.out.println(" ");
  13. CL2=CL2 - x;
  14. Dm2=CL2;
  15. }}
  16. ctr++;
  17. System.out.println("BATTLE" +"__" +ctr);
  18.  
  19. }while(CL2 > 1 & CL1 >1);
  20.  
  21. /////////////////////////////////////////////////////////////////////////
  22. int R = dice.roll1();
  23. if(R >2)
  24. {
  25. if(Dm1 < Mx1 || CL1 > 0)
  26. {
  27. Dm1 = CL1 + HL1;
  28.  
  29. if(Dm1 > Mx1){
  30. Dm1 = CL1;
  31. System.out.println("Joe Heals_" + HL1);
  32. System.out.println("Joe's Health is_" + Dm1);
  33. }
  34. else
  35. {
  36. if(CL1 > 0)
  37. {
  38. System.out.println("Joe Heals" + HL1);
  39. System.out.println("Joe's Health is" + Dm1);
  40. }
  41. }
  42. }
  43. }
  44. /////////////////////////////////////////////////////////////////////////
  45. int W = dice.roll1();
  46. if(W >2)
  47. {
  48. if(Dm2 < Mx2 || CL2 > 0)
  49. {
  50. Dm2 = CL2 + HL2;
  51.  
  52. if(Dm2 > Mx2){
  53. Dm2 = CL2;
  54. System.out.println("Joe Heals_" + HL2);
  55. System.out.println("Joe's Health is_" + Dm2);
  56. }
  57. else
  58. {
  59. if(CL2 > 0)
  60. {
  61. System.out.println("Joe Heals" + HL2);
  62. System.out.println("Joe's Health is" + Dm2);
  63. }
  64. }
  65. }
  66. }
  67.  
  68. ////////////////////////////////////////////////////////////////////////////
  69.  
  70. if(CL1 == CL2)
  71. {
  72. System.out.println("____DRAW!?!?!?!?!_____");
  73. }
  74. if(CL1 > CL2 )
  75. {
  76. System.out.println("____JOE KICKED BUTT(wins)!!!!!_____");
  77. }
  78. if(CL2 > CL1 )
  79. {
  80. System.out.println("____BOB KICKED BUTT (wins)!!!!!_____");
  81. }
  82.  
  83.  
  84.  
  85.  
  86. }
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. }
  97.  
  98.  
  99.  
  100. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement