57 lines
1.5 KiB
Text
57 lines
1.5 KiB
Text
function energy_use() /* entry=329 class_id=0x0582 slot=0x01 */
|
|
{
|
|
var
|
|
referent, /* [BP+00h] type=0x69 */
|
|
maxLimit, /* [BP-02h] type=0x69 */
|
|
fule, /* [BP-04h] type=0x69 */
|
|
item; /* [BP-06h] type=0x24 */
|
|
|
|
set_info(0x0207, *(arg_06));
|
|
process_exclude();
|
|
set_info(0x00F0, 0);
|
|
/* global_address global_id=0x3C */
|
|
if (MainActor.getMaxEnergy() == 0x09C4) {
|
|
fule = 0x03E8;
|
|
}
|
|
else {
|
|
/* global_address global_id=0x3C */
|
|
if (MainActor.getMaxEnergy() == 0x1388) {
|
|
fule = 0x07D0;
|
|
}
|
|
else {
|
|
/* global_address global_id=0x3C */
|
|
if (MainActor.getMaxEnergy() == 0x2710) {
|
|
fule = 0x0BB8;
|
|
}
|
|
else {
|
|
/* global_address global_id=0x3C */
|
|
}
|
|
}
|
|
}
|
|
/* global_address global_id=0x3C */
|
|
/* global_address global_id=0x3C */
|
|
if (!MainActor.getMaxEnergy(Actor.getMana())) {
|
|
spawn FREE.slot_21(pid, 0x00B0, 0x00000000);
|
|
suspend;
|
|
return;
|
|
}
|
|
else {
|
|
/* global_address global_id=0x3C */
|
|
/* global_address global_id=0x3C */
|
|
if (!MainActor.getMaxEnergy((Actor.getMana() + fule))) {
|
|
/* global_address global_id=0x3C */
|
|
/* global_address global_id=0x3C */
|
|
spawn FREE.slot_21(pid, 0x010D, 0x00000000);
|
|
suspend;
|
|
}
|
|
else {
|
|
/* global_address global_id=0x3C */
|
|
/* global_address global_id=0x3C */
|
|
spawn FREE.slot_21(pid, 0x010D, 0x00000000);
|
|
suspend;
|
|
}
|
|
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|