Skip to content

Commit

Permalink
Merge branch 'rpherbig:master' into ct_use_hornwatch
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtraDR authored Dec 19, 2023
2 parents 6e93bf6 + 643c88c commit c6d8432
Show file tree
Hide file tree
Showing 33 changed files with 1,897 additions and 223 deletions.
22 changes: 11 additions & 11 deletions athletics.lic
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ class Athletics
end

def crossing_athletics
if UserVars.athletics <= 50
if UserVars.athletics.to_i <= 50
swim_loop(get_data('athletics').swimming_options['arthe_dale']['rooms'])
elsif UserVars.athletics < 290
elsif UserVars.athletics.to_i < 290
waitrt?
pause @performance_pause # to give performance time to complete before_dying if stopped from the previous script
start_script('performance') unless Script.running?('performance')
Expand All @@ -223,28 +223,28 @@ class Athletics
break unless climb?(data['room'], data['targets'])
end
end
elsif UserVars.athletics < 450
elsif UserVars.athletics.to_i < 450
override_location_and_practice('segoltha_bank')
else
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics > 650
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics.to_i > 650
override_location_and_practice('arthelun_rocks')
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics > 650
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics.to_i > 650
end
end

def shard_athletics
until done_training?
if UserVars.athletics < 240
if UserVars.athletics.to_i < 240
until done_training?
@athletics_options['shard']
.reject { |data| @settings.avoid_athletics_in_justice && data['justice'] }
.each do |data|
break unless climb?(data['room'], data['targets'])
end
end
elsif UserVars.athletics < 540
elsif UserVars.athletics.to_i < 540
climb_cliffs
elsif UserVars.athletics < 850
elsif UserVars.athletics.to_i < 850
climb_branch
elsif UserVars.athletics
climb_wyvern
Expand Down Expand Up @@ -342,10 +342,10 @@ class Athletics
end

def climb_branch
if UserVars.athletics < 540
if UserVars.athletics.to_i < 540
override_location_and_practice('undergondola_branch')
else
DRC.message("Warning: Using the undergondola arg with more than 850 athletics is not best use and you may consider the wyvern option instead.") if UserVars.athletics > 850
DRC.message("Warning: Using the undergondola arg with more than 850 athletics is not best use and you may consider the wyvern option instead.") if UserVars.athletics.to_i > 850
DRCT.walk_to(9607)
DRCT.walk_to(9515)
until done_training?
Expand Down Expand Up @@ -375,7 +375,7 @@ class Athletics
def climb_wyvern
DRCT.walk_to(19_464)
until done_training?
DRCT.walk_to(2245) if UserVars.athletics > 540
DRCT.walk_to(2245) if UserVars.athletics.to_i > 540
DRCT.walk_to(9607)
DRCT.walk_to(11_126)
DRCT.walk_to(19_464)
Expand Down
2 changes: 1 addition & 1 deletion carve.lic
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Carve
case DRC.bput("get my #{@material} #{@type}", '^You get', '^You are already', '^What do you', '^What were you', 'You pick up', "can't quite lift it")
when 'What do you', 'What were you'
DRC.beep
echo("You seem to be missing: #{name}")
echo("You seem to be missing: #{@material} #{@type}")
exit
when /can\'t quite lift it/
@my = ''
Expand Down
12 changes: 11 additions & 1 deletion combat-trainer.lic
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ class SafetyProcess
Flags.add('ct-itemdropped', '^Your (?<item>.*) falls to your feet\.', '^You cannot maintain your grip on the (?<item>.*), and it falls to the ground!')
Flags.add('ct-germshieldlost', 'It jerks the.* (?<shield>\w+) out of your hands')
Flags.add('active-mitigation', 'You believe you could \b(?<action>\w+) out of the way of the \b(?<obstacle>\w+)')
Flags.add('ct-parasite', 'blood mite on your (?<body_part>.*)\.')
@equipment_manager = equipment_manager
@health_threshold = settings.health_threshold
echo(" @health_threshold: #{@health_threshold}") if $debug_mode_ct
Expand All @@ -1080,6 +1081,7 @@ class SafetyProcess
DRC.fix_standing
check_item_recovery(game_state)
tend_lodged
tend_parasite
active_mitigation
game_state.danger = in_danger?(game_state.danger)
keep_away if !game_state.danger && game_state.retreating?
Expand Down Expand Up @@ -1147,6 +1149,13 @@ class SafetyProcess
Flags.reset('ct-lodged')
end

def tend_parasite
return unless Flags['ct-parasite']

DRC.wait_for_script_to_complete('tendme')
Flags.reset('ct-parasite')
end

def keep_away
return unless Flags['ct-engaged']

Expand Down Expand Up @@ -3294,7 +3303,7 @@ class AttackProcess
# Tests: https://regex101.com/r/HkIa8j/1
# IMPORTANT: 'stone shard' must be listed before 'shard' and 'stone' in the pattern else won't match 'senci stone shard' correctly.
ammo_pattern = "(?<ammo>arrow|bolt|stone shard|shard|rock|sphere|clump|coral|fist|holder|lump|patella|pellet|pulzone|quadrello|quarrel|quill|stone|stopper|verretto|blowgun dart|crumb|spine|mantrap spike|tiny dragon|icicle|fang|scale|grey-black spike|bacon strip|page|naga|thorn|fragment|talon|cork|button|core|pebble|geode|stub|pit|thimble|doorknob|cone|bell|hunk|piece|present|sleighbell|sprig|star|toy|spiral)s?"
Flags.add('ct-ranged-ammo', "(you (?<action>fire|poach|snipe) an?|your) (?<prefix>[^\.!]*? )?#{ammo_pattern}(?<suffix> [^\.!]*?)?? (at|passes through)")
Flags.add('ct-ranged-ammo', "(you (?<action>fire|poach|snipe) an?|your) (?<prefix>[^\.!]*? )?#{ammo_pattern}(?<altered_poststring>.*)?(?<suffix> [^\.!]*?)?? (at|passes through)")
Flags.add('ct-powershot-ammo', "With a loud twang, you let fly your #{ammo_pattern}!")
Flags.add('ct-ranged-loaded', 'You reach into', 'You load', 'You carefully load', 'already loaded', 'in your hand')
Flags.add('ct-using-repeating-crossbow', /Your repeating crossbow/i, /Your repeating arbalest/i, /Your marksman's arbalest/i, /Your assassin's crossbow/i, /Your riot crossbow/i, /You .* ammunition (chamber|store)/, /already loaded with as much ammunition as it can hold/, /You realize readying more than one/)
Expand Down Expand Up @@ -5329,6 +5338,7 @@ before_dying do
Flags.delete('pouch-full')
Flags.delete('container-full')
Flags.delete('ct-lodged')
Flags.delete('ct-parasite')
Flags.delete('ct-engaged')
Flags.delete('active-mitigation')
Flags.delete('ct-spelllost')
Expand Down
11 changes: 8 additions & 3 deletions common-items.lic
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module DRCI
]

GET_ITEM_SUCCESS_PATTERNS = [
/you draw/i,
/^You get/,
/^You pick/,
/^You pluck/,
Expand Down Expand Up @@ -119,7 +120,8 @@ module DRCI
/slide effortlessly onto your/,
/^You carefully arrange/,
/^A brisk chill rushes through you as you wear/, # some hiro bearskin gloves interlaced with strips of ice-veined leather
/^You drape/
/^You drape/,
/You lean over and slip your feet into the boots./ # a pair of weathered barkcloth boots lined in flannel
]

WEAR_ITEM_FAILURE_PATTERNS = [
Expand Down Expand Up @@ -387,7 +389,8 @@ module DRCI
/has declined the offer/,
/^Your offer to .* has expired/,
/^You may only have one outstanding offer at a time/,
/^What is it you're trying to give/
/^What is it you're trying to give/,
/Lucky for you! That isn't damaged!/
]

#########################################
Expand Down Expand Up @@ -569,7 +572,9 @@ module DRCI
/There (?:is|are) (?:only )?(.+) parts? left/,
/There's (?:only )?(.+) parts? left/,
/The (?:.+) has (.+) uses remaining./,
/There are enough left to create (.+) more/
/There are enough left to create (.+) more/,
/You count out (.+) pieces? of material there/,
/There (?:is|are) (.+) scrolls? left for use with crafting/
]
count = 0
$ORDINALS.each do |ordinal|
Expand Down
2 changes: 1 addition & 1 deletion common.lic
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ module DRC

_respond(
"<pushStream id=\"#{window_name}\"/>" + (make_bold ? bold(text) : text),
"<popStream id=\"#{window_name}\" /><prompt time=\"#{Time.now.to_i}\">&gt;</prompt>"
"<popStream id=\"#{window_name}\" /><prompt time=\"#{XMLData.server_time.to_i}\">&gt;</prompt>"
)
end

Expand Down
20 changes: 7 additions & 13 deletions corn-maze.lic
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class CornMaze
end

def count_he_bottle
DRC.bput("count my bottle", /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i
DRC.bput("count my bottle", /^That doesn't tell you much of anything/, /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i
end

def do_short_task(task)
Expand Down Expand Up @@ -720,19 +720,13 @@ class CornMaze
def stow_thing(thing)
if @settings.cornmaze_containers.any?
@settings.cornmaze_containers.each do |container|
unless DRCI.put_away_item?(thing, container)
unless DRCI.stow_item?(thing)
DRC.message("#{thing} didn't fit anywhere. Dropping it.")
DRCI.dispose_trash(thing, @worn_trashcan, @worn_trashcan_verb)
end
end
end
else
unless DRCI.stow_item?(thing)
DRC.message("YOU'VE RUN OUT OF ROOM! GET SOME MORE SPACE, YOU LAZY SLOB!")
DRCI.dispose_trash(thing, @worn_trashcan, @worn_trashcan_verb)
return if DRCI.put_away_item?(thing, container)
end
end
unless DRCI.stow_item?(thing)
DRC.message("YOU'VE RUN OUT OF ROOM! GET SOME MORE SPACE, YOU LAZY SLOB!")
DRCI.dispose_trash(thing, @worn_trashcan, @worn_trashcan_verb)
end
end

def recover_stun
Expand All @@ -745,7 +739,7 @@ class CornMaze
end

before_dying do
kernel_count = DRC.bput("count my bottle", /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i
kernel_count = DRC.bput("count my bottle", /^That doesn't tell you much of anything/, /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i
DRC.message("CM: Exiting script with #{kernel_count} kernels.")
Flags.delete('maze_done')
Flags.delete('poisoned')
Expand Down
23 changes: 12 additions & 11 deletions data/base-crafting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ stock:
steel:
stock-volume: 10
stock-number: 9
stock-name: steel
stock-name: steel
stock-value: 2000
steel50:
stock-volume: 50
Expand Down Expand Up @@ -361,7 +361,7 @@ stock:
stock-value: 150
wand:
stock-value: 125

blacksmithing:
Crossing: &zoluren_blacksmithing
npc: Yalda
Expand Down Expand Up @@ -404,6 +404,7 @@ blacksmithing:
- 19_261
- 19_252
- 19_255
private_forge: 16936
logbook: forging
pattern-book: blacksmithing
finisher: oil
Expand Down Expand Up @@ -603,6 +604,7 @@ blacksmithing:
- 16406
- 16407
- 16408
private_forge: 51058
Shadow's Reach:
npc: Serric
npc_last_name: Serric
Expand Down Expand Up @@ -717,7 +719,7 @@ blacksmithing:
stock-room: 17694
bingots-room: # left intentionally blank until bingots are added here
trash-room: 17690
idle-room: 17689
idle-room: 17689
Hibarnhvidar: &forfedhdar_blacksmithing
npc: Juln
npc_last_name: Juln
Expand Down Expand Up @@ -1700,7 +1702,7 @@ artificing:
idle-room: 15520
Boar Clan:
<< : *forfedhdar_artificing
Ratha:
Ratha:
npc: Trainer
npc_last_name: Trainer
npc-rooms:
Expand All @@ -1723,7 +1725,7 @@ artificing:
blank-scrolls: 8
repair-room: 10755
repair-npc: clerk
idle-room: 16972
idle-room: 16972
deeds:
Crossing: &zoluren_deeds
room: 8775
Expand Down Expand Up @@ -1994,10 +1996,10 @@ recipe_parts:
part-number:
Boar Clan:
part-room: 8892 # Hibarnhvidar
part-number:
part-number:
Hibarnhvidar:
part-room: 8892
part-number:
part-number:
Fang Cove:
part-room: 14793
part-number:
Expand Down Expand Up @@ -2065,10 +2067,10 @@ recipe_parts:
part-number:
Boar Clan:
part-room: 8892 # Hibarnhvidar
part-number:
part-number:
Hibarnhvidar:
part-room: 8892
part-number:
part-number:
Fang Cove:
part-room: 14793
part-number:
Expand Down Expand Up @@ -2201,7 +2203,7 @@ recipe_parts:
part-number: 16
Hibarnhvidar:
part-room: 8892
part-number:
part-number:
Boar Clan:
part-room: 8892 # Hibarnhvidar
part-number: 16
Expand Down Expand Up @@ -2477,4 +2479,3 @@ recipe_parts:
Fang Cove:
part-room: 14784
part-number:

Loading

0 comments on commit c6d8432

Please sign in to comment.