-
Notifications
You must be signed in to change notification settings - Fork 3
/
herbs2.lic
84 lines (70 loc) · 4.29 KB
/
herbs2.lic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
=begin
List a reference of herbs/ales/targets needed to heal various injuries. Highlights those that are applicable to
your current wounds and scars.
Note that scars cannot be healed until the underlying wound is, and thus will not be displayed until healable.
(This is also due to Lich /usually/ not reporting scar data for areas that have wounds)
All text based off of herbs.lic by Jaztemise. Highlighting by me.
author: LostRanger ([email protected])
game: Gemstone
tags: core
version: 0.3
required: Lich >= 4.2.0
changelog:
0.3 (2017-06-06):
Should now output correct form of Monsterbold for all clients, not just Stormfront.
Should no longer output XML to non-Stormfront clients.
0.2 (2017-04-22):
No longer highlights nerve scars while nerve wounds are still present.
0.1 (2017-04-18):
initial release
=end
def boldif(cond, text)
# Make text 'bold' if cond is true.
#
# Note: This is a super-naive implementation and is not suitable for text that might look like XML
if cond
puts "#{monsterbold_start}#{text}#{monsterbold_end}"
else
puts text
end
end
limb_wounds = [Wounds.rhand, Wounds.rarm, Wounds.rleg, Wounds.lhand, Wounds.larm, Wounds.lleg]
limb_scars = [Scars.rhand, Scars.rarm, Scars.rleg, Scars.lhand, Scars.larm, Scars.lleg]
puts "<output class=\"mono\" />\r\n" if $frontend == "stormfront"
puts "Herbs/Ales/Tarts"
puts
puts "INJURY LANDING ICEMULE TERAS"
puts "---------------- ------------------ --------------------- ----------------"
boldif checkhealth<maxhealth, "Blood Acantha Leaf Iceberry Tart Bloody Krolvin"
puts
boldif (limb_wounds.max > 0 or limb_scars.max > 0), "Limbs"
boldif limb_wounds.include?(1), " Mnr Wound Ambrominas Leaf Dabbings Family Tart Lost Dogwater"
boldif limb_wounds.max > 1, " Bleeder Ephlox Moss Frog's Bone Porr. Golden Goose"
boldif limb_scars.include?(1), " Mnr Scar Cactacae Spine Elk Fat Gel Bearded Ladies"
boldif limb_scars.include?(2), " Mangled Calamia Fruit Walrus Blubber Mad Mutt Frothy"
boldif limb_scars.include?(3), " Missing Sovyn Clove Ptarmigan Feather Captn' Pegleg's"
torso_wounds = [Wounds.chest, Wounds.torso, Wounds.back, Wounds.leye, Wounds.reye]
eye_scars = [Scars.reye, Scars.leye]
torso_scars = [Scars.chest, Scars.torso, Scars.back] + eye_scars.find_all{|x| x < 3}
puts
boldif (torso_wounds.max > 0 or torso_scars.max > 0 or eye_scars.max > 0), "Chest/Abs/Back/Eyes"
boldif torso_wounds.include?(1), " Mnr Wound Basal Moss Tundra Grass Mama Dwarf's'"
boldif torso_wounds.max > 1, " Bldr/swol/Ms Pothinir Grass Musk Ox Tart Aged Schooner'"
boldif torso_scars.include?(1), " Mnr Scar Talneo Potion Rock Lizard Potion Gert's Homemade'"
boldif torso_scars.max > 1, " Maj. Scar Wingstem Potion Earthworm Potion Wort's Winter'"
boldif eye_scars.max > 2, " Mis. Eye Scar Bur-clover Potion Starfish Potion Volcano Vision'"
head_wounds = [Wounds.head, Wounds.neck]
head_scars = [Scars.head, Scars.neck]
puts
boldif (head_wounds.max > 0 or head_scars.max > 0), "Head/Neck"
boldif head_wounds.include?(1), " Mnr Wound Rose Marrow Potion Elk Horn Potion Semak's Smooth'"
boldif head_wounds.max > 1, " Bleeder Aloeas Stem Ram's Bladder Dark Swampwater'"
boldif head_scars.include?(1), " Mnr Scar Haphip Root Sparrowhawk Pie Agrak's Amber'"
boldif head_scars.max > 1, " Maj. Scar Brostheras Potion Polar Bear Fat Soup Reaper's Red'"
puts
boldif (Wounds.nerves > 0 or Scars.nerves > 0), "Nerves"
boldif Wounds.nerves == 1," Twitching Wolifrew Lichen Leaftoe's Lichen Tart Orc's Head'"
boldif Wounds.nerves > 1, " Convulsions Bolmara Potion Snowflake Elixer Kenar's Dropjaw'"
boldif (Scars.nerves == 1 and Wounds.nerves == 0), " Slur Speech Torban Leaf Ma Leaftoe's Special Miner's Muddy'"
boldif (Scars.nerves > 1 and Wounds.nerves == 0), " Spasms Woth Flower Flower Shaped Tart Dacra's Dream'"
puts "<output class=\"\" />" if $frontend == "stormfront"