entomb / dragonchan

A prototype script to transform any /b/ thread into a dragon slaying match.
24 stars 17 forks source link

Randomize Gear Not Really Random #26

Closed tselaty closed 11 years ago

tselaty commented 11 years ago

Some classes like the Paladin or the DK has fixed chances, and as such, their possibilities by using the first or last character in the poster ID makes the options limited. Paladin's should use the last character of a string, and the DK the second to last. Warlock's should use the last character, etc.

I'll work on fixing that to add some more visual variety.

entomb commented 11 years ago

I've added you as collaborator so you can manage tickets like a boss.

welcome aboard!

tselaty commented 11 years ago

Thank ye` kindly.

Tim Selaty Jr. TLS Web Solutions

On Saturday, April 27, 2013 at 12:22 PM, Jonathan Tavares wrote:

I've added you as collaborator so you can manage tickets like a boss. welcome aboard!

— Reply to this email directly or view it on GitHub (https://github.com/entomb/dragonchan/issues/26#issuecomment-17119784).

entomb commented 11 years ago

Sugestion:

Get 16 of each (if not enough duplicate some of them) weapon and armor MD5($post->id)

take first character from the md5 hash. should be an hex, so 0 1 2 3 4 5 6 7 8 9 A B C D E F, it should randomly match one of the 16 images.

use second character for armor.

tselaty commented 11 years ago

+1

tselaty commented 11 years ago

I've resolved this by just using the second character of a class rather than the first. In some cases we don't have 16 images for the sprites, and others we have 64 available (visually appropriate). The offset works as a better solution for now than the MD5 hashing, as we have more options where viable.

entomb commented 11 years ago

works for me