“根号三工作笔记”的版本间的差异
跳到导航
跳到搜索
Chinodaisuki(讨论 | 贡献) 小 |
Chinodaisuki(讨论 | 贡献) 小 |
||
第1行: | 第1行: | ||
<pre lang="Java"> | <pre lang="Java" line="1"> | ||
var maxhp = dwread_epd(EPD(0x65FD00)+9808/4 + unittype) / 0x100; | var maxhp = dwread_epd(EPD(0x65FD00)+9808/4 + unittype) / 0x100; | ||
foreach(ptr, epd : EUDLoopUnit() ) | foreach(ptr, epd : EUDLoopUnit() ) |
2021年6月7日 (一) 20:14的版本
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);
}
}