Scroll of Magic Missile #156
Aliases: Scroll of Magic Missile, magicmissilescroll
2 verbs · 19 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
title | this none this | rxd | #156 | 1 |
ca*st | this on top of/on/onto/upon any | rxd | #156 | 72 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
drop_failed_msg | #5 | rc | #2 | <clear> |
drop_succeeded_msg | #5 | rc | #2 | <clear> |
odrop_failed_msg | #5 | rc | #2 | <clear> |
odrop_succeeded_msg | #5 | rc | #2 | <clear> |
otake_succeeded_msg | #5 | rc | #2 | <clear> |
otake_failed_msg | #5 | rc | #2 | <clear> |
take_succeeded_msg | #5 | rc | #2 | <clear> |
take_failed_msg | #5 | rc | #2 | <clear> |
value_base | #102 | r | #2 | 75.0 |
damage_base | #102 | r | #2 | <clear> |
x_loc | #102 | r | #36 | <clear> |
y_loc | #102 | r | #36 | <clear> |
ansi_title | #102 | r | #36 | <clear> |
obvious | #102 | r | #36 | <clear> |
build_help | #102 | rc | #2 | <clear> |
key | #1 | c | #2 | 0 |
aliases | #1 | rc | #2 | {"Scroll of Magic Missile", "magicmissilescroll"} |
description | #1 | rc | #2 | "[green]You see a paper scroll with magical writing on it.[normal] [Spell: Magic Missile]" |
object_size | #1 | r | #36 | {0, 0} |
Ancestry
Ancestors (nearest first): #5 generic thing → #102 subthing → #1 Root Class
Children: none
Call graph
Source
title
Referenced by
- #156:ca*st line 2:
this:title - #156:ca*st line 69:
this:title
Source
1return tostr("[yellow]", this.name, "[normal]");
ca*st
Referenced by
none
Source
1if ((this in player.contents) && (player.stats_current[2][3] >= 14.0)) 2player:tell("You prepare to cast ", this:title(), "[normal]..."); 3elseif (player.stats_current[2][3] < 14.0) 4player:tell("You do not have a high enough INT ability! This spell requires at least 14.0."); 5return; 6else 7player:tell("You are not carrying that."); 8return; 9endif 10target = $string_utils:match_object(iobjstr, player.location); 11if (!valid(target)) 12player:tell("The target is invalid."); 13return; 14endif 15if (((iobjstr == "me") || (iobjstr == "self")) || (iobjstr == "myself")) 16player:tell("You cannot cast this spell on yourself!"); 17return; 18endif 19if ((!player.pkill) && (target in players())) 20return player:tell("You have PKILL set to off and cannot fight other players."); 21endif 22if (player.pkill && (!target.pkill)) 23return player:tell(target:title(), " is a non-PKILL player."); 24endif 25if ($object_utils:has_property(target, "magic_immunity")) 26if (target.magic_immunity) 27player:tell(target:title(), " is immune to magic!"); 28return; 29endif 30endif 31if (((target in player.location.contents) && $object_utils:has_property(target, "alive")) && target.alive) 32player:tell("You cast [yellow]Magic Missile[normal] on ", target:title(), "!"); 33player.location:announce(player:title(), " casts [yellow]Magic Missile[normal] on ", target:title(), "!"); 34target.stats_current[2][4] = target.stats_current[2][4] - 50.0; 35player:tell("The [yellow]Magic Missile[normal] inflicts [red]50[normal] damage on ", target:title(), "!"); 36player.location:announce_all(target:title(), " takes severe damage from the [yellow]Magic Missile[normal]!"); 37if (target in players()) 38target:tell("You take [red]50[normal] damage from ", player:title(), "'s [yellow]Magic Missile[normal]!"); 39endif 40endif 41if (target.stats_current[2][4] < 0.0) 42player:tell("You have defeated ", target:title(), "!"); 43player.experience = player.experience + toobj(target).exp; 44player:tell("You gain [cyan]", tostr(target.exp), "[normal] experience points!"); 45newlevel = player.level + 1; 46if ((player.experience >= ($server_options.level_info[newlevel][2] + 1)) && (newlevel < $server_options.max_player_level)) 47player.level = player.level + 1; 48player:tell(""); 49player:tell("[bold][purple]YOU HAVE REACHED [cyan]LEVEL ", tostr(newlevel), "[purple]![normal]"); 50player.adv_points = player.adv_points + $server_options.level_info[player.level][3]; 51player:tell("[purple]You have received ", $server_options.level_info[player.level][3], " Advancement Points!"); 52player.stats_current == player.stats; 53player:tell(""); 54endif 55player:tell("You collect [bold][yellow]", target.money[1][2], "[normal] Gold!"); 56player.money = {{"gold", player.money[1][2] + target.money[1][2]}}; 57dropstr = ""; 58if (target.contents == {}) 59drop = "nothing"; 60else 61drop = $string_utils:title_list(target.contents); 62for i in (target.contents) 63move(i, target.location); 64endfor 65endif 66player:tell(target:title(), " drops ", drop, "."); 67player.killcount = player.killcount + 1; 68if (!this.f) 69player:tell("The ", this:title(), " vaporizes in your hand!"); 70$recycler:_recycle(this); 71endif 72endif