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
user:loggy:castingai [2021/07/17 02:18]
loggy
user:loggy:castingai [2023/02/24 19:01] (current)
loggy fairly important note those self buffing resists
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 25: Line 28:
   * 4, cause fear type 1 [1]   * 4, cause fear type 1 [1]
   * 7, poison damage [1]   * 7, poison damage [1]
-  * 8, remove fatigue? [0]+  * 8, remove fatigue? [-1]
   * 9, undocumented   * 9, undocumented
-  * 10, bless/buff type 1 [0]+  * 10, bless/buff type 1 [-1]
   * 11, cause affliction [1]   * 11, cause affliction [1]
-  * 13, heal [0+  * 13, heal [-1
-  * 23, buff type 2 [0]+  * 23, buff type 2 [-1]
   * 24, damage x3 vs demon/undead [1]   * 24, damage x3 vs demon/undead [1]
   * 28, enslave [1]   * 28, enslave [1]
Line 138: Line 141:
         * If the spell's AoE is 11+ OR (number of effects is 16+ AND the distance from the caster is 5 or less):         * If the spell's AoE is 11+ OR (number of effects is 16+ AND the distance from the caster is 5 or less):
           * square spread = 2           * square spread = 2
-          * accurate square weight = (min(1, aoe) * number of effects * 200)/26 +          * accurate square weight = (max(1, aoe) * number of effects * 200)/26 
-          * inaccurate square weight = (min(1, aoe) * number of effects * 100)/26 +          * inaccurate square weight = (max(1, aoe) * number of effects * 100)/26 
-        * If the spell's AoE is 0 or 1, OR the spell's number of effects is 1:+        * 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
           * accurate square weight = 100           * accurate square weight = 100
           * inaccurate square weight = 0           * inaccurate square weight = 0
-        * If the distance being aimed is less than (final prec/6):+        * If the distance being aimed is less than (final prec/2):
           * square spread = 1           * square spread = 1
           * accurate square weight = 36           * accurate square weight = 36
Line 161: Line 164:
         * If the square struck was the originally picked square at the centre of the square spread (and not the extra ones around it), add (this square's score * accurate square weight) to the spell score at this location. Otherwise, add (this square's score * inaccurate square weight) to the spell score.         * If the square struck was the originally picked square at the centre of the square spread (and not the extra ones around it), add (this square's score * accurate square weight) to the spell score at this location. Otherwise, add (this square's score * inaccurate square weight) to the spell score.
       * If the total score from all the squares is greater than 0:       * If the total score from all the squares is greater than 0:
-        * score = max(1, -5 + closed d10 + (score / 100)) +        * score = max(1, -5 + closed d10 + (score / 100)) [This divides the weighting multiplied scores from the above by 100 regardless of which spread/weightings were selected] 
-        * If the spell is being aimed less than 10 squares from the caster, some enemies were considered by the spell, and the spell would affect the enemies:+        * If the spell is being aimed less than 10 squares from the caster, and the spell is an offensive effect number (effects that returned 1 on the list somewhere above)
           * score = max(1, (score * 10)/max(2, distance from caster))           * score = max(1, (score * 10)/max(2, distance from caster))
         * Otherwise:         * Otherwise:
Line 203: Line 206:
   * If combat round 2+, this is always 1.   * If combat round 2+, this is always 1.
   * In assassination, this is 2 - round   * In assassination, this is 2 - round
-  * In other cases, this is (2 - round)+  * In other cases, this is (2 - round)*2
  
 Self buff bias is 2 if the caster is the spell's target AND it is before round 2, otherwise it is 1 Self buff bias is 2 if the caster is the spell's target AND it is before round 2, otherwise it is 1
Line 277: Line 280:
   * Otherwise, add (1 - victim's prot)   * Otherwise, add (1 - victim's prot)
  
-If the current damage value is greater than (victim'max hp + 5), set it to that value [shouldn't this be current hp instead?]+If the current damage value is greater than (victim chassis max hp + 5), set it to that value [shouldn't this be current hp instead?]
  
 If the spell offers either (or both) an easy or hard MR check: If the spell offers either (or both) an easy or hard MR check:
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?]
Line 576: Line 580:
       * If the spell confers desiccation, score = victim current HP * - friendly bias * 2       * If the spell confers desiccation, score = victim current HP * - friendly bias * 2
       * If the spell confers anything else, score = 1       * If the spell confers anything else, score = 1
-    * If the victim has the effect already at some magnitude:+    * If the victim has the effect already at some magnitude **[NOTE: this checks TOTAL magnitude already, not what is in slots, which means that a unit that has 10 FR will refuse to put +10FR into their slots with these spells, despite the fact units will happily use the +5 buff until 20+]**:
       * If the spell is trying to add less magnitude than the effect has already, score = 0       * If the spell is trying to add less magnitude than the effect has already, score = 0
       * If the spell confers damage reversal, score = victim current HP * friendly bias * 10       * If the spell confers damage reversal, score = victim current HP * friendly bias * 10
user/loggy/castingai.1626488332.txt.gz · Last modified: 2021/07/17 02:18 by loggy