This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next 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 [2022/12/14 02:50] loggy change some nonsensical mins to maxes, otherwise these weights would be 0 for blade wind and it'd score zero! |
||
---|---|---|---|
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' | * If the spell' | ||
* 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 |