Thread:RottenBlock/@comment-46261745-20200829154721/@comment-46261745-20200830121039

Thanks for taking a look at this! I'm not able to follow along on everything, so I'll let FixSRWiki have a look at the add sctions he was interested in... but this seems to be confirming that it is the 合戦敵_行動選択 that is linking these things together, which is fortunately, where we've been focusing the most.

That's the main function I'm trying to mod to make a 'hard mode AI' of sorts, with smarter target selection. This tangent we got into on tagBattleTeki::select is more of an offshoot of that discussion because there was such weird and seemingly redundant code in tagBattleTeki::select  that is doing things we didn't quite understand.

I've mostly just been trying to figure out the reason why the tagBattleTeki::select method calls random1, since it effectively seems to do the same thing as anTargetNo[乱数(cnt) - 1]; in the select method itself, just less efficiently. So I've been hoping to just remove it, and the cnt > 0 and 70% checks, and just do the anTargetNo[乱数(cnt) - 1]; in all cases.

Incidentally, it was in that Random1 function that I thought a cnt==0 would crash the game, because it would never break the loop, but good to know the same might happen in the anTargetNo[乱数(cnt) - 1]; code, and that it's most likely just a debugging relic.

Would be great if you could confirm that the random1 function isn't doing something useful though - I know it's also being called by getTargetNo, so I wouldn't delete it entirely, just from tagBattleTeki::select...