diff options
author | Starla Insigna <starla4444@gmail.com> | 2011-09-10 14:16:29 -0400 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2011-09-10 14:16:29 -0400 |
commit | f7ce2c458df032f65c4c1eb31cf705bb284a3ee7 (patch) | |
tree | 239455e29b7fd6e8a3c624cc35c767d00e2d0a4f /Classes | |
parent | 24e46564c3534d0283190c4a8afc1cfe3e74e851 (diff) | |
download | cartcollect-f7ce2c458df032f65c4c1eb31cf705bb284a3ee7.tar.gz cartcollect-f7ce2c458df032f65c4c1eb31cf705bb284a3ee7.tar.bz2 cartcollect-f7ce2c458df032f65c4c1eb31cf705bb284a3ee7.zip |
Modified frequency of point multipliers as the player catches them
Closes #226
Diffstat (limited to 'Classes')
-rw-r--r-- | Classes/JumpGameMode.m | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Classes/JumpGameMode.m b/Classes/JumpGameMode.m index 2bc69d8..e4f3c8b 100644 --- a/Classes/JumpGameMode.m +++ b/Classes/JumpGameMode.m | |||
@@ -343,15 +343,16 @@ | |||
343 | FallingObject* object; | 343 | FallingObject* object; |
344 | 344 | ||
345 | int randomval = arc4random()%100; | 345 | int randomval = arc4random()%100; |
346 | int pmChance = (5-pointMultiplier)*5 + 30; | ||
346 | 347 | ||
347 | if (randomval < 50) | 348 | if (randomval < 30) |
348 | { | 349 | { |
349 | object = [[Rock alloc] init]; | 350 | object = [[OneUp alloc] init]; |
350 | } else if (randomval < 75) | 351 | } else if (randomval < pmChance) |
351 | { | 352 | { |
352 | object = [[PointMultiplier alloc] init]; | 353 | object = [[PointMultiplier alloc] init]; |
353 | } else { | 354 | } else { |
354 | object = [[OneUp alloc] init]; | 355 | object = [[Rock alloc] init]; |
355 | } | 356 | } |
356 | 357 | ||
357 | int objectX; | 358 | int objectX; |