72 error:NULL]; |
72 error:NULL]; |
73 } |
73 } |
74 |
74 |
75 NSDictionary *theWeapon = nil; |
75 NSDictionary *theWeapon = nil; |
76 switch (type) { |
76 switch (type) { |
77 case 0: //default |
77 default: //default |
78 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
78 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
79 @"93919294221991210322351110012010000002111101010111",@"ammostore_initialqt", |
79 @"939192942219912103223511100120100000021111010101112",@"ammostore_initialqt", |
80 @"04050405416006555465544647765766666661555101011154",@"ammostore_probability", |
80 @"040504054160065554655446477657666666615551010111541",@"ammostore_probability", |
81 @"00000000000002055000000400070040000000002000000006",@"ammostore_delay", |
81 @"000000000000020550000004000700400000000020000000060",@"ammostore_delay", |
82 @"13111103121111111231141111111111111112111111011111",@"ammostore_crate", nil]; |
82 @"131111031211111112311411111111111111121111110111112",@"ammostore_crate", nil]; |
83 break; |
83 break; |
84 case 1: //crazy |
84 case 1: //crazy |
85 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
85 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
86 @"99999999999999999929999999999999992999999999099999",@"ammostore_initialqt", |
86 @"999999999999999999299999999999999929999999990999999",@"ammostore_initialqt", |
87 @"11111101111111111111111111111111111111111111011111",@"ammostore_probability", |
87 @"111111011111111111111111111111111111111111110111111",@"ammostore_probability", |
88 @"00000000000000000000000000000000000000000000000000",@"ammostore_delay", |
88 @"000000000000000000000000000000000000000000000000000",@"ammostore_delay", |
89 @"13111103121111111231141111111111111112111101011111",@"ammostore_crate", nil]; |
89 @"131111031211111112311411111111111111121111010111111",@"ammostore_crate", nil]; |
90 break; |
90 break; |
91 case 2: //pro mode |
91 case 2: //pro mode |
92 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
92 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
93 @"90900090000000000000090000000000000000000000000000",@"ammostore_initialqt", |
93 @"909000900000000000000900000000000000000000000000000",@"ammostore_initialqt", |
94 @"00000000000000000000000000000000000000000000000000",@"ammostore_probability", |
94 @"000000000000000000000000000000000000000000000000000",@"ammostore_probability", |
95 @"00000000000002055000000400070040000000002000000000",@"ammostore_delay", |
95 @"000000000000020550000004000700400000000020000000000",@"ammostore_delay", |
96 @"11111111111111111111111111111111111111111001011111",@"ammostore_crate", nil]; |
96 @"111111111111111111111111111111111111111110010111111",@"ammostore_crate", nil]; |
97 break; |
97 break; |
98 case 3: //shoppa |
98 case 3: //shoppa |
99 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
99 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
100 @"00000099000000000000000000000000000000000000000000",@"ammostore_initialqt", |
100 @"000000990000000000000000000000000000000000000000000",@"ammostore_initialqt", |
101 @"44444100442444022101121212224220000000020004000100",@"ammostore_probability", |
101 @"444441004424440221011212122242200000000200040001001",@"ammostore_probability", |
102 @"00000000000000000000000000000000000000000000000000",@"ammostore_delay", |
102 @"000000000000000000000000000000000000000000000000000",@"ammostore_delay", |
103 @"11111111111111111111111111111111111111111011011111",@"ammostore_crate", nil]; |
103 @"111111111111111111111111111111111111111110110111111",@"ammostore_crate", nil]; |
104 break; |
104 break; |
105 case 4: //clean slate |
105 case 4: //clean slate |
106 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
106 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
107 @"10100090000100000110000000000000000000000000000010",@"ammostore_initialqt", |
107 @"101000900001000001100000000000000000000000000000100",@"ammostore_initialqt", |
108 @"04050405416006555465544647765766666661555101011154",@"ammostore_probability", |
108 @"040504054160065554655446477657666666615551010111541",@"ammostore_probability", |
109 @"00000000000002055000000400070040000000002000000000",@"ammostore_delay", |
109 @"000000000000020550000004000700400000000020000000000",@"ammostore_delay", |
110 @"13111103121111111231141111111111111112111111011111",@"ammostore_crate", nil]; |
110 @"131111031211111112311411111111111111121111110111111",@"ammostore_crate", nil]; |
111 break; |
111 break; |
112 case 5: //minefield |
112 case 5: //minefield |
113 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
113 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
114 @"00000099000900000003000000000000000000000000000000",@"ammostore_initialqt", |
114 @"000000990009000000030000000000000000000000000000000",@"ammostore_initialqt", |
115 @"00000000000000000000000000000000000000000000000000",@"ammostore_probability", |
115 @"000000000000000000000000000000000000000000000000000",@"ammostore_probability", |
116 @"00000000000002055000000400070040000000002000000000",@"ammostore_delay", |
116 @"000000000000020550000004000700400000000020000000000",@"ammostore_delay", |
117 @"11111111111111111111111111111111111111111111011111",@"ammostore_crate", nil]; |
117 @"111111111111111111111111111111111111111111110111111",@"ammostore_crate", nil]; |
118 break; |
118 break; |
119 case 6: //thinking with portals |
119 case 6: //thinking with portals |
120 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
120 theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: |
121 @"90000090020000000021000000000000001100000900000000",@"ammostore_initialqt", |
121 @"900000900200000000210000000000000011000009000000000",@"ammostore_initialqt", |
122 @"04050405416006555465544647765766666661555101011154",@"ammostore_probability", |
122 @"040504054160065554655446477657666666615551010111541",@"ammostore_probability", |
123 @"00000000000002055000000400070040000000002000000006",@"ammostore_delay", |
123 @"000000000000020550000004000700400000000020000000060",@"ammostore_delay", |
124 @"13111103121111111231141111111111111112111111011111",@"ammostore_crate", nil]; |
124 @"131111031211111112311411111111111111121111110111111",@"ammostore_crate", nil]; |
125 break; |
|
126 default: |
|
127 NSLog(@"Nope"); |
|
128 break; |
125 break; |
129 } |
126 } |
130 |
127 |
131 NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt]; |
128 NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt]; |
132 |
129 |
143 withIntermediateDirectories:NO |
140 withIntermediateDirectories:NO |
144 attributes:nil |
141 attributes:nil |
145 error:NULL]; |
142 error:NULL]; |
146 } |
143 } |
147 |
144 |
|
145 int basicFlags[] = {100, 100, 45, 15, 47, 5, 100, 5, 35, 25, 3, 4, 0, 2}; |
|
146 BOOL gameFlags[] = {NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, YES, NO, NO, NO, NO, |
|
147 NO, NO, NO, NO, NO, NO, NO}; |
|
148 |
148 NSMutableArray *basicArray = [[NSMutableArray alloc] initWithObjects: |
149 NSMutableArray *basicArray = [[NSMutableArray alloc] initWithObjects: |
149 [NSNumber numberWithInt:100], //initialhealth |
150 [NSNumber numberWithInt:basicFlags[0]], //initialhealth |
150 [NSNumber numberWithInt:100], //damagemodifier |
151 [NSNumber numberWithInt:basicFlags[1]], //damagemodifier |
151 [NSNumber numberWithInt:45], //turntime |
152 [NSNumber numberWithInt:basicFlags[2]], //turntime |
152 [NSNumber numberWithInt:15], //suddendeathtimeout |
153 [NSNumber numberWithInt:basicFlags[3]], //suddendeathtimeout |
153 [NSNumber numberWithInt:47], //waterrise |
154 [NSNumber numberWithInt:basicFlags[4]], //waterrise |
154 [NSNumber numberWithInt:5], //healthdecrease |
155 [NSNumber numberWithInt:basicFlags[5]], //healthdecrease |
155 [NSNumber numberWithInt:100], //ropelength |
156 [NSNumber numberWithInt:basicFlags[6]], //ropelength |
156 [NSNumber numberWithInt:5], //cratedrops |
157 [NSNumber numberWithInt:basicFlags[7]], //cratedrops |
157 [NSNumber numberWithInt:35], //healthprob |
158 [NSNumber numberWithInt:basicFlags[8]], //healthprob |
158 [NSNumber numberWithInt:25], //healthamount |
159 [NSNumber numberWithInt:basicFlags[9]], //healthamount |
159 [NSNumber numberWithInt:3], //minestime |
160 [NSNumber numberWithInt:basicFlags[10]], //minestime |
160 [NSNumber numberWithInt:4], //minesnumber |
161 [NSNumber numberWithInt:basicFlags[11]], //minesnumber |
161 [NSNumber numberWithInt:0], //dudmines |
162 [NSNumber numberWithInt:basicFlags[12]], //dudmines |
162 [NSNumber numberWithInt:2], //explosives |
163 [NSNumber numberWithInt:basicFlags[13]], //explosives |
163 nil]; |
164 nil]; |
164 |
165 |
165 NSMutableArray *gamemodArray= [[NSMutableArray alloc] initWithObjects: |
166 NSMutableArray *gamemodArray= [[NSMutableArray alloc] initWithObjects: |
166 [NSNumber numberWithBool:NO], //fortmode |
167 [NSNumber numberWithBool:gameFlags[0]], //fortmode |
167 [NSNumber numberWithBool:NO], //divideteam |
168 [NSNumber numberWithBool:gameFlags[1]], //divideteam |
168 [NSNumber numberWithBool:NO], //solidland |
169 [NSNumber numberWithBool:gameFlags[2]], //solidland |
169 [NSNumber numberWithBool:NO], //addborder |
170 [NSNumber numberWithBool:gameFlags[3]], //addborder |
170 [NSNumber numberWithBool:NO], //lowgravity |
171 [NSNumber numberWithBool:gameFlags[4]], //lowgravity |
171 [NSNumber numberWithBool:NO], //lasersight |
172 [NSNumber numberWithBool:gameFlags[5]], //lasersight |
172 [NSNumber numberWithBool:NO], //invulnerable |
173 [NSNumber numberWithBool:gameFlags[6]], //invulnerable |
173 [NSNumber numberWithBool:NO], //resethealth |
174 [NSNumber numberWithBool:gameFlags[7]], //resethealth |
174 [NSNumber numberWithBool:NO], //vampirism |
175 [NSNumber numberWithBool:gameFlags[8]], //vampirism |
175 [NSNumber numberWithBool:NO], //karma |
176 [NSNumber numberWithBool:gameFlags[9]], //karma |
176 [NSNumber numberWithBool:NO], //artillery |
177 [NSNumber numberWithBool:gameFlags[10]], //artillery |
177 [NSNumber numberWithBool:YES], //randomorder |
178 [NSNumber numberWithBool:gameFlags[11]], //randomorder |
178 [NSNumber numberWithBool:NO], //king |
179 [NSNumber numberWithBool:gameFlags[12]], //king |
179 [NSNumber numberWithBool:NO], //placehedgehogs |
180 [NSNumber numberWithBool:gameFlags[13]], //placehedgehogs |
180 [NSNumber numberWithBool:NO], //clansharesammo |
181 [NSNumber numberWithBool:gameFlags[14]], //clansharesammo |
181 [NSNumber numberWithBool:NO], //disablegirders |
182 [NSNumber numberWithBool:gameFlags[15]], //disablegirders |
182 [NSNumber numberWithBool:NO], //disablelandobjects |
183 [NSNumber numberWithBool:gameFlags[16]], //disablelandobjects |
183 [NSNumber numberWithBool:NO], //aisurvival |
184 [NSNumber numberWithBool:gameFlags[17]], //aisurvival |
184 [NSNumber numberWithBool:NO], //infattack |
185 [NSNumber numberWithBool:gameFlags[18]], //infattack |
185 [NSNumber numberWithBool:NO], //resetweaps |
186 [NSNumber numberWithBool:gameFlags[19]], //resetweaps |
186 [NSNumber numberWithBool:NO], //perhogammo |
187 [NSNumber numberWithBool:gameFlags[20]], //perhogammo |
187 [NSNumber numberWithBool:NO], //nowind |
188 [NSNumber numberWithBool:gameFlags[21]], //nowind |
188 [NSNumber numberWithBool:NO], //morewind |
189 [NSNumber numberWithBool:gameFlags[22]], //morewind |
189 nil]; |
190 nil]; |
190 |
191 |
191 NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys: |
192 NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys: |
192 basicArray,@"basic", |
193 basicArray,@"basic", |
193 gamemodArray,@"gamemod", |
194 gamemodArray,@"gamemod", |