/*
 * Copyright (c) 2021 Ross Cunniff
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
/*** OBJECTS ***/

class AardThing(Thing) { public var weight, rarea, pfound, pplace, pNoTake; }

AardThing pen(mrm2) {
    weight = 1
    ldesc = proc() {"There is a ball-point pen here.\n";}
    sdesc = proc() {"a ball-point pen";}
}

class PaperThing(AardThing) { public var readl, signed; }
PaperThing paper(mrm2) {
    weight = 1
    ldesc = proc() {
        if (paper.readl == 0)
            "There is a slip of paper here.\n";
        else
            "There is a release form here.\n";
    }
    sdesc = proc() {
        if (paper.readl == 0)
            "a slip of paper";
        else
            "a release form";
    }
    ...
}
Synonym release(paper);
Synonym form(paper);

AardThing spices(irm6) {
    weight = 3
    ldesc = proc() {"There is a bag of spices here.\n";}
    sdesc = proc() {"spices";}
    rarea = 1
    pfound = 5
    pplace = 9
    ...
}

class RupeesThing(AardThing) { public var wellbt = 0; }
RupeesThing rupees(irm7) {
    weight = 5
    ldesc = proc() {"There is a bag of rupees (Indian coins) here.\n";}
    sdesc = proc() {"rupees (coins)";}
    rarea = 1
    pfound = 5
    pplace = 15
    ...
}
Synonym coins(rupees);

AardThing coconut(irm3) {
    weight = 3
    ldesc = proc() {"There is a large coconut here.\n";}
    sdesc = proc() {"a coconut";}
    ...
}

class RopeThing(AardThing) {public var ropstf, rtied;}
RopeThing rope;
proc rldesc()
{
    if (rope.ropstf)
        "There is a long piece of rope here, magically rising up ",
        "in mid-air.\n";
    else
        "There is a coil of rope here.\n";
}
proc rsdesc() { "a rope"; }
RopeThing rope(mrm1) {
    weight = 3
    ldesc = rldesc
    sdesc = rsdesc
    ...
}

AardThing clarinet(irm2) {
    weight = 2
    ldesc = proc() {"There is a clarinet here.\n";}
    sdesc = proc() {"clarinet";}
    ...
}

FixedThing cobra(irm22) {
    ldesc = proc() {"There is a king cobra at the bottom of the pit.\n";}
    sdesc = proc() {"a cobra";}
    ...
}
Synonym snake(cobra);
Synonym elapid(cobra);

FixedThing river {...}

class StatueThing(FixedThing) { public var tlakst; }
StatueThing statue {...}

AardThing banana(irm3) {
    weight = 2
    ldesc = proc() {"There is a banana here.\n";}
    sdesc = proc() {"a banana";}
    ...
}

AardThing peel {
    weight = 1
    ldesc = proc() {"On the ground, there is a banana peel.\n";}
    sdesc = proc() {"a banana peel";}
}

FixedThing vishnu(irm11) {...}

FixedThing mara(irm10) {...}

FixedThing lakshmi(irm12) {...}

FixedThing crocodiles {...}
Synonym crocodile(crocodiles);
Synonym croc(crocodiles);
Synonym crocs(crocodiles);

class RhinoThing(FixedThing) { public var cutflg, earplg; }
RhinoThing rhino(irm13) {
    ldesc = proc() {
        if (rhino.cutflg)
            "There is a rhino sleeping here with his horn removed.\n";
        else
            "There is a rhinoceros sleeping in the corner.\n";
        if (rhino.earplg)
            "  There are two pieces of cotton stuck in his ears.\n";
    }
    sdesc = proc() {"a sleeping rhino";}
}
Synonym rhinoceros(rhino);

AardThing saw(irm2) {
    weight = 2
    ldesc = proc() {"There is a hacksaw on the ground.\n";}
    sdesc = proc() {"a hacksaw";}
}
Synonym hacksaw(saw);

AardThing horn(irm13) {
    weight = 2
    pNoTake = true
    ldesc = proc() {
        if (rhino.cutflg) "There is a rhinoceros horn here.\n";
    }
    sdesc = proc() {
        if (rhino.cutflg) "a rhino horn";
    }
    rarea = 1
    pfound = 14
    pplace = 7
    ...
}

class CottonThing(AardThing) { public var tookbt = 0; }
CottonThing cotton {
    weight = 1
    ldesc = proc() {"There is a large wad of cotton on the ground.\n";}
    sdesc = proc() {"a wad of cotton";}
    ...
}

FixedThing lattice(irm13) {...}

class MonkeyThing(FixedThing) { public var fedmky = 0; }
MonkeyThing monkey(irm20) {
    ldesc = proc() {"There is a sacred temple monkey here.\n";}
    sdesc = proc() {"a monkey";}
    ...
}

FixedThing tandoor(irm4) {...}
Synonym oven(tandoor);

AardThing comb(irm14) {
    weight = 1
    ldesc = proc() {"There is an expertly carved jade comb here.\n";}
    sdesc = proc() {"a jade comb";}
    rarea = 1
    pfound = 7
    pplace = 6
}

AardThing ruby(irm17) {
    weight = 2
    ldesc = proc() {"There is a crimson ruby here.\n";}
    sdesc = proc() {"a ruby";}
    rarea = 1
    pfound = 8
    pplace = 7
}

AardThing bowl(irm21) {
    weight = 3
    ldesc = proc() {"There is a crystal bowl here.\n";}
    sdesc = proc() {"a bowl";}
    rarea = 1
    pfound = 10
    pplace = 10
}

AardThing bracelet(irm23) {
    weight = 1
    ldesc = proc() {
        "There is a golden bracelet in the shape of a snake here.\n";
    }
    sdesc = proc() {"a bracelet";}
    rarea = 1
    pfound = 11
    pplace = 6
}

AardThing shovel(mrm1) {
    weight = 3
    ldesc = proc() {"There is a shovel here.\n";}
    sdesc = proc() {"a shovel";}
}

class Ears(FixedThing) {public const pOpened = true;}
Ears ears(irm13);

FixedThing pole(prm2) {...}

AardThing amber(prm3) {
    weight = 2
    ldesc = proc() {"There is a polished piece of amber here.\n";}
    sdesc = proc() {"a piece of amber";}
    rarea = 2
    pfound = 12
    pplace = 6
}

class LampClass(AardThing) { public var pLight = 0; }
LampClass lamp(mrm1) {
    weight = 3
    ldesc = proc() {"There is a carbide-flame lamp here.\n";}
    sdesc = proc() {"a lamp";}
    ...
}

FixedThing grate(mrm5) {...}

AardThing nugget {
    weight = 4
    ldesc = proc() {"There is a gold nugget lying on the ground.\n";}
    sdesc = proc() {"a gold nugget";}
    rarea = 2
    pfound = 13
    pplace = 7
    ...
}
Synonym gold(nugget);

AardThing axe(prm1) {
    weight = 1
    ldesc = proc() {"There is an stone-age axe here.\n";}
    sdesc = proc() {"an axe";}
    ...
}

class SpearThing(AardThing) { public var tooky, abrad; }
SpearThing spear(prm17) {
    weight = 2
    ldesc = proc() {
        if (spear.tooky)
            "There is a Neanderthal hunting spear here.\n";
        else
            "There is a Neanderthal hunting spear stuck in the ground.\n";
    }
    sdesc = proc() {"a spear";}
    ...
}

AardThing plant(prm2) {
    weight = 4
    ldesc = proc() {"There is a strange looking potted plant here.\n";}
    sdesc = proc() {"a plant";}
    ...
}

//Putty tat
class SmiloThing(FixedThing) { public var stond = 0; }
SmiloThing smilodon(prm6) {...}
Synonym smilo(smilodon);
Synonym sabre(smilodon);

class TrogThing(FixedThing) { public var killd = 0; }
TrogThing troglodyte(prm8) {...}
Synonym trog(troglodyte);

AardThing cheese(prm4) {
    weight = 1
    ldesc = proc() {
        "There's a piece of Swiss cheese (aged 1,000,000 years) here.\n";
    }
    sdesc = proc() {"a piece of cheese";}
    ...
}

AardThing towel(prm4) {
    weight = 2
    ldesc = proc() {"There is an old towel here.\n";}
    sdesc = proc() {"a towel";}
}

class MammothThing(FixedThing) { public var blokd = 0; }
MammothThing mammoth(prm14) {
    ldesc = proc() {
        "There is a large wooly mammoth blocking the path to the south.\n";
    }
    sdesc = proc() {"a mammoth";}
    ...
}
Synonym elephant(mammoth);
Synonym pachyderm(mammoth);

class FeetThing(FixedThing) { public var wiped = 0; }
FeetThing feet {...}

AardThing diamond(prm12) {
    weight = 1
    ldesc = proc() {"There is a small diamond here.\n";}
    sdesc = proc() {"a diamond";}
    rarea = 2
    pfound = 7
    pplace = 8
}

AardThing ivory(prm15) {
    weight = 2
    ldesc = proc() {"There is a piece of ivory here.\n";}
    sdesc = proc() {"a piece of ivory";}
    rarea = 2
    pfound = 9
    pplace = 8
}

class PendantThing(AardThing) { public var dugbt = 0; }
PendantThing pendant {
    weight = 2
    ldesc = proc() {"There is a ancient pendant here.\n";}
    sdesc = proc() {"a pendant";}
    rarea = 2
    pfound = 14
    pplace = 4
}

FixedThing cairn(prm18) {...}
Synonym skulls(cairn);

class BearThing(FixedThing) { public var hitbr = 0; }
BearThing bear(prm19) {
    ldesc = proc() {
        "There is a ferocious cave bear blocking your path to the north.\n";
    }
    sdesc = proc() {"a cave bear";}
    ...
}

AardThing necklace(prm20) {
    weight = 1
    ldesc = proc() {"There is a pearl necklace here.\n";}
    sdesc = proc() {"a necklace";}
    rarea = 2
    pfound = 13
    pplace = 6
}

FixedThing tyrannosaurus(prm22) {...}
Synonym dino(tyrannosaurus);

AardThing ring(prm23) {
    weight = 1
    ldesc = proc() {"There is a large diamond ring here.\n";}
    sdesc = proc() {"a ring";}
    rarea = 2
    pfound = 13
    pplace = 10
}

class HoleThing(FixedThing) { public const pOpened = true; }
HoleThing hole {...}

AardThing newspaper(mrm1) {
    weight = 1
    ldesc = proc() {"There is a copy of a newspaper here.\n";}
    sdesc = proc() {"a newspaper";}
    ...
}

FixedThing crack {...}
FixedThing shaft {...}