Skip to content

Commit

Permalink
rubocop cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Deysh committed Jul 20, 2024
1 parent 4529adf commit c6c631c
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions scripts/eherbs.lic
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
Previous change logs can be found on the wiki: https://gswiki.play.net/Lich:Script_Eherbs
=end


# FIXME: escort healing doesn't heal blood
# fixme: garland of sovyn cloves
# fixme: skip more better
Expand Down Expand Up @@ -1250,29 +1249,29 @@ module EHerbs
echo 'nothing to do'
elsif look_result =~ /^(?:She|He) has/
injury_patterns = {
/severe head trauma and bleeding from the ears/ => ['major head wound', 'major head wound', 'minor head wound'],
/minor lacerations about the head and a possible mild concussion/ => ['major head wound', 'minor head wound'],
/snapped bones and serious bleeding from the neck/ => ['major head wound', 'major head wound', 'minor head wound'],
/moderate bleeding from (?:his|her) neck/ => ['major head wound', 'minor head wound'],
/deep gashes and serious bleeding from (?:his|her) chest/ => ['major organ wound', 'major organ wound', 'minor organ wound'],
/deep lacerations across (?:his|her) chest/ => ['major organ wound', 'minor organ wound'],
/deep gashes and serious bleeding from (?:his|her) abdomen/ => ['major organ wound', 'major organ wound', 'minor organ wound'],
/deep lacerations across (?:his|her) abdomen/ => ['major organ wound', 'minor organ wound'],
/deep gashes and serious bleeding from (?:his|her) back/ => ['major organ wound', 'major organ wound', 'minor organ wound'],
/deep lacerations across (?:his|her) back/ => ['major organ wound', 'minor organ wound'],
/a blinded (right|left) eye/ => ['major organ wound', 'major organ wound', 'minor organ wound'],
/a swollen (right|left) eye/ => ['major organ wound', 'minor organ wound'],
/a completely severed (right|left) leg|arm|hand/ => ['major limb wound', 'major limb wound', 'minor limb wound'],
/a fractured and bleeding (right|left) leg|arm|hand/ => ['major limb wound', 'minor limb wound'],
/a case of uncontrollable convulsions|a case of sporadic convulsions/ => ['major nerve wound', 'minor nerve wound'],
/minor bruises about the head/ => ['minor head wound'],
/minor bruises on (?:his|her) neck/ => ['minor head wound'],
/minor cuts and bruises on (?:his|her) chest/ => ['minor organ wound'],
/minor cuts and bruises on (?:his|her) abdomen/ => ['minor organ wound'],
/minor cuts and bruises on (?:his|her) back/ => ['minor organ wound'],
/a bruised (right|left) eye/ => ['minor organ wound'],
/some minor cuts and bruises on (?:his|her) (right|left) leg|arm|hand/ => ['minor limb wound'],
/a strange case of muscle twitching/ => ['minor nerve wound']
/severe head trauma and bleeding from the ears/ => ['major head wound', 'major head wound', 'minor head wound'],
/minor lacerations about the head and a possible mild concussion/ => ['major head wound', 'minor head wound'],
/snapped bones and serious bleeding from the neck/ => ['major head wound', 'major head wound', 'minor head wound'],
/moderate bleeding from (?:his|her) neck/ => ['major head wound', 'minor head wound'],
/deep gashes and serious bleeding from (?:his|her) chest/ => ['major organ wound', 'major organ wound', 'minor organ wound'],
/deep lacerations across (?:his|her) chest/ => ['major organ wound', 'minor organ wound'],
/deep gashes and serious bleeding from (?:his|her) abdomen/ => ['major organ wound', 'major organ wound', 'minor organ wound'],
/deep lacerations across (?:his|her) abdomen/ => ['major organ wound', 'minor organ wound'],
/deep gashes and serious bleeding from (?:his|her) back/ => ['major organ wound', 'major organ wound', 'minor organ wound'],
/deep lacerations across (?:his|her) back/ => ['major organ wound', 'minor organ wound'],
/a blinded (right|left) eye/ => ['major organ wound', 'major organ wound', 'minor organ wound'],
/a swollen (right|left) eye/ => ['major organ wound', 'minor organ wound'],
/a completely severed (right|left) leg|arm|hand/ => ['major limb wound', 'major limb wound', 'minor limb wound'],
/a fractured and bleeding (right|left) leg|arm|hand/ => ['major limb wound', 'minor limb wound'],
/a case of uncontrollable convulsions|a case of sporadic convulsions/ => ['major nerve wound', 'minor nerve wound'],
/minor bruises about the head/ => ['minor head wound'],
/minor bruises on (?:his|her) neck/ => ['minor head wound'],
/minor cuts and bruises on (?:his|her) chest/ => ['minor organ wound'],
/minor cuts and bruises on (?:his|her) abdomen/ => ['minor organ wound'],
/minor cuts and bruises on (?:his|her) back/ => ['minor organ wound'],
/a bruised (right|left) eye/ => ['minor organ wound'],
/some minor cuts and bruises on (?:his|her) (right|left) leg|arm|hand/ => ['minor limb wound'],
/a strange case of muscle twitching/ => ['minor nerve wound']
}

escort_injuries = []
Expand Down Expand Up @@ -1891,7 +1890,6 @@ module EHerbs
return Inventory.survival_contents(container)
else
contents = EHerbs.data[:herb_sack].contents
#return EHerbs.data[:herb_sack].contents
end
else

Expand Down Expand Up @@ -2037,7 +2035,7 @@ module EHerbs
Inventory.herb_container_contents_load(EHerbs.data[:herb_sack]) if %w[under behind].include?(EHerbs.data[:preposition]) && relook == true
end

def self.survival_contents(container, type = nil)
def self.survival_contents(container)
result = Utility.get_lines("look in ##{container.id}", %r{(In|On|Under|Behind) .*?exist="(-?\d+)" noun="(.*?)">(.*?)</a|There is nothing}).join(' ')

# Initialize the contents hash with drinkable and edible arrays
Expand Down

0 comments on commit c6c631c

Please sign in to comment.