lantern_fuel.c
skylib_mudos_v1/mudlib/std/shadows/magic/lantern_fuel.c · 1.6 KB
From the archive skylib_mudos_v1.tar.gz
Download the archive « Back to the archive contents
/*
* Shadow for the effect that makes lanterns burn forever.
* Mustn't be added to anything part from lanterns.
* Author: Shiannar.
*/
inherit "/std/effect_shadow";
string extra_look() {
mixed args;
string return_str;
args = arg();
if(!intp(args)) {
return "It is burning with a very strange coloured light "
"indeed, and you should please contact a creator!\n";
}
else if(player->query_lit()) {
return_str = "It is burning with a brilliant ";
switch(player->expected_tt(
player->effects_matching("magic.attached.infinite.lantern"))) {
case 0..50: {
return_str += "yellow light";
break;
}
case 51..100: {
return_str += "orange light";
break;
}
case 101..150: {
return_str += "red light";
break;
}
case 151..300: {
return_str += "green light";
break;
}
case 301..600: {
return_str += "cyan light";
break;
}
case 601..900: {
return_str += "blue light";
break;
}
case 901..1400: {
return_str += "indigo light";
break;
}
default: return_str += "violet light";
}
return_str += ".\n";
return return_str;
}
else if(player->query_fuel()) {
return "It is currently unlit, though there is fuel sloshing "
"around the bottom.\n";
}
else {
return "It is currently unlit, and appears to be empty.\n";
}
}
// Prevent fuel being eaten up.
void consume_fuel() {
return;
}