Magic Database #328
Aliases: Magic Database, Database
76 verbs · 97 properties · 0 children
Verbs
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
storms | #328 | | — | not readable (E_PERM) |
silent_storms | #328 | r | — | {} |
fw_combat_effect | #328 | r | — | #114198 |
ww_combat_effect | #328 | r | — | #14795 |
enchant_stats | #328 | r | — | {{"attack", 10}, {"dam", 3}, {"parryable", -5}, {"slowness", -1}, {"pen", -5}} |
bc_combat_effect | #328 | r | — | #8048 |
barkskin_body_areas | #328 | r | — | {#92227, #100494, #77303, #98861, #40357, #35454, #17709, #37195, #88604, #102165, #10807, #2616} |
bs_combat_effect | #328 | r | — | #72201 |
sc_combat_effect | #328 | r | — | #78412 |
waterwhip | #328 | r | — | #37646 |
is_combat_effect | #328 | r | — | #89034 |
firebolt_msgs | #328 | r | — | value (1203 chars){{"%N %<seems> unaffected by the firebolt spell energies."}, {"%N %<deflects> the spell with an occult gesture."}, {"%N %<jumps> nimbly to one side as a bolt of fire passes %o."}, {"A bolt of fire strikes %n enveloping %o in flame."}, {"The bolt burns itself out without penetrating your armour."}, {"The bolt fails to penetrate %D's armour."}, {"You feel a brief burning sensation.", "You feel a searing pain.", "Your flesh is blistered by the fiery touch.", "Your skin chars and peels away where the bolt struck!"}, {"%D is lightly toasted by the bolt.", "%D is scorched by the fiery blast.", "%D burns in the magickal flame!", "%D is deeply charred by eldritch fire!"}, {"The impact from the directed flame gives you a moment of vertigo.", "You black out briefly as the bolt strikes you.", "You struggle to remain conscious as the fiery blast strikes you.", "You are blasted and sent reeling by %N's firebolt."}, {"%D looks disoriented by the force of the fiery impact.", "%D is stunned by the fiery bolt.", "%D is blasted and stunned by %N's firebolt.", "%D is staggered by the tremendous power of %N's fiery blast."}, {"You are incinerated by %N's firebolt."}, {"The bolt of fire incinerates %D."}} |
power_firebolt | #328 | r | — | "100 + 4 * qual" |
pen_firebolt | #328 | r | — | 15 |
power_lightning | #328 | r | — | "4 * max(3 * qual / 2 - random(qual + 10) + magic, 1)" |
pen_lightning | #328 | r | — | 3 |
effects | #328 | r | — | {{"resist_msg"}, {"deflect_msg"}, {"spell_dodge_msg"}, {"blast_msg"}, {"clang_msg"}, {"oclang_msg"}, {"scratch_msg"}, {"oscratch_msg"}, {"stun_msg"}, {"ostun_msg"}, {"kill_msg"}, {"okill_msg"}} |
summonable_animals | #328 | r | — | value (405 chars){"%<%(rat%|mus%)%>", "%<%(badger%|meles%)%>", "%<%(cat%|feles%|feline%|tomcat%|puddytat%|pussy%|pussycat%)%>", "%<%(dog%|canis%|dawg%|rover%|fido%|hound%|mutt%|mastiff%)%>", "%<%(ram%|aries%|sheep%)%>", "%<%(boar%|verres%|pig%|hog%)%>", "%<%(ape%|simia%)%>", "%<%(tiger%|tigris%)%>", "%<%(bull%|taurus%|bos%|ox%|cow%)%>", "%<%(lion%|leo%)%>", "%<%(bear%|ursus%|grizzly%)%>", "%<%(hippopotamus%|hippo%)%>"} |
summonable_animal | #328 | r | — | #75686 |
web_combat_effect | #328 | r | — | #55049 |
web_msgs | #328 | rc | — | value (482 chars){{"%N %<seems> unaffected by the mystical webs."}, {"%N %<deflects> the spell with an occult gesture."}, {"%N %<dodges> to one side as a spider's web flies by %o."}, {"An enormous spider's web covers %n and envelopes %o in its sticky filaments."}, {"A spider's web tangles around %n and begins to envelop %o."}, {"%n %<is> completely enveloped in strands of web! %S %<struggles> to break free, but can not."}, {"Filler"}, {"Filler"}, {"Filler"}, {"Filler"}, {"Filler"}, {"Filler"}} |
lightning_msgs | #328 | rc | — | value (1564 chars){{"%N %<is> unaffected by the lightning from %d's storm."}, {"%N %<deflects> %d's lightning bolt with an occult gesture."}, {"%N %<leaps> aside as a lightning bolt strikes the ground beside %o."}, {"A lightning bolt lashes out from %d's storm, and strikes %n."}, {"The lightning bolt only flashes, and fails to do any significant damage."}, {"The lightning only gives off a flash of light, and appears to do no damage to %D."}, {"The small bolt only gives you a slight jolt.", "The thin arc of electricity hits you.", "The bright blue bolt strikes you forcefully.", "A blinding white-hot burst of electrical energy strikes you, sending agony through your very bones!"}, {"The small bolt only gives %d a slight jolt.", "The bright blue bolt strikes %d forcefully.", "A thin arc of electricity hits %d.", "A blinding white-hot burst of electrical energy cleaves into %d!"}, {"The small bolt only gives you a slight jolt, but also stuns you.", "The thunderbolt gives you a powerful shock, and stuns you.", "You are blasted by the lightning stroke, and sent reeling!", "The mighty thunderbolt crashes into you, racking your body with pain! Dark motes dance before your eyes!"}, {"The small bolt only gives %d a slight jolt, but stuns %[dpo].", "The thunderbolt gives %d a powerful shock, and stuns %[dpo].", "The lightning stroke blasts %d. and sends %[dpo] reeling!", "The mighty thunderbolt crashes into %d! For a moment, %d sways in pain."}, {"You are electrocuted by a lightning stroke from %n's storm."}, {"The lightning stroke from %n's storm electrocutes %D!"}} |
iceshell_paralyzed_msg | #328 | r | — | "You're encased in a globe of ice. You're not going to be doing much of anything." |
hf_combat_effect | #328 | r | — | #108334 |
rf_combat_effect | #328 | r | — | #107641 |
storm_task | #328 | rc | — | 0 |
acidrain | #328 | r | — | #83714 |
zombie | #328 | r | — | #14579 |
power_wound | #328 | rc | — | "qual * 2" |
pen_wound | #328 | rc | — | 0 |
wound_msgs | #328 | rc | — | value (1271 chars){{"%N %<is> seemingly totally unaffected by the spell."}, {"%N %<shields> %r from the spell with the glow of life-energy."}, {"ERROR: Successful dodge of wound spell."}, {"A black glow surrounds %n.", "Dark energies converge on %n."}, {"You notice a brief twinge of pain, but seem unharmed."}, {"%D winces, as if from a brief twinge of pain."}, {"You wince involuntarily from the pains running through your body.", "You jerk away as the spell inflicts excruciating agony."}, {"%D winces in pain.", "%D jerks away, as if in excruciating agony."}, {"You double over as you are caught in spasms of pain.", "You writhe in tortured agony as your body contracts in paroxysms of shuddering pain."}, {"%D doubles over as %[dps] is caught in spasms of pain.", "%D writhes in tortured agony as %[dpp] body contracts in paroxysms of shuddering pain."}, {"The incredible agony of your demise is brief, but not brief enough. As you scream involuntarily from the pain inflicted by the spell, you feel your body falling towards the ground. Yet you never seem to reach it, as you seem to keep falling into a void of eternal darkness and silence."}, {"%D screams and falls to the ground, quite obviously dead, %[dpp] body still contorted unnaturally from the agony of %[dpp] demise."}} |
spell_deflection_msg | #328 | rc | — | "%T %<deflects> the spell with an occult gesture." |
entangle_paralyzed_msg | #328 | rc | — | "You are entangled in numerous vines. You can't move to do much." |
en_combat_effect | #328 | rc | — | #63769 |
peaceful_spells | #328 | rc | — | {"heal", "barkskin", "harden", "waterwhip", "predict", "storm", "spellsing", "reverser", "appraise", "stoneflesh", "forcewall"} |
pu_combat_effect | #328 | r | — | #6749 |
gr_combat_effect | #328 | rc | — | #103657 |
dispel_skills | #328 | r | — | {#69062, #73102, #54026, #17251, #68846, #74393, #60016, #70784, #14725, #110969, #85976} |
dispel_objects | #328 | r | — | {#37646, #60126, #26790, #14282} |
dispel_room_skills | #328 | r | — | {#56377, #109701} |
self_cast_allowed | #328 | r | — | {"windwall", "barkskin", "recall", "reverser", "viper_bite", "backfire", "reverse_missiles", "mirrors", "petal", "spellsing", "bladebarrier", "parch"} |
self_cast_difficult | #328 | r | — | {"heal", "forcewall", "dispel", "haste", "slow", "wound", "iceshell"} |
magic_techniques | #328 | r | — | {#46377, #10887, #7127, #86906, #80069} |
magic_forms | #328 | r | — | {#37142, #104445, #74932, #89057, #104447, #62036, #81055, #99395, #16045, #97757} |
pen_magic_fist | #328 | rc | — | 8 |
magic_fist_msgs | #328 | rc | — | value (1255 chars){{"%N %<is> unaffected by the apparition."}, {"%N %<deflects> the spell with an occult gesture."}, {"%N %<jumps> nimbly to one side as the ghostly fist passes %o."}, {"A phantasmic fist strikes %n, slamming %o backwards."}, {"The spectral fist smashes harmlessly against your armour."}, {"The spectral fist fails to penetrate %D's armour."}, {"You feel strong shove against your chest.", "You have the wind knocked out of you.", "Your ribcage creaks painfully from the force of the blow.", "Your ribs crack beneath the cogent force!"}, {"%D is shoved backwards by the fist.", "%D is winded by the ethereal blow.", "%D groans from the magickal smash!", "%D is blasted backwards by the conjured fist!"}, {"The impact from the disembodied fist gives you a moment of vertigo.", "You black out briefly as the fist strikes you.", "You struggle to remain standing as the magickal knuckles strike you.", "You are slammed and sent reeling by %N's magickal fist."}, {"%D looks disoriented by the force of the impact.", "%D is stunned by the magickal punch.", "%D is slammed backwards and stunned by %N's imaginary fist.", "%D is staggered by the tremendous power of %N's convoked fist."}, {"You are crushed by %N's phantom fist."}, {"The phantom fist crushes %D."}} |
power_magic_fist | #328 | rc | — | "99 + 5 * qual" |
rm_armour_effect | #328 | rc | — | #4718 |
viper_bite | #328 | r | — | #15706 |
bf_combat_effect | #328 | r | — | #66404 |
pen_backfire | #328 | rc | — | 20 |
power_backfire | #328 | rc | — | "50 + 3 * qual" |
backfire_msgs | #328 | rc | — | value (1027 chars){{"%N %<ignores> the flames surrounding %d."}, {"%N deftly %<avoids> the flames surrounding %d."}, {"%N deftly %<avoids> the flames surrounding %d."}, {"Flames leap hungrily from %d's aura of fire towards %n."}, {"The flames fizzle out without penetrating your armour."}, {"The flames fail to penetrate %d's armour."}, {"You feel a brief burning sensation.", "You feel a searing pain.", "Your flesh is blistered by the fiery touch.", "Your skin chars and peels away where the flames touch!"}, {"%D is lightly toasted by the flames.", "%D is scorched by the fiery blast.", "%D burns in the magickal flame!", "%D is deeply charred by eldritch fire!"}, {"You are blasted and sent reeling by the flare of fire.", "You struggle to remain standing as the fiery aura washes over you.", "You black out briefly as the fire washes over you."}, {"%D looks disoriented by the flames washing over %[dpo].", "%D is charred and stunned by the fiery aura."}, {"You are incinerated by %n's aura of fire."}, {"The aura of fire incinerates %d."}} |
sc_recovery_effect | #328 | rc | — | #2984 |
ll_death_effect | #328 | rc | — | #7798 |
gemini | #328 | rc | — | #841 |
team_peaceful_spells | #328 | rc | — | {"haste", "mindprobe", "forcewall", "dispel", "recall"} |
range_spells | #328 | | — | not readable (E_PERM) |
firebolt_dodgeable | #328 | r | — | 1 |
magic_fist_dodgeable | #328 | r | — | 1 |
hawthorn | #328 | r | — | #9293 |
beguile_no_coin_msg | #328 | r | — | "" |
beguile_gemless_msg | #328 | r | — | "%N %<digs> through %p pockets for gems, but %<finds> none." |
beguile_coinless_msg | #328 | r | — | "%N %<digs> through %p pockets for coins, but %<finds> none." |
stoneflesh_body_areas | #328 | rc | — | {#109325, #103101, #115737, #103409, #105490, #28095, #110369, #82818, #89829, #4296, #112455, #106204} |
sf_combat_effect | #328 | rc | — | #10170 |
resurrection_effect | #328 | rc | — | #6727 |
bb_combat_effect | #328 | rc | — | #107507 |
bladebarrier_msgs | #328 | rc | — | value (1108 chars){{"A blade whips harmlessly by %n."}, {"%N %<pulls> back quickly enough to avoid the dicing daggers."}, {"%N %<pulls> back quickly enough to avoid the dicing daggers."}, {"A flashing blade collides with %n."}, {"The dagger clangs harmlessly off your armour."}, {"The dagger clangs harmlessly off %d's armour."}, {"You cringe as the dagger nicks skin.", "You feel a sharp pain as the dagger rends flesh.", "The steel blade cuts deep.", "Your flesh is torn from the bone!"}, {"%D cringes as the dagger nicks flesh.", "%D is sliced by the sharp blade.", "%D is gashed painfully!", "The dagger gashes deep into %d!"}, {"The loss of blood gives you a moment of vertigo.", "You are stunned briefly by the pain.", "You stifle a scream as the dagger tears into you.", "You cry out as the blade cuts bone!"}, {"%D looks disoriented by the loss of blood.", "%D is stunned by the loss of blood.", "%D is sliced and stunned by the vicious blade.", "%D is staggered by the tremendous gash by %n's blades."}, {"The daggerwound tears you open and you fall to death from bloodloss."}, {"The blade gashes deep, killing %d."}} |
power_bladebarrier | #328 | rc | — | "100 + 2 * qual" |
pen_bladebarrier | #328 | rc | — | 20 |
daggerstorm | #328 | rc | — | #116964 |
cs_combat_effect | #328 | rc | — | #53998 |
anjru | #328 | rc | — | #4993 |
harden_threshold | #328 | | — | not readable (E_PERM) |
ss_combat_effect | #328 | r | — | #91034 |
magic_form_colours | #328 | r | — | {"brown", "blue", "violet", "dark red", "green", "bright red", "pearly blue", "orange", "dark brown", "silver"} |
magic_technique_colours | #328 | r | — | {"white", "gold", "constantly fluctuating", "black", "purple"} |
spell_msg_db | #328 | r | — | #12328 |
dirge_effects | #328 | rc | — | #103369 |
check_effect | #328 | rc | — | #1218 |
shortblades | #328 | rc | — | {#8751, #8169, #1053, #3089} |
dodge_magic_fist | #328 | rc | — | -25 |
dodge_firebolt | #328 | rc | — | 5 |
bb_warehouse | #328 | | — | not readable (E_PERM) |
allowed_barkskin_armour | #328 | rc | — | {#28148, #58725, #4399, #73064, #13557, #102014, #114120, #99354, #77977, #66768} |
rot_puzzle | #328 | | — | not readable (E_PERM) |
self_default_spells | #328 | rc | — | {"recall", "haste"} |
worth | #328 | | — | -1 |
condition | #328 | | — | E_NONE |
odrop_failed_msg | #328 | | — | "%<tries> to drop %t but fails!" |
odrop_succeeded_msg | #328 | | — | "%<drops> %t." |
otake_succeeded_msg | #328 | | — | "%<picks> up %t." |
key | #328 | | — | not readable (E_PERM) |
aliases | #328 | | — | {"Magic Database", "Database"} |
description | #328 | | — | "A tangible object for use in the LambdaMOO RPG." |
object_size | #328 | | — | {238046, 1141286558} |
Ancestry
Ancestors (nearest first): #517 Generic LRPG Thing
Children: none
Call graph
Source
unslow
Referenced by
none
Source
1{doll, s0} = args; 2(rpg = $local.rpg):secure(); 3doll:set_att("slowness", s0); 4rpg:rpg_announce_all((target = doll.character).location, target.name, "'s speed picks up suddenly."); 5"THX1138 26-Mar-1997 -- New security and scatter assignment.";
heal
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2{by, doll, qual, ?spell = rpg:match_skill(verb), @extra} = args; 3"mod = `by.anima / 25 ! E_DIV => 0';"; 4"qual = qual + mod;"; 5target = doll.character; 6inj = doll.inj; 7amount = (3 + random(5)) + (qual / 9); 8spell = spell ? spell | rpg:match_skill(verb); 9if (typeof(effect = doll:magic_effects(by, doll, qual, spell, @extra)) != NUM) 10 return effect; 11elseif ((qual = qual - effect) <= 0) 12 rpg:say_action("%N %<seems> unaffected by the healing spell energies.", target); 13elseif (inj > amount) 14 doll:set_att("inj", inj - amount); 15 rpg:say_action("Some of %n's injuries are healed.", target); 16else 17 doll:set_att("inj", 0); 18 rpg:say_action("%N's injuries are healed.", target); 19 if ((by != doll) && (random(50) == 5)) 20 by:mod_anima(1, rpg.death_db.anima_slip_msgs[1]); 21 endif 22endif 23if (cloud = doll:read_misc_note("stinkcloud")) 24 if (qual > cloud[1]) 25 doll:erase_misc_note("stinkcloud"); 26 this.sc_combat_effect:remove(doll); 27 rpg:say_action("%N %<recovers> from the effects of the stinking cloud.", target); 28 endif 29endif 30if ((doll.deathless && (!((this.is_combat_effect in doll.freeze_effects) || (parent(target) == this.zombie)))) && (rpg:trusted(by.character) || (caller == #95506))) 31 doll.deathless = 0; 32 this.pu_combat_effect:remove(doll); 33 if (i = $list_utils:assoc("unputrefy", doll.schedule, 2)) 34 doll:cancel(i); 35 endif 36 rpg:say_action("%N's wounds cease bleeding.", target); 37endif 38"DR 02-AUG-94 -- Changed security, added magic_effect code."; 39"Profane 27-JAN-96 1325EST -- changed setting .inj directly to :set_att"; 40"Profane 2-MAY-96 2022EST -- commented out magic_effect bit."; 41"Profane 15-MAY-96 1223EST -- added healing of stinkclouds."; 42"Profane 13-DEC-96 2032PST -- put in :magic_effects call.. thought it was already here, where'd it go?"; 43"THX (#105941) - Wed Feb 18, 1998 - Added a bunch of checks to ensure that 'spell' is being defined before sending to the magic_effects check."; 44"Profane (#30788) - Tue May 1, 2001 - Add ability for gms and the vicar to cure putrefied peeps."; 45"Hydros (#106189) - Fri Nov 26, 2004 - Added karmic slide towards Good for a complete successful heal of anyone that isn't oneself. Healing friends is good, and often so is healing an enemy. So let's avoid philosophical debate or ticky checks of .aggressor and whatnot, okay?";
blastfork
Referenced by
- #328:storm line 36:
this:blastfork
Source
1":blastfork(caster, strikes, quality[, interval])"; 2{by, strikes, qual, ?interval = 0} = args; 3(rpg = $local.rpg):secure(); 4if (!valid(doll = rpg:get_doll(by))) 5 return; 6endif 7{this, threshold} = {rpg.magic_db, rpg.idle_threshold}; 8time = max(interval, 7); 9this.storms = listappend(this.storms, {task_id(), by, strikes, qual, interval}); 10while ((i = task_id() in this:storm_id(this.storms)) && (this.storms[i][3] > 0)) 11 (rpg.gm_lag < threshold) && suspend(max((time + rpg.gm_lag) + 4, 9)); 12 if (i = task_id() in this:storm_id(this.storms)) 13 this.storms[i][3] = this.storms[i][3] - 1; 14 current = this.storms[i][4] = max(this.storms[i][4] - 1, 1); 15 if ((by in connected_players()) || (!is_player(by))) 16 this:blast(by, by.location, current); 17 else 18 if (!(j = task_id() in this:storm_id(this.silent_storms))) 19 this:endblast(by); 20 else 21 this.silent_storms = listdelete(this.silent_storms, j); 22 endif 23 return 0; 24 endif 25 elseif (j = task_id() in this:storm_id(this.silent_storms)) 26 this.silent_storms = listdelete(this.silent_storms, j); 27 return 0; 28 endif 29endwhile 30this:endblast(by); 31if (i = task_id() in this:storm_id(this.storms)) 32 this.storms = listdelete(this.storms, i); 33endif 34"DR 25-MAR-94 -- Hacked so that if the storm was killed with the 'silent' optional second argument to kill_storm, it will not call :endblast on exiting...it assumes that whatever killed it handled the message."; 35"DR 02-APR-94 -- Added a check to make sure the player is still connected before dispensing another jolt :) ... in response to a report from Miles that people were casting storms then disconnecting to avoid being hit by the monsters they were killing!"; 36"Miles 5/22/94 added $code_utils:verb_loc() as suggested by Isagi so players can't cast additional storms using staffs from kids of .magic_db"; 37"Profane 6-JUN-96 2001EDT -- Changed For loop to while loop, dynamically referencing # of strikes each iteration; so that other spells/things can muck with a storm's number of strikes."; 38"Profane 7-JUN-96 1615EDT -- Qual goes down by one with every strike."; 39"THX 23-Jun-1997 -- Changed the way storm info works _all_ the time since the info keeps changing with each strike. Always use task_id() [using this:storm_id() to find the slot] now to identify a given storm. Always use listdelete (instead of setremove). Moved a few evals out of the while loop."; 40"THX (#105941) - Wed Nov 18, 1998 - Changed it to not suspend at all if the lag is too high. :blast() then kills the storm.";
blast
Referenced by
- #328:blastfork line 16:
this:blast - #328:storm line 34:
this:blast
Source
1{by, area, qual} = args; 2(rpg = $local.rpg):secure(); 3{threshold, c_u} = {rpg.idle_threshold, $command_utils}; 4att = rpg:get_doll(by); 5peaceful = `area.peaceful ! ANY => 0'; 6for targ in (setremove(att.aggressor, by)) 7 if (rpg.gm_lag > threshold) 8 this:kill_storm(by); 9 else 10 rpg:s_i_n(); 11 endif 12 if (("cavern" in area.room_data) || ("structure" in area.room_data)) 13 qual = (2 * qual) / 3; 14 endif 15 if ((targ in rpg.pcs) && ((!is_player(targ)) || (`idle_seconds(targ) ! ANY => 181' < threshold))) 16 (targ.location == area) && this:zap(by, @peaceful ? {by, qual * 2} | {targ, qual}, area); 17 else 18 att.aggressor = setremove(att.aggressor, targ); 19 endif 20endfor 21if (att.aggressor) 22 rpg:s_i_n(0); 23 att.aggressor && (peaceful || att:invite((att.slowness / 2) + 1, {2})); 24elseif (random(5) == 4) 25 source = (length(this:storms_cast_by(by)) > 1) ? "One of the storms over " | "The storm over "; 26 rpg:rpg_announce_all(area, source, by.name, "'s head gives a grumble of thunder."); 27endif 28"Mooshie (#106469) - Fri Oct 24 20:27:43 1997 PDT - Updated, streamlined a bit and added :suspend_if_needed"; 29"THX (#105941) - Wed Nov 18, 1998 - Cleaned up the code. Added a splurge that eats the storm if the lag exceeds rpg.idle_threshold."; 30"THX (#105941) - Tue Jun 13, 2000 - Altered to handle peaceful rooms. No doll:invite is called and the caster becomes the target for all non-caster targets."; 31"THX (#105941) - Mon Jul 3, 2000 - Altered qual by factor of 2/3 if storm is just outside the structure/cavern."; 32"Hannibal (#104762) - Sat Dec 23, 2000 - Changed line 15 to < threshold so players can zap players again.";
storm
Referenced by
none
Source
1":storm(caster-doll, dummy-arg, quality, skillobject)"; 2{bydoll, dummy, qual, skillobj} = args; 3(rpg = $local.rpg):secure(); 4area = (by = bydoll.character).location; 5qual = qual - (length(this:storms_cast_by(by)) * (25 + random(25))); 6duration = ((qual * 5) + 30) + random(20); 7origstrikes = duration / 10; 8firstrike = 0; 9if (("cavern" in area.room_data) || ("structure" in area.room_data)) 10 qual = qual / 2; 11endif 12if (qual > 50) 13 rpg:playertell(by, "You conjure up a raging electrical storm in ", area.name, "."); 14 rpg:rpg_announce_all_but(area, {by}, by.name, " has conjured a rampant electrical storm that rages over ", by.pp, " head."); 15 strikes = origstrikes + 2; 16 firstrike = 1; 17elseif (qual > 15) 18 rpg:playertell(by, "You summon a thunderstorm in ", area.name, "."); 19 rpg:rpg_announce_all_but(area, {by}, by.name, " has summoned a miniature thunderstorm that roars above ", by.po, "."); 20 strikes = origstrikes + 1; 21elseif (qual > 0) 22 rpg:playertell(by, "You call up a minor storm in ", area.name, "."); 23 rpg:rpg_announce_all_but(area, {by}, by.name, " has called up a minor storm that grumbles over ", by.po, "."); 24 strikes = origstrikes; 25else 26 if (!this:storms_cast_by(by)) 27 return rpg:rpg_announce_all(area, "Nothing happens."); 28 else 29 return rpg:rpg_announce_all(area, "The clouds above ", by.name, "'s head rage and hurl rain down upon ", by.po, "."); 30 endif 31endif 32if (firstrike) 33 strikes = strikes - 1; 34 this:blast(by, area, qual); 35endif 36this:blastfork(by, strikes, qual, 10); 37"quinn 19-NOV-93 0839: More storms, less quality."; 38"6/1/95 Slither -- changed the announce_all's to announce_all_but's as Quisinart suggested."; 39"THX (#105941) - Mon Jul 3, 2000 - Drop qual by factor of 2 if cast attempt is in \"cavern\" or \"structure\" area."; 40"Hydros (#106189) - Thu Dec 9, 2004 - Changed \"Nothing happens\" to a rainy message while the player has previously cast storms raging. More in line with LRPG gradation spell casting messages (e.g., Haste's `<player>'s motion speeds up briefly, before returning to its former level.' msg).";
endblast
Referenced by
- #328:blastfork line 19:
this:endblast - #328:blastfork line 30:
this:endblast
Source
1":endblast(by) => Simply prints messages signalling the end of a storm spell."; 2(rpg = $local.rpg):secure(); 3{by} = args; 4rpg:playertell(by, "The storm over your head slowly dissipates, leaving ", where_storm = by.location.name, " calm once again."); 5rpg:rpg_announce_all_but(by.location, {by}, "The thunderstorm over ", by.name, "'s head dissipates, leaving ", where_storm, " calm once again."); 6where = $code_utils:verb_loc(); 7for info in (where.silent_storms) 8 if (!$code_utils:task_valid(info[1])) 9 where.silent_storms = setremove(where.silent_storms, info); 10 endif 11endfor 12"THX1138 23-Jun-1997 -- Modernized and cleaned up a bit. rpg_announce, scatter, reduced evals, ...";
storms_cast_by
Referenced by
- #328:blast line 25:
this:storms_cast_by - #328:storm line 5:
this:storms_cast_by - #328:storm line 26:
this:storms_cast_by - #328:kill_storm line 8:
this:storms_cast_by - #328:mergestorm line 5:
this:storms_cast_by
Source
1":storms_cast_by(who) => a list of lists of info on storms cast by `who'."; 2" Each list is in the format {task_id, caster, strikes, qual, interval}"; 3{who} = args; 4$local.rpg:secure(); 5this = $code_utils:verb_loc(); 6storms = {}; 7for storm in (this.storms) 8 {tid, caster, strikes, qual, interval} = storm; 9 if (!$code_utils:task_valid(tid)) 10 this.storms = setremove(this.storms, storm); 11 elseif (caster == who) 12 storms = {@storms, storm}; 13 endif 14endfor 15return storms; 16"DR 18-MAR-94: Added security, callable only by trusted folks."; 17"Miles 5/22/94 added $code_utils:verb_loc() as suggested by Isagi so that players can't cast additional storms using staffs from kids of .magic_db";
kill_storm
Referenced by
- #328:blast line 8:
this:kill_storm - #328:calm*_winds line 13:
this:kill_storm
Source
1":kill_storm(caster|task_id [, \"silent\"]) => Either cancel all storms cast by `player', or a specific storm specified by task_id (given by this:storms_cast_by). If the\"silent\" parameter is called, the forked task associated with the storm will not cause a message showing the storm's dissipation to be displayed."; 2{query, ?silent = 0} = args; 3this = $code_utils:verb_loc(); 4if (!$local.rpg:trusted(caller_perms())) 5 return E_PERM; 6elseif (typeof(query) == OBJ) 7 stormcount = 0; 8 for storm in (this:storms_cast_by(query)) 9 this.storms = setremove(this.storms, storm); 10 stormcount = stormcount + 1; 11 silent && (this.silent_storms = setadd(this.silent_storms, storm)); 12 endfor 13 return stormcount; 14elseif (typeof(query) != NUM) 15 return E_INVARG; 16elseif (i = $list_utils:assoc(query, this.storms)) 17 this.storms = setremove(this.storms, i); 18 silent && (this.silent_storms = setadd(this.silent_storms, i)); 19 return 1; 20else 21 return E_NONE; 22endif 23"DR 25-MAR-94 -- Hacked to add the kludge that allows a storm to be silently dissipated, in order for Frobno's magic storm-sweeping amulet and other such things to control how it looks when the storm goes away."; 24"Miles 5/22/94 added $code_utils:verb_loc() as suggested by Isagi so that players can't cast additional storms by using staffs from kids of .magic_db";
storms_active_in
Referenced by
- #328:calm*_winds line 9:
this:storms_active_in - #328:predict line 7:
this:storms_active_in
Source
1":storms_active_in(room) => a list of lists of info on storms raging in the given location."; 2" Each list is in the format {task_id, caster, strikes, qual, interval}"; 3{where} = args; 4$local.rpg:secure(); 5this = $code_utils:verb_loc(); 6people = where:contents(); 7storms = {}; 8for storm in (this.storms) 9 {tid, caster, strikes, qual, intvl} = storm; 10 if (!$code_utils:task_valid(tid)) 11 this.storms = setremove(this.storms, storm); 12 elseif (caster in people) 13 storms = {@storms, storm}; 14 endif 15endfor 16return storms; 17"Miles 5/22/94 added $code_utils:verb_loc() as suggested by Isagi so that players can't cast additional storms using staffs from kids of .magic_db";
teleport
Referenced by
- #328:recall line 40:
this:teleport
Source
1":teleport(doll, where, [leave_msg, [oleave_msg, [arrive_msg, oarrive_msg, [nogo_msg, [onogo_msg]]]]]]) => send the doll to where"; 2"An RPG-teleportation, without exit penalties."; 3(rpg = $local.rpg):secure(); 4nogo_msg = "Your surroundings flicker for a moment, as if your position were uncertain."; 5onogo_msg = "%N flashes out of existence for a brief moment. The air crackles around %p body."; 6leave_msg = "The image of %l gains resolution in your mind. Space warps around your body and suddenly..."; 7oleave_msg = "%N flashes out of existence, leaving only an electric tinge of magick."; 8arrive_msg = "After a brief moment of vertigo, you look around."; 9oarrive_msg = "%N flashes into existence, glancing around with desperate anxiety."; 10{doll, where, ?leave_msg, ?oleave_msg, ?arrive_msg, ?oarrive_msg, ?nogo_msg, ?onogo_msg} = args; 11who = doll.character; 12old = who.location; 13if (rpg:is_rpg_room(where = $object_utils:isa(where, $exit) ? where.dest | where)) 14 `where:bless_for_teleport(who) ! E_VERBNF'; 15endif 16if (!where:acceptable(who)) 17 rpg:rpg_announce_all_but(old, {who}, $string_utils:pronoun_sub(onogo_msg, who, old, where)); 18 rpg:playertell(who, $string_utils:pronoun_sub(nogo_msg, who, old, where)); 19else 20 rpg:rpg_announce_all_but(old, {who, old, where}, $string_utils:pronoun_sub(oleave_msg, who, old, where)); 21 rpg:playertell(who, $string_utils:pronoun_sub(leave_msg, who, old, where)); 22 `old:bless_exit(who) ! ANY => 0'; 23 (checker = this.check_effect):add(@check = {doll, old, {checker.owner}, "Attempted blocking of teleport.", ((((tostr(who.name) + " failed move checking being sent from ") + old.name) + " to ") + where.name) + "."}); 24 if ((widx = $list_utils:assoc(callers()[1][1], rpg.approved_wizmoves)) && (widx[2] == callers()[1][2])) 25 rpg:wizmove(who, where); 26 else 27 who:moveto(where); 28 endif 29 checker:remove(@check); 30 if (((who.location == old) && rpg:trusted_verb(old, "_eject")) && is_player(who)) 31 old:_eject(who); 32 return; 33 endif 34 rpg:rpg_announce_all_but(who.location, {who}, $string_utils:pronoun_sub(oarrive_msg, who, old, where)); 35 rpg:playertell(who, $string_utils:pronoun_sub(arrive_msg, who, old, where)); 36endif 37"Profane 27-MAY-96 1716EST - Added porting for AHaBs with exit homes and cleaned up flow of verb."; 38"Irin Sat Feb 15 14:51:23 1997 PST -- Rewrite to update and add optional custom messages."; 39"Mooshie (#106469) - Sun Oct 12 00:14:39 1997 PDT - Added :bless_for_teleport call for RPG rooms"; 40"dalton (#116601) - Fri Dec 27, 2002 - Added check effect for blocking by custom :moveto."; 41"Hydros (#106189) - Sun Sep 4, 2005 - Converted to use $local.rpg:wizmove() in cases where the calling object-and-verb are in $local.rpg.approved_wizmoves."; 42" - Left in all the old extra measures we had taken for cases of people hacking their :moveto() etc., in case some monkey ever hacks some way around move() or something.";
recall
Referenced by
none
Source
1":recall(OBJ by_doll, OBJ target_doll, NUM qual, OBJ skillobjeect, [ OBJ destination, [STR leave_msg, [STR oleave_msg, [STR arrive_msg, [STR oarrive_msg, [STR nogo_msg, [STR onogo_msg]]]]]]])"; 2"teleport caster to home, or other specified destination."; 3(rpg = $local.rpg):secure(); 4{by_doll, target_doll, qual, skillobject, ?dest = target_doll.character.home, @msgs} = args; 5who = target_doll.character; 6by = by_doll.character; 7if (!`$recycler:valid(dest) ! ANY') 8 dest = $player_start; 9endif 10qual = (qual * by_doll.size) / target_doll.size; 11if (who.location == dest) 12 rpg:rpg_announce_all(who.location, "Nothing happens."); 13 return E_NONE; 14elseif (typeof(effect = target_doll:magic_effects(@args)) != NUM) 15 return effect; 16elseif ((qual = qual - effect) < 0) 17 rpg:say_action("%N %<seems> unaffected by the recall magicks.", who); 18 return E_NONE; 19elseif ((by != who) && ((by in target_doll.aggressor) || (!is_player(who)))) 20 if ((target_doll.magic_theory > 0) && (rpg.skills.recall:resolve(who, -qual) > 0)) 21 return rpg:rpg_announce_all(who.location, this:spell_deflection_msg(who, by)); 22 endif 23endif 24if ((((is_player(who) && $object_utils:isa(dest, $room)) && (!$perm_utils:controls(who, dest))) && (!(who in dest.residents))) && (!$code_utils:verb_or_Property(dest, "accept_rpg_teleport"))) 25 `who.location:_eject(who) ! ANY'; 26 rpg:rpg_announce_all(who.location, "Nothing happens. Well, nothing except that ", who.name, " is suddenly missing."); 27 return E_PERM; 28else 29 if (by_doll.lifelinked && (by_doll.lifelinked[1] == who)) 30 this:unlink(by_doll, target_doll); 31 endif 32 if (by != who) 33 fork (0) 34 if (by.location != who.location) 35 by_doll.aggressor = setremove(by_doll.aggressor, who); 36 target_doll.aggressor = setremove(target_doll.aggressor, by); 37 endif 38 endfork 39 endif 40 return this:teleport(target_doll, dest, @msgs); 41endif 42"Profane 28-MAY-96 836EDT -- Changed so AHaBs can recall, also added possibility or resisting spell."; 43"Irin Sat Feb 15 13:44:09 1997 PST -- Rewrite to pass custom teleport messages and destinations."; 44"THX (#105941) - Wed Oct 13, 1999 - Added splurge so that if you recall someone that you're lifelinked to, you'll be unlinked."; 45"THX (#105941) - Tue Dec 14, 1999 - Changed it so that players can't change Eir props to reject a recall."; 46"Profane (#30788) - Sun Dec 24, 2000 - Invalid dests get rerouted to $player_start"; 47"THX (#105941) - Fri Apr 13, 2001 - Fork off a command to remove aggressor stuff if the target actually moves.";
print_storms
Referenced by
none
Source
1"print_storms(no args | OBJ)"; 2"returns {} or a list of strings formatted for player:tell_lines()"; 3"If argument is given and is a room, print info for that room, if it is not a room, print storms cast by that object. If no argument, do all storms globally"; 4{?what = 0} = args; 5(rpg = $local.rpg):secure(); 6db = rpg.magic_db; 7if (typeof(what) != OBJ) 8 storms = db.storms; 9elseif ($object_utils:isa(what, $room)) 10 storms = db:storms_active_in(what); 11else 12 storms = db:storms_cast_by(what); 13endif 14if (!storms) 15 return {}; 16endif 17biglist = stormlist = {}; 18{l_u, s_u} = {$list_utils, $string_utils}; 19for i in [1..length(storms)] 20 who = storms[i][2]; 21 qual = storms[i][4]; 22 if (ind = l_u:iassoc(who, stormlist)) 23 if (qual > 50) 24 stormlist[ind][2] = stormlist[ind][2] + 1; 25 elseif (qual > 15) 26 stormlist[ind][3] = stormlist[ind][3] + 1; 27 else 28 stormlist[ind][4] = stormlist[ind][4] + 1; 29 endif 30 else 31 raging = thunder = minor = 0; 32 if (qual > 50) 33 raging = 1; 34 elseif (qual > 15) 35 thunder = 1; 36 else 37 minor = 1; 38 endif 39 stormlist = {@stormlist, {who, raging, thunder, minor}}; 40 endif 41endfor 42for j in [1..length(stormlist)] 43 plyr = stormlist[j][1]; 44 flags = `plyr.location.room_data ! ANY => {}'; 45 outdoors = ("cavern" in flags) || ("structure" in flags); 46 text = {}; 47 r = stormlist[j][2]; 48 t = stormlist[j][3]; 49 m = stormlist[j][4]; 50 if (r == 1) 51 text = {@text, outdoors ? "an electrical storm" | "a raging electrical storm"}; 52 elseif (r > 1) 53 text = {@text, tostr(r) + " raging electrical storms"}; 54 endif 55 if (t == 1) 56 text = {@text, "a thunderstorm"}; 57 elseif (t > 1) 58 text = {@text, tostr(t) + " thunderstorms"}; 59 endif 60 if (m == 1) 61 text = {@text, "a minor storm"}; 62 elseif (m > 1) 63 text = {@text, tostr(m) + " minor storms"}; 64 endif 65 shortlist = outdoors ? tostr(plyr.name, " has ", s_u:english_list(text), " raging outside.") | tostr(plyr.name, " has up ", s_u:english_list(text), "."); 66 biglist = {@biglist, shortlist}; 67endfor 68return biglist; 69"Profane 17-DEC-95 1211EST -- (re)modified to do storms_cast_by as well."; 70"THX (#105941) - Mon Jul 3, 2000 - Alter messages if the caster is sheltered.";
forcewall
Referenced by
none
Source
1"Conjure up a wall of force."; 2{mage_doll, doll, qual, skillobj, @extra} = args; 3char = doll.character; 4(rpg = $local.rpg):secure(); 5if (typeof(effect = doll:magic_effects(@args)) != NUM) 6 return effect; 7elseif ((qual = qual - effect) <= 0) 8 rpg:say_action("%N %<seems> unaffected by the magick.", char); 9 return; 10endif 11note = doll:read_misc_note("force_wall"); 12qual = qual + random(10); 13if (typeof(note) == LIST) 14 "mage_doll = (note[1] == doll) ? doll | mage_doll;"; 15 wall_qual = max(qual, note[2]); 16else 17 wall_qual = qual; 18endif 19if ((note == E_PROPNF) || (qual > note[2])) 20 doll:write_misc_note("force_wall", {mage_doll, wall_qual}); 21 this.fw_combat_effect:add(doll); 22 if (i = $list_utils:iassoc("unwall", doll.schedule, 2)) 23 rpg:say_action("The frosted haze around %n goes opaque for an instant, then fades back into milky translucence.", char); 24 doll.schedule[i][3] = doll.schedule[i][3] + (30 * qual); 25 doll.schedule[i][4] = {doll, qual, skillobj}; 26 else 27 rpg:say_action("A hum of magic rises around %n, surrounding %o with a frosted haze of force.", char); 28 doll:schedule(this, "unwall", time() + (60 * qual), {doll, qual, skillobj}); 29 endif 30else 31 rpg:say_action("The frosted haze around %n wavers, but remains unchanged.", char); 32endif 33"Irin Mon Sep 23 11:04:39 1996 PDT -- changed so that the person the field's on becomes the default owner, and the strength is that of the strongest spell. Why? Because it seemed like a good idea at the time."; 34"Hydros (#106189) - Tue Apr 12, 2005 - Changed some logic errors that were causing messages to print to the wrong player."; 35" - Added/repaired instances where a more powerful cast gives the new caster `ownership' of the wall.";
unwall
Referenced by
none
Source
1":unwall(caster doll, target doll, qual, spell, @extra args)"; 2"Remove a conjured wall of force."; 3{doll, att, qual, spell, @extra} = args; 4(rpg = $local.rpg):secure(); 5this.fw_combat_effect:remove(att); 6{c_doll, wall} = att:read_misc_note("force_wall"); 7att:erase_misc_note("force_wall"); 8if (i = $list_utils:iassoc("unwall", att.schedule, 2)) 9 att:cancel(att.schedule[i]); 10endif 11char = att.character; 12rpg:say_action("The wall of frosted haze around %n drops and a magickal hum is silenced.", char); 13tellguy = (char == c_doll.character) ? "you" | char.name; 14this:tell_player(c_doll, ("You feel a burden of sustained magick lifted from your mind as the force wall around " + tellguy) + " drops."); 15"Hydros (#106189) - Tue Apr 12, 2005 - Made c_doll, (not the argument `doll'), receive the `burden...lifted' message."; 16" - Substituted in the word `you' if the caster is surrounded by the wall.";
calm*_winds
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2doll = args[1]; 3who = doll.character; 4qual = args[3]; 5loc = who.location; 6if (rpg:trusted_verb(loc, "weather_effect") && (typeof(effect = loc:weather_effect(@args)) != NUM)) 7 return effect; 8else 9 storms = this:storms_active_in(loc); 10 rpg:rpg_announce_all_but(loc, {}, "Winds begin to swirl about. . ."); 11 for storm in (storms) 12 if ((storm[2] == who) || (qual > storm[4])) 13 this:kill_storm(storm[1], 1); 14 type = (storm[4] > 50) ? "raging electrical storm" | ((storm[4] > 15) ? "thunderstorm" | "minor storm"); 15 rpg:rpg_announce_all_but(loc, {}, storm[2].name, "'s ", type, " is dispersed by the winds."); 16 endif 17 endfor 18 dolls = rpg:find_chars(loc)[2]; 19 for victim in (dolls) 20 if (x = $list_utils:iassoc("unwind", victim.schedule, 2)) 21 if ((victim == doll) || (rpg.skills.calm_winds:resolve(who, -victim.schedule[x][4][1]) > 0)) 22 victim:cancel(victim.schedule[x]); 23 rpg.magic_db:unwind(victim); 24 endif 25 endif 26 endfor 27 rpg:rpg_announce_all_but(loc, {}, "The wind dies down again."); 28endif
shatter
Referenced by
none
Source
1{doll, target, qual, skill, @extra} = args; 2(rpg = $local.rpg):secure(); 3by = doll.character; 4cond = target.condition; 5tloc = target.location; 6if (valid(tdoll = rpg:get_doll(tloc))) 7 doll.act = -120; 8 "Try setting act to -120 so caster doesn't swing at target."; 9 doll.aggressor = setadd(doll.aggressor, tdoll.character); 10 tdoll.aggressor = setadd(tdoll.aggressor, by); 11 doll:do_attack_notification(tdoll.character, skill); 12 name = (tloc.name + "'s ") + target:title(); 13 if (typeof(effect = tdoll:magic_effects(doll, tdoll, qual, skill, @extra)) != NUM) 14 return effect; 15 elseif ((qual = qual - effect) <= 0) 16 return rpg:say_action(strsub("%N's %thing seems unaffected by the shatter spell energies.", "%thing", target:title()), (tloc in rpg.pcs) ? tloc | by); 17 elseif (((tdoll != doll) && (tdoll.magic_theory > 0)) && (rpg.skills.shatter:resolve(tloc, -qual) > 0)) 18 rpg:rpg_announce_all(by.location, this:spell_deflection_msg(tloc, by)); 19 return; 20 endif 21else 22 name = target:title(); 23endif 24"Right. now the actual shattering bit:"; 25if (rpg.object_db:is_money(target)) 26 cond = target.quantity; 27 dam = random(max(qual / 5, 1)); 28 new_cond = cond - dam; 29 target:set_quantity((new_cond < 1) ? 0 | new_cond); 30 if (target.quantity < 1) 31 target:destroy(target); 32 endif 33 word = (dam == 1) ? "One" | ((dam == cond) ? "All" | "Some"); 34 word = (word + " of ") + ((!index(name, tloc.name)) ? "the " | ""); 35 rpg:rpg_announce_all(by.location, word, name, " shatter!"); 36elseif (rpg.object_db:is_gem(target)) 37 cond = target:get_true_value(); 38 app = target:get_appraised_value(); 39 if ((qual / 100) < (cond / (10 ^ length(tostr(cond))))) 40 rpg:rpg_announce_all(by.location, name, " vibrates momentarily, but nothing unusual happens."); 41 elseif (random(100) <= (qual / cond)) 42 target:moveto(rpg.gem_dispenser); 43 rpg:rpg_announce_all(by.location, name, " shatters into a thousand slivers!"); 44 else 45 dam = max(random(qual), qual / 3); 46 target:set_true_value(cond - dam); 47 app ? target:set_appraised_value(max(app - dam, 1)) | ""; 48 if (target:get_true_value() < 1) 49 target:moveto(rpg.gem_dispenser); 50 rpg:rpg_announce_all(by.location, name, " shatters into a thousand slivers!"); 51 else 52 rpg:rpg_announce_all(by.location, name, " cracks!"); 53 endif 54 endif 55else 56 if ((qual < (cond / (1 + (qual / 10)))) || (!(breakable = typeof(cond) == NUM))) 57 rpg:rpg_announce_all(by.location, name, " vibrates momentarily, but nothing unusual happens."); 58 elseif ((random(100) <= (10 - (cond / 10))) && breakable) 59 target:("break")(); 60 elseif (breakable) 61 dam = max(random(qual), qual / 3); 62 target:set_condition(cond - dam); 63 if (target.condition < 1) 64 target:("break")(); 65 else 66 rpg:rpg_announce_all(by.location, name, " cracks and corrodes!"); 67 endif 68 endif 69endif 70"Profane 30-MAY-97 2050PDT - added gem and money shattering.";
windwall
Referenced by
none
Source
1{mage_doll, doll, qual, skillobj, @extra} = args; 2(rpg = $local.rpg):secure(); 3by = mage_doll.character; 4this.ww_combat_effect:add(mage_doll); 5if (i = $list_utils:iassoc("unwind", mage_doll.schedule, 2)) 6 mage_doll.schedule[i][3] = min(mage_doll.schedule[i][3] + (qual * 30), time() + rpg.vacuum.monster_stash_update_int); 7 rpg:say_action("The winds around %n howl and moan.", by); 8else 9 mage_doll:schedule(this, "unwind", time() + (qual * 60), {min(qual, 200)}); 10 rpg:say_action("Wind begins to blow toward %n. . . Picking up speed, they whirl about %o, shrieking and moaning. Soon, %n %<is> encased in an impenetrable wall of wind.", by); 11 if (i = $list_utils:iassoc("bite", mage_doll.schedule, 2)) 12 mage_doll:cancel(mage_doll.schedule[i]); 13 mage_doll:erase_misc_note("biting_cloud"); 14 this.bc_combat_effect:remove(mage_doll); 15 rpg:say_action("The winds tear the cloud of insects surrounding %n asunder!", by); 16 endif 17 if ((sc = this.sc_combat_effect) in mage_doll.view_effects) 18 mage_doll:erase_misc_note("stinkcloud"); 19 sc:remove(mage_doll); 20 rpg:say_action("The winds disperse the putrid cloud of stinkiness.", by); 21 endif 22endif
unwind
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2doll = args[1]; 3by = doll.character; 4this.ww_combat_effect:remove(doll); 5rpg:say_action("The shrieking winds encircling %n suddenly die away, leaving an eerie calm.", by);
stinkcloud
Referenced by
none
Source
1{caster, targets, qual, skillobj, @extra} = args; 2(rpg = $local.rpg):secure(); 3by = caster.character; 4targets = (typeof(targets) == LIST) ? targets | {targets}; 5rpg:say_action("%N %<summons> a cloud of noxious green vapours. . .", by); 6for doll in (targets) 7 targ = doll.character; 8 rpg:say_action("The vapours coil about %n.", targ); 9 if (typeof(e = doll:magic_effects(caster, doll, qual, rpg.skills.(verb))) != NUM) 10 return e; 11 else 12 qual = qual - e; 13 endif 14 if (x = $list_utils:iassoc("bite", doll.schedule, 2)) 15 if (qual > (doll.schedule[x][4][1] * 2)) 16 doll:cancel(doll.schedule[x]); 17 doll:erase_misc_note("biting_cloud"); 18 this.bc_combat_effect:remove(doll); 19 rpg:say_action("The cloud of insects about %n is dispersed by the vapours.", targ); 20 endif 21 endif 22 if ((roll = rpg.skills.shock:resolve(targ, -qual)) > 0) 23 rpg:say_action("%N %<is> unaffected.", targ); 24 else 25 doll:write_misc_note("stinkcloud", {qual, time()}); 26 this.sc_combat_effect:add(doll); 27 rpg:say_action("%N %<succumbs> to the vapours, choking and coughing.", targ); 28 endif 29 rpg:say_action("The vapours about %n slowly dissipate into nothingness.", targ); 30 rpg:s_i_f_i_n(); 31endfor
predict
Referenced by
none
Source
1if ((rpg = $local.rpg):trusted(caller_perms())) 2 doll = args[1]; 3 qual = args[3]; 4 who = doll.character; 5 loc = who.location; 6 predict = rpg.skills.predict; 7 storms = this:storms_active_in(loc); 8 for storm in (storms) 9 word = rpg:rate_skill(storm[4], 175); 10 text = ((storm[2].name + " has conjured a storm of ") + word) + " strength."; 11 if (predict:resolve(who, qual - storm[4]) > 0) 12 dur = storm[3] * (10 + (rpg.rpg_lag_sum / length(rpg.rpg_lag))); 13 text = ((text + " It will last another ") + $time_utils:english_time(dur)) + "."; 14 endif 15 rpg:playertell(who, text); 16 endfor 17 dolls = rpg:find_chars(loc)[2]; 18 for doll in (dolls) 19 doll:check_schedule(); 20 if (i = "unwind" in $list_utils:slice(doll.schedule, 2)) 21 wqual = doll.schedule[i][4][1]; 22 word = rpg:rate_skill(wqual, 175); 23 text = ((doll.character.name + " is surrounded by a wind wall of ") + word) + " strength."; 24 if (predict:resolve(who, qual - wqual) > 0) 25 dur = doll.schedule[i][3] - time(); 26 text = ((text + " It will last another ") + $time_utils:english_time(dur)) + "."; 27 endif 28 rpg:playertell(who, text); 29 endif 30 endfor 31else 32 return E_PERM; 33endif
harden
Referenced by
none
Source
1{doll, what, qual, skill, @extra} = args; 2(rpg = $local.rpg):secure(); 3who = doll.character; 4area = who.location; 5cond = o_cond = what.condition; 6maximum = 100 + (min(qual, 130) / 2); 7"maximum = 100 + (qual / 2);"; 8"maximum = 100 + min(qual, 150) / 2 + toint(max(tofloat(qual) - 150.0, 0.0) ^ (1.0 / 1.2));"; 9rpg:rpg_announce_all(area, who.name, "'s ", what:title(), " begins to gleam brightly . . ."); 10if (cond > maximum) 11 rpg:rpg_announce_all(area, ". . . but fades quickly."); 12else 13 {threshold, pay_xtra} = this.harden_threshold; 14 if (over_the_top = max(maximum - threshold, 0)) 15 maximum = random(over_the_top) + threshold; 16 endif 17 if (typeof(what:set_condition(max(what.condition, maximum))) == ERR) 18 return who:tell(what:titlec(), " seems to be having trouble hardening. Tell a GM."); 19 endif 20 dur = (qual * 10) + random(33); 21 rpg:rpg_announce_all(area, who.name, "'s ", what:title(), " seems tougher and more resilient!"); 22 for item in (doll.schedule) 23 if ((item[2] == "unharden") && (item[4][1] == what)) 24 doll:cancel(item); 25 item[3] = item[3] + (dur / 2); 26 doll:schedule(@item); 27 return; 28 endif 29 endfor 30 if ((premium = (maximum - max(pay_xtra, o_cond)) > 0) && $recycler:valid(mounted = `caller.mounted ! ANY => $nothing')) 31 premium = random(random(premium)); 32 tvalue = mounted:get_true_value(); 33 tvalue = (typeof(tvalue) == NUM) ? tvalue | 0; 34 mounted:set_true_value(tvalue - premium); 35 avalue = mounted:get_appraised_value(); 36 if (avalue) 37 mounted:set_appraised_value(max(((avalue - premium) + random(9)) - random(9), 1)); 38 endif 39 endif 40 doll:schedule(this, "unharden", time() + dur, {what, o_cond}); 41 return dur; 42endif 43"Profane (#30788) - Thu Feb 22, 2001 - high end hardening is tougher"; 44"Profane (#30788) - Fri Mar 2, 2001 - Or not. mathematical analysis indicated all that happened was a higher std dev. forget it."; 45"THX (#105941) - Mon Apr 16, 1801 - Changed the way things harden over 180 condition by randomizing the maximum over 180.";
unharden
Referenced by
none
Source
1{doll, what, cond} = args; 2(rpg = $local.rpg):secure(); 3if (rpg.object_db:is_thing(what)) 4 if (what:set_condition(min(cond, what.condition))) 5 if ($object_utils:isa(where = what.location, $room)) 6 what:room_announce_all(what:titlec(), " seems to weaken. . ."); 7 elseif (valid(rpg:get_doll(where))) 8 what:room_announce_all(where.name, "'s ", what:title(), " seems to weaken. . ."); 9 endif 10 else 11 what:room_announce_all(what:titlec(), " seems to be having a problem unhardening. Contact a GM."); 12 endif 13endif 14"THX (#105941) - Wed May 9, 2001 - Updated code."; 15"Profane (#30788) - Tue Mar 12, 2002 - Don't announce if we're in a container on a person";
enchant
Referenced by
none
Source
1if (!(db = $local.rpg):trusted(caller_perms())) 2 return E_PERM; 3else 4 doll = args[1]; 5 by = doll.character; 6 staff = args[2]; 7 qual = args[3]; 8 dur = ((60 * qual) / 30) + random(60); 9 try 10 staff:do_enchant(qual, dur); 11 $local.rpg:say_action("%N's %t seems to glow briefly.", by, staff); 12 except (E_VERBNF) 13 $local.rpg:rpg_announce_all(by.location, "Nothing happens."); 14 endtry 15endif 16"Profane 3-JUN-97 1821PDT -- added try statement.";
unenchant
Referenced by
none
Source
1if (!(db = $local.rpg):trusted(caller_perms())) 2 return E_PERM; 3else 4 by = args[1].character; 5 staff = args[2]; 6 if ($recycler:valid(staff) && $object_utils:isa(staff, $local.rpg.staff)) 7 for set in (this.enchant_stats) 8 staff.(set[1]) = staff.(set[1]) - set[2]; 9 if (staff.(set[1]) == parent(staff).(set[1])) 10 clear_property(staff, set[1]); 11 endif 12 endfor 13 staff.enchantment = 0; 14 name = valid(x = $local.rpg:get_doll(staff.location)) ? (staff.location.name + "'s ") + staff:title() | staff:title(); 15 loc = valid(x) ? staff.location.location | staff.location; 16 $local.rpg:rpg_announce_all(loc, name, " seems to flicker briefly."); 17 endif 18endif
biting_cloud
Referenced by
none
Source
1{att, doll, qual, @extra_args} = args; 2by = att.character; 3target = doll.character; 4(rpg = $local.rpg):secure(); 5nat_prot = (target in rpg.vacuum.monsters) ? target.nat_prot | (((this.bs_combat_effect in doll.combat_effects) || (this.sf_combat_effect in doll.combat_effects)) ? 50 | 0); 6if (x = $list_utils:iassoc("bite", doll.schedule, 2)) 7 rpg:say_action("The cloud of insects around %n shimmers for a moment.", target); 8 doll.schedule[x][4][3] = time(); 9 doll:write_misc_note(verb, by); 10else 11 rpg:say_action("A cloud of insects gathers about %n, quickly growing into a dark, swarming mass!", target); 12 if (typeof(effect = doll:magic_effects(@args)) != NUM) 13 return effect; 14 else 15 qual = qual - effect; 16 endif 17 skill = doll.(verb); 18 qual = (min(qual, 150) + ((skill > 20) ? random(skill) | 0)) + ((skill > 25) ? random(skill) | 0); 19 if ((qual / 9) <= nat_prot) 20 rpg:say_action("%N %<seems> unconcerned.", target); 21 elseif (((doll != att) && (doll.magic_theory > 0)) && (rpg.skills.(verb):resolve(target, -qual) > 0)) 22 rpg:say_action("%N %<disperses> the insects with a quick counterspell.", target); 23 else 24 strikes = max(((qual + random(20)) / random(10)) - 1, 1); 25 interval = max(100 - qual, 20); 26 this.bc_combat_effect:add(doll); 27 doll:write_misc_note(verb, by); 28 this:bite(doll, strikes, interval, time()); 29 endif 30endif
bite
Referenced by
- #328:biting_cloud line 28:
this:bite
Source
1{doll, strikes, interval, time} = args; 2(rpg = $local.rpg):secure(); 3target = doll.character; 4stamina = rpg.skills.stamina; 5hitloc = doll:random_hit_location(); 6x = time() - time; 7strikes = strikes - max(x / interval, 1); 8if (strikes > 0) 9 doll:schedule(this, "bite", time() + interval, {strikes, interval, time}); 10else 11 this.bc_combat_effect:remove(doll); 12 doll:erase_misc_note("biting_cloud"); 13 rpg:say_action("The cloud of insects surrounding %n disperses.", target); 14 return; 15endif 16if ((hitloc.nat_prot > 0) || ((!is_player(target)) && (target.nat_prot > (strikes / 4)))) 17 return rpg:say_action("Swarms of insects buzz about %n, but %s %<seems> unconcerned.", target); 18endif 19if (stamina:resolve(target, -(strikes * 3)) > 0) 20 rpg:say_action("%N %<slaps> at the insects surrounding %o.", target); 21else 22 dam = max(random(12) + $math_utils:random_range(2), 0); 23 if ((!is_player(target)) && (!target.alive)) 24 elseif (dam <= 0) 25 rpg:say_action("%N %<grimaces> as insects crawl over %p body.", target); 26 else 27 doll:set_att("inj", doll.inj + dam); 28 shockmod = hitloc:shock_mod(target, rpg.monster, rpg.weapon); 29 stunmod = hitloc:stun_resistance(target, rpg.monster, rpg.weapon); 30 try_ = rpg.skills.shock:resolve(target, shockmod); 31 if (try_ > (-2 * doll.end)) 32 rpg:say_action("%N %<is> painfully stung by the cloud of insects surrounding %o.", target, target, target.location, {}, target); 33 elseif (try_ > ((-4 * doll.end) - stunmod)) 34 rpg:say_action("%N %<is> painfully stung and sent reeling by the cloud of insects surrounding %o.", target, target, target.location, {}, target); 35 doll.act = max(doll.act - 20, -20); 36 elseif ((note = doll:read_misc_note("biting_cloud")) != E_PROPNF) 37 doll:erase_misc_note("biting_cloud"); 38 rpg:playertell(target, "You have been stung to death by the cloud of insects surrounding you! Your soul is returned to the cycle of transmigrations."); 39 rpg:rpg_announce_all_but(target.location, {target}, $string_utils:pronoun_sub("%N %<is> stung to death by the cloud of insects surrounding %o!", target)); 40 doll:die(note, this); 41 endif 42 endif 43endif 44"Irin Thu Oct 10 11:23:19 1996 PDT -- Fixed bug whereby barkskin was resulting in permanent clouds."; 45"Profane (#30788) - Sat Jan 2, 1999 - add highlighting of damage"; 46"THX (#105941) - Mon Dec 6, 1999 - Added code to save the 'caster' in the doll's misc_notes so that a killer can be attributed as needed. Feh.";
barkskin
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2doll = args[1]; 3by = doll.character; 4qual = args[3]; 5"for armour in (doll.wearing)"; 6if (typeof(worn = this:barkskin_check_for_unacceptable_armour(doll)) == LIST) 7 "if ($math_utils:sum(armour.cover))"; 8 rpg:rpg_announce_all_but(by.location, {by}, "Nothing happens."); 9 return rpg:playertell(by, ("You'll first have to remove your " + $string_utils:english_list(worn)) + "."); 10endif 11"endfor"; 12if (k = $list_utils:iassoc("unstone", doll.schedule, 2)) 13 rpg:playertell(by, "Your flesh has been petrified. It cannot be changed to vegetable matter now."); 14elseif (k = $list_utils:iassoc("unbark", doll.schedule, 2)) 15 dur = (qual * qual) / 2; 16 doll.schedule[k][3] = doll.schedule[k][3] + dur; 17 rpg:say_action("%N %<stiffens> for a moment.", by); 18else 19 dur = qual * qual; 20 doll.body_areas = this.barkskin_body_areas; 21 this.bs_combat_effect:add(doll); 22 doll:mod_att("slowness", 5); 23 doll:schedule(this, "unbark", time() + dur, {qual}); 24 rpg:say_action("%N %<shudders> and %<begins> to undergo a strange transformation! %P limbs stiffen and become gnarled, and %p whole body seems to turn into wood!", by); 25endif 26"Profane (#30788) - Sun Mar 28, 1999 - changed the slowness bit to just straight-up mod the att, like it shoulda been."; 27"THX (#105941) - Mon Apr 16, 2001 - Put in a check for stoneflesh. Players were abusing this to get scads of \"unstone\"'s in the way of an \"unspeed\"."; 28"Hydros (#106189) - Fri May 27, 2005 - Allowed certain types of armour to be worn in conjunction with barkskin."; 29" - Added messaging to let the caster know specifically what they need to remove to cast.";
unbark
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2{doll, ?qual} = args; 3who = doll.character; 4doll.body_areas = rpg.doll.body_areas; 5doll:mod_att("slowness", -5); 6this.bs_combat_effect:remove(doll); 7rpg:say_action("%N's skin transforms back to normal.", who);
hail
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2{att, targets, qual, skillobj, @extra} = args; 3by = att.character; 4`targets[1] ! E_TYPE => targets = {targets}'; 5"Cheesy way to get an objnum to be a list."; 6dam = toint(tofloat(125 + (5 * qual)) / sqrt(tofloat(num_targ = length(targets)))); 7rpg:say_action("As %n %<finishes> %p incantation, a great hail of sharp stones begins to fall!", by); 8for doll in (targets) 9 if ($object_utils:isa(doll, rpg.doll)) 10 this:stone(att, doll, qual, skillobj, dam, num_targ); 11 endif 12endfor 13rpg:say_action("%N's conjured hail of stones ceases.", by);
lifelink
Referenced by
none
Source
1if ((rpg = $local.rpg):trusted(caller_perms())) 2 {att, doll, qual} = args[1..3]; 3 by = att.character; 4 target = doll.character; 5 if (att.lifelinked || doll.lifelinked) 6 return; 7 endif 8 rpg:say_action("Strange glowing energies whirl about %n!", target); 9 rpg:playertell(target, by:titlec(), " is attempting to forge a lifelink with you!"); 10 if (typeof(effect = doll:magic_effects(att, doll, qual, rpg.skills.(verb))) != NUM) 11 return effect; 12 else 13 qual = qual - effect; 14 if (qual < 1) 15 rpg:say_action("The swirling energies about %n collapse with no effect.", target); 16 else 17 if (((by in doll.aggressor) || (target in att.aggressor)) || (!is_player(target))) 18 if ((doll.magic_theory > 0) && (rpg.skills.(verb):resolve(target, -qual) > 0)) 19 rpg:rpg_announce_all(target.location, this:spell_deflection_msg(target, by)); 20 return; 21 "Irin Fri Sep 20 22:01:41 1996 PDT -- Fixed what I think is a bug, that prevented non-players from being lifelinked."; 22 endif 23 endif 24 rpg:say_action("The energies collapse into %n, causing %o to cry out!", target); 25 rpg:playertell(by, "Lifelink to ", target.name, " established."); 26 rpg:playertell(target, "Your life is now linked to that of ", by.name, "."); 27 this.ll_death_effect:add_link(att, doll, qual); 28 endif 29 endif 30else 31 return E_PERM; 32endif 33"Hannibal - inserted code to check that neither doll is lifelinked currently."; 34"THX (#105941) - Wed Oct 13, 1999 - Changed to use doll.lifelinked instead of misc_note \"lifelink\"."; 35"THX (#105941) - Thu Apr 6, 2000 - Changed to use this.ll_death_effect:add_link().";
stealskill
Referenced by
none
Source
1{attk, doll, qual, spell, skill, @extra} = args; 2(rpg = $local.rpg):secure(); 3{by, target, toady} = {attk.character, doll.character, rpg.toady}; 4skill_name = skill.aliases[1]; 5attk_val = attk.(skill_name); 6doll_val = doll.(skill_name); 7if (doll_val < 1) 8 rpg:playertell(by, target.name, " doesn't seem to be skilled in ", skill:title(), "."); 9elseif ((attk_val >= doll_val) || (attk_val > 24)) 10 rpg:playertell(by, target.name, "'s skill pales in comparison to your own; don't waste your time."); 11elseif (rpg.object_db:is_spell_skill(skill) && (attk_val < 1)) 12 rpg:playertell(by, "You haven't the foggiest notion where in ", target.name, "'s mind that knowledge might lie."); 13elseif ((which = skill_name in $list_utils:slice(doll.att_schedule, 1)) && (doll.att_schedule[which][4][4][1] != attk)) 14 "i.e. Target already had this skill stolen by someone else."; 15 rpg:playertell(by, target.name, "'s skill in ", skill:title(), " seems to be somehow missing."); 16elseif (typeof(effect = doll:magic_effects(attk, doll, qual, rpg.skills.(verb))) != NUM) 17 return effect; 18else 19 if (0 || ((qual = qual - effect) < 1)) 20 return rpg:playertell(by, "Nothing happens."); 21 elseif ((doll.magic_theory > 1) && (rpg.skills.(verb):resolve(target, -qual, 1) > 0)) 22 rpg:rpg_announce_all(target.location, this:spell_deflection_msg(target, by)); 23 else 24 amt = max(min(doll_val - attk_val, ((doll_val - attk_val) * qual) / (skill.learn * 2)), 1); 25 "amt = max(amt / (attk_val || 1), 1);"; 26 amt = min(amt, 25 - attk_val); 27 amt = max(amt, 1); 28 dur = (qual * 30) / amt; 29 this:desteal(attk, doll, skill); 30 rpg:playertell(target, "You feel a FORCE enter your mind and RIP away your knowledge of ", skill:title(), "!"); 31 rpg:playertell(by, "You gain insight as ", target.name, "'s knowledge of ", skill:title(), " merges with your mind."); 32 attk:att_schedule(skill_name, dur + time(), amt, {this, "unsteal", 0, {doll, attk_val, skill}}); 33 doll:att_schedule(skill_name, dur + time(), -amt, {this, "unsteal", 0, {attk, attk_val, skill}}); 34 this.ss_combat_effect:add(attk); 35 this.ss_combat_effect:add(doll); 36 endif 37endif 38"Profane (#30788) - Wed Jun 7, 2000 - no stealing spells that you have no previous knowledge of"; 39"Profane (#30788) - Thu Jun 22, 2000 - Shove the un-stealing resetting bit into :desteal"; 40"Profane (#30788) - Thu Jun 22, 2000 - Disallow stealing skills that have been stolen by someone else"; 41"Profane (#30788) - Thu May 3, 2001 - Closed loophole that allowed stealing of spellsongs"; 42"Profane (#30788) - Tue May 8, 2001 - now adding an effect for detect magic purposes";
mindprobe
Referenced by
none
Source
1{att, doll, qual, probeskill, @extra} = args; 2(rpg = $local.rpg):secure(); 3by = att.character; 4target = doll.character; 5linelen = player:linelen(); 6text = {$string_utils:center(target:titlec(), linelen)}; 7if (typeof(effect = doll:magic_effects(att, doll, qual, probeskill)) != NUM) 8 return effect; 9elseif ((qual = qual - effect) < 1) 10 rpg:playertell(by, "Nothing happens."); 11elseif ((doll.magic_theory > 0) && (probeskill:resolve(target, -qual) > 0)) 12 rpg:rpg_announce_all(target.location, this:spell_deflection_msg(target, by)); 13else 14 for skill in (rpg.attributes) 15 text = {@text, (skill:title() + ": ") + rpg:skill_rate(doll.(skill.aliases[1]), 25)}; 16 endfor 17 text = {text[1], @$string_utils:columnize(text[2..$], 2, linelen)}; 18 text = {@text, $string_utils:space(linelen, "-")}; 19 for weapon in (doll:wielding()) 20 line = ((((weapon:title() + ": ") + rpg:skill_rate(doll.(weapon.skill.aliases[1]), 25)) + " (") + rpg:skill_rate(doll:total(weapon.skill), doll:potential_total(weapon.skill))) + ")"; 21 text = {@text, line}; 22 endfor 23 text = {@text, $string_utils:space(linelen, "-")}; 24 spells = $object_utils:descendants(rpg.spell_skill_object); 25 amt = max(qual / random(3), 1); 26 which = {}; 27 x = 0; 28 n = 0; 29 while ((x < amt) && (n < 20)) 30 spell = spells[random($)]; 31 spells = setremove(spells, spell); 32 33>> Network buffer overflow: 2179 lines of output to you have been lost << 34{mage_doll, doll, qual, skillobj, @extra} = args; 35(rpg = $local.rpg):secure(); 36if (doll:read_misc_note("mirrors") == E_PROPNF) 37 this.gemini:doppelganger(doll.character, max(1, qual / 20), qual / 2, time() + (40 * qual)); 38else 39 rpg:rpg_announce_all_but(doll.character.location, {}, "Nothing happens."); 40endif
is_peaceful_spell
Referenced by
none
Source
1{caster, target, spell} = args; 2if (spell in this.peaceful_spells) 3 return 1; 4elseif (((spell in this.team_peaceful_spells) && (target in caster.armour_effects)) && (caller_perms() in $local.rpg.gms)) 5 return 1; 6elseif (spell == "haste") 7 return target.slowness > 10; 8elseif ((spell == "dispel") && (parent(target) == $local.rpg.doll)) 9 if (($set_utils:intersection({"bite", "disentangle", "unfear"}, $list_utils:slice(target.schedule, 2)) || (target:read_misc_note("stinkcloud") != E_PROPNF)) || (target in this.hf_combat_effect.held)) 10 return 1; 11 endif 12endif 13return 0;
playbalance
Referenced by
none
Source
1$local.rpg:secure(); 2forms = minus = {}; 3for t in (this.magic_forms) 4 forms = {@forms, {t, t.minus}}; 5 minus = {@minus, t.minus}; 6endfor 7return $list_utils:sort(forms, minus);
hawthorn
Referenced by
none
Source
1":hawthorn(caster-doll, target-doll, quality)"; 2{att, doll, qual} = args[1..3]; 3(rpg = $local.rpg):secure(); 4skill = rpg.skills.(verb); 5"if (typeof(effect = doll:magic_effects(att, doll, qual, skill)) != NUM)"; 6" return effect;"; 7"else"; 8" qual = qual - effect;"; 9"endif"; 10{by, target, mod, thorn, odb} = {att.character, doll.character, 0, this.(verb), rpg.object_db}; 11loc = by.location; 12rpg:say_action(("A wicked-looking thorn sprouts near the end of %n's " + caller.name) + ".", by); 13if (qual > 0) 14 if (loc != target.location) 15 exits = loc:exits(); 16 what = where = {}; 17 for x in (exits) 18 while (`valid(x.succ_exit) ! ANY') 19 x = x.succ_exit; 20 endwhile 21 if (odb:is_missile_exit(x)) 22 d = x.dest.contents; 23 what = {@what, @d}; 24 where = {@where, @$list_utils:make(length(d), x)}; 25 endif 26 endfor 27 mod = (target in what) ? where[target in what].cover | 999; 28 endif 29 {pen, dam, achilles} = {thorn.pen, thorn.dam, {doll.body_areas[1]}}; 30 lowest = doll:armour(pen, achilles[1], by, thorn, dam, qual); 31 for t in (setremove(doll.body_areas, achilles[1])) 32 if (lowest > (current = doll:armour(pen, t, by, thorn, dam, qual))) 33 achilles = {t}; 34 lowest = current; 35 elseif (lowest == current) 36 achilles = setadd(achilles, t); 37 endif 38 endfor 39 this.sc_recovery_effect:remove(att); 40 thorn:deliver_payload(att, target, -mod, achilles[random($)], 0); 41 this.sc_recovery_effect:add(att); 42else 43 return rpg:rpg_announce_all(loc, target.name, " seems unaffected by the spell."); 44endif 45"THX (#105941) - Fri Mar 17, 2000 - Commented out the magic_effects check. The spell produces a physical missile, let the target dodge that for once.";
special_hawthorn
Referenced by
none
Source
1{att, targ_doll, qual, zap_result} = args; 2$local.rpg:secure(); 3if (parent(targ_doll) == $local.rpg.doll) 4endif
get_messages(obsolete)
Referenced by
none
Source
1"Copied from Soulsong (#17367):get_messages by StarDancer (#82267) Thu May 30 17:50:05 1996 PDT"; 2"OBJ - the staff calling this verb, OBJ - caster, OBJ - target, STR - message property"; 3{staff, caster, target, msgs_prop} = args; 4messages = {}; 5rpg = $local.rpg; 6cu = $code_utils; 7rpg.magic_db.zap_staves = setadd(rpg.magic_db.zap_staves, staff); 8for idx in [1..12] 9 {effect} = this.effects[idx]; 10 if (idx < 5) 11 if (!rpg:trusted_verb(target, effect)) 12 msg_list = staff.(msgs_prop)[idx]; 13 else 14 msg_list = (typeof(msg = cu:verb_or_property(target, effect)) == LIST) ? msg | {msg}; 15 endif 16 else 17 msg_list = staff.(msgs_prop)[idx]; 18 endif 19 effect_msg = ((idx < 7) || (idx > 10)) ? msg_list[random($)] | msg_list; 20 messages = {@messages, effect_msg}; 21endfor 22if (rpg:trusted_property(target, "spell_deflection_msg")) 23 messages[2] = target.spell_deflection_msg; 24endif 25return messages; 26"Mooshie (#106469) - Sun Feb 1, 1998 - Sped up a bit and added check for .spell_deflection_msg on target, to intercept deflect messages if monster owners want to.";
magic_fist(specific_implementation)
Referenced by
none
Source
1":magic_fist(caster-doll, target-doll, quality)"; 2(rpg = $local.rpg):secure(); 3{att, doll, qual} = args[1..3]; 4magic_fist = rpg.skills.magic_fist; 5if (typeof(effect = doll:magic_effects(att, doll, qual, magic_fist)) != NUM) 6 return effect; 7else 8 qual = qual - effect; 9endif 10this:gen_zap(att, doll, qual, magic_fist, "magic_fist", 1);
firebolt magic_fist
Referenced by
none
Source
1":firebolt(caster-doll, target-doll, quality)"; 2":magic_fist(caster-doll, target-doll, quality)"; 3{att, doll, qual} = args[1..3]; 4(rpg = $local.rpg):secure(); 5skill = rpg.skills.(verb); 6dodgeable = doll:cannot_defend() ? 0 | this.(verb + "_dodgeable"); 7"this:gen_zap(att, doll, (qual * att.size) / doll.size, skill, verb, dodgeable);"; 8this:gen_zap(att, doll, qual, skill, verb, dodgeable); 9"Hydros (#106189) - Tue Nov 1, 2005 - :hit_result already divides qual by target size, so why do it here?"; 10" - Also, why should a bigger mob cast a bigger firebolt? Just change the pen/power and messaging if you want that.";
firebolt(specific_implementation)
Referenced by
none
Source
1":firebolt(caster-doll, target-doll, quality)"; 2(rpg = $local.rpg):secure(); 3{att, doll, qual, @extra} = args; 4firebolt = rpg.skills.firebolt; 5dodgeable = 1; 6this:gen_zap(att, doll, qual, firebolt, "firebolt", dodgeable); 7"Mooshie (#106469) - Tue Oct 14 05:56:02 1997 PDT - Scattering assignment. Whee!";
glyph(old)
Referenced by
none
Source
1{bydoll, todoll, qual, skillobj, target} = args; 2(rpg = $local.rpg):secure(); 3where = (by = bydoll.character).location; 4targname = target.aliases[1]; 5flipflop = (verb == "glyph") ? -1 | 1; 6if ((qual = qual / 25) < 1) 7 rpg:rpg_announce_all(where, "Nothing happens."); 8 return; 9elseif ((rpg.object_db:is_rpg_room(where) && (!rpg.object_db:is_rpg_metaroom(where))) && qual) 10 set = (typeof(temp = where:read_misc_note("g&r")) == LIST) ? temp | {}; 11 duration = time() + (30 * (qual + flipflop)); 12 if (indx = target in set) 13 if (time() > set[indx + 2]) 14 set[indx..indx + 2] = {}; 15 qual = min(10, qual); 16 where:write_misc_note("g&r", {@set, target, qual * flipflop, duration}); 17 else 18 qual = ((prev = set[indx + 1]) < 0) ? min(10, qual) + prev | min(10, qual + prev); 19 where:write_misc_note("g&r", listset(set, qual * flipflop, indx + 1)); 20 endif 21 else 22 qual = min(10, qual + flipflop); 23 where:write_misc_note("g&r", {@set, target, qual * flipflop, duration}); 24 endif 25 where.combat_effects = setadd(where.combat_effects, this.gr_combat_effect); 26 where.magic_effects = setadd(where.magic_effects, this.gr_combat_effect); 27 if (qual > 8) 28 msg = tostr("%N %<carves> powerful ", verb, "s in the ground. Arcing electricity and splashes of magic essence bathe ", where:title(), " in a flickering pallid glow."); 29 elseif (qual > 4) 30 msg = tostr("%N carefully %<etches> ", verb, "s into the ground beneath %p feet that throb a dark blue."); 31 else 32 msg = tostr("%N %<scratches> out meaningless ", verb, "s and symbols on the ground that flicker with meager sputterings of magic."); 33 endif 34 rpg:say_action(msg, by); 35else 36 msg = tostr("%N slowly %<begins> scrawling dark ", verb, "s in the ground, but they flare briefly before dissolving."); 37 return rpg:say_action(msg, by); 38endif 39"Profane (#30788) - Tue May 25, 1999 - spell doesn't work in metarooms, and GM doesn't own any parents in the hierarchy to make it work. oh well.";
stealskill(old)
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2{att, doll, qual, spell, skill, @extra} = args; 3by = att.character; 4target = doll.character; 5skill_name = skill.aliases[1]; 6att_val = att.(skill_name); 7toady = rpg.toady; 8doll_val = doll.(skill_name); 9if (((att_val >= doll_val) || (doll_val < 1)) || (att_val > 24)) 10 rpg:playertell(by, target.name, " doesn't seem to be very skilled in ", skill:title(), "."); 11elseif (typeof(effect = doll:magic_effects(att, doll, qual, rpg.skills.(verb))) != NUM) 12 return effect; 13else 14 if (0 || ((qual = qual - effect) < 1)) 15 return rpg:playertell(by, "Nothing happens."); 16 elseif ((doll.magic_theory > 1) && (rpg.skills.(verb):resolve(target, -qual) > 0)) 17 rpg:rpg_announce_all(target.location, this:spell_deflection_msg(target, by)); 18 else 19 amt = max(min(doll_val - att_val, ((doll_val - att_val) * qual) / (skill.learn * 2)), 1); 20 amt = max(amt / (att_val || 1), 1); 21 amt = min(amt, 25 - att_val); 22 dur = (qual * 30) / amt; 23 for item in (att.schedule) 24 if ((item[2] == "unsteal") && (item[4][2] == skill)) 25 toady:call_verb(item[1], item[2], {att, @item[4]}); 26 att.schedule = setremove(att.schedule, item); 27 endif 28 endfor 29 for item in (doll.schedule) 30 if ((item[2] == "unsteal") && (item[4][2] == skill)) 31 toady:call_verb(item[1], item[2], {att, @item[4]}); 32 doll.schedule = setremove(doll.schedule, item); 33 endif 34 endfor 35 target:tell("You feel a FORCE enter your mind and RIP away your knowledge of ", skill:title(), "!"); 36 rpg:playertell(by, "You gain insight as ", target.name, "'s knowledge of ", skill:title(), " merges with your mind."); 37 "doll:mod_att(skill_name, -amt);"; 38 "att:mod_att(skill_name, amt);"; 39 "att:schedule(this, \"unsteal\", dur + time(), {att_val, skill});"; 40 "doll:schedule(this, \"unsteal\", dur + time(), {doll_val, skill});"; 41 att:att_schedule(skill_name, dur + time(), amt, {rpg.magic_db, "unsteal", 0, {att, att_val, skill}}); 42 doll:att_schedule(skill_name, dur + time(), -amt, {rpg.magic_db, "unsteal", 0, {att, att_val, skill}}); 43 endif 44endif
gen_dodgable_spell(old)
Referenced by
none
Source
1"Copied from webs (#55049):gen_dodgable_spell by Isagi (#21077) Fri Jul 5 13:31:27 1996 PDT"; 2":gen_spell(caster-doll, target-doll, quality, skillobj, spell_name, dodgeable, [spell_db[, FLAG_natural_attack]])"; 3"Original verb taken from #328:gen_zap and modified to allow for non-damaging, but dodgable, magic projectiles."; 4"The optional argument, castobj lets the GM use objs that aren't kids of the spell db (#328)"; 5(rpg = $local.rpg):secure(); 6att = args[1]; 7targ_doll = args[2]; 8qual = args[3]; 9by = att.character; 10target = targ_doll.character; 11area = target.location; 12skilldb = rpg.skills; 13dodge = skilldb.dodge; 14skillobj = args[4]; 15spell_name = args[5]; 16dodgeable = args[6]; 17magic = targ_doll:get_att("magic_theory"); 18spell_msgs = spell_name + "_msgs"; 19spell_power = "power_" + spell_name; 20spell_pen = "pen_" + spell_name; 21magic_db = (length(args) > 6) ? args[7] | this; 22FLAG_natural_attack = 0; 23FLAG_natural_attack = (length(args) > 7) ? !(!args[8]) | 0; 24stu = $string_utils; 25if (valid(att)) 26 att:do_attack_notification(target, skillobj); 27endif 28targ_doll:set_att("aggressor", setadd(targ_doll:get_att("aggressor"), by)); 29att:set_att("aggressor", setadd(att:get_att("aggressor"), target)); 30gen_zap_msgs = this:get_messages(magic_db, by, target, spell_msgs); 31if (typeof(effect = targ_doll:magic_effects(@args)) != NUM) 32 if (!FLAG_natural_attack) 33 return effect; 34 endif 35elseif ((qual = qual - effect) <= 0) 36 resist_msg = stu:pronoun_sub(gen_zap_msgs[1], by, dobj = target); 37 rpg:rpg_announce_all(area, resist_msg); 38elseif ((((targ_doll != att) && (magic > 0)) && (skillobj:resolve(target, -qual) > 0)) && (!FLAG_natural_attack)) 39 deflect_msg = stu:pronoun_sub(gen_zap_msgs[2], by, dobj = target); 40 rpg:rpg_announce_all(area, deflect_msg); 41elseif ((dodgeable && (targ_doll != att)) && (dodge:resolve(target, 30 - targ_doll:get_att("slowness")) > qual)) 42 dodge_msg = stu:pronoun_sub(gen_zap_msgs[3], by, dobj = target); 43 rpg:rpg_announce_all(area, dodge_msg); 44else 45 actual_verb_name = "DO_" + tostr(spell_name); 46 value = magic_db:(actual_verb_name)(att, targ_doll, qual); 47 if (((typeof(value) == LIST) && (length(value) > 0)) && (typeof(value[1]) == NUM)) 48 blast_msg = stu:pronoun_sub(gen_zap_msgs[3 + value[1]], by, dobj = target); 49 else 50 blast_msg = stu:pronoun_sub(gen_zap_msgs[4], by, dobj = target); 51 endif 52 rpg:rpg_announce_all(area, blast_msg); 53 return value; 54endif
check_live_target
Referenced by
none
Source
1":check_live_target(OBJ caster character, [OBJ target, OBJ spell, NUM boolean peaceful]) => doll of target || $nothing. For spells that want one living target."; 2{by, ?tstr = dobjstr, ?spell = $nothing, ?peaceful = 0} = args; 3(rpg = $local.rpg):secure(); 4tstr = tostr(tstr); 5target = valid(x = by:my_match_object(tstr)) ? x | dobj; 6{loc, mdb, odb} = {by.location, rpg.magic_db, rpg.object_db}; 7no_target = ((!valid(target)) || (target.location != loc)) && (target != loc); 8if (no_target && (spell in mdb.range_spells)) 9 exits = loc:exits(); 10 what = {}; 11 for x in (exits) 12 while (`valid(x.succ_exit) ! ANY') 13 x = x.succ_exit; 14 endwhile 15 if (odb:is_missile_exit(x)) 16 what = {@what, @x.dest.contents}; 17 endif 18 endfor 19 target = $match_utils:match(tstr, what); 20 if (target in what) 21 no_target = 0; 22 endif 23elseif (no_target && valid(`target = loc:match_for_spell(by, tstr, spell, peaceful) ! ANY => $nothing')) 24 (loc.owner in rpg.gms) && (no_target = 0); 25endif 26caster = rpg:get_doll(by); 27doll = rpg:get_doll(target); 28peaceful = peaceful ? peaceful | mdb:is_peaceful_spell(caster, doll, spell); 29if (no_target) 30 rpg:playertell(by, "I don't see any `", dobjstr ? dobjstr | tstr, "' here."); 31elseif ((!$object_utils:isa(doll, rpg.doll)) && valid(spell)) 32 verbname = "receive_" + spell.aliases[1]; 33 (`rpg:trusted_verb(target, verbname) ! E_INVIND => 0' && target:(verbname)(dobj, spell)) || rpg:playertell(by, "My God! ", target.name, " seems to be immune to Illuminati magick."); 34elseif (((!peaceful) && is_player(target)) && ((!$object_utils:connected(target)) || ((idle_seconds(target) > rpg.idle_threshold) && ((time() - doll.last_attack) > rpg.idle_threshold)))) 35 rpg:playertell(by, "Hold your magic! By the edict of the great wizard, bystanders must not be molested."); 36elseif (((((!peaceful) && is_player(target)) && (target != player)) && (!(target in caster.aggressor))) && rpg.rpg_options:get(caster.rpg_options, "peacenik")) 37 rpg:playertell(by, "Whoa! You don't really want to commit violence upon your fellow human beings, do you? Even if it is ", target:title(), ". After all, love is the most powerful weapon. Play nice, now."); 38elseif ((valid(other = doll.duelee) && (`rpg:get_doll(other).duelee ! E_INVIND' == target)) && (!((is_player(by) ? by | (valid(master = `by:master() ! E_VERBNF => target') ? master | target)) in {target, other}))) 39 rpg:playertell(by, target.name, " is involved in a duel with ", doll.duelee.name, "; do not interfere."); 40elseif (((valid(other = doll.duelee) && (rpg:get_doll(other).duelee == by)) && is_player(target)) && (!(target in {by, other}))) 41 rpg:playertell(by, "You're busy duelling ", other.name, "; finish that fight first."); 42elseif (rpg.death_db.pkp_effect:check_for_PK(by, target, spell)) 43 rpg:playertell(by, target.name, " appears to be under the aegis of His Eminence, whose wrath is not to be invoked."); 44else 45 return doll; 46endif 47return $nothing; 48"Profane 22-DEC-95 2008EST -- Added."; 49"THX (#105941) - Sun May 31, 1998 - Scatter assignment. Checking for custom receive_\"spell\" on !alive targets too."; 50"Profane (#30788) - Mon Jul 6, 1998 - uncommented the bit about setting tstr- a plain scatter dun hack it. Also error trap receive_* call"; 51"Profane (#30788) - Wed Apr 21, 1999 - check new peacenik option"; 52"THX (#105941) - Mon Jan 3, 2000 - Commented the tstr length(args) stuff and replaced with a tostr(). Put in some stuff to check peaceful for the peacenik stuff."; 53"THX (#105941) - Tue Mar 7, 2000 - Added a check for \"range_spells\" ... maybe we can make some spells work through missile-transmitting exits."; 54"THX (#105941) - Wed May 10, 2000 - Moved this to rpg.magic_db since it never used 'this' while on the foci anyway. Both armour and weapons can use the same verb."; 55"Profane (#30788) - Thu May 31, 2001 - No 3rd party attacks during duels";
triage
Referenced by
none
Source
1"=> Finds all critter/players in the area the spell is cast who has inj.>0 and retrieves their $local.rpg.skills.shock:penalty_trusted(doll) to sort out the most in need of help to the least in need of help."; 2{by, doll, qual, skillobj, @extra} = args; 3(rpg = $local.rpg):secure(); 4{target, shock} = {by.character, rpg.skills.shock}; 5{threshold, place, data, injured} = {shock.injury, target.location, {}, {}}; 6"data = data for critters/players"; 7for what in (place.contents) 8 if (valid(dollx = rpg:get_doll(what))) 9 if (dollx.inj || ((dollx.ins + dollx.fat) / threshold)) 10 injured = {@injured, what}; 11 data = {@data, (dollx:total("shock") - shock:penalty_trusted(dollx)) - (!(!dollx.inj))}; 12 endif 13 endif 14endfor 15if (!data) 16 rpg:playertell(target, "You sense nothing having injuries nearby."); 17else 18 "sort injured critters and players from serious to not so serious"; 19 injured = $list_utils:sort(injured, data); 20 rpg:playertell(target, "You sense the following in your area:"); 21 tries = max(qual / 9, 1); 22 for who in (injured) 23 rpg:look_health(who); 24 sum = 0; 25 for i in [1..tries] 26 if (shock:resolve(who, 0, 1) <= (-2 * (rpg:get_doll(who).end + (is_player(who) ? 20 | 10)))) 27 sum = sum + 1; 28 endif 29 endfor 30 pct = toint((100.0 * tofloat(sum)) / tofloat(tries)); 31 word = pct ? tostr($string_utils:english_number(pct), " `percentum'") | "not"; 32 rpg:playertell(target, who:title(), " is ", word, " likely to die soon."); 33 endfor 34endif 35"THX (#105941) - Mon May 22, 2000 - Added from demonrider's development magic_db."; 36"THX (#105941) - Wed Dec 20, 2000 - Factored in the doll's total shock too. The penalty was only half the story."; 37"Profane (#30788) - Mon Feb 26, 2001 - % based estimation of chance of survival"; 38"THX (#105941) - Fri Mar 23, 2001 - Changed the '%' to 'percentum' just to make it seem more arcane. Or something. Changed it to print an :english_number too; it just looks better that way."; 39"THX (#105941) - Sat Mar 24, 2001 - Added exhausted/fatigued rpgers into the fray ... if Eir insanity/fatigue is high enough. Added a \"tiebreaker\" term into 'data' since actual wounds are required before a shock failure will result in death.";
beguile
Referenced by
none
Source
1{att, def, qual, skill, @extra} = args; 2by = att.character; 3targ = def.character; 4(rpg = $local.rpg):secure(); 5if (typeof(effect = def:magic_effects(att, def, qual, skill)) != NUM) 6 return effect; 7elseif ((qual = qual - effect) <= 0) 8 rpg:say_action("%N %<seems> unaffected by the song.", targ); 9elseif (def.magic_theory && (skill:resolve(targ, -qual, 1) > 0)) 10 rpg:say_action("%N %<finds> the tune pleasing, but technically lacking.", targ); 11elseif (`targ.animal ! ANY => 0' && (!(targ.animal in {"golem", "corpse", "demon", "humanoid"}))) 12 rpg:say_action("%N is enchanted by the tune.", targ); 13 rpg:playertell(by, "However, as a simple animal, ", targ.name, " doesn't know valuables from hashbrowns."); 14elseif (((note = def:read_misc_note("Beguiled")) != E_PROPNF) && (note > time())) 15 this:beguile_abuse(att, def, by, targ, qual); 16elseif (def:cannot_move() || def.paralyzed) 17 rpg:say_action("%N %<is> enchanted by the tune, but cannot move to comply with the commandments woven into the song.", targ); 18else 19 is_player(targ) || (qual = qual - random(33)); 20 if (qual > 80) 21 fork (0) 22 def.aggressor = setremove(def.aggressor, by); 23 endfork 24 def.act = min(def.act, 0); 25 att.act = min(att.act, 0); 26 endif 27 this:beguile_success(att, def, by, targ, qual); 28 "def:write_misc_note(\"Beguiled\", time() + qual * 2)"; 29endif 30"THX (#105941) - Wed May 17, 2000 - Added this from Hydros' beta-test magic_db."; 31"THX (#105941) - Sun Jun 11, 2000 - Hacked in a splurge to attempt to circumvent invite if the qual is high enough.";
beguile_success
Referenced by
- #328:beguile line 27:
this:beguile_success
Source
1{att, def, by, targ, qual} = args; 2(rpg = $local.rpg):secure(); 3"The successful cast of the Beguile spell. Depending on the qual, it forces a target to hand over certain valuables (gems and coins) to the caster."; 4"The below variables, from 'crit_gem_hit' to 'min_hit,' let the later :beguile_messages verb know for what (cast quality) circumstance it should be acting. The other two, 'has_coins' and 'has_gems,' are also for messaging. These note whether the target has any coins or gems on them to actually give away."; 5{crit_gem_hit, crit_cash_hit, med_hit, min_hit, has_coins, has_gems} = {0, 0, 0, 0, 0, 0}; 6{odb, o_u, weapon} = {rpg.object_db, $object_utils, rpg.weapon}; 7if (qual >= 150) 8 "Critical spell hit."; 9 for pos in (o_u:all_contents(targ)) 10 if (odb:is_gem(pos) && (!o_u:isa(pos.location, weapon))) 11 "The check above stops gems from being stolen if 'mounted' for spell usage."; 12 crit_gem_hit = 1; 13 "Target hands over a gem to the caster. The `if (has_gems)' hack below prevents all gems from being lost."; 14 pos:moveto(by); 15 has_gems = 1; 16 endif 17 if (has_gems) 18 break; 19 endif 20 endfor 21 for pos in (o_u:all_contents(targ)) 22 if (odb:is_money(pos)) 23 crit_cash_hit = 1; 24 "Target hands all eir cash over to the caster."; 25 pos:distribute(by, pos.quantity); 26 has_coins = 1; 27 endif 28 endfor 29elseif (qual >= 125) 30 "Medium spell hit."; 31 "Here, e only hands over half of any gold/copper/silver e has, unless e has very little to spare, in which case, we yoink it all."; 32 for pos in (o_u:all_contents(targ)) 33 if (odb:is_money(pos)) 34 med_hit = 1; 35 if ((pos.unit_worth < 100) || (pos.unit_worth == 1)) 36 pos:distribute(by, pos.quantity); 37 else 38 new_value = pos.quantity / 2; 39 pos:distribute(by, new_value); 40 endif 41 has_coins = 1; 42 endif 43 endfor 44elseif (qual >= 80) 45 "Minimal_hit"; 46 "Hands over 1/4 of cash."; 47 for pos in (o_u:all_contents(targ)) 48 if (odb:is_money(pos)) 49 min_hit = 1; 50 if ((pos.unit_worth < 100) || (pos.unit_worth == 1)) 51 pos:distribute(by, pos.quantity); 52 else 53 new_value = pos.quantity / 4; 54 pos:distribute(by, new_value); 55 endif 56 has_coins = 1; 57 endif 58 endfor 59endif 60this:beguile_messages(by, targ, crit_gem_hit, crit_cash_hit, med_hit, min_hit, has_gems, has_coins, qual); 61"Hydros (#106189) - Sun Mar 20, 2005 - Added a hack that prevented crit hits from parting a victim from -all- of eir gems. Now e will hand over only one along with the gold.";
beguile_abuse
Referenced by
- #328:beguile line 15:
this:beguile_abuse
Source
1{att, def, by, targ, qual} = args; 2(rpg = $local.rpg):secure(); 3dobj = by; 4rpg:say_action("%N %<searches> madly on %r for some sort of token for %d's playing, and finding some random small object, ~perhaps~ a coin, %<hurls> it at %d.", targ); 5"Just a small punishment for abusing the spell. The double-entendre is in the abuse the player will ~receive~ for their actions. It doesn't do much damage, but it in no way aids them."; 6tqual = rpg.skills.throw:resolve(targ, 0, 1); 7dqual = rpg.skills.dodge:resolve(by, 0, 1); 8if ((result = tqual - dqual) <= 0) 9 barea = def.body_areas[random($)]; 10 barea = barea.name; 11 if (def:wearing(barea) == {}) 12 rpg:tell_damage(by, ("The small projectile strikes your " + barea) + ", leaving a nasty red mark."); 13 rpg:rpg_announce_all_but(by.location, {by}, "The projectile strikes ", by.name, " on the ", barea, ", leaving a nasty red mark."); 14 att:mod_att("inj", 3); 15 else 16 "If they are wearing armour on the body area chosen, it does no damage -- it's just a small, random throw. No biggie."; 17 rpg:say_action(("The small projectile glances off %n's armoured " + barea) + ".", by); 18 endif 19else 20 rpg:say_action("%N %<dodges> the small, random, hurled object.", by); 21endif
beguile_messages
Referenced by
- #328:beguile_success line 60:
this:beguile_messages
Source
1{by, targ, critg, critc, med, min, gems, coins, qual} = args; 2"The messaging for the Beguile successful casts. Assuming the player has gems/gold, and depending on the qual, it will display different messages to correspond with the qual checks in the preceding :beguile_success() verb. If no gems or cash are present, alternate messages are displayed."; 3(rpg = $local.rpg):secure(); 4dobj = by; 5tdoll = rpg:get_doll(targ); 6if (critg || critc) 7 rpg:playertell(targ, "You are dazzled by memories and good times from your past, all dancing through your mind, to the song's mesmorizing tune."); 8 rpg:say_action("Simply enchanted by the melody, %n %<digs> through %p various pockets and pouches...", targ); 9 if (critg && gems) 10 "If spell is critical and has gems on them."; 11 rpg:say_action("%N %<produces> a gemstone and generously %<hands> it over to %d.", targ); 12 endif 13 if (critc && coins) 14 "Same as before, but checks for money in target's contents."; 15 rpg:say_action("%N %<produces> a stash of coins and generously hands it over to %d.", targ); 16 endif 17 tdoll:write_misc_note("Beguiled", time() + qual); 18elseif (med && coins) 19 rpg:playertell(targ, "The song inspires you and lifts your spirits, and your resolve."); 20 rpg:say_action("%N %<tosses> %d some coins.", targ); 21 tdoll:write_misc_note("Beguiled", time() + qual); 22elseif (min && coins) 23 rpg:playertell(targ, "The song brightens your day."); 24 rpg:say_action("%N %<tosses> a few coins to %d.", targ); 25 tdoll:write_misc_note("Beguiled", time() + qual); 26elseif ((!med) && (!med)) 27 rpg:say_action("%N %<seems> unaffected by the song.", targ); 28 return; 29endif 30if ((!coins) && (!gems)) 31 rpg:say_action(this.beguile_gemless_msg, targ); 32elseif (!coins) 33 rpg:say_action(this.beguile_coinless_msg, targ); 34endif 35"Hydros (#106189) - Sun Mar 20, 2005 - Changed messaging to reflect a hack added to :beguile_success() which prevents -all- gems from being handed over on a crit hit. Now we hand over only one.";
desteal
Referenced by
- #328:stealskill line 29:
this:desteal
Source
1":desteal(attacker_doll, target_doll, which skill) -> reset both attacker and target's <skill> back to normal. for use with stealskill"; 2(rpg = $local.rpg):secure(); 3{attk, doll, skill} = args; 4skill_name = skill.aliases[1]; 5"First reset attacker's skill."; 6for item in (attk.att_schedule) 7 {attr, time, mod, element} = item; 8 if ((attr == skill_name) && (element[2] == "unsteal")) 9 rpg.toady:call_verb(this, "unsteal", {attk, @element[4]}); 10 attk:att_unschedule(@item); 11 "Now reset whoever the attacker stole this skill from."; 12 who = element[4][1]; 13 for who_item in (who.att_schedule) 14 {who_attr, who_time, who_mod, who_element} = who_item; 15 if ((who_attr == skill_name) && (who_element[2] == "unsteal")) 16 rpg.toady:call_verb(this, "unsteal", {who, @who_element[4]}); 17 who:att_unschedule(@who_item); 18 endif 19 endfor 20 endif 21endfor 22"Now reset target"; 23for item in (doll.att_schedule) 24 {attr, time, mod, element} = item; 25 if ((attr == skill_name) && (element[2] == "unsteal")) 26 rpg.toady:call_verb(this, "unsteal", {doll, @element[4]}); 27 doll:att_unschedule(@item); 28 "Now reset whoever the target stole this skill from."; 29 who = element[4][1]; 30 for who_item in (who.att_schedule) 31 {who_attr, who_time, who_mod, who_element} = who_item; 32 if ((who_attr == skill_name) && (who_element[2] == "unsteal")) 33 rpg.toady:call_verb(this, "unsteal", {who, @who_element[4]}); 34 who:att_unschedule(@who_item); 35 endif 36 endfor 37 endif 38endfor
print_storms(old)
Referenced by
none
Source
1"print_storms(no args | OBJ)"; 2"returns {} or a list of strings formatted for player:tell_lines()"; 3"If argument is given and is a room, print info for that room, if it is not a room, print storms cast by that object. If no argument, do all storms globally"; 4{?what = 0} = args; 5(rpg = $local.rpg):secure(); 6db = rpg.magic_db; 7if (typeof(what) != OBJ) 8 storms = db.storms; 9elseif ($object_utils:isa(what, $room)) 10 storms = db:storms_active_in(what); 11else 12 storms = db:storms_cast_by(what); 13endif 14if (!storms) 15 return {}; 16endif 17biglist = stormlist = {}; 18{l_u, s_u} = {$list_utils, $string_utils}; 19for i in [1..length(storms)] 20 who = storms[i][2]; 21 qual = storms[i][4]; 22 if (ind = l_u:iassoc(who, stormlist)) 23 if (qual > 50) 24 stormlist[ind][2] = stormlist[ind][2] + 1; 25 elseif (qual > 15) 26 stormlist[ind][3] = stormlist[ind][3] + 1; 27 else 28 stormlist[ind][4] = stormlist[ind][4] + 1; 29 endif 30 else 31 raging = thunder = minor = 0; 32 if (qual > 50) 33 raging = 1; 34 elseif (qual > 15) 35 thunder = 1; 36 else 37 minor = 1; 38 endif 39 stormlist = {@stormlist, {who, raging, thunder, minor}}; 40 endif 41endfor 42for j in [1..length(stormlist)] 43 plyr = stormlist[j][1]; 44 text = {}; 45 r = stormlist[j][2]; 46 t = stormlist[j][3]; 47 m = stormlist[j][4]; 48 if (r == 1) 49 text = {@text, "a raging electrical storm"}; 50 elseif (r > 1) 51 text = {@text, tostr(r) + " raging electrical storms"}; 52 endif 53 if (t == 1) 54 text = {@text, "a thunderstorm"}; 55 elseif (t > 1) 56 text = {@text, tostr(t) + " thunderstorms"}; 57 endif 58 if (m == 1) 59 text = {@text, "a minor storm"}; 60 elseif (m > 1) 61 text = {@text, tostr(m) + " minor storms"}; 62 endif 63 flags = `plyr.location.room_data ! ANY => {}'; 64 shortlist = (("cavern" in flags) || ("structure" in flags)) ? tostr(plyr.name, " has ", strsub(s_u:english_list(text), "raging ", ""), " raging outside.") | tostr(plyr.name, " has up ", s_u:english_list(text), "."); 65 biglist = {@biglist, tostr(plyr.name, " has up ", s_u:english_list(text), ".")}; 66endfor 67return biglist; 68"Profane 17-DEC-95 1211EST -- (re)modified to do storms_cast_by as well.";
mergestorm
Referenced by
none
Source
1{att, dummy, qual, skillobj} = args; 2by = att.character; 3(rpg = $local.rpg):secure(); 4this = $code_utils:verb_loc(); 5storms = this:storms_cast_by(by); 6stormfront = length(storms); 7if (stormfront < 2) 8 return rpg:announce_all_but(by.location, {}, "Nothing happens."); 9endif 10keeper = storms[1]; 11for storm in (setremove(storms, keeper)) 12 {tid, caster, strikes, qual, interval} = storm; 13 (qual > keeper[4]) && (keeper = storm); 14endfor 15{keeperqual, n} = {keeper[4], 0}; 16for storm in (setremove(storms, keeper)) 17 {tid, caster, strikes, qual, interval} = storm; 18 n = n + ((strikes * qual) / keeperqual); 19 this.storms = setremove(this.storms, storm); 20 this.silent_storms = setadd(this.silent_storms, storm); 21endfor 22for storm in (this.storms) 23 {tid, caster, strikes, qual, interval} = storm; 24 if (by == caster) 25 this.storms[storm in this.storms] = {tid, caster, strikes + n, qual + stormfront, interval}; 26 break storm; 27 endif 28endfor 29rpg:say_action("With a surge of unrelenting meteorological power, %N's storms come together with a clash of thunder and blinding flare of light.", by);
gen_zap(old)
Referenced by
none
Source
1":gen_zap(OBJ caster-doll, OBJ target-doll, INT quality, OBJ skillobj, STR spell_name, FLAG dodgeable, [OBJ staff, [FLAG natural_attack]])"; 2"Original verb taken from #328:firebolt, and modded so 1 verb c'n handle *all* the spells that jus do damage."; 3"This verb'll handle ice-bolts, magic missiles, an jus 'bout anythin a GM c'n think of."; 4"The optional argument, staff, lets the GM use objs that aren't kids of the spell db (#328)"; 5(rpg = $local.rpg):secure(); 6{att, targ_doll, qual, skillobj, spell_name, dodgeable, ?staff = this, ?natural_attack = 0} = args; 7by = att.character; 8target = targ_doll.character; 9area = target.location; 10dodge = rpg.skills.dodge; 11magic = targ_doll.magic_theory; 12spell_msgs = spell_name + "_msgs"; 13spell_power = "power_" + spell_name; 14spell_pen = "pen_" + spell_name; 15spell_dodge = "dodge_" + spell_name; 16spell_special = "special_" + spell_name; 17stu = $string_utils; 18att:do_attack_notification(target, skillobj); 19is_player(target) || target:set_last_attacker(by); 20targ_doll.aggressor = setadd(targ_doll.aggressor, by); 21att.aggressor = setadd(att.aggressor, target); 22{resist_msg, deflect_msg, dodge_msg, blast_msg, @efx_messages} = this:get_messages(staff, by, target, spell_msgs); 23no_imp = (by == target) ? 1 | 0; 24if (typeof(effect = att:casting_effects(att, targ_doll, qual, skillobj)) != NUM) 25 return effect; 26elseif ((!natural_attack) && (typeof(effect = targ_doll:magic_effects(att, targ_doll, qual, skillobj)) != NUM)) 27 return effect; 28elseif (is_player(target) && (!(target in connected_players()))) 29 by:tell("Hold your magic! By the edict of the Great Wizard, bystanders must not be molested!"); 30elseif ((!natural_attack) && ((qual = qual - effect) <= 0)) 31 resist_msg = stu:pronoun_sub(resist_msg, by, dobj = target); 32 rpg:rpg_announce_all_but(area, {}, resist_msg); 33elseif ((((!natural_attack) && (targ_doll != att)) && (magic > 0)) && (skillobj:resolve(target, -qual, no_imp) > 0)) 34 deflect_msg = stu:pronoun_sub(deflect_msg, by, dobj = target); 35 rpg:rpg_announce_all_but(area, {}, deflect_msg); 36elseif ((dodgeable && (targ_doll != att)) && (dodge:resolve(target, staff:(spell_dodge)(att, targ_doll, qual) - targ_doll.slowness, no_imp) > qual)) 37 dodge_msg = stu:pronoun_sub(dodge_msg, by, dobj = target); 38 rpg:rpg_announce_all_but(area, {}, dodge_msg); 39else 40 blast_msg = stu:pronoun_sub(blast_msg, by, dobj = target); 41 rpg:rpg_announce_all_but(area, {}, blast_msg); 42 power = staff:(spell_power)(qual, magic, targ_doll); 43 pen = staff:(spell_pen)(qual, magic); 44 zap_result = targ_doll:hit_result(power, pen, by, skillobj); 45 if (zap_result) 46 this:do_zap(zap_result, efx_messages, by, target, staff); 47 "Ok, new bit for spells doing funky special damage. Replaces the call to :fire_effect."; 48 `staff:(spell_special)(att, targ_doll, qual, zap_result) ! E_VERBNF'; 49 else 50 "Only happens in the case of bad perms or .end == 0"; 51 resist_msg = stu:pronoun_sub(resist_msg, by, dobj = target); 52 rpg:rpg_announce_all_but(area, {}, resist_msg); 53 endif 54endif 55"Profane 27-JUN-96 848EDT -- Added check for disconnected players."; 56"Mooshie (#106469) - Sun Feb 1, 1998 - Did some scattering and speeding up."; 57"Irin - Added hook for special effect if the spell goes through. Fire damage, etc. Also added dodge difficulty and possibility of a non-magickal attack (undeflectable && no magic resistance.)"; 58"Hannibal - Added casting_effects check for the casting doll."; 59"Hannibal 2/9/2000 - Added call to :set_last_attacker if the target is an RPG monster.";
stoneflesh
Referenced by
none
Source
1{doll, who, qual, skill, @extra} = args; 2(rpg = $local.rpg):secure(); 3who = doll.character; 4for armour in (doll.wearing) 5 if ($math_utils:sum(armour.cover)) 6 return rpg:playertell(who, "You'll have to remove what you're wearing first."); 7 endif 8endfor 9if (!(this.bs_combat_effect in doll.magic_effects)) 10 return rpg:say_action("Aside from a stiff neck, %n %<seems> entirely unaffected.", who); 11elseif (qual < 0) 12 rpg:playertell(who, "By combining magickal forms, you try to cast Skin of the Mountain."); 13 rpg:say_action("%N's flesh begins to stiffen further...but returns to its wooden form."); 14else 15 rpg:playertell(who, "By combining magickal forms, you try to cast Skin of the Mountain."); 16 "We remove the barkskin and add the stoneflesh."; 17 doll.body_areas = this.stoneflesh_body_areas; 18 this.bs_combat_effect:remove(doll); 19 this.sf_combat_effect:add(doll); 20 if ((doll:get_att("CAPterram") >= 30) || (doll:get_att("CAPherbam") >= 30)) 21 doll:write_misc_note("Stoneflesh_Bonus", random(10)); 22 else 23 doll:write_misc_note("Stoneflesh_Bonus", 0); 24 endif 25 "Specialists gain a bonus to the effect--this can be seen in #328.sf_combat_effect:armour_effect and :magic_effect."; 26 "Here, we add 1 to the 5 slowness caused by barkskin, totalling 6."; 27 doll:mod_att("slowness", 1); 28 rpg:say_action("%N's gnarled, bark-like skin shudders and hardens further, fading to a cold grey as it petrifies into stone.", who); 29 "Removing the barkskin schedule and adding that of stoneflesh."; 30 while (x = $list_utils:iassoc("unbark", doll.schedule, 2)) 31 doll:cancel(doll.schedule[x]); 32 endwhile 33 doll:schedule(this, "unstone", time() + ((qual * qual) / 2), {qual}); 34endif 35"THX (#105941) - Fri Sep 1, 2000 - Added from Hydros' prototype.";
unstone
Referenced by
none
Source
1{doll, @extra} = args; 2(rpg = $local.rpg):secure(); 3doll.body_areas = rpg.doll.body_areas; 4norm = is_player(doll.character) ? rpg.doll.slowness | target:get_iprop("slowness"); 5doll:set_att("slowness", norm); 6announce = this.sf_combat_effect in doll.armour_effects; 7this.sf_combat_effect:remove(doll); 8doll:erase_misc_note("Stoneflesh_Bonus"); 9if (i = $list_utils:iassoc("unstone", doll.schedule, 2)) 10 doll:cancel(doll.schedule[i]); 11endif 12announce && rpg:say_action("%N's petrified skin transforms back to normal.", doll.character);
parch
Referenced by
none
Source
1{att, doll, qual, skillobj, @useless} = args; 2(rpg = $local.rpg):secure(); 3by = att.character; 4target = doll.character; 5area = target.location; 6if (typeof(effect = doll:magic_effects(@args)) != NUM) 7 return effect; 8elseif ((qual = qual - effect) <= 0) 9 rpg:rpg_announce_all(area, target.name, " seems unaffected by the spell."); 10elseif (((doll != att) && (doll.magic_theory > 0)) && (rpg.skills.parch:resolve(target, -qual, 1) > 0)) 11 rpg:rpg_announce_all(area, this:spell_deflection_msg(target, by)); 12elseif ($list_utils:assoc("unparch", doll.schedule, 2)) 13 rpg:rpg_announce_all(area, "Nothing happens."); 14else 15 dur = (qual + random(20)) * 2; 16 this.cs_combat_effect:add(doll); 17 doll:schedule(this, "unparch", time() + dur, {by, qual}); 18 rpg:rpg_announce_all_but(area, {target}, target:titlec(), " coughs dryly."); 19 target:tell("Your mouth dries out, your throat spasms, and your tongue becomes a bit of cracked leather as all moisture in your respiratory system leaches out and evaporates."); 20endif
unparch
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2{doll, @useless} = args; 3this.cs_combat_effect:remove(doll); 4doll.character:tell("It appears your salivary glands have started working again, moistening your mouth and throat once again.");
unharden(old)
Referenced by
none
Source
1if (!(db = $local.rpg):trusted(caller_perms())) 2 return E_PERM; 3else 4 what = args[2]; 5 cond = args[3]; 6 if ($object_utils:isa(what, $local.rpg.thing)) 7 if (what:set_condition(min(cond, what.condition))) 8 if ($object_utils:isa(where = what.location, $room)) 9 what:room_announce_all(what:titlec(), " seems to weaken. . ."); 10 else 11 what:room_announce_all(where.name, "'s ", what:title(), " seems to weaken. . ."); 12 endif 13 else 14 what:room_announce_all(what:titlec(), " seems to be having a problem unhardening. Contact a GM."); 15 endif 16 endif 17endif
rot
Referenced by
none
Source
1"Copied from spellies (#7994):328rot by Caste (#112369) Thu Aug 9 13:29:56 2001 PDT"; 2{att, target, qual, skill, @rest} = args; 3(rpg = $local.rpg):secure(); 4victim = att.character; 5flagevil = 0; 6if (`target.is_corpse ! E_PROPNF, E_PERM') 7 by = att.character; 8 victim = target.victim; 9 doll = `target.doll ! ANY => `victim.doll ! ANY => $nothing''; 10 if (!$recycler:valid(doll)) 11 rpg:rpg_announce_all(by.location, "Nothing happens."); 12 elseif (qual < 1) 13 by:tell("The magickal energies needed to rot ", target.name, " are too much for you."); 14 rpg:rpg_announce(by.location, "Nothing happens."); 15 att:check_ins(stats / 5); 16 elseif (target.time_of_death > time()) 17 rpg:say_action("Some powerful charm protects the %t from %n's spell magicks!", by, target); 18 else 19 rpg:say_action("The %t squirms with maggots as %n %<chants>.", by, target); 20 target.time_of_death = target.time_of_death - random(qual * 9); 21 if (is_player(victim)) 22 target:maybe_rot(); 23 else 24 ((target.time_of_death + victim.gestate) < time()) && target:rot(); 25 endif 26 endif 27else 28 by = att.character; 29 tloc = target.location; 30 cond = target.condition; 31 "Is the target on a player? If so check for deflection, and check if it will actually affect the object."; 32 if (valid(tdoll = rpg:get_doll(tloc))) 33 "Check for backfire, iceshell, or biting_cloud on the targeted player... return without reducing the condition if backfire or iceshell, or increase the qual if biting_cloud."; 34 effect = tdoll:magic_effects(att, tdoll, qual, skill); 35 if ($list_utils:iassoc("bite", tdoll.schedule, 2)) 36 qual = qual + 15; 37 rpg:rpg_announce_all(by.location, "The biting cloud around ", tloc.name, " shimmers, and some land on ", target.name, " to join in the frenzy."); 38 elseif ($list_utils:iassoc("unbackfire", tdoll.schedule, 2)) 39 return rpg:rpg_announce_all(by.location, "The backfire surrounding ", tloc.name, " incinerates the insects as they appear."); 40 elseif (tdoll in this.is_combat_effect.shelled) 41 rpg:rpg_announce_all(by.location, "The iceshell around ", tloc.name, " prevents the insects from forming."); 42 return; 43 "Ok those should be stuck in the appropriate effobjs someday, but screw that for now."; 44 elseif (typeof(effect) != NUM) 45 return effect; 46 elseif ((qual = qual - effect) <= 0) 47 rpg:say_action("Nothing happens."); 48 return; 49 elseif (((tdoll != att) && (tdoll.magic_theory > 0)) && (rpg.skills.rot:resolve(tloc, -qual) > 0)) 50 rpg:rpg_announce_all(by.location, this:spell_deflection_msg(tloc, by)); 51 return; 52 endif 53 att.act = -120; 54 att.aggressor = setadd(att.aggressor, tdoll.character); 55 tdoll.aggressor = setadd(tdoll.aggressor, by); 56 att:do_attack_notification(tdoll.character, skill); 57 name = (tloc.name + "'s ") + target:title(); 58 else 59 name = target:title(); 60 endif 61 "Ok, let's rot the damned thing."; 62 if ((qual < (cond / (1 + (qual / 10)))) || (!(breakable = typeof(cond) == NUM))) 63 rpg:rpg_say_announce_all(by.location, "Tiny insects crawl all over ", name, ", trying to devour it, but don't seem to be doing any harm."); 64 elseif ((random(100) <= (10 - (cond / 10))) && breakable) 65 rpg:rpg_announce_all(by.location, "Tiny insects crawl all over ", name, " gnawing and biting into it."); 66 target:("break")(); 67 flagevil = 1; 68 elseif (breakable) 69 dam = max(random(qual), qual / 3); 70 rpg:rpg_announce_all(by.location, "Tiny insects crawl all over ", name, " gnawing and biting into it."); 71 target:set_condition(cond - dam); 72 if (target.condition < 1) 73 target:("break")(); 74 flagevil = 1; 75 else 76 rpg:rpg_announce_all(by.location, "The tiny insects suddenly dissappear, but you can see that they've left their mark."); 77 endif 78 endif 79endif 80if ((flagevil && (by != victim)) && (random(50) == 5)) 81 att:mod_anima(1, rpg.death_db.anima_slip_msgs[2]); 82endif 83"Hydros (#106189) - Fri Nov 26, 2004 - Added flags in cases of corpse :break(), and if true, make the caster EVILLER. Mwaha.";
dirge
Referenced by
none
Source
1"A way to mourn the passing of friends, enemies, and that guy next door to whom you were indifferent but with the cool helmet you liked."; 2(rpg = $local.rpg):secure(); 3{att, def, qual, skill, @extra} = args; 4by = att.character; 5if (qual < 25) 6 rpg:say_action("The tune is melancholy, but hardly played with enough skill to inspire.", by); 7else 8 {players, dolls} = rpg:find_chars(by.location); 9 "NPCs don't count as mourners."; 10 players = rpg.user_utils.hydros:exclude_all_but_type(players, $player); 11 dolls = {}; 12 for y in (players) 13 rpg:s_i_f_i_n(0); 14 if (valid(dolly = rpg:get_doll(y))) 15 dolls = setadd(dolls, dolly); 16 endif 17 endfor 18 mourners_mod = max(6, 16 - length(players)); 19 "Caster's skill can give slight modification to the spell's effect."; 20 if (qual > 100) 21 mourners_mod = mourners_mod - 1; 22 elseif (qual > 150) 23 mourners_mod = mourners_mod - 2; 24 endif 25 for x in (dolls) 26 rpg:s_i_f_i_n(0); 27 this:dirge_effect(x, mourners_mod, length(players), qual); 28 endfor 29endif 30"dalton (#116601) - Sat Dec 7, 2002 - Added this from Hydros' beta-test magic_db.";
undirge
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2{doll} = args; 3this.dirge_effects:remove(doll); 4doll:erase_misc_note("Heard_Dirge"); 5rpg:playertell(doll.character, "The world seems dreary and more mundane as the dirge fades to distant memory."); 6"dalton (#116601) - Sat Dec 7, 2002 - Added this from Hydros' beta-test magic_db.";
dirge_effect
Referenced by
- #328:dirge line 27:
this:dirge_effect
Source
1"Called from $local.rpg.magic_db:dirge(). Doll is the effected doll, mourners_mod[ifier] is based on how many mourners show up to hear the dirge, len is the number of aforementioned mourners, qual is the quality of the spell."; 2(rpg = $local.rpg):secure(); 3{doll, mourners_mod, len, qual} = args; 4"Folks who actually read in a text-based environment are A-OKAY."; 5if ((!`doll.character.ascii_intolerant ! ANY => 0') && ("lyrics" in doll.rpg_options)) 6 mourners_mod = mourners_mod - 1; 7endif 8"Next line purposely left outside of next conditional."; 9"If more people show up and dirge is played again, effect, but not duration, can be increased for all."; 10"We're encouraging interaction, baby."; 11doll:write_misc_note("Heard_Dirge", mourners_mod); 12if (!(this.dirge_effects in doll:get_att("casting_effects"))) 13 this.dirge_effects:add(doll); 14 doll:schedule(this, "undirge", (time() + (len * 200)) + (qual * 10), {}); 15 rpg:playertell(doll.character, "You swell with a newfound sense of life amidst great loss."); 16else 17 rpg:say_action("%N %<bows> %p head slightly as the dirge plays on.", doll.character); 18endif 19"dalton (#116601) - Sat Dec 7, 2002 - Added this from Hydros' beta-test magic_db.";
fortify
Referenced by
none
Source
1"This verb added for the sake of <focus>.fortify_cast_msg."; 2(rpg = $local.rpg):secure(); 3rpg.magic_db:harden(@args);
bladebarrier(old)
Referenced by
none
Source
1"The LRPG Bladebarrier spell. Requires a minimum of 2 blades to function, maximum 10."; 2{doll, targ, qual, skill, @extra} = args; 3(rpg = $local.rpg):secure(); 4who = doll.character; 5dag_count = 0; 6dag_list = {}; 7dag_skills = {rpg.skills.dagger_melee, rpg.skills.dagger_throw}; 8if ((doll.CAPrego < 25) || (qual < 99)) 9 "Weaker mages in this spell won't be able to animate as many daggers."; 10 dag_max = (random(2) + random(3)) + 1; 11 "The 'break' function below makes the loop its in act funny. This '+ 1' equation in the preceding line seems to fix that. <shrug>"; 12else 13 dag_max = 10; 14endif 15if (this.bb_combat_effect in (v_e = doll.view_effects)) 16 "So players can actually practice this spell without having to go and get a zillion more daggers."; 17 doll.last_attack = time() + rpg.gm_lag; 18 return rpg:say_action("%N's blade barrier flashes and quickens.", who); 19endif 20for x in (who.contents) 21 rpg:s_i_f_i_n(); 22 " if (`x.skill ! ANY' in dag_skills)"; 23 if ($object_utils:isoneof(x, this.shortblades) && (x.owner == this.owner)) 24 dag_count = dag_count + 1; 25 dag_list = setadd(dag_list, x); 26 if (dag_count >= dag_max) 27 break; 28 endif 29 endif 30endfor 31if (caller in doll.wielding) 32 doll.wielding = setremove(doll.wielding, caller); 33 caller:do_unwield(who); 34 rpg:say_action(((("%N %<" + caller.osheathe) + "/") + caller.sheathe) + "> %p %t.", who, caller); 35endif 36if (!dag_count) 37 rpg:playertell(who, "You haven't any proper blades to animate."); 38elseif (dag_count < 2) 39 rpg:playertell(who, "You'll need more daggers for that."); 40elseif (!doll:hands_free()) 41 rpg:playertell(who, "You'll need at least one hand free for that."); 42elseif (this.ww_combat_effect in v_e) 43 rpg:playertell(who, "Your wall of wind would interfere with the barrier you wish to cast."); 44elseif (this.bf_combat_effect in v_e) 45 rpg:playertell(who, "Your aura of flame would interfere with the barrier you wish to cast."); 46elseif (this.rm_armour_effect in doll.armour_effects) 47 rpg:playertell(who, "Your reverser field would interfere with the barrier you wish to cast."); 48else 49 this:bladebarrier_success(who, doll, dag_count, dag_list); 50endif 51"Profane (#30788) - Tue Jan 9, 2001 - Added from Hydros (#106189)'s prototype."; 52"THX (#105941) - Thu Jan 18, 2001 - Changed to allow weapon.skill in {dagger_melee, dagger_throw} since daggers switch back and forth depending on how they are handled.";
bladebarrier_success(old)
Referenced by
none
Source
1{who, doll, dag_count, dag_list} = args; 2(rpg = $local.rpg):secure(); 3this.bb_combat_effect:add(doll); 4doll:write_misc_note("Blade_Barrier", dag_count); 5this:remove_blades_for_barrier(dag_list); 6doll:schedule(this, "unbladebarrier", (time() + 3600) + (dag_count * 10), {}); 7rpg:say_action(("%N %<tosses> " + $string_utils:english_number(dag_count)) + " daggers into the air. They rest there, suspended, then dart back and begin slowly, ominously, to circle %o.", who); 8rpg:say_action("The animated knives rapidly pick up speed until they form a flashing barrier of blades around %n.", who); 9"Profane (#30788) - Tue Jan 9, 2001 - Added from Hydros (#106189)'s prototype.";
remove_blades_for_barrier(old)
Referenced by
none
Source
1"Copied from Aquam Arcane (#87189):remove_blades_for_barrier by Hydros (#106189) Tue Jan 9 00:15:23 2001 PST"; 2(rpg = $local.rpg):secure(); 3{daggers} = args; 4for d in (daggers) 5 d:moveto(rpg.cemetery); 6endfor
bladebarrier
Referenced by
none
Source
1"The LRPG Bladebarrier spell. Requires a minimum of 2 blades to function, maximum 10."; 2{doll, targ, qual, skill, @extra} = args; 3(rpg = $local.rpg):secure(); 4who = doll.character; 5dag_list = {}; 6dag_skills = {rpg.skills.dagger_melee, rpg.skills.dagger_throw}; 7if ((doll.CAPrego < 25) || (qual < 99)) 8 "Weaker mages in this spell won't be able to animate as many daggers."; 9 dag_max = (random(2) + random(3)) + 1; 10 "The 'break' function below makes the loop its in act funny. This '+ 1' equation in the preceding line seems to fix that. <shrug>"; 11else 12 dag_max = 10; 13endif 14if (this.bb_combat_effect in (v_e = doll.view_effects)) 15 "So players can actually practice this spell without having to go and get a zillion more daggers."; 16 doll.last_attack = time() + rpg.gm_lag; 17 return rpg:say_action("%N's blade barrier flashes and quickens.", who); 18endif 19for x in (who.contents) 20 rpg:s_i_f_i_n(); 21 " if (`x.skill ! ANY' in dag_skills)"; 22 if ($object_utils:isoneof(x, this.shortblades) && (x.owner == this.owner)) 23 dag_list = setadd(dag_list, x); 24 if ((dag_count = length(dag_list)) >= dag_max) 25 break; 26 endif 27 endif 28endfor 29if (caller in doll.wielding) 30 doll.wielding = setremove(doll.wielding, caller); 31 caller:do_unwield(who); 32 rpg:say_action(((("%N %<" + caller.osheathe) + "/") + caller.sheathe) + "> %p %t.", who, caller); 33endif 34if (!(dag_count = length(dag_list))) 35 rpg:playertell(who, "You haven't any proper blades to animate."); 36elseif (dag_count < 2) 37 rpg:playertell(who, "You'll need more daggers for that."); 38elseif (!doll:hands_free()) 39 rpg:playertell(who, "You'll need at least one hand free for that."); 40elseif (this.ww_combat_effect in v_e) 41 rpg:playertell(who, "Your wall of wind would interfere with the barrier you wish to cast."); 42elseif (this.bf_combat_effect in v_e) 43 rpg:playertell(who, "Your aura of flame would interfere with the barrier you wish to cast."); 44elseif (this.rm_armour_effect in doll.armour_effects) 45 rpg:playertell(who, "Your reverser field would interfere with the barrier you wish to cast."); 46else 47 this:bladebarrier_success(who, doll, dag_list); 48endif 49"Profane (#30788) - Tue Jan 9, 2001 - Added from Hydros (#106189)'s prototype."; 50"THX (#105941) - Thu Jan 18, 2001 - Changed to allow weapon.skill in {dagger_melee, dagger_throw} since daggers switch back and forth depending on how they are handled."; 51"Hydros (#106189) - Tue Apr 5, 2005 - A complete overhaul to allow the daggers to come back intact. Every related verb revised. (And dalton made it use .shortblades, but never left a comment, *tsk*.)";
bladebarrier_success
Referenced by
- #328:bladebarrier(old) line 49:
this:bladebarrier_success - #328:bladebarrier line 47:
this:bladebarrier_success
Source
1{who, doll, dag_list} = args; 2(rpg = $local.rpg):secure(); 3dag_count = length(dag_list); 4this.bb_combat_effect:add(doll); 5doll:write_misc_note("BB_Daggers", dag_list); 6this:remove_blades_for_barrier(dag_list); 7doll:schedule(this, "unbladebarrier", (time() + 3600) + (dag_count * 10), {}); 8rpg:say_action(("%N %<tosses> " + $string_utils:english_number(dag_count)) + " daggers into the air. They rest there, suspended, then dart back and begin slowly, ominously, to circle %o.", who); 9rpg:say_action("The animated knives rapidly pick up speed until they form a flashing barrier of blades around %n.", who); 10"Profane (#30788) - Tue Jan 9, 2001 - Added from Hydros (#106189)'s prototype."; 11"Hydros (#106189) - Tue Apr 5, 2005 - We now move the dagger objects to a safe spot until the spell is dropped, and whatever remains is returned to the caster.";
remove_blades_for_barrier
Referenced by
- #328:bladebarrier_success(old) line 5:
this:remove_blades_for_barrier - #328:bladebarrier_success line 6:
this:remove_blades_for_barrier
Source
1"Copied from Aquam Arcane (#87189):remove_blades_for_barrier by Hydros (#106189) Tue Jan 9 00:15:23 2001 PST"; 2(rpg = $local.rpg):secure(); 3{daggers} = args; 4for d in (daggers) 5 d:moveto(rpg.magic_db.bb_warehouse); 6endfor
unbladebarrier(old)
Referenced by
none
Source
1"Copied from Aquam Arcane (#87189):unbladebarrier by Hydros (#106189) Tue Jan 9 00:15:12 2001 PST"; 2"Drop the barrier of blades, under the assumption that the daggers will not simply fall to the ground, but have taken enough whirling magickal abuse to be destroyed."; 3(rpg = $local.rpg):secure(); 4{doll, @extra} = args; 5this.bb_combat_effect:remove(doll); 6doll:erase_misc_note("Blade_Barrier"); 7if (i = $list_utils:iassoc("unbladebarrier", doll:get_att("schedule"), 2)) 8 doll:cancel(doll:get_att("schedule")[i]); 9endif 10rpg:say_action("%N's barrier of blades is dropped, leaving nothing but shattered remains.", doll.character);
unbladebarrier
Referenced by
- #328:daggerstorm(old) line 28:
this:unbladebarrier
Source
1"Copied from Aquam Arcane (#87189):unbladebarrier by Hydros (#106189) Tue Jan 9 00:15:12 2001 PST"; 2"Drop the barrier of blades, under the assumption that the daggers will not simply fall to the ground, but have taken enough whirling magickal abuse to be destroyed."; 3(rpg = $local.rpg):secure(); 4{doll, @extra} = args; 5resting_place = (doll.bladebarrier > 25) ? doll.character | doll.character.location; 6drop_msg = (doll.bladebarrier > 25) ? "%N's barrier of blades slows to a standstill, and each glinting blade comes to rest in %p hands." | "%N's barrier of blades is dropped, clattering to the ground in a pile of metal."; 7this.bb_combat_effect:remove(doll); 8daggers = doll:read_misc_note("BB_Daggers"); 9for x in (daggers) 10 x:moveto(resting_place); 11endfor 12doll:erase_misc_note("BB_Daggers"); 13if (i = $list_utils:iassoc("unbladebarrier", doll:get_att("schedule"), 2)) 14 doll:cancel(doll:get_att("schedule")[i]); 15endif 16rpg:say_action(drop_msg, doll.character); 17"Hydros (#106189) - Tue Apr 5, 2005 - Daggers now return to the caster's location, or to the caster if eir skill > 25.";
daggerstorm(old)
Referenced by
none
Source
1"Ripped almost entirely from #328:Hawthorn(). Dodgable, exit-crossing spell attacks are good things."; 2{doll, tdoll, qual, skill} = args; 3(rpg = $local.rpg):secure(); 4{by, targ, mod, odb, storm} = {doll.character, tdoll.character, 0, rpg.object_db, this.(verb)}; 5loc = by.location; 6qual = (qual * 10) / tdoll.size; 7if (!(daggers = doll:read_misc_note("Blade_Barrier"))) 8 return rpg:playertell(by, "You don't have a sphere of daggers from which to unleash a daggerstorm."); 9elseif (qual > 0) 10 if (loc != targ.location) 11 exits = loc:exits(); 12 what = where = {}; 13 for x in (exits) 14 while (`valid(x.succ_exit) ! ANY') 15 x = x.succ_exit; 16 endwhile 17 if (odb:is_missile_exit(x)) 18 d = x.dest.contents; 19 what = {@what, @d}; 20 where = {@where, @$list_utils:make(length(d), x)}; 21 endif 22 endfor 23 mod = (targ in what) ? where[targ in what].cover | 999; 24 endif 25 {pen, dam, part} = {storm.pen, storm.dam, {tdoll.body_areas}}; 26 this.sc_recovery_effect:remove(doll); 27 storm:deliver_payload(doll, targ, daggers, part[random($)], 0); 28 this:unbladebarrier(doll); 29 this.sc_recovery_effect:add(doll); 30else 31 return rpg:rpg_announce_all(loc, targ.name, " seems unaffected by the spell."); 32endif 33"Profane (#30788) - Tue Jan 9, 2001 - Added from prototype by Hydros (#106189).";
daggerstorm
Referenced by
none
Source
1"Ripped almost entirely from #328:Hawthorn(). Dodgable, exit-crossing spell attacks are good things."; 2{doll, tdoll, qual, skill} = args; 3(rpg = $local.rpg):secure(); 4{by, targ, mod, odb, storm} = {doll.character, tdoll.character, 0, rpg.object_db, this.(verb)}; 5loc = by.location; 6qual = (qual * 10) / tdoll.size; 7flag_fired = 0; 8if ((daggers = doll:read_misc_note("BB_Daggers")) == E_PROPNF) 9 return rpg:playertell(by, "You don't have a sphere of daggers from which to unleash a daggerstorm."); 10elseif (qual > 0) 11 if (loc != targ.location) 12 exits = loc:exits(); 13 what = where = {}; 14 for x in (exits) 15 while (`valid(x.succ_exit) ! ANY') 16 x = x.succ_exit; 17 endwhile 18 if (odb:is_missile_exit(x)) 19 d = x.dest.contents; 20 what = {@what, @d}; 21 where = {@where, @$list_utils:make(length(d), x)}; 22 endif 23 endfor 24 mod = (targ in what) ? where[targ in what].cover | 999; 25 endif 26 {pen, dam, part} = {storm.pen, storm.dam, {tdoll.body_areas}}; 27 this.sc_recovery_effect:remove(doll); 28 storm:deliver_payload(doll, targ, length(daggers), part[random($)], 0); 29 flag_fired = 1; 30else 31 return rpg:rpg_announce_all(loc, targ.name, " seems unaffected by the spell."); 32 flag_fired = 1; 33endif 34if (flag_fired) 35 this.bb_combat_effect:remove(doll); 36 doll:erase_misc_note("BB_Daggers"); 37 for x in (daggers) 38 rpg:s_i_n(); 39 x:moveto(rpg.cemetery); 40 endfor 41 if (i = $list_utils:iassoc("unbladebarrier", doll:get_att("schedule"), 2)) 42 doll:cancel(doll:get_att("schedule")[i]); 43 endif 44endif 45"Profane (#30788) - Tue Jan 9, 2001 - Added from prototype by Hydros (#106189)."; 46"Hydros (#106189) - Tue Apr 5, 2005 - Changed to handle daggers now being returnable to caster. More upgrades coming.";
barkskin_check_for_unacceptable_armour
Referenced by
- #328:barkskin line 6:
this:barkskin_check_for_unacceptable_armour
Source
1"Except certain armour from the not-allowed-to-be-worn-with-barkskin list. Keep track of the exceptions, in case we ever feel like telling a player what they're wearing that -is- appropriate."; 2doll = args[1]; 3rpg = $local.rpg; 4if ((wearing = doll.wearing) == {}) 5 return 0; 6else 7 excepted = {}; 8 amulets = rpg.object_db.obj_amulet; 9 allowed = {@this.allowed_barkskin_armour, @amulets}; 10 for x in (wearing) 11 if ($object_utils:isoneof(x, allowed)) 12 wearing = setremove(wearing, x); 13 excepted = setadd(excepted, x); 14 endif 15 endfor 16 if (length(wearing)) 17 return wearing; 18 else 19 return 0; 20 endif 21endif 22"Hydros (#106189) - Fri May 27, 2005 - Added, from a suggestion by Vorsyth (#121070).";
gen_zap(NOV2005old)
Referenced by
none
Source
1":gen_zap(OBJ caster-doll, OBJ target-doll, INT quality, OBJ skillobj, STR spell_name, FLAG dodgeable, [OBJ staff, [FLAG natural_attack]])"; 2"Original verb taken from #328:firebolt, and modded so 1 verb c'n handle *all* the spells that jus do damage."; 3"This verb'll handle ice-bolts, magic missiles, an jus 'bout anythin a GM c'n think of."; 4"The optional argument, staff, lets the GM use objs that aren't kids of the spell db (#328)"; 5{att, targ_doll, qual, skillobj, spell_name, dodgeable, ?staff = this, ?natural_attack = 0} = args; 6(rpg = $local.rpg):secure(); 7if (!rpg:is_alive(targ_doll)) 8 return; 9endif 10by = att.character; 11target = targ_doll.character; 12area = target.location; 13dodge = rpg.skills.dodge; 14magic = targ_doll.magic_theory; 15spell_msgs = spell_name + "_msgs"; 16spell_power = "power_" + spell_name; 17spell_pen = "pen_" + spell_name; 18spell_dodge = "dodge_" + spell_name; 19spell_special = "special_" + spell_name; 20stu = $string_utils; 21att:do_attack_notification(target, skillobj); 22is_player(target) || target:set_last_attacker(by); 23targ_doll.aggressor = setadd(targ_doll.aggressor, by); 24att.aggressor = setadd(att.aggressor, target); 25{resist_msg, deflect_msg, dodge_msg, blast_msg, @efx_messages} = this:get_messages(staff, by, target, spell_msgs); 26no_imp = (by == target) ? 1 | 0; 27if ((caller != this) && (typeof(effect = att:casting_effects(att, targ_doll, qual, skillobj)) != NUM)) 28 return effect; 29elseif ((!natural_attack) && (typeof(effect = targ_doll:magic_effects(att, targ_doll, qual, skillobj)) != NUM)) 30 return effect; 31elseif (is_player(target) && (!(target in connected_players()))) 32 by:tell("Hold your magic! By the edict of the Great Wizard, bystanders must not be molested!"); 33elseif ((!natural_attack) && ((qual = qual - effect) <= 0)) 34 rpg:say_action(resist_msg, target, dobj = by); 35elseif ((((!natural_attack) && (targ_doll != att)) && (magic > 0)) && (skillobj:resolve(target, -qual, no_imp) > 0)) 36 rpg:say_action(deflect_msg, target, dobj = by); 37elseif ((dodgeable && (targ_doll != att)) && (dodge:resolve(target, staff:(spell_dodge)(att, targ_doll, qual) - targ_doll.slowness, no_imp) > qual)) 38 rpg:say_action(dodge_msg, target, dobj = by); 39else 40 rpg:say_action(blast_msg, target, dobj = by); 41 power = staff:(spell_power)(qual, magic, targ_doll); 42 pen = staff:(spell_pen)(qual, magic); 43 zap_result = targ_doll:hit_result(power, pen, by, skillobj); 44 if (zap_result) 45 this:do_zap(zap_result, efx_messages, by, target, staff); 46 "Ok, new bit for spells doing funky special damage. Replaces the call to :fire_effect."; 47 `staff:(spell_special)(att, targ_doll, qual, zap_result) ! E_VERBNF'; 48 else 49 "Only happens in the case of bad perms or .end == 0"; 50 rpg:say_action(resist_msg, target, dobj = by); 51 endif 52endif 53"Profane 27-JUN-96 848EDT -- Added check for disconnected players."; 54"Mooshie (#106469) - Sun Feb 1, 1998 - Did some scattering and speeding up."; 55"Irin - Added hook for special effect if the spell goes through. Fire damage, etc. Also added dodge difficulty and possibility of a non-magickal attack (undeflectable && no magic resistance.)"; 56"Hannibal - Added casting_effects check for the casting doll."; 57"Hannibal 2/9/2000 - Added call to :set_last_attacker if the target is an RPG monster."; 58"THX (#105941) - Wed Aug 30, 2000 - Changed to two incidences of resist_msg and single incidences of deflect_msg,dodge_msg, and blast_msg to use rpg:say_action() This required changes to the messages in the spell_msgs properties as well (reversing %N and %D since the _target_ is performing the actions here)."; 59"THX (#105941) - Tue Mar 20, 2001 - Only call casting_effects here if the caller != this. Otherwise, focus:spell() has already called it.";
(NOV2005OLD)power_*
Referenced by
none
Source
1"Copied from Enhanced Generic Staff (#27735):power_* by StarDancer (#82267) Thu May 30 20:55:31 1996 PDT"; 2result = $no_one:eval(strsub(strsub(this.(verb), "qual", tostr(args[1])), "magic", tostr(args[2]))); 3return result[2];