Advertisement
plirof2

CSSCGC 1D Text Basketball

Jul 12th, 2024 (edited)
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ------------------------------------
  2. |dunk|2pt | 3pt | 3pt |2pt | dunk  |
  3. ------------------------------------
  4.  
  5. In each square :
  6. Shoot ,
  7. Dribble (gives you a bonus to advance if succeed temp +10 in avoid stealing)),
  8. Aim (like dribble but
  9. Advance/Forward,
  10. pass?? (need to impelemnt secind player for each team)
  11. defend
  12. block
  13.  
  14. When att player select to shoot and def pl select block the do the block check
  15. When att player select to dribble and def pl select steal the do the steal check
  16. When att player select to advance and def pl select defence the do the defence check
  17. If nothing is selected the opponent wins
  18.  
  19.  
  20. dribble :
  21.  
  22.  
  23. Player Stats:
  24. steal=block:20
  25. shoot: 50
  26. fail_chance=10 (this is substaracted in each steal/shoot/dribble attempt)
  27.  
  28.  
  29. skill2pt=
  30. skill3pt=Shoot*(40/100)
  31.  
  32. Team Skill : 5 games all stats are +10 in each round
  33.  
  34.  
  35. funtion get_current_round(){
  36. return current_round;
  37. }
  38.  
  39. function next_round_stats(){
  40. round=get_current_round();
  41.  
  42.  
  43. }
  44.  
  45. function dice(num)
  46. {
  47. return int(rnd*num);
  48. }
  49.  
  50.  
  51. function dribble(def_block){
  52. success=0;
  53. round=get_current_round();
  54. check=dice(100)*def_block-dice(fail_chance);
  55. if (check>20) success=1;
  56.  
  57. return success;
  58.  
  59. }
  60.  
  61.  
  62.  
  63. function shoot(att_shoot,def_block)
  64. {
  65. success=0;
  66. check=dice(100)*att_shoot-dice(100)*def_block-dice(fail_chance);
  67. if (check>50) success=1;
  68.  
  69. return success;
  70. }
  71.  
  72. function player_score_attempt(att_shoot,def_block,points=2)
  73. {
  74.  
  75. return 2*shoot(att_shoot,def_block); //
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement