User Tools

Site Tools


user:loggy:castingai

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
user:loggy:castingai [2022/02/25 15:29]
loggy 557's casting AI change eliminated the cached offensive flag bug
user:loggy:castingai [2023/02/04 02:24]
loggy fix pen/mr banding
Line 6: Line 6:
  
 The battlefield location array seems to be stored with offsets of %%((coord2 * 200) + coord 1) * 0x20%% The battlefield location array seems to be stored with offsets of %%((coord2 * 200) + coord 1) * 0x20%%
 +Or is it?
 +
 +When looking for specific units in squares, it's instead %%(index, 0-7 inclusive + ((coord2 * 200) + coord1) * 8)%%
  
  
Line 142: Line 145:
         * If the spell's AoE is 0 or 1, OR the spell's number of effects is 1: [This means that fists of iron will always fall into this category, and should always account for friendly fire]         * If the spell's AoE is 0 or 1, OR the spell's number of effects is 1: [This means that fists of iron will always fall into this category, and should always account for friendly fire]
           * square spread = 1           * square spread = 1
-          * accurate square weight = min(1, aoe) * number of effects * 20 +          * accurate square weight = max(1, aoe) * number of effects * 20 
-          * inaccurate square weight = min(1, aoe) * number of effects * 10+          * inaccurate square weight = max(1, aoe) * number of effects * 10
         * If the final precision is 90+ OR the distance being aimed at is less than (final prec/3):         * If the final precision is 90+ OR the distance being aimed at is less than (final prec/3):
           * square spread = 0           * square spread = 0
Line 283: Line 286:
   * If the spell offers an easy mr check, consider victim's mr as 4 higher.   * If the spell offers an easy mr check, consider victim's mr as 4 higher.
   * If the spell does not offer a normal MR check, and (user's pen bonus + 8) <= (victim's MR + 4), multiply damage by 2/3. [shouldn't this be banded like regular MR? This means that easy MR soul slay will be preferred to normal soul slay vs high MR targets...]   * If the spell does not offer a normal MR check, and (user's pen bonus + 8) <= (victim's MR + 4), multiply damage by 2/3. [shouldn't this be banded like regular MR? This means that easy MR soul slay will be preferred to normal soul slay vs high MR targets...]
-  * If the spell offers a normal MR check: +  * If the spell offers a normal MR check, do the first one that applies
-    * if (mr > pen bonus + 8), do nothing to damage +    * if (mr >pen bonus + 23), divide damage by 24 
-    * if (mr pen bonus + 11), multiply damage by 2/3 +    * if (mr >= pen bonus + 20), divide damage by 12 
-    * if (mr pen bonus + 14), divide damage by 2 +    * if (mr >= pen bonus + 17), divide damage by 6 
-    * if (mr pen bonus + 17), divide damage by 6 +    * if (mr >= pen bonus + 14), divide damage by 3 
-    * if (mr pen bonus + 20), divide damage by 12 +    * if (mr >= pen bonus + 11), divide damage by 2 
-    * if (mr pen bonus + 23), divide damage by 24+    * if (mr >= pen bonus + 8), multiply damage by 2/3 
 +    * Otherwise, do nothing to damage
  
 If MR check for half damage, multiply damage by 2/3 [shouldn't this be banded?] If MR check for half damage, multiply damage by 2/3 [shouldn't this be banded?]
user/loggy/castingai.txt · Last modified: 2023/02/24 19:01 by loggy