Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pinguupinguu committed Feb 4, 2024
1 parent 4dd1f35 commit 363afc0
Show file tree
Hide file tree
Showing 4 changed files with 356 additions and 8 deletions.
59 changes: 58 additions & 1 deletion Neo Geo CD/Top Player's Golf.rascript
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// 0x02=Nassau Game
function match_stroke() => byte(0x006d) == 0
function match_play() => byte(0x006d) == 1
function nassau_play() => byte(0x006d) == 2
// $00BE: [16bit] Message Type
// 0x02=Green On
// 0x03=Rough
Expand All @@ -30,6 +31,7 @@ function hole() => byte(0x0109)
// 0x00=1P
// 0x01=2P
function one_player() => byte(0x0618) == 0
function two_player() => byte(0x0618) == 1
//Top Player's Country Club Data:
tp_pars = {
0:4,
Expand Down Expand Up @@ -150,6 +152,7 @@ function pone_strokes() => word(0x455)
function ptwo_strokes() => word(0x457)
function matchplay_win(course, holes) =>
match_play() &&
one_player() &&
hole() == holes - 1 && //For readability purposes, calculate actual in-game check after function pass.
pone_strokes() < ptwo_strokes() &&
(always_false()
Expand All @@ -159,7 +162,7 @@ function matchplay_win(course, holes) =>

achievement(
"Front Nine Top Competition",
"Beat your opponent with a better score on Top Player's Championship Golf Course Holes 1-9",
"Beat your opponent with a better score on Top Player's Championship Golf Course Holes 1-9 in Match Play Mode",
points=10,
trigger=
matchplay_win(course_topplayers, 9)
Expand All @@ -171,6 +174,53 @@ achievement(
trigger=
matchplay_win(course_topplayers, 18)
)

achievement(
"SNK Victory",
"Get a better score than your opponent on SNK Championship Golf Course Holes 1-9 in Match Play Mode",
points=10,
trigger=
matchplay_win(course_snk, 9)
)
achievement(
"SNK Trophy",
"Get a better score than your opponent on all 18 holes at SNK Championship Golf Course in Match Play Mode",
points=25,
trigger=
matchplay_win(course_snk, 18)
)
function nassau_mode() =>
byte(0x0619)
out = 0
in = 1
function nassau_switch() => measured(repeated(1, pone_strokes() != prev(pone_strokes()) || ptwo_strokes() != prev(ptwo_strokes())))
function nassau_result() =>
always_false()
|| hole() == 0 && nassau_mode() == in && nassau_switch()
|| hole() == 17 && nassau_mode() == out && nassau_switch()
//|| hole() == 17 && nassau_mode() == out && repeated(0, pone_strokes() != prev(pone_strokes() || ptwo_strokes() != prev(ptwo_strokes()))
achievement(
"Top Nassau Player",
"Win a Nassau Game against your opponent at Top Player's Championship Golf Course",
points=25,
trigger=
nassau_play() &&
course() == course_topplayers &&
one_player() &&
pone_strokes() < ptwo_strokes() &&
nassau_result()
)
achievement(
"SNassauK Success",
"Win a Nassau Game against your opponent at SNK Championship Golf Course",
points=25,
trigger=
nassau_play() &&
course() == course_snk &&
one_player() &&
pone_strokes() < ptwo_strokes() &&
nassau_result()
)
achievement(
"Hole Master",
"Get a Hole in One on any course!",
Expand All @@ -182,3 +232,10 @@ achievement(
)









Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,25 @@ achievement(






function lb_speedrun(m_name, d_name, mode, diff, rounds){
leaderboard(
m_name + " Mode " + d_name,
"Fastest time to complete",
mode() == mode && difficulty() == diff && prev(screen()) == 4 && screen() == 0x270f,
screen() == 0,
round() == rounds && prev(level_state()) != 1 && level_state() == 1,
always_true(),
"FRAMES",
true
)
}
lb_speedrun("Over Easy", "", overeasy, over, 8)
lb_speedrun("Hardboiled", "- Easy", hardboiled, easy, 8)
lb_speedrun("Hardboiled", "- Medium", hardboiled, med, 9)
lb_speedrun("Hardboiled", "- Hard", hardboiled, hard, 10)
lb_speedrun("Bomb", "- Easy", bomb, easy, 8)
lb_speedrun("Bomb", "- Medium", bomb, med, 9)
lb_speedrun("Bomb", "- Hard", bomb, hard, 10)



Expand Down
87 changes: 86 additions & 1 deletion PlayStation 2/Egg Mania Eggstreme Madness.rascript
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ hard = 2
overeasy = 2
hardboiled = 3
bomb = 9
solo = 0xa
survival = 0xb
function mode() => dword(0x4c08a4)
function clear(mode, target) => mode() == mode && prev(rounds()) == target && rounds() == target+1
Expand Down Expand Up @@ -195,11 +196,95 @@ achievement(
trigger=
block_use(0, block_storm)
)
function screen() => dword(0x4c081c)
function difficulty() => dword(0x4c087c)
easy = 0
med = 1
hard = 2
over = 3
function lb_speedrun(m_name, d_name, mode, diff, rounds){
leaderboard(
m_name + " Mode " + d_name,
"Fastest time to complete",
mode() == mode && difficulty() == diff && prev(screen()) == 4 && screen() == 0x270f,
screen() == 0,
rounds() == rounds && prev(level_state()) != 1 && level_state() == 1,
always_true(),
"FRAMES",
true
)
}


lb_speedrun("Over Easy", "", overeasy, over, 8)
lb_speedrun("Hardboiled", "- Easy", hardboiled, easy, 8)
lb_speedrun("Hardboiled", "- Medium", hardboiled, med, 9)
lb_speedrun("Hardboiled", "- Hard", hardboiled, hard, 10)
lb_speedrun("Bomb", "- Easy", bomb, easy, 8)
lb_speedrun("Bomb", "- Medium", bomb, med, 9)
lb_speedrun("Bomb", "- Hard", bomb, hard, 10)

function in_game() => screen() == 0x270f
score = rich_presence_macro("Number", dword(0x004c05bc))
function losses() => dword(0x004bffe4)
credits = rich_presence_macro("Number", rounds() - 1 - losses())
rounds = rich_presence_macro("Number", rounds())
difficulties = {
0:"Easy",
1:"Medium",
2:"Hard"
}
diff = rich_presence_lookup("Difficulty", difficulty(), difficulties)
char = {
0x00:"Eggy",
0x01:"Robo",
0x02:"Bebub",
0x03:"Yolko",
0x04:"Coolio",
0x05:"Funky",
0x06:"Astro",
0x07:"Spook",
0x08:"Spike",
0x09:"Angelica",
0x0a:"Sir Eggalot",
0x0b:"Poncho",
0x0d:"Yolkohama"
}
function char_id() => dword(0x004c0864)
char = rich_presence_lookup("Character", char_id(), char)
rich_presence_conditional_display(mode() == overeasy && in_game(), "Playing as {0} in Over Easy on Round {1} ❤️ {2} 🏆 {3}",
char,
rounds,
credits,
score
)
rich_presence_conditional_display(mode() == hardboiled && in_game(), "Playing as {0} in Hardboiled on Round {1} Difficulty: {2} ❤️ {3} 🏆 {4}",
char,
rounds,
diff,
credits,
score
)
rich_presence_conditional_display(mode() == bomb && in_game(), "Playing as {0} in Bomb Mode on Round {1} Difficulty: {2} ❤️ {3} 🏆 {4}",
char,
rounds,
diff,
credits,
score


)
rich_presence_conditional_display(mode() == survival && in_game(), "Playing as {0} in Survival Difficulty: {1}. Wins: {2} 🏆 {3}",
char,
diff,
rich_presence_macro("Number", survival_win()),
score
)
rich_presence_conditional_display(mode() == solo && in_game(), "Playing as {0} in Solo Difficulty: {1} 🏆 {2}",
char,
diff,
score
)
rich_presence_display("In Menu")



Expand Down
Loading

0 comments on commit 363afc0

Please sign in to comment.