Trying to Decipher Army Battle Damage [UPDATE 3-28-22]
- Pyriel
- Webmaster
- Posts: 1230
- Joined: Wed Aug 18, 2004 1:20 pm
Re: Trying to Decipher Army Battle Damage [UPDATE 3-28-22]
Fun, I guess. I figured he'd ask if he wanted someone to go disassemble it and find out it's just xy(rand() % (troops-(troops > 10000 ? 10000 : 1000))) or something without much need for experiment or investigation, but I see he did PM like 2 years ago and I forgot about it (sorry).
- wataru14
- Guide Writer
- Posts: 727
- Joined: Thu Aug 05, 2010 10:37 am
- Location: Las Vegas
Re: Trying to Decipher Army Battle Damage [UPDATE 3-28-22]
I have no way to check the code. Don't know how. But if someone could, just to get the actual range boundaries, that would be awesome.
- Pyriel
- Webmaster
- Posts: 1230
- Joined: Wed Aug 18, 2004 1:20 pm
Re: Trying to Decipher Army Battle Damage [UPDATE 3-28-22]
Took a quick look at it while waiting for lunch to be ready. The code is copy-pasted into every war module by the look of things. Hopefully, it's just a copy-paste and there aren't significant differences. The only one that's leapt out at me so far is that it looks like Teo 1 has half the routines stripped, which kind of makes sense, since you can't actually hurt his cavalry.
They hard-coded routines for your damage and troops as well as the enemy's, rather than generalizing, which I find a bit weird. And there are calls out to rand(), so that might explain the variability.
They hard-coded routines for your damage and troops as well as the enemy's, rather than generalizing, which I find a bit weird. And there are calls out to rand(), so that might explain the variability.
- wataru14
- Guide Writer
- Posts: 727
- Joined: Thu Aug 05, 2010 10:37 am
- Location: Las Vegas
Re: Trying to Decipher Army Battle Damage [UPDATE 3-28-22]
In some circumstances, the computer uses your unit's attack power instead of its own to calculate damage. That might be why it's not standardized. It happens in Bow vs. Charge. I think it happens with Teo, as well.
- wataru14
- Guide Writer
- Posts: 727
- Joined: Thu Aug 05, 2010 10:37 am
- Location: Las Vegas
Re: Trying to Decipher Army Battle Damage [UPDATE 3-28-22]
This post can be locked since the answer has been found.