Skip to content

Commit 7934fb4

Browse files
Track times defeated by a blind on profile
mostly for achievement purposes, maybe might have another use later? idk man
1 parent cd77e14 commit 7934fb4

File tree

5 files changed

+30
-2
lines changed

5 files changed

+30
-2
lines changed

assets/1x/cry_achievements.png

2.13 KB
Loading

assets/2x/cry_achievements.png

8.04 KB
Loading

items/achievement.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,20 @@ local perfectly_balanced = {
394394
end
395395
end,
396396
}
397+
local pin = {
398+
object_type = "Achievement",
399+
key = "pin",
400+
order = 21,
401+
hidden_text = true,
402+
pos = { x = 3, y = 0 },
403+
atlas = "cry_achievements",
404+
bypass_all_unlocked = true,
405+
unlock_condition = function(self, args)
406+
if args.type == "lose_to_specific_blind" and args.blind == "cry-pin" then
407+
return true
408+
end
409+
end,
410+
}
397411

398412
-- TODO: Add new Achievements.
399413
-- Current Ideas (Normal):
@@ -446,5 +460,6 @@ local achievement_objects = {
446460
home_realtor,
447461
traffic_jam,
448462
perfectly_balanced,
463+
--pin, Needs to be screened
449464
}
450465
return { name = "Achievements", items = achievement_objects }

localization/en-us.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4358,6 +4358,7 @@ return {
43584358
ach_cry_ult_full_skip = "Ultimate Full Skip",
43594359
ach_cry_used_crash = "We Told You Not To",
43604360
ach_cry_what_have_you_done = "WHAT HAVE YOU DONE?!",
4361+
ach_cry_pin = "Pin of Shame",
43614362
},
43624363
achievement_descriptions = {
43634364
ach_cry_ace_in_crash = 'check_for_unlock({type = "ace_in_crash"})',
@@ -4380,6 +4381,7 @@ return {
43804381
ach_cry_ult_full_skip = "Win in 1 round",
43814382
ach_cry_used_crash = "Use ://CRASH",
43824383
ach_cry_what_have_you_done = "Delete or Sacrifice an Exotic Joker",
4384+
ach_cry_pin = "Lose a run to The Pin",
43834385
},
43844386
challenge_names = {
43854387
c_cry_ballin = "Ballin'",

lovely/blind.toml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,18 @@ payload = '''
6363
'''
6464
match_indent = true
6565

66-
67-
66+
# track game overs by blinds on profiles
67+
[[patches]]
68+
[patches.pattern]
69+
target = "functions/UI_definitions.lua"
70+
pattern = '''local blind_choice = {config = G.GAME.blind.config.blind or G.P_BLINDS.bl_small}'''
71+
position = "after"
72+
payload = '''
73+
local cry_defeated_by = blind_choice.config.name or "Small Blind"
74+
if not G.PROFILES[G.SETTINGS.profile].cry_defeated_by_blind then G.PROFILES[G.SETTINGS.profile].cry_defeated_by_blind = {} end
75+
G.PROFILES[G.SETTINGS.profile].cry_defeated_by_blind[cry_defeated_by] = (G.PROFILES[G.SETTINGS.profile].cry_defeated_by_blind[cry_defeated_by] or 0) + 1
76+
check_for_unlock({ type = "lose_to_specific_blind", blind = cry_defeated_by, amount = G.PROFILES[G.SETTINGS.profile].cry_defeated_by_blind[cry_defeated_by] })
77+
'''
78+
match_indent = true
6879

6980

0 commit comments

Comments
 (0)