Old revision #pxeshf1oz | New 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 |
14 | random_switch(FEAT_, SELF, randup4, bitmask(TRIGGER_VEHICLE_SERVICE)){ | 16 | random_switch(FEAT_, SELF, randup4, bitmask(TRIGGER_VEHICLE_SERVICE)){ |
15 | 4:generation3; | 17 | 4:generation3; |
16 | } | 18 | } |
17 | |||
18 | // upgrade gen3->gen4 available? | 19 | // upgrade gen3->gen4 available? |
19 | switch(FEAT_, SELF, testup4, current_year){ | 20 | switch(FEAT_, SELF, testup4, current_year){ |
20 | 0..(YEAR_GEN4-1):generation3; | 21 | 0..(YEAR_GEN4-1):generation3; |
21 | default:randup4; | 22 | default:randup4; |
22 | } | 23 | } |
23 | 24 | // downgrade gen4->gen3 to fix initial randomness | |
25 | random_switch(FEAT_, SELF, randdown4, bitmask(TRIGGER_VEHICLE_SERVICE)){ | ||
26 | dependent: randup4; | ||
27 | 4:generation3; | ||
28 | } | ||
29 | // gen4 already available? | ||
30 | switch(FEAT_, SELF, testdown4, current_year){ | ||
31 | 0..(YEAR_GEN4-1):randdown4; | ||
32 | default:generation4; | ||
33 | } | ||
24 | // at least gen3, already upgraded to gen4? | 34 | // at least gen3, already upgraded to gen4? |
25 | random_switch(FEAT_, SELF, maybegen4){ | 35 | random_switch(FEAT_, SELF, maybegen4){ |
26 | dependent: randup4; | 36 | dependent: randup4; |
27 | 3:testup4; | 37 | 3:testup4; |
28 | 1: | 28 | 1:testdown4; |
29 | } | 39 | } |
30 | 40 | ||
31 | 41 | … | … |
34 | random_switch(FEAT_, SELF, randup3, bitmask(TRIGGER_VEHICLE_SERVICE)){ | 44 | random_switch(FEAT_, SELF, randup3, bitmask(TRIGGER_VEHICLE_SERVICE)){ |
35 | 4:generation2; | 45 | 4:generation2; |
36 | } | 46 | } |
37 | |||
38 | // upgrade gen2->gen3 available? | 47 | // upgrade gen2->gen3 available? |
39 | switch(FEAT_, SELF, testup3, current_year){ | 48 | switch(FEAT_, SELF, testup3, current_year){ |
40 | 0..(YEAR_GEN3-1):generation2; | 49 | 0..(YEAR_GEN3-1):generation2; |
41 | default:randup3; | 50 | default:randup3; |
42 | } | 51 | } |
43 | 52 | // downgrade gen3->gen2 to fix initial randomness | |
53 | random_switch(FEAT_, SELF, randdown3, bitmask(TRIGGER_VEHICLE_SERVICE)){ | ||
54 | dependent: randup3; | ||
55 | 4:generation2; | ||
56 | } | ||
57 | // gen3 already available? | ||
58 | switch(FEAT_, SELF, testdown3, current_year){ | ||
59 | 0..(YEAR_GEN3-1):randdown3; | ||
60 | default:maybegen4; | ||
61 | } | ||
44 | // at least gen2, already upgraded to gen3? | 62 | // at least gen2, already upgraded to gen3? |
45 | random_switch(FEAT_, SELF, maybegen3){ | 63 | random_switch(FEAT_, SELF, maybegen3){ |
46 | dependent: randup3; | 64 | dependent: randup3; |
47 | 3:testup3; | 65 | 3:testup3; |
48 | 1: | 48 | 1:testdown3; |
49 | } | 67 | } |
50 | 68 | ||
51 | 69 | … | … |
54 | random_switch(FEAT_, SELF, randup2, bitmask(TRIGGER_VEHICLE_SERVICE)){ | 72 | random_switch(FEAT_, SELF, randup2, bitmask(TRIGGER_VEHICLE_SERVICE)){ |
55 | 4:generation1; | 73 | 4:generation1; |
56 | } | 74 | } |
57 | |||
58 | // upgrade gen1->gen2 available? | 75 | // upgrade gen1->gen2 available? |
59 | switch(FEAT_, SELF, testup2, current_year){ | 76 | switch(FEAT_, SELF, testup2, current_year){ |
60 | 0..(YEAR_GEN2-1):generation1; | 77 | 0..(YEAR_GEN2-1):generation1; |
61 | default:randup2; | 78 | default:randup2; |
62 | } | 79 | } |
63 | 80 | // downgrade gen2->gen1 to fix initial randomness | |
81 | random_switch(FEAT_, SELF, randdown2, bitmask(TRIGGER_VEHICLE_SERVICE)){ | ||
82 | dependent: randup2; | ||
83 | 4:generation1; | ||
84 | } | ||
85 | // gen2 already available? | ||
86 | switch(FEAT_, SELF, testdown2, current_year){ | ||
87 | 0..(YEAR_GEN2-1):randdown2; | ||
88 | default:maybegen3; | ||
89 | } | ||
64 | // at least gen1, already upgraded to gen2? | 90 | // at least gen1, already upgraded to gen2? |
65 | random_switch(FEAT_, SELF, maybegen2){ | 91 | random_switch(FEAT_, SELF, maybegen2){ |
66 | dependent: randup2; | 92 | dependent: randup2; |
67 | 3:testup2; | 93 | 3:testup2; |
68 | 1: | 68 | 1:testdown2; |
69 | } | 95 | } |
70 | 96 | ||
71 | 97 |