Advertisement
Treedestroyed

Untitled

Feb 6th, 2019
1,451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class RandomWeekly extends KFGameInfo_ExtendedWeekly;
  2.  
  3. enum EWeeklyOutbreaks
  4. {
  5.     WO_Boom,
  6.     WO_Zombies,
  7.     WO_ShrinkyDinky,
  8.     WO_BigHead,
  9.     WO_PoundAmmonium,
  10.     WO_DeathBalloons,
  11.     WO_ZedTime,
  12.     WO_BeefCake,
  13.     WO_Scrakemonium
  14. };
  15.  
  16. var EWeeklyOutbreaks WeeklyOutbreak;
  17.  
  18. function CreateOutbreakEvent()
  19. {
  20.     local byte WeeklyIndex;
  21.    
  22.     super(KFGameInfo).CreateOutbreakEvent();
  23.    
  24.     WeeklyIndex = Rand(9);
  25.    
  26.     switch( WeeklyIndex )
  27.     {
  28.         case 0:
  29.             WeeklyOutbreak = WO_Boom;
  30.             break;
  31.         case 1:
  32.             WeeklyOutbreak = WO_Zombies;
  33.             break;
  34.         case 2:
  35.             WeeklyOutbreak = WO_ShrinkyDinky;
  36.             break;
  37.         case 3:
  38.             WeeklyOutbreak = WO_BigHead;
  39.             break;
  40.         case 4:
  41.             WeeklyOutbreak = WO_PoundAmmonium;
  42.             break;         
  43.         case 5:
  44.             WeeklyOutbreak = WO_DeathBalloons;
  45.             break;
  46.         case 6:
  47.             WeeklyOutbreak = WO_ZedTime;
  48.             break;
  49.         case 7:
  50.             WeeklyOutbreak = WO_BeefCake;
  51.             break;
  52.         case 8:
  53.             WeeklyOutbreak = WO_Scrakemonium;
  54.             break;
  55.     }
  56. }
  57.        
  58. static function int GetWeeklyIndex()
  59. {
  60.     switch( default.WeeklyOutbreak )
  61.     {
  62.         case WO_Boom:
  63.             return 0;
  64.         case WO_Zombies:
  65.             return 1;  
  66.         case WO_ShrinkyDinky:
  67.             return 2;
  68.         case WO_BigHead:
  69.             return 3;  
  70.         case WO_PoundAmmonium:
  71.             return 4;
  72.         case WO_DeathBalloons:
  73.             return 5;  
  74.         case WO_ZedTime:
  75.             return 6;
  76.         case WO_BeefCake:
  77.             return 7;  
  78.         case WO_Scrakemonium:
  79.             return 8;          
  80.     }
  81. }
  82.  
  83. function WaveStarted()
  84. {
  85.     local byte WeeklyIndex;
  86.    
  87.     super.WaveStarted();
  88.    
  89.     WeeklyIndex = static.GetWeeklyIndex();
  90.     OutbreakEvent.SetActiveEvent( WeeklyIndex );
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement