------------------------- ---- Basics ---- ------------------------- bindkey = [`] CMD_AUTOFIRE explore_auto_rest = false msg_condense_short = false { local need_skills_opened = true function ready() force_mores() AnnounceDamage() if you.turns() == 0 and need_skills_opened then need_skills_opened = false crawl.sendkeys("m") end end } message_colour += mute:you're not good enough to have a special ability message_colour += mute:Your foxfire dissipates message_colour += mute:@corpse ------------------------- ---- Autofight ---- ------------------------- -- Do/don't throw stuff when autofighting autofight_throw = false autofight_throw_nomove = false autofight_fire_stop = true -- Fire order probably needs to be modified fire_order = launcher, rock, javelin, boomerang, dart, stone -- I will tab-fight myself to death like an idiot autofight_stop = 60 -- How much magic should I have left? automagic_stop = 50 ------------------------- ---- Autopickup ---- ------------------------- autopickup = $?!+"/} -- Allows easily dropping multiple items drop_mode += multi -- Always show the full list of items when you pick up a stack pickup_mode += multi -- Allows followers to pick up ANYTHING (take care not to lose artefacts) default_friendly_pickup += all -- Set Alias for Autopickup Exceptions ae := autopickup_exceptions ae += useless_item, dangerous_item, evil_item -- Don't pick up potion(s) of [coagulated] blood if you are not a vampire : if you.race() ~= "Vampire" then ae += potions? of.*blood : end -- Autopickup artefacts ae += wand of random effects { -- Equipment autopickup (by Medar and various others) local function pickup_equipment(it, name) if it.is_useless then return end local class = it.class(true) if class == "armour" then local good_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots"} st, _ = it.subtype() -- Autopickup found aux armour if 1) we don't have any or 2) it's artefact, -- or 3) if we don't have artefact or ego armour, and the found armour is -- ego. if good_slots[st] ~= nil then if good_slots[st] == "Gloves" and you.has_claws() > 0 then return end if it.artefact then return true end local cur = items.equipped_at(good_slots[st]) if cur == nil then return true end if cur.branded or cur.artefact then return end if it.branded then return true end -- Autopickup found body armour of the same kind we're wearing, according -- to conditions (2) and (3) above used for aux slots. elseif st == "body" then local cur = items.equipped_at("armour") if cur == nil then return end if cur.name("qual") ~= it.name("qual") then return end if it.artefact then return true end if cur.branded or cur.artefact then return end if it.branded then return true end end end return end add_autopickup_func(pickup_equipment) } ------------------------- ---- Spell slots ---- ------------------------- # Set Alias for Spell Slots slot := spell_slot # Try to keep in alphabetic order (by keybind) ------------------------- ---- Ability slots ---- ------------------------- ability_slot += Breathe:t ability_slot += Invisibility:iv -- Abilities prone to miskeys. ability_slot += Blink:IB ability_slot += Berserk:k ability_slot += Corrupt:C ability_slot += Enter the Abyss:E -- Use z for L1 damage/buff spells in starting books. -- Use letters in a word of the spell name at (1) beginning, (2) end, -- of words in the spell, (3) anywhere from the spell name, or (4) from the -- names of the spell schools, in order preference. -- Prefer to use vowels for self-enchantments or escape spells, consonants for -- remaining spells. Use upper-case letters for spells like Blink that are -- dangerous to miss-key. spell_slot += Manifold assault:mnf spell_slot += Animate armour:nmr spell_slot += Absolute Zero:zbtlr spell_slot += Alistair's intoxication:txc spell_slot += Apportation:aoi spell_slot += Airstrike:ktA spell_slot += Aura of abjuration:auo spell_slot += Agony:yng spell_slot += Animate dead:dmn spell_slot += Animate skeleton:snk spell_slot += Beastly appendage:zeau spell_slot += Blade hands:bhld spell_slot += Blink:IOAE spell_slot += Bolt of magma:bmtg spell_slot += Borgnjor's revivification:OEI spell_slot += Borgnjor's vile clutch:vbc spell_slot += Call canine familiar:fcn spell_slot += Call imp:cpl spell_slot += Cause fear:cfr spell_slot += Controlled blink:oia spell_slot += Corona:zcn spell_slot += Chain lightning:cln spell_slot += Confusing touch:oui spell_slot += Conjure flame:cfj spell_slot += Corpse rot:crt spell_slot += Dazzling Flash:dzlf spell_slot += Darkness:aed spell_slot += Death channel:dtcl spell_slot += Death's door:EAOI spell_slot += Discord:DCSR spell_slot += Disjunction:iuoe spell_slot += Dispel undead:ndp spell_slot += Dispersal:iea spell_slot += Dragon form:dgrf spell_slot += Dragon's call:dcl spell_slot += Ensorcelled hibernation:zxc spell_slot += Excruciating wounds:eao spell_slot += Fire storm:fmt spell_slot += Fireball:fbl spell_slot += Foxfire:zfxr spell_slot += Freezing cloud:fcg spell_slot += Freeze:zfr spell_slot += Frozen Ramparts:rptzf spell_slot += Fulminant prism:fpm spell_slot += Gell's Gravitas:gvt spell_slot += Haunt:htn spell_slot += Hydra form:hydf spell_slot += Ice form:crmf spell_slot += Ignition:ntg spell_slot += Iron shot:stnr spell_slot += Inner flame:frn spell_slot += Invisibility:ieI spell_slot += Irradiate:rtd spell_slot += Iskenderun's battlesphere:bnk spell_slot += Leda's Liquefaction:eai spell_slot += Lee's rapid deconstruction:ldr spell_slot += Lesser Beckoning:lbg spell_slot += Lehudib's crystal spear:lcs spell_slot += Lightning bolt:lbt spell_slot += Magic dart:zdt spell_slot += Malign gateway:mgy spell_slot += Mephitic cloud:mcd spell_slot += Metabolic englaciation:mcn spell_slot += Monstrous menagerie:mst spell_slot += Necromutation:eou spell_slot += Olgreb's toxic radiance:oia spell_slot += Orb of destruction:dbn spell_slot += Ozocubu's armour:oau spell_slot += Ozocubu's refrigeration:cbz spell_slot += Pain:zpn spell_slot += Passage of golubria:uoi spell_slot += Passwall:aeu spell_slot += Petrify:pyt spell_slot += Poisonous vapours:pvs spell_slot += Portal projectile:oei spell_slot += Ring of flames:oia spell_slot += Sandblast:zst spell_slot += Searing ray:sry spell_slot += Shadow creatures:scw spell_slot += Shatter:STH spell_slot += Shock:zok spell_slot += Shroud of golubria:oua spell_slot += Simulacrum:scm spell_slot += Silence:SLC spell_slot += Slow:swh spell_slot += Spellforged servitor:svt spell_slot += Spider form:sprf spell_slot += Static discharge:tdc spell_slot += Statue form:stmf spell_slot += Sticks to snakes:tkc spell_slot += Sticky flame:yfk spell_slot += Sting:zptg spell_slot += Stone arrow:wtn spell_slot += Summon demon:dsmn spell_slot += Summon forest:ftms spell_slot += Summon greater demon:gds spell_slot += Summon guardian golem:gds spell_slot += Summon horrible things:hts spell_slot += Summon hydra:hsy spell_slot += Summon ice beast:bct spell_slot += Summon lightning spire:lst spell_slot += Summon mana viper:vms spell_slot += Summon small mammal:zsm spell_slot += Swiftness:ieao spell_slot += Teleport other:tprh spell_slot += Tornado:TDN spell_slot += Tukima's Dance:dkc spell_slot += Vampiric draining:vnd spell_slot += Wereblood:eoEO spell_slot += Yara's violent unraveling:yvg # Default letters spell_slot += .*:XYZ ################ # Auto Exclude # ################ -- dangerous monsters auto_exclude += ancient lich, death drake, hydra, ice statue, orb of fire -- paralysing monsters and uniques auto_exclude += [^c] wizard, ancient lich, Ereshkigal, Erolcha, eyeball, Grinder, Jory, lich auto_exclude += Norris, ogre-mage, orb of eyes, orc sorcerer, Rupert, sphinx, vampire knight, fenstrider witch -- other uniques and unique followers auto_exclude += Agnes, Aizul, Arachne, Asterion, Blork, Boris, Crazy Yiuf, Donald, Dowan auto_exclude += Duvessa, Edmund, Erica, Eustachio, Fannar, Frances, Frederick, Gastronok auto_exclude += Grum, Harold, Ijyb, Jessica, Jorgrun, Joseph, Kirke, Louise, Mara, Maud auto_exclude += Maggie, Maurice, Menkaure, Mennas, Natasha, Nergalle, Nessos, Nikola, Pikel auto_exclude += Polyphemus, Prince Ribbit, Psyche, Roxanne, Saint Roka, Sigmund, Snorg auto_exclude += Sojobo, Sonja, Terence, Urug, Wiglaf, Xtahua, hog, lemure ------------------------- ---- Autotravel ---- ------------------------- -- Set travel delay to -1 for instant-travel, set to 1 to see travel paths travel_delay = -1 explore_stop = glowing_items,artefacts,greedy_pickup_smart explore_stop += greedy_visited_item_stack,stairs,shops explore_stop += altars,portals,branches,runed_doors,greedy_sacrificeable -- Adjusts how much autoexplore favours attempting to discover room perimeters and corners. -- At values higher than 0, autoexplore will more heavily favour visiting squares that are next to walls -- reasonable values range from 0 to 10 maybe? explore_wall_bias = 3 -- Disables key press from stopping autoexplore travel_key_stop = false runrest_ignore_poison = 3:30 runrest_ignore_monster += butterfly:1 trapwalk_safe_hp = dart:15,needle:25,arrow:25,bolt:30,spear:20,axe:40,blade:50 -- Only stop resting when both HP/MP are full rest_wait_both = true -- Set Alias' stop := runrest_stop_message ignore := runrest_ignore_message ignore += You regained.*mp -- Annoyances - Don't stop autotravel for these events ignore += A.*toadstool withers and dies ignore += disappears in a puff of smoke ignore += engulfed in a cloud of smoke ignore += engulfed in white fluffiness ignore += grinding sound ignore += in your inventory.*rotted away ignore += safely over a trap ignore += standing in the rain ignore += toadstools? grow ignore += You feel.*sick ignore += You walk carefully through the ignore += Your foxfire dissipates -- Jiyva Messages ignore += Jiyva appreciates your sacrifice ignore += Jiyva gurgles merrily ignore += Jiyva says: Divide and consume ignore += You hear.*splatter : if not string.find(you.god(), "Jiyva") then more += splits in two : end -- Qazlal ignore += The plant is engulfed ignore += You destroy the (bush|fungus|plant) ignore += You displace your -- Bad things - Stop autotravel for these events (duplicates some of HDAForceMore) stop += (blundered into a|invokes the power of) Zot stop += A huge blade swings out and slices into you[^r] stop += An alarm trap emits a blaring wail stop += flesh start stop += found a zot trap stop += hear a soft click stop += lose consciousness stop += sense of stasis stop += Wait a moment stop += wrath finds you stop += You fall through a shaft --------------------------- ---- Force mores ---- --------------------------- --------------------------------- ---- FM: Spell effects ---- --------------------------------- -- Searing Ray, so I don't wait through channeling it like a jackass more += finish channeling your searing ray more := force_more_message : if you.god() == "Ashenzari" then more += You have a vision of.*gates? : end more += The mighty Pandemonium lord .* resides here ---------------------------- ---- FM: Failures ---- ---------------------------- more += do not work when you're silenced more += sense of stasis more += Something interferes with your magic more += The rod doesn't have enough magic points more += The writing blurs in front of your eyes more += This potion can/'t work under stasis more += This wand has no charges more += You are held in a net more += You are too injured to fight blindly more += You can't unwield more += You cannot cast spells when silenced more += You cannot cast spells while unable to breathe more += You cannot teleport right now more += You don't have enough magic more += You fail to use your ability more += You haven't enough magic at the moment more += Your attempt to break free more += You miscast Statue Form ------------------------------ ---- FM: Bad things ---- ------------------------------ more += You are corroded more += corrodes you more += corrodes your equipment more += Your corrosive artefact corrodes you more += are blown away by the wind more += magical effects are unraveling more += infuriates you more += lose consciousness more += mark forms upon you more += MASSIVE DAMAGE more += Ouch! That really hurt! more += silver sears you more += Space bends around you more += Space warps horribly around you more += surroundings become eerily quiet more += Terrible wounds (open|spread) all over you more += The air around.*erupts in flames more += The air twists around and violently strikes you in flight more += You shudder from the earth-shattering force more += The barbed spikes become lodged in your body more += The barbed spikes dig painfully into your body as you move more += The poison in your body grows stronger more += The pull of.*song draws you forwards more += The.*engulfs you in water more += The(tentacled monstrosity|anaconda).*grabs you[^r] more += You (are|feel) drained more += You are electrocuted more += You are blown backwards more += You are burned terribly more += You are encased in ice more += You are engulfed in calcifying dust more += You are engulfed in dark miasma more += You are engulfed in mutagenic fog more += You are knocked back more += You are mesmerised more += You are slowing down more += You are trampled more += You convulse more += You feel a (horrible|terrible) chill more += You feel haunted more += You feel your attacks grow feeble more += You feel your flesh.*rot more += You feel your power drain away more += You feel your power leaking away more += You feel yourself grow more vulnerable to poison more += You stumble backwards more += You.*re (confused|more confused|too confused) more += You.*re (poisoned|more poisoned|lethally poisoned) more += Your body is wracked with pain more += Your damage is reflected back at you more += Your limbs are stiffening more += Your magical defenses are stripped away more += Your?.*suddenly stops? moving -- Calcifying dust check : if you.race()=="Gargoyle" then : else more += calcifying dust hits you : end --------------------------------------------- ---- FM: Monsters doing bad things ---- --------------------------------------------- more += A tree reaches out and hits you! more += begins to recite a word of recall more += blows on a signal horn more += cast banishment more += cast paralyse more += cast Torment more += goes berserk more += The moth of wrath goads something on more += is duplicated more += is no longer invulnerable more += Its appearance distorts for a moment more += Mara seems to draw the.*out of itself more += Mara shimmers more += Miasma billows from the more += shoots a curare more += stands defiantly in death's doorway more += steals.*your more += swoops through the air toward you more += The forest starts to sway and rumble more += The jumping spider pounces on you [^but] more += The shadow imp is revulsed by your support of nature more += The water nymph flows with the water more += The.*offers itself to Yredelemnul more += There is a horrible\, sudden wrenching feeling in your soul more += Vines fly forth from the trees! more += You are hit by a branch more += You feel you are being watched by something more += Your magical defenses are stripped away more += \'s.*reflects more += Two slime creatures merge to form an enormous slime creature. more += Two slime creatures merge to form a titanic slime creature. more += carrying a wand ------------------------------------- ---- FM: Unexpected things ---- ------------------------------------- more += A magical barricade bars your way more += Done waiting more += doors? slams? shut more += It doesn't seem very happy more += Mutagenic energies flood into your body more += Some monsters swap places more += (The|Your).*falls away! more += The divine light dispels your darkness! more += The walls disappear more += There is a sealed passage more += You are wearing\: more += You cannot afford.*fee more += You feel a genetic drift more += You feel monstrous more += You feel your rage building more += You have finished your manual more += You stop (a|de)scending the stairs more += You turn into a fleshy mushroom more += Your body shudders with the violent release of wild energies more += Your guardian golem overheats more += your magic stops regenerating more += Your scales start more += Green shoots are pushing up through the earth --------------------------- ---- FM: Less bad ---- --------------------------- more += You can move again more += You slip out of the net more += You.*and break free more += seems mollified --------------------------------- ---- FM: Translocations ---- --------------------------------- -- Teleporting more += You blink more += You.*teleport [^f] more += You feel strangely (unstable|stable) more += You feel your translocation being delayed more += Your surroundings flicker more += Your surroundings seem slightly different more += Your surroundings suddenly seem different -- [-Tele] more += You cannot blink right now more += You cannot teleport right now more += You feel.*firmly anchored in space more += You are no longer firmly anchored in space --------------------------------- ---- FM: Expiring effects ---- --------------------------------- ---- God Abilities -- Divine Shield (The Shining One) more += Your divine shield starts to fade. more += Your divine shield fades away. -- Jelly Prayer (Jiyva) Your prayer is over. -- Mirror Damage (Yredelemnul) more += dark mirror aura disappears ---- Player Spells -- Death Channel more += Your unholy channel is weakening -- Death's Door more += time is quickly running out more += life is in your own -- Enslavement more += is no longer charmed -- Haste more += Your extra speed is starting to run out more += You feel yourself slow down -- Invisibility more += You feel more conspicuous more += You flicker for a moment more += You flicker back -- Ozocubu's Armour and Condensation Shield more += Your icy (shield|armour) evaporates more += Your.*(shield|armour) melts away -- Silence more += Your hearing returns -- Swiftness stop += start to feel a little slower more += You feel sluggish -- Transmutations more += You have a feeling this form more += Your skin feels tender more += You feel yourself come back to life ---- Other -- Potion of Resistance more += You start to feel less resistant. more += Your resistance to elements expires -- Hell effects more += hell_effect: -- Others more += You rejoin the land of the living more += You have finished (your manual|forgetting about) more += Your scales start more += You feel monstrous ---------------------------- ---- FM: Monsters ---- ---------------------------- -- Surprise monsters! more += appears in a shower of sparks more += appears out of thin air more += comes (up|down) the stairs more += Something appears in a flash of light more += The.*is a mimic more += You sense the presence of something unfriendly more += The.*answers the.*call more += Wisps of shadow swirl around more += Shadows whirl around -- Monsters doing things I don't like! more += drinks a potion more += evokes.*(amulet|ring) more += reads a scroll more += zaps a (wand|rod) -- Dangerous monsters we force_more when first seen. -- Things with ranged (or extremely fast), irresistable effects. more += ((floating|shining) eye|dream sheep|death drake).*into view more += (wretched star|apocalypse crab|death drake).*into view more += (entropy weaver|torpor snail|spriggan druid).*into view more += (vault (warden|sentinel)|merfolk (avatar|siren)).*into view more += (guardian serpent|draconian shifter|convoker|death cob).*into view more += (phantasmal warrior|air elemental).*into view -- Paralysis/Petrify/Banish more += (orc sorcerer|(?" .. msg .. "") end end function init_force_mores() for i,v in ipairs(fm_patterns) do active_fm[#active_fm + 1] = false end end function update_force_mores() local activated = {} local deactivated = {} local hp, maxhp = you.hp() for i,v in ipairs(fm_patterns) do local msg = nil if type(v.pattern) == "table" then for j, p in ipairs(v.pattern) do if msg == nil then msg = p else msg = msg .. "|" .. p end end else msg = v.pattern end msg = "(?= v.cutoff then action = "-" elseif not active_fm[i] and you.xl() < v.cutoff then action = "+" end elseif v.cond == "maxhp" then if active_fm[i] and maxhp >= v.cutoff then action = "-" elseif not active_fm[i] and maxhp < v.cutoff then action = "+" end elseif v.cond == "relec" then if active_fm[i] and you.res_shock() >= 1 then action = "-" elseif not active_fm[i] and you.res_shock() >= 1 then action = "+" end end if action == "+" then activated[#activated + 1] = fm_name elseif action == "-" then deactivated[#deactivated + 1] = fm_name end if action ~= nil then local opt = "force_more_message " .. action .. "= " .. msg crawl.setopt(opt) active_fm[i] = not active_fm[i] end end if #activated > 0 and notify_fm then mpr("Activating force_mores: " .. table.concat(activated, ", ")) end if #deactivated > 0 and notify_fm then mpr("Deactivating force_mores: " .. table.concat(deactivated, ", ")) end end local last_turn = nil function force_mores() if last_turn ~= you.turns() then update_force_mores() last_turn = you.turns() end end init_force_mores() ------------------------- ---- End force_mores ---- ------------------------- } ---------------------------- ---- Damage calculation ---- ---------------------------- { local previous_hp = 0 local previous_mp = 0 local previous_form = "" local was_berserk_last_turn = false function AnnounceDamage() local current_hp, max_hp = you.hp() local current_mp, max_mp = you.mp() --Things that increase hp/mp temporarily really mess with this local current_form = you.transform() local you_are_berserk = you.berserk() local max_hp_increased = false local max_hp_decreased = false if (current_form ~= previous_form) then if (previous_form:find("dragon") or previous_form:find("statue") or previous_form:find("tree") or previous_form:find("hydra") or previous_form:find("ice")) then max_hp_decreased = true elseif (current_form:find("dragon") or current_form:find("statue") or current_form:find("tree") or current_form:find("hydra") or current_form:find("ice")) then max_hp_increased = true end end if (was_berserk_last_turn and not you_are_berserk) then max_hp_decreased = true elseif (you_are_berserk and not was_berserk_last_turn) then max_hp_increased = true end --crawl.mpr(string.format("previous_form is: %s", previous_form)) --crawl.mpr(string.format("current_form is: %s", current_form)) --crawl.mpr(string.format("max_hp_increased is: %s", max_hp_increased and "True" or "False")) --crawl.mpr(string.format("max_hp_decreased is: %s", max_hp_decreased and "True" or "False")) --crawl.mpr(string:format("you_are_berserk is: %s", you_are_berserk and "True" or "False")) --crawl.mpr(string:format("was_berserk_last_turn is: %s", was_berserk_last_turn and "True" or "False")) --Skips message on initializing game if previous_hp > 0 then local hp_difference = previous_hp - current_hp local mp_difference = previous_mp - current_mp if max_hp_increased or max_hp_decreased then if max_hp_increased then crawl.mpr("You now have " .. current_hp .. "/" .. max_hp .. " hp.") else crawl.mpr("You now have " .. current_hp .. "/" .. max_hp .. " hp.") end else --On losing health if (current_hp < previous_hp) then if current_hp <= (max_hp * 0.30) then crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") else crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") end --if hp_difference > (max_hp * 0.20) then -- crawl.mpr("MASSIVE DAMAGE!!") --end end --Can we make this display seperately? [split] if (current_hp < previous_hp) and (hp_difference > (max_hp * 0.20)) then crawl.mpr("MASSIVE DAMAGE!!") crawl.more() end --On gaining more than 1 health if (current_hp > previous_hp) then --Removes the negative sign local health_inturn = (0 - hp_difference) if (health_inturn > 1) and not (current_hp == max_hp) then if current_hp <= (max_hp * 0.30) then crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") else crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") end end if (current_hp == max_hp) then crawl.mpr("Health restored: " .. current_hp .. "") end end --On gaining more than 1 magic if (current_mp > previous_mp) then --Removes the negative sign local mp_inturn = (0 - mp_difference) if (mp_inturn > 1) and not (current_mp == max_mp) then if current_mp < (max_mp * 0.25) then crawl.mpr("You regained " .. mp_inturn .. " mp, and now have " .. current_mp .. "/" .. max_mp .. " mp.") elseif current_mp < (max_mp * 0.50) then crawl.mpr("You regained " .. mp_inturn .. " mp, and now have " .. current_mp .. "/" .. max_mp .. " mp.") else crawl.mpr("You regained " .. mp_inturn .. " mp, and now have " .. current_mp .. "/" .. max_mp .. " mp.") end end if (current_mp == max_mp) then crawl.mpr("MP restored: " .. current_mp .. "") end end --On losing magic if current_mp < previous_mp then if current_mp <= (max_mp / 5) then crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.") elseif current_mp <= (max_mp / 2) then crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.") else crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.") end end end end --Set previous hp/mp and form at end of turn previous_hp = current_hp previous_mp = current_mp previous_form = current_form was_berserk_last_turn = you_are_berserk end }