根号三工作笔记
Chinodaisuki(讨论 | 贡献)2021年6月7日 (一) 20:15的版本
var maxhp = dwread_epd(EPD(0x65FD00)+9808/4 + unittype) / 0x100;
foreach(ptr, epd : EUDLoopUnit() )
{
if(
bread(ptr + 0x4C) == player &&
wread(ptr + 0x64) == unittype &&
dwread(ptr + 0x8) <= (maxhp - gainhp) * 0x100
){
dwwrite(ptr + 0x8, dwread(ptr + 0x8) + gainhp * 0x100);
}
else if(
bread(ptr + 0x4C) == player &&
wread(ptr + 0x64) == unittype &&
dwread(ptr + 0x8) > (maxhp - gainhp) * 0x100
)
{
dwwrite(ptr + 0x8, maxhp * 0x100);
}
}