… | |
… | |
307 | } |
307 | } |
308 | /* we will also have an extra 0-5% variation between shops of the same type |
308 | /* we will also have an extra 0-5% variation between shops of the same type |
309 | * for valuable items (below a value of 50 this effect wouldn't be very |
309 | * for valuable items (below a value of 50 this effect wouldn't be very |
310 | * pointful, and could give fun with rounding. |
310 | * pointful, and could give fun with rounding. |
311 | */ |
311 | */ |
312 | if (who->map->path != NULL && val > 50) |
312 | if (val > 50) |
313 | val = (val + 0.05 * (sint64) val * cos (tmp->count + strlen (who->map->path))); |
313 | val += float (val) * .05f * cosf ((tmp->uuid.seq & 0xffff) * float (M_PI * 2. / 0x10000)); |
314 | } |
314 | } |
|
|
315 | |
315 | return (sint64) val; |
316 | return (sint64) val; |
316 | } |
317 | } |
317 | |
318 | |
318 | /* Find the coin type that is worth more the 'c'. Starts at the |
319 | /* Find the coin type that is worth more the 'c'. Starts at the |
319 | * cointype placement. |
320 | * cointype placement. |