Loading

Revision differences

Old revision #pxeshf1ozNew revision #pr1k87qsc
10  10  
11  11  
12  12  
  13  
  14  
13// upgrade gen3->gen4, using probability 1 in 4  15// upgrade gen3->gen4, using probability 1 in 4  
14random_switch(FEAT_, SELF, randup4, bitmask(TRIGGER_VEHICLE_SERVICE)){  16random_switch(FEAT_, SELF, randup4, bitmask(TRIGGER_VEHICLE_SERVICE)){  
154:generation3;  174:generation3;  
16}  18}  
17    
18// upgrade gen3->gen4 available?  19// upgrade gen3->gen4 available?  
19switch(FEAT_, SELF, testup4, current_year){  20switch(FEAT_, SELF, testup4, current_year){  
200..(YEAR_GEN4-1):generation3;  210..(YEAR_GEN4-1):generation3;  
21default:randup4;  22default:randup4;  
22}  23}  
23  24// downgrade gen4->gen3 to fix initial randomness
   25random_switch(FEAT_, SELF, randdown4, bitmask(TRIGGER_VEHICLE_SERVICE)){
   26dependent: randup4;
   274:generation3;
   28}
   29// gen4 already available?
   30switch(FEAT_, SELF, testdown4, current_year){
   310..(YEAR_GEN4-1):randdown4;
   32default:generation4;
   33}
24// at least gen3, already upgraded to gen4?  34// at least gen3, already upgraded to gen4?  
25random_switch(FEAT_, SELF, maybegen4){  35random_switch(FEAT_, SELF, maybegen4){  
26dependent: randup4;  36dependent: randup4;  
273:testup4;  373:testup4;  
281:generation4;  281:testdown4;
29}  39}  
30  40  
31  41  
  
34random_switch(FEAT_, SELF, randup3, bitmask(TRIGGER_VEHICLE_SERVICE)){  44random_switch(FEAT_, SELF, randup3, bitmask(TRIGGER_VEHICLE_SERVICE)){  
354:generation2;  454:generation2;  
36}  46}  
37    
38// upgrade gen2->gen3 available?  47// upgrade gen2->gen3 available?  
39switch(FEAT_, SELF, testup3, current_year){  48switch(FEAT_, SELF, testup3, current_year){  
400..(YEAR_GEN3-1):generation2;  490..(YEAR_GEN3-1):generation2;  
41default:randup3;  50default:randup3;  
42}  51}  
43  52// downgrade gen3->gen2 to fix initial randomness
   53random_switch(FEAT_, SELF, randdown3, bitmask(TRIGGER_VEHICLE_SERVICE)){
   54dependent: randup3;
   554:generation2;
   56}
   57// gen3 already available?
   58switch(FEAT_, SELF, testdown3, current_year){
   590..(YEAR_GEN3-1):randdown3;
   60default:maybegen4;
   61}
44// at least gen2, already upgraded to gen3?  62// at least gen2, already upgraded to gen3?  
45random_switch(FEAT_, SELF, maybegen3){  63random_switch(FEAT_, SELF, maybegen3){  
46dependent: randup3;  64dependent: randup3;  
473:testup3;  653:testup3;  
481:maybegen4;  481:testdown3;
49}  67}  
50  68  
51  69  
  
54random_switch(FEAT_, SELF, randup2, bitmask(TRIGGER_VEHICLE_SERVICE)){  72random_switch(FEAT_, SELF, randup2, bitmask(TRIGGER_VEHICLE_SERVICE)){  
554:generation1;  734:generation1;  
56}  74}  
57    
58// upgrade gen1->gen2 available?  75// upgrade gen1->gen2 available?  
59switch(FEAT_, SELF, testup2, current_year){  76switch(FEAT_, SELF, testup2, current_year){  
600..(YEAR_GEN2-1):generation1;  770..(YEAR_GEN2-1):generation1;  
61default:randup2;  78default:randup2;  
62}  79}  
63  80// downgrade gen2->gen1 to fix initial randomness
   81random_switch(FEAT_, SELF, randdown2, bitmask(TRIGGER_VEHICLE_SERVICE)){
   82dependent: randup2;
   834:generation1;
   84}
   85// gen2 already available?
   86switch(FEAT_, SELF, testdown2, current_year){
   870..(YEAR_GEN2-1):randdown2;
   88default:maybegen3;
   89}
64// at least gen1, already upgraded to gen2?  90// at least gen1, already upgraded to gen2?  
65random_switch(FEAT_, SELF, maybegen2){  91random_switch(FEAT_, SELF, maybegen2){  
66dependent: randup2;  92dependent: randup2;  
673:testup2;  933:testup2;  
681:maybegen3;  681:testdown2;
69}  95}  
70  96  
71  97