stoneage8.5/石器时代8.5客户端最新源代码/石器源码/oft/oft.cpp

12380 lines
331 KiB
C++
Raw Normal View History

2020-06-23 15:27:59 +08:00
/************************/
/* oft.c */
/************************/
#include "../systeminc/version.h"
#include "../systeminc/system.h"
#include "vg410.h"
#include "work.h"
#include "../systeminc/loadrealbin.h"
#include "../systeminc/loadsprbin.h"
#include "../systeminc/battleMenu.h"
#include "../systeminc/anim_tbl.h"
#include "../systeminc/anim_tbl.h"
#include "../systeminc/chat.h"
#include "../systeminc/tool.h"
#include "../systeminc/pc.h"
#include "../systeminc/t_music.h"
#include "../systeminc/battlemap.h"
#include "../systeminc/menu.h"
#include "../systeminc/battleproc.h"
#include <math.h>
#include "../systeminc/version.h"
extern int MessageBoxNew(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
extern BOOL g_bUseAlpha;
// Robin 0804 ride Pet
extern BOOL bNewServer;
void petfallChangeGraph(ACTION *a0);
#ifdef _PETSKILL_RIDE
void petrideChangeGraph(ACTION *a0,int ridebmp);
#endif
void LogToBattleError(char *data, int line);
void katino(ACTION *a0);
static int command_point;
extern ACTION *MakeAnimDisp(int x, int y, int sprNo, int mode);
#ifdef _SYUTEST
static ACTION *Light1;
#endif
#ifdef _PETSKILL_LER
extern BOOL g_bUseAlpha;
#endif
#ifdef _SHOOTCHESTNUT // Syu ADD <20><EFBFBD><E8BCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2B4A6>
int ShooterNum = -1;
/*
int nuty[20] = { 384 , 408 , 360 , 432 , 336 , 312 , 360 , 264 , 408 , 216 , 150 , 174 ,
126 , 198 , 102 , 202 , 250 , 154 , 298 , 106 } ;
*/
#endif
#ifdef _MAGIC_NOCAST//<2F><>Ĭ
extern BOOL NoCastFlag;
#endif
//ACTION *set_bg( void );
ACTION *oft_test(void);
//ACTION *set_teki( void );
//void teki( ACTION *pAct );
void monster(ACTION *a0);
static int get_num(void);
/* ??????? ****************************************************/
#define HIT_STOP_TIM 8
#define VCT_NO_DIE 250
#define VCT_NO_APPEAR VCT_NO_DIE - 1
#ifdef __NEW_BATTLE_EFFECT
//#define VCT_NO_PAUSE 254
#define VCT_NO_EFFECT 255
#endif
#define SCREEN_OUT 106
#define ATTACK_MAGIC_CASE 200
#define TOCALL_MAGIC_CASE 210
//#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
#define PROSKILL 230
int AttPreMagicNum = -1;
int AttNextMagicNum = -1;
short NoMiss = -1; //<2F><><EFBFBD><EFBFBD><E2B4A6>˫<EFBFBD>ع<EFBFBD><D8B9><EFBFBD>
short StarLoop = 0;
//#endif
#ifdef _FIREHUNTER_SKILL // (<28><><EFBFBD>ɿ<EFBFBD>) ROG ADD <20><>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ
#define FIRE_HUNTER_SKILL 240
#endif
#ifdef _WAVETRACK // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int BeAttNum = -1 ; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD>λ<EFBFBD>ñ<EFBFBD><C3B1><EFBFBD>
#endif
#ifdef _FIREHUNTER_SKILL // (<28><><EFBFBD>ɿ<EFBFBD>) ROG ADD <20><>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ
BOOL FireSkillEnd = FALSE;
BOOL bFireInit = FALSE;
int tempPosH = 0;
int tempPosV = 0;
int iBeAttNum = -1; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD><DFB1><EFBFBD>
int counter;
int tarpos = -1;
int tarMgiDem = 0;
#endif
/* ?????<3F><>? ****************************************************/
//????????
char att_select_flg;
/* ??????<3F><>? ****************************************************/
static ACTION *p_kanji;
static char kanji_buf[4][128];
static ACTION *p_master;
static ACTION *p_attrib;
static ACTION *p_missile[BATTLKPKPLYAERNUM + 1];
unsigned char crs_change_tbl[32] = {
4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4 };
unsigned char crs_change_tbl2[8] = {
16, 20, 24, 28, 0, 4, 8, 12 };
unsigned char crs_bound_tbl[4][32] = {
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
{ 16, 15, 14, 13, 12, 11, 10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 22, 21, 20, 19, 18, 17 },
{ 0, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 5, 4, 3, 2, 1, 0, 31, 30, 29, 28, 27, 26, 25, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
};
typedef struct{
int v_pos;
ACTION *work;
} SORT_CHR_EQU;
static SORT_CHR_EQU sort_chr_buf[40];
static char pet_nix_tbl[] =
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-1, 0, 0, 0, 0,
-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-1, 0, 0, 0, 0,
-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0,
-2,
};
static int monster_start_pos[BATTLKPKPLYAERNUM * 2];
static int monster_place_pos[BATTLKPKPLYAERNUM * 2];
#ifdef _BATTLE_PK_PLAYER_FOR_40
static int monster_place_no[BATTLKPKPLYAERNUM] = { 2,1,3,0,4,7,6,8,5,9,12,11,13,10,14,17,16,18,15,19,22,21,23,20,24,27,26,28,25,29,32,31,33,30,34,37,36,38,35,39};
#else
#ifdef _BATTLE_PK_PLAYER_FOR_6VS6
static int monster_place_no[24] = { 2, 1, 3, 0, 4, 5, 8, 7, 9, 6, 10, 11, 14, 13, 15, 12, 16, 17, 20, 19, 21, 18, 22, 23};
#else
static int monster_place_no[20] = { 2, 1, 3, 0, 4, 7, 6, 8, 5, 9, 12, 11, 13, 10, 14, 17, 16, 18, 15, 19 };
#endif
#endif
#ifdef __ATTACK_MAGIC
// Global vars
int g_iRunEarthQuake = 0; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״<EFBFBD><D7B4>: 0 --> û<><C3BB><EFBFBD><EFBFBD> , 1 --> <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> , 2 --> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int g_iCurRunEarthQuake = 0; // Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
int g_iNumRunEarthQuake; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD>
#define ATTACK_MAGIC_ID 12345678 // <20><><EFBFBD><EFBFBD>ħ<EFBFBD><C4A7><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define MAX_NUM_ATTACKED 16 // <20><><EFBFBD>󱻹<EFBFBD><F3B1BBB9><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD>Ŀ
// λ<>ö<EFBFBD><C3B6><EFBFBD>
struct POS
{
WORD x; // X<><58><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD y; // Y<><59><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
};
// BJ | <20><><EFBFBD><EFBFBD><EFBFBD>ߵı<DFB5><C4B1><EFBFBD> | 12345678 | <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʩ<EFBFBD><CAA9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3>MP | ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |
// <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | <20><><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>ʽ | <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD> | <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>õķ<C3B5>ʽ( <20><><EFBFBD>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD><EFBFBD> ) |
// λ<><CEBB>( <20><><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾλ<CABE>÷<EFBFBD>ʽ ) | λ<><CEBB>( ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>÷<EFBFBD>ʽ ) | λ<><CEBB>( <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>÷<EFBFBD>ʽ ) |
// ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |
// <20>𶯻<EFBFBD><F0B6AFBB><EFBFBD> | <20>𶯵<EFBFBD><F0B6AFB5><EFBFBD>ʼʱ<CABC><CAB1> | <20>𶯵Ľ<F0B6AFB5><C4BD><EFBFBD>ʱ<EFBFBD><CAB1> | <20><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>X1 | <20><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>X2 | ...<2E><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>Xn|FF
// 12345678: <09><>ʾΪ<CABE><CEAA><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD>ħ<EFBFBD><C4A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ˯<CEAA><CBAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
struct ATTACK_MAGIC
{
DWORD dwCurFrame1; // Ŀǰ<C4BF>Ѳ<EFBFBD><D1B2>Ź<EFBFBD><C5B9><EFBFBD>Frames<65><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>Ź<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ
DWORD dwCurFrame2; // Ŀǰ<C4BF>Ѳ<EFBFBD><D1B2>Ź<EFBFBD><C5B9><EFBFBD>Frames<65><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DWORD dwEQuake; // <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>𶯻<EFBFBD><F0B6AFBB><EFBFBD>
DWORD dwEQuakeSTime; // <20><><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>ʼʱ<CABC><CAB1>
DWORD dwEQuakeETime; // <20><><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>ʱ<EFBFBD><CAB1>
DWORD dwEQuakeSFrame; // <20><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD>Ŀ<EFBFBD>ʼFrame<6D><65>0XFFFFFFFF<46><46>ʾû<CABE>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
DWORD dwEQuakeEFrame; // <20><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>Frame<6D><65>0XFFFFFFFF<46><46>ʾû<CABE>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
int iPreMgcNum; // ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int iCurMgcNum; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int iPostMgcNum; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wRunPreMgc; // <20>Ƿ<EFBFBD><C7B7>Ѿ<EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wAttackType; // <20><><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>ʽ: <20><><EFBFBD><EFBFBD>( <20><> )<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>( ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD> )<29><>ȫ<EFBFBD><C8AB>( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )<29><>ȫ<EFBFBD><C8AB>( ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD> )
WORD wAttackTimeSlice; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>Ժ<EFBFBD><D4BA><EFBFBD>Ϊ<EFBFBD><CEAA>λ
WORD wShowType; // <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>õķ<C3B5>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wScreenX; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾλ<CABE>õ<EFBFBD>X<EFBFBD><EFBFBD>ھ<EFBFBD><DABE><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ʽʱ
WORD wScreenY; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾλ<CABE>õ<EFBFBD>Y<EFBFBD><EFBFBD>ھ<EFBFBD><DABE><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ʽʱ
WORD wPreMgcX; // ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wPreMgcY; // ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wPostMgcX; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wPostMgcY; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wPreMgcOnChar; // ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>ڵذ<DAB5><D8B0>ϣ<EFBFBD><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wCurMgcOnChar; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>ڵذ<DAB5><D8B0>ϣ<EFBFBD><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wPostMgcOnChar; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>ڵذ<DAB5><D8B0>ϣ<EFBFBD><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wMgcFrameCount[MAX_NUM_ATTACKED]; // <20><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>ʱ<EFBFBD><CAB1>Frame Count
WORD wAttackedIndex[MAX_NUM_ATTACKED]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>0 - 19: <20><><EFBFBD><EFBFBD>һλ , 20: ǰ<><C7B0> , 21: <20><><EFBFBD><EFBFBD> , 22: ȫ<><C8AB><EFBFBD>з<EFBFBD>
POS posAttacked[MAX_NUM_ATTACKED]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵı<DFB5><C4B1><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wNumAttacks; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD>
WORD wNumAttackeds; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵĴ<CFB5><C4B4><EFBFBD>
WORD wCurAttackNum; // Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
};
static ATTACK_MAGIC AttMgc; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
static BOOL bRunAttMgc = FALSE; // <20>Ƿ<EFBFBD><C7B7>ѳ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
static int AttackedInfo[4 * 10]; // ʮ<><CAAE><EFBFBD>˵ı<CBB5><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѷ<EFBFBD><D1B6>ÿ<EFBFBD><C3BF><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>λ<EFBFBD><CEBB>Ѷ( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|<7C><><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|<7C>˿۵<CBBF>Ѫ|<7C><><EFBFBD><EFBFBD><EFBFBD>۵<EFBFBD>Ѫ )
static int iAttackedNum; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ
static int iCurAttackedFinishNum; // <20><><EFBFBD><EFBFBD><EFBFBD>ɵĵ<C9B5><C4B5><EFBFBD><EFBFBD><EFBFBD>
static BOOL BuildAttackMagicData(ACTION *pMaster, ACTION *pAttacker); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD>
static BOOL RunTimeMagic(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>غ<EFBFBD>ʽ
#endif
#ifdef __TOCALL_MAGIC
// kjl 02/06/24
#define TOCALL_MAGIC_ID 5711438 // <20>ٻ<EFBFBD><D9BB><EFBFBD>ʶ<EFBFBD><CAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
struct TOCALL_MAGIC
{
DWORD dwCurFrame1; // Ŀǰ<C4BF>Ѳ<EFBFBD><D1B2>Ź<EFBFBD><C5B9><EFBFBD>Frames<65><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>Ź<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ
DWORD dwCurFrame2; // Ŀǰ<C4BF>Ѳ<EFBFBD><D1B2>Ź<EFBFBD><C5B9><EFBFBD>Frames<65><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DWORD dwEQuake; // <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>𶯻<EFBFBD><F0B6AFBB><EFBFBD>
DWORD dwEQuakeSTime; // <20><><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>ʼʱ<CABC><CAB1>
DWORD dwEQuakeETime; // <20><><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>ʱ<EFBFBD><CAB1>
DWORD dwEQuakeSFrame; // <20><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD>Ŀ<EFBFBD>ʼFrame<6D><65>0XFFFFFFFF<46><46>ʾû<CABE>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
DWORD dwEQuakeEFrame; // <20><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>Frame<6D><65>0XFFFFFFFF<46><46>ʾû<CABE>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
int iPreMgcNum; // ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int iCurMgcNum; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int iPostMgcNum; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wRunPreMgc; // <20>Ƿ<EFBFBD><C7B7>Ѿ<EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wAttackType; // <20><><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>ʽ: <20><><EFBFBD><EFBFBD>( <20><> )<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>( ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD> )<29><>ȫ<EFBFBD><C8AB>( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )<29><>ȫ<EFBFBD><C8AB>( ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD> )
WORD wAttackTimeSlice; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>Ժ<EFBFBD><D4BA><EFBFBD>Ϊ<EFBFBD><CEAA>λ
WORD wShowType; // <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>õķ<C3B5>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wScreenX; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾλ<CABE>õ<EFBFBD>X<EFBFBD><EFBFBD>ھ<EFBFBD><DABE><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ʽʱ
WORD wScreenY; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾλ<CABE>õ<EFBFBD>Y<EFBFBD><EFBFBD>ھ<EFBFBD><DABE><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ʽʱ
WORD wPreMgcX; // ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wPreMgcY; // ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wPostMgcX; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wPostMgcY; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wPreMgcOnChar; // ǰ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>ڵذ<DAB5><D8B0>ϣ<EFBFBD><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wCurMgcOnChar; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>ڵذ<DAB5><D8B0>ϣ<EFBFBD><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wPostMgcOnChar; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>ڵذ<DAB5><D8B0>ϣ<EFBFBD><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wMgcFrameCount[MAX_NUM_ATTACKED]; // <20><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>ʱ<EFBFBD><CAB1>Frame Count
WORD wAttackedIndex[MAX_NUM_ATTACKED]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>0 - 19: <20><><EFBFBD><EFBFBD>һλ , 20: ǰ<><C7B0> , 21: <20><><EFBFBD><EFBFBD> , 22: ȫ<><C8AB><EFBFBD>з<EFBFBD>
POS posAttacked[MAX_NUM_ATTACKED]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵı<DFB5><C4B1><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
WORD wNumAttacks; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD>
WORD wNumAttackeds; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵĴ<CFB5><C4B4><EFBFBD>
WORD wCurAttackNum; // Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
WORD wIsPostDisappear; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ
WORD wToCallMagicNo; // <20>ٻ<EFBFBD><D9BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
};
static TOCALL_MAGIC ToCallMgc; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
static BOOL bRunToCallMgc = FALSE; // <20>Ƿ<EFBFBD><C7B7>ѳ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
static BOOL BuildToCallMagicData(ACTION *pMaster, ACTION *pAttacker); // <20>ٻ<EFBFBD><D9BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD>
//static BOOL RunTimeMagic(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>غ<EFBFBD>ʽ
#endif
#ifdef _PROFESSION_ADDSKILL
static int bRunBoundaryMgc_l = 0, bRunBoundaryMgc_r = 0; // <20><>Ч״̬
ACTION *boundary_2,*boundary_mark[2];
static BOOL BuildBoundaryMagicData( int state ); // <20><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD>
static void RunTimeMagicBoundary(int state);
#endif
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
enum {
T_PRIO_TOP, /* ??<3F>I */
T_PRIO_JIKI = 20, /* <20><>? */
T_PRIO_JIKI_MISSILE, /* <20><>?<3F>d */
T_PRIO_MONSTER = 30, /* <20><> */
T_PRIO_UFO = 60, /* ??? */
T_PRIO_MONSTER_MISSILE = 70, /* <20><><EFBFBD>d */
T_PRIO_MISSILE, /* ???? */
T_PRIO_MAGIC_EFFECT, /* ?<3F><>?? */
T_PRIO_HIT_MARK, /* ?????? */
T_PRIO_DAMAGE_NUM, /* ????<3F>k */
T_PRIO_MASTER = 100, /* ???? */
T_PRIO_BOW, /* ? */
T_PRIO_BTM /* ??<3F><> */
};
enum {
D_PRIO_MASTER = 80, /* ???? */
D_PRIO_MONSTER_MISSILE, /* <20><><EFBFBD>d */
D_PRIO_UFO, /* ??? */
D_PRIO_MONSTER, /* <20><> */
D_PRIO_JIKI_MISSILE, /* <20><>?<3F>d */
D_PRIO_JIKI, /* <20><>? */
D_PRIO_MISSILE, /* ???? */
D_PRIO_MAGIC_EFFECT, /* ?<3F><>?? */
D_PRIO_HIT_MARK, /* ?????? */
D_PRIO_DAMAGE_NUM, /* ????<3F>k */
};
#ifdef _ATTACK_EFFECT
void DisplayAttackEffect(ACTION *a0)
{
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
DeathAction(a0);
}
void SetDisplayAttackEffect(ACTION *a0, int iEffectNumber)
{
ACTION *a1, *a2;
a2 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU)); // <20><><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD> ACTION (<28><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>Ч)
if (a2 == NULL)
return;
ATR_NAME(a2) = DisplayAttackEffect;
ATR_CHR_NO(a2) = iEffectNumber;
a1 = ATR_BODY_WORK(0, a0); // ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_DISP_PRIO(a2) = ATR_DISP_PRIO(a1) + 1; // <20><>ʾ<EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>ϲ<EFBFBD>
ATR_H_POS(a2) = ATR_H_POS(a1); // <20><>ʾ<EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
ATR_V_POS(a2) = ATR_V_POS(a1);
}
#endif
/* ???????? *******************************************************************/
void kakushi_command(void)
{
//??????
if (LowResoCmdFlag) // ??<3F>T<EFBFBD><54>????????
return;
//<2F>V?<3F><>???
if ((joy_con[0] & JOY_LEFT) && (joy_con[0] & JOY_RIGHT))
{
LowResoCmdFlag = 1; // ??<3F>T<EFBFBD><54>??????????
//???????
play_se(211, 320, 240);
}
}
#define DAMAGE_SPD 24
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
void damage_num(ACTION *a0)
{
int d0, d1, dx, d2 = 0;
char szMoji[256];
char szMojiP[256];
//andy_mp
char szMojMp[256];
char szMojHp[256];
d0 = 0; dx = 0;
if (slow_flg) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>slow״̬
{
if (s_timer & 3) //<2F><><EFBFBD>ƶ<EFBFBD>
d0 = 1;
}
if (d0 == 0) //<2F>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
switch (ATR_INT_WORK1(a0))
{
case 0:
case 36:
case 37:
case 38:
case 39:
case 40:
#ifdef _SKILL_ADDBARRIER
case 43:
#endif
#ifdef _PETSKILL_PEEL
case 44:
#endif
#ifdef _PETSKILL_JUSTICE
case 45:
#endif
#ifdef _PETSKILL_ADDATTCRAZED
case 46:
case 47:
#endif
#ifdef _PETSKILL_PROVOKEFIGHT
case 48:
#endif
#ifdef _PRO3_ADDSKILL
case 49:
case 50:
case 51:
#endif
case 6:
case 14:
case 15:
case 16:
gemini(a0);
}
switch (ATR_VCT_NO(a0))
{
case 0:
ATR_SPD(a0) -= 2; //<2F><>?<3F><>??????
if (ATR_SPD(a0)) //<2F><>?<3F><>??????
break;
ATR_CRS(a0) = 16;
ATR_VCT_NO(a0) = 1;
break;
case 1:
ATR_SPD(a0) += 2;
if (ATR_SPD(a0) >= DAMAGE_SPD) //<2F><>???
{
ATR_STIMER(a0) = 60;
ATR_VCT_NO(a0) = 2;
}
break;
case 2:
ATR_SPD(a0) = 0; //?<3F>h<EFBFBD>_<EFBFBD><5F>
if (--ATR_STIMER(a0)) //<2F><>???
break;
DeathAction(a0); //<2F><>?
return;
}
}
switch (ATR_INT_WORK1(a0))
{
case 0: //Miss<73><73><EFBFBD><EFBFBD>
sprintf_s(szMoji, "Miss");
d1 = 0; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_MISS;
break;
case 1: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sprintf_s(szMoji, "Counter");
d1 = 1; //ˮɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_COUNTER;
break;
case 3: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sprintf_s(szMoji, "Guard");
d1 = 3; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_GUARD;
break;
case 5: //<2F><>׽<EFBFBD><D7BD><EFBFBD><EFBFBD>
sprintf_s(szMoji, "Capture");
d1 = 5; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_CAPTURE;
break;
case 6: //<2F><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
sprintf_s(szMoji, "%d", ATR_INT_WORK0(a0));
sprintf_s(szMojiP, "%d", ATR_INT_WORKp(a0));
//andy_mp
if (ATR_MPDFLG(a0) == 1)
sprintf_s(szMojMp, "%d", ATR_MPDAMAGE(a0));
if (ATR_ADDHPFLG(a0) == 1)
sprintf_s(szMojHp, "%d", ATR_ADDHP(a0));
d1 = 6; //<2F><>ɫSet
break;
case 7: //<2F><>׽<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>
sprintf_s(szMoji, "Success");
d1 = 5; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_GET;
break;
case 8: //<2F><>׽ʧ<D7BD>ܴ<EFBFBD><DCB4><EFBFBD>
sprintf_s(szMoji, "Fail");
d1 = 6; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_FAIL;
break;
case 9: //<2F><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD>
sprintf_s(szMoji, "Escape");
d1 = 5; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_ESCAPE;
break;
case 10: //<2F>ջس<D5BB><D8B3><EFBFBD><EFB4A6>
sprintf_s(szMoji, "Come!");
d1 = 5; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_COME_ON;
break;
case 11: //<2F>ų<EFBFBD><C5B3><EFBFBD><EFBFBD><EFBFBD><EFB4A6>
sprintf_s(szMoji, "Go!");
d1 = 5; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_GO;
break;
case 12: //<2F>Ƴ<EFBFBD><C6B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sprintf_s(szMoji, "Guard break");
d1 = 5; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_GUARD_BREAK;
break;
case 13: //<2F><><EFBFBD><EFBFBD>???
sprintf_s(szMoji, "Danger");
d1 = 6; //<2F><><EFBFBD><EFBFBD>???
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_DANGER;
break;
case 14: //<2F>ظ<EFBFBD>
sprintf_s(szMoji, "%d", ATR_INT_WORK0(a0));
sprintf_s(szMojiP, "%d", ATR_INT_WORKp(a0));
d1 = 5; //<2F><>ɫSet
break;
case 15: //MP<4D>ظ<EFBFBD>
sprintf_s(szMoji, "%d", ATR_INT_WORK0(a0));
sprintf_s(szMojiP, "%d", ATR_INT_WORKp(a0));
d1 = 4; //<2F><>ɫSet
break;
case 16: //MP<4D>½<EFBFBD>
sprintf_s(szMoji, "%d", ATR_INT_WORK0(a0));
sprintf_s(szMojiP, "%d", ATR_INT_WORKp(a0));
d1 = 3; //<2F><>ɫSet
break;
case 17: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sprintf_s(szMoji, "Leave");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_LEAVE;
break;
case 18: //<2F><><EFBFBD><EFBFBD>NONO
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_NO;
break;
case 19: //CRUSH
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_CRUSH;
break;
case 20: //?????????
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_CAPTURE_UP;
break;
#ifdef _SKILL_ROAR //<2F>輼:<3A><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
case 22:
sprintf_s(szMoji, "Roar");
d1 = 5; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_ROAR;
break;
#endif
#ifdef _SKILL_SELFEXPLODE //<2F>Ա<EFBFBD>
case 23:
sprintf_s(szMoji, "SelfExplode");
d1 = 5; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_selfexplod; //<2F><><EFBFBD><EFBFBD>
break;
#endif
#ifdef _ATTDOUBLE_ATTACK // andy_add
case 25:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_land_att;
break;
case 26:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_water_att;
break;
case 27:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_fire_att;
break;
case 28:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_wind_att;
break;
#endif
case 29:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_tooth;
break;
case 30:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_mic_def;
break;
case 31:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_ironwall;
break;
case 32: //<2F><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_ch_earth;
break;
case 33:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_ch_water;
break;
case 34:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_ch_fire;
break;
case 35:
sprintf_s(szMoji, "No");
d1 = 2; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_ch_wind;
break;
case 36: //andy_add <20>غϲ<D8BA>Ѫ
memset(szMoji, 0, sizeof(szMoji));
memset(szMojiP, 0, sizeof(szMojiP));
if (ATR_INT_WORK0(a0) != 0)
{
sprintf_s(szMoji, "%4d", ATR_INT_WORK0(a0));
sprintf_s(szMojiP, "%4d", ATR_INT_WORKp(a0));
}
if (ATR_MPDAMAGE(a0) != 0)
sprintf_s(szMojMp, "%4d", ATR_MPDAMAGE(a0));
d2 = FONT_PAL_YELLOW;
d1 = FONT_PAL_GREEN;
break;
case 37:
memset(szMoji, 0, sizeof(szMoji));
sprintf_s(szMoji, "<EFBFBD>ر<EFBFBD> %s", (ATR_INT_WORK0(a0) > 0) ? "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" : "<EFBFBD>½<EFBFBD>");
d1 = FONT_PAL_GREEN;
break;
case 38:
memset(szMoji, 0, sizeof(szMoji));
sprintf_s(szMoji, "<EFBFBD><EFBFBD> %s%d<><64>", (ATR_INT_WORK0(a0) > 0) ? "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" : "<EFBFBD>½<EFBFBD>", ATR_INT_WORK0(a0));
d1 = FONT_PAL_GREEN;
break;
case 39:
memset(szMoji, 0, sizeof(szMoji));
sprintf_s(szMoji, "<EFBFBD><EFBFBD> %s%d<><64>", (ATR_INT_WORK0(a0) > 0) ? "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" : "<EFBFBD>½<EFBFBD>", ATR_INT_WORK0(a0));
d1 = FONT_PAL_GREEN;
break;
case 40:
memset(szMoji, 0, sizeof(szMoji));
sprintf_s(szMoji, "<EFBFBD><EFBFBD> %s%d<><64>", (ATR_INT_WORK0(a0) > 0) ? "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" : "<EFBFBD>½<EFBFBD>", ATR_INT_WORK0(a0));
d1 = FONT_PAL_GREEN;
break;
#ifdef _SYUTEST
case 41:
sprintf_s(szMoji, "LightTake");
d1 = 5;
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = SPR_lightget;//<2F><><EFBFBD><EFBFBD>
break;
#endif
//#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
case 41:
sprintf_s(szMoji, "LightTake");
d1 = 5;
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = AttNextMagicNum;//<2F><><EFBFBD><EFBFBD>
#ifdef _WAVETRACK // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (AttNextMagicNum == 101703 && BeAttNum >= 15 && BeAttNum <= 19)
{
if (BeAttNum == 15)
ATR_H_POS(a0) = ATR_H_POS(a0) - 1 ;
else if (BeAttNum == 17)
ATR_H_POS(a0) = ATR_H_POS(a0) - 2 ;
else if (BeAttNum == 19)
ATR_H_POS(a0) = ATR_H_POS(a0) - 3 ;
else if (BeAttNum == 18)
ATR_V_POS(a0) = ATR_V_POS(a0) - 1 ;
}
if (AttNextMagicNum == 101704 && BeAttNum >= 5 && BeAttNum <= 9)
{
if (BeAttNum == 5)
{
if (ATR_CHR_CNT(a0) == 0)
{
ATR_H_POS(a0) = 441;
ATR_V_POS(a0) = 322;
}
else
ATR_H_POS(a0) = ATR_H_POS(a0) + 1;
}
else if (BeAttNum == 6)
{
if (ATR_CHR_CNT(a0) == 0)
{
ATR_H_POS(a0) = 377;
ATR_V_POS(a0) = 370;
}
else
ATR_H_POS(a0) = ATR_H_POS(a0) + 2;
}
else if (BeAttNum == 7)
{
if (ATR_CHR_CNT(a0) == 0)
{
ATR_H_POS(a0) = 505;
ATR_V_POS(a0) = 274;
}
}
else if (BeAttNum == 8)
{
if (ATR_CHR_CNT(a0) == 0)
{
ATR_H_POS(a0) = 313;
ATR_V_POS(a0) = 418;
}
else
ATR_H_POS(a0) = ATR_H_POS(a0) + 3;
}
else if (BeAttNum == 9)
{
if (ATR_CHR_CNT(a0) == 0)
{
ATR_H_POS(a0) = 569;
ATR_V_POS(a0) = 226;
}
else
ATR_V_POS(a0) = ATR_V_POS(a0) + 1;
}
}
#endif
break;
//#endif
#ifdef _EQUIT_ARRANGE
case 42: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sprintf_s(szMoji, "Guard");
d1 = 3; //<2F><>ɫSet
ATR_ATTRIB(a0) = 0;
ATR_CHR_NO(a0) = CG_ICON_GUARD;
break;
#endif
#ifdef _SKILL_ADDBARRIER // Change <20>輼:Ϊħ<CEAA><C4A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><ECB3A3><EFBFBD>Թ<EFBFBD><D4B9><EFBFBD>
case 43:
memset(szMoji, 0, sizeof(szMoji));
if (ATR_INT_WORK0(a0) == 0)
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Իظ<EFBFBD>");
else
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %s%d<><64>", (ATR_INT_WORK0(a0) > 0) ? "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>":"<EFBFBD>½<EFBFBD>", ATR_INT_WORK0(a0));
d1 = FONT_PAL_GREEN;
break;
#endif
#ifdef _PETSKILL_PEEL
case 44:
{
char *tempstr[] = { "ͷ<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "Ь<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"};
memset(szMoji, 0, sizeof(szMoji));
if (ATR_INT_WORK0(a0) > 8)
break;
sprintf_s(szMoji, "ж<EFBFBD><EFBFBD> %s װ<><D7B0>", tempstr[ATR_INT_WORK0(a0)]);
d1 = FONT_PAL_GREEN;
}
break;
#endif
#ifdef _PETSKILL_JUSTICE
case 45:
{
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> %d <20>غ<EFBFBD>", ATR_INT_WORK0(a0));
d1 = FONT_PAL_GREEN;
}
break;
#endif
#ifdef _PETSKILL_ADDATTCRAZED
case 46:
{
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD>ݻر<EFBFBD><EFBFBD>½<EFBFBD>", ATR_INT_WORK0(a0));
d1 = FONT_PAL_GREEN;
}
break;
case 47:
{
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD>ݻرܻظ<EFBFBD>", ATR_INT_WORK0(a0));
d1 = FONT_PAL_GREEN;
}
break;
#endif
#ifdef _PETSKILL_PROVOKEFIGHT
case 48:
{
d1 = FONT_PAL_GREEN;
switch(ATR_INT_WORK0(a0)){
case 0:
sprintf_s(szMoji, "<EFBFBD><EFBFBD>!", ATR_INT_WORK0(a0));
break;
case 1:
sprintf_s(szMoji, "<EFBFBD>ܵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!", ATR_INT_WORK0(a0));
break;
case 2:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Һ<EFBFBD><EFBFBD>ס!", ATR_INT_WORK0(a0));
break;
case 3:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!", ATR_INT_WORK0(a0));
break;
case 4:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", ATR_INT_WORK0(a0));
break;
case 5:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD>վ<EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", ATR_INT_WORK0(a0));
break;
case 6:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", ATR_INT_WORK0(a0));
break;
case 7:
sprintf_s(szMoji, "<EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧЧ", ATR_INT_WORK0(a0));
break;
case 8:
sprintf_s(szMoji, "<EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧЧ", ATR_INT_WORK0(a0));
break;
case 9:
sprintf_s(szMoji, "<EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧЧ", ATR_INT_WORK0(a0));
break;
case 10:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҺЧ<EFBFBD><EFBFBD>!", ATR_INT_WORK0(a0));
break;
#ifdef _PRO3_ADDSKILL
case 11:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹǶϽ<EFBFBD>!");
break;
case 12:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD>!");
break;
case 13:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!");
break;
case 14:
sprintf_s(szMoji, "<EFBFBD><EFBFBD>ο<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!");
break;
case 15:
sprintf_s(szMoji, "<EFBFBD><EFBFBD>ӡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!");
break;
case 16:
sprintf_s(szMoji, "<EFBFBD>ظ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!");
break;
case 17:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD>˶<EFBFBD>ħ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>!");
break;
case 18:
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ħ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>!");
break;
case 19:
sprintf_s(szMoji, "<EFBFBD>ܵ<EFBFBD><EFBFBD>˾<EFBFBD><EFBFBD><EFBFBD>!");
break;
#endif
}
break;
}
#endif
#ifdef _PRO3_ADDSKILL
case 49: //<2F><>ο<EFBFBD><CEBF><EFBFBD><EFBFBD>
{
sprintf_s(szMoji, "<EFBFBD>ҳ϶<EFBFBD> %d ", ATR_INT_WORK0(a0));
d1 = FONT_PAL_GREEN;
}
break;
case 50: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡ
{
char *tempstr[] = { "", "<EFBFBD><EFBFBD>ɽȪ", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĩ<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"<EFBFBD><EFBFBD>Ѫ<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>Ѫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǹ", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD>׸<EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"<EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>λ", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "˫<EFBFBD>ع<EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD>ر<EFBFBD>", "ǹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ͨͶ<EFBFBD><EFBFBD>ʯ", "<EFBFBD><EFBFBD>ͨͶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "״̬<EFBFBD>ظ<EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>", "רעս<EFBFBD><EFBFBD>",
"<EFBFBD>ܻ<EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD>ҹ<EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "׷Ѱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD>ر<EFBFBD>ս<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD>޵<EFBFBD><EFBFBD><EFBFBD>", "ʬ<EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD>ӹ<EFBFBD>", "ѱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ŭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"<EFBFBD>Ը<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD>׿<EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ",
"<EFBFBD>ؽ<EFBFBD><EFBFBD><EFBFBD>", "ˮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD>Ƴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD>յ<EFBFBD>", "Ұ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"<EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD>ѹǶϽ<EFBFBD>", "ս<EFBFBD><EFBFBD>ŭ<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"ħ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡ", "<EFBFBD><EFBFBD>ħ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD><EFBFBD><EFBFBD>",
"<EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ο<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"ս<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ҩѧ" };
memset(szMoji, 0, sizeof(szMoji));
sprintf_s(szMoji, "%s <20><><EFBFBD><EFBFBD>ӡ", tempstr[ATR_INT_WORK0(a0)]);
d1 = FONT_PAL_GREEN;
}
break;
case 51:
{
sprintf_s(szMoji, "<EFBFBD><EFBFBD><EFBFBD>½<EFBFBD>%d", ATR_INT_WORK0(a0) );
d1 = FONT_PAL_GREEN;
}
break;
#endif
}
switch (ATR_INT_WORK1(a0))
{
case 36: //andy_add <20>غϲ<D8BA>Ѫ
if (ATR_RIDE_FLAG(a0) == 1)
StockFontBuffer(ATR_H_POS(a0) - 20, ATR_V_POS(a0) + 32, FONT_PRIO_BACK, d1, szMojiP, 0);
case 37:
case 38:
case 39:
case 40:
#ifdef _SKILL_ADDBARRIER
case 43:
#endif
#ifdef _PETSKILL_PEEL
case 44:
#endif
#ifdef _PETSKILL_JUSTICE
case 45:
#endif
#ifdef _PETSKILL_ADDATTCRAZED
case 46:
case 47:
#endif
#ifdef _PETSKILL_PROVOKEFIGHT
case 48:
#endif
#ifdef _PRO3_ADDSKILL
case 49:
case 50:
case 51:
#endif
StockFontBuffer(ATR_H_POS(a0) - 20, ATR_V_POS(a0), FONT_PRIO_BACK, d1, szMoji, 0);
if (ATR_MPDAMAGE(a0) != 0)
StockFontBuffer(ATR_H_POS(a0) - 20, ATR_V_POS(a0) + 12, FONT_PRIO_BACK, d2, szMojMp, 0);
break;
case 6:
case 14:
case 15:
case 16:
//andy_mp
if (ATR_ADDHPFLG(a0) == 1)//<2F><>Ѫ<EFBFBD><D1AA>
{
StockFontBuffer(ATR_H_POS(a0) - d0, ATR_V_POS(a0), FONT_PRIO_BACK, FONT_PAL_GREEN, szMojHp, 0);
break;
}
d0 = GetStrWidth(szMoji) >> 1;
StockFontBuffer(ATR_H_POS(a0) - d0, ATR_V_POS(a0), FONT_PRIO_BACK, d1, szMoji, 0);
if (ATR_MPDAMAGE(a0) != 0 || ATR_MPDFLG(a0) == 1)//<2F>˺<EFBFBD>
StockFontBuffer(ATR_H_POS(a0) - d0, ATR_V_POS(a0) + 12, FONT_PRIO_BACK, FONT_PAL_YELLOW, szMojMp, 0);
if (ATR_RIDE_FLAG(a0) == 1)
{
dx = GetStrWidth(szMojiP) >> 1;
StockFontBuffer(ATR_H_POS(a0) - dx, ATR_V_POS(a0) + 60, FONT_PRIO_BACK, d1, szMojiP, 0);
}
break;
default:
pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP);
}
}
//<2F>˺<EFBFBD>ֵ<EFBFBD><EFBFBD><E8B6A8><EFBFBD><EFBFBD>
void set_damage_num(ACTION *a0, int color, int v_pos)
{
ACTION *a1;
a1 = GetAction(T_PRIO_DAMAGE_NUM, sizeof(ATR_EQU));
if (a1 == NULL)
return;
/* <20><>??? */
#ifdef _WAVETRACK // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BeAttNum = a0->hitDispNo ;
#endif
ATR_NAME(a1) = damage_num;
//<2F><>ʾ<EFBFBD><CABE><EFBFBD>ȶ<EFBFBD>
ATR_DISP_PRIO(a1) = D_PRIO_DAMAGE_NUM;
/* ???<3F>t */
ATR_H_POS(a1) = ATR_H_POS(a0);
ATR_V_POS(a1) = ATR_V_POS(a0) + v_pos;
ATR_SPD(a1) = DAMAGE_SPD;
ATR_ATTRIB(a1) = ACT_ATR_HIDE;
//Syu mark <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><D0B8><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>damage_num<75>Ĵ<EFBFBD><C4B4>룬damage_num<75><6D>switch<63>Ż<EFBFBD><C5BB><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB>
ATR_INT_WORK1(a1) = color; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD>
if (ATR_ADDHPFLG(a0) == 1)
{
ATR_ADDHP(a1) = ATR_ADDHP(a0);
ATR_ADDHPFLG(a1) = ATR_ADDHPFLG(a0);
}
int dddd = ATR_DAMAGE(a0);
ATR_INT_WORK0(a1) = ATR_DAMAGE(a0); //<2F>˺<EFBFBD><CBBA>
ATR_INT_WORKp(a1) = ATR_PET_DAMAGE(a0); //<2F>˺<EFBFBD><CBBA>
ATR_RIDE_FLAG(a1) = ATR_RIDE(a0);
//andy_mp
ATR_MPDAMAGE(a1) = ATR_MPDAMAGE(a0);
ATR_MPDFLG(a1) = ATR_MPDFLG(a0);
switch (ATR_INT_WORK1(a1))
{
case 0:
case 36:
case 37:
case 38:
case 40:
#ifdef _SKILL_ADDBARRIER
case 43:
#endif
#ifdef _PETSKILL_PEEL
case 44:
#endif
#ifdef _PETSKILL_JUSTICE
case 45:
#endif
#ifdef _PETSKILL_ADDATTCRAZED
case 46:
case 47:
#endif
#ifdef _PETSKILL_PROVOKEFIGHT
case 48:
#endif
#ifdef _PRO3_ADDSKILL
case 49:
case 50:
case 51:
#endif
case 6:
case 14:
case 15:
case 16:
case 19:
break;
default:
#ifdef _SKILL_SELFEXPLODE //<2F>Ա<EFBFBD>
if (ATR_SELFEXPLODE(a0) == 1)
ATR_V_POS(a1) = ATR_V_POS(a0) - SpriteInfo[a0->bmpNo].height / 2 + 20;
else
#endif
#ifdef _SYUTEST
if (color == 41)
ATR_V_POS(a1) = ATR_V_POS(a0) + v_pos;
else
ATR_V_POS(a1) = ATR_V_POS(a0) - 80;
#else
ATR_V_POS(a1) = ATR_V_POS(a0) - 80;
#endif
}
#ifdef _PETSKILL_LER
// <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD><EFBFBD>
if (color == 3 && ATR_CHR_NO(a0) == 101815)
{
ACTION *a2;
a2 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a2 == NULL)
return;
ATR_NAME(a2) = katino;
ATR_BODY_WORK(0, a2) = a0;
ATR_JUJUTSU_WORK(a0) = a2;
ATR_DISP_PRIO(a2) = ATR_DISP_PRIO(a0) + 1;
ATR_H_POS(a2) = ATR_H_POS(a0) + 10;
ATR_V_POS(a2) = ATR_V_POS(a0) + 10;
if (g_bUseAlpha)
ATR_CHR_NO(a2) = 101805;
else
ATR_CHR_NO(a2) = 101858;
}
#endif
#ifdef _PETSKILL_RIDE
//petrideChangeGraph( a0 );
#endif
}
/* ??????<3F><>?? *******************************************************************/
#if 0
??<EFBFBD><EFBFBD>?
????? <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
????? <EFBFBD>Y
????? ?
????? ?<EFBFBD>S
????? ?
????? ?
????? ??????
????? <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
??<EFBFBD><EFBFBD>???
????? <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
????? <EFBFBD>Y
????? ?
????? ?<EFBFBD>S
????? ?
????? ?
????? ??????
????? <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#endif
void play_damage(int no, int x)
{
//??<3F><>???<3F><>????
if (no >= 10100)
no -= 100;
//Ч<><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
switch (no)
{
case 10000: //<2F><><EFBFBD><EFBFBD>
no = 250;
break;
case 10001: //צ
no = 254;
break;
case 10002: //<2F><>
no = 251;
break;
case 10003: //<2F><><EFBFBD><EFBFBD>
no = 251;
break;
case 10004: //ǹ
no = 252;
break;
case 10005: //<2F><>
no = -1;
break;
case 10006: //Ͷ<><CDB6><EFBFBD><EFBFBD>
no = -1;
break;
case 10007: //<2F><><EFBFBD><EFBFBD>
no = 254;
break;
default:
no = 250;
}
//???<3F><>????
if (no != -1)
play_se(no, x, 240);
}
/* ??<3F><><EFBFBD><EFBFBD>?? *******************************************************************/
void disp_kanji(ACTION *a0)
{
int d1, d7;
ACTION *a1;
a1 = ATR_BODY_WORK(0, a0); //?????
if (!--ATR_INT_WORK0(a0)) //<2F><><EFBFBD><EFBFBD>??<3F><>???
{
DeathAction(a1); //????<3F><>
DeathAction(a0); //<2F><>?
p_kanji = NULL;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
}
else
{
if (ATR_LIFE(a1)) //<2F><><EFBFBD><EFBFBD>????
{
for (d1 = 4 + 13, d7 = 0; d7 < 4; d1 += 18, d7++)
{
if (kanji_buf[d7][0]) //<2F><>??????
StockFontBuffer(640 - 4 + -64 * 4 + 24, d1, FONT_PRIO_FRONT, FONT_PAL_WHITE, kanji_buf[d7], 0);
}
}
}
}
/* ?<3F><>???? *******************************************************************/
void magic_effect(ACTION *a0)
{
ACTION *a1;
switch (ATR_VCT_NO(a0))
{
case 0:
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP)) //???<3F><>???
{
ATR_VCT_NO(a0)++;
ATR_CHR_ACT(a0)++;
}
break;
case 1:
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP)) //???<3F><>???
{
ATR_VCT_NO(a0)++;
ATR_CHR_ACT(a0)++;
}
break;
case 2:
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP)) //???<3F><>???
{
DeathAction(a0); //<2F><>?
return;
}
break;
}
a1 = ATR_BODY_WORK(0, a0); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
ATR_H_POS(a0) = ATR_H_POS(a1);
ATR_V_POS(a0) = ATR_V_POS(a1);
}
//HIT_MARK<52><4B><EFBFBD><EFBFBD> ( <20><>ɱ )
void hit_mark_critical(ACTION *a0)
{
if (ATR_STIMER(a0) == ATR_FIRST_FLG(a0) >> 1) //?????
ATR_CHR_NO(a0)--;
if (--ATR_STIMER(a0))
{
gemini(a0);
pattern(a0, 0, 0);
}
else
{
DeathAction(a0); //<2F><><EFBFBD><EFBFBD>
return;
}
}
//HIT_MARK<52><4B><EFBFBD><EFBFBD>
void hit_mark(ACTION *a0)
{
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ATR_KAISHINΪTRUE
if (ATR_KAISHIN(a0))
{
if (ATR_STIMER(a0) == ATR_FIRST_FLG(a0) * 1 / 3) //?????
ATR_CHR_NO(a0)--;
if (ATR_STIMER(a0) == ATR_FIRST_FLG(a0) * 2 / 3) //?????
ATR_CHR_NO(a0)--;
}
else
{
if (ATR_STIMER(a0) == ATR_FIRST_FLG(a0) * 1 / 3) //?????
ATR_CHR_NO(a0)--;
if (ATR_STIMER(a0) == ATR_FIRST_FLG(a0) * 2 / 3) //?????
ATR_CHR_NO(a0)--;
}
if (--ATR_STIMER(a0))
pattern(a0, 0, 0);
else
{
DeathAction(a0); //<2F><><EFBFBD><EFBFBD>
return;
}
}
void set_hit_mark(ACTION *a0)
{
ACTION *a1, *a2;
int d0;
//<2F><>ɱʱ<C9B1><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD><C7B2>DZ<EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD>break
for (d0 = 5; d0 > 0; d0--)
{
//<2F>趨HIT_MARK
a1 = GetAction(T_PRIO_HIT_MARK, sizeof(ATR_EQU));
if (a1 == NULL)
return;
/* <20><>??? */
ATR_NAME(a1) = hit_mark;
//<2F><>ʾ<EFBFBD><CABE><EFBFBD>ȶ<EFBFBD>
ATR_DISP_PRIO(a1) = D_PRIO_HIT_MARK;
//<2F><><EFBFBD><EFBFBD><E8B1BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫͼ
if (ATR_ATTACK_KIND(0, a0) & ATT_GUARD)
//<2F>趨ͼ<E8B6A8><CDBC>
ATR_CHR_NO(a1) = CG_HIT_MARK_12; //<2F><>ɫ
else
//<2F>趨ͼ<E8B6A8><CDBC>
ATR_CHR_NO(a1) = CG_HIT_MARK_22; //<2F><>ɫ
//<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
a2 = ATR_BODY_WORK(0, a0);
ATR_H_POS(a1) = ATR_H_POS(a2);
ATR_V_POS(a1) = ATR_V_POS(a2) - 32;
ATR_SPD(a1) = Rnd(4, 7);
ATR_CRS(a1) = d0 * 6;
if (ATR_HIT_STOP(a0) == HIT_STOP_TIM) //??????????
ATR_FIRST_FLG(a1) = ATR_STIMER(a1) = ATR_HIT_STOP(a0); //<2F><>ʾʱ<CABE><CAB1><EFBFBD>
else
{
ATR_FIRST_FLG(a1) = ATR_STIMER(a1) = ATR_HIT_STOP(a0); //<2F><>ʾʱ<CABE><CAB1><EFBFBD>
ATR_KAISHIN(a1) = 1;
}
//<2F><>ɱʱ<C9B1><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ǣ<EFBFBD><C7A3>DZ<EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & ATT_SATISFACTORY)
{
ATR_NAME(a1) = hit_mark_critical;
ATR_CHR_NO(a1) = CG_HIT_MARK_01;
}
else
break;
}
}
/* <20>\?<3F><><EFBFBD><EFBFBD>???<3F><><EFBFBD><EFBFBD>?? *******************************************************************/
void disp_guard_mark(ACTION *a0)
{
ACTION *a1;
a1 = ATR_BODY_WORK(0, a0);
ATR_H_POS(a0) = ATR_H_POS(a1);
ATR_V_POS(a0) = ATR_V_POS(a1) - 32;
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP)) //???<3F><>???
DeathAction(a0); //<2F><>?
}
void set_guard_mark(ACTION *a0)
{
ACTION *a1;
a1 = GetAction(T_PRIO_HIT_MARK, sizeof(ATR_EQU));
if (a1 == NULL)
return;
ATR_NAME(a1) = disp_guard_mark;
ATR_DISP_PRIO(a1) = D_PRIO_HIT_MARK;
if (ATR_ATTACK_KIND(0, a0) & ATT_REFLEX)
ATR_CHR_NO(a1) = SPR_mirror;
else if (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA)
ATR_CHR_NO(a1) = SPR_barrior;
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
else if (ATR_ATTACK_KIND(0, a0) & ATT_TRAP)
{ //<2F><><EFBFBD><EFBFBD>
if ( a0->hitDispNo >= 10 && a0->hitDispNo <= 19 )
ATR_CHR_NO(a1) = 101630;
else if ( a0->hitDispNo >= 0 && a0->hitDispNo <= 9 )
ATR_CHR_NO(a1) = 101696;
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL)
{
if (ATR_GROUP_FLG(a0) == 0) ATR_CHR_NO(a1) = 101696;
else ATR_CHR_NO(a1) = 101630;
}
#endif
}
#endif
#ifdef _PETSKILL_ACUPUNCTURE
else if (ATR_ATTACK_KIND(0, a0) & ATT_ACUPUNCTURE)
//Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD>ʾЧ<CABE><D0A7>ͼ
#ifdef _FIX_ACUPUNCTURE
ATR_DAMAGE(a0) = ATR_ATTACK_POW(1, a0);
#else
ATR_DAMAGE(a0) = ATR_ATTACK_POW(0, a0)*2;//<2F><EFBFBD>˺<EFBFBD>ֵ
#endif
#endif
#ifdef _PET_ITEM
else if (ATR_ATTACK_KIND(0, a0) & ATT_ATTACKBACK)
ATR_DAMAGE(a0) = ATR_ATTACK_POW(1, a0);
#endif
else
ATR_CHR_NO(a1) = SPR_kyusyu;
ATR_BODY_WORK(0, a1) = ATR_BODY_WORK(0, a0);
}
void set_jujutsu_hit_mark(ACTION *a0)
{
ACTION *a1;
//?????????
a1 = GetAction(T_PRIO_HIT_MARK, sizeof(ATR_EQU));
if (a1 == NULL)
return;
/* <20><>??? */
ATR_NAME(a1) = hit_mark;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_HIT_MARK;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = CG_HIT_MARK_32; //?<3F><>
/* ???<3F>t */
ATR_H_POS(a1) = ATR_H_POS(a0);
ATR_V_POS(a1) = ATR_V_POS(a0) - 32;
ATR_FIRST_FLG(a1) = ATR_STIMER(a1) = HIT_STOP_TIM; //<2F><><EFBFBD><EFBFBD>?????
}
static int piyo_loop_v_tbl[] = {
0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 9, 9, 9, 10, 9,
9, 9, 9, 8, 8, 7, 6, 5, 5, 4, 3, 2, 1, 0, -1, -2,
-3, -4, -4, -5, -6, -7, -8, -8, -9, -9, -9, -9, -10, -9, -9, -9,
-9, -8, -8, -7, -6, -5, -5, -4, -3, -2, -1,
};
static int piyo_loop_h_tbl[] = {
-24, -23, -23, -22, -21, -20, -19, -17, -16, -14, -11, -9, -7, -4, -2, 0, 2,
4, 7, 9, 11, 14, 16, 17, 19, 20, 21, 22, 23, 23, 24, 23, 23,
22, 21, 20, 19, 17, 16, 14, 12, 9, 7, 4, 2, 0, -2, -4, -7,
-9, -11, -14, -16, -17, -19, -20, -21, -22, -23, -23,
};
//?????????? ?????<3F><>?? ??????????
void piyo_loop(ACTION *a0)
{
ACTION *a1;
int d0;
a1 = ATR_BODY_WORK(0, a0); //<2F>o<EFBFBD>l??????
if (ATR_NAME(a1) == NULL || ATR_LIFE(a1) != 0) //????<3F><>???
{
DeathAction(a0); //<2F><>?
return;
}
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
d0 = piyo_loop_h_tbl[ATR_STIMER(a0)];
ATR_H_POS(a0) = ATR_H_POS(a1) + d0 + ATR_INT_WORK0(a0);
d0 = piyo_loop_v_tbl[ATR_STIMER(a0)];
ATR_V_POS(a0) = ATR_V_POS(a1) + d0 + ATR_INT_WORK1(a0);
ATR_STIMER(a0)++;
if (ATR_STIMER(a0) == 60)
ATR_STIMER(a0) = 0;
pattern(a0, 0, 0);
}
//?????????? ????????? ??????????
#define PIYOPIYO_CNT 3
void set_piyo_loop(ACTION *a0)
{
ACTION *a1;
int d7;
for (d7 = 0; d7 < PIYOPIYO_CNT; d7++)
{
//?????????
a1 = GetAction(T_PRIO_HIT_MARK, sizeof(ATR_EQU));
if (a1 == NULL)
return;
/* <20><>??? */
ATR_NAME(a1) = piyo_loop;
ATR_CHR_NO(a1) = SPR_star;
/* ???<3F>t */
ATR_BODY_WORK(0, a1) = a0;
ATR_STIMER(a1) = d7 * (60 / PIYOPIYO_CNT);
//<2F><>?<3F><>??<3F>h
#ifndef __CARYTEST
ATR_INT_WORK0(a1) = a0->anim_x + SpriteInfo[ATR_PAT_NO(a0)].width / 2;
#else
ATR_INT_WORK0(a1) = a0->anim_x + g_lpRealAdrn[ATR_PAT_NO(a0)].width / 2;
#endif
ATR_INT_WORK1(a1) = a0->anim_y;
}
}
/* ?<3F><>?? *******************************************************************/
void katino(ACTION *a0)
{
ACTION *a1;
a1 = ATR_BODY_WORK(0, a0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>??????????
if (ATR_NAME(a1) == NULL || ATR_VCT_NO(a1) == VCT_NO_DIE + 2 || ATR_LIFE(a1) == 0) //<2F><>???
{
ATR_JUJUTSU_WORK(a1) = NULL; //<2F><>?
DeathAction(a0); //<2F><>?
return;
}
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
ATR_H_POS(a0) = ATR_H_POS(a1);
#ifdef _FIXSTATUS // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD <20><><EFBFBD><EFBFBD>ս<EFBFBD><D5BD>״̬<D7B4><CCAC>ʾ<EFBFBD><CABE>ʽ
if (ATR_CHR_NO(a0) == SPR_shock) //<2F><><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_V_POS(a1);
else if (ATR_CHR_NO(a0) == 35120) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_V_POS(a1) - 34 ;
else if (ATR_CHR_NO(a0) == 101702) //<2F><>Sars<72><73><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_V_POS(a1) - 34 ;
else if (ATR_CHR_NO(a0) == 27692) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_V_POS(a1) - 34 ;
else if (ATR_CHR_NO(a0) == 35110) //<2F><><EFBFBD>޵<EFBFBD><DEB5><EFBFBD>
ATR_V_POS(a0) = ATR_V_POS(a1) - 34 ;
else if (ATR_CHR_NO(a0) == 26517) //<2F><><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_V_POS(a1) - 34 ;
else if (ATR_CHR_NO(a0) == CG_HIT_MARK_00)
{ //<2F><>ѣ
StarLoop++;
if (StarLoop <= 20 && StarLoop > 0)
ATR_V_POS(a0) = ATR_V_POS(a1) - 46;
else if (StarLoop <= 40 && StarLoop > 20)
ATR_V_POS(a0) = ATR_V_POS(a1) - 56;
else if (StarLoop <= 60 && StarLoop > 40)
{
ATR_V_POS(a0) = ATR_V_POS(a1) - 56;
ATR_H_POS(a0) = ATR_H_POS(a0) + 16;
}
else if (StarLoop <= 80 && StarLoop > 60)
{
ATR_V_POS(a0) = ATR_V_POS(a1) - 46;
ATR_H_POS(a0) = ATR_H_POS(a0) + 16;
}
if (StarLoop >= 80)
StarLoop = 0 ;
}
#ifdef _PETSKILL_LER
// <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ò<EFBFBD><C3B2><EFBFBD>
else if (ATR_CHR_NO(a0) == 101810 || ATR_CHR_NO(a0) == 101811 || ATR_CHR_NO(a0) == 101863 || ATR_CHR_NO(a0) == 101864);
// <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>λ<EFBFBD><CEBB>Ҫ<EFBFBD><D2AA>
else if (ATR_CHR_NO(a0) == 101805 || ATR_CHR_NO(a0) == 101858)
{
ATR_H_POS(a0) = ATR_H_POS(a1) + 10;
ATR_V_POS(a0) = ATR_V_POS(a1) + 10;
}
#endif
else
ATR_V_POS(a0) = ATR_V_POS(a1) - 64;
#else
if (ATR_CHR_NO(a0) == SPR_shock) //????
ATR_V_POS(a0) = ATR_V_POS(a1);
else
ATR_V_POS(a0) = ATR_V_POS(a1) - 64;
#endif
#ifdef _PETSKILL_LER
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
if (ATR_CHR_NO(a0) == 101810 || ATR_CHR_NO(a0) == 101811 || ATR_CHR_NO(a0) == 101805 ||
ATR_CHR_NO(a0) == 101863 || ATR_CHR_NO(a0) == 101864 || ATR_CHR_NO(a0) == 101858)
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{
ATR_JUJUTSU_WORK(a1) = NULL;
DeathAction(a0);
if (ATR_CHR_ACT(a1) == ANIM_DEAD && ATR_CHR_NO(a1) == 101813)
ATR_CHR_NO(a1) = 101814;
else if (ATR_CHR_ACT(a1) == ANIM_DEAD && ATR_CHR_NO(a1) == 101814)
ATR_CHR_NO(a1) = 101815;
ATR_VCT_NO(a1) = 0;
int i;
for (i = 0; i < BATTLKPKPLYAERNUM; i++)
{
// <20>ҳ<EFBFBD><D2B3>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
if (ATR_CHR_NO(p_party[i]) == ATR_CHR_NO(a1))
break;
}
a1->dir = ATR_CHR_ANG(a1) = i < 10 ? 3:7;
ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
}
}
else
#endif
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP); //???
}
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>
void set_single_jujutsu(int d0, ACTION *a1)
{
if (ATR_LIFE(a1) == 0) //??????
return;
ACTION *a2;
a2 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a2 == NULL)
return;
/* <20><>??? */
ATR_NAME(a2) = katino;
ATR_BODY_WORK(0, a2) = a1;
ATR_JUJUTSU_WORK(a1) = a2;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a2) = ATR_DISP_PRIO(a1) + 1;
/* ???<3F>t */
ATR_H_POS(a2) = ATR_H_POS(a1);
ATR_V_POS(a2) = ATR_V_POS(a1) - 64;
ATR_STIMER(a2) = d0;
/* ?????<3F>k? */
switch (d0)
{
// "<22><>",
case 1:
ATR_CHR_NO(a2) = SPR_poison;
break;
// "??",
case 2:
ATR_CHR_NO(a2) = SPR_shock;
break;
// "<22><>?",
case 3:
ATR_CHR_NO(a2) = SPR_sleep;
break;
// "<22><>?",
case 4:
ATR_CHR_NO(a2) = SPR_stone;
break;
// "?????",
case 5:
ATR_CHR_NO(a2) = SPR_drunk;
break;
// "??"
case 6:
ATR_CHR_NO(a2) = SPR_conf;
break;
#ifdef _MAGIC_WEAKEN //<2F><><EFBFBD><EFBFBD>
case 7:
ATR_CHR_NO(a2) = SPR_weaken;
break;
#endif
#ifdef _MAGIC_DEEPPOISION //<2F>
case 8:
ATR_CHR_NO(a2) = SPR_deeppoison;
break;
#endif
#ifdef _MAGIC_BARRIER
case 9:
ATR_CHR_NO(a2) = SPR_barrier; //ħ<><C4A7>
break;
#endif
#ifdef _MAGIC_NOCAST
case 10:
ATR_CHR_NO(a2) = SPR_nocast; //<2F><>Ĭ
break;
#endif
#ifdef _SARS // WON ADD <20><>ɷ<EFBFBD><C9B7><EFBFBD><EFBFBD>
case 11:
ATR_CHR_NO(a2) = 101702; //<2F><>ɷ<EFBFBD><C9B7><EFBFBD><EFBFBD>
break;
#endif
#ifdef _CHAR_PROFESSION // WON ADD
case 12:
ATR_CHR_NO(a2) = CG_HIT_MARK_00; //<2F><>ѣ
break;
case 13:
ATR_CHR_NO(a2) = 35120; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
break;
case 14:
ATR_CHR_NO(a2) = 35110; //<2F><><EFBFBD>޵<EFBFBD><DEB5><EFBFBD>
break;
case 15:
ATR_CHR_NO(a2) = 27692; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
break;
case 16:
ATR_CHR_NO(a2) = 26517; //<2F><><EFBFBD><EFBFBD>
break;
case 17:
ATR_CHR_NO(a2) = 27692; //<2F><><EFBFBD><EFBFBD>
break;
case 18:
ATR_CHR_NO(a2) = 27012; //<2F><>Ѫ<EFBFBD><D1AA>
break;
case 19:
ATR_CHR_NO(a2) = 27012; //һ<><D2BB><EFBFBD><EFBFBD>Ѫ
break;
case 20:
ATR_CHR_NO(a2) = SPR_conf; //<2F><><EFBFBD><EFBFBD>
break;
case 21:
ATR_CHR_NO(a2) = 0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
break;
case 22:
ATR_CHR_NO(a2) = 0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
break;
case 23:
ATR_CHR_NO(a2) = 100551; //<2F>׸<EFBFBD><D7B8><EFBFBD>
break;
#ifdef _PROFESSION_ADDSKILL
case 32:
ATR_CHR_NO(a2) = SPR_barrier; // ˮ<><CBAE><EFBFBD><EFBFBD>
break;
case 33:
ATR_CHR_NO(a2) = SPR_shock; //<2F>־<EFBFBD>
//case 24:
// ATR_CHR_NO(a2) = 0; // <20><><EFBFBD><EFBFBD><EFBFBD>׸<EFBFBD><D7B8><EFBFBD>
break;
#endif
#endif
#ifdef _PETSKILL_LER
case 34:
if (ATR_CHR_NO(a1) == 101814)
{
// <20><>һ<EFBFBD>α<EFBFBD><CEB1><EFBFBD>
if (g_bUseAlpha)
ATR_CHR_NO(a2) = 101810; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1
else
ATR_CHR_NO(a2) = 101863; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1
ATR_V_POS(a2) = ATR_V_POS(a1);
if (ATR_CHR_ACT_OLD(a1) != ANIM_DEAD)
{
ATR_VCT_NO(a1) = VCT_NO_DIE;
ATR_CHR_NO(a1) = 101813;
}
}
else if (ATR_CHR_NO(a1) == 101815)
{
// <20>ڶ<EFBFBD><DAB6>α<EFBFBD><CEB1><EFBFBD>
if (g_bUseAlpha)
ATR_CHR_NO(a2) = 101811; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2
else
ATR_CHR_NO(a2) = 101864; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2
ATR_V_POS(a2) = ATR_V_POS(a1);
if (ATR_CHR_ACT_OLD(a1) != ANIM_DEAD)
{
ATR_VCT_NO(a1) = VCT_NO_DIE;
ATR_CHR_NO(a1) = 101814;
}
}
break;
#endif
#ifdef _PRO_KILLME
case 35:
ATR_CHR_NO(a2) = 101292; // ŭ
break;
#endif
#ifdef _PRO_ABSOLUTE_DEFENSE
case 36:
ATR_CHR_NO(a2) = 102043;
break;
#endif
#ifdef _PRO3_ADDSKILL
case 37:
ATR_CHR_NO(a2) = 102044;//37 <20><>ħ<EFBFBD><C4A7><EFBFBD><EFBFBD>
break;
case 38:
ATR_CHR_NO(a2) = 102046;//38 <20><><EFBFBD><EFBFBD>֮<EFBFBD><D6AE>
break;
case 39:
ATR_CHR_NO(a2) = 101296;//39 <20><>ο<EFBFBD><CEBF><EFBFBD><EFBFBD>
break;
#endif
}
}
/* <20>N<EFBFBD>ͧT<CDA7><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?? *******************************************************************/
void attrib_reverse(ACTION *a0)
{
ACTION *a1;
a1 = ATR_BODY_WORK(0, a0); //<2F><><EFBFBD>T<EFBFBD><54><EFBFBD><EFBFBD>??????????
if (ATR_NAME(a1) == NULL || ATR_VCT_NO(a1) == VCT_NO_DIE + 2) //<2F><>???
{
ATR_ATTRIB_WORK(a1) = NULL; //<2F><>?
DeathAction(a0); //<2F><>?
return;
}
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
ATR_H_POS(a0) = ATR_H_POS(a1);
ATR_V_POS(a0) = ATR_V_POS(a1) - 64;
ATR_CHR_NO(a0) = SPR_zokusei;
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP); //???
}
/* <20>N<EFBFBD>ͧT<CDA7><54>????? *******************************************************************/
void set_attrib_reverse(ACTION *a1)
{
ACTION *a2;
a2 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a2 == NULL)
return;
/* <20><>??? */
ATR_NAME(a2) = attrib_reverse;
ATR_BODY_WORK(0, a2) = a1;
ATR_ATTRIB_WORK(a1) = a2;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a2) = ATR_DISP_PRIO(a1) + 1;
/* ?????<3F>k? */
ATR_CHR_NO(a2) = CG_ATR_ICON_EARTH_BATTLE;
/* ???<3F>t */
ATR_H_POS(a2) = ATR_H_POS(a1);
ATR_V_POS(a2) = ATR_V_POS(a1) - 64;
}
//int boomerang_pos_tbl[]= {0x320, 0x140, 0x2EE, 0xDC, 0x186, 0x6A, 0x214, 0xAA};
//int boomerang_pos_tbl2[]={0x2EE, 0x118, 0x2BC, 0xB4, 0x154, 0x32, 0x1BE, 0x64};
////<2F><><EFBFBD><EFBFBD><EFBFBD>O<EFBFBD><4F><EFBFBD>[<5B>v<EFBFBD>̌<EFBFBD><CC8C><EFBFBD>
//int boomerang_pos_tbl3a[]={0x104, 0x1A4, 0x64, 0x14A, -0x60, 0xA0, -0x92, 0x104};
//int boomerang_pos_tbl4a[]={0x154, 0x1C2, 0xB4, 0x190, -0x92, 0xC8, -0xC4, 0x12C};
////<2F><><EFBFBD><EFBFBD><EFBFBD>O<EFBFBD><4F><EFBFBD>[<5B>v<EFBFBD>̑O<CC91><4F>
//int boomerang_pos_tbl3b[]={0xC4, 0x1A4, 0x44, 0x16A, -0x60, 0xA0, -0x92, 0x104};
//int boomerang_pos_tbl4b[]={0x154, 0x1C2, 0xB4, 0x1D0, -0x92, 0xC8, -0xC4, 0x12C};
#ifdef _BATTLE_PK_PLAYER_FOR_6VS6
int boomerang_pos_tbl[] = { 0x320, 0x140, 0x2EE, 0xDC, 0x186, 0x6A, 0x214, 0xAA };
int boomerang_pos_tbl2[] = { 0x2EE, 0x118, 0x2BC, 0xB4, 0x154, 0x32, 0x1BE, 0x64 };
//<2F><><EFBFBD>Ͻ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>15ʱ xiezi
int boomerang_pos_tbl3a[] = { 0x104 + 160, 0x1A4 + 120, 0x64 + 160, 0x14A + 120, -0x60 + 160, 0xA0 + 120, -0x92 + 160, 0x104 + 120 };
int boomerang_pos_tbl4a[] = { 0x154 + 160, 0x1C2 + 120, 0xB4 + 160, 0x190 + 120, -0x92 + 160, 0xC8 + 120, -0xC4 + 160, 0x12C + 120 };
//<2F><><EFBFBD>Ͻ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>15ʱ xiezi
int boomerang_pos_tbl3b[] = { 0xC4 + 160, 0x1A4 + 120, 0x44 + 160, 0x16A + 120, -0x60 + 160, 0xA0 + 120, -0x92 + 160, 0x104 + 120 };
int boomerang_pos_tbl4b[] = { 0x154 + 160, 0x1C2 + 120, 0xB4 + 160, 0x1D0 + 120, -0x92 + 160, 0xC8 + 120, -0xC4 + 160, 0x12C + 120 };
#else
int boomerang_pos_tbl[] = { 0x320, 0x140, 0x2EE, 0xDC, 0x186, 0x6A, 0x214, 0xAA };
int boomerang_pos_tbl2[] = { 0x2EE, 0x118, 0x2BC, 0xB4, 0x154, 0x32, 0x1BE, 0x64 };
//<2F><><EFBFBD>Ͻ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>15ʱ xiezi
int boomerang_pos_tbl3a[] = { 0x104 + 160, 0x1A4 + 120, 0x64 + 160, 0x14A + 120, -0x60 + 160, 0xA0 + 120, -0x92 + 160, 0x104 + 120 };
int boomerang_pos_tbl4a[] = { 0x154 + 160, 0x1C2 + 120, 0xB4 + 160, 0x190 + 120, -0x92 + 160, 0xC8 + 120, -0xC4 + 160, 0x12C + 120 };
//<2F><><EFBFBD>Ͻ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>15ʱ xiezi
int boomerang_pos_tbl3b[] = { 0xC4 + 160, 0x1A4 + 120, 0x44 + 160, 0x16A + 120, -0x60 + 160, 0xA0 + 120, -0x92 + 160, 0x104 + 120 };
int boomerang_pos_tbl4b[] = { 0x154 + 160, 0x1C2 + 120, 0xB4 + 160, 0x1D0 + 120, -0x92 + 160, 0xC8 + 120, -0xC4 + 160, 0x12C + 120 };
#endif
void boomerang(ACTION *a0)
{
ACTION *a1, *a2;
int d0, d1;
float dx, dy;
if (ATR_HIT_STOP(a0))
{
if (--ATR_HIT_STOP(a0))
return;
}
switch (ATR_VCT_NO(a0))
{
case 0:
if (ATR_GROUP_FLG(a0) == 0)
{
d0 = boomerang_pos_tbl[ATR_LONG_WORK(0, a0) * 2];
d1 = boomerang_pos_tbl[ATR_LONG_WORK(0, a0) * 2 + 1];
}
else
{
if (ATR_PLACE_NO(a0) >= 15)//<2F><><EFBFBD><EFBFBD>Ҳ<EFBFBD>ǣ<EFBFBD>
{
d0 = boomerang_pos_tbl3b[ATR_LONG_WORK(0, a0) * 2];
d1 = boomerang_pos_tbl3b[ATR_LONG_WORK(0, a0) * 2 + 1];
}
else
{
d0 = boomerang_pos_tbl3a[ATR_LONG_WORK(0, a0) * 2];
d1 = boomerang_pos_tbl3a[ATR_LONG_WORK(0, a0) * 2 + 1];
}
}
if (ATR_FIRST_FLG(a0) == 0)
{
ATR_SPD(a0) = 40;
radar(a0, &d0, &d1);
ATR_CRS(a0) = d0;
ATR_FIRST_FLG(a0) = 1;
}
else
radar2(a0, d0, d1, ATR_LONG_WORK(1, a0));
gemini(a0);
dx = (float)(d0 - ATR_H_POS(a0));
dy = (float)(d1 - ATR_V_POS(a0));
d0 = (int)sqrt((double)(dx * dx + dy * dy));
if (d0 < 20)
ATR_VCT_NO(a0) = 1;
break;
case 1:
if (ATR_SPD(a0) != 32)
ATR_SPD(a0)--;
if (ATR_GROUP_FLG(a0) == 0)
{
d0 = boomerang_pos_tbl2[ATR_LONG_WORK(0, a0) * 2];
d1 = boomerang_pos_tbl2[ATR_LONG_WORK(0, a0) * 2 + 1];
}
else
{
if (ATR_PLACE_NO(a0) >= 15)
{
d0 = boomerang_pos_tbl4b[ATR_LONG_WORK(0, a0) * 2];
d1 = boomerang_pos_tbl4b[ATR_LONG_WORK(0, a0) * 2 + 1];
}
else
{
d0 = boomerang_pos_tbl4a[ATR_LONG_WORK(0, a0) * 2];
d1 = boomerang_pos_tbl4a[ATR_LONG_WORK(0, a0) * 2 + 1];
}
}
radar2(a0, d0, d1, ATR_LONG_WORK(1, a0));
gemini(a0);
dx = (float)(d0 - ATR_H_POS(a0));
dy = (float)(d1 - ATR_V_POS(a0));
d0 = (int)sqrt((double)(dx * dx + dy * dy));
if (d0 < 40)
{
d0 = get_num();
if (d0 == 255)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
DeathAction(a0);
p_missile[0] = NULL;
return;
}
else
{
ATR_BODY_WORK(0, a0) = p_party[d0];
ATR_ATTACK_KIND(0, a0) = get_num();
ATR_ATTACK_POW(0, a0) = get_num();
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a0) = get_num();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a0) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
ATR_VCT_NO(a0) = 2;
}
}
break;
case 2:
if (ATR_SPD(a0) != 40)
ATR_SPD(a0)++;
a1 = ATR_BODY_WORK(0, a0);
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar2(a0, d0, d1, ATR_LONG_WORK(1, a0));
gemini(a0);
dx = (float)(d0 - ATR_H_POS(a0));
dy = (float)(d1 - ATR_V_POS(a0));
d0 = (int)sqrt((double)(dx * dx + dy * dy));
if (d0 > 1000) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ھ<EFBFBD><DABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1000ʱ<30><CAB1>ֱ<EFBFBD>ӽ<EFBFBD><D3BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
ATR_COUNTER_FLG(a0) = 1;
ATR_LONG_WORK(2, a0) = 0;
if (ATR_PLACE_NO(a1) == 17)
{
ATR_H_POS(a0) = ATR_H_POS(a1) + 128;
ATR_V_POS(a0) = ATR_V_POS(a1) - 96;
}
else if (ATR_PLACE_NO(a1) == 16)
{
ATR_H_POS(a0) = ATR_H_POS(a1) + 256;
ATR_V_POS(a0) = ATR_V_POS(a1) - 192;
}
else
{
ATR_H_POS(a0) = ATR_H_POS(a1) + 256;
ATR_V_POS(a0) = ATR_V_POS(a1) - 192;
}
return;
}
if (ATR_COUNTER_FLG(a0) == 1)
{
if (BattleMapNo >= 148 && BattleMapNo <= 150)
d1 = 10 + 5;
else
d1 = 10;
}
else
{
if (BattleMapNo >= 148 && BattleMapNo <= 150)
d1 = 20 + 10;
else
d1 = 20;
}
if (d0 < 80)
{
if (ATR_COUNTER_FLG(a0) == 1 && ATR_LONG_WORK(2, a0) == 0)
{
ATR_LONG_WORK(2, a0) = 1;
a1 = ATR_BODY_WORK(1, a0);
ATR_VCT_NO(a1) = 72;
play_se(14, ATR_H_POS(a0), ATR_V_POS(a0));
}
}
if (d0 < d1)
{
if (ATR_COUNTER_FLG(a0) == 1)
{
DeathAction(a0);
p_missile[0] = NULL;
return;
}
ATR_LONG_WORK(2, a0) = 0;
a2 = ATR_BODY_WORK(0, a0);
if (ATR_LIFE(a2) <= 0)
{
ATR_HIT_STOP(a0) = HIT_STOP_TIM;
goto boomerang_200;
}
#ifdef _PETSKILL_ACUPUNCTURE
////////////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
////////////////////////////////////
#else
////////////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA))
#endif
////////////////////////////////////
#endif
set_guard_mark(a0);
ATR_COMBO(a1) = 0;
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE)
{
ATR_VCT_NO(a1) = 16;
if (ATR_GROUP_FLG(a0) == 0)
ATR_CRS(a1) = crs_change_tbl2[3];
else
ATR_CRS(a1) = crs_change_tbl2[7];
ATR_DAMAGE_ANG(a1) = crs_change_tbl[ATR_CRS(a1)];
ATR_STIMER(a1) = 0;
ATR_FIRST_FLG(a1) = 0;
goto boomerang_200;
}
if (!((ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) | (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION)))
{
if ((ATR_ATTACK_POW(0, a0) == 0) && (ATR_ATTACK_PET_POW(0, a0) == 0))
{
a2 = ATR_BODY_WORK(0, a0);
set_damage_num(a2, 0, -64);
goto boomerang_200;
}
}
if (ATR_ATTACK_KIND(0, a0) & ATT_CRUSH)
set_damage_num(a1, 19, -112);
ATR_AKO_FLG(a1) = 0;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO1)
ATR_AKO_FLG(a1) = 1;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO2)
ATR_AKO_FLG(a1) = 2;
if (ATR_ATTACK_KIND(0, a0) & ATT_DEATH)
ATR_LIFE(a1) = 0;
if (ATR_GROUP_FLG(a0) == 0)
ATR_DAMAGE_ANG(a1) = 1;
else
ATR_DAMAGE_ANG(a1) = 5;
if (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION)
{
if (!ATR_COMBO(a1))
{
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_LIFE(a1) += ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1))
ATR_LIFE(a1) = ATR_MAX_LIFE(a1);
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) > ATR_PET_MAX_LIFE(a1))
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1);
set_damage_num(a1, 14, -64);
ATR_ATTACK_POW(0, a0) = 0;
ATR_ATTACK_PET_POW(0, a0) = 0;
}
}
else if (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA)
{
ATR_ATTACK_POW(0, a0) = 0;
ATR_ATTACK_PET_POW(0, a0) = 0;
}
else
ATR_VCT_NO(a1) = 10;
if (ATR_ATTACK_KIND(0, a0) & ATT_SATISFACTORY)
ATR_KAISHIN(a1) = 1;
else
ATR_KAISHIN(a1) = 0;
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
if (ATR_ATTACK_KIND(0, a0) & ATT_GUARD)
ATR_GUARD_FLG(a1) = 1;
else
ATR_GUARD_FLG(a1) = 0;
if (ATR_LIFE(a1) - ATR_DAMAGE(a1) <= 0)
{
if (ATR_COMBO(a1) == 0)
ATR_KAISHIN(a1) = 1;
}
if (ATR_KAISHIN(a1))
ATR_HIT_STOP(a0) = HIT_STOP_TIM * 4;
else
ATR_HIT_STOP(a0) = HIT_STOP_TIM;
if (ATR_DAMAGE(a1) || (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) || (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION))
{
if (ATR_ATTACK_KIND(0, a0) & ATT_COUNTER)
{
if (ATR_COMBO(a1) == 0)
set_damage_num(a0, 1, -64 + 16);
}
play_se(252, ATR_H_POS(a0), ATR_V_POS(a0));
set_hit_mark(a0);
}
boomerang_200:
ATR_HIT_STOP(a0) /= 4;
d0 = get_num();
if (d0 == 255)
{
ATR_BODY_WORK(0, a0) = ATR_BODY_WORK(1, a0);
ATR_COUNTER_FLG(a0) = 1;
}
else
{
ATR_BODY_WORK(0, a0) = p_party[d0];
ATR_ATTACK_KIND(0, a0) = get_num();
ATR_ATTACK_POW(0, a0) = get_num();
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a0) = get_num();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a0) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
}
}
break;
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
static char stick_ang_tbl[] = { 8, 10, 12, 14, 0, 2, 4, 6 };
/* ?<3F><>???? *******************************************************************/
void stick_bow(ACTION *a0)
{
ACTION *a1, *a2;
int d0, d1;
a1 = ATR_BODY_WORK(0, a0); //<2F>o<EFBFBD>l??????
if (ATR_NAME(a1) == NULL) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>???
{
DeathAction(a0); //<2F><>?
ATR_STIMER(ATR_BODY_WORK(1, a0))++; //???<3F><>
return;
}
switch (ATR_VCT_NO(a0))
{
case 0:
a1 = ATR_BODY_WORK(1, a0); //?<3F>s???????
if (ATR_VCT_NO(a1) == 1)
{
DeathAction(a0); //<2F><>?
return;
}
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
a2 = ATR_BODY_WORK(0, a0); //<2F><>???????
d0 = ATR_H_POS(a2);
d1 = ATR_V_POS(a2);
radar(a1, &d0, &d1); //????
ATR_STIMER(a0)++;
if (ATR_CRS(a0) == 0) //<2F><><EFBFBD><EFBFBD>??
{
if (ATR_SPD(a0) == 0) //???<3F><>??
ATR_CRS(a0) = 16;
else
ATR_SPD(a0) -= 1;
}
else
ATR_SPD(a0) += 1;
gemini(a0);
ATR_H_POS(a0) += ATR_INT_WORK2(a1);
ATR_V_POS(a0) += ATR_INT_WORK3(a1);
break;
case 1:
case 2:
case 3:
a1 = ATR_BODY_WORK(0, a0); //<2F><>???????
#if 0
if (ATR_VCT_NO(a0) == 2) //?<3F><>?<3F>h??
{
if (ATR_VCT_NO(a1) >= VCT_NO_DIE + 1) //<2F>X?<3F><>????
{
DeathAction(a0); //<2F><>?
return;
}
}
else
{
if (ATR_VCT_NO(a1) >= VCT_NO_DIE || ATR_VCT_NO(a1) == 0) //<2F>r???????
{
if (ATR_VCT_NO(a1) == 0) //<2F>r???
{
DeathAction(a0); //<2F><>?
ATR_STIMER(ATR_BODY_WORK(1, a0))++; //???<3F><>
return;
}
else
{
ATR_VCT_NO(a0) = 2;
break;
}
}
}
#else
if (ATR_VCT_NO(a0) == 2) //?<3F><>?<3F>h??
{
if (ATR_VCT_NO(a1) >= VCT_NO_DIE + 1) //<2F>X?<3F><>????
{
DeathAction(a0); //<2F><>?
return;
}
}
else if (ATR_VCT_NO(a0) == 3)
{
if (ATR_VCT_NO(ATR_BODY_WORK(1, a0)) == 0) //??<3F><>???
{
DeathAction(a0); //<2F><>?
return;
}
}
else
{
if (ATR_VCT_NO(a1) >= VCT_NO_DIE || ATR_VCT_NO(a1) == 0) //<2F>r???????
{
ATR_STIMER(ATR_BODY_WORK(1, a0))++; //???<3F><>
if (ATR_VCT_NO(a1) == 0) //<2F>r???
{
ATR_VCT_NO(a0) = 3;
return;
}
else
{
ATR_VCT_NO(a0) = 2;
break;
}
}
}
#endif
ATR_H_POS(a0) = ATR_H_POS(a1) + ATR_INT_WORK0(a0);
ATR_V_POS(a0) = ATR_V_POS(a1) + ATR_INT_WORK1(a0);
ATR_CHR_ANG(a0) = (ATR_CHR_ANG(a1) + 4) & 7; //?????
ATR_CHR_NO(a0) = CG_ARROW_00 + stick_ang_tbl[ATR_CHR_ANG(a0)]; //
ATR_H_MINI(a0) = 0; //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_MINI(a0) = 0;
ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a1)];
gemini(a0);
gemini(a0);
if (ATR_CHR_ANG(a1) == 3 || ATR_CHR_ANG(a1) == 4 || ATR_CHR_ANG(a1) == 5) //??????
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1); //<2F><><EFBFBD><EFBFBD>?<3F>I???
else
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1; //<2F><><EFBFBD><EFBFBD>?<3F>I???
break;
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
#ifdef _SHOOTCHESTNUT // Syu ADD <20><EFBFBD><E8BCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void shoot(ACTION *a0)
{
ACTION *a1, *a2;
int d0, d1;
a1 = ATR_BODY_WORK(0, a0);
if (ATR_NAME(a1) == NULL)
{
DeathAction(a0);
ATR_STIMER(ATR_BODY_WORK(1, a0))++;
return;
}
switch (ATR_VCT_NO(a0))
{
case 0:
a1 = ATR_BODY_WORK(1, a0);
if (ATR_VCT_NO(a1) == 1)
{
DeathAction(a0);
return;
}
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
a2 = ATR_BODY_WORK(0, a0);
d0 = ATR_H_POS(a2);
d1 = ATR_V_POS(a2);
radar(a1, &d0, &d1);
ATR_STIMER(a0)++;
if (ATR_CRS(a0) == 0)
{
if (ATR_SPD(a0) == 0)
ATR_CRS(a0) = 16;
else
ATR_SPD(a0) -= 1;
}
else
ATR_SPD(a0) += 1;
gemini(a0);
ATR_H_POS(a0) += ATR_INT_WORK2(a1);
ATR_V_POS(a0) += ATR_INT_WORK3(a1);
break;
case 1:
case 2:
case 3:
a1 = ATR_BODY_WORK(0, a0);
if (ATR_VCT_NO(a0) == 2)
{
if (ATR_VCT_NO(a1) >= VCT_NO_DIE + 1)
{
DeathAction(a0);
return;
}
}
else if (ATR_VCT_NO(a0) == 3)
{
if (ATR_VCT_NO(ATR_BODY_WORK(1, a0)) == 0)
{
DeathAction(a0);
return;
}
}
else
{
if (ATR_VCT_NO(a1) >= VCT_NO_DIE || ATR_VCT_NO(a1) == 0)
{
ATR_STIMER(ATR_BODY_WORK(1, a0))++;
if (ATR_VCT_NO(a1) == 0)
{
DeathAction(a0);
ATR_VCT_NO(a0) = 3;
return;
}
else
{
ATR_VCT_NO(a0) = 2;
break;
}
}
}
ATR_H_POS(a0) = ATR_H_POS(a1) + ATR_INT_WORK0(a0);
ATR_V_POS(a0) = ATR_V_POS(a1) + ATR_INT_WORK1(a0) + 32 + (a0->anim_cnt * 4);
ATR_CHR_ANG(a0) = (ATR_CHR_ANG(a1) + 4) & 7;
if (a0->anim_cnt == 5)
ATR_CHR_NO(a0) = 0;
else if (ATR_CHR_NO(a0) != 0)
ATR_CHR_NO(a0) = 101611;
ATR_H_MINI(a0) = 0;
ATR_V_MINI(a0) = 0;
ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a1)];
gemini(a0);
gemini(a0);
if (ATR_CHR_ANG(a1) == 3 || ATR_CHR_ANG(a1) == 4 || ATR_CHR_ANG(a1) == 5)
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1);
else
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
break;
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
#endif
/* ??<3F>h?? *******************************************************************/
void bow(ACTION *a0)
{
ACTION *a1, *a2;
int d0, d1;
switch (ATR_VCT_NO(a0))
{
case 0:
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
//???????
if (!--ATR_GROUP_FLG(a0))
{
a2 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_LIFE(a2) <= 0) //??????
{
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 1; //????????
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
}
#ifdef _PETSKILL_ACUPUNCTURE
///////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
///////////////////////////////
#else
///////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA))
#endif
///////////////////////////////
#endif
set_guard_mark(a0);
ATR_COMBO(a1) = 0;
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE)
{
ATR_HIT_STOP(a0) = 32; //??????????
ATR_VCT_NO(a0) = 1; //????????
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 16; //????
ATR_CRS(a1) = ATR_CRS(a0); //<2F><>?????????????
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //
ATR_STIMER(a1) = 0;
ATR_FIRST_FLG(a1) = 0; //??????????
break;
}
if (!((ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) | (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION)))
{
if ((ATR_ATTACK_POW(0, a0) == 0) && (ATR_ATTACK_PET_POW(0, a0) == 0)) //????
{
a2 = ATR_BODY_WORK(0, a0); //<2F><>????????
set_damage_num(a2, 0, -64); //??<3F><><EFBFBD><EFBFBD>
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 1; //????????
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
}
}
//?<3F><>????????
if (ATR_ATTACK_KIND(0, a0) & ATT_CRUSH)
//?????<3F><><EFBFBD><EFBFBD>
set_damage_num(a1, 19, -112);
//?????????
ATR_AKO_FLG(a1) = 0;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO1) //??????
ATR_AKO_FLG(a1) = 1;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO2) //??????
ATR_AKO_FLG(a1) = 2;
if (ATR_ATTACK_KIND(0, a0) & ATT_DEATH) //?????
ATR_LIFE(a1) = 0; //?<3F><>????
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //
if (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION) //?<3F><>?????
{
if (!ATR_COMBO(a1)) //????????
{
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_LIFE(a1) += ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) > ATR_PET_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1); //?<3F><>???
set_damage_num(a1, 14, -64);
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //????<3F><>?
}
}
else if (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) //????????
{
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //????<3F><>?
}
else
ATR_VCT_NO(a1) = 10; //?????<3F><>
//?<3F><>?????
if (ATR_ATTACK_KIND(0, a0) & ATT_SATISFACTORY)
ATR_KAISHIN(a1) = 1; //?<3F><>??????
else
ATR_KAISHIN(a1) = 0; //<2F>G<EFBFBD><47>?????
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
//?????
if (ATR_ATTACK_KIND(0, a0) & ATT_GUARD)
ATR_GUARD_FLG(a1) = 1;
else
ATR_GUARD_FLG(a1) = 0;
if (ATR_LIFE(a1) - ATR_DAMAGE(a1) <= 0) //?<3F><>????
{
//????????
if (ATR_COMBO(a1) == 0)
ATR_KAISHIN(a1) = 1; //?<3F><>??????
}
if (ATR_KAISHIN(a1)) //?<3F><>?????
ATR_HIT_STOP(a0) = HIT_STOP_TIM * 4; //??????????
else
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
//???????????<3F><>??
if (ATR_DAMAGE(a1) || (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) || (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION))
{
if (ATR_ATTACK_KIND(0, a0) & ATT_COUNTER) //???????
{
//????????
if (ATR_COMBO(a1) == 0)
set_damage_num(a0, 1, -64 + 16); //?????<3F><><EFBFBD><EFBFBD>
}
//???
play_se(12, ATR_H_POS(a0), ATR_V_POS(a0));
//?????????
set_hit_mark(a0);
}
ATR_STIMER(a0) = ATR_HIT_STOP(a0) + 64; //<2F><>??<3F><>?????
ATR_INT_WORK0(a0) = Rnd(0, 8) - 4; //??<3F><>?????
ATR_INT_WORK1(a0) = Rnd(0, 8) - 4 - 28; //??<3F><>?????!!!
#ifdef _SHOOTCHESTNUT // Syu ADD <20><EFBFBD><E8BCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ShooterNum == 101578)
ATR_NAME(a0) = shoot; //<2F><>?????
else
ATR_NAME(a0) = stick_bow; //<2F><>?????
#else
ATR_NAME(a0) = stick_bow; //<2F><>?????
#endif
ATR_VCT_NO(a0) = 1; //
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
ATR_V_POS(a0) -= 28; //!!!
ATR_CHR_ACT(a0) = 0;
p_missile[0] = NULL; //???????<3F><>
ATR_SPD(a0) = 40; //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//???
}
else
{
ATR_INT_WORK2(a0) = ATR_H_POS(a0); //?<3F>h??<3F><>
ATR_INT_WORK3(a0) = ATR_V_POS(a0); //
gemini(a0); //?<3F>h
ATR_INT_WORK2(a0) = ATR_H_POS(a0) - ATR_INT_WORK2(a0);
ATR_INT_WORK3(a0) = ATR_V_POS(a0) - ATR_INT_WORK3(a0);
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 1:
if (--ATR_HIT_STOP(a0)) //??????????
break;
//???????
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE)
ATR_STIMER(a0) = 32;
else
ATR_STIMER(a0) = 64;
ATR_VCT_NO(a0) = 2;
a0->atr = ACT_ATR_HIDE;
p_missile[0] = NULL;
break;
case 2:
if (--ATR_STIMER(a0))
break;
ATR_STIMER(ATR_BODY_WORK(1, a0))++; //???<3F><>
DeathAction(a0); //<2F><>?
break;
}
}
/* ????? *******************************************************************/
void axe(ACTION *a0)
{
ACTION *a1, *a2;
int d0, d1;
switch (ATR_VCT_NO(a0))
{
case 0:
a1 = ATR_BODY_WORK(1, a0); //?<3F>s???????
if (ATR_VCT_NO(a1) == 1)
{
DeathAction(a0); //<2F><>?
return;
}
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
a2 = ATR_BODY_WORK(0, a0); //<2F><>???????
d0 = ATR_H_POS(a2);
d1 = ATR_V_POS(a2);
radar(a1, &d0, &d1); //????
ATR_STIMER(a0)++;
if (ATR_CRS(a0) == 0) //<2F><><EFBFBD><EFBFBD>??
{
if (ATR_SPD(a0) == 0) //???<3F><>??
ATR_CRS(a0) = 16;
else
ATR_SPD(a0) -= 1;
}
else
ATR_SPD(a0) += 1;
gemini(a0);
ATR_H_POS(a0) += ATR_INT_WORK2(a1);
ATR_V_POS(a0) += ATR_INT_WORK3(a1);
break;
case 1:
break;
case 2:
ATR_VCT_NO(a0)++;
break;
case 3:
a1 = ATR_BODY_WORK(1, a0); //?<3F>s???????
if (ATR_VCT_NO(a1) == 1)
{
DeathAction(a0); //<2F><>?
return;
}
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
if (ATR_CRS(a0) == 0) //<2F><><EFBFBD><EFBFBD>??
{
if (ATR_SPD(a0) == 0) //???<3F><>??
ATR_CRS(a0) = 16;
else
ATR_SPD(a0) -= 2;
}
else
ATR_SPD(a0) += 2;
gemini(a0);
ATR_H_POS(a0) += ATR_INT_WORK2(a1);
ATR_V_POS(a0) += ATR_INT_WORK3(a1);
break;
case 4:
a1 = ATR_BODY_WORK(1, a0); //?<3F>s???????
ATR_H_POS(a0) = ATR_H_POS(a1);
ATR_V_POS(a0) = ATR_V_POS(a1);
ATR_CHR_ACT(a0) = 1; //<2F><>?????????
break;
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
#ifdef _FIREHUNTER_SKILL // (<28><><EFBFBD>ɿ<EFBFBD>) ROG ADD <20><>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ
void fireHunter(ACTION *a0)
{
ACTION *a1, *a2;
int i = 0;
int j = 0;
int d0, d1;
a1 = ATR_BODY_WORK(0, a0); //<2F><><EFBFBD>˵<EFBFBD>λַ
switch (ATR_VCT_NO(a0))
{
case 0: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (bFireInit)
{
int EnemyPos[4][2] = {{403 , 422}, {223 , 388},{7 , 198},{19 , 318},};
int refPos, difPosH, difPosV;
int interval = 0;
int difPos_v = 0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱλַ<CEBB><D6B7><EFBFBD><EFBFBD>
int difPos_h = 0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱλַ<CEBB><D6B7><EFBFBD><EFBFBD>
int j = 1;
ATR_INT_WORK2(a0) = ATR_H_POS(a0);
ATR_INT_WORK3(a0) = ATR_V_POS(a0);
for (i = 2; i < 8 ; i++)
{
p_missile[i] = GetAction(T_PRIO_BOW, sizeof(ATR_EQU));
ATR_INT_WORK2(p_missile[i]) = ATR_H_POS(a0);
ATR_INT_WORK3(p_missile[i]) = ATR_V_POS(a0);
ATR_CHR_NO(p_missile[i]) = 101734; //ͼ<><CDBC>
ATR_CHR_ANG(p_missile[i]) = ATR_CHR_ANG(a0);
ATR_CRS(p_missile[i]) = ATR_CRS(a0);
ATR_SPD(p_missile[i]) = 60;
}
if (iBeAttNum < 5)
{
refPos = 0;
difPosH = 32;
difPosV = 24;
}
else if (iBeAttNum < 10)
{
refPos = 1;
difPosH = 64;
difPosV = 48;
}
else if (iBeAttNum < 15)
{
refPos = 2;
difPosH = 32;
difPosV = 24;
}
else if (iBeAttNum < 20)
{
refPos = 3;
difPosH = 64;
difPosV = 48;
}
for (i = 1; i < 9; i++)
{
p_missile[i + 7] = GetAction(T_PRIO_BOW, sizeof(ATR_EQU));
ATR_H_POS(p_missile[i + 7]) = EnemyPos[refPos][0] + difPosH * i;
ATR_V_POS(p_missile[i + 7]) = EnemyPos[refPos][1] - difPosV * i;
ATR_CHR_NO(p_missile[i + 7]) = 101735; //ͼ<><CDBC>
}
ATR_STIMER(a0) = 80;
if (iBeAttNum == 18 || iBeAttNum == 11 || iBeAttNum == 19)
interval = ATR_GROUP_FLG(a0) / 7;
else
interval = ATR_GROUP_FLG(a0) / 6;
for (i = 0; i < ATR_GROUP_FLG(a0); i++)
{
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //<2F>״<EFBFBD>(<28><><EFBFBD><EFBFBD>·<EFBFBD><C2B7>)
ATR_CRS(a0) = d0; //<2F><><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
gemini(a0);
if (i == interval * j)
{
switch (iBeAttNum) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱλַ<CEBB><D6B7><EFBFBD><EFBFBD>
{
case 10:
case 12:
difPos_v += 7; //<2F><><EFBFBD><EFBFBD>
difPos_h += 2; //<2F>Ƕ<EFBFBD>
break;
case 14:
difPos_v += 10;
difPos_h += 2;
break;
case 15:
difPos_v += 4;
break;
case 16:
difPos_v += 5;
difPos_h -= 5;
break;
case 17:
difPos_v += 3;
break;
case 18:
difPos_v += 5;
difPos_h -= 5;
break;
case 19:
difPos_v += 17;
difPos_h -= 2;
break;
case 11:
difPos_v += 5;
difPos_h -= 5;
break;
/* case 8:
difPos_v += 7;
difPos_h -= 5;
break;
case 5:
difPos_v +=7;
difPos_h -=10;
break;*/
}
if (iBeAttNum < 10)
{
//difPos_h -= 10;//<2F>Ƕ<EFBFBD>
difPos_v += 10; //<2F><><EFBFBD><EFBFBD>
}
ATR_V_POS(p_missile[j+1]) = ATR_V_POS(a0) - difPos_v;
ATR_H_POS(p_missile[j+1]) = ATR_H_POS(a0) + difPos_h;
if (j < 6)
j++;
}
}
ATR_V_POS(a0) -= difPos_v;
ATR_H_POS(a0) += difPos_h;
bFireInit = FALSE;
}
//׼<><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (!FireSkillEnd)
{
#ifdef _PETSKILL_ACUPUNCTURE
/////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
/////////////////////////////
#else
/////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA))
#endif
/////////////////////////////
#endif
set_guard_mark(a0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_COMBO(a1) = 0; //<2F><><EFBFBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE) //<2F><><EFBFBD><EFBFBD>
{
for (i = 0; i < ATR_BODY_CNT(a0); i++) //<2F><><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
if ((i + 2) != tarpos)
{
a2 = ATR_BODY_WORK(i + 2, a0);
ATR_DAMAGE(a2) = ATR_ATTACK_POW(i + 2, a0);
j = ATR_DAMAGE(a2);
ATR_PET_DAMAGE(a2) = ATR_ATTACK_PET_POW(i + 2, a0);
ATR_VCT_NO(a2) = 10; //<2F>ͳ<EFBFBD><CDB3>˺<EFBFBD>ѶϢ
ATR_STIMER(a2) = 0;
ATR_FIRST_FLG(a2) = 0;
}
}
ATR_HIT_STOP(a0) = 32; //<2F><><EFBFBD><EFBFBD>ֹͣ
ATR_VCT_NO(a0) = 1; //ֹͣ
gemini(a0);
ATR_VCT_NO(a1) = 16; //<2F><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>
ATR_CRS(a1) = ATR_CRS(a0); //·<><C2B7>
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0);
ATR_STIMER(a1) = 0;
ATR_FIRST_FLG(a1) = 0;
break;
}
if (!((ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) | (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION)))
{
if ((ATR_ATTACK_POW(0, a0) == 0) && (ATR_ATTACK_PET_POW(0, a0) == 0)) //????
{
//<2F>˺<EFBFBD>
set_damage_num(a1, 0, -64);
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //<2F><><EFBFBD><EFBFBD>ֹͣ
ATR_VCT_NO(a0) = 1; //<2F><><EFBFBD><EFBFBD>ֹͣ
for (i = 0; i < ATR_BODY_CNT(a0); i++) //<2F><><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
if ((i + 2) != tarpos)
{
a2 = ATR_BODY_WORK(i + 2, a0);
ATR_DAMAGE(a2) = ATR_ATTACK_POW(i + 2, a0);
j = ATR_DAMAGE(a2);
ATR_PET_DAMAGE(a2) = ATR_ATTACK_PET_POW(i + 2, a0);
ATR_VCT_NO(a2) = 10; //<2F>ͳ<EFBFBD><CDB3>˺<EFBFBD>ѶϢ
ATR_STIMER(a2) = 0;
ATR_FIRST_FLG(a2) = 0;
}
}
break;
}
}
//ѹ<><D1B9>
if (ATR_ATTACK_KIND(0, a0) & ATT_CRUSH)
//ѹ<><D1B9>
set_damage_num(a1, 19, -112);
//<2F>趨KO
ATR_AKO_FLG(a1) = 0;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO1) //KO1
ATR_AKO_FLG(a1) = 1;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO2) //KO2
ATR_AKO_FLG(a1) = 2;
if (ATR_ATTACK_KIND(0, a0) & ATT_DEATH) //<2F><><EFBFBD><EFBFBD>
ATR_LIFE(a1) = 0; //<2F><EFBFBD><E8B6A8><EFBFBD><EFBFBD>
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //<2F><EFBFBD>˺<EFBFBD><CBBA>Ƕ<EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
if (!ATR_COMBO(a1)) //<2F><><EFBFBD><EFBFBD>
{
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_LIFE(a1) += ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) > ATR_PET_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1); //?<3F><>???
set_damage_num(a1, 14, -64);
ATR_ATTACK_POW(0, a0) = 0;
ATR_ATTACK_PET_POW(0, a0) = 0;
}
}
else if (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) //????????
{
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //????<3F><>?
}
else
ATR_VCT_NO(a1) = 10; //<2F>ͳ<EFBFBD><CDB3>˺<EFBFBD>ѶϢ
/* //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
if (ATR_ATTACK_KIND(0, a0) & ATT_SATISFACTORY){
ATR_KAISHIN(a1) = 1; //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
} else {
ATR_KAISHIN(a1) = 0; //ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}*/
ATR_KAISHIN(a1) = 0; //ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
//<2F><><EFBFBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & ATT_GUARD)
ATR_GUARD_FLG(a1) = 1;
else
ATR_GUARD_FLG(a1) = 0;
if (ATR_LIFE(a1) - ATR_DAMAGE(a1) <= 0) //<2F><><EFBFBD><EFBFBD>
{
ATR_LONG_WORK(1, a0) = 1; //<2F><><EFBFBD><EFBFBD><EFBFBD>
//<2F><><EFBFBD><EFBFBD>
if (ATR_COMBO(a1) == 0)
ATR_KAISHIN(a1) = 1; //<2F><EFBFBD><E8B6A8><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
}
if (ATR_KAISHIN(a1)) //<2F><EFBFBD><E8B6A8><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
ATR_HIT_STOP(a0) = HIT_STOP_TIM * 4; //<2F><EFBFBD><E8B6A8><EFBFBD><EFBFBD>ֹͣʱ<D6B9><CAB1>
else
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //<2F><EFBFBD><E8B6A8><EFBFBD><EFBFBD>ֹͣʱ<D6B9><CAB1>
if (ATR_DAMAGE(a1) || (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) || (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION))
{
if (ATR_ATTACK_KIND(0, a0) & ATT_COUNTER) //???????
{
//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
if (ATR_COMBO(a1) == 0)
set_damage_num(a0, 1, -64 + 16); //<2F>˺<EFBFBD><CBBA><EFBFBD>ʾ
}
//???
play_se(252, ATR_H_POS(a0), ATR_V_POS(a0));
//<2F><>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD>
set_hit_mark(a0);
}
ATR_HIT_STOP(a0) /= 4; //???????<3F><>???
ATR_VCT_NO(a0) = 3; //
for (i = 0; i < ATR_BODY_CNT(a0); i++) //<2F><><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
if ((i + 2) != tarpos)
{
a2 = ATR_BODY_WORK(i + 2, a0);
ATR_DAMAGE(a2) = ATR_ATTACK_POW(i + 2, a0);
j = ATR_DAMAGE(a2);
ATR_PET_DAMAGE(a2) = ATR_ATTACK_PET_POW(i + 2, a0);
ATR_VCT_NO(a2) = 10; //<2F>ͳ<EFBFBD><CDB3>˺<EFBFBD>ѶϢ
ATR_STIMER(a2) = 0;
ATR_FIRST_FLG(a2) = 0;
}
}
}
else
{
if (ATR_STIMER(a0))
ATR_STIMER(a0)--;
if (p_missile[2] != NULL)
{
if (pattern(p_missile[2], ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(p_missile[2]);
p_missile[2] = NULL;
}
}
if (ATR_STIMER(a0) < 70 && p_missile[3] != NULL)
{
if (pattern(p_missile[3], ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(p_missile[3]);
p_missile[3] = NULL;
}
}
if (ATR_STIMER(a0) < 60 && p_missile[4] != NULL)
{
if (pattern(p_missile[4], ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(p_missile[4]);
p_missile[4] = NULL;
}
}
if (ATR_STIMER(a0) < 50 && p_missile[5] != NULL)
{
if (pattern(p_missile[5], ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(p_missile[5]);
p_missile[5] = NULL;
}
}
if (ATR_STIMER(a0) < 40 && p_missile[6] != NULL)
{
if (pattern(p_missile[6], ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(p_missile[6]);
p_missile[6] = NULL;
}
}
if (iBeAttNum > 9)
{
if (ATR_STIMER(a0) < 30 && p_missile[7] != NULL)
{
if (pattern(p_missile[7], ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(p_missile[7]);
p_missile[7] = NULL;
}
}
}
if (ATR_STIMER(a0) < 20)
{
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP) && p_missile[6] == NULL)
{
counter = 0;
ATR_VCT_NO(a0) = 8;
}
}
}
break;
case 1:
if (--ATR_HIT_STOP(a0)) //<2F><><EFBFBD><EFBFBD>ֹͣ<CDA3><D6B9>
break;
ATR_CHR_ACT(a0) = 0; //<2F>ƶ<EFBFBD>
//<2F><><EFBFBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE)
ATR_STIMER(a0) = 32;
else
ATR_STIMER(a0) = 64;
if (tarpos != -1)
{
a2 = ATR_BODY_WORK(tarpos, a0);
ATR_DAMAGE(a2) = ATR_ATTACK_POW(tarpos, a0);
ATR_PET_DAMAGE(a2) = ATR_ATTACK_PET_POW(tarpos, a0);
ATR_VCT_NO(a2) = 10; //<2F>ͳ<EFBFBD><CDB3>˺<EFBFBD>ѶϢ
ATR_STIMER(a2) = 0;
ATR_FIRST_FLG(a2) = 0;
tarpos = -1;
}
ATR_VCT_NO(a0) = 2;
a0->atr = ACT_ATR_HIDE;
p_missile[0] = NULL;
p_missile[1] = NULL;
break;
case 2:
if (--ATR_STIMER(a0))
break;
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //<2F><><EFBFBD><EFBFBD>
p_missile[0] = NULL;
DeathAction(a0); //<2F><>?
break;
case 3:
if (--ATR_HIT_STOP(a0)) //<2F><><EFBFBD><EFBFBD>ֹͣ<CDA3><D6B9>
break;
/* if ( tarMgiDem )
{
a2 = ATR_BODY_WORK(2 ,a0);
ATR_DAMAGE(a2) = ATR_ATTACK_POW(2 ,a0);
ATR_PET_DAMAGE(a2) = ATR_ATTACK_PET_POW(2 ,a0);
ATR_VCT_NO(a2) = 10; //<2F>ͳ<EFBFBD><CDB3>˺<EFBFBD>ѶϢ
ATR_STIMER(a2) = 0;
ATR_FIRST_FLG(a2) = 0;
int k = ATR_DAMAGE(a2);
set_damage_num(a2, 0, -64);
tarMgiDem = 0;
}*/
if (tarpos != -1)
{
a2 = ATR_BODY_WORK(tarpos, a0);
ATR_DAMAGE(a2) = ATR_ATTACK_POW(tarpos, a0);
ATR_PET_DAMAGE(a2) = ATR_ATTACK_PET_POW(tarpos, a0);
ATR_VCT_NO(a2) = 10; //<2F>ͳ<EFBFBD><CDB3>˺<EFBFBD>ѶϢ
ATR_STIMER(a2) = 0;
ATR_FIRST_FLG(a2) = 0;
tarpos = -1;
}
ATR_GROUP_FLG(a0) = 35;
ATR_SPD(a0) = 16;
ATR_VCT_NO(a0)++;
break;
case 4:
ATR_INT_WORK2(a0) = ATR_H_POS(a0); //?<3F>h??<3F><>
ATR_INT_WORK3(a0) = ATR_V_POS(a0); //
gemini(a0); //?<3F>h
ATR_INT_WORK2(a0) = ATR_H_POS(a0) - ATR_INT_WORK2(a0);
ATR_INT_WORK3(a0) = ATR_V_POS(a0) - ATR_INT_WORK3(a0);
if (!--ATR_GROUP_FLG(a0)) //<2F><>???
{
if (ATR_LONG_WORK(1, a0)) //<2F><>???????
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //???<3F><>
ATR_VCT_NO(a0)++;
}
break;
case 5:
play_se(251, ATR_H_POS(a0), ATR_V_POS(a0));
ATR_VCT_NO(a0)++;
ATR_STIMER(a0) = 30;
break;
case 6:
if (ATR_STIMER(a0))
{
ATR_STIMER(a0)--;
break;
}
ATR_ATTRIB(a0) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_NAME(a1) == NULL || ATR_VCT_NO(a1) >= VCT_NO_DIE || ATR_VCT_NO(a1) == 0) //<2F>r???????
{
if (!ATR_LONG_WORK(1, a0)) //<2F><>?<3F><>?????
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //???<3F><>
DeathAction(a0); //<2F><>?
p_missile[0] = NULL; //
p_missile[1] = NULL; //
}
break;
case 7:
ATR_VCT_NO(a0)++;
ATR_STIMER(a0) =60;
break;
case 8:
for (i = 8; i < 13; i++)
{
if (p_missile[i] != NULL)
{
if (pattern(p_missile[i], ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(p_missile[i]);
p_missile[i] = NULL;
counter++;
}
}
}
if (counter == 5)
{
ATR_ATTRIB(a0) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
FireSkillEnd = FALSE;
ATR_VCT_NO(a0) = 0;
}
break;
}
}
#endif
/* ?????? *******************************************************************/
void axe_shadow(ACTION *a0)
{
ACTION *a1, *a2;
int d0, d1;
switch (ATR_VCT_NO(a0))
{
case 0:
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
//???????
if (!--ATR_GROUP_FLG(a0))
{
a2 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_LIFE(a2) <= 0) //??????
{
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 1; //????????
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
break;
}
#ifdef _PETSKILL_ACUPUNCTURE
/////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
/////////////////////////////
#else
/////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA))
#endif
/////////////////////////////
#endif
set_guard_mark(a0); //<2F>\?<3F><><EFBFBD>Ӥ<EFBFBD><D3A4><EFBFBD>?
//?????????
ATR_COMBO(a1) = 0;
//?<3F><>??????
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE)
{
ATR_HIT_STOP(a0) = 32; //??????????
ATR_VCT_NO(a0) = 1; //????????
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
ATR_CHR_ACT(a0) = 1; //<2F><>?????????
gemini(a0);
ATR_VCT_NO(a1) = 16; //????
ATR_CRS(a1) = ATR_CRS(a0); //<2F><>?????????????
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //
ATR_STIMER(a1) = 0;
ATR_FIRST_FLG(a1) = 0; //??????????
break;
}
//??????<3F><>??????
if (!((ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) | (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION)))
{
if ((ATR_ATTACK_POW(0, a0) == 0) && (ATR_ATTACK_PET_POW(0, a0) == 0)) //????
{
a2 = ATR_BODY_WORK(0, a0); //<2F><>????????
//??<3F><><EFBFBD><EFBFBD>
set_damage_num(a2, 0, -64);
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 1; //????????
ATR_CHR_ACT(a0) = 1; //<2F><>?????????
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
break;
}
}
//?<3F><>????????
if (ATR_ATTACK_KIND(0, a0) & ATT_CRUSH)
set_damage_num(a1, 19, -112); //?????<3F><><EFBFBD><EFBFBD>
//?????????
ATR_AKO_FLG(a1) = 0;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO1) //??????
ATR_AKO_FLG(a1) = 1;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO2) //??????
ATR_AKO_FLG(a1) = 2;
if (ATR_ATTACK_KIND(0, a0) & ATT_DEATH) //?????
ATR_LIFE(a1) = 0; //?<3F><>????
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //
if (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION) //?<3F><>?????
{
if (!ATR_COMBO(a1)) //????????
{
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_LIFE(a1) += ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) > ATR_PET_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1); //?<3F><>???
set_damage_num(a1, 14, -64);
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //pet????<3F><>?
}
}
else if (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) //????????
{
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //????<3F><>?
}
else
ATR_VCT_NO(a1) = 10; //?????<3F><>
//?<3F><>?????
if (ATR_ATTACK_KIND(0, a0) & ATT_SATISFACTORY)
ATR_KAISHIN(a1) = 1; //?<3F><>??????
else
ATR_KAISHIN(a1) = 0; //<2F>G<EFBFBD><47>?????
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
//?????
if (ATR_ATTACK_KIND(0, a0) & ATT_GUARD)
ATR_GUARD_FLG(a1) = 1;
else
ATR_GUARD_FLG(a1) = 0;
if (ATR_LIFE(a1) - ATR_DAMAGE(a1) <= 0) //?<3F><>????
{
ATR_LONG_WORK(1, a0) = 1; //?<3F><>??????
//????????
if (ATR_COMBO(a1) == 0)
ATR_KAISHIN(a1) = 1; //?<3F><>??????
}
if (ATR_KAISHIN(a1)) //?<3F><>?????
ATR_HIT_STOP(a0) = HIT_STOP_TIM * 4; //??????????
else
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
//???????????<3F><>??
if (ATR_DAMAGE(a1) || (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) || (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION))
{
if (ATR_ATTACK_KIND(0, a0) & ATT_COUNTER) //???????
{
//????????
if (ATR_COMBO(a1) == 0)
set_damage_num(a0, 1, -64 + 16);//?????<3F><><EFBFBD><EFBFBD>
}
//???
play_se(252, ATR_H_POS(a0), ATR_V_POS(a0));
//?????????
set_hit_mark(a0);
}
ATR_HIT_STOP(a0) /= 4; //???????<3F><>???
ATR_VCT_NO(a0) = 3; //????????
a1 = ATR_BODY_WORK(2, a0); //???????
ATR_VCT_NO(a1) = 1; //????????
ATR_CHR_ACT(a1) = 1; //<2F><>?????????
}
else
{
ATR_INT_WORK2(a0) = ATR_H_POS(a0); //?<3F>h??<3F><>
ATR_INT_WORK3(a0) = ATR_V_POS(a0); //
gemini(a0); //?<3F>h
ATR_INT_WORK2(a0) = ATR_H_POS(a0) - ATR_INT_WORK2(a0);
ATR_INT_WORK3(a0) = ATR_V_POS(a0) - ATR_INT_WORK3(a0);
}
break;
case 1:
if (--ATR_HIT_STOP(a0)) //??????????
break;
ATR_CHR_ACT(a0) = 0; //?<3F>h???????
//???????
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE)
ATR_STIMER(a0) = 32;
else
ATR_STIMER(a0) = 64;
ATR_VCT_NO(a0) = 2;
a0->atr = ACT_ATR_HIDE;
p_missile[0] = NULL;
break;
case 2:
if (--ATR_STIMER(a0))
break;
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //???<3F><>
DeathAction(a0); //<2F><>?
break;
case 3:
if (--ATR_HIT_STOP(a0)) //??????????
break;
a1 = ATR_BODY_WORK(2, a0); //???????
ATR_CHR_ACT(a1) = 0; //?<3F>h???????
//?????????<3F>h??
ATR_GROUP_FLG(a0) = 35;
ATR_SPD(a0) = 16;
a1 = ATR_BODY_WORK(2, a0); //???????
ATR_VCT_NO(a1) = 2; //?<3F>h??
ATR_SPD(a1) = 32;
ATR_CRS(a1) = 0;
ATR_VCT_NO(a0)++;
break;
case 4:
ATR_INT_WORK2(a0) = ATR_H_POS(a0); //?<3F>h??<3F><>
ATR_INT_WORK3(a0) = ATR_V_POS(a0); //
gemini(a0); //?<3F>h
ATR_INT_WORK2(a0) = ATR_H_POS(a0) - ATR_INT_WORK2(a0);
ATR_INT_WORK3(a0) = ATR_V_POS(a0) - ATR_INT_WORK3(a0);
if (!--ATR_GROUP_FLG(a0)) //<2F><>???
{
if (ATR_LONG_WORK(1, a0)) //<2F><>???????
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //???<3F><>
ATR_VCT_NO(a0)++;
}
break;
case 5:
a1 = ATR_BODY_WORK(2, a0); //???????
ATR_VCT_NO(a1) = 4;
//???
play_se(251, ATR_H_POS(a0), ATR_V_POS(a0));
ATR_VCT_NO(a0)++;
ATR_STIMER(a0) = 30;
break;
case 6:
if (ATR_STIMER(a0))
{
ATR_STIMER(a0)--;
break;
}
ATR_ATTRIB(a0) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
a1 = ATR_BODY_WORK(2, a0); //???????
ATR_ATTRIB(a1) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_NAME(a1) == NULL || ATR_VCT_NO(a1) >= VCT_NO_DIE || ATR_VCT_NO(a1) == 0) //<2F>r???????
{
if (!ATR_LONG_WORK(1, a0)) //<2F><>?<3F><>?????
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //???<3F><>
DeathAction(a0); //<2F><>?
p_missile[0] = NULL; //
a1 = ATR_BODY_WORK(2, a0); //???????
DeathAction(a1); //<2F><>?
}
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
/* <20><>???? *******************************************************************/
void stone(ACTION *a0)
{
ACTION *a1, *a2;
int d0, d1;
switch (ATR_VCT_NO(a0))
{
case 0:
a1 = ATR_BODY_WORK(1, a0); //?<3F>s???????
if (ATR_VCT_NO(a1) == 1)
{
DeathAction(a0); //<2F><>?
return;
}
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
a2 = ATR_BODY_WORK(0, a0); //<2F><>???????
d0 = ATR_H_POS(a2);
d1 = ATR_V_POS(a2);
radar(a1, &d0, &d1); //????
ATR_STIMER(a0)++;
if (ATR_CRS(a0) == 0) //<2F><><EFBFBD><EFBFBD>??
{
if (ATR_SPD(a0) == 0) //???<3F><>??
ATR_CRS(a0) = 16;
else
ATR_SPD(a0) -= 1;
}
else
ATR_SPD(a0) += 1;
gemini(a0);
ATR_H_POS(a0) += ATR_INT_WORK2(a1);
ATR_V_POS(a0) += ATR_INT_WORK3(a1);
break;
case 1:
break;
case 2:
ATR_VCT_NO(a0)++;
break;
case 3:
a1 = ATR_BODY_WORK(1, a0); //?<3F>s???????
if (ATR_VCT_NO(a1) == 1)
{
DeathAction(a0); //<2F><>?
return;
}
ATR_DISP_PRIO(a0) = ATR_DISP_PRIO(a1) + 1;
ATR_LONG_WORK(0, a0)++;
if (ATR_LONG_WORK(0, a0) & 1)
ATR_SPD(a0) += 2;
gemini(a0);
ATR_H_POS(a0) += ATR_INT_WORK2(a1);
ATR_V_POS(a0) += ATR_INT_WORK3(a1);
break;
case 4:
if (ATR_LONG_WORK(1, a0))
{
//????
if (!--ATR_LONG_WORK(1, a0))
ATR_ATTRIB(a0) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
}
a1 = ATR_BODY_WORK(1, a0); //?<3F>s???????
ATR_H_POS(a0) = ATR_H_POS(a1);
ATR_V_POS(a0) = ATR_V_POS(a1);
break;
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
/* <20><>????? *******************************************************************/
void stone_shadow(ACTION *a0)
{
ACTION *a1, *a2, *a3;
int d0, d1;
switch (ATR_VCT_NO(a0))
{
case 0:
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
//???????
if (!--ATR_GROUP_FLG(a0))
{
a2 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_LIFE(a2) <= 0) //??????
{
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 1; //????????
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
}
#ifdef _PETSKILL_ACUPUNCTURE
/////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
/////////////////////////////
#else
/////////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA))
#endif
/////////////////////////////
#endif
set_guard_mark(a0); //<2F>\?<3F><><EFBFBD>Ӥ<EFBFBD><D3A4><EFBFBD>?
//?????????
ATR_COMBO(a1) = 0;
//?<3F><>??????
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE)
{
ATR_HIT_STOP(a0) = 32; //??????????
ATR_VCT_NO(a0) = 1; //????????
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
gemini(a0);
ATR_VCT_NO(a1) = 16; //????
ATR_CRS(a1) = ATR_CRS(a0); //<2F><>?????????????
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //
ATR_STIMER(a1) = 0;
ATR_FIRST_FLG(a1) = 0; //??????????
break;
}
//??????<3F><>??????
if (!((ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) | (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION)))
{
if ((ATR_ATTACK_POW(0, a0) == 0) && (ATR_ATTACK_PET_POW(0, a0) == 0)) //????
{
a2 = ATR_BODY_WORK(0, a0); //<2F><>????????
//??<3F><><EFBFBD><EFBFBD>
set_damage_num(a2, 0, -64);
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 1; //????????
ATR_CHR_NO(a0) = ATR_LONG_WORK(0, a0); //?????<3F><>?
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
}
}
//?<3F><>????????
if (ATR_ATTACK_KIND(0, a0) & ATT_CRUSH)
set_damage_num(a1, 19, -112);//?????<3F><><EFBFBD><EFBFBD>
//?????????
ATR_AKO_FLG(a1) = 0;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO1) //??????
ATR_AKO_FLG(a1) = 1;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO2) //??????
ATR_AKO_FLG(a1) = 2;
if (ATR_ATTACK_KIND(0, a0) & ATT_DEATH) //?????
ATR_LIFE(a1) = 0; //?<3F><>????
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //
if (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION) //?<3F><>?????
{
if (!ATR_COMBO(a1)) //????????
{
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_LIFE(a1) += ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) > ATR_PET_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1); //?<3F><>???
set_damage_num(a1, 14, -64);
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //pet????<3F><>?
}
}
else if (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) //????????
{
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //????<3F><>?
}
else
ATR_VCT_NO(a1) = 10; //?????<3F><>
//?<3F><>?????
if (ATR_ATTACK_KIND(0, a0) & ATT_SATISFACTORY)
ATR_KAISHIN(a1) = 1; //?<3F><>??????
else
ATR_KAISHIN(a1) = 0; //<2F>G<EFBFBD><47>?????
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
//?????
if (ATR_ATTACK_KIND(0, a0) & ATT_GUARD)
ATR_GUARD_FLG(a1) = 1;
else
ATR_GUARD_FLG(a1) = 0;
if (ATR_LIFE(a1) - ATR_DAMAGE(a1) <= 0) //?<3F><>????
{
ATR_LONG_WORK(1, a0) = 1; //?<3F><>??????
//????????
if (ATR_COMBO(a1) == 0)
ATR_KAISHIN(a1) = 1; //?<3F><>??????
}
if (ATR_KAISHIN(a1)) //?<3F><>?????
ATR_HIT_STOP(a0) = HIT_STOP_TIM * 4; //??????????
else
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
//???????????<3F><>??
if (ATR_DAMAGE(a1) || (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) || (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION))
{
if (ATR_ATTACK_KIND(0, a0) & ATT_COUNTER) //???????
{
//????????
if (ATR_COMBO(a1) == 0)
set_damage_num(a0, 1, -64 + 16); //?????<3F><><EFBFBD><EFBFBD>
}
//???
play_se(252, ATR_H_POS(a0), ATR_V_POS(a0));
//?????????
set_hit_mark(a0);
}
ATR_VCT_NO(a0) = 3; //????????
a1 = ATR_BODY_WORK(2, a0); //<2F><>??????
ATR_VCT_NO(a1) = 1; //????????
}
else
{
ATR_INT_WORK2(a0) = ATR_H_POS(a0); //?<3F>h??<3F><>
ATR_INT_WORK3(a0) = ATR_V_POS(a0); //
gemini(a0); //?<3F>h
ATR_INT_WORK2(a0) = ATR_H_POS(a0) - ATR_INT_WORK2(a0);
ATR_INT_WORK3(a0) = ATR_V_POS(a0) - ATR_INT_WORK3(a0);
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 1:
if (--ATR_HIT_STOP(a0)) //??????????
break;
//???????
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE)
ATR_STIMER(a0) = 32;
else
ATR_STIMER(a0) = 64;
ATR_VCT_NO(a0) = 2;
a0->atr = ACT_ATR_HIDE;
p_missile[0] = NULL;
break;
case 2:
if (--ATR_STIMER(a0))
break;
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //???<3F><>
DeathAction(a0); //<2F><>?
break;
case 3:
a1 = ATR_BODY_WORK(2, a0); //<2F><>??????
ATR_CHR_NO(a1) = SPR_isiware; //<2F><>?????
if (pattern(a1, ANM_NOMAL_SPD, ANM_NO_LOOP)) //???<3F><>???
goto stone_shadow_100;
if (!pattern(a1, ANM_NOMAL_SPD, ANM_NO_LOOP)) //???<3F><>??????
break;
stone_shadow_100:
//?????????<3F>h??
ATR_GROUP_FLG(a0) = 10;
ATR_SPD(a0) = 6;
ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
d0 = ATR_CRS(a0);
if (d0 >= 4 && d0 < BATTLKPKPLYAERNUM)
ATR_CHR_NO(a1) = 25784; //<2F>𦄨<EFBFBD>??<3F><>?
else
ATR_CHR_NO(a1) = 25783; //<2F>𦄨<EFBFBD>??<3F><>?
ATR_CRS(a0) -= 8;
ATR_CRS(a0) &= 31;
a1 = ATR_BODY_WORK(2, a0); //<2F><>??????
ATR_VCT_NO(a1) = 2; //?<3F>h??
ATR_SPD(a1) = 0;
ATR_CRS(a1) = 16;
ATR_LONG_WORK(1, a1) = 30;
ATR_VCT_NO(a0)++;
//<2F><>?????
a3 = GetAction(T_PRIO_BOW, sizeof(ATR_EQU));
//?????
a2 = GetAction(T_PRIO_BOW - 1, sizeof(ATR_EQU));
ATR_NAME(a2) = ATR_NAME(a0);
ATR_VCT_NO(a2) = ATR_VCT_NO(a0);
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a2) = ATR_DISP_PRIO(a0);
/* ?????<3F>k? */
ATR_CHR_NO(a2) = ATR_CHR_NO(a0);
/* ???<3F>t */
ATR_CHR_ANG(a2) = ATR_CHR_ANG(a0);
ATR_BODY_WORK(0, a2) = ATR_BODY_WORK(0, a0); //<2F><>????
ATR_BODY_WORK(1, a2) = ATR_BODY_WORK(1, a0); //<2F>D<EFBFBD><44>?????
ATR_BODY_WORK(2, a2) = a3; //<2F><>??????
ATR_ATTACK_POW(0, a2) = ATR_ATTACK_POW(0, a0); //???
ATR_ATTACK_PET_POW(0, a2) = ATR_ATTACK_PET_POW(0, a0); //???
ATR_ATTACK_KIND(0, a2) = ATR_ATTACK_KIND(0, a0); //?????
ATR_H_POS(a2) = ATR_H_POS(a0);
ATR_V_POS(a2) = ATR_V_POS(a0);
ATR_CRS(a2) = (ATR_CRS(a0) + 15) & 31;
ATR_SPD(a2) = ATR_SPD(a0);
ATR_BODY_CNT(a2) = ATR_BODY_CNT(a0);
ATR_GROUP_FLG(a2) = ATR_GROUP_FLG(a0);
pattern(a2, ANM_NOMAL_SPD, ANM_LOOP);
p_missile[1] = a1;
p_missile[2] = NULL;
/* ?????<3F>k? */
if (d0 >= 4 && d0 < BATTLKPKPLYAERNUM)
ATR_CHR_NO(a3) = 25783; //<2F>𦄨<EFBFBD>??<3F><>?
else
ATR_CHR_NO(a3) = 25784; //<2F>𦄨<EFBFBD>??<3F><>?
ATR_NAME(a3) = ATR_NAME(a1);
ATR_VCT_NO(a3) = ATR_VCT_NO(a1);
ATR_BODY_WORK(1, a3) = a2; //?<3F>s???????
ATR_VCT_NO(a3) = ATR_VCT_NO(a1);
ATR_DISP_PRIO(a3) = ATR_DISP_PRIO(a1);
ATR_SPD(a3) = ATR_SPD(a1);
ATR_CRS(a3) = ATR_CRS(a1);
ATR_H_POS(a3) = ATR_H_POS(a1);
ATR_V_POS(a3) = ATR_V_POS(a1);
ATR_LONG_WORK(1, a3) = 30;
break;
case 4:
ATR_INT_WORK2(a0) = ATR_H_POS(a0); //?<3F>h??<3F><>
ATR_INT_WORK3(a0) = ATR_V_POS(a0); //
gemini(a0); //?<3F>h
ATR_INT_WORK2(a0) = ATR_H_POS(a0) - ATR_INT_WORK2(a0);
ATR_INT_WORK3(a0) = ATR_V_POS(a0) - ATR_INT_WORK3(a0);
if (!--ATR_GROUP_FLG(a0)) //<2F><>???
{
//????
ATR_LONG_WORK(2, a0) = 60;
ATR_LONG_WORK(3, a0) = 1;
ATR_VCT_NO(a0) = 7;
}
break;
case 5:
ATR_ATTRIB(a0) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
a1 = ATR_BODY_WORK(2, a0); //<2F><>??????
ATR_VCT_NO(a1) = 4;
//???
ATR_VCT_NO(a0)++;
break;
case 6:
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_NAME(a1) == NULL || ATR_VCT_NO(a1) >= VCT_NO_DIE || ATR_VCT_NO(a1) == 0) //<2F>r???????
{
if (!ATR_LONG_WORK(1, a0)) //<2F><>?<3F><>?????
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //???<3F><>
DeathAction(a0); //<2F><>?
p_missile[0] = NULL; //
p_missile[1] = NULL; //
a1 = ATR_BODY_WORK(2, a0); //<2F><>??????
DeathAction(a1); //<2F><>?
}
case 7:
if (ATR_LONG_WORK(3, a0))
{
ATR_LONG_WORK(3, a0) = 0;
//???
play_se(251, ATR_H_POS(a0), ATR_V_POS(a0));
ATR_ATTRIB(a0) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
a1 = ATR_BODY_WORK(2, a0); //<2F><>??????
ATR_VCT_NO(a1) = 4;
}
if (!--ATR_LONG_WORK(2, a0)) //<2F><>???
{
if (ATR_LONG_WORK(1, a0)) //<2F><>???????
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //???<3F><>
ATR_VCT_NO(a0) = 5;
}
}
}
//Terry add 2001/12/31
/* <20><><EFBFBD><EFBFBD>Ӱ<EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD> *******************************************************************/
#ifdef _ITEM_FIRECREAKER
void firecracker_shadow(ACTION *a0)
{
ACTION *a1;
int d0, d1;
switch (ATR_VCT_NO(a0))
{
case 0:
a1 = ATR_BODY_WORK(0, a0); //<2F><><EFBFBD>˵<EFBFBD>λַ
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //<2F>״<EFBFBD>(<28><><EFBFBD><EFBFBD>·<EFBFBD><C2B7>)
ATR_CRS(a0) = d0; //<2F><><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
//׼<><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (!--ATR_GROUP_FLG(a0))
{
ATR_VCT_NO(a0) = 1; //????????
a1 = ATR_BODY_WORK(2, a0); //<2F><>??????
ATR_VCT_NO(a1) = 1; //????????
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 0; //???<3F><>
ATR_ATTRIB(a0) = ACT_ATR_HIDE; //Ӱ<>ӽ<EFBFBD><D3BD><EFBFBD>
ATR_CHR_NO(a1) = 101121; //<2F><><EFBFBD><EFBFBD>ը<EFBFBD><D5A8>
ATR_H_POS(a1) += 50;
}
else
{
ATR_INT_WORK2(a0) = ATR_H_POS(a0); //?<3F>h??<3F><>
ATR_INT_WORK3(a0) = ATR_V_POS(a0); //
gemini(a0); //?<3F>h
ATR_INT_WORK2(a0) = ATR_H_POS(a0) - ATR_INT_WORK2(a0);
ATR_INT_WORK3(a0) = ATR_V_POS(a0) - ATR_INT_WORK3(a0);
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
break;
case 1:
a1 = ATR_BODY_WORK(2, a0); //<2F><><EFBFBD><EFBFBD>λַ
if (!pattern(a1, 36, ANM_NO_LOOP)) //<2F><><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD>
break;
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_NAME(a1) == NULL || ATR_VCT_NO(a1) >= VCT_NO_DIE || ATR_VCT_NO(a1) == 0)
{ //<2F>r???????
if (!ATR_LONG_WORK(1, a0)) //<2F><>?<3F><>?????
ATR_STIMER(ATR_BODY_WORK(1, a0)) = 1; //???<3F><>
DeathAction(a0); //<2F><>?
p_missile[0] = NULL; //
p_missile[1] = NULL; //
a1 = ATR_BODY_WORK(2, a0); //<2F><>??????
DeathAction(a1); //<2F><>?
}
break;
}
}
#endif
//Terry end
/* ?????? *******************************************************************/
void missile(ACTION *a0)
{
ACTION *a1, *a2;
int d0, d1;
switch (ATR_VCT_NO(a0))
{
case 0:
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
//???????
if (d1 <= 32)
{
a2 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_LIFE(a2) <= 0) //??????
{
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 1; //????????
break;
}
//????
if ((ATR_ATTACK_POW(0, a0) == 0) && (ATR_ATTACK_PET_POW(0, a0) == 0))
{
a2 = ATR_BODY_WORK(0, a0); //<2F><>????????
//??<3F><><EFBFBD><EFBFBD>
set_damage_num(a2, 0, -64);
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 1; //????????
break;
}
ATR_CRS(a1) = d0; //<2F><>?????????????
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //
if (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION) //?<3F><>?????
{
if (!ATR_COMBO(a1)) //????????
{
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_LIFE(a1) += ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) > ATR_PET_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1); //?<3F><>???
set_damage_num(a1, 14, -64);
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //pet????<3F><>?
}
}
else if (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) //????????
{
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //????<3F><>?
}
else
ATR_VCT_NO(a1) = 10; //?????<3F><>
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0); //
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0); //
//?????
if (ATR_ATTACK_KIND(0, a0) & ATT_GUARD)
ATR_GUARD_FLG(a1) = 1;
else
ATR_GUARD_FLG(a1) = 0;
if (ATR_LIFE(a1) - ATR_DAMAGE(a1) <= 0) //?<3F><>????
{
ATR_KAISHIN(a1) = 1; //?<3F><>??????
ATR_HIT_STOP(a0) = HIT_STOP_TIM * 4; //??????????
}
else
{
ATR_KAISHIN(a1) = 0; //<2F>G<EFBFBD><47>?????
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
}
ATR_VCT_NO(a0) = 1; //????????
//???
play_se(103, 320, 240);
//?<3F><>?????
a1 = GetAction(T_PRIO_MAGIC_EFFECT, sizeof(ATR_EQU));
if (a1 == NULL)
return;
/* <20><>??? */
ATR_NAME(a1) = magic_effect;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MAGIC_EFFECT;
ATR_CHR_NO(a1) = 36009;
/* ???<3F>t */
ATR_BODY_WORK(0, a1) = ATR_BODY_WORK(0, a0);
}
else
gemini(a0); //?<3F>h
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 1:
if (--ATR_HIT_STOP(a0)) //??????????
break;
ATR_STIMER(a0) = 64;
ATR_VCT_NO(a0) = 2;
a0->atr = ACT_ATR_HIDE;
p_missile[ATR_BODY_CNT(a0)] = NULL;
break;
case 2:
if (--ATR_STIMER(a0))
break;
ATR_DAMAGE(p_master)++; //???<3F><>
DeathAction(a0); //<2F><>?
break;
}
}
/* ???? *******************************************************************/
void amelioration(ACTION *a0)
{
ACTION *a1;
int d0, d1;
switch (ATR_VCT_NO(a0))
{
case 0:
if (ATR_INT_WORK0(a0) == 0) //<2F><>?<3F><>?<3F>q??
{
d0 = 310;
d1 = 222;
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
gemini(a0); //?<3F>h
if (d1 <= (ATR_SPD(a0) >> 2)) //????
ATR_INT_WORK0(a0) = 1; //<2F><>?<3F><>????
}
else
{
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar2(a0, d0, d1, 1); //????
if (ATR_INT_WORK1(a0) == 0) //??<3F><>??????
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
if (d0 == ATR_CRS(a0)) //??????
ATR_INT_WORK1(a0) = 1; //?????<3F><>???
//???????
if (d1 <= 32)
{
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_LIFE(a1) <= 0) //??????
{
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 1; //????????
break;
}
ATR_COUNTER(a1) = NULL; //????????
ATR_VCT_NO(a1) = 15; //???<3F><>
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_KAISHIN(a1) = 0; //?<3F><>??????
ATR_VCT_NO(a0) = 1; //????????
//???
play_se(100, 320, 240);
//?<3F><>?????
a1 = GetAction(T_PRIO_MAGIC_EFFECT, sizeof(ATR_EQU));
if (a1 == NULL)
return;
/* <20><>??? */
ATR_NAME(a1) = magic_effect;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MAGIC_EFFECT;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = 36009;
/* ???<3F>t */
ATR_BODY_WORK(0, a1) = ATR_BODY_WORK(0, a0);
}
else
gemini(a0); //?<3F>h
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 1:
if (--ATR_HIT_STOP(a0)) //??????????
break;
ATR_STIMER(a0) = 64;
ATR_VCT_NO(a0) = 2;
a0->atr = ACT_ATR_HIDE;
p_missile[ATR_BODY_CNT(a0)] = NULL;
break;
case 2:
if (--ATR_STIMER(a0))
break;
ATR_DAMAGE(p_master)++; //???<3F><>
DeathAction(a0); //<2F><>?
break;
}
}
// ???<3F>{??? //////////////////////////////////////////////////////////////
typedef int CMPFUNC(const void*, const void*);
int sort_chr(SORT_CHR_EQU *a0, SORT_CHR_EQU *a1)
{
if (a0->v_pos > a1->v_pos)
return 1;
else
return -1;
}
extern int piyo_tbl[];
extern int piyo_point;
//static int command_point;
/*-------------------------------------------
??????????????
--------------------------------------------*/
void set_raster_pos(ACTION *a1)
{
int d0;
#ifdef __ATTACK_MAGIC
int value = 0;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ʱ
if ((g_iRunEarthQuake < 2) && (BattleMapNo < 148 || BattleMapNo > 150))
return;
if (2 == g_iRunEarthQuake)
value = g_iCurRunEarthQuake;
else if (3 == g_iRunEarthQuake)
{
ATR_INT_WORK3(a1) = 0;
return;
}
d0 = ATR_V_POS(a1) >> 3;
d0 += piyo_point + value;
d0 &= 63;
ATR_V_POS(a1) -= piyo_tbl[d0];
ATR_INT_WORK1(a1) -= piyo_tbl[d0];
ATR_INT_WORK3(a1) = piyo_tbl[d0];
#else
//??????????????
if (BattleMapNo < 148 || BattleMapNo > 150)
return;
d0 = ATR_V_POS(a1) >> 3;
d0 += piyo_point;
d0 &= 63;
ATR_V_POS(a1) -= piyo_tbl[d0];
ATR_INT_WORK1(a1) -= piyo_tbl[d0];
ATR_INT_WORK3(a1) = piyo_tbl[d0];
#endif
}
/*-------------------------------------------
??<EFBFBD><EFBFBD>?<EFBFBD>k<EFBFBD><EFBFBD>?????
--------------------------------------------*/
static int get_num(void)
{
int d0 = 0;
int d1 = 0;
while (1)
{
d0 = BattleCmd[command_point++];
if (d0 == NULL)
return -1;
if (d0 >= '0' && d0 <= '9') //???
break; //??????
if (d0 >= 'A' && d0 <= 'F') //?????
break; //??????
}
if (d0 >= 'A') //?????
d1 = d0 - 'A' + 10;
else
d1 = d0 - '0';
while (1)
{
d0 = BattleCmd[command_point++]; //?<3F><>????<3F><>?<3F><>?
if (d0 == NULL) //<2F><>???
{
command_point--;
break;
}
if (d0 < '0' || d0 > '9') //??????
{
if (d0 < 'A' || d0 > 'F') //????????
break; //<2F><>?
}
d1 = d1 << 4; //???????
if (d0 >= 'A') //?????
d1 += d0 - 'A' + 10;
else
d1 += d0 - '0';
}
return d1;
}
//andy_add
static int get_mpnum(char code)
{
int d0, d1, num = 0;
while (1)
{
d0 = BattleCmd[num++];
if (d0 == NULL)
return -1;
if (d0 == (int)code)
break;
}
while (1)
{
d0 = BattleCmd[num++]; //?<3F><>?<3F><>?<3F><>?
if (d0 == NULL) //<2F><>???
return -1;
if (d0 >= '0' && d0 <= '9') //???
break; //??????
if (d0 >= 'A' && d0 <= 'F') //?????
break; //??????
}
if (d0 >= 'A') //?????
d1 = d0 - 'A' + 10;
else
d1 = d0 - '0';
while (1)
{
d0 = BattleCmd[num++]; //?<3F><>????<3F><>?<3F><>?
if (d0 == NULL) //<2F><>???
{
command_point--;
break;
}
if (d0 < '0' || d0 > '9') //??????
{
if (d0 < 'A' || d0 > 'F') //????????
break; //<2F><>?
}
d1 = d1 << 4; //???????
if (d0 >= 'A') //?????
d1 += d0 - 'A' + 10;
else
d1 += d0 - '0';
}
return d1;
}
/*-------------------------------------------
????<EFBFBD><EFBFBD>?????
--------------------------------------------*/
static char get_command(void)
{
int now_point = 0;
char d0;
while (1)
{
now_point = command_point;
d0 = BattleCmd[command_point++];
if (d0 == NULL)
return -1;
if (d0 == 'B')
{
//andy_reEdit 2003/07/18 21:54
if (BattleCmd[now_point + 2] == '|' && (BattleCmd[now_point - 1] == '|' || BattleCmd[now_point - 1] == NULL))
break;
}
}
d0 = BattleCmd[command_point++];
return d0;
}
static char get_char()
{
char d0;
d0 = BattleCmd[command_point++]; //?<3F><>?<3F><>?
if (d0 == NULL) //???<3F><>???
return -1; //<2F><>?
return d0;
}
/* <20><><EFBFBD>q<EFBFBD><71>??? *******************************************************************/
void get_name(ACTION *a1)
{
char d0;
char *a2;
a2 = ATR_HANDLE(a1);
while (1)
{
d0 = BattleCmd[command_point++]; //?<3F><>?<3F><>?<3F><>?
if (d0 == NULL) //<2F><>???
break;
//?<3F><>???
if (d0 == '|')
break;
if (IsDBCSLeadByte(d0))
{
*a2++ = d0;
*a2++ = BattleCmd[command_point++];
}
else
*a2++ = d0;
}
//<2F><>????
*a2 = 0;
makeStringFromEscaped(ATR_HANDLE(a1));
}
/*-------------------------------------------
?????<EFBFBD><EFBFBD>?????
--------------------------------------------*/
static int get_next_flg(void)
{
int d0, d1;
d1 = command_point; //?????????<3F>~<7E><>
d0 = get_num(); //<2F><><EFBFBD><EFBFBD>?<3F><>?
if (d0 == -1) //<2F><>???
goto get_next_flg_500;
if (d0 == 255) //<2F><>???
goto get_next_flg_500;
d0 = get_num(); //???<3F><>?<3F><>?
goto get_next_flg_700;
get_next_flg_500:
d0 = 0;
get_next_flg_700:
command_point = d1; //???????????
return d0;
}
/*-------------------------------------------
??<EFBFBD><EFBFBD>?<EFBFBD><EFBFBD>?<EFBFBD><EFBFBD>???
--------------------------------------------*/
static int get_body_cnt(void)
{
int d0, d1, d2 = 0;
d1 = command_point; //?????????<3F>~<7E><>
while (1)
{
d0 = get_num(); //<2F><><EFBFBD><EFBFBD>?<3F><>?
if (d0 == -1) //<2F><>???
break;
if (d0 == 255) //<2F><>???
break;
get_num(); //???????
get_num(); //????????
if (BattleCmd[command_point] == 'p')
get_num(); //pet????????
d2++; //<2F><>??<3F><>
}
command_point = d1; //???????????
return d2;
}
/*-------------------------------------------
???<EFBFBD><EFBFBD><EFBFBD><EFBFBD>?<EFBFBD><EFBFBD>???
--------------------------------------------*/
static ACTION *get_body_target(void)
{
int d0, d1;
d1 = command_point; //?????????<3F>~<7E><>
d0 = get_num(); //<2F><><EFBFBD><EFBFBD>?<3F><>?
command_point = d1; //???????????
if (d0 == -1)
return 0;
else
return p_party[d0];
}
//ȫ<><C8AB>ȷ<EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD>
int check_all_dead(void)
{
int d0, d7;
d0 = 10; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (d7 = 0; d7 < 5; d7++)
{
if (ATR_NAME(p_party[d7]) != NULL) //????????????
{
if (ATR_PET_OK(p_party[d7]))
d0 = 5; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
break;
}
}
for (d7 = 0; d7 < d0; d7++)
{
if (ATR_NAME(p_party[d7]) != NULL)
{
if (ATR_LIFE(p_party[d7]) > 0) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD><C7BB>ŵ<EFBFBD>
break;
#ifdef _PETSKILL_LER
// <20>׶<EFBFBD><D7B6><EFBFBD>һ<EFBFBD>μ<EFBFBD><CEBC>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB>,<2C><>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else if (ATR_CHR_NO(p_party[d7]) == 101813 || ATR_CHR_NO(p_party[d7]) == 101814)
break;
#endif
#ifdef __NEW_BATTLE_EFFECT
if (1 == ATR_EFFECT_FLAG(p_party[d7]))
break;
#endif
#ifdef _HUNDRED_KILL
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>npc<70><63>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if( BattleHundredFlag == TRUE )
break;
#endif
}
}
if (d7 == d0) //ȫ<><C8AB>
return 1;
d0 = 20; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (d7 = 10; d7 < 15; d7++)
{
if (ATR_NAME(p_party[d7]) != NULL) //????????????
{
if (ATR_PET_OK(p_party[d7]))
d0 = 15; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
break;
}
}
for (d7 = 10; d7 < d0; d7++)
{
if (ATR_NAME(p_party[d7]) != NULL)
{
if (ATR_LIFE(p_party[d7]) > 0) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ǻ<EFBFBD><C7BB>ŵ<EFBFBD>
break;
#ifdef _PETSKILL_LER
// <20>׶<EFBFBD><D7B6><EFBFBD>һ<EFBFBD>μ<EFBFBD><CEBC>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB>,<2C><>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else if (ATR_CHR_NO(p_party[d7]) == 101813 || ATR_CHR_NO(p_party[d7]) == 101814)
break;
#endif
#ifdef __NEW_BATTLE_EFFECT
if (1 == ATR_EFFECT_FLAG(p_party[d7]))
break;
#endif
#ifdef _HUNDRED_KILL
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>npc<70><63>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if( BattleHundredFlag == TRUE )
break;
#endif
}
}
if (d7 == d0) //ȫ<><C8AB> return 1
return 1;
return 0; //<2F><><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB><EFBFBD> return 0
}
//<2F><><EFBFBD>Ա<EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
void disp_attrib(ACTION *a0)
{
ACTION *a1;
a1 = p_attrib;
switch (ATR_ATTRIB(a0))
{
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
case 0:
ATR_ATTRIB(a1) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>ʾ
break;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
case 1:
ATR_ATTRIB(a1) &= ~ACT_ATR_HIDE;
ATR_CHR_NO(a1) = CG_ATR_ICON_EARTH_BATTLE;
break;
//ˮ<><CBAE><EFBFBD><EFBFBD>
case 2:
ATR_ATTRIB(a1) &= ~ACT_ATR_HIDE;
ATR_CHR_NO(a1) = CG_ATR_ICON_WATER_BATTLE;
break;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
case 3:
ATR_ATTRIB(a1) &= ~ACT_ATR_HIDE;
ATR_CHR_NO(a1) = CG_ATR_ICON_FIRE_BATTLE;
break;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
case 4:
ATR_ATTRIB(a1) &= ~ACT_ATR_HIDE;
ATR_CHR_NO(a1) = CG_ATR_ICON_WIND_BATTLE;
break;
}
pattern(a1, ANM_NOMAL_SPD, ANM_NO_LOOP);
}
/* ????<3F><>?<3F><>??? *******************************************************************/
void get_command_asc(void)
{
char d0, d1 = 0;
char *a2;
kanji_buf[0][0] = kanji_buf[1][0] = kanji_buf[2][0] = kanji_buf[3][0] = 0;
a2 = kanji_buf[d1];
while (1)
{
d0 = BattleCmd[command_point++]; //?<3F><>?<3F><>?<3F><>?
if (d0 == NULL) //<2F><>???
{
command_point--;
break;
}
//????
if (d0 == '\t')
{
//<2F><>????
*a2 = 0;
d1++;
if (d1 == 4) //?????
break;
a2 = kanji_buf[d1];
continue;
}
//?<3F><>???
if (d0 == '|')
break;
if (IsDBCSLeadByte(d0))
{
*a2++ = d0;
*a2++ = BattleCmd[command_point++];
}
else
*a2++ = d0;
}
//<2F><>????
*a2 = 0;
}
#ifdef __TOCALL_MAGIC
// <20>ٻ<EFBFBD><D9BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD>
BOOL BuildToCallMagicData(ACTION *pMaster, ACTION *pAttacker)
{
int i, idx = 0, midx, midy, count = 0;
int charidx[MAX_NUM_ATTACKED];
memset(&ToCallMgc, 0, sizeof(ToCallMgc));
memset(charidx, 0, sizeof(charidx));
iAttackedNum = 0;
iCurAttackedFinishNum = 0;
// B$|Attacker's No( 0 - 19 )|5711438|Attacker's MP|
ATR_VCT_NO(pAttacker) = TOCALL_MAGIC_CASE;
ATR_MP(pAttacker) = get_num();
// ToCallMgc.iPreMgcNum = get_num();
// ToCallMgc.iCurMgcNum = get_num();
ToCallMgc.iPreMgcNum = get_num();
#ifdef _PETSKILL_LER // <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>
if (ToCallMgc.iPreMgcNum == 101808 || ToCallMgc.iPreMgcNum == 101809)
{
if (!g_bUseAlpha)
ToCallMgc.iPreMgcNum += 53;
}
#endif
ToCallMgc.iCurMgcNum = get_num();
#ifdef _PROFESSION_ADDSKILL
if (ToCallMgc.iCurMgcNum >= 101770 && ToCallMgc.iCurMgcNum <= 101797)
{
if (!g_bUseAlpha)
ToCallMgc.iCurMgcNum += 55;
}
#endif
#ifdef _PETSKILL_LER // <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>
if (ToCallMgc.iCurMgcNum == 101798)
{
if (!g_bUseAlpha)
ToCallMgc.iCurMgcNum = 101853;
}
if (ToCallMgc.iCurMgcNum == 101800)
{
if (!g_bUseAlpha)
ToCallMgc.iCurMgcNum = 101854;
}
if (ToCallMgc.iCurMgcNum == 101806 || ToCallMgc.iCurMgcNum == 101807)
{
if (!g_bUseAlpha)
ToCallMgc.iCurMgcNum += 53;
}
#endif
ToCallMgc.iPostMgcNum = get_num();
ToCallMgc.wAttackType = (WORD)get_num();
ToCallMgc.wAttackTimeSlice = (WORD)get_num();
ToCallMgc.wShowType = (WORD)get_num();
// ToCallMgc.wShowType =0;
ToCallMgc.wScreenX = (WORD)get_num();
// ToCallMgc.wScreenX = 0;//-150;
ToCallMgc.wScreenY = (WORD)get_num();
// ToCallMgc.wScreenY = 0;//-20;
ToCallMgc.wPreMgcX = (WORD)get_num();
ToCallMgc.wPreMgcY = (WORD)get_num();
ToCallMgc.wPostMgcX = (WORD)get_num();
ToCallMgc.wPostMgcY = (WORD)get_num();
ToCallMgc.wPreMgcOnChar = (WORD)get_num();
ToCallMgc.wCurMgcOnChar = (WORD)get_num();
ToCallMgc.wPostMgcOnChar = (WORD)get_num();
ToCallMgc.dwEQuake = (DWORD)get_num();
// ToCallMgc.dwEQuake = 1;
ToCallMgc.dwEQuakeSTime = (DWORD)get_num();
// ToCallMgc.dwEQuakeSTime = 1000;
ToCallMgc.dwEQuakeETime = (DWORD)get_num();
// ToCallMgc.dwEQuakeETime = 4000;
ToCallMgc.wIsPostDisappear = (WORD)get_num();
ToCallMgc.wToCallMagicNo = (WORD)get_num();
do
{
charidx[idx] = get_num();
} while (0XFF != charidx[idx] && ++idx);
if (0 == idx)
return FALSE;
while (0X5711438 != (AttackedInfo[iAttackedNum * 4] = get_num()))
{
AttackedInfo[iAttackedNum * 4 + 1] = get_num();
AttackedInfo[iAttackedNum * 4 + 2] = get_num();
AttackedInfo[iAttackedNum * 4 + 3] = get_num();
iAttackedNum++;
}
ToCallMgc.dwCurFrame1 = 0;
ToCallMgc.dwCurFrame2 = 0;
ToCallMgc.dwEQuakeSFrame = ToCallMgc.dwEQuakeSTime >> 4;
ToCallMgc.dwEQuakeEFrame = ToCallMgc.dwEQuakeETime >> 4;
// <20>Ƿ<EFBFBD><C7B7><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
(0XFFFFFFFF == ToCallMgc.iPreMgcNum) ? ToCallMgc.wRunPreMgc = TRUE : ToCallMgc.wRunPreMgc = FALSE;
// <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>
if (1 == ToCallMgc.wShowType)
{
ToCallMgc.wNumAttacks = 1;
ToCallMgc.wCurAttackNum = 0;
ToCallMgc.posAttacked[0].x = ToCallMgc.wScreenX;
ToCallMgc.posAttacked[0].y = ToCallMgc.wScreenY;
ToCallMgc.wAttackedIndex[0] = 20; // ȫ<><C8AB><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
ToCallMgc.wMgcFrameCount[0] = 0;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (i = 0; i < idx; i++)
ToCallMgc.wAttackedIndex[i + 1] = charidx[i];
ToCallMgc.wAttackedIndex[i + 1] = 0XFF;
}
// <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>
else
{
// <20><><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>ʽΪȫ<CEAA><C8AB>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>
if (2 == ToCallMgc.wAttackType || 4 == ToCallMgc.wAttackType)
{
midx = 0;
midy = 0;
for (i = 0; i < idx; i++)
{
midx += p_party[charidx[i]]->x;
midy += p_party[charidx[i]]->y;
}
midx = int(midx / idx);
midy = int(midy / idx);
ToCallMgc.wNumAttacks = 1;
ToCallMgc.wCurAttackNum = 0;
ToCallMgc.posAttacked[0].x = midx + ToCallMgc.wScreenX;
ToCallMgc.posAttacked[0].y = midy + ToCallMgc.wScreenY;
ToCallMgc.wAttackedIndex[0] = 20; // ȫ<><C8AB><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
ToCallMgc.wMgcFrameCount[0] = 0;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (i = 0; i < idx; i++)
ToCallMgc.wAttackedIndex[i + 1] = charidx[i];
ToCallMgc.wAttackedIndex[i + 1] = 0XFF;
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (i = 0; i < idx; i++)
{
ToCallMgc.wNumAttacks++;
ToCallMgc.posAttacked[i].x = ToCallMgc.wScreenX;
ToCallMgc.posAttacked[i].y = ToCallMgc.wScreenY;
ToCallMgc.wAttackedIndex[i] = charidx[i];
ToCallMgc.wMgcFrameCount[i] = count;
count += ToCallMgc.wAttackTimeSlice >> 4;
}
}
}
ATR_VCT_NO(pAttacker) = TOCALL_MAGIC_CASE;
ATR_BODY_CNT(pMaster) = 1;
bRunToCallMgc = TRUE;
return TRUE;
}
// <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD>ħ<EFBFBD><C4A7>
BOOL RunTimeMagicToCall()
{
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
if (ToCallMgc.dwEQuakeSFrame == ToCallMgc.dwCurFrame1)
{
g_iRunEarthQuake = 1;
g_iNumRunEarthQuake = ToCallMgc.dwEQuakeEFrame - ToCallMgc.dwEQuakeSFrame;
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ToCallMgc.dwEQuakeEFrame == ToCallMgc.dwCurFrame1)
g_iRunEarthQuake = 3;
ToCallMgc.dwCurFrame1++;
// ǰ<><C7B0>ħ<EFBFBD><C4A7><EFBFBD>Ƿ<EFBFBD><C7B7>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (FALSE == ToCallMgc.wRunPreMgc)
return TRUE;
if (ToCallMgc.wToCallMagicNo != 2)
{
// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>
if (ToCallMgc.wCurAttackNum < ToCallMgc.wNumAttacks)
{
while (1)
{
if (ToCallMgc.dwCurFrame2 == ToCallMgc.wMgcFrameCount[ToCallMgc.wCurAttackNum])
{
ACTION *a0;
a0 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
ATR_NAME(a0) = monster;
ATR_VCT_NO(a0) = TOCALL_MAGIC_CASE + 2; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>
ATR_DISP_PRIO(a0) = (1 == ToCallMgc.wCurMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
ATR_CHR_NO(a0) = ToCallMgc.iCurMgcNum;
ATR_LONG_WORK(0, a0) = ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum];
ATR_H_POS(a0) = (20 == ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum]) ? ToCallMgc.posAttacked[ToCallMgc.wCurAttackNum].x : ATR_H_POS(p_party[ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum]]) + ToCallMgc.posAttacked[ToCallMgc.wCurAttackNum].x;
ATR_V_POS(a0) = (20 == ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum]) ? ToCallMgc.posAttacked[ToCallMgc.wCurAttackNum].y : ATR_V_POS(p_party[ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum]]) + ToCallMgc.posAttacked[ToCallMgc.wCurAttackNum].y;
if (ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum] < 10)
ATR_CHR_ANG(a0) = (7);
else if (ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum] < 20)
ATR_CHR_ANG(a0) = (3);
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum] < 30)
ATR_CHR_ANG(a0) = (1);
else if (ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum] < 40)
ATR_CHR_ANG(a0) = (5);
#endif
ToCallMgc.wCurAttackNum++;
}
if (ToCallMgc.wCurAttackNum >= ToCallMgc.wNumAttacks || ToCallMgc.wMgcFrameCount[ToCallMgc.wCurAttackNum] > ToCallMgc.dwCurFrame2)
break;
}
}
}
else
{
// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>
if (ToCallMgc.wCurAttackNum < ToCallMgc.wNumAttacks)
{
while (1)
{
if (ToCallMgc.dwCurFrame2 == ToCallMgc.wMgcFrameCount[ToCallMgc.wCurAttackNum])
{
ACTION *a0;
a0 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
ATR_NAME(a0) = monster;
ATR_VCT_NO(a0) = TOCALL_MAGIC_CASE + 2; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>
ATR_DISP_PRIO(a0) = (1 == ToCallMgc.wCurMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
ATR_CHR_NO(a0) = ToCallMgc.iCurMgcNum;
#ifdef _PROFESSION_ADDSKILL
if (g_bUseAlpha)
{
if (ToCallMgc.iCurMgcNum == 101770 || ToCallMgc.iCurMgcNum == 101771)//Ϊ<><CEAA><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE>
ATR_DISP_PRIO(a0) = DISP_PRIO_TILE + ToCallMgc.wCurMgcOnChar;
}
else
{
if (ToCallMgc.iCurMgcNum == 101825 || ToCallMgc.iCurMgcNum == 101826)//Ϊ<><CEAA><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE>
ATR_DISP_PRIO(a0) = DISP_PRIO_TILE + ToCallMgc.wCurMgcOnChar;
}
#endif
ATR_LONG_WORK(0, a0) = ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum];
ATR_H_POS(a0) = (20 == ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum]) ? ToCallMgc.posAttacked[ToCallMgc.wCurAttackNum].x : ATR_H_POS(p_party[ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum]]) + ToCallMgc.posAttacked[ToCallMgc.wCurAttackNum].x;
ATR_V_POS(a0) = (20 == ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum]) ? ToCallMgc.posAttacked[ToCallMgc.wCurAttackNum].y : ATR_V_POS(p_party[ToCallMgc.wAttackedIndex[ToCallMgc.wCurAttackNum]]) + ToCallMgc.posAttacked[ToCallMgc.wCurAttackNum].y;
ToCallMgc.wCurAttackNum++;
}
if (ToCallMgc.wCurAttackNum >= ToCallMgc.wNumAttacks || ToCallMgc.wMgcFrameCount[ToCallMgc.wCurAttackNum] > ToCallMgc.dwCurFrame2)
break;
}
}
}
ToCallMgc.dwCurFrame2++;
return TRUE;
}
#endif
#ifdef _PROFESSION_ADDSKILL
BOOL BuildBoundaryMagicData(int state)
{
int stateno[] = {101789,101777,101783,101795,101786,101774,101780,101792};
int mark=-1;
if (!g_bUseAlpha)
{
if (state > 1)
state += 55;
stateno[0] = 101844, stateno[1] = 101832, stateno[2] = 101838, stateno[3] = 101850,
stateno[4] = 101841, stateno[5] = 101829, stateno[6] = 101835, stateno[7] = 101847;
}
if (state == 0)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
if (boundary_mark[0])
{
DeathAction(boundary_mark[0]);
boundary_mark[0] = NULL;
}
bRunBoundaryMgc_l = 0;
}
if (state == 1)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
if (boundary_mark[1])
{
DeathAction(boundary_mark[1]);
boundary_mark[1] = NULL;
}
bRunBoundaryMgc_r = 0;
}
if (state == stateno[0] //<2F><><EFBFBD><EFBFBD>
|| state == stateno[1]
|| state == stateno[2]
|| state == stateno[3])
{
if (bRunBoundaryMgc_l != state)
{
if (boundary_mark[0])
{
DeathAction(boundary_mark[0]);
boundary_mark[0] = NULL;
}
bRunBoundaryMgc_l = state;
if (boundary_mark[0] == NULL)
{
boundary_mark[0] = MakeAnimDisp(320, 240, state + 2, 0);
boundary_mark[0]->actNo = 0;
boundary_mark[0]->anim_ang = 3;
boundary_mark[0]->dispPrio = DISP_PRIO_TILE + 1;//ͼ<><CDBC>
}
}
}
if (state == stateno[4] //<2F>ҵ<EFBFBD>
|| state == stateno[5]
|| state == stateno[6]
|| state == stateno[7])
{
if (bRunBoundaryMgc_l != state)
{
if (boundary_mark[1])
{
DeathAction(boundary_mark[1]);
boundary_mark[1] = NULL;
}
bRunBoundaryMgc_r = state;
if (boundary_mark[1] == NULL)
{
boundary_mark[1] = MakeAnimDisp(320, 240, state + 2, 0);
boundary_mark[1]->actNo = 0;
boundary_mark[1]->anim_ang = 3;
boundary_mark[1]->dispPrio = DISP_PRIO_TILE + 1;//ͼ<><CDBC>
}
}
}
return TRUE;
}
void RunTimeMagicBoundary(int state)
{
int stateno[] = { 101774, 101797};
if (!g_bUseAlpha)
{
stateno[0] = 101829;
stateno[1] = 101852;
}
if (boundary_2 == NULL && state >= stateno[0] && state <= stateno[1])
{
int mark = state + 1;
boundary_2 = MakeAnimDisp(320, 240, mark, 0);
boundary_2->actNo = 0;
boundary_2->anim_ang = 3;
boundary_2->dispPrio = DISP_PRIO_TILE + 1;//ͼ<><CDBC>
}
/*if ( boundary_r->anim_cnt == 10 ){//<2F><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
DeathAction(boundary_r);
boundary_r = NULL;
bRunBoundaryMgc = FALSE;
}*/
}
#endif
#ifdef __ATTACK_MAGIC
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ǰ<EFBFBD><C7B0>λ<EFBFBD><CEBB>
static int SortIdx(const void *pElement1, const void *pElement2)
{
int nth1 = *((int*)pElement1);
int nth2 = *((int*)pElement2);
if (p_party[nth1]->y < p_party[nth2]->y)
return -1;
else if (p_party[nth1]->y > p_party[nth2]->y)
return 1;
return 0;
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD>
BOOL BuildAttackMagicData(ACTION *pMaster, ACTION *pAttacker)
{
int i, idx = 0, midx, midy, count = 0;
int charidx[MAX_NUM_ATTACKED];
memset(&AttMgc, 0, sizeof(AttMgc));
memset(charidx, 0, sizeof(charidx));
iAttackedNum = 0;
iCurAttackedFinishNum = 0;
// BJ|Attacker's No( 0 - 19 )|12345678|Attacker's MP|
ATR_VCT_NO(pAttacker) = ATTACK_MAGIC_CASE;
ATR_MP(pAttacker) = get_num();
AttMgc.iPreMgcNum = get_num();
AttMgc.iCurMgcNum = get_num();
AttMgc.iPostMgcNum = get_num();
AttMgc.wAttackType = (WORD)get_num();
AttMgc.wAttackTimeSlice = (WORD)get_num();
AttMgc.wShowType = (WORD)get_num();
AttMgc.wScreenX = (WORD)get_num();
AttMgc.wScreenY = (WORD)get_num();
AttMgc.wPreMgcX = (WORD)get_num();
AttMgc.wPreMgcY = (WORD)get_num();
AttMgc.wPostMgcX = (WORD)get_num();
AttMgc.wPostMgcY = (WORD)get_num();
AttMgc.wPreMgcOnChar = (WORD)get_num();
AttMgc.wCurMgcOnChar = (WORD)get_num();
AttMgc.wPostMgcOnChar = (WORD)get_num();
AttMgc.dwEQuake = (DWORD)get_num();
AttMgc.dwEQuakeSTime = (DWORD)get_num();
AttMgc.dwEQuakeETime = (DWORD)get_num();
do
{
charidx[idx] = get_num();
} while (0XFF != charidx[idx] && ++idx);
if (0 == idx)
return FALSE;
while (0X12345678 != (AttackedInfo[iAttackedNum * 4] = get_num()))
{
AttackedInfo[iAttackedNum * 4 + 1] = get_num();
AttackedInfo[iAttackedNum * 4 + 2] = get_num();
AttackedInfo[iAttackedNum * 4 + 3] = get_num();
iAttackedNum++;
}
AttMgc.dwCurFrame1 = 0;
AttMgc.dwCurFrame2 = 0;
AttMgc.dwEQuakeSFrame = AttMgc.dwEQuakeSTime >> 4;
AttMgc.dwEQuakeEFrame = AttMgc.dwEQuakeETime >> 4;
// <20>Ƿ<EFBFBD><C7B7><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
(0XFFFFFFFF == AttMgc.iPreMgcNum) ? AttMgc.wRunPreMgc = TRUE : AttMgc.wRunPreMgc = FALSE;
// <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>
if (1 == AttMgc.wShowType)
{
AttMgc.wNumAttacks = 1;
AttMgc.wCurAttackNum = 0;
AttMgc.posAttacked[0].x = AttMgc.wScreenX;
AttMgc.posAttacked[0].y = AttMgc.wScreenY;
AttMgc.wAttackedIndex[0] = 20; // ȫ<><C8AB><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
AttMgc.wMgcFrameCount[0] = 0;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (i = 0; i < idx; i++)
AttMgc.wAttackedIndex[i + 1] = charidx[i];
AttMgc.wAttackedIndex[i + 1] = 0XFF;
}
// <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>
else
{
// <20><><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>ʽΪȫ<CEAA><C8AB>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>
if (2 == AttMgc.wAttackType || 4 == AttMgc.wAttackType)
{
midx = 0;
midy = 0;
for (i = 0; i < idx; i++)
{
midx += p_party[charidx[i]]->x;
midy += p_party[charidx[i]]->y;
}
midx = int(midx / idx);
midy = int(midy / idx);
AttMgc.wNumAttacks = 1;
AttMgc.wCurAttackNum = 0;
AttMgc.posAttacked[0].x = midx + AttMgc.wScreenX;
AttMgc.posAttacked[0].y = midy + AttMgc.wScreenY;
AttMgc.wAttackedIndex[0] = 20; // ȫ<><C8AB><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
AttMgc.wMgcFrameCount[0] = 0;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (i = 0; i < idx; i++)
AttMgc.wAttackedIndex[i + 1] = charidx[i];
AttMgc.wAttackedIndex[i + 1] = 0XFF;
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (i = 0; i < idx; i++)
{
AttMgc.wNumAttacks++;
AttMgc.posAttacked[i].x = AttMgc.wScreenX;
AttMgc.posAttacked[i].y = AttMgc.wScreenY;
AttMgc.wAttackedIndex[i] = charidx[i];
AttMgc.wMgcFrameCount[i] = count;
count += AttMgc.wAttackTimeSlice >> 4;
}
}
}
ATR_VCT_NO(pAttacker) = ATTACK_MAGIC_CASE;
ATR_BODY_CNT(pMaster) = 1;
bRunAttMgc = TRUE;
return TRUE;
}
// <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD>ħ<EFBFBD><C4A7>
BOOL RunTimeMagic()
{
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
if (AttMgc.dwEQuakeSFrame == AttMgc.dwCurFrame1)
{
g_iRunEarthQuake = 1;
g_iNumRunEarthQuake = AttMgc.dwEQuakeEFrame - AttMgc.dwEQuakeSFrame;
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (AttMgc.dwEQuakeEFrame == AttMgc.dwCurFrame1)
g_iRunEarthQuake = 3;
AttMgc.dwCurFrame1++;
// ǰ<><C7B0>ħ<EFBFBD><C4A7><EFBFBD>Ƿ<EFBFBD><C7B7>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (FALSE == AttMgc.wRunPreMgc)
return TRUE;
// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>
if (AttMgc.wCurAttackNum < AttMgc.wNumAttacks)
{
while (1)
{
if (AttMgc.dwCurFrame2 == AttMgc.wMgcFrameCount[AttMgc.wCurAttackNum])
{
ACTION *a0;
a0 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
ATR_NAME(a0) = monster;
ATR_VCT_NO(a0) = ATTACK_MAGIC_CASE + 2; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>
ATR_DISP_PRIO(a0) = (1 == AttMgc.wCurMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
ATR_CHR_NO(a0) = AttMgc.iCurMgcNum;
ATR_LONG_WORK(0, a0) = AttMgc.wAttackedIndex[AttMgc.wCurAttackNum];
ATR_H_POS(a0) = (20 == AttMgc.wAttackedIndex[AttMgc.wCurAttackNum]) ? AttMgc.posAttacked[AttMgc.wCurAttackNum].x : ATR_H_POS(p_party[AttMgc.wAttackedIndex[AttMgc.wCurAttackNum]]) + AttMgc.posAttacked[AttMgc.wCurAttackNum].x;
ATR_V_POS(a0) = (20 == AttMgc.wAttackedIndex[AttMgc.wCurAttackNum]) ? AttMgc.posAttacked[AttMgc.wCurAttackNum].y : ATR_V_POS(p_party[AttMgc.wAttackedIndex[AttMgc.wCurAttackNum]]) + AttMgc.posAttacked[AttMgc.wCurAttackNum].y;
AttMgc.wCurAttackNum++;
}
if (AttMgc.wCurAttackNum >= AttMgc.wNumAttacks || AttMgc.wMgcFrameCount[AttMgc.wCurAttackNum] > AttMgc.dwCurFrame2)
break;
}
}
AttMgc.dwCurFrame2++;
return TRUE;
}
#endif
//<2F><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>
void master(ACTION *a0)
{
ACTION *a1, *a2, *a3;
int d0, d1, d2, d3, d6, d7;
int z = 0;
int jjj = 0;
int command_no;
int sav_command_point, castflg = 0;
int petfall_flg = 0;
//<2F><><EFBFBD>Ա<EFBFBD>ʾ
disp_attrib(a0);
if (ATR_VCT_NO(a0) == 0) // <20><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>
{
if (BattleCmd[0] == NULL) //ս<><D5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>
goto master_500;
}
switch (ATR_VCT_NO(a0))
{
case 0: //????<3F>D?
sav_command_point = command_point; //?????<3F><>?????<3F>~<7E><>
command_no = get_command(); //????<3F><>?<3F><>?
if (command_no == -1) //<2F><>???
{
ATR_VCT_NO(a0) = 4; //???<3F><>?<3F>r??
command_point = 0; //?????<3F><>????????
break;
}
if (command_no == ATT_KANJI) //<2F><>??<3F><><EFBFBD><EFBFBD>??
{
if (p_kanji != NULL) //<2F><><EFBFBD><EFBFBD>???
{
a1 = ATR_BODY_WORK(0, p_kanji); //??????<3F><>
DeathAction(a1); //
}
else
{
p_kanji = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (p_kanji == NULL)
return;
}
//<2F><><EFBFBD><EFBFBD>BOX<4F><58><EFBFBD><EFBFBD>
a1 = MakeWindowDisp(640 - 4 - 64 * 4, 4, 4, 2, 0, 2);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E5B2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
if (a1 == NULL)
return;
ATR_BODY_WORK(0, p_kanji) = a1; //?????<3F><><EFBFBD>V
ATR_NAME(p_kanji) = disp_kanji; //??????
ATR_ATTRIB(p_kanji) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
// ????????
play_se(202, 320, 240);
command_point++; //??????????
//????<3F><>?<3F><>????
get_command_asc();
d0 = 60; //<2F><><EFBFBD><EFBFBD>???<3F><>
for (d7 = 0; d7 < 4; d7++)
{
if (kanji_buf[d7][0]) //<2F><>??????
d0 += 60; //<2F><><EFBFBD><EFBFBD>???<3F><>
}
ATR_INT_WORK0(p_kanji) = d0;
ATR_VCT_NO(a0) = 1; //????<3F>r?
ATR_BODY_CNT(a0) = 1;
ATR_DAMAGE(a0) = 0;
ATR_PET_DAMAGE(a0) = 0;
break;
}
if (command_no == ATT_EFFECT)
{
#ifdef __NEW_BATTLE_EFFECT
// Bj | target(who) | effect(effect no) | effect_anim | param | .... | FF
ACTION *target = NULL;
int who;
int effect;
int effect_anim;
int param;
ATR_VCT_NO(a0) = 1;
while (1)
{
who = get_num();
if (who == 255)
break;
effect = get_num(); //<2F><>Ч<EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
effect_anim = get_num(); //<2F><>Ч<EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>
param = get_num(); //<2F><><EFBFBD><EFBFBD>
target = NULL;
if (who < BATTLKPKPLYAERNUM)
target = p_party[who];
if (target)
{
ATR_EFFECT_FLAG(target) = effect;
ATR_EFFECT_ANIM(target) = effect_anim;
ATR_EFFECT_PARAM(target) = param;
ATR_BODY_CNT(a0)++;
}
}
#endif
break;
}
#ifdef _PETSKILL_BATTLE_MODEL
if (command_no == ATT_BATTLE_MODEL) // <20><><EFBFBD><EFBFBD><EFBCBC>ս<EFBFBD><D5BD>ģ<EFBFBD><C4A3>
{
ATR_VCT_NO(a0) = 1;
ATR_PET_DAMAGE(a0) = 0;
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
ATR_SYNC_FLG(p_party[d7]) = 0;
ATR_ATTACK_KIND(0, p_party[d7]) = 0;
ATR_ATTACK_KIND(1, p_party[d7]) = 0;
ATR_ATTACK_POW(0, p_party[d7]) = 0;
ATR_ATTACK_PET_POW(0, p_party[d7]) = 0;
ATR_MPDAMAGE(p_party[d7]) = 0;
ATR_MPDFLG(p_party[d7]) = 0;
ATR_ADDHP(p_party[d7]) = 0;
ATR_ADDHPFLG(p_party[d7])=0;
ATR_SHOWADDHP(p_party[d7])=0;
ATR_LONG_WORK(0, p_party[d7]) = 0;
ATR_BATTLE_MODEL(p_party[d7]) = 0;
memset(&ATR_BODY_WORK(0, p_party[d7]), 0, sizeof(ACTION*) * 20);
memset(p_missile, 0, sizeof(p_missile));
}
d7 = 0;
// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
d0 = get_num();
a3 = p_party[d0];
// <20>жϹ<D0B6><CFB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϻ<EFBFBD><CFBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼλ<CABC><CEBB>
if (ATR_GROUP_FLG(a3) == 0)
{
d2 = 3; // <20><><EFBFBD><EFBFBD>
d0 = 0;
}
else
{
d2 = 7; // <20><><EFBFBD><EFBFBD>
d0 = 10;
}
// ȡ<><C8A1>Ŀ<EFBFBD><EFBFBD><EAB9A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
a1 = NULL;
while ((d6 = get_num()) != 255)
{
a1 = p_party[d6];
if (ATR_VCT_NO(a1) != 55)
ATR_FIRST_FLG(a1) = 0;
ATR_ATTACK_KIND(2, a1) = 0;
d3 = get_num(); // ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20>ж<EFBFBD> p_missile[d3] <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>
// <20><>ʹ<EFBFBD><CAB9>,<2C><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>
if (p_missile[d3] != NULL)
{
a2 = p_missile[d3];
ATR_BODY_WORK(ATR_INT_WORK1(a2), a2) = a1; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_BATTLE_MODEL(a1) = ATT_BATTLE_MODEL; // <20><>Ŀ<EFBFBD><C4BF><EFBFBD>DZ<EFBFBD> ATT_BATTLE_MODEL <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
ATR_ATTACK_KIND(ATR_INT_WORK1(a2), a2) = get_num(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_POW(ATR_INT_WORK1(a2), a2) = get_num(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_PET_POW(ATR_INT_WORK1(a2), a2) = get_num(); // pet<65><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_CHR_NO(a2) = get_num(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȮЧ<C8AE><D0A7>,<2C><>¼ʹ<C2BC><CAB9><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>Ŀ<EFBFBD><C4BF>
if (BattleCmd[command_point] == 'g')
ATR_LONG_WORK(ATR_INT_WORK1(a2), a2) = get_num();
ATR_INT_WORK1(a2)++;
// <20><>¼Ŀ<C2BC><C4BF><EFBFBD>б<EFBFBD><D0B1>˹<EFBFBD><CBB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_LONG_WORK(0, a1) == 0)
{
ATR_LONG_WORK(0, a1) = 1; // ATR_LONG_WORK <20><>λ : λַ 0 : <20><><EFBFBD>趨Ŀ<E8B6A8><C4BF><EFBFBD>Ƿ񱻹<C7B7><F1B1BBB9><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>趨Ϊ1
ATR_LONG_WORK(d3, a1) = d7 + 1; // λַ d3: d3 <20>ǹ<EFBFBD><C7B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>,<2C><> d3 <20><>λַ<CEBB><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> d7 + 1 <20>ĻغϹ<D8BA><CFB9><EFBFBD>Ŀ<EFBFBD><C4BF>
}
else
ATR_LONG_WORK(d3, a1) = d7 + 1; // <20><> ATR_LONG_WORK <20><>λ 0 <20><>Ϊ 0 ʱ,<2C><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
// <20><><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD> d3 <20><>λַ<CEBB><D6B7>¼Ҫ<C2BC><D2AA> d7 + 1 <20>ĻغϹ<D8BA><CFB9><EFBFBD>Ŀ<EFBFBD><C4BF>
}
// ûʹ<C3BB>ù<EFBFBD>
else
{
p_missile[d3] = GetAction(T_PRIO_BOW, sizeof(ATR_EQU));
if (p_missile[d3] == NULL)
break; // <20><>̫<EFBFBD><CCAB><EFBFBD><EFBFBD>
a2 = p_missile[d3];
// <20><>ʼ<EFBFBD><CABC>
ATR_NAME(a2) = monster;
ATR_CHR_ANG(a2) = d2;
ATR_H_POS(a2) = monster_start_pos[monster_place_no[d3 + d0] * 2];
ATR_V_POS(a2) = monster_start_pos[monster_place_no[d3 + d0] * 2 + 1];
ATR_CHR_ACT(a2) = ANIM_STAND;
ATR_GROUP_FLG(a2) = ATR_GROUP_FLG(a3);
a2->hitDispNo = a3->hitDispNo;
ATR_VCT_NO(a2) = 1; // ǰ<><C7B0>
ATR_BODY_WORK(0, a2) = a1; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>
ATR_BATTLE_MODEL(a1) = ATT_BATTLE_MODEL; // <20><>Ŀ<EFBFBD><C4BF><EFBFBD>DZ<EFBFBD> ATT_BATTLE_MODEL <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
// <20><>¼Ŀ<C2BC><C4BF><EFBFBD>б<EFBFBD><D0B1>˹<EFBFBD><CBB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_LONG_WORK(0, a1) == 0)
{
ATR_LONG_WORK(0, a1) = 1; // ATR_LONG_WORK <20><>λ : λַ 0 : <20><><EFBFBD>趨Ŀ<E8B6A8><C4BF><EFBFBD>Ƿ񱻹<C7B7><F1B1BBB9><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>趨Ϊ1
ATR_LONG_WORK(d3, a1) = d7 + 1; // λַ d3: d3 <20>ǹ<EFBFBD><C7B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>,<2C><> d3 <20><>λַ<CEBB><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> d7 + 1 <20>ĻغϹ<D8BA><CFB9><EFBFBD>Ŀ<EFBFBD><C4BF>
}
else
ATR_LONG_WORK(d3, a1) = d7 + 1; // <20><> ATR_LONG_WORK <20><>λ 0 <20><>Ϊ 0 ʱ,<2C><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
// <20><><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD> d3 <20><>λַ<CEBB><D6B7>¼Ҫ<C2BC><D2AA> d7 + 1 <20>ĻغϹ<D8BA><CFB9><EFBFBD>Ŀ<EFBFBD><C4BF>
ATR_ATTACK_KIND(0, a2) = get_num(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_POW(0, a2) = get_num(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_PET_POW(0, a2) = get_num(); // pet<65><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_CHR_NO(a2) = get_num(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
ATR_PLACE_NO(a2) = d3; // <20><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_INT_WORK0(a2) = ATT_BATTLE_MODEL; // <20><EFBFBD><E8B6A8> action <20><> ATT_BATTLE_MODEL <20><>ʹ<EFBFBD><CAB9>,<2C>Է<EFBFBD><D4B7><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>ʶ,ʹ<><CAB9> work0 <20><>¼
ATR_INT_WORK1(a2) = 1; // <20><EFBFBD>˹<EFBFBD><CBB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ʹ<><CAB9> work1<6B><31>¼
ATR_INT_WORK2(a2) = 0; // <20><>Ϊ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>һ<EFBFBD><D2BB>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EBBFAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_INT_WORK3(a2) = 0; // <20><>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ټ<EFBFBD><D9BC><EFBFBD><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȮЧ<C8AE><D0A7>,<2C><>¼ʹ<C2BC><CAB9><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>Ŀ<EFBFBD><C4BF>
if (BattleCmd[command_point] == 'g')
ATR_LONG_WORK(0, a2) = get_num();
ATR_SPD(a2) = 32; // <20>ƶ<EFBFBD><C6B6>ٶ<EFBFBD>
}
d7++;
}
ATR_COUNTER(a0) = a1;
ATR_DAMAGE(a0) = -d7; // <20><>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD> ATR_DAMAGE(p_master) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ATR_BODY_CNT(p_master)
ATR_INT_WORK1(a0) = 0; // ȷ<><C8B7> p_missile <20>Ƿ񶼱<C7B7><F1B6BCB1><EFBFBD><EFBFBD><EFBFBD>
ATR_INT_WORK2(a0) = 1; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>˳<EFBFBD><CBB3>,<2C>ȴ<EFBFBD> ATR_LONG_WORK Ϊ 1 <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>
ATR_BODY_CNT(a0) = d7; // <20><><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD>,ÿ<><C3BF><EFBFBD><EFBFBD>һ<EFBFBD>ζ<EFBFBD><CEB6><EFBFBD> ATR_DAMAGE(p_master) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><D6B1> ATR_DAMAGE(p_master) == ATR_BODY_CNT(p_master)
// p_master <20>Ż<EFBFBD>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB> BattleCmd <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> a0 <20><><EFBFBD><EFBFBD> p_master)
break;
}
#endif
d0 = get_num(); //?????<3F>k?
if (d0 < 0 || d0 >= BATTLKPKPLYAERNUM) //<2F><>????<3F>k???
{
if (command_no == ATT_VARIABLE) //<2F><><EFBFBD>t<EFBFBD>N<EFBFBD>ͨ<EFBFBD>???
{
ATR_ATTRIB(p_master) = get_num(); //<2F>N<EFBFBD><4E><EFBFBD><EFBFBD>?<3F><>?
break;
}
else
{
#ifdef _STONDEBUG_
MessageBoxNew(hWnd, "command_no != ATT_VARIABLE", "Error", MB_OK);
#endif
break;
}
}
a1 = p_party[d0]; //???????
if (ATR_NAME(a1) == NULL) //???????????????
{
#ifdef _STONDEBUG_
MessageBoxNew(hWnd, "ATR_NAME(a1) == NULL", "Error", MB_OK);
#endif
command_no = get_command(); //????<3F><>?<3F><>?
if (command_no == -1) //<2F><>???
{
ATR_VCT_NO(a0) = 4; //???<3F><>?<3F>r??
command_point = 0; //?????<3F><>????????
break;
}
command_point -= 2; //?????????<3F><>?
break;
}
if (command_no != ATT_MALFUNCTION) //??????
{
if (ATR_LIFE(a1) <= 0) //??????
ATR_VCT_NO(a1) = 0; //<2F>`??
}
if (command_no != ATT_MALFUNCTION) //??????
{
if (ATR_VCT_NO(a1) != 0) //<2F>r?<3F>֢t? command_point = sav_command_point; //????<3F>r?
break;
}
ATR_VCT_NO(a0) = 1; //<2F>s<EFBFBD><73>?<3F>~<7E>r??
ATR_DAMAGE(a0) = 0;
ATR_PET_DAMAGE(a0) = 0;
ATR_COUNTER(a0) = a1; //?????<3F><><EFBFBD>V
//?????????????
if (ATR_VCT_NO(a1) != 55)
ATR_FIRST_FLG(a1) = 0; //????????
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++) //??????
{
ATR_SYNC_FLG(p_party[d7]) = 0;
ATR_ATTACK_KIND(0, p_party[d7]) = 0;
ATR_ATTACK_KIND(1, p_party[d7]) = 0;
ATR_ATTACK_POW(0, p_party[d7]) = 0;
ATR_ATTACK_PET_POW(0, p_party[d7]) = 0;
//andy_mp
ATR_MPDAMAGE(p_party[d7]) = 0;
ATR_MPDFLG(p_party[d7]) = 0;
ATR_ADDHP(p_party[d7]) = 0;
ATR_ADDHPFLG(p_party[d7]) = 0;
ATR_SHOWADDHP(p_party[d7]) = 0;
#ifdef _PETSKILL_BATTLE_MODEL
ATR_BATTLE_MODEL(p_party[d7]) = 0;
ATR_BODY_WORK(0, p_party[d7]) = NULL;
#endif
}
//??????
ATR_ATTACK_KIND(2, a1) = 0;
switch (command_no)
{
// BI jibun_5 teki_F flg_2 damage_1 teki_9 flg_2 damage_1 FF
case ATT_IN: //?????????? <20><>??<3F><><EFBFBD><EFBFBD>? ??????????
if (ATR_GROUP_FLG(a1) == 0) //????????
{
ATR_V_POS(a1) = 8;
ATR_H_POS(a1) = -SCREEN_OUT;
}
else
{
ATR_V_POS(a1) = lpDraw->ySize - 8;
ATR_H_POS(a1) = lpDraw->xSize + SCREEN_OUT;
}
case ATT_HIT: //====================ֱ<>ӹ<EFBFBD><D3B9><EFBFBD>===============
ATR_VCT_NO(a1) = 1; //ǰ<><C7B0>
ATR_BODY_WORK(0, a1) = p_party[get_num()]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_KIND(0, a1) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_POW(0, a1) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a1) = get_num(); //pet<65><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#ifdef _STONDEBUG_
else
LogToBattleError( BattleCmd, __LINE__ );
#endif
ATR_BODY_CNT(a0) = 1;
#ifdef _ATTDOUBLE_ATTACK
//andy_add
if (ATR_ATTACK_KIND(0, a1) & ATT_ATTDOUBLE || ATR_ATTACK_KIND(0, a1) & BCF_MODIFY)
ATR_BATTLEGRANO(a1) = get_num();
#endif
#ifdef _ATTACK_EFFECT
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȯ xiezi
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a1) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
break;
#ifdef _MAGIC_DEEPPOISION
case ATT_DEEPPOISION: //<2F>
ATR_VCT_NO(a1) = 1; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_BODY_WORK(0, a1) = p_party[get_num()];//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //<2F><>?<3F><>???
ATR_ATTACK_KIND(0, a1) = get_num(); //<2F>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>??<3F><>????
ATR_ATTACK_POW(0, a1) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>??????
ATR_ATTACK_PET_POW(0, a1) = get_num();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_BODY_CNT(a0) = 1;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_DEEPPOISION(a1) = 1;
break;
#endif
//andy_mp
case ATT_MPDAMAGE://MP<4D>˺<EFBFBD>
ATR_VCT_NO(a1) = 1;
ATR_BODY_WORK(0, a1) = p_party[get_num()];
ATR_ATTACK_KIND(0, a1) = get_num();
ATR_ATTACK_POW(0, a1) = get_num();
ATR_ATTACK_PET_POW(0, a1) = get_num();
ATR_MPDAMAGE(a1) = get_num();
ATR_BODY_CNT(a0) = 1;
ATR_MPDFLG(a1) = 1;
break; //set_damage_num( a1, 16, -64 )
case ATT_DAMAGETOHP:
ATR_VCT_NO(a1) = 1;
ATR_BODY_WORK(0, a1) = p_party[get_num()];
ATR_ATTACK_KIND(0, a1) = get_num();
ATR_ATTACK_POW(0, a1) = get_num();
ATR_ATTACK_PET_POW(0, a1) = get_num();
ATR_ADDHP(a1) = get_num();
ATR_BODY_CNT(a0) = 1;
ATR_SHOWADDHP(a1) = 1;
ATR_ADDHPFLG(a1) = 1;
break;
//BF jibun_5
case ATT_FADE_OUT: //?????????? <20><>??<3F><>?<3F><> ??????????
ATR_VCT_NO(a1) = 80; //?<3F>~?
//??????
ATR_ATTACK_KIND(2, a1) = 1;
ATR_BODY_CNT(a0) = 1;
break;
//BN|<7C><>???<3F><><EFBFBD>k?|?????<3F>k?|
case ATT_NEXT_EQUIP: //?????????? ?<3F><><EFBFBD><EFBFBD>? ??????????
ATR_VCT_NO(a1) = 82; //?<3F><><EFBFBD><EFBFBD>?
ATR_BODY_CNT(a0) = 1;
break;
//BJ|Attacker's No( 0 - 19 )|Attacker's MP|Attacker's animation index|
// Opposite's animation index|Opposite's index ...
//BJ|???<3F><><EFBFBD>k?|??|???<3F><>?????<3F>k?|?????<3F><>?????<3F>k?|?????<3F><>|?????<3F><>|FF
case ATT_JUJUTSU: //?????????? <20><><EFBFBD><EFBFBD> ??????????
ATR_VCT_NO(a1) = 75; //?<3F><>?<3F><><EFBFBD>ӡu<D3A1>a??
ATR_MP(a1) = get_num(); //?????
ATR_BODY_CNT(a0) = 1;
#ifdef __ATTACK_MAGIC
if (ATTACK_MAGIC_ID == ATR_MP(a1))
BuildAttackMagicData(a0, a1);
#endif
break;
case ATT_TOCALL:
ATR_VCT_NO(a1) = 2; //?<3F><>?<3F><><EFBFBD>ӡu<D3A1>a??
ATR_MP(a1) = get_num(); //?????
ATR_BODY_CNT(a0) = 1;
#ifdef __TOCALL_MAGIC
if (TOCALL_MAGIC_ID == ATR_MP(a1))
BuildToCallMagicData(a0, a1);
#endif
break;
case ATT_MALFUNCTION: //?????????? <20>O<EFBFBD>l<EFBFBD><6C><EFBFBD><EFBFBD> ??????????
d0 = get_num(); //<2F><><EFBFBD>ӧk?<3F><>?<3F><>?
ATR_STATUS(a1) = d0; //????????
switch (d0)
{
//<2F><>?<3F><>?
case 0:
ATR_VCT_NO(a0) = 0; //????
a2 = ATR_JUJUTSU_WORK(a1);
ATR_JUJUTSU_WORK(a1) = NULL;
DeathAction(a2); //<2F><>?
break;
//??
case 2:
//<2F><>?????
if (ATR_LIFE(a1) > 0)
{
ATR_BODY_CNT(a0) = 1;
ATR_VCT_NO(a1) = 105; //??<3F>r??
ATR_STIMER(a1) = 60;
set_single_jujutsu(d0, a1); //<2F>O<EFBFBD>l<EFBFBD><6C><EFBFBD><EFBFBD>???
}
else
ATR_VCT_NO(a0) = 0; //????
break;
//?<3F><>
default:
ATR_VCT_NO(a0) = 0; //????
set_single_jujutsu(d0, a1); //<2F>O<EFBFBD>l<EFBFBD><6C><EFBFBD><EFBFBD>???
break;
}
break;
//ATR_ATTACK_KIND(a1);
/*
case ATT_MAGICSTATUS: //andy_add magicstatus
d0 = get_num();
ATR_STATUS(a1) = d0;
switch (d0){
case 0:
ATR_VCT_NO(a0) = 0;
a2 = ATR_MAGICSU_WORK(a1);
ATR_MAGICSU_WORK(a1) = NULL;
DeathAction( a2 );
break;
default:
ATR_VCT_NO(a0) = 0;
set_magic_status(d0, a1);
break;
}
break;
*/
// ???????<3F><>????????????<3F>k
case ATT_DAMAGE:
ATR_BODY_CNT(a0) = 1;
ATR_VCT_NO(a1) = 79;
ATR_LONG_WORK(0, a1) = 0;
d2 = d0 = get_num();
d3 = d1 = get_num();
att_damage_loop:
ATR_DAMAGE(a1) = get_num();
if (BattleCmd[command_point] == 'p')
ATR_PET_DAMAGE(a1) = get_num(); //pet damage
switch (d0)
{
case 0: //??
switch (d1)
{
case 0: //?
set_damage_num(a1, 6, -64);
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
set_jujutsu_hit_mark(a1); //<2F><><EFBFBD><EFBFBD>??????<3F><><EFBFBD><EFBFBD>
if (ATR_LIFE(a1) <= 0) //??????
{
ATR_LIFE(a1) = 0;
slow_flg++; //????<3F><>
}
ATR_PET_LIFE(a1) -= ATR_PET_DAMAGE(a1);
set_jujutsu_hit_mark(a1); //
//andy_log
if (ATR_PETFALL(a0) == 1)
{
if (ATR_LIFE(a0) > 0)
petfallChangeGraph(a0);
}
if (ATR_PET_LIFE(a1) <= 0 && ATR_RIDE(a1)) //??????
{
ATR_PET_LIFE(a1) = 0;
//slow_flg++; //????<3F><>
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
ATR_CHR_ACT(a1) = ANIM_DAMAGE; //???????????
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78; //???????
break;
case 1: //?
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
set_damage_num(a1, 14, -64);
ATR_LIFE(a1) += ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) > ATR_PET_MAX_LIFE(a1))
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1);
play_se(102, ATR_H_POS(a1), 240);
break;
//andy_add <09>غϲ<D8BA>Ѫ
case 2:
if (BattleCmd[command_point] == 'm')
ATR_MPDAMAGE(a1) = get_num();
set_damage_num(a1, 36, -64);
ATR_LIFE(a1) += ATR_DAMAGE(a1);
ATR_MP(a1) += ATR_MPDAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1))
ATR_LIFE(a1) = ATR_MAX_LIFE(a1);
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) >= ATR_PET_MAX_LIFE(a1))
{
int k;
k = ATR_PET_MAX_LIFE(a1);
k = ATR_PET_LIFE(a1);
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1);
k = ATR_PET_LIFE(a1);
}
//ATR_CHR_ACT(a1) = ANIM_DAMAGE;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
case 3:
set_damage_num(a1, 37, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
case 4://<2F><>
set_damage_num(a1, 38, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
case 5://<2F><>
set_damage_num(a1, 39, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
case 6://<2F><>
set_damage_num(a1, 40, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
#ifdef _SKILL_ADDBARRIER
case 7://<2F><><EFBFBD><EFBFBD>
set_damage_num(a1, 43, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
#endif
#ifdef _PETSKILL_PEEL
case 8://<2F><>ж<EFBFBD><D0B6>װ<EFBFBD><D7B0>
set_damage_num(a1, 44, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
#endif
#ifdef _PETSKILL_JUSTICE
case 9:
set_damage_num(a1, 45, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
#endif
#ifdef _PETSKILL_PROVOKEFIGHT
case 10:
set_damage_num(a1, 48, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
#endif
#ifdef _PRO3_ADDSKILL
case 11:
set_damage_num(a1, 49, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
case 12:
set_damage_num(a1, 50, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
case 13:
set_damage_num(a1, 51, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
#endif
#ifdef _PETSKILL_ADDATTCRAZED
/* case 10:
set_damage_num(a1, 46, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;*/
#endif
}
break;
case 1: //??
switch (d1)
{
case 0: //?
set_damage_num(a1, 16, -64);
ATR_MP(a1) -= ATR_DAMAGE(a1); //??????
if (ATR_MP(a1) < 0) //?<3F>t???
ATR_MP(a1) = 0; //????
break;
case 1: //?
set_damage_num(a1, 15, -64);
ATR_MP(a1) += ATR_DAMAGE(a1); //?????
#ifdef _FIXSHOWMPERR //Syu ADD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
if (ATR_MP(a1) > pc.maxMp)
ATR_MP(a1) = pc.maxMp;
#else
if (ATR_MP(a1) > 100) //????<3F><>??
ATR_MP(a1) = 100; //??????
#endif
//???
play_se(102, ATR_H_POS(a1), 240);
break;
#ifdef _PETSKILL_ADDATTCRAZED
case 3:
set_damage_num(a1, 46, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
case 4:
set_damage_num(a1, 47, -64);
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a1) = 78;
break;
#endif
}
break;
#ifdef _PETSKILL_LER
case 3: // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
set_damage_num(a1, 0, -64);
break;
#endif
}
d6 = command_point; //????????<3F>~<7E><>
d0 = get_command(); //??????<3F><>?<3F><>?
if (d0 == ATT_DAMAGE) //??????
{
a1 = p_party[d0 = get_num()]; //???????
d0 = get_num(); //?????<3F><>?<3F><>?
if (d2 == d0) //????<3F>i???
{
d1 = get_num(); //?????<3F><>?<3F><>?
if (d3 == d1) //????<3F>i???
goto att_damage_loop;
}
}
command_point = d6; //??????????
break;
//BV|???<3F><><EFBFBD>k??????|<7C>N<EFBFBD>ͧk?
case ATT_VARIABLE: //?????????? ?????<3F>N<EFBFBD>ͨ<EFBFBD>? ??????????
ATR_BODY_CNT(a0) = 1;
ATR_VCT_NO(a1) = 85; //?????<3F>N<EFBFBD>ͨ<EFBFBD>??
break;
//BR|????<3F><>|????????
case ATT_REVERSE: //?????????? <20>N<EFBFBD>ͧT<CDA7><54> ??????????
ATR_VCT_NO(a0) = 0; //????
d0 = get_num(); //?????????<3F><>?<3F><>?
switch (d0)
{
//???
case 0:
a2 = ATR_ATTRIB_WORK(a1);
ATR_ATTRIB_WORK(a1) = NULL;
DeathAction(a2); //<2F><>?
break;
//??
default:
set_attrib_reverse(a1); //<2F>N<EFBFBD>ͧT<CDA7><54>???
break;
}
break;
//BL|????<3F><>|??
case ATT_LIFE: //?????????? <20><>?<3F><>? ??????????
ATR_VCT_NO(a0) = 0; //????
ATR_DAMAGE(a1) = get_num(); //??<3F><>?<3F><>?
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
ATR_LIFE(a1) = ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
ATR_VCT_NO(a1) = 0; //<2F>_<EFBFBD><5F>?
ATR_CHR_ACT(a1) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
break;
//BQ|????<3F><>
case ATT_QUIT: //?????????? ???<3F>`?? ??????????
ATR_BODY_CNT(a0) = 1;
ATR_VCT_NO(a1) = 87; //???<3F>`??<3F>q?
break;
//BX|????<3F><>
case ATT_NIX: //?????????? ????<3F>r ??????????
ATR_BODY_CNT(a0) = 1;
ATR_VCT_NO(a1) = 90; //????<3F>r
break;
//B!|??????????????<3F><>????
case ATT_COMPANIONS: //?????????? <20>s???? ??????????
ATR_BODY_CNT(a0) = 1;
ATR_VCT_NO(a1) = 95; //<2F>s?????<3F><>?
break;
//B#|??<3F><>?????<3F><>?<3F><>????
case ATT_STEAL: //?????????? ???? ??????????
ATR_BODY_CNT(a0) = 1;
ATR_VCT_NO(a1) = 100; //??????
break;
//B%|????<3F><>????<3F>k?
case ATT_TALK: //?????????? ???? ??????????
ATR_BODY_CNT(a0) = 1;
ATR_VCT_NO(a1) = 110; //?????
ATR_STIMER(a1) = 60;
d0 = get_num(); //???<3F>k?<3F><>?<3F><>?
//?????????<3F><><EFBFBD><EFBFBD>
set_damage_num(a1, 20, -64);
break;
#ifdef _FIREHUNTER_SKILL // (<28><><EFBFBD>ɿ<EFBFBD>) ROG ADD <20><>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ
case ATT_FIRESKILL:
ATR_VCT_NO(a1) = FIRE_HUNTER_SKILL; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ
ATR_FIRST_FLG(a1) = 0;
iBeAttNum = get_num();
ATR_BODY_WORK(0, a1) = p_party[iBeAttNum]; //<2F><><EFBFBD><EFBFBD>λַ
ATR_ATTACK_KIND(0, a1) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_POW(0, a1) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// if ( BattleCmd[command_point] == 'p' ) {
ATR_ATTACK_PET_POW(0, a1) = get_num(); //pet<65><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>??
// }
d0 = get_num(); //<2F><><EFBFBD><EFBFBD>
ATR_BODY_CNT(a1) = d0; //<2F><><EFBFBD>˹<EFBFBD><CBB9><EFBFBD>
for (d7 = 2; d7 < d0 + 2; d7++)
{
int x = get_num();
if (x == iBeAttNum) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>ħ<EFBFBD><C4A7><EFBFBD>˺<EFBFBD>
{
tarMgiDem = 1;
tarpos = d7;//ATR_BODY_CNT(a1)--;
}
ATR_BODY_WORK(d7 ,a1) = p_party[x]; //<2F><><EFBFBD><EFBFBD>λַ
ATR_ATTACK_KIND(d7 ,a1) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_POW(d7 ,a1) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_PET_POW(d7 ,a1) = get_num(); //pet<65><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//}
}
break;
#endif
#ifdef _PROFESSION_ADDSKILL
case ATT_BOUNDARY:
ATR_VCT_NO(a0) = 0;
ATR_CHR_ACT(a0) = ANIM_STAND;
ATR_FIRST_FLG(a0) = 0;
ATR_VCT_NO(a1) = 0; //<2F>_<EFBFBD><5F>?
ATR_CHR_ACT(a1) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
ATR_FIRST_FLG(a1) = 0;
d0 = get_num(); //?????????<3F><>?<3F><>?
BuildBoundaryMagicData( d0 );
d0 = get_num();
break;
#endif
#ifdef _PETSKILL_RIDE
case ATT_RIDE:
ATR_VCT_NO(a0) = 0;
ATR_CHR_ACT(a0) = ANIM_STAND;
ATR_FIRST_FLG(a0) = 0;
ATR_VCT_NO(a1) = 0; //<2F>_<EFBFBD><5F>?
ATR_CHR_ACT(a1) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
ATR_FIRST_FLG(a1) = 0;
d0 = get_num(); //<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
petrideChangeGraph(a1,d0);
d0 = get_num();
break;
#endif
case ATT_BOW: //?????????? ??? ??????????
ATR_VCT_NO(a1) = 30; //????
ATR_LONG_WORK(0, a1) = get_num(); //<2F>ħk????
if (ATR_LONG_WORK(0, a1) == 0) //???
{
ATR_VCT_NO(a1) = 32; //????
ATR_STIMER(a1) = 0; //?<3F><>???????
ATR_DAMAGE(a1) = 1; //
ATR_PET_DAMAGE(a1) = 1;
}
ATR_FIRST_FLG(a1) = 0; //
ATR_BODY_WORK(0, a1) = p_party[get_num()]; //<2F><>?<3F><>???
ATR_ATTACK_KIND(0, a1) = get_num(); //??<3F><>????
ATR_ATTACK_POW(0, a1) = get_num(); //??????
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a1) = get_num(); //pet??????
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a1) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
ATR_BODY_CNT(a0) = 1;
#ifdef _SHOOTCHESTNUT // Syu ADD <20><EFBFBD><E8BCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
(ATR_CHR_NO(a1) == 101578) ? ShooterNum = 101578 : ShooterNum = -1;
#endif
break;
case ATT_BOOMERANG: //?????????? ??????? ??????????
ATR_VCT_NO(a1) = 70; //????????
ATR_FIRST_FLG(a1) = 0; //
ATR_BODY_CNT(a0) = 1;
break;
case ATT_FIRE: //?????????? ?<3F><>??? ??????????
d0 = get_body_cnt(); //??<3F><>?<3F><>?<3F><>?
if (d0 != 1) //<2F>]<5D>D????
{
ATR_VCT_NO(a1) = 20; //???<3F><>?
ATR_BODY_CNT(a0) = d0; //??<3F>D??
ATR_BODY_CNT(a1) = d0; //
if (ATR_GROUP_FLG(a1) == 0)
ATR_CHR_ANG(a1) = 3;
else if (ATR_GROUP_FLG(a1) == 1)
ATR_CHR_ANG(a1) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a1) == 2)
ATR_CHR_ANG(a1) = 5;
else if (ATR_GROUP_FLG(a1) == 3)
ATR_CHR_ANG(a1) = 1;
#endif
}
else
{ //?<3F>D????
ATR_VCT_NO(a1) = 20; //???<3F><>?
ATR_BODY_CNT(a0) = 1; //?<3F>D??
ATR_BODY_CNT(a1) = 1; //
a2 = ATR_BODY_WORK(0, a1) = p_party[get_num()]; //<2F><>?<3F><>
}
break;
case ATT_SYNCHRONOUS: //?????????? <20>i??? ??????????
a3 = a2 = a1; //<2F><>?<3F><><EFBFBD>~<7E><>
d1 = 0; //????????
d2 = 0;
d7 = 0; //??<3F><>????
while (1)
{
d0 = get_num(); //???????
if (d0 == 255) //<2F><>???
break;
a1 = p_party[d0]; //???????
if (ATR_NAME(a1) == NULL) //????????
{
#ifdef _STONDEBUG_
MessageBoxNew(hWnd, "û<EFBFBD>к<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>", "Error", MB_OK);
#endif
get_num(); //??<3F><>????
get_num(); //??????
get_num(); //????<3F><>
if (BattleCmd[command_point] == 'p')
get_num(); //pet????<3F><>
continue;
}
if (d7 == 0) //?<3F><>????<3F><>??
ATR_COUNTER(a0) = a1; //?????<3F><>?
ATR_VCT_NO(a1) = 1; //<2F>q<EFBFBD><71>?
ATR_BODY_WORK(0, a1) = a3; //<2F><>?<3F><>
ATR_BODY_WORK(1, a2) = a1; //<2F>q????<3F><>?????<3F><>???
ATR_ATTACK_KIND(0, a1) = get_num();
#ifdef _PETSKILL_ACUPUNCTURE
///////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a1) & ATT_REFLEX+ATT_ABSORPTION+ATT_BALLIA+ATT_TRAP+ATT_ACUPUNCTURE
#ifdef _PET_ITEM
+ ATT_ATTACKBACK
#endif
)
#else
if (ATR_ATTACK_KIND(0, a1) & ATT_REFLEX+ATT_ABSORPTION+ATT_BALLIA+ATT_ACUPUNCTURE
#ifdef _PET_ITEM
+ ATT_ATTACKBACK
#endif
)
#endif
///////////////////////
#else
///////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a1) & ATT_REFLEX+ATT_ABSORPTION+ATT_BALLIA+ATT_TRAP)
#else
if (ATR_ATTACK_KIND(0, a1) & ATT_REFLEX + ATT_ABSORPTION + ATT_BALLIA)
#endif
///////////////////////
#endif
{
ATR_ATTACK_POW(0, a1) = get_num(); //??????
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a1) = get_num(); //pet??????
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a1) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
}
else
{
d1 += ATR_ATTACK_POW(0, a1) = get_num(); //????<3F><>
if (BattleCmd[command_point] == 'p')
d2 += ATR_ATTACK_PET_POW(0, a1) = get_num(); //pet????<3F><>
else
LogToBattleError(BattleCmd, __LINE__);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a1) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
}
ATR_FIRST_FLG(a1) = 0; //??????
ATR_SYNC_FLG(a1) = 1; //
a2 = a1; //<2F>q????<3F><>
d7++; //??<3F><>??<3F><>
}
ATR_SYNC_FLG(a1) = 2; //?????
if (d1) //???????
ATR_ATTACK_POW(0, a1) = d1; //????????
if (d2) //???????
ATR_ATTACK_PET_POW(0, a1) = d2; //????????
ATR_LONG_WORK(0, a3) = d7; //??????
ATR_BODY_CNT(a0) = d7;
break;
case 2: //?????????? ???<3F><>? ??????????
d0 = get_num(); //??<3F><>?<3F><>?<3F><>?
if (d0 != 1) //??<3F>D????
{
ATR_VCT_NO(a1) = 25; //???<3F><>?
ATR_BODY_CNT(a0) = d0; //??<3F>D??
ATR_BODY_CNT(a1) = d0; //
for (d7 = 0; d7 < d0; d7++)
{
ATR_BODY_WORK(d7, a1) = p_party[get_num()]; //<2F><>?<3F><>
ATR_ATTACK_KIND(d7, a1) = get_num(); //??<3F><>????
}
d0 = 320;
d1 = 240;
radar(a1, &d0, &d1); //????
ATR_CRS(a1) = d0; /* ?????? */
ATR_CHR_ANG(a1) = crs_change_tbl[d0]; /* ????? */
}
else
{
ATR_VCT_NO(a1) = 25; //???<3F><>?
ATR_BODY_CNT(a0) = 1; //?<3F>D??
ATR_BODY_CNT(a1) = 1; //
ATR_BODY_WORK(0, a1) = p_party[get_num()]; //<2F><>?<3F><>
ATR_ATTACK_KIND(0, a1) = get_num(); //??<3F><>????
d0 = 320;
d1 = 240;
radar(a1, &d0, &d1); //????
ATR_CRS(a1) = d0; /* ?????? */
ATR_CHR_ANG(a1) = crs_change_tbl[d0]; /* ????? */
}
break;
case 3: //?????????? ???? ??????????
d0 = get_num(); //??<3F><>?<3F><>?<3F><>?
ATR_VCT_NO(a1) = 30; //???<3F><>?
ATR_BODY_CNT(a0) = d0; //?<3F>D??
ATR_BODY_CNT(a1) = d0; //
for (d7 = 0; d7 < d0; d7++)
{
ATR_BODY_WORK(d7, a1) = p_party[get_num()]; //<2F><>?<3F><>
ATR_ATTACK_KIND(d7, a1) = get_num(); //??<3F><>????
}
break;
case ATT_TAKE: //?????????? <20><>? ??????????
ATR_VCT_NO(a1) = 35; //<2F><>??<3F><>
ATR_BODY_WORK(0, a1) = p_party[get_num()]; //<2F><>?<3F><>???
ATR_ATTACK_KIND(0, a1) = get_num(); //<2F><>?<3F><><EFBFBD><EFBFBD>???
ATR_BODY_CNT(a0) = 1;
break;
case ATT_ESCAPE: //?????????? <20>P<EFBFBD>f<EFBFBD>D<EFBFBD><44> ??????????
ATR_BODY_CNT(a0) = 1; //<2F>D<EFBFBD><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>????
d1 = ATR_ATTACK_KIND(0, a1) = get_num(); //<2F><>?<3F><><EFBFBD><EFBFBD>???
ATR_VCT_NO(a1) = 52; //<2F>D<EFBFBD><44>?
if (BattleMyNo == ATR_PLACE_NO(a1)) //<2F><><EFBFBD><EFBFBD>??
d0 = 1;
else
d0 = 0;
//ACTION_INF<4E>@<40>e<EFBFBD><65>??????
ATR_GUARD_FLG(a1) = 0;
//???<3F><>?<3F>V?<3F>ϣ<EFBFBD>??
if (ATR_PET_OK(a1))
{
a2 = p_party[ATR_PLACE_NO(a1) + 5]; //???<3F><>???
//??????????????????
if (ATR_NAME(a2) != NULL && ATR_AKO_FLG(a2) == 0)
{
//?????
if (ATR_ATTACK_KIND(2, a2) == 1)
{
ATR_ATTRIB(a2) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
//????<3F><>
ATR_NAME(a2) = NULL;
ATR_VCT_NO(a2) = VCT_NO_APPEAR;
}
else
{
//ACTION_INF<4E>@<40>e<EFBFBD><65>??????
ATR_GUARD_FLG(a2) = 0;
ATR_BODY_CNT(a0)++; //<2F>D<EFBFBD><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>??<3F><>
if (d0 == 1) //??<3F><>?<3F>D<EFBFBD><44>??
d0 = 2;
}
}
}
//ACTION_INF<4E>@<40>e<EFBFBD>ԡ@<40>e
switch (d0)
{
case 1:
ATR_GUARD_FLG(a1) = 1;
break;
case 2:
ATR_GUARD_FLG(a2) = 1;
ATR_GUARD_FLG(a1) = 1;
break;
}
break;
case ATT_SELECT: //?????????? ???<3F>k<EFBFBD><6B> ??????????
ATR_BODY_CNT(a0) = 1;
d0 = ATR_PLACE_NO(a1) + 5; //?????????
a2 = p_party[ATR_PLACE_NO(a1) + 5]; //?????????
ATR_BODY_WORK(0, a2) = a1; //??<3F><>??????
ATR_FIRST_FLG(a2) = 0; //??????
if (get_num() == 0) //????
ATR_VCT_NO(a2) = 60; //?????
else
{ //<2F><>???
ATR_NAME(a2) = monster; //???<3F><>?
ATR_VCT_NO(a2) = 62; //
if (BattleMyNo == ATR_PLACE_NO(a1)) //<2F><><EFBFBD><EFBFBD>??
att_select_flg = TRUE;
}
break;
//#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
case ATT_PROSKILL:
ATR_VCT_NO(a1) = PROSKILL; //<2F><>ʿְҵ<D6B0><D2B5><EFBFBD><EFBFBD>
ATR_BODY_WORK(0, a1) = p_party[get_num()]; //ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>No
ATR_ATTACK_KIND(0, a1) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_POW(0, a1) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a1) = get_num(); //pet??????
else
LogToBattleError(BattleCmd, __LINE__);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a1) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
ATR_WARRIOR_EFFECT(a1) = get_num();
AttPreMagicNum = get_num();
AttNextMagicNum = get_num();
ATR_BODY_CNT(a0) = 1;
#ifdef _ATTDOUBLE_ATTACK
//andy_add
if (ATR_ATTACK_KIND(0, a1) & ATT_ATTDOUBLE || ATR_ATTACK_KIND(0, a1) & BCF_MODIFY)
ATR_BATTLEGRANO(a1) = get_num();
#endif
break;
//#endif
default: //???????
action_inf = -1;
//?????<3F><>????????
#ifdef _STONDEBUG_
{
char errbuf[256];
sprintf_s(errbuf, "errbuf:%c", command_no);
MessageBoxNew(hWnd, errbuf, "Error", MB_OK);
}
#endif
command_point = 0;
break;
}
#ifdef _PET_ITEM
if (ATR_ATTACK_KIND(0, a1) & ATT_ATTACKBACK)
{
ATR_ATTACK_POW(1, a1) = ATR_ATTACK_POW(0, a1) >> 16;
ATR_ATTACK_POW(0, a1) = ATR_ATTACK_POW(0, a1) & 0x0000ffff;
}
#endif
#ifdef _FIX_ACUPUNCTURE
if (ATR_ATTACK_KIND(0, a1) & ATT_ACUPUNCTURE)
{
ATR_ATTACK_POW(1, a1) = ATR_ATTACK_POW(0, a1) >> 16;
ATR_ATTACK_POW(0, a1) = ATR_ATTACK_POW(0, a1) & 0x0000ffff;
}
#endif
case 1: //<2F>s<EFBFBD><73>?<3F>~<7E>r?
#ifdef __ATTACK_MAGIC
if (TRUE == bRunAttMgc)
RunTimeMagic();
#endif
#ifdef __TOCALL_MAGIC
if (TRUE == bRunToCallMgc)
RunTimeMagicToCall();
#endif
#ifdef _PROFESSION_ADDSKILL
// RunTimeMagicBoundary();
#endif
if (ATR_DAMAGE(a0) == ATR_BODY_CNT(a0))
{ //?<3F>~<7E><>???
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
if (ATR_NAME(p_party[d7]) != NULL)
{
//?<3F><>??<3F>r???????
if (ATR_LIFE(p_party[d7]) > 0 && ATR_VCT_NO(p_party[d7]) != 0 && ATR_VCT_NO(p_party[d7]) < VCT_NO_DIE)
break;
}
}
if (d7 == BATTLKPKPLYAERNUM) //<2F><>???
ATR_VCT_NO(a0) = 0; //<2F>s<EFBFBD><73>?<3F>h?
}
break;
case 2: //<2F>u<EFBFBD><75>
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
if (ATR_NAME(p_party[d7]) != NULL)
{
//<2F><>??????
if (ATR_VCT_NO(p_party[d7]) != 0 && ATR_VCT_NO(p_party[d7]) != VCT_NO_DIE + 2)
break;
}
}
if (d7 == BATTLKPKPLYAERNUM)
{ //<2F><>???
action_inf = 2;
command_point = 0; //?????<3F><>????????
}
break;
case 3: //<2F>K<EFBFBD>͢r?
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
if (ATR_NAME(p_party[d7]) != NULL)
{
if (ATR_VCT_NO(p_party[d7]) != 0 && ATR_VCT_NO(p_party[d7]) != VCT_NO_DIE + 2) //?<3F><>??<3F>r???????
break;
}
}
if (d7 == BATTLKPKPLYAERNUM)
{
ATR_VCT_NO(a0) = 0;
action_inf = 3; //<2F>K<EFBFBD><4B>?<3F><><EFBFBD><EFBFBD>?
if (BattleBpFlag & BATTLE_BP_JOIN)// <20>ӡP??
{
//<2F>u<EFBFBD><75>??
if (check_all_dead())
action_inf = 2;
}
}
break;
case 4: //???<3F><>?<3F>r?
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
if (ATR_NAME(p_party[d7]) != NULL)
{
//<2F>u<EFBFBD><75>??
if (check_all_dead())
{
//?<3F><>??<3F>r???????
if (ATR_VCT_NO(p_party[d7]) != 0 && ATR_VCT_NO(p_party[d7]) != VCT_NO_DIE + 2)
break;
}
else
{
//<2F><><EFBFBD><EFBFBD>?????????????
if (BattleMyNo == d7)
{
if (ATR_VCT_NO(p_party[d7]) == 55)
break;
}
//?<3F><>??<3F>r???????
if (ATR_LIFE(p_party[d7]) > 0 && ATR_VCT_NO(p_party[d7]) != 0 && ATR_VCT_NO(p_party[d7]) != VCT_NO_DIE + 2)
break;
}
}
}
if (d7 == BATTLKPKPLYAERNUM)
{
ATR_VCT_NO(a0) = 0;
//<2F>t<EFBFBD>@<40>e??
if (!action_inf)
action_inf = 1; //???<3F><>?
//<2F>u<EFBFBD><75>??
if (check_all_dead())
action_inf = 2;
}
break;
}
master_500:
//???????????
#ifdef __ATTACK_MAGIC
if ((BattleMapNo >= 148 && BattleMapNo <= 150) || g_iRunEarthQuake >= 2)
#else
if (BattleMapNo >= 148 && BattleMapNo <= 150) //???????????
#endif
{
//????
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
a1 = p_party[d7]; //???????
if (ATR_NAME(a1) == NULL) //???
continue;
ATR_V_POS(a1) += ATR_INT_WORK3(a1);
ATR_INT_WORK1(a1) += ATR_INT_WORK3(a1);
//????????????
set_raster_pos(a1);
}
if (g_iRunEarthQuake == 3)
g_iRunEarthQuake = 0;
}
//??????<3F><><EFBFBD><EFBFBD>???
d6 = 0;
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
a1 = p_party[d7]; //???????
if (ATR_NAME(a1) == NULL) //???
continue;
sort_chr_buf[d6].work = a1; //???????
sort_chr_buf[d6++].v_pos = ATR_V_POS(a1); //??<3F><>???
}
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
if ((a1 = p_missile[d7]) == NULL) //<2F><>???
continue;
sort_chr_buf[d6].work = a1; //???????
sort_chr_buf[d6++].v_pos = ATR_V_POS(a1); //??<3F><>???
}
//???????
qsort(sort_chr_buf, // ????
d6, // <20>{?????
sizeof(SORT_CHR_EQU), // ???
(CMPFUNC*)sort_chr // <20>{?????????
);
d0 = 30; //<2F><><EFBFBD><EFBFBD>?<3F>I???
for (d7 = 0; d7 < d6; d7++)
ATR_DISP_PRIO(sort_chr_buf[d7].work) = d0++;
}
//<2F><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>
void monster(ACTION *a0)
{
int d0, d1, d6, d7, sav_command_point, idx;
ACTION *a1, *a2, *a3;
static ACTION *a0tmp[10];
static int a0mark[10]; // 0:<3A>ѽ<EFBFBD>action release 1:δ
static int a0tmpcount;
switch (ATR_VCT_NO(a0))
{
case 0: //<2F><><EFBFBD><EFBFBD>
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
if (ATR_VCT_NO(p_master) == 1)
{
a1 = ATR_COUNTER(p_master); //??<3F><>???????
if (a1 != NULL && ATR_GROUP_FLG(a0) != ATR_GROUP_FLG(a1) && ATR_NAME(a1) != NULL)
{
//?<3F><><EFBFBD><EFBFBD>??
if (ATR_H_POS(a1) < lpDraw->xSize && ATR_H_POS(a1) > 64 && ATR_V_POS(a1) < lpDraw->ySize && ATR_V_POS(a1) > 0 - 64)
{
if (ATR_STATUS(a1) <= JUJUTSU_1) //??????<3F><><EFBFBD><EFBFBD>?<3F><>??
{
a1 = ATR_COUNTER(p_master); //<2F><>????????
d0 = ATR_H_POS(a1); //<2F><>?<3F><>??
d1 = ATR_V_POS(a1);
radar2(a0, d0, d1, 2); //????
//??<3F><>??????
d0 = ATR_CRS(a0) - ATR_CRS_OLD(a0);
if (d0 < 0)
d0 = 0 - d0;
if (d0 >= 2)
{
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CRS_OLD(a0) = ATR_CRS(a0);
}
}
}
}
}
//<2F><>???<3F><>???????
d0 = ATR_STATUS(a0);
if (ATR_STATUS(a0) != 3 && ATR_STATUS(a0) != 4)
{
//?<3F>P??????<3F>e????
if (BattleMyNo >= 20 || (ATR_ATTRIB(a0) & ACT_ATR_BTL_CMD_END)
#ifdef _PETSKILL_BATTLE_MODEL
|| ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL
#endif
){
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
//<2F><><EFBFBD>ォͼƬ<CDBC><C6AC><EFBFBD>¼<EFBFBD><C2BC>غ<EFBFBD><D8BA><EFBFBD>Ⱦ wxy
//pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
#ifdef _PETSKILL_BATTLE_MODEL
// <20><><EFBFBD><EFBFBD>ҹ<EFBFBD><D2B9><EFBFBD><EFBFBD><EFBFBD>û
if (ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL)
{
a1 = ATR_BODY_WORK(0, a0); // ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>
// <20><><EFBFBD>Ⱥ<EFBFBD>˳<EFBFBD><CBB3>ִ<EFBFBD><D6B4>
if (ATR_LONG_WORK(ATR_PLACE_NO(a0), a1) == ATR_INT_WORK2(p_master))
{
// <20><>Ŀ<EFBFBD><C4BF><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ٹ<EFBFBD><D9B9><EFBFBD>
if (ATR_VCT_NO(a1) == 0)
ATR_VCT_NO(a0) = 2; // <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
// <20><>Ŀ<EFBFBD><C4BF><EFBFBD>ս<EBBFAA><D5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_VCT_NO(a1) == VCT_NO_APPEAR || ATR_LIFE(a1) <= 0)
{
ATR_VCT_NO(a0) = 3; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_BODY_WORK(0, a0) = NULL; // <20><><EFBFBD><EFBFBD>
}
}
}
#endif
break;
case 1: //ǰ<><C7B0>
ATR_SPD(a0) = 32; //<2F>ƶ<EFBFBD><C6B6>ٶ<EFBFBD>
a1 = ATR_BODY_WORK(0, a0); //<2F>з<EFBFBD><D0B7><EFBFBD>λ<EFBFBD><CEBB>
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
//??<3F><>??????
d0 = ATR_CRS(a0) - ATR_CRS_OLD(a0);
if (d0 < 0)
d0 = 0 - d0;
if (d0 >= 2)
{
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CRS_OLD(a0) = ATR_CRS(a0);
}
if (d1 <= 32 * 2)
{ //<2F><><EFBFBD><EFBFBD>
#ifdef _PIRATE_ANM
if (ATR_CHR_NO(a0) == 101491)
ATR_CHR_NO(a0) = 101490;
#endif
ATR_FIRST_FLG(a0) = 0; //????????
ATR_HIT_STOP(a0) = 0; //??????????
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL)
ATR_VCT_NO(a0) = 0; // <20><><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD>ȴ<EFBFBD><C8B4><EFBFBD>
else
#endif
{
if (ATR_ATTACK_KIND(0, a0) & ATT_VICARIOUS)
{ //<2F><><EFBFBD><EFBFBD>??????
ATR_VCT_NO(a0) = 65; //<2F><><EFBFBD><EFBFBD>??????<3F>r?
ATR_BODY_WORK(1, a0) = ATR_BODY_WORK(0, a0); //<2F><>????<3F>~<7E><>
a1 = ATR_BODY_WORK(0, a0); //??<3F><>???<3F><>???
ATR_BODY_WORK(1, a1) = a0; //
a1 = p_party[get_num()]; //<2F><><EFBFBD><EFBFBD>??????????
#ifdef _ATTACK_EFFECT
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȯ xiezi
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a0) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
ATR_VCT_NO(a1) = 69; //??????<3F><><EFBFBD><EFBFBD>?
ATR_FIRST_FLG(a1) = 0; //
ATR_BODY_WORK(0, a1) = ATR_BODY_WORK(0, a0); //?<3F>h<EFBFBD>I??????
}
else if (ATR_SYNC_FLG(a0)) //<2F>i?????
{
ATR_VCT_NO(a0) = 19; //<2F>i???<3F>r??
a1 = ATR_BODY_WORK(0, a0); //??<3F><><EFBFBD><EFBFBD>?<3F><>?
ATR_LONG_WORK(0, a1)--; //???<3F><>
}
else //andy_bug
ATR_VCT_NO(a0) = 2; //???
}
}
else
{
#ifndef _PIRATE_ANM
gemini(a0); //?<3F>h
#else
if (ATR_CHR_NO(a0) != 101490)
gemini(a0); //?<3F>h
#endif
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
#ifndef _PIRATE_ANM
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
#else
if (ATR_CHR_NO(a0) == 101490)
{
pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP);
if (a0->bmpNo == 301137)
ATR_CHR_NO(a0) = 101491;
}
else
{
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
#endif
break;
case 2: //<2F><><EFBFBD><EFBFBD>
if (ATR_HIT_STOP(a0)) //??????????
{
if (--ATR_HIT_STOP(a0)) //??????????
break;
}
a1 = ATR_BODY_WORK(0, a0);
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL && ATR_FIRST_FLG(a0) == 0 && ATR_INT_WORK3(a0) == 0)
{
if (ATR_ATTACK_KIND(0, a0) & ATT_VICARIOUS) // <20><>Ȯ
{
ATR_VCT_NO(a0) = 65; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƚ<EFBFBD><C8BD>еȴ<D0B5>
ATR_BODY_WORK(1, a1) = a0; // <20>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><D6AE><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>
a1 = p_party[ATR_LONG_WORK(0, a0)]; // ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> action
ATR_VCT_NO(a1) = 69; // <20><>ʾ damage <20><><EFBFBD><EFBFBD>
ATR_FIRST_FLG(a1) = 0;
ATR_BODY_WORK(0, a1) = ATR_BODY_WORK(0, a0); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_INT_WORK3(a0) = 1;
break;
}
ATR_SYNC_FLG(a1) = 1;
}
#endif
if (ATR_FIRST_FLG(a0) == 0) //???????
{
ATR_HIT(a0) = 0; //?????????
ATR_HIT_TIMING(a0) = 0; //???<3F><>???????
d0 = ATR_H_POS(a1); //<2F><>?<3F><>??
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS_OLD(a0) = ATR_CRS(a0) = d0; //???<3F><><EFBFBD>V
ATR_CHR_ANG(a0) = crs_change_tbl[d0]; /* ????? */
//??????????
if (ATR_ATTACK_KIND(0, a0) & ATT_G_CRASH)
//????????<3F><><EFBFBD><EFBFBD>
set_damage_num(a0, 12, -64 + 16);
else if (ATR_ATTACK_KIND(0, a0) & ATT_TOOEH)
set_damage_num(a0, 29, -64 + 16);
#ifdef _ATTDOUBLE_ATTACK
else if (ATR_ATTACK_KIND(0, a0) & ATT_ATTDOUBLE)
{
int skill = ATR_BATTLEGRANO(a0);
switch (skill)
{
case 70:
set_damage_num(a0, 25, -64 + 16);
break;
case 71:
set_damage_num(a0, 26, -64 + 16);
break;
case 72:
set_damage_num(a0, 27, -64 + 16);
break;
case 73:
set_damage_num(a0, 28, -64 + 16);
break;
}
}
else if (ATR_ATTACK_KIND(0, a0) & BCF_MODIFY)
{
int skill = ATR_BATTLEGRANO(a0);
switch (skill)
{
case 74://74
set_damage_num(a0, 32, -64 + 16);
break;
case 75://75
set_damage_num(a0, 33, -64 + 16);
break;
case 76://76
set_damage_num(a0, 34, -64 + 16);
break;
case 77://77
set_damage_num(a0, 35, -64 + 16);
break;
}
}
#endif
#ifdef _SKILL_ROAR //<2F>輼:<3A><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
else if (ATR_ATTACK_KIND(0, a0) & ATT_ATTROAR)
{
set_damage_num(a0, 22, -64 + 16);
ATR_ROAR(a1) = 2;
}
#endif
#ifdef _SKILL_SELFEXPLODE //<2F>Ա<EFBFBD>
else if (ATR_ATTACK_KIND(0, a0) & ATT_ATTSELFEXPLODE)
{
ATR_SELFEXPLODE(a0) = 1;
set_damage_num(a0, 23, -64 + 16);
}
#endif
#ifdef _PETSKILL_EXPLODE //<2F><><EFBFBD><EFBFBD>
else if (ATR_ATTACK_KIND(0, a0) & ATT_EXPLODE)
{
//ATR_SELFEXPLODE(a0) = 1;
ATR_LIFE(a0) = 1;
set_damage_num(a0, 23, -64 + 16);
}
#endif
else
{
//andy_fall
if (ATR_ATTACK_KIND(0, a0) & ATT_FALL)
{
if (ATR_RIDE(a1) == 1)
{
//set_damage_num(a0, 12, -64+16); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD>ͼ
ATR_PETFALL(a1) = 1;
}
}
}
//#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & ATT_ATTPREPROSKILL)
set_damage_num(a1, 41, -64 + 25);
//#endif
//<2F>i????<3F><><EFBFBD><EFBFBD>????
if (ATR_SYNC_FLG(a0))
d0 = 0;
else
{
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL)
d0 = 0;
else
#endif
d0 = get_next_flg(); //?????<3F><>?????
}
if (d0 & ATT_COUNTER) //??????????
{
ATR_COUNTER_FLG(a0) = 1;
ATR_COUNTER_FLG(a1) = 1;
ATR_STIMER(a0) = 255;
}
else
{
ATR_COUNTER_FLG(a0) = 0;
ATR_COUNTER_FLG(a1) = 0;
ATR_STIMER(a0) = 20;
}
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
//ATT_AKO1
#ifdef _PETSKILL_ANTINTER
if (ATR_VCT_NO(a1) >= VCT_NO_DIE && (ATR_ATTACK_KIND(0, a1) & (1 << 28))) //<2F><>?<3F><>??
#else
if (ATR_VCT_NO(a1) >= VCT_NO_DIE) //<2F><>?<3F><>??
#endif
{
if (ATR_ATTACK_KIND(0, a0) & ATT_COUNTER && ATR_COUNTER(p_master) != a0) //???????
ATR_VCT_NO(a0) = 0; //<2F>r??
else
{
ATR_VCT_NO(a0) = 3;
ATR_STIMER(a0) = 20;
#ifdef _PETSKILL_BATTLE_MODEL
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL)
ATR_LONG_WORK(ATR_PLACE_NO(a0), a1) = 0;
#endif
}
break;
}
#ifdef _SKILL_SELFEXPLODE //<2F>Ա<EFBFBD>
if (ATR_SELFEXPLODE(a0) == 1)
{
ATR_ATTRIB(a0) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_CHR_ACT(a0) = ANIM_ATTACK;
}
else
#endif
ATR_CHR_ACT(a0) = ANIM_ATTACK; //?????????
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //?????<3F><>???
if (ATR_ATTACK_KIND(0, a0) & ATT_COUNTER && ATR_COUNTER(p_master) != a0) //???????
ATR_VCT_NO(a0) = 0; //<2F>r??
else
{
ATR_VCT_NO(a0) = 3;
#ifdef _PETSKILL_BATTLE_MODEL
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL)
ATR_LONG_WORK(ATR_PLACE_NO(a0), a1) = 0;
#endif
}
break;
}
//???????
if (ATR_HIT(a0))
{
#ifdef _ATTACK_EFFECT
if (ATR_LONG_WORK(0, a0) > 0) // <20><><EFBFBD><EFBFBD>Ч
{
SetDisplayAttackEffect(a0, ATR_LONG_WORK(0, a0));
ATR_LONG_WORK(0, a0) = 0;
}
#endif
//andy_mp
if (ATR_SHOWADDHP(a0) == 1)
{
set_damage_num(a0, 6, -64);
ATR_SHOWADDHP(a0) = 0;
ATR_LIFE(a0) += ATR_ADDHP(a0);
}
ATR_ATTACK_KIND(1, a1) = ATR_ATTACK_KIND(0, a0) & ATT_DEATH;
#ifdef _PET_ITEM
if (ATR_ATTACK_KIND(0, a0) & ATT_ATTACKBACK)
ATR_ATTACK_KIND(1, a1) = 0;
#endif
#ifdef _PETSKILL_ACUPUNCTURE
//////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
//////////////////////
#else
//////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA | ATT_TRAP))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ABSORPTION | ATT_BALLIA))
#endif
//////////////////////
#endif
{
set_guard_mark(a0);
#ifdef _PETSKILL_ACUPUNCTURE
if (ATR_ATTACK_KIND(0, a0) & (ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
{
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_INT_WORK0(a0) != ATT_BATTLE_MODEL)
#endif
{
ATR_VCT_NO(a1) = 10; //<2F><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD>
ATR_DAMAGE(a1) = ATR_DAMAGE(a0);//ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0)*2;
//ATR_ATTACK_KIND(0, a1) &= ATT_AKO2;
if ((float)ATR_DAMAGE(a1) >= (float)(ATR_MAX_LIFE(a1) * 1.2 + 20.0))
{
ATR_LIFE(a1) = 0;
ATR_AKO_FLG(a1) = 2; //<2F><><EFBFBD><EFBFBD>
}
a1 = ATR_BODY_WORK(0, a0) = a0;
}
}
#endif
if (ATR_ATTACK_KIND(0, a0) & ATT_VICARIOUS)
{
a1 = ATR_BODY_WORK(0, a0);
ATR_VCT_NO(a1) = 6;
ATR_STIMER(a1) = 60;
}
}
#ifdef _PETSKILL_ACUPUNCTURE
///////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
///////////////////
#else
///////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP) )
#else
if (ATR_ATTACK_KIND(0, a0) & ATT_REFLEX)
#endif
///////////////////
#endif
{
#ifdef _PETSKILL_BATTLE_MODEL
// <20><><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD><C7B2>ǹ<EFBFBD><C7B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_INT_WORK0(a0) != ATT_BATTLE_MODEL)
#endif
a1 = ATR_BODY_WORK(0, a0) = a0;
}
else
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????xxx
//?????????
ATR_COMBO(a1) = 0;
//?<3F><>??????
if (ATR_ATTACK_KIND(0, a0) & ATT_DODGE)
{
//???????????
if (ATR_HIT_TIMING(a0) == 0)
{
ATR_HIT_TIMING(a0) = 1; //???<3F><>???????
ATR_VCT_NO(a1) = 16; //????
ATR_CRS(a1) = ATR_CRS(a0); //<2F><>?????????????
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //
ATR_STIMER(a1) = 0;
ATR_FIRST_FLG(a1) = 1; //?????????
ATR_BODY_WORK(0, a1) = a0; //
if (ATR_ATTACK_KIND(0, a0) & ATT_COUNTER) //???????
//?????<3F><><EFBFBD><EFBFBD>
set_damage_num(a0, 1, -64 + 16);
}
ATR_HIT(a0) = 0;
play_se(8, ATR_H_POS(a0), ATR_V_POS(a0));
break;
}
//????????
if (ATR_HIT(a0) >= 10000 && ATR_HIT(a0) < 10100)
{
//?<3F><>????????
if (ATR_ATTACK_KIND(0, a0) & ATT_CRUSH)
//?????<3F><><EFBFBD><EFBFBD>
set_damage_num(a1, 19, -112);
}
//?????????//knock out
ATR_AKO_FLG(a1) = 0;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO1) //??????
ATR_AKO_FLG(a1) = 1;
if (ATR_ATTACK_KIND(0, a0) & ATT_AKO2) //??????
ATR_AKO_FLG(a1) = 2;
//<2F><><EFBFBD><EFBFBD> ?????
if (ATR_HIT(a0) >= 10100)
{
#ifdef _PETSKILL_ACUPUNCTURE
///////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
///////////////////////
#else
///////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP) )
#else
if (ATR_ATTACK_KIND(0, a0) & ATT_REFLEX)
#endif
///////////////////////
#endif
{
ATR_HIT(a0) -= 100;
if (ATR_SYNC_FLG(a0) == 1)
{
a2 = ATR_BODY_WORK(1, a0);
ATR_VCT_NO(a2) = 2;
ATR_COUNTER(p_master) = a2;
}
}
else
//?????????
ATR_COMBO(a1) = 1;
}
else if (ATR_SYNC_FLG(a0) == 1)
{
#ifdef _PETSKILL_ACUPUNCTURE
//////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (!(ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
)))
#else
if (!(ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
)))
#endif
/////////////////////
#else
//////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (!(ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP) ))
#else
if (!(ATR_ATTACK_KIND(0, a0) & ATT_REFLEX))
#endif
/////////////////////
#endif
ATR_COMBO(a1) = 1;
a2 = ATR_BODY_WORK(1, a0); //????<3F><><EFBFBD><EFBFBD>?<3F><>?
ATR_VCT_NO(a2) = 2; //???
ATR_COUNTER(p_master) = a2; //?????<3F><>?
}
#ifdef _PETSKILL_ACUPUNCTURE
/////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
////////////////////
#else
/////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP) )
#else
if (ATR_ATTACK_KIND(0, a0) & ATT_REFLEX)
#endif
////////////////////
#endif
{
#ifdef _PETSKILL_BATTLE_MODEL
// <20><><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD><C7B2>ǹ<EFBFBD><C7B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL)
{
ATR_ATTACK_POW(0, a0) = 0; // <20><><EFBFBD>˺<EFBFBD>
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0);
ATR_ATTACK_KIND(0, a0) |= ATT_NOMISS;
}
else
#endif
ATR_DAMAGE_ANG(a1) = (ATR_CHR_ANG(a0) + 4) & 7;
}
else
ATR_DAMAGE_ANG(a1) = ATR_CHR_ANG(a0); //
if (ATR_ATTACK_KIND(0, a0) & BCF_DEFMAGICATT)
set_damage_num(a1, 30, -64);
if (ATR_ATTACK_KIND(0, a0) & BCF_SUPERWALL)
set_damage_num(a1, 31, -64);
//#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & ATT_ATTNEXTPROSKILL)
set_damage_num(a1, 41, -64 + 25);
//#endif
if (ATR_ATTACK_KIND(0, a0) & ATT_ABSORPTION) //?<3F><>?????
{
if (ATR_SYNC_FLG(a0) == 0) //<2F>i????????
{
if (!ATR_COMBO(a1)) //????????
{
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
#ifdef _SYUTEST
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
if (Light1 == NULL)
Light1 = MakeAnimDisp(ATR_H_POS(a0), ATR_V_POS(a0), 101581, 0);
set_damage_num(a1, 41, -64 + 25);
// <20>ɹ<EFBFBD><C9B9><EFBFBD>Ԥ<EFBFBD><D4A4>
#else
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_LIFE(a1) += ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
#endif
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) > ATR_PET_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1); //?<3F><>???
set_damage_num(a1, 14, -64);
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //????<3F><>?
}
}
else
{
//????????
if (ATR_HIT(a0) >= 10000 && ATR_HIT(a0) < 10100)
{
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
#ifdef _SYUTEST
// <20>ɹ<EFBFBD><C9B9><EFBFBD>Ԥ<EFBFBD><D4A4>
#endif
ATR_LIFE(a1) += ATR_DAMAGE(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
ATR_PET_LIFE(a1) += ATR_PET_DAMAGE(a1);
if (ATR_PET_LIFE(a1) > ATR_PET_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_PET_LIFE(a1) = ATR_PET_MAX_LIFE(a1); //?<3F><>???
set_damage_num(a1, 14, -64);
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //????<3F><>?
}
}
}
else if (ATR_ATTACK_KIND(0, a0) & ATT_BALLIA) //????????
{
ATR_ATTACK_POW(0, a0) = 0; //????<3F><>?
ATR_ATTACK_PET_POW(0, a0) = 0; //????<3F><>?
}
else
{
ATR_VCT_NO(a1) = 10; //?????<3F><>
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & ATT_NOMISS)
NoMiss = 1 ;
else
NoMiss = -1 ;
#endif
}
//?<3F><>?????
if (ATR_ATTACK_KIND(0, a0) & ATT_SATISFACTORY)
ATR_KAISHIN(a1) = 1; //?<3F><>??????
else
ATR_KAISHIN(a1) = 0; //<2F>G<EFBFBD><47>?????
ATR_DAMAGE(a1) = ATR_ATTACK_POW(0, a0);
ATR_PET_DAMAGE(a1) = ATR_ATTACK_PET_POW(0, a0);
//andy_mp
ATR_MPDAMAGE(a1) = ATR_MPDAMAGE(a0);
ATR_MPDFLG(a1) = ATR_MPDFLG(a0);
//?????
if (ATR_ATTACK_KIND(0, a0) & ATT_GUARD)
ATR_GUARD_FLG(a1) = 1;
else
ATR_GUARD_FLG(a1) = 0;
#ifdef _EQUIT_ARRANGE
if (ATR_ATTACK_KIND(0, a0) & ATT_ARRANGE)
{
set_damage_num(a1, 42, -64);
ATR_CHR_ACT(a1) = ANIM_GUARD;
}
#endif
if (ATR_LIFE(a1) - ATR_DAMAGE(a1) <= 0 || (ATR_ATTACK_KIND(0, a0) & ATT_DEATH))
{
if (ATR_COMBO(a1) == 0)
ATR_KAISHIN(a1) = 1;
}
if (ATR_KAISHIN(a1))
ATR_HIT_STOP(a0) = HIT_STOP_TIM * 4;
else
ATR_HIT_STOP(a0) = HIT_STOP_TIM;
if (ATR_DAMAGE(a1) || (ATR_ATTACK_KIND(0, a0) & (ATT_BALLIA | ATT_ABSORPTION)))
{
if (ATR_ATTACK_KIND(0, a0) & ATT_COUNTER) //???????
{
//????????
if (ATR_COMBO(a1) == 0)
//?????<3F><><EFBFBD><EFBFBD>
set_damage_num(a0, 1, -64 + 16);
}
//<2F><><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
play_damage(ATR_HIT(a0), ATR_H_POS(a0));
//<2F><>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD>
set_hit_mark(a0);
if (ATR_COMBO(a1)) //С<><D0A1>
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //<2F><><EFBFBD><EFBFBD>ֹͣ
}
ATR_HIT(a0) = 0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (!(ATR_ATTACK_POW(0, a0) || ATR_ATTACK_PET_POW(0, a0))) //????
{
ATR_HIT_STOP(a0) = 0; //<2F><><EFBFBD><EFBFBD>ֹͣ
play_se(8, ATR_H_POS(a0), ATR_V_POS(a0));
}
}
break;
case 3: //<2F><><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>
#ifdef _PETSKILL_BATTLE_MODEL
// <20><><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD><C7B2>ǹ<EFBFBD><C7B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_INT_WORK0(a0) == ATT_BATTLE_MODEL)
{
// <20><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Ŀ<EFBFBD><C4BF>
if (ATR_INT_WORK1(a0) > 1)
{
// <20>ҳ<EFBFBD><D2B3><EFBFBD>һ<EFBFBD><D2BB>Ŀ<EFBFBD><C4BF>
for (d0 = 1; d0 < ATR_INT_WORK1(a0); d0++)
{
if (ATR_BODY_WORK(d0, a0) != NULL) // <20>ҵ<EFBFBD>Ŀ<EFBFBD><C4BF>
{
a1 = ATR_BODY_WORK(d0, a0); // ȡ<><C8A1>Ŀ<EFBFBD><C4BF>
ATR_BODY_WORK(d0, a0) = NULL; // <20><><EFBFBD><EFBFBD>
if (ATR_LIFE(a1) <= 0) // <20><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
continue;
if (ATR_VCT_NO(a1) == VCT_NO_APPEAR) // Ŀ<><C4BF><EFBFBD>ս<EBBFAA><D5BD>
continue;
else
{
ATR_INT_WORK3(a0) = 0;
ATR_BODY_WORK(0, a0) = a1; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_KIND(0, a0) = ATR_ATTACK_KIND(d0, a0); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(d0, a0); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_PET_POW(0, a0) = ATR_ATTACK_PET_POW(d0, a0); // pet<65><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_LONG_WORK(0, a0) = ATR_LONG_WORK(d0, a0); // <20>ʹ<E8B6A8><CAB9><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>Ŀ<EFBFBD><C4BF>
ATR_VCT_NO(a0) = 1; // ǰ<><C7B0><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Ŀ<EFBFBD><C4BF>
ATR_INT_WORK2(p_master)++; // <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_INT_WORK1(a0)--;
break;
}
}
}
if (d0 == ATR_INT_WORK1(a0))
ATR_INT_WORK1(a0) = 0;
}
// ûĿ<C3BB><C4BF><EFBFBD><EFBFBD>,<2C>
else
{
// <20><EFBFBD>
if (ATR_INT_WORK2(a0) == 0) // <20><>һ<EFBFBD><D2BB>ִ<EFBFBD><D6B4>
{
ATR_SPD(a0) = 16;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
ATR_INT_WORK2(a0) = 1;
ATR_INT_WORK2(p_master)++; // <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}
gemini(a0); // <20>ƶ<EFBFBD>
ATR_CHR_ACT(a0) = ANIM_WALK;
pattern(a0, 1, ANM_LOOP);
// <20>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD><EFBFBD>ӫĻ
if (ATR_H_POS(a0) > lpDraw->xSize + SCREEN_OUT || ATR_H_POS(a0) < 0 - SCREEN_OUT)
{
DeathAction(a0);
p_missile[ATR_PLACE_NO(a0)] = NULL;
// <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>е<EFBFBD> p_missile <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
if (p_missile[d7] != NULL)
break;
}
if (d7 >= BATTLKPKPLYAERNUM)
ATR_INT_WORK1(p_master) = 1; // <20><><EFBFBD>еĹ<D0B5><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>
}
// <20><><EFBFBD>еĹ<D0B5><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>
if (ATR_INT_WORK1(p_master))
{
ATR_DAMAGE(p_master) = 0;
ATR_BODY_CNT(p_master) = 1;
if (ATR_BODY_WORK(0, a0) == NULL) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>ڳ<EFBFBD><DAB3>ϻ<EFBFBD><CFBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_DAMAGE(p_master)++;
else // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>״̬<D7B4>Ǵ<EFBFBD><C7B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_VCT_NO(ATR_BODY_WORK(0, a0)) == 0 || ATR_LIFE(ATR_BODY_WORK(0, a0)) <= 0)
ATR_DAMAGE(p_master)++;
}
}
break;
}
#endif
if (--ATR_STIMER(a0)) //??<3F>r???
break;
if (ATR_SYNC_FLG(a0))
{ //<2F>i?????
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CHR_ANG(a0) = crs_change_tbl[d0];
ATR_VCT_NO(a0) = 4; //?<3F>~?
ATR_SPD(a0) = 32;
break;
}
d0 = get_num(); //???<3F>h<EFBFBD><68>?<3F><>?
if (d0 == 255)
{ //<2F><>???
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CHR_ANG(a0) = crs_change_tbl[d0];
#ifdef _SKILL_SELFEXPLODE //<2F>Ա<EFBFBD>
if (ATR_SELFEXPLODE(a0) == 1)
ATR_VCT_NO(a0) = 114;
else
#endif
ATR_VCT_NO(a0) = 4; //?<3F>~?
ATR_SPD(a0) = 32;
break;
}
if (ATR_ATTACK_KIND(0, a0) & ATT_VICARIOUS) //<2F><><EFBFBD><EFBFBD>?????????
a2 = ATR_BODY_WORK(1, a0);
else
a2 = ATR_BODY_WORK(0, a0); //??<3F><><EFBFBD><EFBFBD><EFBFBD>V
a1 = ATR_BODY_WORK(0, a0) = p_party[d0]; //<2F><>?<3F><>???
ATR_ATTACK_KIND(0, a0) = get_num(); //??<3F><>????
ATR_ATTACK_POW(0, a0) = get_num(); //??????
#ifdef _PET_ITEM
if (ATR_ATTACK_KIND(0, a0) & ATT_ATTACKBACK)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
#ifdef _FIX_ACUPUNCTURE
if (ATR_ATTACK_KIND(0, a0) & ATT_ACUPUNCTURE)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a0) = get_num(); //pet??????
else
LogToBattleError(BattleCmd, __LINE__);
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a0) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
if (a1 == a2) //??<3F>i?<3F><>??
ATR_VCT_NO(a0) = 5; //<2F>e?<3F>t<EFBFBD>r??
else
ATR_VCT_NO(a0) = 1; //?<3F>h?
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS_OLD(a0) = ATR_CRS(a0) = d0; //??????
ATR_CHR_ANG(a0) = crs_change_tbl[d0]; /* ????? */
break;
case 5: //<2F>e?<3F>t<EFBFBD>r??
a1 = ATR_BODY_WORK(0, a0);
if (ATR_VCT_NO(a1) == 0) //<2F><>?<3F>e?<3F>t??????
ATR_VCT_NO(a0) = 1; //?<3F>h?
break;
case 4: //<2F><><EFBFBD><EFBFBD>
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CRS_OLD(a0) = ATR_CRS(a0) = d0; //??????
#ifndef _PIRATE_ANM
gemini(a0); //?<3F>h
#else
if (ATR_CHR_NO(a0) != 101490)
gemini(a0); //?<3F>h
#endif
if (d1 <= (ATR_SPD(a0) >> 2))
{ //????
if (ATR_DAMAGE(p_master) != ATR_BODY_CNT(p_master)) //???<3F><>???
ATR_DAMAGE(p_master)++; //???<3F><>???
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif//
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
ATR_H_POS(a0) = ATR_INT_WORK0(a0); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_INT_WORK1(a0);
#ifdef _PIRATE_ANM
if (ATR_CHR_NO(a0) == 101492)
ATR_CHR_NO(a0) = 101490;
#endif
ATR_VCT_NO(a0) = 0; //<2F>r??
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
#ifndef _PIRATE_ANM
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
#else
if (ATR_CHR_NO(a0) == 101490)
{
pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP);
if (a0->bmpNo == 301026 || a0->bmpNo == 301138)
ATR_CHR_NO(a0) = 101492;
}
else
{
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
}
#endif
break;
case 6: //<2F><><EFBFBD><EFBFBD>?<3F>\?<3F><><EFBFBD><EFBFBD>
if (--ATR_STIMER(a0))
break;
ATR_SPD(a0) = 10;
ATR_VCT_NO(a0) = 14; //???????<3F>~?
ATR_FIRST_FLG(a0) = 0; //?<3F>~?
break;
case 10: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (!ATR_DAMAGE(a0) && ATR_LIFE(a0) > 0 && !ATR_PET_DAMAGE(a0)) //???<3F><>?????
{
//????????
if (!ATR_COMBO(a0))
{
//??<3F><><EFBFBD><EFBFBD>
#ifdef _SKILL_ROAR //<2F>輼:<3A><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)//tuen "miss" off
if (ATR_ROAR(a0) == 2){
// set_damage_num(a0, 18, -64);
}
else
{
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (NoMiss == 1);//set_damage_num(a0, 1, -64);
else if (NoMiss == -1)
set_damage_num(a0, 0, -64);
#else
set_damage_num(a0, 0, -64);
#endif
}
#else
set_damage_num(a0, 0, -64);
#endif
d0 = get_next_flg(); //?????<3F><>?????
if (d0 & ATT_COUNTER) //???????
ATR_VCT_NO(a0) = 11; //?????
else
{
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a0) = 0; //<2F>r??
}
}
else
{
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a0) = 0; //<2F>r??
}
break;
}
if (ATR_GUARD_FLG(a0))
{ //?????
//????????
if (!ATR_COMBO(a0))
//???<3F><><EFBFBD><EFBFBD>
set_damage_num(a0, 3, -64 + 16);
ATR_CHR_ACT(a0) = ANIM_GUARD; //??????????//<2F><>
}
else
ATR_CHR_ACT(a0) = ANIM_DAMAGE; //???????????//<2F><><EFBFBD><EFBFBD>
ATR_CHR_ANG(a0) = (ATR_DAMAGE_ANG(a0) + 4) & 7;
//??????????????????
if (!ATR_COMBO(a0) || ATR_CHR_ACT_OLD(a0) != ANIM_DAMAGE)
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_DAMAGE_ANG(a0)];
pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP);
ATR_VCT_NO(a0) = 11;
//?????
if (ATR_COMBO(a0))
ATR_STIMER(a0) = 255;
else
{
if (ATR_KAISHIN(a0)) //?<3F><>?????
ATR_STIMER(a0) = HIT_STOP_TIM * 4;
else
ATR_STIMER(a0) = HIT_STOP_TIM;
}
#ifdef _PETSKILL_ACUPUNCTURE
/////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
) && ATR_SYNC_FLG(a0) == 0)
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
) && ATR_SYNC_FLG(a0) == 0)
#endif
/////////////////////////
#else
/////////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP) && ATR_SYNC_FLG(a0) == 0)
#else
if (ATR_ATTACK_KIND(0, a0) & ATT_REFLEX && ATR_SYNC_FLG(a0) == 0)
#endif
/////////////////////////
#endif
ATR_STIMER(a0) = HIT_STOP_TIM * 4;//817333333
ATR_SPD(a0) = 16;
#ifdef _MAGIC_DEEPPOISION //<2F>
if ((ATR_DEEPPOISION(a0) == 1))
ATR_STIMER(a0) = 50;
#endif
//????????
if (!ATR_COMBO(a0))
{
//????<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
set_damage_num(a0, 6, -64);
ATR_LIFE(a0) -= ATR_DAMAGE(a0); //?????<3F><>
//andy_mp
ATR_MP(a0) -= ATR_MPDAMAGE(a0);
ATR_PET_LIFE(a0) -= ATR_PET_DAMAGE(a0);
//andy_fall
if (ATR_PETFALL(a0) == 1)
{
if (ATR_LIFE(a0) > 0)
petfallChangeGraph(a0);
}
if (ATR_PET_LIFE(a0) <= 0 && ATR_RIDE(a0))
{ //?<3F><>??????
ATR_PET_LIFE(a0) = 0;
if (ATR_LIFE(a0) > 0)
petfallChangeGraph(a0);
}
if (ATR_LIFE(a0) <= 0 || (ATR_ATTACK_KIND(1, a0) & ATT_DEATH))
{ //?<3F><>??????
ATR_LIFE(a0) = 0;
slow_flg++; //????<3F><>
flash_vct_no = 1; //?????????
}
}
break;
case 11: //????<3F>r?
if (ATR_DAMAGE(a0))
{ //???????
gemini(a0); //??????
ATR_CRS_OLD(a0) = ATR_CRS(a0) = (ATR_CRS(a0) + 16) & 31;
if (--ATR_STIMER(a0)) //??<3F>r???
break;
}
#ifdef _PETSKILL_ACUPUNCTURE
//////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
) && ATR_SYNC_FLG(a0) == 0 )
#else
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
) && ATR_SYNC_FLG(a0) == 0)
#endif
//////////////////////
#else
//////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP) && ATR_SYNC_FLG(a0) == 0)
#else
if (ATR_ATTACK_KIND(0, a0) & ATT_REFLEX && ATR_SYNC_FLG(a0) == 0)
#endif
//////////////////////
#endif
{
sav_command_point = command_point; //?????<3F><>?????<3F>~<7E><>
d0 = get_num();
command_point = sav_command_point; //?????<3F><>???????
if (d0 != 255)
{ //??<3F><><EFBFBD><EFBFBD>??
a1 = ATR_BODY_WORK(0, a0) = p_party[get_num()]; //<2F><>?<3F><>???
ATR_ATTACK_KIND(0, a0) = get_num(); //??<3F><>????
ATR_ATTACK_POW(0, a0) = get_num(); //??????
#ifdef _PET_ITEM
if (ATR_ATTACK_KIND(0, a0) & ATT_ATTACKBACK)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
#ifdef _FIX_ACUPUNCTURE
if (ATR_ATTACK_KIND(0, a0) & ATT_ACUPUNCTURE)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a0) = get_num(); //pet??????
else
LogToBattleError(BattleCmd, __LINE__);
//<2F><><EFBFBD><EFBFBD>ս<EFBFBD><D5BD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a0) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
ATR_HIT_STOP(a0) = 0; //??????????
ATR_VCT_NO(a0) = 2; //???
ATR_FIRST_FLG(a0) = 0; //????????
ATR_CHR_ACT_OLD(a0) = -1;
if (ATR_ATTACK_KIND(0, a0) & ATT_VICARIOUS) //<2F><><EFBFBD><EFBFBD>??????
ATR_VCT_NO(a0) = 1; //<2F>q<EFBFBD><71>?
break;
}
}
if (ATR_COUNTER_FLG(a0))
{ //???????//counter
a1 = ATR_BODY_WORK(0, a0) = p_party[get_num()]; //<2F><>?<3F><>???
ATR_ATTACK_KIND(0, a0) = get_num(); //??<3F><>????
ATR_ATTACK_POW(0, a0) = get_num(); //??????
#ifdef _PET_ITEM
if (ATR_ATTACK_KIND(0, a0) & ATT_ATTACKBACK)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
#ifdef _FIX_ACUPUNCTURE
if (ATR_ATTACK_KIND(0, a0) & ATT_ACUPUNCTURE)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a0) = get_num(); //pet??????
else
LogToBattleError(BattleCmd, __LINE__);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a0) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
ATR_CHR_ANG(a0) = (ATR_DAMAGE_ANG(a0) + 4) & 7;
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
ATR_BODY_CNT(a0) = 1; //
ATR_BODY_WORK(0, a0) = a1; //<2F><>?<3F><>
ATR_HIT_STOP(a0) = HIT_STOP_TIM; //??????????
ATR_VCT_NO(a0) = 2; //???
ATR_FIRST_FLG(a0) = 0; //????????
//?????<3F><><EFBFBD><EFBFBD>
ATR_CHR_ACT_OLD(a0) = -1;
break;
}
if (ATR_LIFE(a0) <= 0) //?<3F><>??
slow_flg--; //?????
//<2F><><EFBFBD><EFBFBD> ?????
if (ATR_AKO_FLG(a0))
{
//????
ATR_FIRST_FLG(a0) = 0;
ATR_VCT_NO(a0) = 55;
//???<3F><>?<3F>V?<3F>ϣ<EFBFBD>??
if (ATR_PET_OK(a0))
{
a1 = p_party[ATR_PLACE_NO(a0) + 5]; //???<3F><>?????
if (ATR_NAME(a1) != NULL)
{
ATR_BODY_WORK(0, a0) = a1; //?????????
if (ATR_LIFE(a1) > 0) //???<3F><>?????
{
ATR_VCT_NO(a1) = 56; //????????
ATR_BODY_WORK(0, a1) = a0; //??<3F><>??????
}
}
else
ATR_BODY_WORK(0, a0) = NULL; //pet work clear?????????
}
else
ATR_BODY_WORK(0, a0) = NULL; //?????????
//<2F><><EFBFBD><EFBFBD>??????
if (BattleMyNo + 5 == ATR_PLACE_NO(a0))
{
// ??????<3F><>??????
if (att_select_flg == TRUE)
{
//????
pc.selectPetNo[pc.battlePetNo] = FALSE;
pc.battlePetNo = -1;
}
else
{
// <20>i?????
if (battlePetNoBak2 == pc.battlePetNo)
{
//????
pc.selectPetNo[pc.battlePetNo] = FALSE;
pc.battlePetNo = -1;
}
else
//????
pc.selectPetNo[battlePetNoBak2] = FALSE;
}
}
break;
}
if (ATR_KAISHIN(a0)) //?<3F><>?????
ATR_SPD(a0) = 35;//<2F><><EFBFBD>˾<EFBFBD><CBBE><EFBFBD>
else
ATR_SPD(a0) = 28;
#ifdef _MAGIC_DEEPPOISION //<2F>
if (ATR_DEEPPOISION(a0) == 1)
{
ATR_SPD(a0) = 0;
ATR_LIFE(a0) = 0;
}
#endif
ATR_VCT_NO(a0) = 12; //???????
break;
case 12: //??????
//??<3F><>??
if ((ATR_CHR_NO(a0) >= SPR_mwood1 && ATR_CHR_NO(a0) <= SPR_mstone3) ||
(ATR_CHR_NO(a0) == 15323) || (ATR_CHR_NO(a0) == 10812) || (ATR_CHR_NO(a0) == 15527) ||
(ATR_CHR_NO(a0) == 15543) || (ATR_CHR_NO(a0) == 15575) || (ATR_CHR_NO(a0) == 15607)
)
ATR_SPD(a0) -= 2;
else
{
//<2F><><EFBFBD>˶<EFBFBD><CBB6><EFBFBD>
if (ATR_CHR_ACT(a0) == ANIM_DAMAGE && ATR_CHR_NO(a0) >= SPR_pet061 && ATR_CHR_NO(a0) <= SPR_pet064 || ATR_CHR_NO(a0) == SPR_pet065)
{
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
gemini(a0);
ATR_SPD(a0) -= 1;
}
else
{
pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP);
gemini(a0); //?<3F>h
ATR_SPD(a0) -= 2;
}
}
if (ATR_SPD(a0) < 0) //??????<3F><>???
{
ATR_SPD(a0) = 10;
ATR_VCT_NO(a0) = 13; //??????<3F>r?
ATR_STIMER(a0) = 16;
#ifdef _SHOOTCHESTNUT // Syu ADD <20><EFBFBD><E8BCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
a1 = ATR_COUNTER(p_master);
if (a1->anim_chr_no_bak == 101578)
ATR_STIMER(a0) = 26;
#endif
}
break;
case 13: //??????<3F>r?
if (--ATR_STIMER(a0)) //??<3F>r???
break;
#ifdef _SHOOTCHESTNUT // Syu ADD <20><EFBFBD><E8BCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
a1 = ATR_COUNTER(p_master);
if (a1->anim_chr_no_bak == 101578)
{
if ((abs(ATR_H_POS(a0) - ATR_INT_WORK0(a0)) + abs(ATR_V_POS(a0) - ATR_INT_WORK1(a0)) > 80))
{
ATR_H_POS(a0) = ATR_INT_WORK0(a0);
ATR_V_POS(a0) = ATR_INT_WORK1(a0);
}
}
#endif
if (ATR_LIFE(a0) > 0) //<2F><>?????
{
if (ATR_COUNTER(p_master) == a0 || ATR_SYNC_FLG(a0) == 1) //<2F><><EFBFBD><EFBFBD>????<3F>i??????
{
d0 = ATR_INT_WORK0(a0); //<2F><>???
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CHR_ANG(a0) = crs_change_tbl[d0];
ATR_SPD(a0) = 32;
ATR_VCT_NO(a0) = 4; //?<3F>~?
}
else
{
ATR_VCT_NO(a0) = 14; //???
ATR_FIRST_FLG(a0) = 0; //??????
}
}
else
{
#ifdef _PETSKILL_ACUPUNCTURE
////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_COUNTER(p_master) == a0 || ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
{
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#else
if (ATR_COUNTER(p_master) == a0 || ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
{
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_ACUPUNCTURE
#ifdef _PET_ITEM
| ATT_ATTACKBACK
#endif
))
#endif
////////////////////
#else
////////////////////
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ATR_COUNTER(p_master) == a0 || ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP))
{
if (ATR_ATTACK_KIND(0, a0) & (ATT_REFLEX | ATT_TRAP))
#else
if (ATR_COUNTER(p_master) == a0 || ATR_ATTACK_KIND(0, a0) & ATT_REFLEX)
{
if (ATR_ATTACK_KIND(0, a0) & ATT_REFLEX)
#endif
////////////////////
#endif
ATR_DAMAGE(p_master)++; //??<3F><>?
else
{
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_BATTLE_MODEL(a0) != ATT_BATTLE_MODEL) //<2F><><EFBFBD>Dz<EFBFBD><C7B2>DZ<EFBFBD><C7B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#endif
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //??<3F><>?
}
d0 = ATR_INT_WORK0(a0); //<2F><>???
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CHR_ANG(a0) = crs_change_tbl[d0];
}
#ifdef _MAGIC_DEEPPOISION //<2F>
if (ATR_DEEPPOISION(a0) == 1)
ATR_VCT_NO(a0) = VCT_NO_DIE + 1;
else
#endif
ATR_VCT_NO(a0) = VCT_NO_DIE; //?<3F><>?
}
break;
case 14: //????????
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
if (ATR_FIRST_FLG(a0) == 0)
{
ATR_CHR_ANG(a0) = crs_change_tbl[d0];
ATR_FIRST_FLG(a0) = 1;
}
ATR_CRS(a0) = d0; //??????
//??<3F><>??
if ((ATR_CHR_NO(a0) >= SPR_mwood1 && ATR_CHR_NO(a0) <= SPR_mstone3) ||
(ATR_CHR_NO(a0) == 15323) || (ATR_CHR_NO(a0) == 10812) || (ATR_CHR_NO(a0) == 15527) ||
(ATR_CHR_NO(a0) == 15543) || (ATR_CHR_NO(a0) == 15575) || (ATR_CHR_NO(a0) == 15607)
)
d1 = ATR_SPD(a0) = 0; //????
else
gemini(a0); //?<3F>h
if (d1 <= (ATR_SPD(a0) >> 2))
{ //????
ATR_H_POS(a0) = ATR_INT_WORK0(a0); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_INT_WORK1(a0);
ATR_VCT_NO(a0) = 0; //<2F>r??
ATR_SPD(a0) = 32;
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 15: //??
ATR_VCT_NO(a0) = 0; //<2F>r??
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
ATR_DAMAGE(a0) = Rnd(1, 500);
ATR_PET_DAMAGE(a0) = Rnd(1, 500);
set_damage_num(a0, 5, -64);
ATR_LIFE(a0) += ATR_DAMAGE(a0); //???<3F><>
ATR_PET_LIFE(a0) += ATR_PET_DAMAGE(a0); //???<3F><>
break;
case 16: //????
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
ATR_SPD(a0) = 16;
ATR_CHR_ANG(a0) = (ATR_DAMAGE_ANG(a0) + 4) & 7;
gemini(a0);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
ATR_STIMER(a0)++;
if (ATR_STIMER(a0) == 20)
{
ATR_CRS_OLD(a0) = ATR_CRS(a0) = (ATR_CRS(a0) + 16) & 31; //<2F><>?<3F><>?
ATR_VCT_NO(a0)++; //?????
ATR_STIMER(a0) = 0;
}
break;
case 17: //????
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
ATR_STIMER(a0)++;
d0 = 0;
if (ATR_FIRST_FLG(a0) == 0)
{ //????????
if (ATR_STIMER(a0) == 10) //????
d0 = 1;
}
else
{
a1 = ATR_BODY_WORK(0, a0); //<2F><>?????
if (ATR_VCT_NO(a1) != 2) //???????<3F><>???
d0 = 1;
}
if (d0) //???<3F><>???
{
if (ATR_COUNTER(p_master) == a0)
{ //<2F><><EFBFBD><EFBFBD>?????
sav_command_point = command_point; //?????<3F><>?????<3F>~<7E><>
d0 = get_num();
command_point = sav_command_point; //?????<3F><>???????
if (d0 == 255) //<2F><>???
{
ATR_STIMER(a0) = 1; //?<3F>L
ATR_VCT_NO(a0) = 3; //??<3F>r??
break;
}
}
ATR_VCT_NO(a0)++; //?????
ATR_STIMER(a0) = 0;
}
break;
case 18: //????
gemini(a0);
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
ATR_STIMER(a0)++;
if (ATR_STIMER(a0) == 20)
{
#ifdef _PETSKILL_BATTLE_MODEL
a1 = ATR_BODY_WORK(0, a0);
if (a1 && ATR_INT_WORK0(a1) == ATT_BATTLE_MODEL)
ATR_VCT_NO(a0) = 4;
else
#endif
if (ATR_COUNTER(p_master) == a0)
{ //<2F><><EFBFBD><EFBFBD>?????
ATR_STIMER(a0) = 1; //?<3F>L
ATR_VCT_NO(a0) = 3; //??<3F>r??
}
else
{
if (ATR_COUNTER_FLG(a0))
{ //???????
ATR_VCT_NO(a0) = 2; //???
ATR_BODY_WORK(0, a0) = p_party[get_num()]; //<2F><>?<3F><>???
ATR_ATTACK_KIND(0, a0) = get_num(); //??<3F><>????
ATR_ATTACK_POW(0, a0) = get_num(); //??????
#ifdef _PET_ITEM
if (ATR_ATTACK_KIND(0, a0) & ATT_ATTACKBACK)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
#ifdef _FIX_ACUPUNCTURE
if (ATR_ATTACK_KIND(0, a0) & ATT_ACUPUNCTURE)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a0) = get_num(); //pet??????
else
LogToBattleError(BattleCmd, __LINE__);
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a0) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
ATR_FIRST_FLG(a0) = 0; //????????
}
else
ATR_VCT_NO(a0) = 0; //<2F>r??
}
}
break;
case 19: //<2F>i???<3F>r?
a1 = ATR_BODY_WORK(0, a0); //??<3F><><EFBFBD><EFBFBD>?<3F><>?
if (!ATR_LONG_WORK(0, a1)) //???<3F><>??
{
if (ATR_BODY_WORK(1, a1) == a0) //<2F><><EFBFBD><EFBFBD>????<3F>k??
{
ATR_VCT_NO(a0) = 2; //???
break;
}
}
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 20: //??????
if (ATR_BODY_CNT(a0) == 1 && ATR_FIRST_FLG(a0) == 0) //<2F>O<EFBFBD>D????????
{
a2 = ATR_BODY_WORK(0, a0); //<2F><>?<3F><>??
d0 = ATR_H_POS(a2);
d1 = ATR_V_POS(a2);
radar(a0, &d0, &d1); //????
ATR_CHR_ANG(a0) = crs_change_tbl[d0]; /* ????? */
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
ATR_CHR_ACT(a0) = ANIM_ATTACK; //?????????
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //?????<3F><>???
ATR_CHR_ACT_OLD(a0) = -1;
ATR_VCT_NO(a0) = 0; //<2F>r??
break;
}
//????<3F>D<EFBFBD><44>????
if (ATR_CHR_CNT(a0) == ATR_HIT_TIMING(a0) && ATR_CHR_TIM(a0) == 0)
{
if (ATR_BODY_CNT(a0) == 1) //<2F>O<EFBFBD>D??
{
//???????
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = 1; //???<3F><>
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
/* <20><>??? */
ATR_NAME(a1) = missile;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MISSILE;
/* ?????<3F>k? */
if (ATR_CHR_NO(a0) >= 31027) //??????
ATR_CHR_NO(a1) = 32053;
else
ATR_CHR_NO(a1) = 32055;
ATR_ATTACK_KIND(0, a1) = get_num(); //??<3F><>????
ATR_ATTACK_POW(0, a1) = get_num(); //??????
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a1) = get_num(); //pet??????
else
LogToBattleError(BattleCmd, __LINE__);
//<2F><><EFBFBD><EFBFBD>ս<EFBFBD><D5BD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a1) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
/* ???<3F>t */
ATR_CHR_ANG(a1) = ATR_CHR_ANG(a0);
ATR_BODY_WORK(0, a1) = ATR_BODY_WORK(0, a0);
ATR_H_POS(a1) = ATR_H_POS(a0);
ATR_V_POS(a1) = ATR_V_POS(a0);
ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
ATR_SPD(a1) = 32;
gemini(a1);
gemini(a1);
gemini(a1);
ATR_BODY_CNT(a1) = 0;
p_missile[0] = a1;
p_missile[1] = NULL;
}
else
{
for (d7 = 0; d7 < ATR_BODY_CNT(a0); d7++)
{
//???????
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(a0); //???<3F><>
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
/* <20><>??? */
ATR_NAME(a1) = missile;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MISSILE;
/* ?????<3F>k? */
if (ATR_CHR_NO(a0) >= 31027) //??????
ATR_CHR_NO(a1) = 32053;
else
ATR_CHR_NO(a1) = 32055;
/* ???<3F>t */
a2 = ATR_BODY_WORK(0, a1) = p_party[get_num()]; //<2F><>?<3F><>
ATR_ATTACK_KIND(0, a1) = get_num(); //??<3F><>????
ATR_ATTACK_POW(0, a1) = get_num(); //??????
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a1) = get_num(); //pet??????
else
LogToBattleError(BattleCmd, __LINE__);
//<2F><><EFBFBD><EFBFBD>ս<EFBFBD><D5BD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a1) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
ATR_H_POS(a1) = ATR_H_POS(a0);
ATR_V_POS(a1) = ATR_V_POS(a0);
d0 = ATR_H_POS(a2);
d1 = ATR_V_POS(a2);
radar(a1, &d0, &d1);
ATR_CHR_ANG(a1) = crs_change_tbl[d0]; /* ????? */
ATR_SPD(a1) = 32; //<2F>D<EFBFBD><44>?<3F>t???
ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
gemini(a1);
gemini(a1);
gemini(a1);
ATR_CRS(a1) = d0;
ATR_BODY_CNT(a1) = d7;
p_missile[d7] = a1;
}
p_missile[d7] = NULL;
}
}
break;
case 25: //??<3F>d
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
ATR_CHR_ACT(a0) = ANIM_ATTACK; //?????????
ATR_HIT(a0) = 0; //?????????
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //?????<3F><>???
ATR_CHR_ACT_OLD(a0) = -1;
ATR_VCT_NO(a0) = 0; //<2F>r??
break;
}
//???????
if (ATR_HIT(a0) >= 10000 && ATR_HIT(a0) < 10100)
{
//???<3F><>?<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
/* <20><>??? */
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = 26;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_HIT_MARK;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = SPR_effect01;
/* ???<3F>t */
LoadBmp(ATR_PAT_NO(a0));
#ifndef __CARYTEST
ATR_V_POS(a1) = ATR_V_POS(a0) + a0->anim_y + SpriteInfo[ATR_PAT_NO(a0)].height / 2;
#else
ATR_V_POS(a1) = ATR_V_POS(a0) + a0->anim_y + g_lpRealAdrn[ATR_PAT_NO(a0)].height / 2;
#endif
ATR_H_POS(a1) = ATR_H_POS(a0);
}
break;
case 26: //???<3F><>?<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //???<3F><>???
//??????<3F><><EFBFBD><EFBFBD>
while (1)
{
int dx;
d0 = get_num(); //??<3F><>??<3F><>?<3F><>?
if (d0 == 255) //<2F><>???
break;
a2 = p_party[d0]; //??<3F><>??????????
d0 = get_num(); //??????<3F><>?<3F><>?
if (BattleCmd[command_point] == 'p')
dx = get_num(); //pet??????<3F><>?<3F><>?
else
LogToBattleError(BattleCmd, __LINE__);
//???????<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
break;
}
/* <20><>??? */
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = 27;
ATR_BODY_WORK(0, a1) = a2;
ATR_INT_WORK0(a1) = d0; //?????
if (BattleCmd[command_point] == 'p')
ATR_INT_WORKp(a1) = dx; //pet?????
else
LogToBattleError(BattleCmd, __LINE__);
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_HIT_MARK;
/* ?????<3F>k? */
d0 = get_num();
d0 = 0;
ATR_CHR_NO(a1) = SPR_heal + d0;
/* ???<3F>t */
LoadBmp(ATR_PAT_NO(a2));
ATR_H_POS(a1) = ATR_H_POS(a2);
#ifndef __CARYTEST
ATR_V_POS(a1) = ATR_V_POS(a2) + a2->anim_y + SpriteInfo[ATR_PAT_NO(a2)].height / 2;
#else
ATR_V_POS(a1) = ATR_V_POS(a2) + a2->anim_y + g_lpRealAdrn[ATR_PAT_NO(a2)].height / 2;
#endif
}
DeathAction(a0); //<2F><>?
return;
}
break;
case 27: //??????<3F><><EFBFBD><EFBFBD>
if (ATR_HIT_STOP(a0))
{
ATR_HIT_STOP(a0)--;
break;
}
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //???<3F><>???
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
DeathAction(a0); //<2F><>?
return;
}
if (ATR_CHR_CNT(a0) == 9 && ATR_CHR_TIM(a0) == 0)
{
a2 = ATR_BODY_WORK(0, a0);
ATR_DAMAGE(a2) = ATR_INT_WORK0(a0); //?????
ATR_LIFE(a2) += ATR_DAMAGE(a2); //
ATR_HIT_STOP(a0) = 40;
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
if (ATR_LIFE(a2) > ATR_MAX_LIFE(a2)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a2) = ATR_MAX_LIFE(a2); //?<3F><>???
ATR_PET_DAMAGE(a2) = ATR_INT_WORKp(a0); //?????
ATR_PET_LIFE(a2) += ATR_PET_DAMAGE(a2); //
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
if (ATR_PET_LIFE(a2) > ATR_PET_MAX_LIFE(a2)) //?<3F><><EFBFBD><EFBFBD>???
ATR_PET_LIFE(a2) = ATR_PET_MAX_LIFE(a2); //?<3F><>???
set_damage_num(a2, 14, -64);
}
break;
#ifdef _FIREHUNTER_SKILL // (<28><><EFBFBD>ɿ<EFBFBD>) ROG ADD <20><>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ
case FIRE_HUNTER_SKILL:
if (ATR_FIRST_FLG(a0) == 0)
{ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>غ<EFBFBD>
a2 = ATR_BODY_WORK(0, a0); //<2F><><EFBFBD><EFBFBD>λַ
d0 = ATR_H_POS(a2);
d1 = ATR_V_POS(a2);
radar(a0, &d0, &d1); //<2F>״<EFBFBD>
ATR_CRS(a0) = d0; //·<>ߴ<EFBFBD><DFB4><EFBFBD>
ATR_CHR_ANG(a0) = crs_change_tbl[d0]; //<2F><><EFBFBD><EFBFBD>
ATR_CHR_ACT(a0) = ANIM_ATTACK; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}
ATR_HIT(a0) = 30; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_CHR_ACT_OLD(a0) = -1;
//Change fix ԭ<><D4AD>Ϊ 31 <20>ij<EFBFBD> FIRE_HUNTER_SKILL+1
ATR_VCT_NO(a0) = FIRE_HUNTER_SKILL+1; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
ATR_FIRST_FLG(a0) = 0; //<2F>趨Ϊ<E8B6A8><CEAA><EFBFBD><EFBFBD>һ<EFBFBD>غ<EFBFBD>
break;
}
if (ATR_HIT(a0) >= 10000 && ATR_HIT(a0) < 10100)
{
a1 = GetAction(T_PRIO_BOW, sizeof(ATR_EQU)); //<2F><><EFBFBD><EFBFBD>
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѶϢ
ATR_VCT_NO(a0) = 0; //<2F><><EFBFBD><EFBFBD>
return;
}
ATR_STIMER(a0) = 0; //?<3F><>???????
ATR_NAME(a1) = fireHunter; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>function
ATR_CHR_NO(a1) = 101734; //ͼ<><CDBC>
ATR_DISP_PRIO(a1) = D_PRIO_MISSILE; //<2F><><EFBFBD>ȶ<EFBFBD>
/*<2A><>ʼλ<CABC><CEBB>*/
ATR_CHR_ANG(a1) = ATR_CHR_ANG(a0); //<2F><><EFBFBD><EFBFBD>
ATR_BODY_WORK(0, a1) = ATR_BODY_WORK(0, a0); //<2F><><EFBFBD><EFBFBD>λַ
ATR_BODY_WORK(1, a1) = a0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>
for (int i = 2; i < ATR_BODY_CNT(a0) + 2; i++)
{
ATR_BODY_WORK(i, a1) = ATR_BODY_WORK(i, a0); //<2F><><EFBFBD><EFBFBD>λַ
ATR_ATTACK_POW(i, a1) = ATR_ATTACK_POW(i, a0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_PET_POW(i, a1) = ATR_ATTACK_PET_POW(i, a0); //<2F><><EFBFBD><EFBFBD><EFB9A5><EFBFBD><EFBFBD>
}
ATR_ATTACK_POW(0, a1) = ATR_ATTACK_POW(0, a0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_PET_POW(0, a1) = ATR_ATTACK_PET_POW(0, a0); //<2F><><EFBFBD><EFBFBD><EFB9A5><EFBFBD><EFBFBD>
ATR_ATTACK_KIND(0, a1) = ATR_ATTACK_KIND(0, a0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_SPD(a1) = 60; //<2F>ٶ<EFBFBD>
ATR_H_POS(a1) = ATR_H_POS(a0) ;
ATR_V_POS(a1) = ATR_V_POS(a0) - 50;
ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)]; //·<><C2B7>
ATR_COUNTER_FLG(a1) = ATR_CRS(a1); //<2F><><EFBFBD>˹<EFBFBD><CBB9><EFBFBD>·<EFBFBD><C2B7><EFBFBD>
ATR_BODY_CNT(a1) = ATR_BODY_CNT(a0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bFireInit = TRUE;
FireSkillEnd = TRUE;
p_missile[0] = a1;
p_missile[1] = NULL;
d6 = 0; //<2F><><EFBFBD><EFBFBD><E3B5BD>ʱ<EFBFBD><CAB1>
while (1)
{
d0 = ATR_H_POS(ATR_BODY_WORK(0, a1));
d1 = ATR_V_POS(ATR_BODY_WORK(0, a1));
radar(a1, &d0, &d1); //<2F>״<EFBFBD>
//<2F><><EFBFBD><EFBFBD>
if (d1 <= 10)
break;
ATR_CRS(a1) = d0;
gemini(a1);
d6++;
}
if (!(ATR_GROUP_FLG(a1) = d6)) //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><E4B4A2>
ATR_GROUP_FLG(a1) = 1;
ATR_H_POS(a1) = ATR_H_POS(a0) ;
ATR_V_POS(a1) = ATR_V_POS(a0) - 30;
ATR_CHR_ANG(a1) = ATR_CHR_ANG(a0); //<2F><><EFBFBD><EFBFBD>
ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)]; //·<><C2B7>
ATR_COUNTER_FLG(a1) = ATR_CRS(a1); //<2F><><EFBFBD>˹<EFBFBD><CBB9><EFBFBD>·<EFBFBD><C2B7><EFBFBD>
}
break;
//Change fix <20>з<EFBFBD>˯<EFBFBD>ߺ<EFBFBD><DFBA>ٻ<EFBFBD><D9BB><EFBFBD>,<2C><><EFBFBD><EFBFBD>ȥ 31 (ATR_VCT_NO(a0) = 31;),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȥ,<2C><>Ϊ ATR_VCT_NO(a0) = FIRE_HUNTER_SKILL+1; <20>ij<EFBFBD><C4B3><EFBFBD>һ<EFBFBD><D2BB>
case FIRE_HUNTER_SKILL + 1:
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
if (!ATR_STIMER(a0)) //?<3F><>??????
break;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
break;
#endif
case 30: //?????
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
a2 = ATR_BODY_WORK(0, a0); //<2F><>?<3F><>??
d0 = ATR_H_POS(a2);
d1 = ATR_V_POS(a2);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //???<3F><><EFBFBD>V
ATR_CHR_ANG(a0) = crs_change_tbl[d0]; /* ????? */
if (ATR_LONG_WORK(0, a0) == 0) //?????
ATR_CHR_ACT(a0) = ANIM_ATTACK; //?????????
else
ATR_CHR_ACT(a0) = ANIM_THROW; //?????????
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
ATR_HIT(a0) = 0; //?????????
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //?????<3F><>???
ATR_CHR_ACT_OLD(a0) = -1;
ATR_VCT_NO(a0) = 31; //???<3F><>?<3F>r??
ATR_FIRST_FLG(a0) = 0; //????????
break;
}
//???????
//?<3F>D<EFBFBD><44>????
if (ATR_HIT(a0) >= 10000 && ATR_HIT(a0) < 10100)
{
//??????
a1 = GetAction(T_PRIO_BOW, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
ATR_STIMER(a0) = 0; //?<3F><>???????
/* <20><>??? */
switch (ATR_LONG_WORK(0, a0))
{
case 0: //?
ATR_NAME(a1) = bow;
ATR_CHR_NO(a1) = CG_ARROW_00 + ATR_CRS(a0) / 2 + 20;
break;
case 1: //???
ATR_NAME(a1) = axe_shadow;
ATR_CHR_NO(a1) = SPR_onokage;
break;
case 2: //<2F><>??
ATR_NAME(a1) = stone_shadow;
ATR_CHR_NO(a1) = 25786;
break;
//Terry add 2001/12/28
#ifdef _ITEM_FIRECREAKER
case 3: //<2F><><EFBFBD><EFBFBD>
ATR_NAME(a1) = firecracker_shadow;
ATR_CHR_NO(a1) = 25786;
break;
#endif
//Terry end
default:
ATR_NAME(a1) = bow;
}
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MISSILE;
/* ???<3F>t */
ATR_CHR_ANG(a1) = ATR_CHR_ANG(a0);
ATR_BODY_WORK(0, a1) = ATR_BODY_WORK(0, a0); //<2F><>?????
ATR_BODY_WORK(1, a1) = a0; //<2F>D<EFBFBD><44>?????
ATR_ATTACK_POW(0, a1) = ATR_ATTACK_POW(0, a0); //???
ATR_ATTACK_PET_POW(0, a1) = ATR_ATTACK_PET_POW(0, a0); //???
ATR_ATTACK_KIND(0, a1) = ATR_ATTACK_KIND(0, a0); //?????
ATR_H_POS(a1) = ATR_H_POS(a0);
ATR_V_POS(a1) = ATR_V_POS(a0);
ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
ATR_SPD(a1) = 32;
gemini(a1);
gemini(a1);
gemini(a1);
ATR_BODY_CNT(a1) = 0;
ATR_COUNTER_FLG(a1) = ATR_CRS(a0); //<2F><>?????????????
p_missile[0] = a1;
p_missile[1] = NULL;
//????
a2 = GetAction(T_PRIO_BOW, sizeof(ATR_EQU));
if (a2 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
/* <20><>??? */
switch (ATR_LONG_WORK(0, a0))
{
case 0: //?
ATR_NAME(a2) = stick_bow;
ATR_CHR_NO(a2) = CG_ARROW_00 + ATR_CRS(a0) / 2;
break;
case 1: //???
ATR_NAME(a2) = axe;
ATR_CHR_NO(a2) = SPR_ono;
break;
case 2: //<2F><>??
ATR_NAME(a2) = stone;
ATR_CHR_NO(a2) = 25785;
break;
//Terry add 2001/12/28
#ifdef _ITEM_FIRECREAKER
case 3: //<2F><><EFBFBD><EFBFBD>
ATR_NAME(a2) = stone;
ATR_CHR_NO(a2) = 24350;
break;
#endif
//Terry end
default:
ATR_NAME(a2) = stick_bow;
}
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a2) = D_PRIO_MISSILE;
//?????????
ATR_LONG_WORK(0, a1) = ATR_CHR_NO(a2);
ATR_BODY_WORK(2, a1) = a2;
/* ???<3F>t */
ATR_CHR_ANG(a2) = ATR_CHR_ANG(a1);
a3 = ATR_BODY_WORK(0, a2) = ATR_BODY_WORK(0, a1); //<2F><>?????
ATR_BODY_WORK(1, a2) = a1; //?<3F>s?????
ATR_H_POS(a2) = ATR_H_POS(a1);
ATR_V_POS(a2) = ATR_V_POS(a1);
d6 = 0; //<2F><>????<3F><>
ATR_SPD(a2) = 32;
while (1){
d0 = ATR_H_POS(a3);
d1 = ATR_V_POS(a3);
radar(a2, &d0, &d1); //????
//???????
if (d1 <= 20){
break;
}
ATR_CRS(a2) = d0;
gemini(a2);
d6++;
}
ATR_INT_WORK0(a2) = d1; //<2F><>?????<3F><><EFBFBD>V
if (!(ATR_GROUP_FLG(a1) = d6)){ //???????<3F><><EFBFBD>V
ATR_GROUP_FLG(a1) = 1;
}
d6 = d6 >> 1;
ATR_SPD(a2) = d6; //
ATR_CRS(a2) = 0; //
ATR_H_MINI(a2) = 0; //
ATR_V_MINI(a2) = 0; //
ATR_H_POS(a2) = ATR_H_POS(a1); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a2) = ATR_V_POS(a1) - 28; //
}
break;
case 31: //?????<3F><>?<3F>r?
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
if (!ATR_STIMER(a0)){ //?<3F><>??????
break;
}
d0 = get_num(); //???<3F>h<EFBFBD><68>?<3F><>?
if (d0 == 255){ //<2F><>???
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
}
else {
ATR_VCT_NO(a0) = 30; //???<3F>D
ATR_FIRST_FLG(a0) = 0; //
ATR_BODY_WORK(0, a0) = p_party[d0]; //<2F><>?<3F><>???
ATR_ATTACK_KIND(0, a0) = get_num(); //??<3F><>????
ATR_ATTACK_POW(0, a0) = get_num(); //??????
#ifdef _PET_ITEM
if (ATR_ATTACK_KIND(0, a0) & ATT_ATTACKBACK)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
#ifdef _FIX_ACUPUNCTURE
if (ATR_ATTACK_KIND(0, a0) & ATT_ACUPUNCTURE)
{
ATR_ATTACK_POW(1, a0) = ATR_ATTACK_POW(0, a0) >> 16;
ATR_ATTACK_POW(0, a0) = ATR_ATTACK_POW(0, a0) & 0x0000ffff;
}
#endif
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a0) = get_num(); //pet??????
else
LogToBattleError(BattleCmd, __LINE__);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a0) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
}
break;
case 32: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// a2Ϊ<32><CEAA><EFBFBD><EFBFBD>a1ΪӰ
if (ATR_FIRST_FLG(a0) == 0){ //???????
a2 = ATR_BODY_WORK(0, a0); //<2F><>?<3F><>??
d0 = ATR_H_POS(a2);
d1 = ATR_V_POS(a2);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //???<3F><><EFBFBD>V
ATR_CHR_ANG(a0) = crs_change_tbl[d0]; /* ????? */
if (ATR_LONG_WORK(0, a0) == 0){ //?????
ATR_CHR_ACT(a0) = ANIM_ATTACK; //?????????
}
else {
ATR_CHR_ACT(a0) = ANIM_THROW; //?????????
}
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
#ifdef _SHOOTCHESTNUT // Syu ADD <20><EFBFBD><E8BCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else if (ShooterNum == 101578) {
a2 = ATR_BODY_WORK(0, a0); //<2F><>?<3F><>??
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//d0 = /*ATR_H_POS(a2) =*/ nutx[ a2->hitDispNo ] ;
//d1 = /*ATR_V_POS(a2) =*/ nuty[ a2->hitDispNo ] ;
//<2F><><EFBFBD><EFBFBD>
d0 = ATR_H_POS(a2) = ATR_INT_WORK0(a2);
d1 = ATR_V_POS(a2) = ATR_INT_WORK1(a2);
radar(a0, &d0, &d1); //????
// ATR_CRS(a0) = d0; //???<3F><><EFBFBD>V
// ATR_CHR_ANG(a0) = crs_change_tbl[ d0 ]; /* ????? */
}
#endif
ATR_HIT(a0) = 0; //?????????
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP)){ //?????<3F><>???
ATR_VCT_NO(a0) = 33; //???<3F><>?<3F>r??
break;
}
//???????
//?<3F>D<EFBFBD><44>????
if (ATR_HIT(a0) >= 10000 && ATR_HIT(a0) < 10100){
//??????
a1 = GetAction(T_PRIO_BOW, sizeof(ATR_EQU));
if (a1 == NULL){
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
/* <20><>??? */
switch (ATR_LONG_WORK(0, a0)){
case 0: //?
ATR_NAME(a1) = bow;
break;
case 1: //???
ATR_NAME(a1) = axe_shadow;
break;
case 2: //<2F><>??
ATR_NAME(a1) = stone_shadow;
break;
default:
ATR_NAME(a1) = bow;
}
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MISSILE;
/* ?????<3F>k? */
#ifdef _SHOOTCHESTNUT // Syu ADD <20><EFBFBD><E8BCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ShooterNum == 101578)
ATR_CHR_NO(a1) = 27001;
else
ATR_CHR_NO(a1) = CG_ARROW_00 + ATR_CRS(a0) / 2 + 20;
#else
ATR_CHR_NO(a1) = CG_ARROW_00 + ATR_CRS(a0) / 2 + 20;
#endif
/* ???<3F>t */
ATR_CHR_ANG(a1) = ATR_CHR_ANG(a0);
ATR_BODY_WORK(0, a1) = ATR_BODY_WORK(0, a0); //<2F><>?????
ATR_BODY_WORK(1, a1) = a0; //<2F>D<EFBFBD><44>?????
ATR_ATTACK_POW(0, a1) = ATR_ATTACK_POW(0, a0); //???
ATR_ATTACK_PET_POW(0, a1) = ATR_ATTACK_PET_POW(0, a0); //???
ATR_ATTACK_KIND(0, a1) = ATR_ATTACK_KIND(0, a0); //?????
ATR_H_POS(a1) = ATR_H_POS(a0);
ATR_V_POS(a1) = ATR_V_POS(a0);
ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
ATR_SPD(a1) = 32;
gemini(a1);
gemini(a1);
gemini(a1);
ATR_BODY_CNT(a1) = 0;
ATR_COUNTER_FLG(a1) = ATR_CRS(a0); //<2F><>?????????????
p_missile[0] = a1;
p_missile[1] = NULL;
//????
a2 = GetAction(T_PRIO_BOW, sizeof(ATR_EQU));
if (a2 == NULL){
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
/* <20><>??? */
switch (ATR_LONG_WORK(0, a0)){
case 0: //?
ATR_NAME(a2) = stick_bow;
break;
case 1: //???
ATR_NAME(a2) = axe;
break;
case 2: //<2F><>??
ATR_NAME(a2) = stone;
break;
default:
ATR_NAME(a2) = stick_bow;
}
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a2) = D_PRIO_MISSILE;
/* ?????<3F>k? */
#ifdef _SHOOTCHESTNUT // Syu ADD <20><EFBFBD><E8BCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//<2F><><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
if (ShooterNum == 101578)
ATR_CHR_NO(a2) = 26995;
else
ATR_CHR_NO(a2) = CG_ARROW_00 + ATR_CRS(a0) / 2;
#else
ATR_CHR_NO(a2) = CG_ARROW_00 + ATR_CRS(a0) / 2;
#endif
//?????????
ATR_LONG_WORK(0, a1) = ATR_CHR_NO(a2);
ATR_BODY_WORK(2, a1) = a2;
/* ???<3F>t */
ATR_CHR_ANG(a2) = ATR_CHR_ANG(a1);
a3 = ATR_BODY_WORK(0, a2) = ATR_BODY_WORK(0, a1); //<2F><>?????
ATR_BODY_WORK(1, a2) = a1; //?<3F>s?????
ATR_H_POS(a2) = ATR_H_POS(a1);
ATR_V_POS(a2) = ATR_V_POS(a1);
d6 = 0; //<2F><>????<3F><>
ATR_SPD(a2) = 32;
while (1)
{
d0 = ATR_H_POS(a3);
d1 = ATR_V_POS(a3);
radar(a2, &d0, &d1); //????
//???????
if (d1 <= 20)
break;
ATR_CRS(a2) = d0;
gemini(a2);
d6++;
}
ATR_INT_WORK0(a2) = d1; //<2F><>?????<3F><><EFBFBD>V
if (!(ATR_GROUP_FLG(a1) = d6)) //???????<3F><><EFBFBD>V
ATR_GROUP_FLG(a1) = 1;
d6 = d6 >> 1;
ATR_SPD(a2) = d6; //
ATR_CRS(a2) = 0; //
ATR_H_MINI(a2) = 0; //
ATR_V_MINI(a2) = 0; //
ATR_H_POS(a2) = ATR_H_POS(a1); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a2) = ATR_V_POS(a1) - 28; //
d0 = get_num(); //???<3F>h<EFBFBD><68>?<3F><>?
if (d0 != 255)
{ //<2F><>??????
if (ATR_CHR_CNT(a0) >= 3) //???<3F>D
ATR_CHR_CNT(a0) -= 3;
else
ATR_CHR_ACT_OLD(a0) = -1; //???<3F>D
ATR_DAMAGE(a0)++;
ATR_FIRST_FLG(a0) = 0;
ATR_BODY_WORK(0, a0) = p_party[d0]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_KIND(0, a0) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_ATTACK_POW(0, a0) = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (BattleCmd[command_point] == 'p')
ATR_ATTACK_PET_POW(0, a0) = get_num(); //<2F><><EFBFBD><EFBFBD><EFB9A5><EFBFBD><EFBFBD><EFBFBD>
else
LogToBattleError(BattleCmd, __LINE__);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч xiezi
#ifdef _ATTACK_EFFECT
if (BattleCmd[command_point] == 's')
ATR_LONG_WORK(0, a0) = get_num(); // <20><>¼<EFBFBD><C2BC>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>
#endif
}
}
break;
case 33: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
if (ATR_STIMER(a0) == ATR_DAMAGE(a0))
{ //?<3F><>????
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F><><EFBFBD><EFBFBD>
}
break;
case 35: //<2F><><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD>
ATR_SPD(a0) = 32; //<2F>ٶ<EFBFBD>
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_CHR_ANG(a0) = crs_change_tbl[d0];
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
if (d1 <= 32 * 2)
{ //????
ATR_VCT_NO(a0)++; //?<3F><>?<3F><>?
ATR_FIRST_FLG(a0) = 0; //????????
}
else
gemini(a0); //?<3F>h
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 36: //<2F><>??<3F><>
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_HIT(a0) = 0; //?????????
d0 = ATR_H_POS(a1); //<2F><>?<3F><>??
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //???<3F><><EFBFBD>V
ATR_CHR_ANG(a0) = crs_change_tbl[d0]; /* ????? */
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
ATR_CHR_ACT(a0) = ANIM_ATTACK; //?????????
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //?????<3F><>???
ATR_VCT_NO(a0)++; //????<3F>r??
ATR_FIRST_FLG(a0) = 0; //????????
ATR_STIMER(a0) = 60;
break;
}
//???????
if (ATR_HIT(a0) != 0 && ATR_HIT(a0) < 10100)
{
//?????
play_damage(ATR_HIT(a0), ATR_H_POS(a0));
//?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
set_damage_num(a0, 5, -64);
//??????<3F><>?
ATR_VCT_NO(a1) = 45;
//??<3F><>???????
ATR_BODY_WORK(0, a1) = a0;
//?<3F>h<EFBFBD>L<EFBFBD>T
ATR_SPD(a1) = ATR_SPD(a0) = 8;
//?????????
ATR_HIT(a0) = 0;
}
break;
case 37: //????<3F>r?
if (ATR_STIMER(a0))
{
ATR_STIMER(a0)--;
break;
}
ATR_VCT_NO(a0)++; //?????
break;
case 38: //????
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
gemini(a0); //?<3F>h
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_CHR_ANG(a0) = crs_change_tbl[d0];
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
if (d1 <= (ATR_SPD(a0) >> 2))
{ //????
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
ATR_H_POS(a0) = ATR_INT_WORK0(a0); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_INT_WORK1(a0);
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_ATTACK_KIND(0, a0) == 0)
{ //<2F><><EFBFBD><EFBFBD>??
if (ATR_VCT_NO(a1) == 45)
{ //?????<3F>D<EFBFBD><44>??
ATR_VCT_NO(a0) = 40; //<2F><><EFBFBD><EFBFBD>????????
ATR_DAMAGE(a0) = 0; //?????
}
else
ATR_VCT_NO(a0) = 42; //<2F><><EFBFBD><EFBFBD>?
}
else
{
ATR_VCT_NO(a0) = 44; //<2F><>??
//<2F><>?<3F><><EFBFBD><EFBFBD>
set_damage_num(a0, 7, -64);
ATR_STIMER(a0) = 255;
ATR_DAMAGE(a0) = t_music_bgm_no; //???<3F>k?<3F>~<7E><>
play_bgm(0); //???????????
}
}
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
if (ATR_ATTACK_KIND(0, a0) == 0 && ATR_VCT_NO(a1) == 45)
{ //<2F><><EFBFBD><EFBFBD>??
if (!Rnd(0, 100))
{ //<2F>`??????
ATR_VCT_NO(a0) = 40; //<2F><><EFBFBD><EFBFBD>????????
ATR_DAMAGE(a0) = 1; //?????
}
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
if (ATR_SPD(a0) == 32) //??????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 40: //<2F><><EFBFBD><EFBFBD>???????
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
ATR_VCT_NO(a1)++; //?????<3F>D<EFBFBD><44>
ATR_FIRST_FLG(a1) = 0; //????????
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
set_damage_num(a0, 8, -64);
ATR_STIMER(a0) = 100; //????????
if (ATR_DAMAGE(a0) == 1) //????
ATR_CHR_ANG(a0) = (ATR_CHR_ANG(a0) + 4) & 7; //<2F><>?<3F><>?
ATR_VCT_NO(a0)++; //<2F><><EFBFBD><EFBFBD>?????
break;
case 41: //<2F><><EFBFBD><EFBFBD>????
if (!--ATR_STIMER(a0))
{
if (ATR_DAMAGE(a0) == 1)
{ //????
ATR_VCT_NO(a0) = 38; //????
ATR_CHR_ANG(a0) = (ATR_CHR_ANG(a0) + 4) & 7; //<2F><>?<3F><>?
ATR_SPD(a0) = 32; //?????
}
else
ATR_VCT_NO(a0)++; //<2F><><EFBFBD><EFBFBD>?
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
}
else
ATR_CHR_ACT(a0) = ANIM_ANGRY; //<2F><>????????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 42: //ʧ<><CAA7>
ATR_CHR_ACT(a0) = ANIM_STAND; //ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD>
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
a1 = ATR_BODY_WORK(0, a0); //ȡ<><C8A1><EFBFBD>з<EFBFBD>ָ<EFBFBD><D6B8>
if (ATR_VCT_NO(a1) == 0)
{ //?????<3F>`?<3F><>????
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
}
break;
case 44: //<2F>ɹ<EFBFBD>
if (!--ATR_STIMER(a0))
{ //ʱ<>
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F><><EFBFBD><EFBFBD>
play_bgm(ATR_DAMAGE(a0)); //?????
}
ATR_CHR_ACT(a0) = ANIM_HAPPY; //???????????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 45: //??????<3F><>
a1 = ATR_BODY_WORK(0, a0); //??<3F><>????????
if (ATR_VCT_NO(a1) == 38)
{ //??<3F><>?????
d0 = ATR_H_POS(a1); //<2F><>?<3F><>??
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //???<3F><><EFBFBD>V
gemini(a0);
}
if (ATR_VCT_NO(a1) == 0)
{ //??<3F><>?????
ATR_ATTRIB(a0) = ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_NAME(a0) = NULL;
return;
}
ATR_CHR_ACT(a0) = ANIM_DAMAGE; //???????????
ATR_CHR_ANG(a0) = (ATR_CHR_ANG(a0) + 1) & 7;
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 46: //??????????
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
ATR_SPD(a0) = 16;
gemini(a0); //?<3F>h
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_CHR_ANG(a0) = crs_change_tbl[d0];
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
if (d1 <= (ATR_SPD(a0) >> 2))
{ //????
a1 = ATR_BODY_WORK(0, a0); //??<3F><>????????
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
ATR_H_POS(a0) = ATR_INT_WORK0(a0); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_INT_WORK1(a0);
ATR_VCT_NO(a0) = 0; //<2F>r??
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 50: //<2F>P<EFBFBD>f<EFBFBD>D<EFBFBD><44><EFBFBD><EFBFBD>?
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_SPD(a0) = 16;
if (ATR_LIFE(a0) <= 0)
{ //??????
if (ATR_GROUP_FLG(a0) == 0) //????????
//<2F><>????
ATR_CRS(a0) = crs_change_tbl2[7];
else
ATR_CRS(a0) = crs_change_tbl2[3];
}
else
{
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 7;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 3;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 1;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 5;
#endif
ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
}
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
gemini(a0); //?<3F>h
if (ATR_LIFE(a0) > 0)
{ //<2F><>?????
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, 1, ANM_LOOP);
}
if (ATR_H_POS(a0) > lpDraw->xSize + SCREEN_OUT || ATR_H_POS(a0) < 0 - SCREEN_OUT)
{ //?<3F><>???
ATR_NAME(a0) = NULL;
ATR_ATTRIB(a0) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_VCT_NO(a0) = VCT_NO_APPEAR;
ATR_DAMAGE(p_master)++; //<2F>D<EFBFBD><44>?<3F><>
if (ATR_DAMAGE(p_master) == ATR_BODY_CNT(p_master) && ATR_GUARD_FLG(a0) == 1)
{ //ACTION_INF<4E>@<40>e??
action_inf = 2;
command_point = 0; //?????<3F><>????????
}
}
break;
case 52: //ս<><D5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
if (ATR_LIFE(a0) <= 0)
{ //??????
//???<3F><>?<3F>V?<3F>ϣ<EFBFBD>??
if (ATR_PET_OK(a0))
{
a2 = p_party[ATR_PLACE_NO(a0) + 5]; //???<3F><>?????
if (ATR_NAME(a2) != NULL)
{
ATR_VCT_NO(a2) = 50; //????<3F>`??
ATR_FIRST_FLG(a2) = 0; //????????
}
}
ATR_VCT_NO(a0) = 50; //<2F><><EFBFBD>ܳɹ<DCB3>
break;
}
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
set_damage_num(a0, 9, -64);
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 7;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 3;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 1;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 5;
#endif
ATR_STIMER(a0) = 12; //???????
ATR_COUNTER_FLG(a0) = 0; //
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
pattern(a0, ATR_STIMER(a0), ANM_LOOP);
//???????<3F>L<EFBFBD>T<EFBFBD><54>???
ATR_COUNTER_FLG(a0) = (ATR_COUNTER_FLG(a0) + 1) & 7;
if (!ATR_COUNTER_FLG(a0))
{
ATR_STIMER(a0)--;
if (ATR_STIMER(a0) == 1)
{ //????<3F>L??
if (ATR_ATTACK_KIND(0, a0) == 0) //<2F>D<EFBFBD><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>??
ATR_VCT_NO(a0)++; //<2F>D<EFBFBD><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
else
{
ATR_VCT_NO(a0) = 50; //<2F>D<EFBFBD><44><EFBFBD><EFBFBD>??
ATR_FIRST_FLG(a0) = 0; //????????
//???<3F><>?<3F>V?<3F>ϣ<EFBFBD>??
if (ATR_PET_OK(a0))
{
a2 = p_party[ATR_PLACE_NO(a0) + 5]; //???<3F><>?????
if (ATR_NAME(a2) != NULL)
{
ATR_VCT_NO(a2) = 50; //????<3F>`??
ATR_FIRST_FLG(a2) = 0; //????????
}
}
}
}
}
break;
case 53: //ս<><D5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
pattern(a0, ATR_STIMER(a0), ANM_LOOP);
//???????<3F>L<EFBFBD>T<EFBFBD><54>???
ATR_COUNTER_FLG(a0) = (ATR_COUNTER_FLG(a0) + 1) & 7;
if (!ATR_COUNTER_FLG(a0))
{
ATR_STIMER(a0)++;
if (ATR_STIMER(a0) == 12)
{ //????????
ATR_STIMER(a0) = 60;
ATR_VCT_NO(a0)++;
//<2F><>ʾʧ<CABE><CAA7>
set_damage_num(a0, 8, -64);
}
}
break;
case 54: //<2F>P<EFBFBD>f<EFBFBD>D<EFBFBD><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>??????
ATR_CHR_ACT(a0) = ANIM_SAD; //???????????
pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP);
if (!--ATR_STIMER(a0))
{ //???<3F><>???
ATR_DAMAGE(p_master)++; //<2F>D<EFBFBD><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?<3F><>
//???<3F><>?<3F>V?<3F>ϣ<EFBFBD>??
if (ATR_PET_OK(a0))
{
a2 = p_party[ATR_PLACE_NO(a0) + 5]; //???<3F><>?????
if (ATR_NAME(a2) != NULL) //
ATR_DAMAGE(p_master)++; //???<3F>D<EFBFBD><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?<3F><>
}
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
ATR_VCT_NO(a0) = 0; //<2F>r??
}
break;
case 55: //<2F><><EFBFBD><EFBFBD>
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_SPD(a0) = 63; //?<3F>h<EFBFBD>L<EFBFBD>T???
if (ATR_AKO_FLG(a0) == 2) //??????
ATR_LONG_WORK(0, a0) = 0; //<2F><>?<3F><>??????
else
{
ATR_LONG_WORK(0, a0) = 3; //<2F><>?<3F><>??????
//<2F><><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD><EFBFBD>
play_se(11, ATR_H_POS(a0), ATR_V_POS(a0));
}
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
gemini(a0);
if (ATR_LONG_WORK(0, a0) < 3)
{ //<2F><>?<3F><>???
if (ATR_CRS(a0) < 8 || ATR_CRS(a0) > 24)
{
if (ATR_V_POS(a0) <= 0)
{ //<2F>ƣZ?
d0 = 0;
goto monster_case55_100; //??????
}
}
if (ATR_CRS(a0) < 16 && ATR_CRS(a0) > 0)
{
if (ATR_H_POS(a0) >= lpDraw->xSize)
{ //?<3F>Z?
d0 = 1;
goto monster_case55_100; //??????
}
}
if (ATR_CRS(a0) > 8 && ATR_CRS(a0) < 24)
{
if (ATR_V_POS(a0) >= lpDraw->ySize)
{ //?<3F>Z?
d0 = 2;
goto monster_case55_100; //??????
}
}
if (ATR_CRS(a0) > 16)
{
if (ATR_H_POS(a0) <= 0)
{ //?<3F>Z?
d0 = 3;
goto monster_case55_100; //??????
}
}
goto monster_case55_200; //??????
monster_case55_100:
d1 = ATR_CRS(a0);
d1 = ATR_CRS(a0) = crs_bound_tbl[d0][ATR_CRS(a0)]; //<2F><>?<3F><>?
ATR_LONG_WORK(0, a0)++;
//<2F><>?<3F><>??
play_se(66, ATR_H_POS(a0), ATR_V_POS(a0));
monster_case55_200:
;
}
else
{
if (ATR_H_POS(a0) > lpDraw->xSize + SCREEN_OUT || ATR_H_POS(a0) < 0 - SCREEN_OUT || ATR_V_POS(a0) > lpDraw->ySize + SCREEN_OUT || ATR_V_POS(a0) < 0 - SCREEN_OUT)
{ //?<3F><>???
ATR_NAME(a0) = NULL;
ATR_ATTRIB(a0) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_VCT_NO(a0) = VCT_NO_APPEAR;
if (BattleMyNo == ATR_PLACE_NO(a0))
{ //<2F><><EFBFBD><EFBFBD>??
action_inf = 2; ////ACTION_INF<4E>@<40>e
command_point = 0; //?????<3F><>????????
break;
}
//???<3F><>?????
a1 = ATR_BODY_WORK(0, a0);
if (a1 != NULL)
{
//?????
if (ATR_ATTACK_KIND(2, a1) == 1)
{
//????<3F><>
ATR_ATTRIB(a1) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_NAME(a1) = NULL;
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
if (ATR_COUNTER(p_master) == a0) //<2F><><EFBFBD><EFBFBD>?????
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_BATTLE_MODEL(a0) != ATT_BATTLE_MODEL)
#endif
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //??<3F><>?
}
else
{
ATR_VCT_NO(a1) = 57; //???<3F>`??
ATR_FIRST_FLG(a1) = 0;
}
}
else
{
if (ATR_COUNTER(p_master) == a0) //<2F><><EFBFBD><EFBFBD>?????
{
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_BATTLE_MODEL(a0) != ATT_BATTLE_MODEL)
#endif
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //??<3F><>?
}
}
break;
}
}
if (ATR_AKO_FLG(a0) == 2)
{ //??????
if (ATR_LONG_WORK(0, a0) & 1)
ATR_CHR_ANG(a0)--; //??<3F><>
else
ATR_CHR_ANG(a0)++; //??<3F><>
ATR_CHR_ANG(a0) &= 7; //?<3F><>
pattern(a0, 1, ANM_NO_LOOP);
}
break;
case 56: //?????????
a1 = ATR_BODY_WORK(0, a0); //??<3F><>??????
//?<3F><><EFBFBD><EFBFBD>??
if (ATR_H_POS(a1) < lpDraw->xSize && ATR_H_POS(a1) > 64 && ATR_V_POS(a1) < lpDraw->ySize && ATR_V_POS(a1) > 0 - 64)
{
d0 = ATR_H_POS(a1); //??<3F><>?<3F><>??
d1 = ATR_V_POS(a1);
radar2(a0, d0, d1, 2); //????
//??<3F><>??????
d0 = ATR_CRS(a0) - ATR_CRS_OLD(a0);
if (d0 < 0)
d0 = 0 - d0;
if (d0 >= 2)
{
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CRS_OLD(a0) = ATR_CRS(a0);
}
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 57: //?<3F><>??????
if (ATR_FIRST_FLG(a0) == 0) //???????
{
ATR_SPD(a0) = 16;
if (ATR_LIFE(a0) <= 0)
{ //??????
if (ATR_GROUP_FLG(a0) == 0) //????????
//<2F><>????
ATR_CRS(a0) = crs_change_tbl2[7];
else
ATR_CRS(a0) = crs_change_tbl2[3];
}
else
{
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 7;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 3;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 1;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 5;
#endif
ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
}
//????????????<3F>V??
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
gemini(a0); //?<3F>h
//????????????<3F>V??
if (ATR_LIFE(a0) > 0) //<2F><>?????
{
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, 1, ANM_LOOP);
}
if (ATR_H_POS(a0) > lpDraw->xSize + SCREEN_OUT || ATR_H_POS(a0) < 0 - SCREEN_OUT) //?<3F><>???
{
ATR_NAME(a0) = NULL;
ATR_ATTRIB(a0) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_VCT_NO(a0) = VCT_NO_APPEAR;
//??????????????????????????????????????????????
if (check_all_dead())
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //??<3F><>?
if (ATR_COUNTER(p_master) == ATR_BODY_WORK(0, a0)) //<2F><><EFBFBD><EFBFBD>???<3F><>?????
{
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_BATTLE_MODEL(a0) != ATT_BATTLE_MODEL)
#endif
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //??<3F><>?
}
if (ATR_COUNTER(p_master) == a0) //<2F><><EFBFBD><EFBFBD>?????
{
#ifdef _PETSKILL_BATTLE_MODEL
if (ATR_BATTLE_MODEL(a0) != ATT_BATTLE_MODEL)
#endif
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //??<3F><>?
}
}
break;
case 60: //?????
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
a1 = ATR_BODY_WORK(0, a0); //??<3F><>??????
set_damage_num(a1, 10, -64); //??<3F><><EFBFBD><EFBFBD>
ATR_STIMER(a0) = 40;
play_se(216, ATR_H_POS(a0), 240); //??????
if (ATR_GROUP_FLG(a1) == 0)
ATR_CHR_ANG(a1) = 3;
else if (ATR_GROUP_FLG(a1) == 1)
ATR_CHR_ANG(a1) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a1) == 2)
ATR_CHR_ANG(a1) = 5;
else if (ATR_GROUP_FLG(a1) == 3)
ATR_CHR_ANG(a1) = 1;
#endif
ATR_CRS_OLD(a1) = ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
//????
if (!--ATR_STIMER(a0))
{
ATR_FIRST_FLG(a0) = 0; //??????
ATR_VCT_NO(a0)++; //??
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 61: //?????
a1 = ATR_BODY_WORK(0, a0); //??<3F><>??????
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_SPD(a0) = 12;
if (ATR_LIFE(a0) > 0)
{ //<2F><>?????
d0 = ATR_INT_WORK0(a1);
d1 = ATR_INT_WORK1(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
}
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
d0 = ATR_INT_WORK0(a1);
d1 = ATR_INT_WORK1(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
gemini(a0); //?<3F>h
if (d1 <= (ATR_SPD(a0) >> 2))
{ //????
//???<3F><>?
ATR_ATTRIB(a0) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_NAME(a0) = NULL;
ATR_VCT_NO(a0) = VCT_NO_APPEAR;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //??<3F><>?
break;
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 62: //???<3F><>?
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
a1 = ATR_BODY_WORK(0, a0); //??<3F><>??????
set_damage_num(a1, 11, -64); //??<3F><><EFBFBD><EFBFBD>
if (ATR_GROUP_FLG(a1) == 0)
ATR_CHR_ANG(a1) = 3;
else if (ATR_GROUP_FLG(a1) == 1)
ATR_CHR_ANG(a1) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a1) == 2)
ATR_CHR_ANG(a1) = 5;
else if (ATR_GROUP_FLG(a1) == 3)
ATR_CHR_ANG(a1) = 1;
#endif
ATR_CRS_OLD(a1) = ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
ATR_STIMER(a0) = 40;
//???<3F>k?<3F><>???
ATR_CHR_NO(a0) = get_num();
//???<3F><>???
ATR_LEVEL(a0) = get_num();
//??<3F><>???
ATR_LIFE(a0) = get_num();
//<2F><><EFBFBD>q<EFBFBD><71>???
get_name(a0);
//?<3F><>??<3F><>???
ATR_MAX_LIFE(a0) = get_num();
//??<3F><>??????
a1 = ATR_BODY_WORK(0, a0);
//?<3F><>???
ATR_H_POS(a0) = ATR_H_POS(a1);
ATR_V_POS(a0) = ATR_V_POS(a1) - 1;
//<2F><><EFBFBD><EFBFBD>??
ATR_ATTRIB(a0) &= ~ACT_ATR_HIDE;
ATR_SPD(a0) = 12;
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
ATR_CHR_ACT_OLD(a0) = -1;
ATR_AKO_FLG(a0) = 0; //?????????
ATR_ATTACK_KIND(2, a0) = 0;
ATR_STATUS(a0) = 0; //??????<3F><>???
play_se(216, ATR_H_POS(a0), 240); //??????
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
//????
if (!--ATR_STIMER(a0))
{
ATR_FIRST_FLG(a0) = 0; //??????
ATR_VCT_NO(a0)++; //??
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 63: //???<3F><>?
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
gemini(a0); //?<3F>h
if (d1 <= (ATR_SPD(a0) >> 2))
{ //????
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
ATR_H_POS(a0) = ATR_INT_WORK0(a0); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_INT_WORK1(a0);
ATR_VCT_NO(a0) = 0; //<2F>r??
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //??<3F><>????
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 64: //<2F><><EFBFBD><EFBFBD>????<3F><>?<3F>r?
a1 = ATR_BODY_WORK(1, a0); //??<3F><>???
//??<3F><>???<3F><>?????
if (ATR_VCT_NO(a1) != 2)
{
ATR_VCT_NO(a0) = 13; //??????<3F>r?
ATR_STIMER(a0) = 30;
}
break;
case 65: //<2F><><EFBFBD><EFBFBD>????
break;
case 66: //<2F><><EFBFBD><EFBFBD>???<3F>h
a1 = ATR_BODY_WORK(0, a0); //??<3F><>??????
if (ATR_FIRST_FLG(a0) == 0) //???????
{
ATR_SPD(a0) = 28;
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
d0 = ATR_INT_WORK0(a1);
d1 = ATR_INT_WORK1(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
gemini(a0); //?<3F>h
if (d1 <= (ATR_SPD(a0) >> 1)) //????
{
//??<3F>祆?<3F><>??
ATR_VCT_NO(a1) = 67;
ATR_CRS(a1) = ATR_CRS(a0); //??<3F><>?<3F><>????
ATR_SPD(a1) = 40;
ATR_STIMER(a1) = 8;
//??<3F>Ԩ<EFBFBD>?
#ifdef _PETSKILL_BATTLE_MODEL
// <20><><EFBFBD>DZ<EFBFBD><C7B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_BATTLE_MODEL(a1) == ATT_BATTLE_MODEL)
a1 = ATR_BODY_WORK(1, a1); // <20><> ATR_BODY_WORK(1,a1) ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> action
else
#endif
a1 = ATR_COUNTER(p_master);
ATR_BODY_WORK(0, a1) = a0; //<2F><>????<3F><>?
//???????<3F>_<EFBFBD><5F>
ATR_VCT_NO(a0) = 65;
//????
play_se(5, ATR_H_POS(a0), 240);
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 67: //<2F><>?<3F><>?????
gemini(a0); //??????
ATR_CRS(a0) = (ATR_CRS(a0) + 16) & 31;
if (--ATR_STIMER(a0)) //??<3F>r???
break;
ATR_VCT_NO(a0) = 68;
//????
#ifdef _PETSKILL_BATTLE_MODEL
// <20><><EFBFBD>DZ<EFBFBD><C7B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_BATTLE_MODEL(a0) == ATT_BATTLE_MODEL)
a1 = ATR_BODY_WORK(1, a0); // <20><> ATR_BODY_WORK(1, a0) ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> action
else
#endif
a1 = ATR_COUNTER(p_master); //??<3F><>???????
ATR_VCT_NO(a1) = 2;
break;
case 68: //<2F><>?<3F><>?????
gemini(a0); //?<3F>h
ATR_SPD(a0) -= 2;
if (ATR_SPD(a0) < 0) //??????<3F><>???
{
ATR_SPD(a0) = 10;
ATR_VCT_NO(a0) = 64; //<2F><><EFBFBD><EFBFBD>????<3F><>?<3F>r??
}
break;
case 69: //??????<3F><><EFBFBD><EFBFBD>
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
a1 = ATR_BODY_WORK(0, a0); //??<3F><>??????
d0 = ATR_INT_WORK0(a1);
d1 = ATR_INT_WORK1(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
//??<3F><><EFBFBD><EFBFBD>
set_damage_num(a0, 13, -64);
ATR_STIMER(a0) = 35;
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
if (--ATR_STIMER(a0)) //??<3F>r???
break;
ATR_VCT_NO(a0) = 66; //<2F><><EFBFBD><EFBFBD>??<3F>h?
ATR_FIRST_FLG(a0) = 0; //??????
break;
case 70: //???????
if (ATR_FIRST_FLG(a0) == 0) //???????
{
int d2;
d1 = command_point; //?????????<3F>~<7E><>
d0 = get_num(); //<2F><><EFBFBD><EFBFBD>?<3F><>?
command_point = d1; //???????????
d0 /= 5;
if (ATR_GROUP_FLG(a0) == 0) //????????
{
d1 = boomerang_pos_tbl[d0 * 2];
d2 = boomerang_pos_tbl[d0 * 2 + 1];
}
else
{
//?<3F><>?????<3F>q???
if (ATR_PLACE_NO(a0) >= 15)
{
d1 = boomerang_pos_tbl3b[d0 * 2];
d2 = boomerang_pos_tbl3b[d0 * 2 + 1];
}
else
{
d1 = boomerang_pos_tbl3a[d0 * 2];
d2 = boomerang_pos_tbl3a[d0 * 2 + 1];
}
}
radar(a0, &d1, &d2); //????
ATR_CRS_OLD(a0) = ATR_CRS(a0) = d1;
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
#if 0
ATR_CHR_ACT(a0) = ANIM_THROW; //?????????
#else
if (ATR_LONG_WORK(0, a0) == 0) //?????
ATR_CHR_ACT(a0) = ANIM_ATTACK; //?????????
else
ATR_CHR_ACT(a0) = ANIM_THROW; //?????????
#endif
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
ATR_HIT(a0) = 0; //?????????
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP)) //?????<3F><>???
{
ATR_CHR_ACT_OLD(a0) = -1;
ATR_VCT_NO(a0) = 71; //?????????
break;
}
//???????
//?????<3F>D<EFBFBD><44>????
if(ATR_HIT(a0) >= 10000 && ATR_HIT(a0) < 10100)
{
//????????
a1 = GetAction(T_PRIO_BOW, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
//??????<3F><>???
ATR_BODY_WORK(0, a0) = a1; //?????????
/* <20><>??? */
ATR_NAME(a1) = boomerang;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MISSILE;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = SPR_boomerang;//SPR_ono;//
/* ???<3F>t */
ATR_CHR_ANG(a1) = ATR_CHR_ANG(a0);
ATR_BODY_WORK(1, a1) = a0; //<2F>D<EFBFBD><44>?????
d1 = command_point; //?????????<3F>~<7E><>
d0 = get_num(); //<2F><><EFBFBD><EFBFBD>?<3F><>?
command_point = d1; //???????????
//?<3F>k????
ATR_LONG_WORK(0, a1) = d0 / 5;
//?<3F><>?<3F>T???
if (ATR_GROUP_FLG(a0) == 0)
{
if (ATR_LONG_WORK(0, a1) <= 1)
ATR_LONG_WORK(1, a1) = 1;
else
ATR_LONG_WORK(1, a1) = 2;
}
else
{
if (ATR_LONG_WORK(0, a1) <= 1)
ATR_LONG_WORK(1, a1) = 2;
else
ATR_LONG_WORK(1, a1) = 1;
}
ATR_GROUP_FLG(a1) = ATR_GROUP_FLG(a0);
ATR_PLACE_NO(a1) = ATR_PLACE_NO(a0);
ATR_H_POS(a1) = ATR_H_POS(a0);
ATR_V_POS(a1) = ATR_V_POS(a0);
ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
ATR_SPD(a1) = 32;
gemini(a1);
gemini(a1);
gemini(a1);
p_missile[0] = a1;
p_missile[1] = NULL;
}
break;
case 71: //????????
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
a1 = ATR_BODY_WORK(0, a0); //????????????
//?<3F><><EFBFBD><EFBFBD>??
d0 = ATR_H_POS(a1); //<2F><>?<3F><>??
d1 = ATR_V_POS(a1);
radar2(a0, d0, d1, 2); //????
//??<3F><>??????
d0 = ATR_CRS(a0) - ATR_CRS_OLD(a0);
if (d0 < 0)
d0 = 0 - d0;
if (d0 >= 2)
{
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CRS_OLD(a0) = ATR_CRS(a0);
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 72: //??????<3F><>?<3F><>?
ATR_CHR_ACT(a0) = ANIM_HAND; //<2F><>?<3F><>????????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
ATR_VCT_NO(a0) = 73; //??????<3F><>?<3F><>???
ATR_STIMER(a0) = 16;
break;
case 73: //??????<3F><>?<3F><>??
if (!(--ATR_STIMER(a0))) //<2F><>???
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>_<EFBFBD><5F>?
}
break;
case 75: //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
//<2F><><EFBFBD><EFBFBD>?????<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
/* <20><>??? */
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = 76;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_HIT_MARK;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = get_num(); //?????????
#ifdef _VARY_WOLF
if (ATR_CHR_NO(a1) == 101120)
ATR_DISP_PRIO(a1) = ATR_DISP_PRIO(a0) - 1;
#endif
#ifdef _PROFESSION_ADDSKILL
if ( !g_bUseAlpha ){
if ( ATR_CHR_NO(a1) == 101769 || ATR_CHR_NO(a1) == 101772 || ATR_CHR_NO(a1) == 101773 )
ATR_CHR_NO(a1) += 55;
if ( ATR_CHR_NO(a1) == 101802 || ATR_CHR_NO(a1) == 101803 || ATR_CHR_NO(a1) == 101804 )
ATR_CHR_NO(a1) += 53;
}
#endif
/* ???<3F>t */
LoadBmp(ATR_PAT_NO(a0));
//??<3F><>?????
#ifndef __CARYTEST
ATR_INT_WORK0(a1) = a0->anim_y + SpriteInfo[ATR_PAT_NO(a0)].height / 2;
#else
ATR_INT_WORK0(a1) = a0->anim_y + g_lpRealAdrn[ATR_PAT_NO(a0)].height / 2;
#endif
//???????????
ATR_BODY_WORK(0, a1) = a0;
ATR_V_POS(a1) = ATR_V_POS(a0) + ATR_INT_WORK0(a1);
ATR_H_POS(a1) = ATR_H_POS(a0);
//<2F>r??
ATR_VCT_NO(a0) = 0;
ATR_CHR_ACT_OLD(a0) = -1;
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP); //???
break;
case 76: //?<3F><>?<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
//<2F><><EFBFBD><EFBFBD>?<3F>t
a1 = ATR_BODY_WORK(0, a0);
ATR_V_POS(a0) = ATR_V_POS(a1) + ATR_INT_WORK0(a0);
//?<3F><>??<3F><>??????
if (ATR_CHR_NO(a0) == SPR_effect01)
d0 = pattern(a0, 5, ANM_NO_LOOP);
else
d0 = pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP);
if (d0)
{ //???<3F><>???
DeathAction(a0); //<2F><>?
d0 = get_num(); //?????????
d6 = 0; //<2F><>?????????
#ifdef _VARY_WOLF
if (d0 >= 101429 && d0 <= 101436)
a1->anim_chr_no = 0;
#endif
#ifdef _PROFESSION_ADDSKILL
if (!g_bUseAlpha)
{
if (d0 == 101769 || d0 == 101772 || d0 == 101773)
d0 += 55;
if (d0 == 101802 || d0 == 101803 || d0 == 101804)
d0 += 53;
}
#endif
while (1)
{
d1 = get_num(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԧk?<3F><>?<3F><>?
if (d1 == 255)
{ //<2F><>???
if (d6 == 0) //?<3F><>??
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
break;
}
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
return;
}
//<2F><>??<3F><><EFBFBD><EFBFBD>?????<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
if (d1 < 0 || d1 >= BATTLKPKPLYAERNUM)
{
return;
}
a2 = p_party[d1]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>??????????
ATR_DISP_PRIO(a1) = D_PRIO_HIT_MARK;
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = 77;
ATR_CHR_NO(a1) = d0; //??????
/* ???<3F>t */
LoadBmp(ATR_PAT_NO(a2));
//??<3F><>?????
#ifndef __CARYTEST
ATR_INT_WORK0(a1) = a2->anim_y + SpriteInfo[ATR_PAT_NO(a2)].height / 2;
#else
ATR_INT_WORK0(a1) = a2->anim_y + g_lpRealAdrn[ATR_PAT_NO(a2)].height / 2;
#endif
//???????????
ATR_BODY_WORK(0, a1) = a2;
ATR_V_POS(a1) = ATR_V_POS(a2) + ATR_INT_WORK0(a1);
ATR_H_POS(a1) = ATR_H_POS(a2);
d6++; //<2F><>???????<3F><>
}
return;
}
break;
case 77: //?<3F><>?<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
//<2F><><EFBFBD><EFBFBD>?<3F>t
a1 = ATR_BODY_WORK(0, a0);
ATR_V_POS(a0) = ATR_V_POS(a1) + ATR_INT_WORK0(a0);
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //???<3F><>???
DeathAction(a0); //<2F><>?
#ifdef _VARY_WOLF
if (a0->anim_chr_no_bak >= 101429 && a0->anim_chr_no_bak <= 101436)
a1->anim_chr_no = 101428;
#endif
#ifdef _PETSKILL_EVOLUTION
if ( a0->anim_chr_no_bak==101863 ){ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ֱ<EFBFBD>ӱ<EFBFBD><D3B1><EFBFBD>
if( a1->anim_chr_no == 102009 )
a1->anim_chr_no = 102011;
else if( a1->anim_chr_no == 102010 )
a1->anim_chr_no = 102012;
}
#endif
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
return;
}
break;
case 78: //???????
ATR_FIRST_FLG(a0)++;
if (ATR_FIRST_FLG(a0) == 60)
{
ATR_FIRST_FLG(a0) = 0;
if (ATR_LIFE(a0) <= 0)
{ //??????
ATR_VCT_NO(a0) = VCT_NO_DIE + 1; //?<3F><>?
slow_flg--; //?????
}
else
ATR_VCT_NO(a0) = 0;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
}
break;
case 79: //?<3F><><EFBFBD>r?
ATR_LONG_WORK(0, a0)++;
if (ATR_LONG_WORK(0, a0) == 60)
{
ATR_VCT_NO(a0) = 0;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP); //???
break;
case 80: //<2F><>??<3F><>
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 7;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 3;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 1;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 5;
#endif
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
ATR_SPD(a0) = 32;
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
gemini(a0); //?<3F>h
if (ATR_H_POS(a0) > lpDraw->xSize + SCREEN_OUT || ATR_H_POS(a0) < 0 - SCREEN_OUT)
{ //?<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>_<EFBFBD><5F>?
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP); //???
break;
case 82: //??<3F><>?
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 7;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 3;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 1;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 5;
#endif
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
ATR_CHR_ACT(a0) = ANIM_SIT; //?????????
ATR_CHR_ACT_OLD(a0) = -1;
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP); //???
ATR_STIMER(a0) = 60;
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
if (!--ATR_STIMER(a0))
{ //<2F><>???
ATR_CHR_NO(a0) = get_num();
ATR_CHR_ACT_OLD(a0) = -1;
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
ATR_CHR_ACT(a0) = ANIM_STAND;
ATR_CHR_ACT_OLD(a0) = -1;
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP); //???
ATR_VCT_NO(a0) = 0;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
}
break;
case 85: //?????<3F>N<EFBFBD>ͨ<EFBFBD>?
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
//<2F><><EFBFBD><EFBFBD>?????<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>r??
return;
}
/* <20><>??? */
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = 86;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_HIT_MARK;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = SPR_effect01;
/* ???<3F>t */
LoadBmp(ATR_PAT_NO(a0));
//??<3F><>?????
#ifndef __CARYTEST
ATR_INT_WORK0(a1) = a0->anim_y + SpriteInfo[ATR_PAT_NO(a0)].height / 2;
#else
ATR_INT_WORK0(a1) = a0->anim_y + g_lpRealAdrn[ATR_PAT_NO(a0)].height / 2;
#endif
//???????????
ATR_BODY_WORK(0, a1) = a0;
ATR_V_POS(a1) = ATR_V_POS(a0) + ATR_INT_WORK0(a1);
ATR_H_POS(a1) = ATR_H_POS(a0);
//<2F>r??
ATR_VCT_NO(a0) = 0;
ATR_CHR_ACT_OLD(a0) = -1;
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP); //???
break;
case 86: //?????<3F>N<EFBFBD>ͨ<EFBFBD>??<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
//?<3F><>??<3F><>??????
if (ATR_CHR_NO(a0) == SPR_effect01)
d0 = pattern(a0, 5, ANM_NO_LOOP);
else
d0 = pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP);
if (d0)
{ //???<3F><>???
//<2F>N<EFBFBD>ͨ<EFBFBD>?
ATR_ATTRIB(p_master) = get_num(); //<2F>N<EFBFBD><4E><EFBFBD><EFBFBD>?<3F><>?
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>
DeathAction(a0); //<2F><>?
return;
}
break;
case 87: //???<3F>`??<3F>q
ATR_SPD(a0) = 32; //?<3F>h<EFBFBD>L<EFBFBD>Tspeed
a1 = p_party[ATR_PLACE_NO(a0) - 5]; //<2F><>?<3F><>???//<2F>з<EFBFBD>
d0 = ATR_H_POS(a1);//y
d1 = ATR_V_POS(a1);//x
radar(a0, &d0, &d1); //????//d0:course1 d1:distance
ATR_CRS(a0) = d0; //??????
//??<3F><>??????
d0 = ATR_CRS(a0) - ATR_CRS_OLD(a0);
if (d0 < 0)
d0 = 0 - d0;
if (d0 >= 2)
{
#ifdef _SKILL_ROAR //<2F>輼:<3A><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD>
#else
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CRS_OLD(a0) = ATR_CRS(a0);
#endif
}
if (d1 <= 32 * 2)
{ //????
ATR_FIRST_FLG(a0) = 0; //????????
ATR_VCT_NO(a0) = 88; //???<3F>`???
}
else
gemini(a0); //?<3F>h
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 88: //???<3F>`??
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_STIMER(a0) = 40;
#ifdef _SKILL_ROAR //<2F>輼:<3A><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD>
//?<3F>h<EFBFBD>L<EFBFBD>T???
ATR_SPD(a0) = 60;
ATR_CHR_ACT(a0) = ANIM_DAMAGE; //<2F>_<EFBFBD><5F>???????
#else
//?<3F>h<EFBFBD>L<EFBFBD>T???
ATR_SPD(a0) = 40;
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
#endif
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
//?<3F>h?<3F><>??
if (!ATR_STIMER(a0)--)
{
ATR_VCT_NO(a0) = 89; //???<3F>`????
ATR_STIMER(a0) = 40;
//???<3F>`?<3F><><EFBFBD><EFBFBD>
set_damage_num(a0, 17, -64);
#ifdef _SKILL_ROAR //<2F>輼:<3A><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD>
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 7;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 3;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 1;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 5;
#endif
#else
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
#endif
//<2F><>????
ATR_CRS_OLD(a0) = ATR_CRS(a0) = (crs_change_tbl2[ATR_CHR_ANG(a0)]) & 31;
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 89: //???<3F>`???
if (ATR_STIMER(a0))
{
ATR_STIMER(a0)--;
break;
}
gemini(a0);
if (ATR_H_POS(a0) > lpDraw->xSize + SCREEN_OUT || ATR_H_POS(a0) < 0 - SCREEN_OUT)
{ //?<3F><>???
ATR_NAME(a0) = NULL;
ATR_ATTRIB(a0) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_VCT_NO(a0) = VCT_NO_APPEAR;
ATR_DAMAGE(p_master)++; //<2F>D<EFBFBD><44>?<3F><>
//<2F><><EFBFBD><EFBFBD>??????
if (BattleMyNo + 5 == ATR_PLACE_NO(a0))
{
// ??????<3F><>??????
if (att_select_flg == TRUE)
{
//????
pc.selectPetNo[pc.battlePetNo] = FALSE;
pc.battlePetNo = -1;
}
else
{
// <20>i?????
if (battlePetNoBak2 == pc.battlePetNo)
{
//????
pc.selectPetNo[pc.battlePetNo] = FALSE;
pc.battlePetNo = -1;
}
else
//????
pc.selectPetNo[battlePetNoBak2] = FALSE;
}
}
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, 1, ANM_LOOP);
break;
case 90: //????<3F>r
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
//????<3F>r<EFBFBD><72><EFBFBD><EFBFBD>
set_damage_num(a0, 18, -64);
ATR_STIMER(a0) = 0; //????????
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
//<2F><>?<3F><>?<3F><>?
d0 = pet_nix_tbl[ATR_STIMER(a0)++];
if (d0 == -2)
{ //<2F><>???
ATR_VCT_NO(a0) = 0; //<2F>_<EFBFBD><5F>?
ATR_DAMAGE(p_master)++; //<2F>D<EFBFBD><44>?<3F><>
break;
}
ATR_CHR_ANG(a0) = (ATR_CHR_ANG(a0) + d0) & 7; //??<3F><>?
pattern(a0, 1, ANM_LOOP);
break;
case 95: //<2F>s?????<3F><>
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_LONG_WORK(0, a0) = get_num(); //<2F><>?<3F><>???
ATR_LONG_WORK(1, a0) = get_num(); //<2F><>???????
a1 = ATR_BODY_WORK(0, a0) = p_party[ATR_LONG_WORK(0, a0)]; //<2F><>?<3F><>???
d0 = ATR_INT_WORK0(a1);
d1 = ATR_INT_WORK1(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
ATR_SPD(a0) = 32; //?<3F>h<EFBFBD>L<EFBFBD>T
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
gemini(a0);
if (d1 <= 32 * 2)
{ //????
ATR_VCT_NO(a0) = 96; //<2F>s????<3F><>??
if (ATR_LONG_WORK(1, a0))
{ //<2F><>???
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????<3F>_<EFBFBD><5F>
ATR_VCT_NO(a1) = 98; //
ATR_SPD(a1) = ATR_SPD(a0);
ATR_CRS(a1) = ATR_CRS(a0);
}
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 96: //<2F>s????<3F><>?
gemini(a0);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
if (ATR_H_POS(a0) > lpDraw->xSize + SCREEN_OUT || ATR_H_POS(a0) < 0 - SCREEN_OUT //?<3F><>???
|| ATR_V_POS(a0) > lpDraw->ySize + SCREEN_OUT || ATR_V_POS(a0) < 0 - SCREEN_OUT)
{ //?<3F><>???
ATR_NAME(a0) = NULL;
ATR_ATTRIB(a0) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_VCT_NO(a0) = VCT_NO_APPEAR;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>
//<2F><><EFBFBD><EFBFBD>??????
if (BattleMyNo + 5 == ATR_PLACE_NO(a0))
{
// ??????<3F><>??????
if (att_select_flg == TRUE)
{
//????
pc.selectPetNo[pc.battlePetNo] = FALSE;
pc.battlePetNo = -1;
}
else
{
// <20>i?????
if (battlePetNoBak2 == pc.battlePetNo)
{
//????
pc.selectPetNo[pc.battlePetNo] = FALSE;
pc.battlePetNo = -1;
}
else
//????
pc.selectPetNo[battlePetNoBak2] = FALSE;
}
}
if (ATR_LONG_WORK(1, a0))
{ //<2F><>???
a1 = ATR_BODY_WORK(0, a0); //<2F><>?????
ATR_NAME(a1) = NULL;
ATR_ATTRIB(a1) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
//<2F><><EFBFBD><EFBFBD>??????
if (BattleMyNo + 5 == ATR_LONG_WORK(0, a0))
{
// ??????<3F><>??????
if (att_select_flg == TRUE)
{
//????
pc.selectPetNo[pc.battlePetNo] = FALSE;
pc.battlePetNo = -1;
}
else
{
// <20>i?????
if (battlePetNoBak2 == pc.battlePetNo)
{
//????
pc.selectPetNo[pc.battlePetNo] = FALSE;
pc.battlePetNo = -1;
}
else
//????
pc.selectPetNo[battlePetNoBak2] = FALSE;
}
}
}
}
break;
case 98: //<2F>s????<3F><>????????<3F>_<EFBFBD><5F>
gemini(a0);
break;
case 100: //?????<3F><>
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_LONG_WORK(0, a0) = get_num(); //<2F><>?<3F><>???
ATR_LONG_WORK(1, a0) = get_num(); //<2F><>???????
a1 = ATR_BODY_WORK(0, a0) = p_party[ATR_LONG_WORK(0, a0)]; //<2F><>?<3F><>???
d0 = ATR_INT_WORK0(a1);
d1 = ATR_INT_WORK1(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
ATR_CHR_ANG(a0) = crs_change_tbl[ATR_CRS(a0)]; /* ????? */
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
ATR_SPD(a0) = 32; //?<3F>h<EFBFBD>L<EFBFBD>T
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
a1 = ATR_BODY_WORK(0, a0); //<2F><>????????
d0 = ATR_H_POS(a1);
d1 = ATR_V_POS(a1);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
gemini(a0);
if (d1 <= 32 * 2)
{ //????
ATR_VCT_NO(a0) = 101; //?????
ATR_FIRST_FLG(a0) = 0; //???????
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 101: //????
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_CHR_ACT(a0) = ANIM_ATTACK; //?????????
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //?????<3F><>???
ATR_CHR_ACT_OLD(a0) = -1;
ATR_VCT_NO(a0) = 102; //????<3F>r??
ATR_FIRST_FLG(a0) = 0; //???????
}
break;
case 102: //????<3F>r?
if (ATR_FIRST_FLG(a0) == 0)
{ //???????
ATR_STIMER(a0) = 30; //<2F><>?????
if (ATR_LONG_WORK(1, a0)) //<2F><>???
//<2F><>?<3F><><EFBFBD><EFBFBD>
set_damage_num(a0, 7, -64);
else
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
set_damage_num(a0, 8, -64);
ATR_FIRST_FLG(a0) = 1; //?????<3F><>?
}
ATR_STIMER(a0)--;
if (ATR_STIMER(a0) == 0)
{ //<2F><>???
if (ATR_LONG_WORK(1, a0))
{ //<2F><>???
ATR_VCT_NO(a0) = 103; //<2F>`??<3F><>??
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 7;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 3;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 1;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 5;
#endif
//<2F><>????
ATR_CRS_OLD(a0) = ATR_CRS(a0) = (crs_change_tbl2[ATR_CHR_ANG(a0)]) & 31;
a1 = ATR_BODY_WORK(0, a0); //?????????
ATR_VCT_NO(a1) = 104;
}
else
{
d0 = ATR_INT_WORK0(a0); //<2F><>???
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CHR_ANG(a0) = crs_change_tbl[d0];
ATR_SPD(a0) = 32;
ATR_VCT_NO(a0) = 4; //?<3F>~?
}
}
break;
case 103: //<2F>`??<3F><>?
gemini(a0);
if (ATR_H_POS(a0) > lpDraw->xSize + SCREEN_OUT || ATR_H_POS(a0) < 0 - SCREEN_OUT)
{ //?<3F><>???
ATR_NAME(a0) = NULL;
ATR_ATTRIB(a0) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
ATR_VCT_NO(a0) = VCT_NO_APPEAR;
ATR_DAMAGE(p_master)++; //<2F>D<EFBFBD><44>?<3F><>
a1 = ATR_BODY_WORK(0, a0); //?????<3F>_<EFBFBD><5F>?
ATR_VCT_NO(a1) = 0;
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, 1, ANM_LOOP);
break;
case 104: //<2F>`?????
ATR_CHR_ACT(a0) = ANIM_ANGRY; //<2F><>????????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case 105: //??<3F>r?
if (!--ATR_STIMER(a0))
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>
ATR_VCT_NO(a0) = 0; //<2F>_<EFBFBD><5F>?
}
break;
case 110: //????
if (!--ATR_STIMER(a0))
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>
ATR_VCT_NO(a0) = 0; //<2F>_<EFBFBD><5F>?
}
break;
#ifdef _SKILL_SELFEXPLODE //<2F>Ա<EFBFBD>
case 114: //<2F>Ա<EFBFBD>
ATR_SPD(a0) = 63;
ATR_ATTRIB(a0) |= ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
gemini(a0); //?<3F>h
if (ATR_H_POS(a0) > lpDraw->xSize + SCREEN_OUT || ATR_H_POS(a0) < 0 - SCREEN_OUT)
{ //?<3F><>???
ATR_VCT_NO(a0) = 0; //<2F>_<EFBFBD><5F>?
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master); //???<3F><>???
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
#endif
//249:
case VCT_NO_APPEAR: //<2F>K<EFBFBD><4B>
if (ATR_GROUP_FLG(a0) == 0)
ATR_CHR_ANG(a0) = 3;
else if (ATR_GROUP_FLG(a0) == 1)
ATR_CHR_ANG(a0) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a0) == 2)
ATR_CHR_ANG(a0) = 5;
else if (ATR_GROUP_FLG(a0) == 3)
ATR_CHR_ANG(a0) = 1;
#endif
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
ATR_SPD(a0) = 12;
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
gemini(a0); //?<3F>h
if (d1 <= (ATR_SPD(a0) >> 2) || ATR_CHR_NO(a0) == 101490)
{ //????
ATR_H_POS(a0) = ATR_INT_WORK0(a0); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_INT_WORK1(a0);
ATR_VCT_NO(a0) = 0; //<2F>r??
ATR_CHR_ACT(a0) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
ATR_SPD(a0) = 32;
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
}
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case VCT_NO_DIE: //?<3F><>
ATR_SPD(a0) = 4;
d0 = ATR_INT_WORK0(a0);
d1 = ATR_INT_WORK1(a0);
radar(a0, &d0, &d1); //????
ATR_CRS(a0) = d0; //??????
gemini(a0); //?<3F>h
if (d1 <= (ATR_SPD(a0) >> 2))
{ //????
ATR_H_POS(a0) = ATR_INT_WORK0(a0); //?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_INT_WORK1(a0);
ATR_VCT_NO(a0) = VCT_NO_DIE + 1; //?<3F><>????
}
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
if (s_timer & 1)
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case VCT_NO_DIE + 1: //?<3F><>
ATR_CHR_ACT(a0) = ANIM_DEAD; //?<3F><>???????
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //???<3F><>???
#ifdef __NEW_BATTLE_EFFECT
int effect = ATR_EFFECT_FLAG(a0);
int effect_anim = ATR_EFFECT_ANIM(a0);
switch (effect)
{
case 1: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
if (a1 == NULL)
{
ATR_EFFECT_FLAG(a0) = 0;
ATR_EFFECT_ANIM(a0) = 0;
ATR_EFFECT_PARAM(a0) = 0;
return;
}
//<2F><>??<3F><><EFBFBD><EFBFBD>?????<3F>Ҥ<EFBFBD><D2A4><EFBFBD>
ATR_DISP_PRIO(a1) = D_PRIO_HIT_MARK;
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = VCT_NO_EFFECT;
ATR_CHR_NO(a1) = effect_anim; //??????
/* ???<3F>t */
LoadBmp(ATR_PAT_NO(a0));
//??<3F><>?????
#ifndef __CARYTEST
ATR_INT_WORK0(a1) = a0->anim_y + SpriteInfo[ATR_PAT_NO(a0)].height / 2;
#else
ATR_INT_WORK0(a1) = a0->anim_y + g_lpRealAdrn[ATR_PAT_NO(a0)].height / 2;
#endif
//???????????
ATR_BODY_WORK(0, a1) = a0;
ATR_V_POS(a1) = ATR_V_POS(a0) + ATR_INT_WORK0(a1);
ATR_H_POS(a1) = ATR_H_POS(a0);
break;
}
#endif
ATR_VCT_NO(a0) = VCT_NO_DIE + 2; //?<3F><>?
//????<3F><><EFBFBD><EFBFBD>
set_piyo_loop(a0);
//?????
play_se(6, ATR_H_POS(a0), 240);
}
break;
case VCT_NO_DIE + 2: //?<3F><>
break;
#ifdef __NEW_BATTLE_EFFECT
// case VCT_NO_PAUSE:
// break;
case VCT_NO_EFFECT:
{
a1 = ATR_BODY_WORK(0, a0);
int effect = ATR_EFFECT_FLAG(a1);
switch (effect)
{
case 1: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_V_POS(a0) = ATR_V_POS(a1) + ATR_INT_WORK0(a0);
if (pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{ //???<3F><>???
//??<3F>k<EFBFBD><6B><EFBFBD><EFBFBD>
ATR_LIFE(a1) = ATR_EFFECT_PARAM(a1);
if (ATR_LIFE(a1) > ATR_MAX_LIFE(a1)) //?<3F><><EFBFBD><EFBFBD>???
ATR_LIFE(a1) = ATR_MAX_LIFE(a1); //?<3F><>???
ATR_VCT_NO(a1) = 0; //<2F>_<EFBFBD><5F>?
ATR_CHR_ACT(a1) = ANIM_STAND; //<2F>_<EFBFBD><5F>???????
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
ATR_EFFECT_FLAG(a1) = 0;
ATR_EFFECT_ANIM(a1) = 0;
ATR_EFFECT_PARAM(a1) = 0;
DeathAction(a0); //<2F><>?
ATR_DAMAGE(p_master)++;
}
return;
default:
ATR_EFFECT_FLAG(a1) = 0;
ATR_EFFECT_ANIM(a1) = 0;
ATR_EFFECT_PARAM(a1) = 0;
DeathAction(a0); //<2F><>?
ATR_DAMAGE(p_master)++;
break;
}
}
break;
#endif
#ifdef __ATTACK_MAGIC
// <20><><EFBFBD><EFBFBD>ǰ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
case ATTACK_MAGIC_CASE:
// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>
(0 == ATR_GROUP_FLG(a0)) ? ATR_CHR_ANG(a0) = 3 : ATR_CHR_ANG(a0) = 7;
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
if (0XFFFFFFFF != AttMgc.iPreMgcNum)
{
if (NULL == (a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU))))
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
ATR_VCT_NO(a0) = 0;
return;
}
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 1; // ǰ<>ö<EFBFBD><C3B6><EFBFBD>
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (AttMgc.iPreMgcNum == 101120)
ATR_DISP_PRIO(a1) = (1 == AttMgc.wPreMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
else
ATR_DISP_PRIO(a1) = ATR_DISP_PRIO(a0) + 1;
#else
ATR_DISP_PRIO(a1) = (1 == AttMgc.wPreMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
#endif
ATR_CHR_NO(a1) = AttMgc.iPreMgcNum;
ATR_BODY_WORK(0, a1) = a0;
ATR_H_POS(a1) = ATR_H_POS(a0) + AttMgc.wPreMgcX;
ATR_V_POS(a1) = ATR_V_POS(a0) + AttMgc.wPreMgcY;
}
ATR_VCT_NO(a0) = 0;
ATR_CHR_ACT_OLD(a0) = -1;
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
// ִ<><D6B4>ǰ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
case ATTACK_MAGIC_CASE + 1:
a1 = ATR_BODY_WORK(0, a0);
ATR_H_POS(a0) = ATR_H_POS(a1) + AttMgc.wPreMgcX;
ATR_V_POS(a0) = ATR_V_POS(a1) + AttMgc.wPreMgcY;
if (d0 = pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(a0);
AttMgc.wRunPreMgc = TRUE;
//ToCallMgc.wRunPreMgc = TRUE;
}
break;
// ִ<><D6B4>Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
case ATTACK_MAGIC_CASE + 2:
{
idx = ATR_LONG_WORK(0, a0);
// <20><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
if (20 != idx)
{
a1 = p_party[idx];
ATR_H_POS(a0) = ATR_H_POS(a1) + AttMgc.posAttacked[0].x;
ATR_V_POS(a0) = ATR_V_POS(a1) + AttMgc.posAttacked[0].y;
}
// <20><><EFBFBD>ž<EFBFBD><C5BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else
{
int value = 0;
// Ŀǰ<C4BF><C7B0><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>
if (2 == g_iRunEarthQuake)
value = piyo_tbl[(piyo_point + g_iCurRunEarthQuake) & 63] + 12;
ATR_V_POS(a0) = AttMgc.posAttacked[0].y + value;
}
if (d0 = pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(a0);
// <20><><EFBFBD><EFBFBD>û<EFBFBD>к<EFBFBD><D0BA>ö<EFBFBD><C3B6><EFBFBD>
if (0XFFFFFFFF == AttMgc.iPostMgcNum)
{
AttMgc.wNumAttackeds++;
if (20 == idx)
{
// wAttackedIndex[0] <20><><EFBFBD><EFBFBD> 20 -- <20><><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD><E5B9A5>
// wAttackedIndex[n] <20><><EFBFBD><EFBFBD>0XFF -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int i = 0, j, charahurt, pethurt;
while (++i && 0XFF != AttMgc.wAttackedIndex[i])
{
for (j = 0; j < iAttackedNum; j++)
{
if (AttMgc.wAttackedIndex[i] == AttackedInfo[j * 4])
{
a1 = p_party[AttackedInfo[j * 4 + 1]];
charahurt = AttackedInfo[j * 4 + 2];
pethurt = AttackedInfo[j * 4 + 3];
ATR_LONG_WORK(0, a1) = 0;
ATR_DAMAGE(a1) = charahurt;
ATR_PET_DAMAGE(a1) = pethurt;
if (charahurt == 0)
{
set_damage_num(a1, 0, -64);
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 5;
}
else
{
set_damage_num(a1, 6, -64);
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 4;
}
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
set_jujutsu_hit_mark(a1);
if (ATR_LIFE(a1) <= 0)
{
ATR_LIFE(a1) = 0;
slow_flg++;
}
ATR_PET_LIFE(a1) -= ATR_PET_DAMAGE(a1);
//andy_fall
if (ATR_PETFALL(a1) == 1)
{
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (ATR_PET_LIFE(a1) <= 0 && ATR_RIDE(a1))
{
ATR_PET_LIFE(a1) = 0;
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (charahurt == 0)
ATR_CHR_ACT(a1) = ANIM_STAND;
else
ATR_CHR_ACT(a1) = ANIM_DAMAGE;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
}
}
}
else
{
int j, charahurt, pethurt;
for (j = 0; j < iAttackedNum; j++)
{
if (idx == AttackedInfo[j * 4])
{
a1 = p_party[AttackedInfo[j * 4 + 1]];
charahurt = AttackedInfo[j * 4 + 2];
pethurt = AttackedInfo[j * 4 + 3];
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 4;
ATR_LONG_WORK(0, a1) = 0;
ATR_DAMAGE(a1) = charahurt;
ATR_PET_DAMAGE(a1) = pethurt;
if (charahurt == 0)
{
set_damage_num(a1, 0, -64);
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 5;
}
else
{
set_damage_num(a1, 6, -64);
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 4;
}
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
set_jujutsu_hit_mark(a1);
if (ATR_LIFE(a1) <= 0)
{
ATR_LIFE(a1) = 0;
slow_flg++;
}
ATR_PET_LIFE(a1) -= ATR_PET_DAMAGE(a1);
//andy_fall
if (ATR_PETFALL(a1) == 1)
{
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (ATR_PET_LIFE(a1) <= 0 && ATR_RIDE(a1))
{
ATR_PET_LIFE(a1) = 0;
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (charahurt == 0)
ATR_CHR_ACT(a1) = ANIM_STAND;
else
ATR_CHR_ACT(a1) = ANIM_DAMAGE;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
}
}
}
// ӵ<>к<EFBFBD><D0BA>ö<EFBFBD><C3B6><EFBFBD>
else
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĵ<D0B5><C4B5><EFBFBD>ʩ<EFBFBD><CAA9><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
if (20 == idx) // idx = wAttackedIndex[0]
{
// wAttackedIndex[0] <20><><EFBFBD><EFBFBD> 20 -- <20><><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD><E5B9A5>
// wAttackedIndex[n] <20><><EFBFBD><EFBFBD>0XFF -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int i = 0;
while (++i && 0XFF != AttMgc.wAttackedIndex[i])
{
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 3; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
ATR_DISP_PRIO(a1) = (1 == AttMgc.wPostMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
ATR_CHR_NO(a1) = AttMgc.iPostMgcNum;
ATR_LONG_WORK(0, a1) = AttMgc.wAttackedIndex[i];
ATR_H_POS(a1) = ATR_H_POS(p_party[AttMgc.wAttackedIndex[i]]) + AttMgc.wPostMgcX;
ATR_V_POS(a1) = ATR_V_POS(p_party[AttMgc.wAttackedIndex[i]]) + AttMgc.wPostMgcY;
}
}
// <20><><EFBFBD><EFBFBD>ijһ<C4B3><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʩ<EFBFBD><CAA9><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
else
{
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 3; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
ATR_DISP_PRIO(a1) = (1 == AttMgc.wPostMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
ATR_CHR_NO(a1) = AttMgc.iPostMgcNum;
ATR_LONG_WORK(0, a1) = idx;
ATR_H_POS(a1) = ATR_H_POS(p_party[idx]) + AttMgc.wPostMgcX;
ATR_V_POS(a1) = ATR_V_POS(p_party[idx]) + AttMgc.wPostMgcY;
}
}
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĶ<D0B5><C4B6><EFBFBD><EFBFBD><EFBFBD>
if (AttMgc.wNumAttackeds == AttMgc.wNumAttacks && 0 == iAttackedNum)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
bRunAttMgc = FALSE;
g_iRunEarthQuake = 0;
}
break;
}
// ִ<>к<EFBFBD><D0BA>ö<EFBFBD><C3B6><EFBFBD>
case ATTACK_MAGIC_CASE + 3:
idx = ATR_LONG_WORK(0, a0);
a1 = p_party[idx];
ATR_H_POS(a0) = ATR_H_POS(a1) + AttMgc.wPostMgcX;
ATR_V_POS(a0) = ATR_V_POS(a1) + AttMgc.wPostMgcY;
if (d0 = pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(a0);
AttMgc.wNumAttackeds++;
if (20 == idx)
{
// wAttackedIndex[0] <20><><EFBFBD><EFBFBD> 20 -- <20><><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD><E5B9A5>
// wAttackedIndex[n] <20><><EFBFBD><EFBFBD>0XFF -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int i = 0, j, charahurt, pethurt;
while (++i && 0XFF != AttMgc.wAttackedIndex[i])
{
for (j = 0; j < iAttackedNum; j++)
{
if (AttMgc.wAttackedIndex[i] == AttackedInfo[j * 4])
{
a1 = p_party[AttackedInfo[j * 4 + 1]];
charahurt = AttackedInfo[j * 4 + 2];
pethurt = AttackedInfo[j * 4 + 3];
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 4;
ATR_LONG_WORK(0, a1) = 0;
ATR_DAMAGE(a1) = charahurt;
ATR_PET_DAMAGE(a1) = pethurt;
set_damage_num(a1, 6, -64);
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
set_jujutsu_hit_mark(a1);
if (ATR_LIFE(a1) <= 0)
{
ATR_LIFE(a1) = 0;
slow_flg++;
}
ATR_PET_LIFE(a1) -= ATR_PET_DAMAGE(a1);
//andy_fall
if (ATR_PETFALL(a1) == 1)
{
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (ATR_PET_LIFE(a1) <= 0 && ATR_RIDE(a1))
{
ATR_PET_LIFE(a1) = 0;
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
ATR_CHR_ACT(a1) = ANIM_DAMAGE;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
}
}
}
else
{
int j, charahurt, pethurt;
for (j = 0; j < iAttackedNum; j++)
{
if (idx == AttackedInfo[j * 4])
{
a1 = p_party[AttackedInfo[j * 4 + 1]];
charahurt = AttackedInfo[j * 4 + 2];
pethurt = AttackedInfo[j * 4 + 3];
ATR_VCT_NO(a1) = ATTACK_MAGIC_CASE + 4;
ATR_LONG_WORK(0, a1) = 0;
ATR_DAMAGE(a1) = charahurt;
ATR_PET_DAMAGE(a1) = pethurt;
set_damage_num(a1, 6, -64);
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
set_jujutsu_hit_mark(a1);
if (ATR_LIFE(a1) <= 0)
{
ATR_LIFE(a1) = 0;
slow_flg++;
}
ATR_PET_LIFE(a1) -= ATR_PET_DAMAGE(a1);
//andy_fall
if (ATR_PETFALL(a1) == 1)
{
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (ATR_PET_LIFE(a1) <= 0 && ATR_RIDE(a1))
{
ATR_PET_LIFE(a1) = 0;
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
ATR_CHR_ACT(a1) = ANIM_DAMAGE;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
}
}
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĶ<D0B5><C4B6><EFBFBD><EFBFBD><EFBFBD>
if (AttMgc.wNumAttackeds == AttMgc.wNumAttacks && 0 == iAttackedNum)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
bRunAttMgc = FALSE;
g_iRunEarthQuake = 0;
}
break;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ͼ
case ATTACK_MAGIC_CASE + 4:
if (ATR_FIRST_FLG(a0) > 40)
ATR_FIRST_FLG(a0) = 0;
ATR_FIRST_FLG(a0)++;
ATR_CRS(a0) = (ATR_CRS(a0) + 16) & 31;
gemini(a0);
if (40 == ATR_FIRST_FLG(a0))
{
if (ATR_LIFE(a0) <= 0)
{
ATR_VCT_NO(a0) = VCT_NO_DIE + 1;
slow_flg--;
}
else
ATR_VCT_NO(a0) = 0;
if (ATR_GROUP_FLG(a0) == 1)
ATR_CRS(a0) = crs_change_tbl2[7];
else
ATR_CRS(a0) = crs_change_tbl2[3];
gemini(a0);
++iCurAttackedFinishNum;
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĶ<D0B5><C4B6><EFBFBD><EFBFBD><EFBFBD>
if (iAttackedNum == iCurAttackedFinishNum)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
bRunAttMgc = FALSE;
g_iRunEarthQuake = 0;
}
break;
case ATTACK_MAGIC_CASE + 5:
if (ATR_FIRST_FLG(a0) > 60)
ATR_FIRST_FLG(a0) = 0;
ATR_FIRST_FLG(a0)++;
if (ATR_FIRST_FLG(a0) == 60)
{
ATR_VCT_NO(a0) = 0;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
bRunAttMgc = FALSE;
g_iRunEarthQuake = 0;
}
break;
#endif
#ifdef __TOCALL_MAGIC
// <20><><EFBFBD><EFBFBD>ǰ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
case TOCALL_MAGIC_CASE:
// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>
(0 == ATR_GROUP_FLG(a0)) ? ATR_CHR_ANG(a0) = 3 : ATR_CHR_ANG(a0) = 7;
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
if (0XFFFFFFFF != ToCallMgc.iPreMgcNum)
{
if (NULL == (a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU))))
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
ATR_VCT_NO(a0) = 0;
return;
}
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 1; // ǰ<>ö<EFBFBD><C3B6><EFBFBD>
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (ToCallMgc.iPreMgcNum == 101120)
ATR_DISP_PRIO(a1) = (1 == ToCallMgc.wPreMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
else
ATR_DISP_PRIO(a1) = ATR_DISP_PRIO(a0) + 1;
#else
ATR_DISP_PRIO(a1) = (1 == ToCallMgc.wPreMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
#endif
ATR_CHR_NO(a1) = ToCallMgc.iPreMgcNum;
ATR_BODY_WORK(0, a1) = a0;
ATR_H_POS(a1) = ATR_H_POS(a0) + ToCallMgc.wPreMgcX;
ATR_V_POS(a1) = ATR_V_POS(a0) + ToCallMgc.wPreMgcY;
}
ATR_VCT_NO(a0) = 0;
ATR_CHR_ACT_OLD(a0) = -1;
#ifdef _PETSKILL_LER // <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>
if (ATR_CHR_NO(a0) == 101815)
ATR_CHR_NO(a0) = ATR_CHR_NO(a0) * -1;
#endif
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
// ִ<><D6B4>ǰ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
case TOCALL_MAGIC_CASE + 1:
a1 = ATR_BODY_WORK(0, a0);
ATR_H_POS(a0) = ATR_H_POS(a1) + ToCallMgc.wPreMgcX;
ATR_V_POS(a0) = ATR_V_POS(a1) + ToCallMgc.wPreMgcY;
if (d0 = pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(a0);
ToCallMgc.wRunPreMgc = TRUE;
#ifdef _PETSKILL_LER // <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>
if (ATR_CHR_NO_OLD(a1) < 0)
{
int side;
ATR_CHR_NO(a1) = ATR_CHR_NO(a1) * -1;
if (ToCallMgc.iCurMgcNum == 101798 || ToCallMgc.iCurMgcNum == 101800 || ToCallMgc.iCurMgcNum == 101853 || ToCallMgc.iCurMgcNum == 101854)
{
int i;
for (i = 0; i < BATTLKPKPLYAERNUM; i++)
{
// <20><><EFBFBD>ҵ<EFBFBD><D2B5>׶<EFBFBD>λ<EFBFBD><CEBB>
if (ATR_CHR_NO(p_party[i]) == ATR_CHR_NO(a1))
break;
}
side = i = (i < 10 ? 0:10);
// <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD>ʧ
for (; i < side + 10; i++)
ATR_H_POS(p_party[i]) += -lpDraw->xSize;
}
}
#endif
}
break;
// ִ<><D6B4>Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
case TOCALL_MAGIC_CASE + 2:
{
idx = ATR_LONG_WORK(0, a0);
#ifdef _PROFESSION_ADDSKILL
RunTimeMagicBoundary(ATR_CHR_NO(a0));
#endif
// <20><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
if (20 != idx)
{
a1 = p_party[idx];
if (idx < 10)
{
ATR_H_POS(a0) = ATR_H_POS(a1) - ToCallMgc.posAttacked[0].x;
ATR_V_POS(a0) = ATR_V_POS(a1) - ToCallMgc.posAttacked[0].y;
}
else
{
ATR_H_POS(a0) = ATR_H_POS(a1) + ToCallMgc.posAttacked[0].x;
ATR_V_POS(a0) = ATR_V_POS(a1) + ToCallMgc.posAttacked[0].y;
}
}
// <20><><EFBFBD>ž<EFBFBD><C5BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else
{
int value = 0;
// Ŀǰ<C4BF><C7B0><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>
if (2 == g_iRunEarthQuake)
value = piyo_tbl[(piyo_point + g_iCurRunEarthQuake) & 63] + 12;
ATR_V_POS(a0) = ToCallMgc.posAttacked[0].y + value;
}
if (d0 = pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{
#ifdef _PETSKILL_LER // <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>
int side;
if (ATR_CHR_NO(a0) == 101798 || ATR_CHR_NO(a0) == 101800 || ATR_CHR_NO(a0) == 101853 || ATR_CHR_NO(a0) == 101854)
{
int i;
for (i = 0; i < BATTLKPKPLYAERNUM; i++)
{
// <20><><EFBFBD>ҵ<EFBFBD><D2B5>׶<EFBFBD>λ<EFBFBD><CEBB>
if (ATR_CHR_NO(p_party[i]) == 101815)
break;
}
side = i = (i < 10 ? 0:10);
// <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>
for (; i < side + 10; i++)
ATR_H_POS(p_party[i]) += lpDraw->xSize;
}
#endif
// Terry add fix <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׶<EFBFBD><D7B6><EFBFBD>
if (ToCallMgc.wCurAttackNum == 101628)
DeathAction(a0);
else
// end
if (ToCallMgc.wIsPostDisappear)
{
a0tmp[a0tmpcount] = a0;
a0mark[a0tmpcount] = 1;
a0tmpcount++;
}
else
{
DeathAction(a0);
#ifdef _PROFESSION_ADDSKILL
if (boundary_2)
{
DeathAction(boundary_2);
boundary_2 = NULL;
}
#endif
}
// <20><><EFBFBD><EFBFBD>û<EFBFBD>к<EFBFBD><D0BA>ö<EFBFBD><C3B6><EFBFBD>
if (0XFFFFFFFF == ToCallMgc.iPostMgcNum)
{
ToCallMgc.wNumAttackeds++;
if (20 == idx)
{
// wAttackedIndex[0] <20><><EFBFBD><EFBFBD> 20 -- <20><><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD><E5B9A5>
// wAttackedIndex[n] <20><><EFBFBD><EFBFBD>0XFF -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int i = 0, j, charahurt, pethurt;
while (++i && 0XFF != ToCallMgc.wAttackedIndex[i])
{
for (j = 0; j < iAttackedNum; j++)
{
if (ToCallMgc.wAttackedIndex[i] == AttackedInfo[j * 4])
{
a1 = p_party[AttackedInfo[j * 4 + 1]];
charahurt = AttackedInfo[j * 4 + 2];
pethurt = AttackedInfo[j * 4 + 3];
ATR_LONG_WORK(0, a1) = 0;
ATR_DAMAGE(a1) = charahurt;
ATR_PET_DAMAGE(a1) = pethurt;
if (charahurt == 0)//<2F>˺<EFBFBD>ֵΪ0
{
#ifdef _BATTLESKILL // (<28>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
if (a0->anim_chr_no == 101651 || a0->anim_chr_no == 101650) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Miss<73><73><EFBFBD><EFBFBD>
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 5;
else
{
set_damage_num(a1, 0, -64);
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 5;
if ( ToCallMgc.iCurMgcNum == 101676 //<2F><EFBFBD><E1B4A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD><CBBA><EFBFBD>Ϊ0,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>ܵĶ<DCB5><C4B6><EFBFBD>
|| ToCallMgc.iCurMgcNum == 101675
|| ToCallMgc.iCurMgcNum == 101674
|| ToCallMgc.iCurMgcNum == 101673
|| ToCallMgc.iCurMgcNum == 101672
|| ToCallMgc.iCurMgcNum == 101665
|| ToCallMgc.iCurMgcNum == 101664
|| ToCallMgc.iCurMgcNum == 101663
|| ToCallMgc.iCurMgcNum == 101662
|| ToCallMgc.iCurMgcNum == 101661
|| ToCallMgc.iCurMgcNum == 101656)
{ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_STIMER(a1) = 0;
ATR_FIRST_FLG(a1) = 0; //?????????
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 6;
}
}
#else
set_damage_num(a1, 0, -64);
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 5;
#endif
}
else
{
set_damage_num(a1, 6, -64);
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 4;
}
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
set_jujutsu_hit_mark(a1);
if (ATR_LIFE(a1) <= 0)
{
ATR_LIFE(a1) = 0;
slow_flg++;
}
ATR_PET_LIFE(a1) -= ATR_PET_DAMAGE(a1);
//andy_fall
if (ATR_PETFALL(a1) == 1)
{
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (ATR_PET_LIFE(a1) <= 0 && ATR_RIDE(a1))
{
ATR_PET_LIFE(a1) = 0;
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (charahurt == 0)
ATR_CHR_ACT(a1) = ANIM_STAND;
else
ATR_CHR_ACT(a1) = ANIM_DAMAGE;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
}
}
}
else
{
int j, charahurt, pethurt;
for (j = 0; j < iAttackedNum; j++)
{
if (idx == AttackedInfo[j * 4])
{
a1 = p_party[AttackedInfo[j * 4 + 1]];
charahurt = AttackedInfo[j * 4 + 2];
pethurt = AttackedInfo[j * 4 + 3];
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 4;
ATR_LONG_WORK(0, a1) = 0;
ATR_DAMAGE(a1) = charahurt;
ATR_PET_DAMAGE(a1) = pethurt;
if (charahurt == 0)
{
//#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
// if ( a0->anim_chr_no == 101651 || a0->anim_chr_no == 101650 ) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Miss<73><73><EFBFBD><EFBFBD>
// ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 5;
// else {
// set_damage_num( a1 , 0 , -64 );
// ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 5;
// }
//#else
set_damage_num(a1, 0, -64);
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 5;
//#endif
}
else
{
set_damage_num(a1, 6, -64);
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 4;
}
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
set_jujutsu_hit_mark(a1);
if (ATR_LIFE(a1) <= 0)
{
ATR_LIFE(a1) = 0;
slow_flg++;
}
ATR_PET_LIFE(a1) -= ATR_PET_DAMAGE(a1);
//andy_fall
if (ATR_PETFALL(a1) == 1)
{
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (ATR_PET_LIFE(a1) <= 0 && ATR_RIDE(a1))
{
ATR_PET_LIFE(a1) = 0;
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (charahurt == 0)
ATR_CHR_ACT(a1) = ANIM_STAND;
else
ATR_CHR_ACT(a1) = ANIM_DAMAGE;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
}
}
}
// ӵ<>к<EFBFBD><D0BA>ö<EFBFBD><C3B6><EFBFBD>
else
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĵ<D0B5><C4B5><EFBFBD>ʩ<EFBFBD><CAA9><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
if (20 == idx) // idx = wAttackedIndex[0]
{
// wAttackedIndex[0] <20><><EFBFBD><EFBFBD> 20 -- <20><><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD><E5B9A5>
// wAttackedIndex[n] <20><><EFBFBD><EFBFBD>0XFF -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int i = 0;
while (++i && 0XFF != ToCallMgc.wAttackedIndex[i])
{
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 3; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
ATR_DISP_PRIO(a1) = (1 == ToCallMgc.wPostMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
ATR_CHR_NO(a1) = ToCallMgc.iPostMgcNum;
ATR_LONG_WORK(0, a1) = ToCallMgc.wAttackedIndex[i];
ATR_H_POS(a1) = ATR_H_POS(p_party[ToCallMgc.wAttackedIndex[i]]) + ToCallMgc.wPostMgcX;
ATR_V_POS(a1) = ATR_V_POS(p_party[ToCallMgc.wAttackedIndex[i]]) + ToCallMgc.wPostMgcY;
}
}
// <20><><EFBFBD><EFBFBD>ijһ<C4B3><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʩ<EFBFBD><CAA9><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
else
{
a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU));
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 3; // <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
ATR_DISP_PRIO(a1) = (1 == ToCallMgc.wPostMgcOnChar) ? D_PRIO_HIT_MARK : DISP_PRIO_TILE + 1;
ATR_CHR_NO(a1) = ToCallMgc.iPostMgcNum;
ATR_LONG_WORK(0, a1) = idx;
ATR_H_POS(a1) = ATR_H_POS(p_party[idx]) + ToCallMgc.wPostMgcX;
ATR_V_POS(a1) = ATR_V_POS(p_party[idx]) + ToCallMgc.wPostMgcY;
}
}
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĶ<D0B5><C4B6><EFBFBD><EFBFBD><EFBFBD>
if (ToCallMgc.wNumAttackeds == ToCallMgc.wNumAttacks && 0 == iAttackedNum)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
bRunToCallMgc = FALSE;
g_iRunEarthQuake = 0;
}
break;
}
// ִ<>к<EFBFBD><D0BA>ö<EFBFBD><C3B6><EFBFBD>
case TOCALL_MAGIC_CASE + 3:
idx = ATR_LONG_WORK(0, a0);
a1 = p_party[idx];
ATR_H_POS(a0) = ATR_H_POS(a1) + ToCallMgc.wPostMgcX;
ATR_V_POS(a0) = ATR_V_POS(a1) + ToCallMgc.wPostMgcY;
if (d0 = pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(a0);
ToCallMgc.wNumAttackeds++;
if (20 == idx)
{
// wAttackedIndex[0] <20><><EFBFBD><EFBFBD> 20 -- <20><><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD><E5B9A5>
// wAttackedIndex[n] <20><><EFBFBD><EFBFBD>0XFF -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int i = 0, j, charahurt, pethurt;
while (++i && 0XFF != ToCallMgc.wAttackedIndex[i])
{
for (j = 0; j < iAttackedNum; j++)
{
if (ToCallMgc.wAttackedIndex[i] == AttackedInfo[j * 4])
{
a1 = p_party[AttackedInfo[j * 4 + 1]];
charahurt = AttackedInfo[j * 4 + 2];
pethurt = AttackedInfo[j * 4 + 3];
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 4;
ATR_LONG_WORK(0, a1) = 0;
ATR_DAMAGE(a1) = charahurt;
ATR_PET_DAMAGE(a1) = pethurt;
set_damage_num(a1, 6, -64);
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
set_jujutsu_hit_mark(a1);
if (ATR_LIFE(a1) <= 0)
{
ATR_LIFE(a1) = 0;
slow_flg++;
}
ATR_PET_LIFE(a1) -= ATR_PET_DAMAGE(a1);
//andy_fall
if (ATR_PETFALL(a1) == 1) {
if (ATR_LIFE(a1) > 0) {
petfallChangeGraph(a1);
}
}
if (ATR_PET_LIFE(a1) <= 0 && ATR_RIDE(a1)){
ATR_PET_LIFE(a1) = 0;
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
ATR_CHR_ACT(a1) = ANIM_DAMAGE;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
}
}
}
else
{
int j, charahurt, pethurt;
for (j = 0; j < iAttackedNum; j++)
{
if (idx == AttackedInfo[j * 4])
{
a1 = p_party[AttackedInfo[j * 4 + 1]];
charahurt = AttackedInfo[j * 4 + 2];
pethurt = AttackedInfo[j * 4 + 3];
ATR_VCT_NO(a1) = TOCALL_MAGIC_CASE + 4;
ATR_LONG_WORK(0, a1) = 0;
ATR_DAMAGE(a1) = charahurt;
ATR_PET_DAMAGE(a1) = pethurt;
set_damage_num(a1, 6, -64);
ATR_LIFE(a1) -= ATR_DAMAGE(a1);
set_jujutsu_hit_mark(a1);
if (ATR_LIFE(a1) <= 0)
{
ATR_LIFE(a1) = 0;
slow_flg++;
}
ATR_PET_LIFE(a1) -= ATR_PET_DAMAGE(a1);
//andy_fall
if (ATR_PETFALL(a1) == 1)
{
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
if (ATR_PET_LIFE(a1) <= 0 && ATR_RIDE(a1))
{
ATR_PET_LIFE(a1) = 0;
if (ATR_LIFE(a1) > 0)
petfallChangeGraph(a1);
}
ATR_CHR_ACT(a1) = ANIM_DAMAGE;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
}
}
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĶ<D0B5><C4B6><EFBFBD><EFBFBD><EFBFBD>
if (ToCallMgc.wNumAttackeds == ToCallMgc.wNumAttacks && 0 == iAttackedNum)
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
bRunToCallMgc = FALSE;
g_iRunEarthQuake = 0;
}
break;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ͼ
case TOCALL_MAGIC_CASE + 4:
if (ATR_FIRST_FLG(a0) > 40)
ATR_FIRST_FLG(a0) = 0;
ATR_FIRST_FLG(a0)++;
if (ATR_LIFE(a0) <= 0)
{
ATR_CRS(a0) = (ATR_CRS(a0) + 16) & 31;
gemini(a0);
}
if (40 == ATR_FIRST_FLG(a0)) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>40<34><30>
{
if (ATR_LIFE(a0) <= 0)
{
ATR_VCT_NO(a0) = VCT_NO_DIE + 1;
slow_flg--;
}
else
ATR_VCT_NO(a0) = 0;
if (ATR_GROUP_FLG(a0) == 1)
ATR_CRS(a0) = crs_change_tbl2[7];
else
ATR_CRS(a0) = crs_change_tbl2[3];
gemini(a0);
++iCurAttackedFinishNum;
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĶ<D0B5><C4B6><EFBFBD><EFBFBD><EFBFBD>
if (iAttackedNum == iCurAttackedFinishNum)
{
for (int i = 0; i < 10; i++)
{
if (a0mark[i] != 0)
{
DeathAction(a0tmp[i]);
a0mark[i] = 0;
}
}
a0tmpcount = 0;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
bRunToCallMgc = FALSE;
g_iRunEarthQuake = 0;
}
break;
case TOCALL_MAGIC_CASE + 5:
if (ATR_FIRST_FLG(a0) > 60)
ATR_FIRST_FLG(a0) = 0;
ATR_FIRST_FLG(a0)++;
if (ATR_FIRST_FLG(a0) == 60)
{
if (ToCallMgc.wIsPostDisappear)
{
for (int i = 0; i < 10; i++)
{
if (a0mark[i] != 0)
{
DeathAction(a0tmp[i]);
a0mark[i] = 0;
}
}
}
a0tmpcount = 0;
ATR_VCT_NO(a0) = 0;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
bRunToCallMgc = FALSE;
g_iRunEarthQuake = 0;
}
break;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
case TOCALL_MAGIC_CASE + 6:
ATR_CHR_ACT(a0) = ANIM_WALK; //?<3F>h???????
ATR_SPD(a0) = 16;
ATR_CHR_ANG(a0) = (ATR_DAMAGE_ANG(a0) + 4) & 7;
if (ATR_GROUP_FLG(a0) == 1)
ATR_CRS(a0) = crs_change_tbl2[3];
else
ATR_CRS(a0) = crs_change_tbl2[7];
gemini(a0);
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
ATR_STIMER(a0)++;
if (ATR_STIMER(a0) == 20)
{
ATR_CRS_OLD(a0) = ATR_CRS(a0) = (ATR_CRS(a0) + 16) & 31;//<2F><>?<3F><>?
ATR_VCT_NO(a0) = 17; //?????
ATR_STIMER(a0) = 0;
++iCurAttackedFinishNum;
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĶ<D0B5><C4B6><EFBFBD><EFBFBD><EFBFBD>
if (iAttackedNum == iCurAttackedFinishNum)
{
for (int i = 0; i < 10; i++)
{
if (a0mark[i] != 0)
{
DeathAction(a0tmp[i]);
a0mark[i] = 0;
}
}
a0tmpcount = 0;
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
bRunToCallMgc = FALSE;
g_iRunEarthQuake = 0;
}
break;
#endif
//#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
case PROSKILL:
// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>
(0 == ATR_GROUP_FLG(a0)) ? ATR_CHR_ANG(a0) = 3 : ATR_CHR_ANG(a0) = 7;
ATR_CRS_OLD(a0) = ATR_CRS(a0) = crs_change_tbl2[ATR_CHR_ANG(a0)];
if (0XFFFFFFFF != AttMgc.iPreMgcNum)
{
if (NULL == (a1 = GetAction(T_PRIO_MISSILE, sizeof(ATR_EQU))))
{
ATR_DAMAGE(p_master) = ATR_BODY_CNT(p_master);
ATR_VCT_NO(a0) = 0;
return;
}
if (AttPreMagicNum == 0)
{
ATR_VCT_NO(a0) = 1;
return;
}
ATR_NAME(a1) = monster;
ATR_VCT_NO(a1) = PROSKILL + 1; // ǰ<>ö<EFBFBD><C3B6><EFBFBD>
ATR_CHR_NO(a1) = AttPreMagicNum;
ATR_DISP_PRIO(a1) = ATR_DISP_PRIO(a0) + 1;
ATR_BODY_WORK(0, a1) = a0;
ATR_H_POS(a1) = ATR_H_POS(a0);
ATR_V_POS(a1) = ATR_V_POS(a0);
}
if (ATR_WARRIOR_EFFECT(a0) == 1)
ATR_VCT_NO(a0) = 0;
else if (ATR_WARRIOR_EFFECT(a0) == 2)
ATR_VCT_NO(a0) = 1;
ATR_CHR_ACT_OLD(a0) = -1;
pattern(a0, ANM_NOMAL_SPD, ANM_LOOP);
break;
case PROSKILL + 1:
a1 = ATR_BODY_WORK(0, a0);
ATR_H_POS(a0) = ATR_H_POS(a1);
ATR_V_POS(a0) = ATR_V_POS(a1) - 35;
if (ATR_CHR_NO(a0) == 101631 || ATR_CHR_NO(a0) == 101632)
ATR_V_POS(a0) = ATR_V_POS(a1) - 65;
if (d0 = pattern(a0, ANM_NOMAL_SPD, ANM_NO_LOOP))
{
DeathAction(a0);
if (ATR_WARRIOR_EFFECT(a1) == 1)
ATR_VCT_NO(a1) = 1;
}
break;
//#endif
}
#ifdef _SYUTEST
if (Light1 != NULL)
{
if (Light1->anim_cnt == 5)
{ //<2F><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
DeathAction(Light1);
Light1 = NULL;
}
}
#endif
}
ACTION *oft_test(void)
{
int d0, d1, d2, d7;
int id_no = 0;
ACTION *a1;
p_kanji = NULL;
for (d7 = 0; d7 < BATTLKPKPLYAERNUM + 1; d7++) //<2F><><EFBFBD><EFBFBD>
p_missile[d7] = NULL;
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++) //<2F><><EFBFBD><EFBFBD>
p_party[d7] = NULL;
// <20><><EFBFBD><EFBFBD> master action list /* ?????????????<3F>K? */
a1 = GetAction(T_PRIO_MASTER, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
//Ҫִ<D2AA>е<EFBFBD>Func
ATR_NAME(a1) = master;
//<2F><><EFBFBD><EFBFBD><EFBFBD>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD>ȴ<EFBFBD>
ATR_VCT_NO(a1) = 3;
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
// sprite <20><><EFBFBD><EFBFBD>/* ?????<3F>k? */
ATR_CHR_NO(a1) = 31027;
ATR_CHR_ANG(a1) = 3; //<2F><><EFBFBD><EFBFBD>
//<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
ATR_H_POS(a1) = 320;
ATR_V_POS(a1) = 240;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ATR_CHR_ACT(a1) = ANIM_ATTACK; // <20>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD><EFBFBD>
// <20><>¼ a1 <20><> p_master/* ???????<3F><><EFBFBD>V */
p_master = a1;
// <20><><EFBFBD><EFBFBD> field <20><><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD> action list/* ?????<3F>N<EFBFBD><4E>???????????<3F>K? */
a1 = GetAction(T_PRIO_MASTER, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
ATR_ATTRIB(a1) = ACT_ATR_HIDE; // <20><><EFBFBD><EFBFBD>ʾ //<2F><><EFBFBD><EFBFBD>??
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
//<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
ATR_H_POS(a1) = lpDraw->xSize - 32;
ATR_V_POS(a1) = lpDraw->ySize - 64;
// <20><>¼ a1 <20><> p_attrib/* ???????<3F><><EFBFBD>V */
p_attrib = a1;
#ifdef _BATTLE_PK_PLAYER_FOR_6VS6
//X<><58><EFBFBD><EFBFBD>
d0 = 416 + 5 + DISPLACEMENT_X;
//Y<><59><EFBFBD><EFBFBD>
d1 = 408 + 24 + DISPLACEMENT_Y;
#else
//X<><58><EFBFBD><EFBFBD>
d0 = 416 + 32 + 5 + DISPLACEMENT_X;
//Y<><59><EFBFBD><EFBFBD>
d1 = 408 + 24 + DISPLACEMENT_Y;
#endif
// Ԥ<><D4A4>Ϊͼ<CEAA><CDBC>Ϊ SPR_021em
d2 = SPR_021em; /*?????*/
//_BATTLE_PK_PLAYER_FOR_6VS6 XIEZI <20>޸<EFBFBD>
for (d7 = 0; d7 < MAX_BATTLE_ROW_CHARS; d7++)
{ //<2F>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD><EFBFBD>
// <20><><EFBFBD><EFBFBD><EFBFBD>ҷ<EFBFBD><D2B7><EFBFBD> monster action list /* ??????????????<3F>K? */
a1 = GetAction(T_PRIO_JIKI, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
//Ҫִ<D2AA>е<EFBFBD>Func /* <20><>??? */
ATR_NAME(a1) = NULL;
// <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD>dz<EFBFBD>
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
// <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѶϢ // ??????<3F><><EFBFBD><EFBFBD>????
a1->atr |= ACT_ATR_INFO;
// <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ѡ // ???<3F>R<EFBFBD>e??
a1->atr |= ACT_ATR_HIT;
// sprite <20><><EFBFBD><EFBFBD> /* ?????<3F>k? */
ATR_CHR_NO(a1) = d2;
ATR_CHR_ANG(a1) = 3; //<2F><><EFBFBD><EFBFBD>
ATR_HIT_TIMING(a1) = 5;
// <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB> /* ???<3F>t */
monster_place_pos[id_no] = ATR_H_POS(a1) = ATR_INT_WORK0(a1) = d0;
monster_place_pos[id_no + 1] = ATR_V_POS(a1) = ATR_INT_WORK1(a1) = d1;
ATR_H_POS(a1) += 300;
ATR_V_POS(a1) += 300;
// һ<><D2BB>ʼ<EFBFBD>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
monster_start_pos[id_no++] = ATR_H_POS(a1);
monster_start_pos[id_no++] = ATR_V_POS(a1);
/* ???<3F><>? */
ATR_CHR_ACT(a1) = ANIM_STAND; //?<3F>h???????
ATR_SPD(a1) = 32; //<2F>ƶ<EFBFBD><C6B6>ٶ<EFBFBD>
ATR_GROUP_FLG(a1) = 0; // <20><><EFBFBD><EFBFBD> group set //?????????
ATR_PLACE_NO(a1) = d7; // <20><>¼<EFBFBD><C2BC>ʼλ<CABC><CEBB> //<2F><>?<3F>k?<3F><><EFBFBD>V
// <20><>¼ a1 <20><> <20><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>/* ???????<3F><><EFBFBD>V */
p_party[d7] = a1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
/* ?<3F><>?<3F><> */
d0 += 32;
d1 -= 24;
}
#ifdef _BATTLE_PK_PLAYER_FOR_6VS6
//X<><58><EFBFBD><EFBFBD>
d0 = 320 - 64 + 5 + DISPLACEMENT_X;
//Y<><59><EFBFBD><EFBFBD>
d1 = 432 - 24 + DISPLACEMENT_Y;
#else
d0 = 320 - 32 + 5 + DISPLACEMENT_X; //??<3F><>
d1 = 432 - 24 + DISPLACEMENT_Y; //??<3F><>
#endif
d2 = SPR_pet001; /*???*/
//_BATTLE_PK_PLAYER_FOR_6VS6 XIEZI <20>޸<EFBFBD>
for (; d7 < 2 * MAX_BATTLE_ROW_CHARS; d7++)
{ //<2F>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD><EFBFBD>
/* ??????????????<3F>K? */
a1 = GetAction(T_PRIO_JIKI, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
ATR_NAME(a1) = NULL;
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
// ??????<3F><><EFBFBD><EFBFBD>????
a1->atr |= ACT_ATR_INFO;
// ???<3F>R<EFBFBD>e??
a1->atr |= ACT_ATR_HIT;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = d2;
ATR_CHR_ANG(a1) = 3; //?<3F><>
ATR_HIT_TIMING(a1) = 3 + 2;
/* ???<3F>t */
monster_place_pos[id_no] = ATR_H_POS(a1) = ATR_INT_WORK0(a1) = d0;
monster_place_pos[id_no + 1] = ATR_V_POS(a1) = ATR_INT_WORK1(a1) = d1;
ATR_H_POS(a1) += 300;
ATR_V_POS(a1) += 300;
monster_start_pos[id_no++] = ATR_H_POS(a1);
monster_start_pos[id_no++] = ATR_V_POS(a1);
/* ???<3F><>? */
ATR_CHR_ACT(a1) = ANIM_STAND; //?<3F>h???????
ATR_SPD(a1) = 32; //?<3F>h<EFBFBD>L<EFBFBD>T
ATR_GROUP_FLG(a1) = 0; //?????????
ATR_PLACE_NO(a1) = d7; //<2F><>?<3F>k?<3F><><EFBFBD>V
/* ???????<3F><><EFBFBD>V */
p_party[d7] = a1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
/* ?<3F><>?<3F><> */
d0 += 32 * 2;
d1 -= 24 * 2;
}
/* <20><>???? */
p_party[d7] = NULL;
#ifdef _BATTLE_PK_PLAYER_FOR_6VS6
//X<><58><EFBFBD><EFBFBD>
d0 = 64 - 32 + 5;
//Y<><59><EFBFBD><EFBFBD>
d1 = 192 + 30;
#else
d0 = 64 - 32 + 5; //??<3F><>
d1 = 192 - 24 + 30; //??<3F><>
#endif
d2 = SPR_021em; /*?????*/
//_BATTLE_PK_PLAYER_FOR_6VS6 XIEZI <20>޸<EFBFBD>
for (; d7 < 3 * MAX_BATTLE_ROW_CHARS; d7++)
{ //<2F>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD>
/* ??????????????<3F>K? */
a1 = GetAction(T_PRIO_JIKI, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
ATR_NAME(a1) = NULL;
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
// ??????<3F><><EFBFBD><EFBFBD>????
a1->atr |= ACT_ATR_INFO;
// ???<3F>R<EFBFBD>e??
a1->atr |= ACT_ATR_HIT;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = d2;
ATR_CHR_ANG(a1) = 7; //??
ATR_HIT_TIMING(a1) = 5;
/* ???<3F>t */
monster_place_pos[id_no] = ATR_H_POS(a1) = ATR_INT_WORK0(a1) = d0;
monster_place_pos[id_no + 1] = ATR_V_POS(a1) = ATR_INT_WORK1(a1) = d1;
ATR_H_POS(a1) -= 300;
ATR_V_POS(a1) -= 300;
monster_start_pos[id_no++] = ATR_H_POS(a1);
monster_start_pos[id_no++] = ATR_V_POS(a1);
/* ???<3F><>? */
ATR_CHR_ACT(a1) = ANIM_STAND; //?<3F>h???????
ATR_SPD(a1) = 32; //?<3F>h<EFBFBD>L<EFBFBD>T
ATR_GROUP_FLG(a1) = 1; //?<3F><>???????
ATR_PLACE_NO(a1) = d7; //<2F><>?<3F>k?<3F><><EFBFBD>V
/* ???????<3F><><EFBFBD>V */
p_party[d7] = a1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
/* ?<3F><>?<3F><> */
d0 += 32;
d1 -= 24;
}
#ifdef _BATTLE_PK_PLAYER_FOR_6VS6
//X<><58><EFBFBD><EFBFBD>
d0 = 32 + 32 + 5;
//Y<><59><EFBFBD><EFBFBD>
d1 = 264 + 48 + 10;
#else
d0 = 32 + 32 + 5; //??<3F><>
d1 = 264 + 24 + 10; //??<3F><>
#endif
d2 = SPR_pet001; /*???*/
//_BATTLE_PK_PLAYER_FOR_6VS6 XIEZI <20>޸<EFBFBD>
for (; d7 < 4 * MAX_BATTLE_ROW_CHARS; d7++)
{ //<2F>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD>
/* ??????????????<3F>K? */
a1 = GetAction(T_PRIO_JIKI, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
ATR_NAME(a1) = NULL;
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
// ??????<3F><><EFBFBD><EFBFBD>????
a1->atr |= ACT_ATR_INFO;
// ???<3F>R<EFBFBD>e??
a1->atr |= ACT_ATR_HIT;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = d2;
ATR_CHR_ANG(a1) = 7; //??
ATR_HIT_TIMING(a1) = 3 + 2;
/* ???<3F>t */
monster_place_pos[id_no] = ATR_H_POS(a1) = ATR_INT_WORK0(a1) = d0;
monster_place_pos[id_no + 1] = ATR_V_POS(a1) = ATR_INT_WORK1(a1) = d1;
ATR_H_POS(a1) -= 300;
ATR_V_POS(a1) -= 300;
monster_start_pos[id_no++] = ATR_H_POS(a1);
monster_start_pos[id_no++] = ATR_V_POS(a1);
/* ???<3F><>? */
ATR_CHR_ACT(a1) = ANIM_STAND; //?<3F>h???????
ATR_SPD(a1) = 32; //?<3F>h<EFBFBD>L<EFBFBD>T
ATR_GROUP_FLG(a1) = 1; //?<3F><>???????
ATR_PLACE_NO(a1) = d7; //<2F><>?<3F>k?<3F><><EFBFBD>V
/* ???????<3F><><EFBFBD>V */
p_party[d7] = a1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
/* ?<3F><>?<3F><> */
d0 += 32 * 2;
d1 -= 24 * 2;
}
#ifdef _BATTLE_PK_PLAYER_FOR_40
p_party[d7] = NULL;
d0 = 128 + 32 + 5;
d1 = 408 + 24 + DISPLACEMENT_Y;
d2 = SPR_021em; /*?????*/
for (d7 = 20; d7 < 25; d7++)
{ //<2F>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD>
/* ??????????????<3F>K? */
a1 = GetAction(T_PRIO_JIKI, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
ATR_NAME(a1) = NULL;
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
// ??????<3F><><EFBFBD><EFBFBD>????
a1->atr |= ACT_ATR_INFO;
// ???<3F>R<EFBFBD>e??
a1->atr |= ACT_ATR_HIT;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = d2;
ATR_CHR_ANG(a1) = 5; //??
ATR_HIT_TIMING(a1) = 5;
/* ???<3F>t */
monster_place_pos[id_no] = ATR_H_POS(a1) = ATR_INT_WORK0(a1) = d0;
monster_place_pos[id_no + 1] = ATR_V_POS(a1) = ATR_INT_WORK1(a1) = d1;
ATR_H_POS(a1) -= 300;
ATR_V_POS(a1) += 300;
monster_start_pos[id_no++] = ATR_H_POS(a1);
monster_start_pos[id_no++] = ATR_V_POS(a1);
/* ???<3F><>? */
ATR_CHR_ACT(a1) = ANIM_STAND; //?<3F>h???????
ATR_SPD(a1) = 32; //?<3F>h<EFBFBD>L<EFBFBD>T
ATR_GROUP_FLG(a1) = 2; //?<3F><>???????
ATR_PLACE_NO(a1) = d7; //<2F><>?<3F>k?<3F><><EFBFBD>V
/* ???????<3F><><EFBFBD>V */
p_party[d7] = a1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
/* ?<3F><>?<3F><> */
d0 -= 32;
d1 -= 24;
}
d0 = 288 + 32 + 5; //??<3F><>
d1 = 432 - 24 + DISPLACEMENT_Y; //??<3F><>
d2 = SPR_pet001; /*???*/
for (d7 = 25; d7 < 30; d7++)
{ //<2F>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD>
/* ??????????????<3F>K? */
a1 = GetAction(T_PRIO_JIKI, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
ATR_NAME(a1) = NULL;
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
// ??????<3F><><EFBFBD><EFBFBD>????
a1->atr |= ACT_ATR_INFO;
// ???<3F>R<EFBFBD>e??
a1->atr |= ACT_ATR_HIT;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = d2;
ATR_CHR_ANG(a1) = 5; //??
ATR_HIT_TIMING(a1) = 3 + 2;
/* ???<3F>t */
monster_place_pos[id_no] = ATR_H_POS(a1) = ATR_INT_WORK0(a1) = d0;
monster_place_pos[id_no + 1] = ATR_V_POS(a1) = ATR_INT_WORK1(a1) = d1;
ATR_H_POS(a1) -= 300;
ATR_V_POS(a1) += 300;
monster_start_pos[id_no++] = ATR_H_POS(a1);
monster_start_pos[id_no++] = ATR_V_POS(a1);
/* ???<3F><>? */
ATR_CHR_ACT(a1) = ANIM_STAND; //?<3F>h???????
ATR_SPD(a1) = 32; //?<3F>h<EFBFBD>L<EFBFBD>T
ATR_GROUP_FLG(a1) = 2; //?<3F><>???????
ATR_PLACE_NO(a1) = d7; //<2F><>?<3F>k?<3F><><EFBFBD>V
/* ???????<3F><><EFBFBD>V */
p_party[d7] = a1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
/* ?<3F><>?<3F><> */
d0 -= 32 * 2;
d1 -= 24 * 2;
}
//X<><58><EFBFBD><EFBFBD>
d0 = 608 - 32 + 5 + DISPLACEMENT_X;
//Y<><59><EFBFBD><EFBFBD>
d1 = 190 - 24 + 30;
d2 = SPR_021em; /*?????*/
for (d7 = 30; d7 < 35; d7++)
{ //<2F><><EFBFBD>Ͻǵз<C7B5><D0B7><EFBFBD><EFBFBD><EFBFBD>
/* ??????????????<3F>K? */
a1 = GetAction(T_PRIO_JIKI, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
ATR_NAME(a1) = NULL;
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
// ??????<3F><><EFBFBD><EFBFBD>????
a1->atr |= ACT_ATR_INFO;
// ???<3F>R<EFBFBD>e??
a1->atr |= ACT_ATR_HIT;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = d2;
ATR_CHR_ANG(a1) = 1; //??
ATR_HIT_TIMING(a1) = 5;
/* ???<3F>t */
monster_place_pos[id_no] = ATR_H_POS(a1) = ATR_INT_WORK0(a1) = d0;
monster_place_pos[id_no + 1] = ATR_V_POS(a1) = ATR_INT_WORK1(a1) = d1;
ATR_H_POS(a1) += 300;
ATR_V_POS(a1) -= 300;
monster_start_pos[id_no++] = ATR_H_POS(a1);
monster_start_pos[id_no++] = ATR_V_POS(a1);
/* ???<3F><>? */
ATR_CHR_ACT(a1) = ANIM_STAND; //?<3F>h???????
ATR_SPD(a1) = 32; //?<3F>h<EFBFBD>L<EFBFBD>T
ATR_GROUP_FLG(a1) = 3; //?<3F><>???????
ATR_PLACE_NO(a1) = d7; //<2F><>?<3F>k?<3F><><EFBFBD>V
/* ???????<3F><><EFBFBD>V */
p_party[d7] = a1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
/* ?<3F><>?<3F><> */
d0 -= 32;
d1 -= 24;
}
d0 = 608 - 32 + 5 + DISPLACEMENT_X; //??<3F><>
d1 = 236 + 24 + 30; //??<3F><>
d2 = SPR_pet001; /*???*/
for (d7 = 35; d7 < 40; d7++)
{ //<2F><><EFBFBD>Ͻǵз<C7B5><D0B7><EFBFBD><EFBFBD><EFBFBD>
/* ??????????????<3F>K? */
a1 = GetAction(T_PRIO_JIKI, sizeof(ATR_EQU));
if (a1 == NULL)
return NULL;
ATR_NAME(a1) = NULL;
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
/* <20><><EFBFBD><EFBFBD>?<3F>I<EFBFBD>T */
ATR_DISP_PRIO(a1) = D_PRIO_MASTER;
// ??????<3F><><EFBFBD><EFBFBD>????
a1->atr |= ACT_ATR_INFO;
// ???<3F>R<EFBFBD>e??
a1->atr |= ACT_ATR_HIT;
/* ?????<3F>k? */
ATR_CHR_NO(a1) = d2;
ATR_CHR_ANG(a1) = 1; //??
ATR_HIT_TIMING(a1) = 3 + 2;
/* ???<3F>t */
monster_place_pos[id_no] = ATR_H_POS(a1) = ATR_INT_WORK0(a1) = d0;
monster_place_pos[id_no + 1] = ATR_V_POS(a1) = ATR_INT_WORK1(a1) = d1;
ATR_H_POS(a1) += 300;
ATR_V_POS(a1) -= 300;
monster_start_pos[id_no++] = ATR_H_POS(a1);
monster_start_pos[id_no++] = ATR_V_POS(a1);
/* ???<3F><>? */
ATR_CHR_ACT(a1) = ANIM_STAND; //?<3F>h???????
ATR_SPD(a1) = 32; //?<3F>h<EFBFBD>L<EFBFBD>T
ATR_GROUP_FLG(a1) = 3; //?<3F><>???????
ATR_PLACE_NO(a1) = d7; //<2F><>?<3F>k?<3F><><EFBFBD>V
/* ???????<3F><><EFBFBD>V */
p_party[d7] = a1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
/* ?<3F><>?<3F><> */
d0 -= 32 * 2;
d1 -= 24 * 2;
}
#endif
// <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //???<3F>t?<3F><><EFBFBD>t
for (d7 = 0; d7 < BATTLKPKPLYAERNUM; d7++)
{
a1 = p_party[d7];
ATR_H_POS(a1) = monster_start_pos[monster_place_no[d7] * 2];
ATR_V_POS(a1) = monster_start_pos[monster_place_no[d7] * 2 + 1];
ATR_INT_WORK0(a1) = monster_place_pos[monster_place_no[d7] * 2];
ATR_INT_WORK1(a1) = monster_place_pos[monster_place_no[d7] * 2 + 1];
}
command_point = 0; // clear command point //?????<3F><>????????
return a1;
}
static int bc_pointer;
/* ????<3F><>??? *******************************************************************/
int get_bc_num(void)
{
int d0, d1;
while (1)
{
d0 = BattleStatus[bc_pointer++]; //?<3F><>?<3F><>?<3F><>?
if (d0 == NULL)
{ //<2F><>???
bc_pointer--;
return -1;
}
if (d0 >= '0' && d0 <= '9') //???
break; //??????
if (d0 >= 'A' && d0 <= 'F') //?????
break; //??????
}
if (d0 >= 'A') //?????
d1 = d0 - 'A' + 10;
else
d1 = d0 - '0';
while (1)
{
d0 = BattleStatus[bc_pointer++]; //?<3F><>????<3F><>?<3F><>?
if (d0 == NULL)
{ //<2F><>???
bc_pointer--;
break;
}
if (d0 < '0' || d0 > '9')
{ //??????
if (d0 < 'A' || d0 > 'F') //????????
break; //<2F><>?
}
d1 = d1 << 4; //???????
if (d0 >= 'A') //?????
d1 += d0 - 'A' + 10;
else
d1 += d0 - '0';
}
return d1;
}
/* ??<3F><>?<3F><>??? *******************************************************************/
void get_bc_asc(ACTION *a1, int flg)
{
char d0;
char *a2;
if (flg == 0)
a2 = ATR_HANDLE(a1);
else
a2 = ATR_TITLE(a1);
while (1)
{
d0 = BattleStatus[bc_pointer++]; //?<3F><>?<3F><>?<3F><>?
if (d0 == NULL)
{ //<2F><>???
bc_pointer--;
break;
}
//?<3F><>???
if (d0 == '|')
break;
if (IsDBCSLeadByte(d0))
{
*a2++ = d0;
*a2++ = BattleStatus[bc_pointer++];
}
else
*a2++ = d0;
}
//<2F><>????
*a2 = 0;
if (flg == 0)
makeStringFromEscaped(ATR_HANDLE(a1));
else
makeStringFromEscaped(ATR_TITLE(a1));
}
// Robin 0728
/* ??<3F><>?<3F><>??? for Ride Pet*******************************************************************/
void get_bc_asc_ridepet(ACTION *a1)
{
char d0;
char *a2;
a2 = ATR_PETNAME(a1);
while (1)
{
d0 = BattleStatus[bc_pointer++]; //?<3F><>?<3F><>?<3F><>?
if (d0 == NULL)
{ //<2F><>???
bc_pointer--;
break;
}
//?<3F><>???
if (d0 == '|')
break;
if (IsDBCSLeadByte(d0))
{
*a2++ = d0;
*a2++ = BattleStatus[bc_pointer++];
}
else
*a2++ = d0;
}
//<2F><>????
*a2 = 0;
makeStringFromEscaped(ATR_PETNAME(a1));
}
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>
//<2F><><EFBFBD><EFBFBD>p_party<74><79><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD>еij<D0B5>ʼ<EFBFBD><CABC>
void set_bc(void)
{
ACTION *a1;
int d0, d2, d3, d1 = 0;
//????????
bc_pointer = 3;
//?????<3F>N<EFBFBD><4E>
ATR_ATTRIB(p_master) = get_bc_num();
//<2F>P<EFBFBD>f????????
while (BattleStatus[bc_pointer] != NULL)
{
//??<3F>k?<3F><>???
d2 = get_bc_num();
#ifdef _STONDEBUG_
if (d2 >= BATTLKPKPLYAERNUM)
MessageBoxNew(hWnd, "<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E8B6A8><EFBFBD><EFBFBD>", "Error", MB_OK);
#endif
//?????????????
a1 = p_party[d2];
/* <20><>??? */
ATR_NAME(a1) = monster;
//<2F><><EFBFBD>q<EFBFBD><71>???
get_bc_asc(a1, 0);
//<2F><>?<3F><>???
get_bc_asc(a1, 1);
//???<3F>k?<3F><>???
ATR_CHR_NO(a1) = get_bc_num();
//???<3F><>???
ATR_LEVEL(a1) = get_bc_num();
//??<3F><>???
ATR_LIFE(a1) = get_bc_num();
#ifdef _SFUMATO
ATR_SFUMATO(a1) = 0xff0000;
#endif
//?<3F><>??<3F><>???
ATR_MAX_LIFE(a1) = get_bc_num();
#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
ATR_MAX_MANA(a1) = pc.maxMp ;
#endif
//???<3F><>???
d0 = get_bc_num();
// Robin 0728 ridePet
if (bNewServer)
{
ATR_RIDE(a1) = get_bc_num();
get_bc_asc_ridepet(a1);
ATR_PETLEVEL(a1) = get_bc_num();
ATR_PET_LIFE(a1) = get_bc_num();
int k = ATR_PET_LIFE(a1);
ATR_PET_MAX_LIFE(a1) = get_bc_num();
int o = ATR_PET_MAX_LIFE(a1);
}
else
{
ATR_RIDE(a1) = 0;
ATR_PETNAME(a1)[0] = NULL;
ATR_PETLEVEL(a1) = 0;
ATR_PET_LIFE(a1) = 0;
ATR_PET_MAX_LIFE(a1) = 0;
}
//<2F><>???
if (d0 & BC_FRESH)
{
//??<3F><>??
if ((ATR_CHR_NO(a1) >= SPR_mwood1 && ATR_CHR_NO(a1) <= SPR_mstone3) ||
(ATR_CHR_NO(a1) == 15323) || (ATR_CHR_NO(a1) == 10812) || (ATR_CHR_NO(a1) == 15527) ||
(ATR_CHR_NO(a1) == 15543) || (ATR_CHR_NO(a1) == 15575) || (ATR_CHR_NO(a1) == 15607))
{
ATR_ATTRIB(a1) &= ~ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
//<2F>r??
ATR_VCT_NO(a1) = 0;
ATR_CHR_ACT(a1) = ANIM_STAND;
ATR_H_POS(a1) = ATR_INT_WORK0(a1) = monster_place_pos[monster_place_no[d2] * 2];
ATR_V_POS(a1) = ATR_INT_WORK1(a1) = monster_place_pos[monster_place_no[d2] * 2 + 1];
//???<3F><><EFBFBD><EFBFBD>
if (ATR_GROUP_FLG(a1) == 0)
ATR_CHR_ANG(a1) = 3;
else if (ATR_GROUP_FLG(a1) == 1)
ATR_CHR_ANG(a1) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a1) == 2)
ATR_CHR_ANG(a1) = 5;
else if (ATR_GROUP_FLG(a1) == 3)
ATR_CHR_ANG(a1) = 1;
#endif
ATR_CRS_OLD(a1) = ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
ATR_CHR_ACT(a1) = ANIM_WALK;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
else
{
//<2F>K<EFBFBD><4B>?
ATR_VCT_NO(a1) = VCT_NO_APPEAR;
ATR_ATTRIB(a1) &= ~ACT_ATR_HIDE; //<2F><><EFBFBD><EFBFBD>??
//<2F>K<EFBFBD>͢r?
ATR_VCT_NO(p_master) = 3;
/* ?<3F><>??? */
ATR_H_POS(a1) = monster_start_pos[monster_place_no[d2] * 2];
ATR_V_POS(a1) = monster_start_pos[monster_place_no[d2] * 2 + 1];
ATR_INT_WORK0(a1) = monster_place_pos[monster_place_no[d2] * 2];
ATR_INT_WORK1(a1) = monster_place_pos[monster_place_no[d2] * 2 + 1];
}
//????????????
set_raster_pos(a1);
//148 149 150
}
else
{
if (ATR_LIFE(a1) > 0)
{ //<2F><>?????
if (d0 & BC_FADE_OUT)
{ // ??s???
ATR_ATTRIB(a1) |= ACT_ATR_TRAVEL;
//??????
ATR_ATTACK_KIND(2, a1) = 1;
if (ATR_GROUP_FLG(a1) == 0)
{ //????????
ATR_V_POS(a1) = lpDraw->ySize + 16;
ATR_H_POS(a1) = lpDraw->xSize + SCREEN_OUT;
}
else
{
ATR_V_POS(a1) = -18;
ATR_H_POS(a1) = -SCREEN_OUT;
}
}
else
{
ATR_ATTRIB(a1) &= ~ACT_ATR_TRAVEL;
ATR_H_POS(a1) = ATR_INT_WORK0(a1) = monster_place_pos[monster_place_no[d2] * 2];
ATR_V_POS(a1) = ATR_INT_WORK1(a1) = monster_place_pos[monster_place_no[d2] * 2 + 1];
//????????????
set_raster_pos(a1);
}
//<2F>r??
ATR_VCT_NO(a1) = 0;
ATR_CHR_ACT(a1) = ANIM_STAND;
if (BattleBpFlag & BATTLE_BP_JOIN)
{ // <20>ӡP??
//???<3F><><EFBFBD><EFBFBD>
if (ATR_GROUP_FLG(a1) == 0)
ATR_CHR_ANG(a1) = 3;
else if (ATR_GROUP_FLG(a1) == 1)
ATR_CHR_ANG(a1) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a1) == 2)
ATR_CHR_ANG(a1) = 5;
else if (ATR_GROUP_FLG(a1) == 3)
ATR_CHR_ANG(a1) = 1;
#endif
ATR_CRS_OLD(a1) = ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
ATR_CHR_ACT(a1) = ANIM_WALK;
ATR_CHR_ACT_OLD(a1) = -1;
pattern(a1, ANM_NOMAL_SPD, ANM_LOOP);
}
}
}
//?<3F><>??
if (d0 & BC_DEATH)
{
if (ATR_VCT_NO(a1) == VCT_NO_APPEAR)
{ //?<3F><>??????
//?<3F><>???
ATR_VCT_NO(a1) = VCT_NO_DIE + 2;
ATR_H_POS(a1) = ATR_INT_WORK0(a1) = monster_place_pos[monster_place_no[d2] * 2];
ATR_V_POS(a1) = ATR_INT_WORK1(a1) = monster_place_pos[monster_place_no[d2] * 2 + 1];
//????????????
set_raster_pos(a1);
//????
ATR_LIFE(a1) = 0;
//?<3F><>???????
if (ATR_GROUP_FLG(a1) == 0)
ATR_CHR_ANG(a1) = 3;
else if (ATR_GROUP_FLG(a1) == 1)
ATR_CHR_ANG(a1) = 7;
#ifdef _BATTLE_PK_PLAYER_FOR_40
else if (ATR_GROUP_FLG(a1) == 2)
ATR_CHR_ANG(a1) = 5;
else if (ATR_GROUP_FLG(a1) == 3)
ATR_CHR_ANG(a1) = 1;
#endif
ATR_CRS_OLD(a1) = ATR_CRS(a1) = crs_change_tbl2[ATR_CHR_ANG(a1)];
ATR_CHR_ACT(a1) = ANIM_DEAD; //?<3F><>???????
ATR_CHR_ACT_OLD(a1) = -1;
while (1)
{
if (pattern(a1, 1, ANM_NO_LOOP)) //???<3F><>???
break;
}
//????<3F><><EFBFBD><EFBFBD>
LoadBmp(ATR_PAT_NO(a1));
#ifndef _PETSKILL_ANTINTER
set_piyo_loop(a1);
#endif
//?<3F><><EFBFBD>r?`
ATR_VCT_NO(p_master) = 3;
}
}
//???<3F><>?<3F>V?<3F>ϣ<EFBFBD>??
if (d0 & BC_PET_OK)
ATR_PET_OK(a1) = 1;
//??????<3F><>????????
if (ATR_JUJUTSU_WORK(a1) == NULL)
{
d3 = 0;
if (d0 & BC_BIT3) // "<22><>"??
d3 = 1;
else if (d0 & BC_BIT4) // "??"??
d3 = 2;
else if (d0 & BC_BIT5) // "<22><>?"??
d3 = 3;
else if (d0 & BC_BIT6) // "<22><>?"??
d3 = 4;
else if (d0 & BC_BIT7) // "??<3F><>?"??
d3 = 5;
else if (d0 & BC_BIT8) // "??"??
d3 = 6;
#ifdef _MAGIC_WEAKEN
if (d0 & BC_WEAKEN) //<2F><><EFBFBD><EFBFBD>
d3 = 7;
#endif
#ifdef _MAGIC_DEEPPOISION
if (d0 & BC_DEEPPOISON) //<2F>
d3 = 8;
#endif
#ifdef _MAGIC_BARRIER
if (d0 & BC_BARRIER) //ħ<><C4A7>
d3 = 9;
#endif
#ifdef _MAGIC_NOCAST
if (d0 & BC_NOCAST) //<2F><>Ĭ
d3 = 10;
#endif
#ifdef _SARS // WON ADD <20><>ɷ<EFBFBD><C9B7><EFBFBD><EFBFBD>
if (d0 & BC_SARS) // <20><>ɷ<EFBFBD><C9B7><EFBFBD><EFBFBD>
d3 = 11;
#endif
#ifdef _CHAR_PROFESSION // WON ADD <09><>ѣ
if (d0 & BC_DIZZY) // <20><>ѣ
d3 = 12;
if (d0 & BC_ENTWINE) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
d3 = 13;
if (d0 & BC_DRAGNET) // <20><><EFBFBD>޵<EFBFBD><DEB5><EFBFBD>
d3 = 14;
if (d0 & BC_ICECRACK) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
d3 = 15;
if (d0 & BC_OBLIVION) // <20><><EFBFBD><EFBFBD>
d3 = 16;
if (d0 & BC_ICEARROW) // <20><><EFBFBD><EFBFBD>
d3 = 17;
if (d0 & BC_BLOODWORMS)// <20><>Ѫ<EFBFBD><D1AA>
d3 = 18;
if (d0 & BC_SIGN) // һ<><D2BB><EFBFBD><EFBFBD>Ѫ
d3 = 19;
if (d0 & BC_CRAZY) // <20><><EFBFBD><EFBFBD>
d3 = 20;
if (d0 & BC_F_ENCLOSE) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
d3 = 21;
if (d0 & BC_I_ENCLOSE) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
d3 = 22;
if (d0 & BC_T_ENCLOSE) // <20>׸<EFBFBD><D7B8><EFBFBD>
d3 = 23;
#ifdef _PROFESSION_ADDSKILL
if (d0 & BC_WATER)
d3 = 32; // ˮ<><CBAE><EFBFBD><EFBFBD>
if (d0 & BC_WATER)
d3 = 33; // <20>־<EFBFBD>
//if (d0 & BC_F_I_T_ENCLOSE) // <20><><EFBFBD><EFBFBD><EFBFBD>׸<EFBFBD><D7B8><EFBFBD>
// d3 = 24;
#endif
#ifdef _PETSKILL_LER
if (d0 & BC_CHANGE)
d3 = 34; // <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>
#endif
#ifdef _PRO_KILLME
if (d0 & BC_ANGER)
d3 = 35; // ŭ
#endif
#endif
#ifdef _PETSKILL_LER
if (d0 & BC_CHANGE)
d3 = 34; // <20>׶<EFBFBD><D7B6><EFBFBD><EFBFBD><EFBFBD>
#endif
if (d3)
{ //?<3F><>?????
set_single_jujutsu(d3, a1); //<2F>O<EFBFBD>l<EFBFBD><6C><EFBFBD><EFBFBD>???
ATR_STATUS(a1) = d3; //????????
}
else
ATR_STATUS(a1) = 0; //?????<3F><><EFBFBD><EFBFBD>
}
//<2F>N<EFBFBD>ͧT<CDA7><54>????????
if (ATR_ATTRIB_WORK(a1) == NULL)
{
if (d0 & BC_REVERSE) //<2F>T<EFBFBD><54>??
set_attrib_reverse(a1); //<2F>N<EFBFBD>ͧT<CDA7><54>???
}
}
//<2F>K<EFBFBD>͢r??????
if (ATR_VCT_NO(p_master) != 3)
action_inf = 3; //<2F>K<EFBFBD><4B>?<3F><><EFBFBD><EFBFBD>?
}
// ??????<3F><>?? ????? ?************************************/
void disp_shild(void)
{
char box[] = { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0,
0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0,
0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
DDSURFACEDESC ddsd; // ??????<3F>B<EFBFBD>l
char d6, d7;
char *psource; // <20><>?<3F>I?????
ZeroMemory(&ddsd, sizeof(DDSURFACEDESC));
ddsd.dwSize = sizeof(DDSURFACEDESC);
// ?????????????????( <20>i?? ddsd ?<3F>ѩ<EFBFBD>?<3F>V????? )
if (lpDraw->lpBACKBUFFER->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL) != DD_OK)
{
//MessageBoxNew( hWnd, "Surface<63><65>lockʧ<6B>ܣ<EFBFBD>", "ȷ<><C8B7>", MB_OK | MB_ICONSTOP );
return;
}
psource = box; // <20><>???????
_asm{
// push eax
// push ebx
// push ecx
// push edx
// push esi
// push edi
mov edx, [ddsd.lpSurface] //<2F>I<EFBFBD>d????
add edx, 640 - 24 //
mov ebx, [ddsd.lPitch] //?????????
sub ebx, 16
mov al, 10 - 9 //????????
mov[d6], al //
disp_shild_100 :
mov al, 30 //????????
mov[d7], al //
mov edi, edx //<2F><><EFBFBD><EFBFBD>?<3F><>????
disp_shild_200 :
mov cl, 16 //?????????
// mov esi,edx
mov esi, [psource]
disp_shild_300 :
mov ch, 16 //?????????
loop_x :
mov al, [esi]
or al, al
je skip
mov[edi], al
skip :
inc esi
inc edi
dec ch
jne loop_x
add edi, ebx
dec cl
jne disp_shild_300
dec[d7]
jne disp_shild_200
add edx, 16 //
dec[d6]
jne disp_shild_100
// pop edi
// pop esi
// pop edx
// pop ecx
// pop ebx
// pop eax
}
// ???????????????????
if (lpDraw->lpBACKBUFFER->Unlock(NULL) != DD_OK)
{
extern int MessageBoxNew(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
MessageBoxNew(hWnd, "Surface<EFBFBD><EFBFBD>Unlockʧ<EFBFBD>ܣ<EFBFBD>", "ȷ<EFBFBD><EFBFBD>", MB_OK | MB_ICONSTOP);
return;
}
return;
}
void petfallChangeGraph(ACTION *a0)
{
//andy_fall
if (ATR_PETFALL(a0) != 1)
return;
if (ATR_RIDE(a0) != 1)
return;
#ifdef _PETSKILL_RIDE
a0->saveride = ATR_CHR_NO(a0);
#endif
for (int j = 0; j < sizeof(ridePetTable) / sizeof(tagRidePetTable); j++)
{
if (ridePetTable[j].rideNo == ATR_CHR_NO(a0))
{
ATR_CHR_NO(a0) = ridePetTable[j].charNo;
break;
}
}
ATR_PETFALL(a0) = 2;
//andy_fall
ATR_RIDE(a0) = 0;
}
#ifdef _PETSKILL_RIDE
void petrideChangeGraph(ACTION *a0,int ridebmp)
{
//andy_fall
//if (ATR_PETFALL(a0) != 2)
// return;
//if (ATR_RIDE(a0) != 0)
// return;
//if( a0->saveride == -1 )
// return;
ATR_CHR_NO(a0) = ridebmp;
ATR_PETFALL(a0) = 0;
//andy_fall
ATR_RIDE(a0) = 1;
ATR_RIDE_FLAG(a0) = 1;
}
#endif
void LogToBattleError(char *data, int line)
{
#ifdef _STONDEBUG_
FILE *rfp;
rfp = fopen("battleerror.txt", "a+");
if (rfp)
{
fprintf(rfp, "%d: %s\n", line, data);
fclose(rfp);
}
#endif
}