a seed (#1500)

(an instance of generic thing made by Marcus)

     A seed, a pip a pit,
     incipient of what?
     "Plant me" says the seed,
     "Plant my need."

Go to location of this object, Marcus.



VERB SOURCE CODE:

grow:
this.growing = 1;
stage = this.aliases in this.alias_list;
for line in (this.grow_lines[stage])
    suspend(((2 * stage) + random(this.delay)) + random(this.delay));
    this.location:announce_all($string_utils:pronoun_sub(line));
endfor
(stage < 8) ? stage = stage + 1 | (stage = 1);
this.aliases = this.alias_list[stage];
this.name = this.aliases[1];
this.description = this.descriptions[stage];
if (this.name == "a fruit")
    this.planted = 0;
    if (player.location == this.location)
        player:tell("The fruit falls out of the tree, and into your hands.");
        this.location:announce("The golden fruit falls out of the tree into ", player.name, 
"'s hands.");
        this.key = 0;
        this:moveto(player);
    else
        this.location:announce_all("Out of the tree, the fruit falls to the ground.");
    endif
    suspend(3);
    this.location:announce_all("Where the tree stood before, stands nothing. Was 
it a tree, or only a dream of a tree?");
endif
this.growing = 0;
.


plant:
if (this.planted)
    player:tell(this:titlec(), " is already planted rather nicely.");
elseif (this.name == "a fruit")
    player:tell("You try to plant the fruit.");
    if (this.location == player)
        this:drop();
    endif
    if (this.location == player.location)
        player:tell("The fruit sits there, without seeming to take root very well.");
    endif
elseif (!$object_utils:isa(this.location, $room))
    player:tell("To plant the seed, first set it on the ground someplace.");
else
    player:tell("You dig a little hole and plant the seed.");
    this.location:announce(player.name, " finds a spot and plants a seed in the ground.");
    this.planted = 1;
    this.key = this.location;
    this:grow();
endif
.


water:
if (!this.planted)
    player:tell("You water ", this:title(), " without doing much more than getting 
it wet.");
else
    player:tell("You water the ", this.aliases[2], ".");
    this.location:announce(player:titlec(), " waters the ", this.aliases[2], ". Getting 
it nice and wet.");
    if (!this.growing)
        this:grow();
    endif
endif
.


eat:
if (this.name != "a fruit")
    player:tell("You nibble on the ", this.aliases[2], ". Mm, tasty. It doesn't seem 
to do much of anything though.");
elseif (this.location != player)
    player:tell("The fruit might be easier to eat if you picked it up.");
elseif (this.growing)
    player:tell("The fruit is delicious. Mmmmmm.");
else
    player:tell("You take a bite of the fruit. It's so good you take another.");
    this:grow();
endif
.



PROPERTY DATA:
      descriptions
      grow_lines
      delay
      planted
      growing
      alias_list