diff --git a/remedy.lic b/remedy.lic index 1acd8bcea1..ce45b2a756 100644 --- a/remedy.lic +++ b/remedy.lic @@ -194,7 +194,7 @@ class Remedy when 'none' # this part is to avoid the message "You are already holding that." # in cases where it won't get more herbs, it takes a longer route to get herbs from other bags (not @bag nor @herb_container) - @count = Integer(DRC.bput("count my #{@herb1}", '\d+')) + @count = DRC.bput("count my #{@herb1}", '^You count out \d+').scan(/\d+/).first.to_i while @count < 25 DRC.bput("put my #{@herb1} in my #{@container}", 'You put', 'already has something in it.', 'you count off and place only that many inside') fput("stow my #{@herb1}") # in case there are extra @@ -209,11 +209,11 @@ class Remedy if DRC.bput("combine my #{@herb1}", 'You combine', 'too large to add', 'You must be holding both') == 'You must be holding both' @count = 25 # 25 used to break loops else - @count += Integer(DRC.bput("count my #{@herb1}", '\d+')) # increment to run again + @count += DRC.bput("count my #{@herb1}", '^You count out \d+').scan(/\d+/).first.to_i # increment to run again end end else - @count += Integer(DRC.bput("count my #{@herb1}", '\d+')) + @count += DRC.bput("count my #{@herb1}", '^You count out \d+').scan(/\d+/).first.to_i if DRC.bput("combine my #{@herb1}", 'You combine', 'too large to add', 'You must be holding both') == 'too large to add' f_stack = DRC.bput("count my first #{@herb1}", 'You count out \d+ pieces').scan(/\d+/).first.to_i s_stack = DRC.bput("count my second #{@herb1}", 'I could not find', 'You count out \d+ pieces').scan(/\d+/).first.to_i