function weapon(type, level, ownerId) {
this.type = type;
this.level = level;
this.ownerId = ownerId;
this.abilities =[];
this.changeOwner = function(newOwner) {parent.ownerId = newOwner;};
switch(type) {
case 'rapier':
this.flavor = 'Poor, poor Pierre.';
this.class = 'lwep';
this.hands = 1;
this.mult = 3;
this.damage = function () {
return dieRoll(1, 8) + (parent.level * parent.mult);
};
break;
}
}