Skip to content

Commit

Permalink
Correct Ring Bonus calculations
Browse files Browse the repository at this point in the history
this also updates the project file to 2024.4
  • Loading branch information
BlueSpeedsterYT committed Jun 20, 2024
1 parent 79f8a82 commit b8529f5
Show file tree
Hide file tree
Showing 7 changed files with 4,905 additions and 4,904 deletions.
4,426 changes: 2,213 additions & 2,213 deletions src/SonicTimeTwisted.resource_order

Large diffs are not rendered by default.

5,362 changes: 2,681 additions & 2,681 deletions src/SonicTimeTwisted.yyp

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/objects/objScoreCard/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if(instance_exists(objLevel))
{
// time bonus
var total_time = objLevel.timer div 60;
if total_time >= 540 time_bonus = 100000; else // this would make it consistent between this game and S3K/Mania
if total_time > 480 time_bonus = 50000; else
if total_time > 465 time_bonus = 10000; else
if total_time > 450 time_bonus = 5000; else
Expand All @@ -34,7 +35,7 @@ if(instance_exists(objLevel))
if total_time > 330 time_bonus = 2000; else
if total_time > 270 time_bonus = 1000; else
if total_time > 210 time_bonus = 500; else
if total_time == 1 time_bonus = 100000; else
//if total_time == 1 time_bonus = 100000; else // No idea why?
time_bonus = 0;

// perfect bonus
Expand All @@ -48,7 +49,8 @@ if(instance_exists(objLevel))
line1 = string_replace(tr("_scorecard_line1"), "%c", name_tag);
line2 = string_replace(tr("_scorecard_line2"), "%a", string(act));
// ring bonus
rings_bonus = objGameData.rings[0]*10;
rings_bonus = objGameData.rings[0]*100; // this was originally the player's ring total times 10...
// so it has been changed to be more accurate to the classic games.
// screen positions
draw_set_font(objResources.fontTitleSmallest);
title_ox1 = (objScreen.width * 0.5) - (string_width(string_hash_to_newline(line1)) * 0.5);
Expand Down
6 changes: 3 additions & 3 deletions src/objects/objScoreCard/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ case 3: // apply scores
// time bonus
if time_bonus
{
change = min(time_bonus, max_change);
change = (objScreen.score_tally_mode < 2) ? min(time_bonus, max_change) : max_change;
time_bonus -= change;
total_bonus += change;
player_add_score(change);
}
// rings bonus
if rings_bonus
{
change = min(rings_bonus, max_change);
change = (objScreen.score_tally_mode < 2) ? min(rings_bonus, max_change) : max_change;
rings_bonus -= change;
total_bonus += change;
player_add_score(change);
}
// perfect bonus
if perfect_bonus
{
change = min(perfect_bonus, max_change);
change = (objScreen.score_tally_mode < 2) ? min(perfect_bonus, max_change) : max_change;
perfect_bonus -= change;
total_bonus += change;
player_add_score(change);
Expand Down
3 changes: 1 addition & 2 deletions src/options/ios/options_ios.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/options/main/options_main.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/options/tvos/options_tvos.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b8529f5

Please sign in to comment.