Advertisement
Guest User

Untitled

a guest
Feb 14th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. def gravity_waves(game):
  2. pirate1 = game.get_my_pirate_by_id(1)
  3. pirate2 = game.get_my_pirate_by_id(2)
  4. pirate3 = game.get_my_pirate_by_id(3)
  5. ms = game.get_my_motherships()[0]
  6. c0 = game.get_my_capsules()[0].initial_location.towards(ms, 100)
  7. p3loc = c0.towards(ms, 300)
  8. if pirate1.is_alive():
  9. if pirate1.has_capsule():
  10. pirate1.sail(ms)
  11. else:
  12. pirate1.sail(c0)
  13. if pirate3.is_alive():
  14. if pirate1.has_capsule():
  15. pirate3.sail(ms)
  16. else:
  17. pirate3.sail(p3loc)
  18. if pirate2.is_alive():
  19. if pirate1.has_capsule():
  20. pirate2.sail(ms)
  21. else:
  22. pirate2.sail(p3loc)
  23. pirate4 = game.get_my_pirate_by_id(4)
  24. pirate5 = game.get_my_pirate_by_id(5)
  25. pirate6 = game.get_my_pirate_by_id(6)
  26. enemies = game.get_enemy_living_pirates()
  27. loc = game.get_enemy_capsules()[0].initial_location
  28. pus = game.get_living_asteroids()[0].initial_location
  29. if pirate4.is_alive():
  30. if not pirate4.get_location() == loc:
  31. pirate4.sail(loc)
  32. else:
  33. for enemy in enemies:
  34. if pirate4.can_push(enemy):
  35. pirate4.push(enemy, pus)
  36. if pirate5.is_alive():
  37. if not pirate5.get_location() == loc:
  38. pirate5.sail(loc)
  39. else:
  40. for enemy in enemies:
  41. if pirate5.can_push(enemy):
  42. pirate5.push(enemy, pus)
  43. if pirate6.is_alive():
  44. if not pirate6.get_location() == loc:
  45. pirate6.sail(loc)
  46. else:
  47. for enemy in enemies:
  48. if pirate6.can_push(enemy):
  49. pirate6.push(enemy, pus)
  50.  
  51.  
  52. def graviton(game):
  53. players = game.get_my_living_pirates()
  54. ms = game.get_my_motherships()[0]
  55. cap = game.get_my_capsules()[0]
  56. wm = game.get_all_wormholes()
  57. w2 = wm[2]
  58. w3 = wm[3]
  59. for p in players:
  60. loc = p.get_location()
  61. if p.has_capsule():
  62. if loc.col >= 3200:
  63. p.sail(ms)
  64. elif w2.is_active:
  65. p.sail(ms)
  66. else:
  67. if loc.col>=3200:
  68. if w3.is_active:
  69. p.sail(w3)
  70. else:
  71. p.sail(cap.initial_location)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement