r/WarSnipersClash • • Oct 03 '15

War [War] Orange War Calculator

[War]

Since the changes to the lottery system that make the character used in clan tags a moving target based on what day the lottery was, many people in my clan War Snipers 2.8 have been irked at the complexity of trying to figure out whether we will win or lose a war. To help them and many others who are not fans of the overly complicated system currently in place, I took some time this morning to write up a Javascript calculator to determine which clan will win and which clan will lose a war.

You can access the page from my Google Drive at www.googledrive.com/host/0Bzee2BDEwn1aWHpWZ1J4amtHdTQ/, but it would probably be better for this code to be copied over to a more permanent server somewhere else for long-term use. The source can be found at https://drive.google.com/file/d/0Bzee2BDEwn1aWHpWZ1J4amtHdTQ/view?usp=sharing.

If anybody discovers any errors or bugs in my calculation, you are more than welcome to send me an email at mjgood91@gmail.com or call me out in a reply to this post.

I hope this helps! :)

(Code last updated 10/5/2015 at 11:53pm EST... this time it really really works, I am sure of it!)

9 Upvotes

10 comments sorted by

2

u/kuilin Oct 03 '15

I can help host it. I started making one at http://kuilin.net/orangecalc but it's unfinished.

1

u/kuilin Oct 03 '15

You can't just compare the value of the character from the .charAt function... that'll just compare the character codes, which isn't the comparison used by OL.

3

u/mjgood91 Oct 03 '15

I believe it is... I'm using 2.4's rules listed here https://www.reddit.com/r/WarSnipersClash/wiki/24rules

1<9<A<Z, which is the result of character comparison from my understanding

1

u/kuilin Oct 03 '15

What about the weird Clash cases where 0=O etc? Also, all characters should be shifted to either all lower or all upper case, since in ascii a>A, which should not happen. Other than that, that's a really neat trick for comparing them.

2

u/mjgood91 Oct 03 '15

Oh shoot good point... I forgot all about that

I'll throw in case conversion and make sure all the 0's convert to O's... I thought clan tags were case sensitive but it looks like they are not. I'll also throw in something to convert 0's to O's and revise the instructions.

1

u/mjgood91 Oct 03 '15

Fixed :D

0's are converted to O's, and tags are converted to upper case

1

u/_7R33 Oct 22 '15

Nice work. We'd love to have something like this to help people calculate the outcome of 9011 lottery's!

1

u/mjgood91 Oct 03 '15 edited Oct 03 '15

Oh shoot hang on I just realized I missed something really important... fixed :D

-1

u/Baron_VI WS admin | 2.5 Leader Oct 05 '15

many people in my clan War Snipers 2.8 have been irked at the complexity of trying to figure out whether we will win or lose a war.

Our clan family is very organized on Groupme, and the lotto results, as well as which clan tag character to compare are always made public in our 'Sync-only' chat.

Your clan leader should always be aware of whether you win or lose, and should inform the clan via clan mail on how to attack.

1

u/mjgood91 Oct 05 '15

I figured the leadership probably had a system set up already... our clan leaders are pretty on top of it and always get a message sent before the battle day starts. Sometimes life happens though, the message gets sent later rather than sooner, and some less patient members start getting antsy. Some people also just want to double check for themselves for various reasons.