mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
create_target_list (#983)
* matched create_target_list * target flags * fix
This commit is contained in:
parent
2553df9320
commit
61f96a4470
@ -2176,11 +2176,36 @@ enum ItemTypeFlags {
|
||||
ITEM_TYPE_FLAG_ENTITY_FULLSIZE = 0x1000,
|
||||
};
|
||||
|
||||
enum ItemTargetFlags {
|
||||
ITEM_TARGET_FLAG_ENEMY = 0x0001,
|
||||
ITEM_TARGET_FLAG_2 = 0x0002,
|
||||
ITEM_TARGET_FLAG_PLAYER = 0x0008,
|
||||
ITEM_TARGET_FLAG_8000 = 0x8000
|
||||
enum TargetFlags {
|
||||
TARGET_FLAG_ENEMY = 0x00000001,
|
||||
TARGET_FLAG_2 = 0x00000002,
|
||||
TARGET_FLAG_4 = 0x00000004,
|
||||
TARGET_FLAG_PLAYER = 0x00000008,
|
||||
TARGET_FLAG_10 = 0x00000010,
|
||||
TARGET_FLAG_20 = 0x00000020,
|
||||
TARGET_FLAG_40 = 0x00000040,
|
||||
TARGET_FLAG_80 = 0x00000080,
|
||||
TARGET_FLAG_100 = 0x00000100,
|
||||
TARGET_FLAG_400 = 0x00000400,
|
||||
TARGET_FLAG_800 = 0x00000800,
|
||||
TARGET_FLAG_1000 = 0x00001000,
|
||||
TARGET_FLAG_2000 = 0x00002000,
|
||||
TARGET_FLAG_4000 = 0x00004000,
|
||||
TARGET_FLAG_8000 = 0x00008000,
|
||||
TARGET_FLAG_10000 = 0x00010000,
|
||||
TARGET_FLAG_20000 = 0x00020000,
|
||||
TARGET_FLAG_40000 = 0x00040000,
|
||||
TARGET_FLAG_100000 = 0x00100000,
|
||||
TARGET_FLAG_200000 = 0x00200000,
|
||||
TARGET_FLAG_400000 = 0x00400000,
|
||||
TARGET_FLAG_800000 = 0x00800000,
|
||||
TARGET_FLAG_80000000 = 0x80000000,
|
||||
};
|
||||
|
||||
enum ActorPartTargetFlags {
|
||||
ACTOR_PART_TARGET_FLAG_1 = 0x01,
|
||||
ACTOR_PART_TARGET_FLAG_2 = 0x02,
|
||||
ACTOR_PART_TARGET_FLAG_4 = 0x04,
|
||||
};
|
||||
|
||||
enum PlayerSprites {
|
||||
@ -5597,41 +5622,6 @@ enum BtlCameraPreset {
|
||||
BTL_CAM_PRESET_73,
|
||||
};
|
||||
|
||||
enum MoveDataFlags {
|
||||
MOVE_DATA_FLAG_SINGLE_TARGET = 0x00000001,
|
||||
MOVE_DATA_FLAG_2 = 0x00000002,
|
||||
MOVE_DATA_FLAG_4 = 0x00000004,
|
||||
MOVE_DATA_FLAG_TARGET_PLAYER = 0x00000008,
|
||||
MOVE_DATA_FLAG_10 = 0x00000010,
|
||||
MOVE_DATA_FLAG_20 = 0x00000020,
|
||||
MOVE_DATA_FLAG_40 = 0x00000040,
|
||||
MOVE_DATA_FLAG_80 = 0x00000080,
|
||||
MOVE_DATA_FLAG_100 = 0x00000100,
|
||||
MOVE_DATA_FLAG_200 = 0x00000200,
|
||||
MOVE_DATA_FLAG_400 = 0x00000400,
|
||||
MOVE_DATA_FLAG_800 = 0x00000800,
|
||||
MOVE_DATA_FLAG_1000 = 0x00001000,
|
||||
MOVE_DATA_FLAG_2000 = 0x00002000,
|
||||
MOVE_DATA_FLAG_4000 = 0x00004000,
|
||||
MOVE_DATA_FLAG_8000 = 0x00008000,
|
||||
MOVE_DATA_FLAG_10000 = 0x00010000,
|
||||
MOVE_DATA_FLAG_20000 = 0x00020000,
|
||||
MOVE_DATA_FLAG_40000 = 0x00040000,
|
||||
MOVE_DATA_FLAG_80000 = 0x00080000,
|
||||
MOVE_DATA_FLAG_100000 = 0x00100000,
|
||||
MOVE_DATA_FLAG_200000 = 0x00200000,
|
||||
MOVE_DATA_FLAG_400000 = 0x00400000,
|
||||
MOVE_DATA_FLAG_800000 = 0x00800000,
|
||||
MOVE_DATA_FLAG_1000000 = 0x01000000,
|
||||
MOVE_DATA_FLAG_2000000 = 0x02000000,
|
||||
MOVE_DATA_FLAG_4000000 = 0x04000000,
|
||||
MOVE_DATA_FLAG_8000000 = 0x08000000,
|
||||
MOVE_DATA_FLAG_10000000 = 0x10000000,
|
||||
MOVE_DATA_FLAG_20000000 = 0x20000000,
|
||||
MOVE_DATA_FLAG_40000000 = 0x40000000,
|
||||
MOVE_DATA_FLAG_80000000 = 0x80000000,
|
||||
};
|
||||
|
||||
enum MoveActionTips {
|
||||
MOVE_ACTION_TIP_NONE = -1,
|
||||
MOVE_ACTION_TIP_0 = 0,
|
||||
|
@ -180,7 +180,7 @@ HitResult calc_item_damage_enemy(void) {
|
||||
|
||||
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
|
||||
&& !partImmuneToElement
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_FLAG_4)
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
|
||||
) {
|
||||
target->currentHP -= attackDamage;
|
||||
if (target->currentHP <= 0) {
|
||||
@ -199,7 +199,7 @@ HitResult calc_item_damage_enemy(void) {
|
||||
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||
return HIT_RESULT_NO_DAMAGE;
|
||||
}
|
||||
|
||||
|
||||
if (battleStatus->currentAttackElement & DAMAGE_TYPE_DEATH) {
|
||||
battleStatus->lastAttackDamage = 0;
|
||||
dispatchEvent = EVENT_DEATH;
|
||||
@ -443,7 +443,7 @@ HitResult calc_item_damage_enemy(void) {
|
||||
} else {
|
||||
func_802664DC(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
|
||||
}
|
||||
if (!(targetPart->targetFlags & 4)) {
|
||||
if (!(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)) {
|
||||
func_802666E4(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
|
||||
}
|
||||
}
|
||||
|
536
src/190B20.c
536
src/190B20.c
@ -57,72 +57,66 @@ extern PartnerDMAData bPartnerDmaTable[];
|
||||
|
||||
s32 func_80265CE8(AnimID*, s32);
|
||||
|
||||
// WIP work from Unnunu + a permuter do-while I added
|
||||
#ifdef NON_MATCHING
|
||||
// TOOD remove gotos
|
||||
void create_target_list(Actor* actor, s32 arg1) {
|
||||
s32 numTargets = 0;
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
SelectableTarget* targetDataList = actor->targetData;
|
||||
Actor* playerActor = battleStatus->playerActor;
|
||||
Actor* partnerActor = battleStatus->partnerActor;
|
||||
s32 s5 = 0;
|
||||
SelectableTarget* targetData = actor->targetData;
|
||||
SelectableTarget* s0;
|
||||
SelectableTarget* target;
|
||||
SelectableTarget* targetData;
|
||||
SelectableTarget* otherTarget;
|
||||
Actor* targetActor;
|
||||
ActorPart* targetPart;
|
||||
s8* targetIndexList;
|
||||
s32 numParts;
|
||||
s32 i, j;
|
||||
f32 f6, f8, f10;
|
||||
f32 targetX, targetY, targetZ;
|
||||
f32 f2, f12, f14;
|
||||
u8 sp10;
|
||||
f32 sp14;
|
||||
f32 f61;
|
||||
u8 overlayType;
|
||||
f32 overlayZoom;
|
||||
s32 sp18 = FALSE;
|
||||
s32 sp1C;
|
||||
s32 fp;
|
||||
s32 a02;
|
||||
ActorPartBlueprint* partBlueprint;
|
||||
s32 index1;
|
||||
s32 index2;
|
||||
s32 a22;
|
||||
s32 col;
|
||||
s32 row;
|
||||
|
||||
if (battleStatus->currentTargetListFlags & 0x80000000) {
|
||||
s32 skip;
|
||||
|
||||
if (battleStatus->currentTargetListFlags & TARGET_FLAG_80000000) {
|
||||
actor->targetListLength = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (battleStatus->currentTargetListFlags & 0x8) {
|
||||
targetData->actorID = ACTOR_PLAYER;
|
||||
targetData->partID = 1;
|
||||
if (battleStatus->currentTargetListFlags & TARGET_FLAG_PLAYER) {
|
||||
targetDataList->actorID = ACTOR_PLAYER;
|
||||
targetDataList->partID = 1;
|
||||
if (!arg1) {
|
||||
targetData->pos.x = playerActor->currentPos.x + playerActor->size.x * 0.3 * playerActor->scalingFactor;
|
||||
targetData->pos.y = playerActor->currentPos.y + playerActor->size.y * 0.9 * playerActor->scalingFactor;
|
||||
targetData->pos.z = playerActor->currentPos.z;
|
||||
targetDataList->pos.x = playerActor->currentPos.x + playerActor->size.x * 0.3 * playerActor->scalingFactor;
|
||||
targetDataList->pos.y = playerActor->currentPos.y + playerActor->size.y * 0.9 * playerActor->scalingFactor;
|
||||
targetDataList->pos.z = playerActor->currentPos.z;
|
||||
} else {
|
||||
targetData->pos.x = playerActor->homePos.x + playerActor->size.x * 0.3 * playerActor->scalingFactor;
|
||||
targetData->pos.y = playerActor->homePos.y + playerActor->size.y * 0.9 * playerActor->scalingFactor;
|
||||
targetData->pos.z = playerActor->homePos.z;
|
||||
targetDataList->pos.x = playerActor->homePos.x + playerActor->size.x * 0.3 * playerActor->scalingFactor;
|
||||
targetDataList->pos.y = playerActor->homePos.y + playerActor->size.y * 0.9 * playerActor->scalingFactor;
|
||||
targetDataList->pos.z = playerActor->homePos.z;
|
||||
}
|
||||
targetData->unk_10 = -100;
|
||||
s5++;
|
||||
targetData++;
|
||||
targetDataList->unk_10 = -100;
|
||||
numTargets += 1;
|
||||
targetDataList++;
|
||||
}
|
||||
|
||||
if ((battleStatus->currentTargetListFlags & 0x100) && partnerActor != NULL) {
|
||||
targetData->actorID = ACTOR_PARTNER;
|
||||
targetData->partID = 1;
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100) && partnerActor != NULL) {
|
||||
targetDataList->actorID = ACTOR_PARTNER;
|
||||
targetDataList->partID = 1;
|
||||
if (!arg1) {
|
||||
targetData->pos.x = partnerActor->currentPos.x + partnerActor->size.x * 0.1 * partnerActor->scalingFactor;
|
||||
targetData->pos.y = partnerActor->currentPos.y + partnerActor->size.y * 0.8 * partnerActor->scalingFactor;
|
||||
targetData->pos.z = partnerActor->currentPos.z;
|
||||
targetDataList->pos.x = partnerActor->currentPos.x + partnerActor->size.x * 0.1 * partnerActor->scalingFactor;
|
||||
targetDataList->pos.y = partnerActor->currentPos.y + partnerActor->size.y * 0.8 * partnerActor->scalingFactor;
|
||||
targetDataList->pos.z = partnerActor->currentPos.z;
|
||||
} else {
|
||||
targetData->pos.x = partnerActor->homePos.x + partnerActor->size.x * 0.1 * partnerActor->scalingFactor;
|
||||
targetData->pos.y = partnerActor->homePos.y + partnerActor->size.y * 0.8 * partnerActor->scalingFactor;
|
||||
targetData->pos.z = partnerActor->homePos.z;
|
||||
targetDataList->pos.x = partnerActor->homePos.x + partnerActor->size.x * 0.1 * partnerActor->scalingFactor;
|
||||
targetDataList->pos.y = partnerActor->homePos.y + partnerActor->size.y * 0.8 * partnerActor->scalingFactor;
|
||||
targetDataList->pos.z = partnerActor->homePos.z;
|
||||
}
|
||||
targetData->unk_10 = -50;
|
||||
s5++;
|
||||
targetData++;
|
||||
targetDataList->unk_10 = -50;
|
||||
numTargets += 1;
|
||||
targetDataList++;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||
@ -130,297 +124,335 @@ void create_target_list(Actor* actor, s32 arg1) {
|
||||
if (targetActor == NULL) {
|
||||
continue;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & 0x100) || (battleStatus->currentTargetListFlags & 0x8)) {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100) || (battleStatus->currentTargetListFlags & TARGET_FLAG_PLAYER)) {
|
||||
break;
|
||||
}
|
||||
targetPart = targetActor->partsTable;
|
||||
numParts = targetActor->numParts;
|
||||
for (j = 0; j < numParts; targetPart = targetPart->nextPart, j++) {
|
||||
if (!(targetPart->flags & 0x20000)) {
|
||||
partBlueprint = targetPart->staticData;
|
||||
if (!(targetPart->flags & 0x100000)) {
|
||||
fp = !arg1; // TODO ??????
|
||||
if (fp) {
|
||||
f6 = targetActor->currentPos.x;
|
||||
f8 = targetActor->currentPos.y;
|
||||
f10 = targetActor->currentPos.z;
|
||||
if (!(targetPart->flags & ACTOR_PART_FLAG_NO_TARGET)) {
|
||||
ActorPartBlueprint* partBlueprint = targetPart->staticData;
|
||||
s8 partIndex;
|
||||
if (!(targetPart->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
|
||||
row = !arg1; // required to match
|
||||
if (row) {
|
||||
targetX = targetActor->currentPos.x;
|
||||
targetY = targetActor->currentPos.y;
|
||||
targetZ = targetActor->currentPos.z;
|
||||
} else {
|
||||
f6 = targetActor->homePos.x;
|
||||
f8 = targetActor->homePos.y;
|
||||
f10 = targetActor->homePos.z;
|
||||
targetX = targetActor->homePos.x;
|
||||
targetY = targetActor->homePos.y;
|
||||
targetZ = targetActor->homePos.z;
|
||||
}
|
||||
f6 += targetPart->partOffset.x * targetActor->scalingFactor;
|
||||
if (!(targetActor->flags & 0x800)) {
|
||||
f8 += targetPart->partOffset.y * targetActor->scalingFactor;
|
||||
targetX += targetPart->partOffset.x * targetActor->scalingFactor;
|
||||
if (!(targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
|
||||
targetY += targetPart->partOffset.y * targetActor->scalingFactor;
|
||||
}
|
||||
f10 += targetPart->partOffset.z * targetActor->scalingFactor;
|
||||
f12 = f6;
|
||||
f6 = targetActor->scalingFactor;
|
||||
f6 = f12 + targetPart->targetOffset.x * f6;
|
||||
f2 = f8;
|
||||
f14 = f10 + 5.0f;
|
||||
if (!(targetActor->flags & 0x800)) {
|
||||
f8 = f2 + targetPart->targetOffset.y * targetActor->scalingFactor;
|
||||
targetZ += targetPart->partOffset.z * targetActor->scalingFactor;
|
||||
f12 = targetX;
|
||||
targetX = targetActor->scalingFactor;
|
||||
targetX = f12 + targetPart->targetOffset.x * targetX;
|
||||
f2 = targetY;
|
||||
f14 = targetZ + 5.0f;
|
||||
if (!(targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
|
||||
targetY = f2 + targetPart->targetOffset.y * targetActor->scalingFactor;
|
||||
}
|
||||
} else {
|
||||
f8 = targetPart->absolutePosition.y;
|
||||
f10 = targetPart->absolutePosition.z;
|
||||
targetY = targetPart->absolutePosition.y;
|
||||
targetZ = targetPart->absolutePosition.z;
|
||||
f12 = targetPart->absolutePosition.x;
|
||||
f2 = f8;
|
||||
f14 = f10 + 5.0f;
|
||||
f6 = f12 + targetPart->targetOffset.x;
|
||||
if (!(targetActor->flags & 0x800)) {
|
||||
f8 = f2 + targetPart->targetOffset.y;
|
||||
f2 = targetY;
|
||||
f14 = targetZ + 5.0f;
|
||||
targetX = f12 + targetPart->targetOffset.x;
|
||||
if (!(targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
|
||||
targetY = f2 + targetPart->targetOffset.y;
|
||||
}
|
||||
}
|
||||
|
||||
targetData->actorID = ACTOR_CLASS_ENEMY | i;
|
||||
targetData->partID = partBlueprint->index;
|
||||
targetData->pos.x = f6;
|
||||
targetData->pos.y = f8;
|
||||
targetData->pos.z = f10;
|
||||
targetData->unk_10 = 0;
|
||||
targetDataList->actorID = ACTOR_CLASS_ENEMY | i;
|
||||
partIndex = partBlueprint->index;
|
||||
targetDataList->pos.x = targetX;
|
||||
targetDataList->pos.y = targetY;
|
||||
targetDataList->pos.z = targetZ;
|
||||
targetDataList->unk_10 = 0;
|
||||
targetDataList->partID = partIndex;
|
||||
|
||||
if ((targetActor->flags & 0x4000) && !(targetActor->flags & 0x10)) {
|
||||
targetData->unk_10 = 100;
|
||||
if ((targetActor->flags & ACTOR_FLAG_TARGET_ONLY) && !(targetActor->flags & ACTOR_FLAG_10)) {
|
||||
targetDataList->unk_10 = 100;
|
||||
}
|
||||
targetData->unk_10 += targetPart->unk_70;
|
||||
targetData->unk_0A = f12 + targetData->unk_10 * 100;
|
||||
targetData->unk_0C = f2;
|
||||
targetData->unk_0E = f14;
|
||||
targetDataList->unk_10 += targetPart->unk_70;
|
||||
targetDataList->unk_0A = f12 + targetDataList->unk_10 * 100;
|
||||
targetDataList->unk_0C = f2;
|
||||
targetDataList->unk_0E = f14;
|
||||
|
||||
if (targetData->unk_0C < 40) {
|
||||
targetData->homeRow = 0;
|
||||
} else if (targetData->unk_0C < 85) {
|
||||
targetData->homeRow = 1;
|
||||
} else if (targetData->unk_0C < 100) {
|
||||
targetData->homeRow = 2;
|
||||
if (targetDataList->unk_0C < 40) {
|
||||
targetDataList->homeRow = 0;
|
||||
} else if (targetDataList->unk_0C < 85) {
|
||||
targetDataList->homeRow = 1;
|
||||
} else if (targetDataList->unk_0C < 100) {
|
||||
targetDataList->homeRow = 2;
|
||||
} else {
|
||||
targetData->homeRow = 3;
|
||||
do {
|
||||
do {
|
||||
targetDataList->homeRow = 3;
|
||||
} while (0);
|
||||
} while (0);
|
||||
}
|
||||
|
||||
if (targetData->unk_0A < 25) {
|
||||
targetData->homeCol = 0;
|
||||
} else if (targetData->unk_0A < 65) {
|
||||
targetData->homeCol = 1;
|
||||
} else if (targetData->unk_0A < 105) {
|
||||
targetData->homeCol = 2;
|
||||
if (targetDataList->unk_0A < 25) {
|
||||
targetDataList->homeCol = 0;
|
||||
} else if (targetDataList->unk_0A < 65) {
|
||||
targetDataList->homeCol = 1;
|
||||
} else if (targetDataList->unk_0A < 105) {
|
||||
targetDataList->homeCol = 2;
|
||||
} else {
|
||||
targetData->homeCol = 3;
|
||||
do {
|
||||
targetDataList->homeCol = 3;
|
||||
} while (0);
|
||||
}
|
||||
|
||||
if (targetData->unk_0E < -30) {
|
||||
targetData->layer = 0;
|
||||
if (targetDataList->unk_0E < -30) {
|
||||
targetDataList->layer = 0;
|
||||
} else {
|
||||
targetData->layer = 1;
|
||||
targetDataList->layer = 1;
|
||||
}
|
||||
s5++;
|
||||
targetData++;
|
||||
numTargets++;
|
||||
targetDataList++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
actor->selectedTargetIndex = 0;
|
||||
actor->targetListLength = s5;
|
||||
|
||||
do {
|
||||
actor->selectedTargetIndex = 0;
|
||||
} while (0);
|
||||
actor->targetListLength = numTargets;
|
||||
|
||||
// @bug this should be % 4
|
||||
sp1C = battleStatus->targetHomeIndex & 4;
|
||||
fp = battleStatus->targetHomeIndex / 4;
|
||||
col = battleStatus->targetHomeIndex & 4;
|
||||
row = battleStatus->targetHomeIndex / 4;
|
||||
|
||||
targetData = actor->targetData;
|
||||
s5 = actor->targetListLength;
|
||||
targetDataList = actor->targetData;
|
||||
numTargets = actor->targetListLength;
|
||||
|
||||
for (i = 0; i < s5; i++) {
|
||||
s0 = &targetData[i];
|
||||
targetActor = get_actor(s0->actorID);
|
||||
targetPart = get_actor_part(targetActor, s0->partID);
|
||||
if (s0->actorID == ACTOR_PLAYER || s0->actorID == ACTOR_PARTNER) {
|
||||
for (i = 0; i < numTargets; i++) {
|
||||
targetData = &targetDataList[i];
|
||||
targetActor = get_actor(targetData->actorID);
|
||||
targetPart = get_actor_part(targetActor, targetData->partID);
|
||||
if (targetData->actorID == ACTOR_PLAYER || targetData->actorID == ACTOR_PARTNER) {
|
||||
continue;
|
||||
}
|
||||
if (battleStatus->currentTargetListFlags & 0x80000000) {
|
||||
a02 = 1;
|
||||
if (battleStatus->currentTargetListFlags & TARGET_FLAG_80000000) {
|
||||
skip = TRUE;
|
||||
goto END2;
|
||||
}
|
||||
if (!(gBattleStatus.flags2 & 0x4000) && battleStatus->darknessMode > 0) {
|
||||
get_screen_overlay_params(1, &sp10, &sp14);
|
||||
if (sp14 >= 215.0f) {
|
||||
a02 = 1;
|
||||
if (!(gBattleStatus.flags2 & BS_FLAGS2_4000) && battleStatus->darknessMode > 0) {
|
||||
get_screen_overlay_params(1, &overlayType, &overlayZoom);
|
||||
if (overlayZoom >= 215.0f) {
|
||||
skip = TRUE;
|
||||
sp18 = 1;
|
||||
goto END2;
|
||||
}
|
||||
}
|
||||
if (battleStatus->currentTargetListFlags & 0x8000) {
|
||||
if (!(targetPart->flags & 0x800000) || (targetActor->flags & 0x40) || (targetPart->flags & 0x40)) {
|
||||
a02 = 1;
|
||||
} else {
|
||||
a02 = 0;
|
||||
if (battleStatus->currentTargetListFlags & TARGET_FLAG_8000) {
|
||||
if (!(targetPart->flags & ACTOR_PART_FLAG_MULTI_TARGET) ||
|
||||
(targetActor->flags & ACTOR_FLAG_40) ||
|
||||
(targetPart->flags & ACTOR_PART_FLAG_40))
|
||||
{
|
||||
skip = TRUE;
|
||||
goto END2;
|
||||
}
|
||||
} else {
|
||||
a02 = 0;
|
||||
}
|
||||
skip = 0;
|
||||
END2:
|
||||
if (a02) {
|
||||
for (j = i; j < s5 - 1; j++) {
|
||||
if (skip) {
|
||||
for (j = i; j < numTargets - 1; j++) {
|
||||
actor->targetData[j] = actor->targetData[j + 1];
|
||||
}
|
||||
s5--;
|
||||
numTargets--;
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < s5; i++) {
|
||||
s0 = &targetData[i];
|
||||
targetActor = get_actor(s0->actorID);
|
||||
targetPart = get_actor_part(targetActor, s0->partID);
|
||||
if (s0->actorID == ACTOR_PLAYER || s0->actorID == ACTOR_PARTNER) {
|
||||
for (i = 0; i < numTargets; i++) {
|
||||
targetData = &targetDataList[i];
|
||||
targetActor = get_actor(targetData->actorID);
|
||||
targetPart = get_actor_part(targetActor, targetData->partID);
|
||||
if (targetData->actorID == ACTOR_PLAYER || targetData->actorID == ACTOR_PARTNER) {
|
||||
continue;
|
||||
}
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_800) && (targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_1)) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_1000) && (targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_2)) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_20000) && ((targetActor->flags & ACTOR_FLAG_80) || (targetPart->flags & ACTOR_PART_FLAG_80))) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_400) && (targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
if (!(battleStatus->currentTargetListFlags & TARGET_FLAG_10000) && (targetActor->flags & ACTOR_FLAG_TARGET_ONLY)) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_40000) && (targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_4) && targetData->homeRow != 0) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_10) && targetData->homeRow >= 2) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_40) && targetData->homeRow <= 0) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_4000) && !(targetPart->flags & ACTOR_PART_FLAG_20)) {
|
||||
s32 cond = FALSE;
|
||||
do {
|
||||
for (j = 0; j < numTargets; j++) {
|
||||
otherTarget = &targetDataList[j];
|
||||
if (targetData != otherTarget) {
|
||||
if (targetData->layer == otherTarget->layer &&
|
||||
targetData->homeCol == otherTarget->homeCol &&
|
||||
targetData->homeRow < otherTarget->homeRow) {
|
||||
cond = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (0);
|
||||
if (cond) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
}
|
||||
if (battleStatus->currentTargetListFlags & TARGET_FLAG_2000) {
|
||||
s32 cond = FALSE;
|
||||
|
||||
if ((battleStatus->currentTargetListFlags & 0x800) && (targetPart->targetFlags & 0x1)) {
|
||||
a02 = 1;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & 0x1000) && (targetPart->targetFlags & 0x2)) {
|
||||
a02 = 1;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & 0x20000) && ((targetActor->flags & 0x80) || (targetPart->flags & 0x80))) {
|
||||
a02 = 1;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & 0x400) && (targetActor->flags & 0x800)) {
|
||||
a02 = 1;
|
||||
goto END;
|
||||
}
|
||||
if (!(battleStatus->currentTargetListFlags & 0x10000) && (targetActor->flags & 0x4000)) {
|
||||
a02 = 1;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & 0x40000) && (targetActor->flags & 0x800)) {
|
||||
a02 = 1;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & 0x4) && s0->homeRow != 0) {
|
||||
a02 = 1;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & 0x10) && s0->homeRow >= 2) {
|
||||
a02 = 1;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & 0x40) && s0->homeRow <= 0) {
|
||||
a02 = 1;
|
||||
goto END;
|
||||
}
|
||||
if ((battleStatus->currentTargetListFlags & 0x4000) && !(targetPart->flags & 0x20)) {
|
||||
a22 = 0;
|
||||
|
||||
for (j = 0; j < s5; j++) {
|
||||
target = &targetData[j];
|
||||
if (s0 != target) {
|
||||
if (s0->layer == target->layer &&
|
||||
s0->homeCol == target->homeCol &&
|
||||
s0->homeRow < target->homeRow) {
|
||||
a22 = 1;
|
||||
for (j = 0; j < numTargets; j++) {
|
||||
otherTarget = &targetDataList[j];
|
||||
if (targetData != otherTarget) {
|
||||
if (targetData->layer == otherTarget->layer &&
|
||||
targetData->homeRow == otherTarget->homeRow &&
|
||||
targetData->homeCol > otherTarget->homeCol) {
|
||||
cond = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a22) {
|
||||
a02 = 1;
|
||||
if (cond) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
}
|
||||
|
||||
if (battleStatus->currentTargetListFlags & 0x2000) {
|
||||
a22 = 0;
|
||||
|
||||
for (j = 0; j < s5; j++) {
|
||||
target = &targetData[j];
|
||||
if (s0 != target) {
|
||||
if (s0->layer == target->layer &&
|
||||
s0->homeRow == target->homeRow &&
|
||||
s0->homeCol > target->homeCol) {
|
||||
a22 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a22) {
|
||||
a02 = 1;
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_20) && (targetActor->flags & ACTOR_FLAG_FLYING)) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
}
|
||||
|
||||
if ((battleStatus->currentTargetListFlags & 0x20) && (targetActor->flags & 0x200)) {
|
||||
a02 = 1;
|
||||
} else if ((battleStatus->currentTargetListFlags & 0x100000) && s0->homeRow == fp + 1) {
|
||||
a02 = 1;
|
||||
} else if ((battleStatus->currentTargetListFlags & 0x200000) && s0->homeRow == fp - 1) {
|
||||
a02 = 1;
|
||||
} else if ((battleStatus->currentTargetListFlags & 0x400000) && s0->homeCol == sp1C - 1) {
|
||||
a02 = 1;
|
||||
} else if ((battleStatus->currentTargetListFlags & 0x800000) && s0->homeCol == sp1C + 1) {
|
||||
a02 = 1;
|
||||
} else if ((battleStatus->currentTargetListFlags & 0x100000) && s0->homeRow < fp) {
|
||||
a02 = 1;
|
||||
} else if ((battleStatus->currentTargetListFlags & 0x200000) && s0->homeRow > fp) {
|
||||
a02 = 1;
|
||||
} else if ((battleStatus->currentTargetListFlags & 0x400000) && s0->homeCol > sp1C) {
|
||||
a02 = 1;
|
||||
} else if ((battleStatus->currentTargetListFlags & 0x800000) && s0->homeCol < sp1C) {
|
||||
a02 = 1;
|
||||
} else {
|
||||
a02 = 0;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100000) && targetData->homeRow == row + 1) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_200000) && targetData->homeRow == row - 1) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_400000) && targetData->homeCol == col - 1) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_800000) && targetData->homeCol == col + 1) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100000) && targetData->homeRow < row) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_200000) && targetData->homeRow > row) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_400000) && targetData->homeCol > col) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
do {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_800000) && targetData->homeCol < col) {
|
||||
skip = TRUE;
|
||||
goto END;
|
||||
}
|
||||
} while (0);
|
||||
skip = FALSE;
|
||||
END:
|
||||
if (a02) {
|
||||
for (j = i; j < s5 - 1; j++) {
|
||||
if (skip) {
|
||||
for (j = i; j < numTargets - 1; j++) {
|
||||
actor->targetData[j] = actor->targetData[j + 1];
|
||||
}
|
||||
s5--;
|
||||
numTargets--;
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
} while (0); // TODO required to match
|
||||
|
||||
actor->targetListLength = s5;
|
||||
if (s5 == 0 && sp18) {
|
||||
gBattleStatus.flags2 |= 0x1000;
|
||||
actor->targetListLength = numTargets;
|
||||
if (numTargets == 0 && sp18) {
|
||||
gBattleStatus.flags2 |= BS_FLAGS2_NO_TARGET_AVAILABLE;
|
||||
} else {
|
||||
gBattleStatus.flags2 &= ~0x1000;
|
||||
gBattleStatus.flags2 &= ~BS_FLAGS2_NO_TARGET_AVAILABLE;
|
||||
}
|
||||
|
||||
targetIndexList = actor->targetIndexList;
|
||||
targetData = actor->targetData;
|
||||
targetDataList = actor->targetData;
|
||||
|
||||
s5 = actor->targetListLength;
|
||||
for (i = 0; i < s5; i++) {
|
||||
numTargets = actor->targetListLength;
|
||||
targetIndexList = actor->targetIndexList;
|
||||
for (i = 0; i < numTargets; i++) {
|
||||
targetIndexList[i] = i;
|
||||
}
|
||||
|
||||
for (i = 0; i < s5 - 1; i++) {
|
||||
for (j = i + 1; j < s5; j++) {
|
||||
index1 = targetIndexList[i];
|
||||
index2 = targetIndexList[j];
|
||||
s0 = &targetData[index1];
|
||||
target = &targetData[index2];
|
||||
if (s0->pos.x + s0->unk_10 * 10 > target->pos.x + target->unk_10 * 10) {
|
||||
for (i = 0; i < numTargets - 1; i++) {
|
||||
for (j = i + 1; j < numTargets; j++) {
|
||||
s32 index1 = targetIndexList[i];
|
||||
s32 index2 = targetIndexList[j];
|
||||
targetData = &targetDataList[index1];
|
||||
otherTarget = &targetDataList[index2];
|
||||
if (targetData->pos.x + targetData->unk_10 * 10 > otherTarget->pos.x + otherTarget->unk_10 * 10) {
|
||||
targetIndexList[i] = targetIndexList[j];
|
||||
targetIndexList[j] = index1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
void create_target_list(Actor* actor, s32 arg1);
|
||||
INCLUDE_ASM(s32, "190B20", create_target_list);
|
||||
#endif
|
||||
|
||||
void func_80266DAC(Actor* actor, s32 arg1);
|
||||
|
||||
|
@ -614,7 +614,7 @@ HitResult calc_player_damage_enemy(void) {
|
||||
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
|
||||
&& !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)
|
||||
&& !partImmuneToElement
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_FLAG_4)
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
|
||||
) {
|
||||
target->currentHP -= currentAttackDamage;
|
||||
|
||||
@ -832,7 +832,7 @@ HitResult calc_player_damage_enemy(void) {
|
||||
&& dispatchEvent != EVENT_DEATH
|
||||
&& dispatchEvent != EVENT_SPIN_SMASH_DEATH
|
||||
&& dispatchEvent != EVENT_EXPLODE_TRIGGER
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_FLAG_4)
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
|
||||
) {
|
||||
#define INFLICT_STATUS(STATUS_TYPE) \
|
||||
if ((battleStatus->currentAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
|
||||
@ -882,7 +882,7 @@ HitResult calc_player_damage_enemy(void) {
|
||||
func_802664DC(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
|
||||
}
|
||||
|
||||
if (!(targetPart->targetFlags & 4)) {
|
||||
if (!(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)) {
|
||||
func_802666E4(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
|
||||
}
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ HitResult calc_partner_damage_enemy(void) {
|
||||
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
|
||||
&& !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)
|
||||
&& !partImmuneToElement
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_FLAG_4)
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
|
||||
) {
|
||||
target->currentHP -= damageDealt;
|
||||
|
||||
@ -638,7 +638,7 @@ HitResult calc_partner_damage_enemy(void) {
|
||||
&& dispatchEvent != EVENT_DEATH
|
||||
&& dispatchEvent != EVENT_SPIN_SMASH_DEATH
|
||||
&& dispatchEvent != EVENT_EXPLODE_TRIGGER
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_FLAG_4)
|
||||
&& !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
|
||||
) {
|
||||
#define INFLICT_STATUS(STATUS_TYPE) \
|
||||
if ((battleStatus->currentAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
|
||||
@ -750,7 +750,7 @@ HitResult calc_partner_damage_enemy(void) {
|
||||
func_802664DC(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
|
||||
}
|
||||
|
||||
if (!(targetPart->targetFlags & ACTOR_PART_FLAG_4)) {
|
||||
if (!(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)) {
|
||||
func_802666E4(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
|
||||
}
|
||||
}
|
||||
|
@ -1079,7 +1079,7 @@ EvtScript D_80298948 = {
|
||||
|
||||
EvtScript ForceNextTarget = {
|
||||
EVT_CALL(GetOwnerID, LVarA)
|
||||
EVT_CALL(EnemyCreateTargetList, 32770)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1093,7 +1093,7 @@ EvtScript ForceNextTarget = {
|
||||
EVT_IF_NE(LVar0, -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyCreateTargetList, 32770)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1107,7 +1107,7 @@ EvtScript ForceNextTarget = {
|
||||
EVT_IF_NE(LVar0, -1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyCreateTargetList, 32770)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1730,7 +1730,7 @@ EvtScript DoScareAway = {
|
||||
};
|
||||
|
||||
EvtScript D_8029B494 = {
|
||||
EVT_CALL(PlayerCreateTargetList, 65540)
|
||||
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_10000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerID, LVar1)
|
||||
|
26
src/415D90.c
26
src/415D90.c
@ -2943,7 +2943,7 @@ void btl_state_update_player_menu(void) {
|
||||
battleStatus->unk_1AA = popup->userIndex[popup->result - 1];
|
||||
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
|
||||
battleStatus->moveArgument = battleStatus->unk_1AA;
|
||||
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | ITEM_TARGET_FLAG_8000;
|
||||
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | TARGET_FLAG_8000;
|
||||
battleStatus->currentAttackElement = 0;
|
||||
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] = popup->result - 1;
|
||||
hide_popup_menu();
|
||||
@ -3041,7 +3041,7 @@ void btl_state_update_player_menu(void) {
|
||||
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
|
||||
battleStatus->moveArgument = battleStatus->unk_1AA;
|
||||
battleStatus->selectedMoveID = MOVE_ITEMS;
|
||||
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | ITEM_TARGET_FLAG_8000;
|
||||
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | TARGET_FLAG_8000;
|
||||
battleStatus->currentAttackElement = 0;
|
||||
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] = popup->result - 1;
|
||||
hide_popup_menu();
|
||||
@ -3249,7 +3249,7 @@ void btl_state_update_player_menu(void) {
|
||||
battleStatus->unk_1AA = popup->userIndex[popup->result - 1];
|
||||
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
|
||||
battleStatus->moveArgument = battleStatus->unk_1AA;
|
||||
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | ITEM_TARGET_FLAG_8000;
|
||||
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | TARGET_FLAG_8000;
|
||||
battleStatus->currentAttackElement = 0;
|
||||
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_DIP] = popup->result - 1;
|
||||
hide_popup_menu();
|
||||
@ -3503,7 +3503,7 @@ void btl_state_update_player_menu(void) {
|
||||
battleStatus->unk_1AC = popup->userIndex[popup->result - 1];
|
||||
battleStatus->moveCategory = BTL_MENU_TYPE_CHANGE_PARTNER;
|
||||
battleStatus->selectedMoveID = MOVE_UNUSED_37;
|
||||
battleStatus->currentTargetListFlags = ITEM_TARGET_FLAG_2;
|
||||
battleStatus->currentTargetListFlags = TARGET_FLAG_2;
|
||||
battleStatus->moveArgument = battleStatus->unk_1AC;
|
||||
battleStatus->lastPlayerMenuSelection[BTL_MENU_IDX_PARTNER] = popup->result - 1;
|
||||
hide_popup_menu();
|
||||
@ -4016,7 +4016,7 @@ void btl_state_update_partner_menu(void) {
|
||||
battleStatus->unk_1AA = popupMenu->userIndex[popupMenu->result - 1];
|
||||
battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
|
||||
battleStatus->moveArgument = battleStatus->unk_1AA;
|
||||
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | ITEM_TARGET_FLAG_8000;
|
||||
battleStatus->currentTargetListFlags = gItemTable[battleStatus->moveArgument].targetFlags | TARGET_FLAG_8000;
|
||||
battleStatus->currentAttackElement = 0;
|
||||
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER_ITEM] = popupMenu->result - 1;
|
||||
hide_popup_menu();
|
||||
@ -4096,7 +4096,7 @@ void btl_state_update_partner_menu(void) {
|
||||
battleStatus->unk_1AC = popupMenu->userIndex[popupMenu->result - 1];
|
||||
battleStatus->moveCategory = BTL_MENU_TYPE_CHANGE_PARTNER;
|
||||
battleStatus->selectedMoveID = MOVE_UNUSED_37;
|
||||
battleStatus->currentTargetListFlags = ITEM_TARGET_FLAG_2;
|
||||
battleStatus->currentTargetListFlags = TARGET_FLAG_2;
|
||||
battleStatus->moveArgument = battleStatus->unk_1AC;
|
||||
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER] = popupMenu->result - 1;
|
||||
hide_popup_menu();
|
||||
@ -4368,7 +4368,7 @@ void btl_state_update_partner_menu(void) {
|
||||
battleStatus->unk_1AC = popupMenu->userIndex[popupMenu->result - 1];
|
||||
battleStatus->moveCategory = BTL_MENU_TYPE_CHANGE_PARTNER;
|
||||
battleStatus->selectedMoveID = MOVE_UNUSED_37;
|
||||
battleStatus->currentTargetListFlags = ITEM_TARGET_FLAG_2;
|
||||
battleStatus->currentTargetListFlags = TARGET_FLAG_2;
|
||||
battleStatus->moveArgument = battleStatus->unk_1AC;
|
||||
battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_PARTNER] = popupMenu->result - 1;
|
||||
hide_popup_menu();
|
||||
@ -4896,7 +4896,7 @@ void btl_state_update_select_target(void) {
|
||||
}
|
||||
player_create_target_list(actor);
|
||||
targetListLength = actor->targetListLength;
|
||||
if (battleStatus->currentTargetListFlags & 1) {
|
||||
if (battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) {
|
||||
targetIndexList = actor->targetIndexList;
|
||||
for (i = 0; i < targetListLength; i++) {
|
||||
target = &actor->targetData[targetIndexList[i]];
|
||||
@ -4907,7 +4907,7 @@ void btl_state_update_select_target(void) {
|
||||
}
|
||||
}
|
||||
|
||||
if (battleStatus->currentTargetListFlags & 0x80000000) {
|
||||
if (battleStatus->currentTargetListFlags & TARGET_FLAG_80000000) {
|
||||
if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
|
||||
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
|
||||
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
|
||||
@ -4985,7 +4985,7 @@ void btl_state_update_select_target(void) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (battleStatus->currentTargetListFlags & 1) {
|
||||
if (battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) {
|
||||
s32 oldSelectedTargetIndex = selectedTargetIndex;
|
||||
|
||||
if (battleStatus->currentButtonsHeld & BUTTON_STICK_LEFT) {
|
||||
@ -5115,7 +5115,7 @@ void btl_state_draw_select_target(void) {
|
||||
tmpPtr = &D_802ACC68;
|
||||
|
||||
if (targetListLength != 0) {
|
||||
if (battleStatus->currentTargetListFlags & 1) {
|
||||
if (battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) {
|
||||
target = &actor->targetData[targetIndexList[selectedTargetIndex]];
|
||||
anotherActor = get_actor(target->actorID);
|
||||
id = D_802ACC70[0];
|
||||
@ -5176,7 +5176,7 @@ void btl_state_draw_select_target(void) {
|
||||
currentPartner = PARTNER_TWINK;
|
||||
}
|
||||
|
||||
if ((battleStatus->currentTargetListFlags & 1) || targetListLength == 1) {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) || targetListLength == 1) {
|
||||
actorID = target->actorID;
|
||||
if (actorID == ACTOR_PLAYER) {
|
||||
msgWidth = get_msg_width(MSG_Menus_Battle_TargetMario, 0) + 10;
|
||||
@ -5208,7 +5208,7 @@ void btl_state_draw_select_target(void) {
|
||||
|
||||
screenX += 4;
|
||||
screenY += 2;
|
||||
if ((battleStatus->currentTargetListFlags & 1) || targetListLength == 1) {
|
||||
if ((battleStatus->currentTargetListFlags & TARGET_FLAG_ENEMY) || targetListLength == 1) {
|
||||
actorID = target->actorID;
|
||||
if (actorID == ACTOR_PLAYER) {
|
||||
draw_msg(MSG_Menus_Battle_TargetMario, screenX + D_802ACC68, screenY, 255, MSG_PAL_36, 0);
|
||||
|
@ -137,7 +137,7 @@ EvtScript N(init_80223DA0) = {
|
||||
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_802245C8)))
|
||||
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80223E98)))
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80224038)))
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 2, 2, TRUE)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 2, ACTOR_PART_TARGET_FLAG_2, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ API_CALLABLE(N(SetupDemoPlayerMove)) {
|
||||
battleStatus->selectedMoveID = 0;
|
||||
battleStatus->currentAttackElement = 0;
|
||||
playerData->invItems[0] = selectedItemID;
|
||||
battleStatus->currentTargetListFlags = gItemTable[playerData->invItems[0]].targetFlags | ITEM_TARGET_FLAG_8000;
|
||||
battleStatus->currentTargetListFlags = gItemTable[playerData->invItems[0]].targetFlags | TARGET_FLAG_8000;
|
||||
|
||||
player_create_target_list(player);
|
||||
player->selectedTargetIndex = 0;
|
||||
|
@ -500,7 +500,7 @@ EvtScript N(summonSpiny) = {
|
||||
};
|
||||
|
||||
EvtScript N(findPlacesForSummon) = {
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar5)
|
||||
@ -543,7 +543,7 @@ EvtScript N(findPlacesForSummon) = {
|
||||
|
||||
EvtScript N(calcSummonChance) = {
|
||||
EVT_SET(LVar9, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
|
@ -870,7 +870,7 @@ EvtScript N(healAll) = {
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Anim01)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
@ -1128,7 +1128,7 @@ EvtScript N(shapeSpell) = {
|
||||
};
|
||||
|
||||
EvtScript N(80221144) = {
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1351,7 +1351,7 @@ Formation N(specialFormation_802216E4) = {
|
||||
};
|
||||
|
||||
EvtScript N(makeCopy) = {
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(runAway))
|
||||
EVT_RETURN
|
||||
@ -1450,7 +1450,7 @@ EvtScript N(makeCopy) = {
|
||||
EvtScript N(boostAttack) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1476,7 +1476,7 @@ EvtScript N(boostAttack) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(runAway))
|
||||
EVT_RETURN
|
||||
@ -1562,7 +1562,7 @@ EvtScript N(boostAttack) = {
|
||||
EvtScript N(boostDefense) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1588,7 +1588,7 @@ EvtScript N(boostDefense) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(runAway))
|
||||
EVT_RETURN
|
||||
@ -1674,7 +1674,7 @@ EvtScript N(boostDefense) = {
|
||||
EvtScript N(electrify) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1700,7 +1700,7 @@ EvtScript N(electrify) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(runAway))
|
||||
EVT_RETURN
|
||||
@ -1791,7 +1791,7 @@ EvtScript N(electrify) = {
|
||||
EvtScript N(vanish) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1817,7 +1817,7 @@ EvtScript N(vanish) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(runAway))
|
||||
EVT_RETURN
|
||||
@ -1911,7 +1911,7 @@ EvtScript N(takeTurn_80223B24) = {
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
@ -1945,7 +1945,7 @@ EvtScript N(takeTurn_80223B24) = {
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
@ -1979,7 +1979,7 @@ EvtScript N(takeTurn_80223B24) = {
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(2)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
@ -2014,7 +2014,7 @@ EvtScript N(takeTurn_80223B24) = {
|
||||
EVT_END_IF
|
||||
EVT_GOTO(20)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(runAway))
|
||||
EVT_RETURN
|
||||
@ -2049,7 +2049,7 @@ EvtScript N(takeTurn_80223B24) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar0)
|
||||
EVT_IF_LT(LVar0, 0)
|
||||
EVT_SETF(LVar9, EVT_FLOAT(100.0))
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(11)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
|
@ -860,7 +860,7 @@ EvtScript N(8021B998) = {
|
||||
EVT_WAIT(4)
|
||||
EVT_EXEC_WAIT(N(8021B6AC))
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00018004)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_8000 | TARGET_FLAG_10000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerID, LVar1)
|
||||
|
@ -685,7 +685,7 @@ EvtScript N(802210E0) = {
|
||||
EVT_SET(LocalFlag(2), 0)
|
||||
EVT_SET(LocalFlag(3), 0)
|
||||
EVT_SET(LocalFlag(4), 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar5)
|
||||
@ -752,7 +752,7 @@ EvtScript N(802210E0) = {
|
||||
|
||||
EvtScript N(80221468) = {
|
||||
EVT_SET(LVar9, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
|
@ -634,7 +634,7 @@ EvtScript N(summonBackup) = {
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_SpearGuy_Anim0E)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008004)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar1, LVar2)
|
||||
@ -657,7 +657,7 @@ EvtScript N(summonBackup) = {
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008004)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -925,7 +925,7 @@ EvtScript N(spearThrow) = {
|
||||
};
|
||||
|
||||
EvtScript N(8021B770) = {
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar5)
|
||||
@ -968,7 +968,7 @@ EvtScript N(8021B770) = {
|
||||
|
||||
EvtScript N(8021B96C) = {
|
||||
EVT_SET(LVar9, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1002,7 +1002,7 @@ EvtScript N(8021B96C) = {
|
||||
EvtScript N(8021BB18) = {
|
||||
EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVarA)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008004)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1073,7 +1073,7 @@ EvtScript N(takeTurn_8021BCB4) = {
|
||||
EVT_EXEC_WAIT(N(8021BB18))
|
||||
EVT_END_CASE_GROUP
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(GetTargetListLength, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(spearThrow))
|
||||
|
@ -158,7 +158,7 @@ EvtScript N(init_80223488) = {
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetPartScale, ACTOR_SELF, 5, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 1, 4, TRUE)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 1, ACTOR_PART_TARGET_FLAG_4, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -160,7 +160,7 @@ EvtScript N(init) = {
|
||||
|
||||
EvtScript N(nextTurn) = {
|
||||
EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVarA)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -175,7 +175,7 @@ EvtScript N(nextTurn) = {
|
||||
EVT_IF_NE(LVar0, -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -187,7 +187,7 @@ EvtScript N(nextTurn) = {
|
||||
EVT_IF_NE(LVar0, -1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -245,7 +245,7 @@ EvtScript N(reassemble) = {
|
||||
EVT_ADD(LVar0, 2)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
|
||||
EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVarA)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -257,7 +257,7 @@ EvtScript N(reassemble) = {
|
||||
EVT_IF_NE(LVar0, -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -269,7 +269,7 @@ EvtScript N(reassemble) = {
|
||||
EVT_IF_NE(LVar0, -1)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
|
@ -512,7 +512,7 @@ EvtScript N(8021A0D4) = {
|
||||
EVT_SET(LocalFlag(2), 0)
|
||||
EVT_SET(LocalFlag(3), 0)
|
||||
EVT_SET(LocalFlag(4), 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar5)
|
||||
@ -579,7 +579,7 @@ EvtScript N(8021A0D4) = {
|
||||
|
||||
EvtScript N(8021A45C) = {
|
||||
EVT_SET(LVar9, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
|
@ -450,7 +450,7 @@ EvtScript N(getFirstOpenColumn) = {
|
||||
EVT_SET(LocalFlag(2), 0)
|
||||
EVT_SET(LocalFlag(3), 0)
|
||||
EVT_SET(LocalFlag(4), 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar5)
|
||||
@ -493,7 +493,7 @@ EvtScript N(getFirstOpenColumn) = {
|
||||
|
||||
EvtScript N(countActiveSummoners) = {
|
||||
EVT_SET(LVar9, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
|
@ -259,7 +259,7 @@ EvtScript N(init_8022987C) = {
|
||||
EVT_SUB(LVar1, 5)
|
||||
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PT_3, 4, TRUE)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PT_3, ACTOR_PART_TARGET_FLAG_4, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -178,7 +178,7 @@ EvtScript N(init) = {
|
||||
EVT_CALL(PlayModelAnimation, 0, EVT_PTR(toy_tank_as_idle))
|
||||
EVT_CALL(EnableModel, 62, FALSE)
|
||||
EVT_CALL(SetAnimatedModelRootPosition, 0, 200, 0, 0)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 3, 1, TRUE)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 3, ACTOR_PART_TARGET_FLAG_1, TRUE)
|
||||
EVT_CALL(GetModelCenter, 39)
|
||||
EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), LVar5, 0)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 5, LVar5)
|
||||
|
@ -241,7 +241,7 @@ EvtScript N(init) = {
|
||||
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 4, 1, TRUE)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 4, ACTOR_PART_TARGET_FLAG_1, TRUE)
|
||||
EVT_CALL(SetPartSize, ACTOR_SELF, 1, 24, 30)
|
||||
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
|
||||
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
|
||||
@ -830,7 +830,7 @@ EvtScript N(shy_guy_on_spin_smash) = {
|
||||
EVT_EXEC_GET_TID(N(shy_guy_rotate), LVarE)
|
||||
EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
|
||||
EVT_CALL(PlayerCreateTargetList, 0x00010004)
|
||||
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_10000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerID, LVar1)
|
||||
|
@ -882,7 +882,7 @@ EvtScript N(doSpinSmashHitLastGuy) = {
|
||||
EVT_EXEC_GET_TID(N(rotate), LVarE)
|
||||
EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
|
||||
EVT_CALL(PlayerCreateTargetList, 0x00010004)
|
||||
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_10000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerID, LVar1)
|
||||
@ -1075,7 +1075,7 @@ EvtScript N(doSpinSmashHit) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
|
||||
EVT_EXEC_WAIT(N(lower_actor_pos))
|
||||
EVT_CALL(PlayerCreateTargetList, 0x00018004)
|
||||
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_8000 | TARGET_FLAG_10000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerID, LVar1)
|
||||
|
@ -770,7 +770,7 @@ EvtScript N(handleEvent) = {
|
||||
EVT_SET_CONST(LVar0, 1)
|
||||
EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim09)
|
||||
EVT_EXEC_WAIT(DoRecover)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_LE(LVar0, 1)
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_CrystalKing_Anim0E)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
|
||||
@ -851,7 +851,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_PHASE), LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(N(PHASE_BEGIN))
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_LE(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(SummonCrystalBits))
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_PHASE), N(PHASE_SUMMONED_BITS))
|
||||
@ -863,7 +863,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_EXEC_WAIT(N(SummonCrystalBits))
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_PHASE), N(PHASE_SUMMONED_BITS))
|
||||
EVT_CASE_EQ(N(PHASE_SUMMONED_BITS))
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_LE(LVar0, 1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0)
|
||||
EVT_IF_FLAG(LVar0, STATUS_FLAG_FROZEN)
|
||||
@ -899,7 +899,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_CALL(SetActorVar, ACTOR_ENEMY0, N(VAR_FLAGS), LVar0)
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(N(PHASE_SUMMONED_CLONES))
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_LE(LVar0, 1)
|
||||
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0)
|
||||
EVT_IF_FLAG(LVar0, STATUS_FLAG_FROZEN)
|
||||
@ -913,7 +913,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_PHASE), N(PHASE_ATTACKED_WITH_CLONES))
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(N(PHASE_ATTACKED_WITH_CLONES))
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_GT(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(AttackIcyBreathWithClones))
|
||||
EVT_RETURN
|
||||
|
@ -437,7 +437,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00010002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_10000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
|
@ -252,7 +252,7 @@ EvtScript N(init_8021A968) = {
|
||||
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(HPBarToHome, ACTOR_SELF)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 2, 4, TRUE)
|
||||
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, 2, ACTOR_PART_TARGET_FLAG_4, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
@ -2340,7 +2340,7 @@ EvtScript N(80221DB4) = {
|
||||
|
||||
EvtScript N(80222C44) = {
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CALL(PlayerCreateTargetList, 0x00008002)
|
||||
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -2371,7 +2371,7 @@ EvtScript N(80222C44) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_SET(LVarB, LVarA)
|
||||
EVT_SUB(LVarB, 1)
|
||||
EVT_CALL(PlayerCreateTargetList, 0x00008002)
|
||||
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -2417,7 +2417,7 @@ EvtScript N(80222C44) = {
|
||||
|
||||
EvtScript N(802230E8) = {
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CALL(PlayerCreateTargetList, 0x00008002)
|
||||
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -2457,7 +2457,7 @@ EvtScript N(802230E8) = {
|
||||
EVT_ADD(LVar0, 1)
|
||||
EVT_END_LOOP
|
||||
EVT_SET(LVar2, 0)
|
||||
EVT_CALL(PlayerCreateTargetList, 0x00008002)
|
||||
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
|
@ -235,7 +235,7 @@ EvtScript N(8021B2FC) = {
|
||||
};
|
||||
|
||||
EvtScript N(8021B398) = {
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar5)
|
||||
|
@ -782,7 +782,7 @@ EvtScript N(init_flying) = {
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -808,7 +808,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
|
@ -784,7 +784,7 @@ EvtScript N(init_flying) = {
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -810,7 +810,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
|
@ -981,7 +981,7 @@ EvtScript N(attackShellMissile) = {
|
||||
};
|
||||
|
||||
EvtScript N(findTarget) = {
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1001,7 +1001,7 @@ EvtScript N(findTarget) = {
|
||||
EVT_SET(LocalFlag(2), 0)
|
||||
EVT_SET(LocalFlag(3), 0)
|
||||
EVT_SET(LocalFlag(4), 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1135,7 +1135,7 @@ EvtScript N(summonFriend) = {
|
||||
|
||||
EvtScript N(findPlacesToSummon) = {
|
||||
EVT_SET(LVar9, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
|
@ -918,7 +918,7 @@ EvtScript N(healAll) = {
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_Anim01)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
@ -1176,7 +1176,7 @@ EvtScript N(attackMagicBlast) = {
|
||||
};
|
||||
|
||||
EvtScript N(findPlaceForClone) = {
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1399,7 +1399,7 @@ Formation N(formation_clone_flying) = {
|
||||
};
|
||||
|
||||
EvtScript N(makeClone) = {
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
@ -1498,7 +1498,7 @@ EvtScript N(makeClone) = {
|
||||
EvtScript N(boostAttack) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1524,7 +1524,7 @@ EvtScript N(boostAttack) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
@ -1610,7 +1610,7 @@ EvtScript N(boostAttack) = {
|
||||
EvtScript N(boostDefense) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1636,7 +1636,7 @@ EvtScript N(boostDefense) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
@ -1722,7 +1722,7 @@ EvtScript N(boostDefense) = {
|
||||
EvtScript N(electrify) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1748,7 +1748,7 @@ EvtScript N(electrify) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
@ -1839,7 +1839,7 @@ EvtScript N(electrify) = {
|
||||
EvtScript N(makeTransparent) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1865,7 +1865,7 @@ EvtScript N(makeTransparent) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
@ -1959,7 +1959,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
@ -1993,7 +1993,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
@ -2027,7 +2027,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(2)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
@ -2062,7 +2062,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_END_IF
|
||||
EVT_GOTO(20)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
@ -2097,7 +2097,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_HEAL_ONE_COUNTER), LVar0)
|
||||
EVT_IF_LT(LVar0, 2)
|
||||
EVT_SETF(LVar9, EVT_FLOAT(100.0))
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(11)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
|
@ -398,7 +398,7 @@ EvtScript N(healOneAlly) = {
|
||||
};
|
||||
|
||||
EvtScript N(findTargetsToHeal) = {
|
||||
EVT_CALL(EnemyCreateTargetList, 2)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
|
@ -629,7 +629,7 @@ EvtScript N(timberAttack) = {
|
||||
|
||||
EvtScript N(calcSummonChance) = {
|
||||
EVT_SET(LVar9, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -833,7 +833,7 @@ EvtScript N(findPlaceForSummon) = {
|
||||
EVT_SET(LocalFlag(2), 0)
|
||||
EVT_SET(LocalFlag(3), 0)
|
||||
EVT_SET(LocalFlag(4), 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar5)
|
||||
@ -1274,7 +1274,7 @@ EvtScript N(doSpinSmashHit) = {
|
||||
EVT_WAIT(4)
|
||||
EVT_EXEC_WAIT(N(bounceOnHit))
|
||||
EVT_END_CHILD_THREAD
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00018004)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_8000 | TARGET_FLAG_10000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerID, LVar1)
|
||||
|
@ -782,7 +782,7 @@ EvtScript N(init_flying) = {
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -808,7 +808,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
|
@ -779,7 +779,7 @@ EvtScript N(init_80225FBC) = {
|
||||
EvtScript N(healOne) = {
|
||||
EVT_SET(LVar8, 0)
|
||||
EVT_SET(LVar9, 9999)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -820,7 +820,7 @@ EvtScript N(healOne) = {
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar8, 0)
|
||||
EVT_SET(LVar9, 9999)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -869,7 +869,7 @@ EvtScript N(healOne) = {
|
||||
EVT_IF_NE(LVar8, ACTOR_PLAYER)
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(2)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -902,7 +902,7 @@ EvtScript N(healOne) = {
|
||||
EVT_SET(LVar8, -127)
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(3)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -1072,7 +1072,7 @@ EvtScript N(healAll) = {
|
||||
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_FlyingMagikoopa_White_Anim01)
|
||||
EVT_END_IF
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
@ -1114,14 +1114,14 @@ EvtScript N(healAll) = {
|
||||
};
|
||||
|
||||
EvtScript N(takeTurn_802274E4) = {
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(run_away))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET(LVarA, 0)
|
||||
EVT_SET(LVarB, 0)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
|
@ -781,7 +781,7 @@ EvtScript N(init_flying) = {
|
||||
EvtScript N(takeTurn) = {
|
||||
EVT_SET(LocalFlag(0), 0)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(EnemyCreateTargetList, 0x00008002)
|
||||
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
|
||||
@ -807,7 +807,7 @@ EvtScript N(takeTurn) = {
|
||||
EVT_CALL(SetBattleVar, 2, -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, 0x00008002, LVar0)
|
||||
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_EXEC_WAIT(N(flee))
|
||||
EVT_RETURN
|
||||
|
@ -170,7 +170,7 @@ API_CALLABLE(LoadMysteryItemScript) {
|
||||
s32* itemPtr;
|
||||
s32 i;
|
||||
|
||||
battleStatus->currentTargetListFlags = item->targetFlags | ITEM_TARGET_FLAG_8000;
|
||||
battleStatus->currentTargetListFlags = item->targetFlags | TARGET_FLAG_8000;
|
||||
battleStatus->currentAttackElement = 0;
|
||||
|
||||
player_create_target_list(actor);
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user