Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curing={}
- curing.__index = curing
- function curing.init()
- local self=setmetatable({},curing)
- attemptCures={}
- self.herbBalance=tonumber(gmcp.Char.Vitals.herb)
- self.salveBalance=tonumber(gmcp.Char.Vitals.salve)
- self.pipeBalance=tonumber(gmcp.Char.Vitals.pipe)
- self.treeBalance=tonumber(gmcp.Char.Vitals.tree)
- self.renewBalance=tonumber(gmcp.Char.Vitals.renew)
- self.elixirBalance=tonumber(gmcp.Char.Vitals.affelixir)
- self.focusBalance=tonumber(gmcp.Char.Vitals.focus)
- attemptHerb=false
- attemptSalve=false
- attemptPipe=false
- attemptTree=false
- attemptFocus=false
- attemptRenew=false
- attemptElixir=false
- attemptWrithe=false
- self.writhing=false
- return self
- end
- function curing.reset(self)
- self.herbBalance=tonumber(gmcp.Char.Vitals.herb)
- self.salveBalance=tonumber(gmcp.Char.Vitals.salve)
- self.pipeBalance=tonumber(gmcp.Char.Vitals.pipe)
- self.treeBalance=tonumber(gmcp.Char.Vitals.tree)
- self.renewBalance=tonumber(gmcp.Char.Vitals.renew)
- self.elixirBalance=tonumber(gmcp.Char.Vitals.affelixir)
- self.focusBalance=tonumber(gmcp.Char.Vitals.focus)
- attemptHerb=false
- attemptCures={}
- attemptSalve=false
- attemptPipe=false
- attemptTree=false
- attemptFocus=false
- attemptRenew=false
- attemptElixir=false
- attemptWrithe=false
- self.writhing=false
- end
- function curing.update(self)
- self.herbBalance=tonumber(gmcp.Char.Vitals.herb)
- self.salveBalance=tonumber(gmcp.Char.Vitals.salve)
- self.pipeBalance=tonumber(gmcp.Char.Vitals.pipe)
- self.treeBalance=tonumber(gmcp.Char.Vitals.tree)
- self.renewBalance=tonumber(gmcp.Char.Vitals.renew)
- self.elixirBalance=tonumber(gmcp.Char.Vitals.affelixir)
- self.focusBalance=tonumber(gmcp.Char.Vitals.focus)
- end
- function curing.cureAll(self, myaff)
- local cureTable={
- ["magic_impaired"] = { ["Herb"] = {"Kelp"},},
- ["writhe_necklock"] = { ["Special"] = {"Writhe"},},
- ["infernal_shroud"] = { },
- ["anorexia"] = { ["Salve"] = {"Epidermal to Torso"},},
- ["mistbrand"] = { },
- ["epilepsy"] = { ["Herb"] = {"Goldenseal"},},
- ["hatred"] = { ["Herb"] = {"Ash"},},
- ["premonition"] = { },
- ["left_leg_bruised_moderate"] = { ["Salve"] = {"Mending to Left leg"},},
- ["spiritbrand"] = { },
- ["weariness"] = { ["Herb"] = {"Kelp"},},
- ["forestbrand"] = { },
- ["electric_weakness"] = { },
- ["sandrot"] = { ["Herb"] = {"Bloodroot"},},
- ["conviction"] = { },
- ["fire_weakness"] = { },
- ["bloodlust"] = { },
- ["numbed_skin"] = { },
- ["battle_hunger"] = { },
- ["right_arm_damaged"] = { ["Salve"] = {"Restoration to right arm"},},
- ["impatience"] = { ["Herb"] = {"Goldenseal"},},
- ["shadowbrand"] = { },
- ["right_leg_broken"] = { ["Salve"] = {"Mending to right leg"},},
- ["commitment_fear"] = { ["Herb"] = {"Lobelia"},},
- ["left_leg_damaged"] = { ["Salve"] = {"Restoration to Left leg"},},
- ["left_arm_mangled"] = { ["Salve"] = {"Restoration to Left leg"},},
- ["head_mangled"] = { ["Salve"] = {"Restoration to Head"},},
- ["right_arm_bruised_critical"] = { ["Salve"] = {"Mending to right arm"},},
- ["blackout"] = { },
- ["troubled_breathing"] = { },
- ["selarnia"] = { ["Herb"] = {"Goldenseal"},["Salve"] = {"Mending to Torso"},},
- ["windbrand"] = { },
- ["crippled_throat"] = { ["Salve"] = {"Mending to Head"},},
- ["edict_shadowburn"] = { },
- ["vitalbane"] = { },
- ["writhe_impaled"] = { ["Special"] = {"Writhe"},},
- ["writhe_feed"] = { ["Special"] = {"Writhe"},},
- ["right_leg_dislocated"] = { ["Salve"] = {"Mending to right leg"},},
- ["writhe_vines"] = { ["Special"] = {"Writhe"},},
- ["wraith"] = { },
- ["oiled"] = { ["Special"] = {"Scrub"},},
- ["haemophilia"] = { ["Herb"] = {"Ginseng"},},
- ["shivering"] = { ["Salve"] = {"Caloric to Torso"},},
- ["soul_poison"] = { },
- ["left_leg_numbed"] = { },
- ["withering"] = { ["Smoke"] = {"Elm"},},
- ["effused_blood"] = { ["Salve"] = {"Epidermal to Torso"},},
- ["umbrage"] = { },
- ["dissonance"] = { ["Herb"] = {"Goldenseal"},},
- ["writhe_ropes"] = { ["Special"] = {"Writhe"},},
- ["right_arm_mangled"] = { ["Salve"] = {"Restoration to right arm"},},
- ["weakvoid"] = { },
- ["thorns"] = { },
- ["burnt_skin"] = { ["Salve"] = {"Restoration to Torso"},},
- ["voyria"] = { },
- ["addiction"] = { ["Herb"] = {"Ginseng"},},
- ["glasslimb"] = { },
- ["soulpuncture"] = { },
- ["head_bruised"] = { ["Salve"] = {"Mending to Head"},},
- ["void"] = { },
- ["distortion"] = { },
- ["heartflutter"] = { ["Herb"] = {"Bloodroot"},},
- ["masochism"] = { ["Herb"] = {"Lobelia"},},
- ["vinethorns"] = { },
- ["vertigo"] = { ["Herb"] = {"Lobelia"},},
- ["destroyed_throat"] = { ["Salve"] = {"Mending to Head"},},
- ["edict_stasis"] = { },
- ["sunlight_allergy"] = { ["Herb"] = {"Ginseng"},},
- ["hypertension"] = { },
- ["left_arm_amputated"] = { ["Salve"] = {"Restoration to left arm"},},
- ["unconscious"] = { },
- ["umbrage_curse"] = { },
- ["aeon"] = { ["Smoke"] = {"Elm"},},
- ["writhe_transfix"] = { ["Special"] = {"Writhe"},},
- ["mind_blank"] = { },
- ["torso_mangled"] = { ["Salve"] = {"Restoration to Torso"},},
- ["peace"] = { ["Herb"] = {"Bellwort"},},
- ["stupidity"] = { ["Herb"] = {"Goldenseal"},},
- ["hubris"] = { ["Herb"] = {"Bellwort"},},
- ["torso_deepwound"] = { },
- ["torso_damaged"] = { ["Salve"] = {"Restoration to Torso"},},
- ["agoraphobia"] = { ["Herb"] = {"Lobelia"},},
- ["torso_bruised_moderate"] = { ["Salve"] = {"Mending to Torso"},},
- ["penance"] = { },
- ["berserking"] = { ["Herb"] = {"Lobelia"},},
- ["torso_bruised_critical"] = { ["Salve"] = {"Mending to Torso"},},
- ["dementia"] = { ["Herb"] = {"Ash"},},
- ["edict_reckoning"] = { },
- ["torso_bruised"] = { ["Salve"] = {"Mending to Torso"},},
- ["crippled"] = { ["Herb"] = {"Bloodroot"},},
- ["corsin_weight"] = { },
- ["belonephobia"] = { },
- ["right_arm_numbed"] = { },
- ["thunderstorm"] = { },
- ["left_arm_damaged"] = { ["Salve"] = {"Restoration to left arm"},},
- ["blurry_vision"] = { ["Salve"] = {"Epidermal"},},
- ["throatslice"] = { },
- ["throatclaw"] = { ["Salve"] = {"Mending to Head"},},
- ["wasting"] = { ["Herb"] = {"Ginseng"},},
- ["spiritbane"] = { },
- ["numb_arms"] = { },
- ["stun"] = { },
- ["muddled"] = { },
- ["no_blindness"] = { },
- ["left_arm_numbed"] = { },
- ["asleep"] = { ["Special"] = {"Wake"},},
- ["sensitivity"] = { ["Herb"] = {"Kelp"},},
- ["mindclamped"] = { },
- ["unconsciousness"] = { },
- ["indifference"] = { ["Salve"] = {"Epidermal to Head"},},
- ["stuttering"] = { ["Salve"] = {"Epidermal to Head"},},
- ["left_leg_deepwound"] = { },
- ["disturb_confidence"] = { },
- ["blighted"] = { ["Herb"] = {"Ash"},},
- ["shyness"] = { ["Herb"] = {"Goldenseal"},},
- ["stonevice"] = { },
- ["stonebrand"] = { },
- ["pacifism"] = { ["Herb"] = {"Bellwort"},},
- ["soulroot"] = { },
- ["spinal_rip"] = { ["Salve"] = {"Restoration to Torso"},},
- ["right_arm_dislocated"] = { ["Salve"] = {"Mending to right arm"},},
- ["right_leg_bruised_moderate"] = { ["Salve"] = {"Mending to right leg"},},
- ["vomiting"] = { ["Herb"] = {"Ginseng"},},
- ["soulfire"] = { ["Herb"] = {"Bellwort"},},
- ["hypersomnia"] = { ["Herb"] = {"Ash"},},
- ["shadow_coat"] = { },
- ["generosity"] = { ["Herb"] = {"Bellwort"},},
- ["hepafarin"] = { },
- ["left_leg_bruised_critical"] = { ["Salve"] = {"Mending to left leg"},},
- ["smashed_throat"] = { ["Salve"] = {"Restoration to Head"},},
- ["stormtouched"] = { },
- ["cracked_ribs"] = { ["Salve"] = {"Mending to Torso"},},
- ["confusion"] = { ["Herb"] = {"Ash"},},
- ["slickness"] = { ["Smoke"] = {"Valerian"},["Herb"] = {"Bloodroot"},},
- ["soulchill"] = { },
- ["limp_veins"] = { ["Herb"] = {"Kelp"},},
- ["superstition"] = { ["Herb"] = {"Bellwort"},},
- ["recklessness"] = { ["Herb"] = {"Lobelia"},},
- ["hellsight"] = { ["Smoke"] = {"Elm"},},
- ["writhe_thighlock"] = { ["Special"] = {"Writhe"},},
- ["sand_trapped"] = { },
- ["emberbrand"] = { },
- ["effused_phlegm"] = { ["Salve"] = {"Epidermal to Torso"},},
- ["resin_glauxe"] = { },
- ["attuned"] = { },
- ["ripped_throat"] = { },
- ["infested"] = { ["Herb"] = {"Goldenseal"},},
- ["ripped_spleen"] = { },
- ["left_arm_dislocated"] = { ["Salve"] = {"Mending to left arm"},},
- ["left_arm_bruised"] = { ["Salve"] = {"Mending to left arm"},},
- ["ripped_groin"] = { },
- ["right_leg_numbed"] = { },
- ["ablaze"] = { ["Salve"] = {"Mending to Torso"},},
- ["right_leg_mangled"] = { ["Salve"] = {"Restoration to right leg"},},
- ["frozen_feet"] = { },
- ["writhe_bind"] = { ["Special"] = {"Writhe"},},
- ["right_leg_deepwound"] = { },
- ["right_leg_amputated"] = { ["Salve"] = {"Restoration to right leg"},},
- ["right_leg_damaged"] = { ["Salve"] = {"Restoration to right leg"},},
- ["left_leg_amputated"] = { ["Salve"] = {"Restoration to left leg"},},
- ["edict_absorption"] = { },
- ["lovers_effect"] = { ["Herb"] = {"Bellwort"},},
- ["infernal_seal"] = { },
- ["blindness"] = { },
- ["right_leg_bruised"] = { ["Salve"] = {"Mending to right leg"},},
- ["left_arm_broken"] = { ["Salve"] = {"Mending to left arm"},},
- ["right_arm_missing"] = { },
- ["soul_disease"] = { },
- ["collapsed_lung"] = { ["Salve"] = {"Restoration to Torso"},},
- ["right_arm_bruised_moderate"] = { ["Salve"] = {"Mending to right arm"},},
- ["writhe_armpitlock"] = { ["Special"] = {"Writhe"},},
- ["head_bruised_critical"] = { ["Salve"] = {"Mending to Head"},},
- ["head_bruised_moderate"] = { ["Salve"] = {"Mending to Head"},},
- ["right_arm_bruised"] = { ["Salve"] = {"Mending to right arm"},},
- ["amnesia"] = { },
- ["paranoia"] = { ["Herb"] = {"Ash"},},
- ["right_arm_amputated"] = { ["Salve"] = {"Restoration to right arm"},},
- ["resonance"] = { },
- ["plodding"] = { ["Herb"] = {"Moss"},},
- ["sadness"] = { ["Herb"] = {"Ash"},},
- ["right_arm_broken"] = { ["Salve"] = {"Mending to right arm"},},
- ["quicksand"] = { },
- ["physical_disruption"] = { ["Herb"] = {"Ginseng"},},
- ["petrified"] = { },
- ["frozen"] = { ["Salve"] = {"Caloric to Torso"},},
- ["blood_curse"] = { ["Herb"] = {"Ash"},},
- ["crushed_kneecaps"] = { ["Salve"] = {"Mending to Legs"},},
- ["edict_heretic"] = { },
- ["paresis"] = { ["Herb"] = {"Bloodroot"},},
- ["mob_impaled"] = { ["Special"] = {"Writhe"},},
- ["rend"] = { ["Herb"] = {"Ginseng"},},
- ["paralysis"] = { ["Herb"] = {"Bloodroot"},},
- ["body_odor"] = { ["Herb"] = {"Ginseng"},},
- ["burnt_eyes"] = { ["Salve"] = {"Epidermal to Head"},},
- ["no_deafness"] = { },
- ["disturb_inhibition"] = { },
- ["mutation_sickness"] = { },
- ["thin_blood"] = { ["Herb"] = {"Ginseng"},},
- ["mirroring"] = { ["Herb"] = {"Bloodroot"},},
- ["crushed_elbows"] = { ["Salve"] = {"Mending to Arms"},},
- ["disrupted"] = { ["Special"] = {"Concentrate"},},
- ["transfix"] = { },
- ["mental_fatigue"] = { },
- ["mental_disruption"] = { ["Herb"] = {"Ginseng"},},
- ["disfigurement"] = { ["Smoke"] = {"Valerian"},},
- ["mauled_face"] = { ["Salve"] = {"Restoration to Head"},},
- ["deadening"] = { ["Smoke"] = {"Elm"},},
- ["edict_weakening"] = { },
- ["gorged"] = { ["Salve"] = {"Epidermal to Torso"},},
- ["right_leg_bruised_critical"] = { ["Salve"] = {"Mending to right leg"},},
- ["loneliness"] = { ["Herb"] = {"Lobelia"},},
- ["fear"] = { ["Special"] = {"Compose"},},
- ["head_deepwound"] = { },
- ["edict_imprisonment"] = { },
- ["lethargy"] = { ["Herb"] = {"Ginseng"},},
- ["omen"] = { },
- ["effused_blackbile"] = { ["Salve"] = {"Epidermal to Torso"},},
- ["left_leg_mangled"] = { ["Salve"] = {"Restoration to left leg"},},
- ["claustrophobia"] = { ["Herb"] = {"Lobelia"},},
- ["crippled_body"] = { ["Herb"] = {"Bloodroot"},},
- ["head_damaged"] = { ["Salve"] = {"Restoration to Head"},},
- ["dizziness"] = { ["Herb"] = {"Goldenseal"},},
- ["grappled"] = { ["Special"] = {"Writhe"},},
- ["writhe_web"] = { ["Special"] = {"Writhe"},},
- ["magical_weakness"] = { },
- ["right_arm_deepwound"] = { },
- ["lifebane"] = { },
- ["left_leg_bruised"] = { ["Salve"] = {"Mending to left leg"},},
- ["left_leg_broken"] = { ["Salve"] = {"Mending to left leg"},},
- ["clumsiness"] = { ["Herb"] = {"Kelp"},},
- ["left_arm_bruised_moderate"] = { ["Salve"] = {"Mending left arm"},},
- ["disturb_impulse"] = { },
- ["ruptured_eardrum"] = { },
- ["baldness"] = { ["Herb"] = {"Kelp"},},
- ["effused_yellowbile"] = { ["Salve"] = {"Epidermal to Torso"},},
- ["cold_weakness"] = { },
- ["left_arm_bruised_critical"] = { ["Salve"] = {"Mending to left arm"},},
- ["crushed_chest"] = { ["Salve"] = {"Restoration to Torso"},},
- ["idiocy"] = { ["Herb"] = {"Moss"},},
- ["hypochondria"] = { ["Herb"] = {"Kelp"},},
- ["edict_condemned"] = { },
- ["hallucinations"] = { ["Herb"] = {"Ash"},},
- ["blood_poison"] = { ["Herb"] = {"Kelp"},},
- ["left_arm_deepwound"] = { },
- ["left_leg_dislocated"] = { ["Salve"] = {"Mending to left leg"},},
- ["deafness"] = { },
- ["asthma"] = { ["Herb"] = {"Kelp"},},
- ["justice"] = { ["Herb"] = {"Bellwort"},},
- ["disturb_sanity"] = { },
- }
- local herbP={["hypochondria"]=4, ["dizziness"]=4, ["dementia"]=4, ["clumsiness"]=3, ["stupidity"]=2, ["magic_impaired"]=1, ["weariness"]=1, ["shyness"]=3, ["hallucinations"]=3, ["asthma"]=0, ["epilepsy"]=3, ["paranoia"]=3, ["sensitivity"]=3, ["impatience"]=1, ["hypersomnia"]=2,
- ["blood_poisoning"]=3, ["dissonance"]=3, ["hatred"]=3, ["infested"]=3, ["limp veins"]=3, ["blood_curse"]=3, ["blighted"]=1, ["fear_of_commitment"]=2, ["body_order"]=3, ["overwhelming_pride"]=3, ["pacifism"]=3, ["haemophilia"]=3, ["recklessness"]=3,
- ["masochism"]=3, ["mental_disruption"]=3, ["peace"]=3, ["agoraphobia"]=3, ["physical_disruption"]=1, ["lovers_effect"]=1, ["loneliness"]=3, ["sunlight_allergy"]=2, ["superstition"]=3, ["berserking"]=2, ["vomiting"]=3, ["generosity"]=3,
- ["vertigo"]=3, ["thin_blood"]=3, ["justice"]=3, ["claustrophobia"]=3, ["rend"]=1, ["lethargy"]=2, ["addiction"]=3, ["paralysis"]=1, ["paresis"]=3, ["mirroring"]=0, ["crippled_body"]=1, ["crippled"]=2, ["slickness"]=3, ["heartflutter"]=3, ["sandrot"]=3,
- ["plodding"]=3, ["idiocy"]=3, ["no_deafness"]=3, ["no_blindness"]=3, ["stupidity"]=3,}
- local salveP={["anorexia"] = 0, ["gorge"] = 1, ["blood_effusion"] = 5, ["phlegm_effusion"] = 5, ["yellow_bile_effusion"] = 5, ["black_bile_effusion"] = 5, ["indifference"] = 0, ["stuttering"] = 3, ["blurry_vision"] = 1, ["head_bruised"] = 3, ["head_bruised_critical"] = 3, ["head_bruised_moderate"] = 3, ["head_damaged"] = 2,
- ["head_deepwound"] = 3, ["head_mangled"] = 2, ["left_arm_amputated"] = 2, ["left_arm_broken"] = 3, ["left_arm_bruised"] = 3,
- ["left_arm_bruised_critical"] = 3, ["left_arm_bruised_moderate"] = 3, ["left_arm_damaged"] = 2, ["left_arm_deepwound"] = 3,
- ["left_arm_dislocated"] = 3, ["left_arm_mangled"] = 3, ["left_arm_numbed"] = 3, ["left_leg_amputated"] = 2, ["left_leg_broken"] = 3,
- ["left_leg_bruised"] = 3, ["left_leg_bruised_critical"] = 3, ["left_leg_bruised_moderate"] = 3, ["left_leg_damaged"] = 2,
- ["left_leg_deepwound"] = 3, ["left_leg_dislocated"] = 3, ["left_leg_mangled"] = 2, ["left_leg_numbed"] = 3,
- ["right_arm_amputated"] = 2, ["right_arm_broken"] = 3, ["right_arm_bruised"] = 3, ["right_arm_bruised_critical"] = 3,
- ["right_arm_bruised_moderate"] = 3, ["right_arm_damaged"] = 2, ["right_arm_deepwound"] = 3, ["right_arm_dislocated"] = 3,
- ["right_arm_mangled"] = 2, ["right_arm_numbed"] = 3, ["right_leg_amputated"] = 2, ["right_leg_broken"] = 3,
- ["right_leg_bruised"] = 3, ["right_leg_bruised_critical"] = 3, ["right_leg_bruised_moderate"] = 3, ["right_leg_damaged"] = 2,
- ["right_leg_deepwound"] = 3, ["right_leg_dislocated"] = 3, ["right_leg_mangled"] = 2, ["right_leg_numbed"] = 3, ["torso_bruised"] = 3,
- ["torso_bruised_critical"] = 3, ["torso_bruised_moderate"] = 3, ["torso_damaged"] = 2, ["torso_deepwound"] = 3, ["torso_mangled"] = 2,
- ["burning"] = 3, ["shivering"] = 3, ["frozen"] = 2, ["no_caloric"] = 4, ["mass"] = 4, ["mauled_face"] = 3, ["spinal_rip"] = 2, ["crushed_chest"] = 3, ["smashed_throat"] = 2, ["throatslash"] = 3, ["crushed_elbow"] = 3, ["crushed_knee"]= 3}
- local smokeP= { ["aeon"] = 3, ["withering"] = 3, ["hellsight"] = 3, ["deadening"] = 3, ["slickness"] = 3, ["disfigurement"] = 3,}
- if not myaff.afflictionList.smokeAfflictions == {} and not attemptPipe and not myaff.afflictionList.pipeAfflictions["asthma"] and self.pipeBalance==1 and not attemptCures["Renew"] == "Random" and not attemptCures["Tree"] == "Random" then
- local bestPick=""
- for k, v in pairs(myaff.afflictionList.smokeAfflictions) do
- if bestPick=="" or smokeP[bestPick]> smokeP[k] then
- bestPick=k
- end
- end
- send("smoke " .. cureTable[bestPick]["Smoke"])
- attemptCures["Smoke"]=bestPick
- attemptPipe=true
- tempTimer(.5, [[attemptPipe=false]])
- tempTimer(.5, [[attemptCures[]].. "Smoke" .. [[]=""]])
- end
- if not myaff.afflictionList.herbAfflictions == {} and not attemptHerb and not myaff.afflictionList.salveAfflictions["anorexia"] and self.herbBalance==1 and not attemptCures["Renew"] == "Random" and not attemptCures["Tree"] == "Random" then
- local bestPick=""
- for k, v in pairs(myaff.afflictionList.herbAfflictions) do
- if bestPick=="" or herbP[bestPick]> herbP[k] then
- bestPick=k
- end
- end
- send("outc " .. cureTable[bestPick]["Herb"])
- send("eat " .. cureTable[bestPick]["Herb"])
- attemptHerb=true
- attemptCures["Herb"]=bestPick
- tempTimer(.5, [[attemptHerb=false]])
- tempTimer(.5, [[attemptCures[]].. "Herb" .. [[]=""]])
- end
- if not myaff.afflictionList.salveAfflictions == {} and not attemptSalve and not myaff.afflictionList.pipeAfflictions["slickness"] and self.salveBalance==1 and not attemptCures["Renew"] == "Random" and not attemptCures["Tree"] == "Random" then
- local bestPick=""
- for k, v in pairs(myaff.afflictionList.smokeAfflictions) do
- if bestPick=="" or salveP[bestPick]> salveP[k] then
- bestPick=k
- end
- end
- send("apply " .. cureTable[bestPick]["Salve"])
- attemptCures["Salve"]=bestPick
- attemptSalve=true
- tempTimer(.5, [[attemptSalve=false]])
- tempTimer(.5, [[attemptCures[]].. "Salve" .. [[]=""]])
- end
- if not myaff.afflictionList.focusAfflictions == {} and not attemptFocus and not myaff.afflictionList.herbAfflictions["impatience"] and self.focusBalance==1 and not attemptCures["Renew"] == "Random" and not attemptCures["Tree"] == "Random" then
- local focusTable={"stupidity","anorexia","epilepsy","mirroring", "mental_disruption",
- "paranoia","hallucinations","shyness","stuttering","dizziness","indifference","berserking",
- "pacifism","lovers","hatred","generosity","claustrophobia","vertigo","loneliness","agoraphobia",
- "masochism","recklessness","weariness","impatience","confusion","dementia","premonition",}
- for _, v in pairs(focusTable) do
- if myaff.afflictionList.focusAfflictions[v] and not attemptCures["Herb"]==v then
- attemptCures["Focus"]=v
- attemptFocus=true
- tempTimer(.5, [[attemptFocus=false]])
- tempTimer(.5, [[attemptCures[]].. "Focus" .. [[]=""]])
- break
- end
- end
- end
- if not myaff.afflictionList.treeAfflictions == {} and not (attemptTree and attemptRenew) and (self.treeBalance==1 or self.renewBalance ==1) and not (attemptRenew and attemptTree) then
- local affCounter=0
- for k, v in pairs(myaff.afflictionList.treeAfflictionts) do
- if not k==attemptCures["Focus"] or k==attemptCures["Salve"] or k==attemptCures["Smoke"] or k==attemptCures["Herb"] then
- affCounter=affCounter+1
- end
- end
- if attemptRenew then
- affCounter=affCounter-1
- end
- if attemptTree then
- affCounter=affCounter-1
- end
- end
- end
- afflictionList={}
- afflictionList.__index = afflictionList
- function afflictionList.init()
- local self=setmetatable({},afflictionList)
- self.afflictionList={}
- self.afflictionList.writheAffliction=false
- self.afflictionList.herbAfflictions={}
- self.afflictionList.focusAfflictions={}
- self.afflictionList.salveAfflictions={}
- self.afflictionList.treeAfflictions={}
- self.afflictionList.renewAfflictions={}
- self.afflictionList.pipeAfflictions={}
- self.defenseList={}
- return self
- end
- -- syntax equivalent to "MyClass.new = function..."
- function afflictionList.DA(self, defense)
- self.defenseList[defense]=false
- end
- function afflictionList.HA(self, defense)
- self.defenseList[defense]=nil
- end
- function afflictionList.RA(self, affliction)
- self.afflictionList.herbAfflictions[affliction]=nil
- self.afflictionList.focusAfflictions[affliction]=nil
- self.afflictionList.salveAfflictions[affliction]=nil
- self.afflictionList.treeAfflictions[affliction]=nil
- self.afflictionList.renewAfflictions[affliction]=nil
- self.afflictionList.pipeAfflictions[affliction]=nil
- self.afflictionList.writheAfflictions[affliction]=nil
- end
- function afflictionList.AA(self, affliction)
- self:herbAffliction(affliction)
- self:focusAffliction(affliction)
- self:salveAffliction(affliction)
- self:pipeAffliction(affliction)
- self:treeAffliction(affliction)
- print("finish")
- end
- function afflictionList.focusAffliction(self, affliction)
- local focusTable={"stupidity","anorexia","epilepsy","mirroring", "mental_disruption",
- "paranoia","hallucinations","shyness","stuttering","dizziness","indifference","berserking",
- "pacifism","lovers","hatred","generosity","claustrophobia","vertigo","loneliness","agoraphobia",
- "masochism","recklessness","weariness","impatience","confusion","dementia","premonition",}
- for _, v in pairs(focusTable) do
- if v==affliction then
- self.afflictionList.focusAfflictions[affliction]=true
- break
- end
- end
- end
- function afflictionList.herbAffliction(self, affliction)
- local herbTable={"hypochondria","dizziness","dementia", "clumsiness","stupidity", "magic_impaired", "weariness","shyness","hallucinations", "asthma","epilepsy","paranoia", "sensitivity","impatience","hypersomnia",
- "blood_poisoning","dissonance","hatred", "infested","limp veins","blood_curse", "blighted", "fear_of_commitment", "body_order", "overwhelming_pride", "pacifism","haemophilia","recklessness",
- "masochism", "mental_disruption", "peace", "agoraphobia", "physical_disruption", "lovers_effect", "loneliness", "sunlight_allergy", "superstition", "berserking", "vomiting", "generosity",
- "vertigo", "thin_blood", "justice", "claustrophobia", "rend", "lethargy", "addiction", "paralysis", "paresis", "mirroring", "crippled_body", "crippled", "slickness", "heartflutter", "sandrot",
- "plodding", "idiocy", "no_deafness", "no_blindness","stupidity",
- }
- for _, v in pairs(herbTable) do
- if v==affliction then
- self.afflictionList.herbAfflictions[affliction]=true
- break
- end
- end
- end
- function afflictionList.salveAffliction(self, affliction)
- local salveTable={"anorexia", "gorge", "blood_effusion", "phlegm_effusion", "yellow_bile_effusion", "black_bile_effusion", "indifference", "stuttering", "blurry_vision", "head_bruised","head_bruised_critical","head_bruised_moderate","head_damaged",
- "head_deepwound","head_mangled","left_arm_amputated","left_arm_broken","left_arm_bruised",
- "left_arm_bruised_critical","left_arm_bruised_moderate","left_arm_damaged","left_arm_deepwound",
- "left_arm_dislocated","left_arm_mangled","left_arm_numbed","left_leg_amputated","left_leg_broken",
- "left_leg_bruised","left_leg_bruised_critical","left_leg_bruised_moderate","left_leg_damaged",
- "left_leg_deepwound","left_leg_dislocated","left_leg_mangled","left_leg_numbed",
- "right_arm_amputated","right_arm_broken","right_arm_bruised","right_arm_bruised_critical",
- "right_arm_bruised_moderate","right_arm_damaged","right_arm_deepwound","right_arm_dislocated",
- "right_arm_mangled","right_arm_numbed","right_leg_amputated","right_leg_broken",
- "right_leg_bruised","right_leg_bruised_critical","right_leg_bruised_moderate","right_leg_damaged",
- "right_leg_deepwound","right_leg_dislocated","right_leg_mangled","right_leg_numbed","torso_bruised",
- "torso_bruised_critical","torso_bruised_moderate","torso_damaged","torso_deepwound","torso_mangled",
- "burning", "shivering", "frozen", "no_caloric", "mass", "mauled_face", "spinal_rip", "crushed_chest",
- "smashed_throat", "throatslash", "crushed_elbow", "crushed_knee" }
- for _, v in pairs(salveTable) do
- if v==affliction then
- self.afflictionList.salveAfflictions[affliction]=true
- break
- end
- end
- end
- function afflictionList.treeAffliction(self, affliction)
- local match=false
- local treeTable={ "hypochondria","dizziness","dementia", "clumsiness","stupidity", "magic_impaired", "weariness","shyness","hallucinations", "asthma","epilepsy","paranoia", "sensitivity","impatience","hypersomnia",
- "blood_poisoning","dissonance","hatred", "infested","limp veins","blood_curse", "blighted", "fear_of_commitment", "body_order", "overwhelming_pride", "pacifism","haemophilia","recklessness",
- "masochism", "mental_disruption", "peace", "agoraphobia", "physical_disruption", "lovers_effect", "loneliness", "sunlight_allergy", "superstition", "berserking", "vomiting", "generosity",
- "vertigo", "thin_blood", "justice", "claustrophobia",
- "anorexia", "gorge", "left_leg_broken", "right_leg_broken", "left_arm_broken",
- "right_arm_broken", "indifference", "stuttering", "blurry_vision",
- "rend", "lethargy", "addiction", "paralysis", "paresis", "mirroring", "crippled_body", "crippled", "slickness", "heartflutter", "sandrot",}
- for _, v in pairs(treeTable) do
- if v==affliction then
- self.afflictionList.treeAfflictions[affliction]=true
- self.afflictionList.renewAfflictions[affliction]=true
- break
- end
- end
- end
- function afflictionList.pipeAffliction(self, affliction)
- local pipeTable={ "aeon", "withering", "hellsight", "deadening", "slickness", "disfigurement"}
- for _, v in pairs(pipeTable) do
- if v==affliction then
- self.afflictionList.pipeAfflictions[affliction]=true
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement