.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

BCT Commander- Save $6.00
World Supremacy- Save $10.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #17  
Old February 20th, 2011, 11:37 AM

iRFNA iRFNA is offline
Second Lieutenant
 
Join Date: Apr 2008
Posts: 533
Thanks: 2
Thanked 18 Times in 14 Posts
iRFNA is on a distinguished road
Default Re: Question about Bless bonuses...

The armor calc equation appears to be this, for what it's worth:

Code:
  v3 = sub_506D90(a1, 1); //get overall protection, still dunno head/body mechanics
  v4 = sub_506BF0(a1); //get natural protection
  v5 = (signed int)((unsigned __int64)(1717986919i64 * ((40 - v3) * v4 + 20)) >> 32) >> 4;
  v6 = (signed int)((unsigned __int64)(1717986919i64 * ((40 - v3) * v4 + 20)) >> 32) >> 4;
  result = 40;
  v2 = ((unsigned int)v6 >> 31) + v5 + v3;
  if ( v2 < 40 )
    result = v2;
  return result;
I guess there's a couple other possibilities, here they are:

Code:
  v3 = 2 * sub_506D90(a1, 2); //this and the following 2 lines appear to be calc for head/body/extra prot from bracerish stuff?
  v4 = sub_506D90(a1, 3) + v3;
  v5 = (v4 + sub_506D90(a1, 4)) / 4;
  v6 = sub_506BF0(a1); //get natural prot again
  v7 = (signed int)((unsigned __int64)(1717986919i64 * ((40 - v5) * v6 + 20)) >> 32) >> 4;
  v8 = (signed int)((unsigned __int64)(1717986919i64 * ((40 - v5) * v6 + 20)) >> 32) >> 4;
  result = 40;
  v2 = ((unsigned int)v8 >> 31) + v7 + v5;
  if ( v2 < 40 )
    result = v2;
  return result;
and this one, but it appears to mostly be dealing with a faulty unit index?

Code:
  v1 = 0;
  v8 = 0;
  if ( a1 < 0 )
  {
    result = 0;
  }
  else
  {
    sub_49DFA0(a1 >= 140000, "getprot: bad unr");
    sub_4478E0(a1);
    v2 = 1;
    do
    {
      if ( v2 != 1
        || (v3 = word_1189550[46 * a1], v3 >= 0)
        && !(dword_536228[50 * v3] & 0x10000000)
        && ((v4 = sub_4DFF00(a1, 182, 0), !v4) || BYTE1(v4) & 1 || v4 & 0x80 && !(dword_1189540[23 * a1] & 0x80000000)) )
      {
        v5 = sub_506D90(a1, v2);
        if ( v2 == 2 )
        {
          v1 += 2 * v5;
          v8 += v2;
        }
        else
        {
          v1 += v5;
          ++v8;
        }
      }
      ++v2;
    }
    while ( v2 <= 4 );
    v6 = ((40 - v1 / v8) * sub_506BF0(a1) + 20) / 40 + v1 / v8;
    if ( v6 < 40 )
      result = v6;
    else
      result = 40;
  }
  return result;
This isn't against the rules or anything, is it?

Last edited by iRFNA; February 20th, 2011 at 11:47 AM..
Reply With Quote
The Following User Says Thank You to iRFNA For This Useful Post:
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:17 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.