MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: Equipment Fit
[Hans-Henrik Staerfeldt:]
> B) The fit is -30 for 30 days, until BOS->fit is 0, and
> thus BOS->owner is set to 'Ackbar'. That assumes
> that the "BOS->fit += 1" in reality meant "BOS->fit -= 1" :-)
> .. decrasing the fit from 30 to 0 over a month.
>
>In any event, you'd need some _more parameters_ to implement this
>nice idea the way it was originally described. That was what i was
>commenting. BOS->fit and BOS->owner isn't enough.
Allow me to jump in with some pseudocode:
initialization:
BOS->fit = 0; BOS->owner = NULL;
while wearing:
if (BOS->owner == NULL) {
BOS->owner = currentWearer;
}
if (BOS->owner == currentWearer) {
BOS->fit += 1;
} else {
BOS->fit -= 1;
if (BOS->fit == 0) {
BOS->owner = NULL;
}
}
to get the "fit" value:
if (BOS->owner == currentWearer) {
return BOS->fit;
} else {
return - BOS->fit;
}
When Ackbar starts wearing the boots, he is not set as the owner of them.
"fit"-ness values can be negative, indicating a very poor fit. This
is what I deduced that Holly was suggesting.
--
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA
- Thread context:
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, (continued)
- [MUD-Dev] (fwd) CODE RELEASE: [server] SlashMUD (MacOS mud server),
J C Lawrence claw#greek,kanga.nu, Sun 06 Sep 1998, 22:04 GMT
- [MUD-Dev] Re: Equipment Fit,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sun 06 Sep 1998, 16:28 GMT
- [MUD-Dev] npc memory and reactions,
James Wilson jwilson#rochester,rr.com, Sat 05 Sep 1998, 14:02 GMT
[ Other Periods
| Other mailing lists
| Search
]