2017/1/15添加日语注释

添加日语注释
This commit is contained in:
chuyiwen 2017-01-15 06:21:15 +09:00
parent 1cb310b61a
commit 5adca5545f
17 changed files with 893 additions and 875 deletions

View File

@ -25,39 +25,40 @@
*/ */
#define ADDRESSBOOK_FIXEDMESSAGE_MAXLEN 128 #define ADDRESSBOOK_FIXEDMESSAGE_MAXLEN 128
/* 愤坌及蟆卞簿手中卅井匀凶及匹}失玉伊旦皮永弁卞馨笛匹五卅井匀凶 /* 自分の前に誰もいなかったので、アドレスブックに追加できなかった
*/ */
#define ADDRESSBOOK_CANTADD "那里没有任何人。" #define ADDRESSBOOK_CANTADD "那里没有任何人。"
#define ADDRESSBOOK_CANTADD2 "无法交换名片。" #define ADDRESSBOOK_CANTADD2 "无法交换名片。"
/* 簿井毛笛尹月仇午互匹五凶午五}笛尹方丹午仄凶谛卞霜耨允月丢永本□斥*/ /* 誰かを加えることができたとき、加えようとした人に送信するメッセージ*/
#define ADDRESSBOOK_ADDED "和%s交换名片 。" #define ADDRESSBOOK_ADDED "和%s交换名片 。"
/* 簿井卞涌毛创尹日木凶日 */ /* 誰かに顔を覚えられたら */
#define ADDRESSBOOK_BEINGADDED "和%s交换名片 。" #define ADDRESSBOOK_BEINGADDED "和%s交换名片 。"
/* 巨件玄伉互中匀天中分匀凶午五及丢永本□斥 */ /* エントリがいっぱいだったときのメッセージ */
#define ADDRESSBOOK_MYTABLEFULL "名片匣已满。" #define ADDRESSBOOK_MYTABLEFULL "名片匣已满。"
/* 锹澎及巨件玄伉互中匀天中分匀凶午五及丢永本□斥 */ /* 相手のエントリがいっぱいだったときのメッセージ */
#define ADDRESSBOOK_HISTABLEFULL "对方的名片匣已满。" #define ADDRESSBOOK_HISTABLEFULL "对方的名片匣已满。"
/* 丢永本□斥毛霜耨允月及卞岳 仄凶午五 */ /* メッセージを送信するのに成功したとき */
#define ADDRESSBOOK_SENT "送信给%s 。" #define ADDRESSBOOK_SENT "送信给%s 。"
/* 丢永本□斥毛霜耨允月及卞撩 仄凶午五 */ /* メッセージを送信するのに失敗したとき */
#define ADDRESSBOOK_UNSENT "无法送信给%s 。" #define ADDRESSBOOK_UNSENT "无法送信给%s 。"
/* 簿井毛创尹方丹午仄凶互}湃卞创尹化中凶 */ /* 誰かを覚えようとしたが、既に覚えていた */
#define ADDRESSBOOK_ALREADYADDED "已经和%s交换过名片了。 " #define ADDRESSBOOK_ALREADYADDED "已经和%s交换过名片了。 "
/* 铜毛域 读卞 丹橇谪 */ /* 名刺を一方的に貰う状態 */
#define ADDRESSBOOK_GIVEADDRESS "从%s得到名片。" #define ADDRESSBOOK_GIVEADDRESS "从%s得到名片。"
/* 铜毛域 读卞丐仆月橇谪 */ /* 名刺を一方的にあげる状態 */
#define ADDRESSBOOK_TAKEADDRESS1 "给%s自己的名片。" #define ADDRESSBOOK_TAKEADDRESS1 "给%s自己的名片。"
/* 铜毛域 读卞丐仆月橇谪 */ /* 名刺を一方的にあげる状態 */
#define ADDRESSBOOK_TAKEADDRESS2 "因为%s想要名片所以将名片给他了。" #define ADDRESSBOOK_TAKEADDRESS2 "因为%s想要名片所以将名片给他了。"
#define ADDRESSBOOK_RETURNED1 \ #define ADDRESSBOOK_RETURNED1 \
@ -70,7 +71,7 @@
"%s不在这个世界里所以无法寄送信件给他。" "%s不在这个世界里所以无法寄送信件给他。"
/* static匹银丹迕[ 五中袄手*/ /* staticで使う用。大きい値も*/
char ADDRESSBOOK_returnstring[25*128]; char ADDRESSBOOK_returnstring[25*128];
@ -80,20 +81,20 @@ static BOOL ADDRESSBOOK_makeEntryFromCharaindex( int charaindex,
ADDRESSBOOK_entry* ae); ADDRESSBOOK_entry* ae);
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* MSG皿夫玄戊伙井日勾井歹木月 * MSGプロトコルからつかわれる
* *
* connection井日cdkey匹腹绸仄化仿 * connectionからcdkeyで検索して
* MSG_send允月 * MSG_sendする
* *
* *
* cindex int 仿index * cindex int index
* aindex int index * aindex int index
* text char* * text char*
* color int * color int
* *
* 仿仿TRUE , * TRUE ,
* 仿 FALSE毛井尹允 * FALSEをかえす
------------------------------------------------------------*/ ------------------------------------------------------------*/
BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color ) BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color )
{ {
@ -124,16 +125,16 @@ BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color )
tm1.tm_mon +1, tm1.tm_mday, tm1.tm_hour, tm1.tm_min, tm1.tm_mon +1, tm1.tm_mday, tm1.tm_hour, tm1.tm_min,
text); text);
/* 扔□田□ 卞中月凛 */ /* 同サーバー内にいる時 */
for( i = 0 ; i < playernum ; i ++){ for( i = 0 ; i < playernum ; i ++){
if( CHAR_CHECKINDEX( i) && if( CHAR_CHECKINDEX( i) &&
strcmp( CHAR_getChar( i, CHAR_CDKEY), ae->cdkey) == 0 && strcmp( CHAR_getChar( i, CHAR_CDKEY), ae->cdkey) == 0 &&
strcmp( CHAR_getChar( i, CHAR_NAME), ae->charname) == 0 ) strcmp( CHAR_getChar( i, CHAR_NAME), ae->charname) == 0 )
{ {
/* /*
* CDKEY 仿 仿 * CDKEY
* * 調
* MSG允月 * MSGする
*/ */
int index_to_my_info = int index_to_my_info =
ADDRESSBOOK_getIndexInAddressbook( i , ADDRESSBOOK_getIndexInAddressbook( i ,
@ -142,8 +143,8 @@ BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color )
int fd; int fd;
if( index_to_my_info < 0 ){ if( index_to_my_info < 0 ){
/* /*
* *
* *
*/ */
//snprintf( tmpmsg, sizeof( tmpmsg), //snprintf( tmpmsg, sizeof( tmpmsg),
// ADDRESSBOOK_RETURNED1, // ADDRESSBOOK_RETURNED1,
@ -158,7 +159,7 @@ BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color )
CHAR_getChar( i, CHAR_NAME), CHAR_getChar( i, CHAR_NAME),
CHAR_getChar( i, CHAR_NAME)); CHAR_getChar( i, CHAR_NAME));
/* 霜曰潜卞手丢永本□斥 */ /* 送り主にもメッセージ */
CHAR_talkToCli( cindex, -1, CHAR_talkToCli( cindex, -1,
tmpmsg , CHAR_COLORYELLOW ); tmpmsg , CHAR_COLORYELLOW );
return FALSE; return FALSE;
@ -167,7 +168,7 @@ BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color )
fd = getfdFromCharaIndex( i); fd = getfdFromCharaIndex( i);
if( fd != -1 ) { if( fd != -1 ) {
lssproto_MSG_send( fd , index_to_my_info , textbuffer , color ); lssproto_MSG_send( fd , index_to_my_info , textbuffer , color );
/* 夫弘午曰 */ /* ログとり */
printl( LOG_TALK, "CD=%s\tNM=%s\tT=%s" , mycd, mycharaname, textbuffer ); printl( LOG_TALK, "CD=%s\tNM=%s\tT=%s" , mycd, mycharaname, textbuffer );
} }
@ -190,7 +191,7 @@ BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color )
return TRUE; return TRUE;
} }
} }
/* 苇勾井日卅井匀凶凛反]失市它件玄扔□田□卞霜月 */ /* 見つからなかった時は,アカウントサーバーに送る */
saacproto_Message_send( acfd, mycd, mycharaname, saacproto_Message_send( acfd, mycd, mycharaname,
ae->cdkey, ae->charname, textbuffer, color); ae->cdkey, ae->charname, textbuffer, color);
CHAR_setInt( cindex, CHAR_SENDMAILCOUNT, CHAR_setInt( cindex, CHAR_SENDMAILCOUNT,
@ -203,10 +204,10 @@ BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color )
return FALSE; return FALSE;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* saac msg 仿 * saac msg
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
BOOL ADDRESSBOOK_sendMessage_FromOther( char *fromcdkey, char *fromcharaname, BOOL ADDRESSBOOK_sendMessage_FromOther( char *fromcdkey, char *fromcharaname,
char *tocdkey, char *tocharaname, char *tocdkey, char *tocharaname,
@ -218,7 +219,7 @@ BOOL ADDRESSBOOK_sendMessage_FromOther( char *fromcdkey, char *fromcharaname,
char tmpmsg[256]; char tmpmsg[256];
int playernum = CHAR_getPlayerMaxNum(); int playernum = CHAR_getPlayerMaxNum();
/* 扔□田□ 毛腹绸允月 */ /* サーバー内を検索する */
for( i = 0 ; i < playernum ; i ++){ for( i = 0 ; i < playernum ; i ++){
if( CHAR_CHECKINDEX( i) && if( CHAR_CHECKINDEX( i) &&
strcmp( CHAR_getChar( i, CHAR_CDKEY), tocdkey) == 0 && strcmp( CHAR_getChar( i, CHAR_CDKEY), tocdkey) == 0 &&
@ -226,16 +227,17 @@ BOOL ADDRESSBOOK_sendMessage_FromOther( char *fromcdkey, char *fromcharaname,
{ {
int index_to_my_info; int index_to_my_info;
/* /*
* CDKEY 仿 仿 * CDKEY
* * 調
* MSG允月 * MSGする
*/ */
/* 扑旦 丞丢永本□斥互窖匀化五凶 */ /* システムメッセージが帰ってきた */
if( strcmp( fromcdkey, ADDRESSBOOK_SYSTEM) == 0 && if( strcmp( fromcdkey, ADDRESSBOOK_SYSTEM) == 0 &&
strcmp( fromcharaname, ADDRESSBOOK_SYSTEM ) == 0 ) strcmp( fromcharaname, ADDRESSBOOK_SYSTEM ) == 0 )
{ {
/* 扑旦 丞丢永本□斥毛龚仁 */ /* システムメッセージを吐く */
CHAR_talkToCli( i, -1, text , color ); CHAR_talkToCli( i, -1, text , color );
break; break;
} }
@ -245,13 +247,13 @@ BOOL ADDRESSBOOK_sendMessage_FromOther( char *fromcdkey, char *fromcharaname,
fromcdkey, fromcharaname); fromcdkey, fromcharaname);
if( index_to_my_info < 0 ){ if( index_to_my_info < 0 ){
/* /*
* *
*/ */
snprintf( tmpmsg, sizeof( tmpmsg), ADDRESSBOOK_RETURNED2, snprintf( tmpmsg, sizeof( tmpmsg), ADDRESSBOOK_RETURNED2,
tocharaname, tocharaname); tocharaname, tocharaname);
/* 霜曰潜卞手丢永本□斥 */ /* 送り主にもメッセージ */
saacproto_Message_send( acfd, ADDRESSBOOK_SYSTEM , ADDRESSBOOK_SYSTEM, saacproto_Message_send( acfd, ADDRESSBOOK_SYSTEM , ADDRESSBOOK_SYSTEM,
fromcdkey, fromcharaname, tmpmsg, CHAR_COLORYELLOW); fromcdkey, fromcharaname, tmpmsg, CHAR_COLORYELLOW);
@ -260,7 +262,7 @@ BOOL ADDRESSBOOK_sendMessage_FromOther( char *fromcdkey, char *fromcharaname,
int fd = getfdFromCharaIndex( i); int fd = getfdFromCharaIndex( i);
if( fd != -1 ) { if( fd != -1 ) {
lssproto_MSG_send( fd , index_to_my_info , text , color ); lssproto_MSG_send( fd , index_to_my_info , text , color );
/* 夫弘午曰 */ /* ログとり */
printl( LOG_TALK, "CD=%s\tNM=%s\tT=%s" , fromcdkey, printl( LOG_TALK, "CD=%s\tNM=%s\tT=%s" , fromcdkey,
fromcharaname, text ); fromcharaname, text );
} }
@ -553,7 +555,7 @@ BOOL ADDRESSBOOK_sendAddressbookTable( int cindex )
char charname_escaped[CHARNAMELEN*2]; char charname_escaped[CHARNAMELEN*2];
makeEscapeString( ae->charname, charname_escaped , makeEscapeString( ae->charname, charname_escaped ,
sizeof(charname_escaped )); sizeof(charname_escaped ));
/* 银迕白仿弘| 蟆|伊矛伙|仿奶白|白仿弘 */ /* 使用フラグ|名前|レベル|ライフ|フラグ */
snprintf( tmp , sizeof( tmp ), snprintf( tmp , sizeof( tmp ),
"%d|%s|%d|%d|%d|%d|%d|0|" , "%d|%s|%d|%d|%d|%d|%d|0|" ,
ae->use, ae->use,
@ -568,7 +570,7 @@ BOOL ADDRESSBOOK_sendAddressbookTable( int cindex )
break; break;
} }
}else{ }else{
/*银匀化卅中犯□正手冲徇及心匹霜月 */ /*使ってないデータも縦棒のみで送る */
char tmp[32]; char tmp[32];
snprintf( tmp , sizeof( tmp ), "||||||||" ); snprintf( tmp , sizeof( tmp ), "||||||||" );
strcpysafe ( ADDRESSBOOK_returnstring + stringlen , strcpysafe ( ADDRESSBOOK_returnstring + stringlen ,
@ -642,12 +644,12 @@ BOOL ADDRESSBOOK_sendAddressbookTableOne( int cindex, int num )
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* 仿仿 *
* *
* *
* a ADDRESSBOOK_entry* * a ADDRESSBOOK_entry*
* *
* char * * char *
------------------------------------------------------------*/ ------------------------------------------------------------*/
char *ADDRESSBOOK_makeAddressbookString( ADDRESSBOOK_entry *a ) char *ADDRESSBOOK_makeAddressbookString( ADDRESSBOOK_entry *a )
@ -655,7 +657,7 @@ char *ADDRESSBOOK_makeAddressbookString( ADDRESSBOOK_entry *a )
char work1[256], work2[256]; char work1[256], work2[256];
if( a->use == 0 ){ if( a->use == 0 ){
/* 坞巨件玄伉分匀凶日坞 侬 */ /* 空エントリだったら空文字列 */
ADDRESSBOOK_returnstring[0] = '\0'; ADDRESSBOOK_returnstring[0] = '\0';
return ADDRESSBOOK_returnstring; return ADDRESSBOOK_returnstring;
} }
@ -672,13 +674,13 @@ char *ADDRESSBOOK_makeAddressbookString( ADDRESSBOOK_entry *a )
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* use动陆及树 * use以外の情報は完璧になる
* *
* in char* * in char*
* a ADDRESSBOOK_entry* * a ADDRESSBOOK_entry*
* *
* TRUE * TRUE
------------------------------------------------------------*/ ------------------------------------------------------------*/
BOOL ADDRESSBOOK_makeAddressbookEntry( char *in , ADDRESSBOOK_entry *a ) BOOL ADDRESSBOOK_makeAddressbookEntry( char *in , ADDRESSBOOK_entry *a )
{ {

File diff suppressed because it is too large Load Diff

View File

@ -942,7 +942,7 @@ static char* CHAR_setintdata[CHAR_DATAINTNUM]={
"fl", /* CHAR_FLOOR */ "fl", /* CHAR_FLOOR */
"x", /* CHAR_X */ "x", /* CHAR_X */
"y", /* CHAR_Y */ "y", /* CHAR_Y */
"dir", /* CHAR_DIR 12凛毛0卞凛煌璃曰卞 */ "dir", /* CHAR_DIR 12時を0に時計周りに */
"lv", /* CHAR_LV */ "lv", /* CHAR_LV */
"gld", /* CHAR_GOLD */ "gld", /* CHAR_GOLD */
@ -957,10 +957,10 @@ static char* CHAR_setintdata[CHAR_DATAINTNUM]={
"chr", /* CHAR_CHARM */ "chr", /* CHAR_CHARM */
"luc", /* CHAR_LUCK */ "luc", /* CHAR_LUCK */
"aea", /* 哗箪岭 */ "aea", /* 地属性 */
"awa", /* 箪岭 */ "awa", /* 水属性 */
"afi", /* 绍箪岭 */ "afi", /* 火属性 */
"awi", /* 氘箪岭 */ "awi", /* 風属性 */
"slt", /* CHAR_SLOT */ "slt", /* CHAR_SLOT */
"cr", /* CHAR_CRITIAL */ "cr", /* CHAR_CRITIAL */
@ -1623,7 +1623,7 @@ INLINE BOOL _CHAR_setFlg( char *file, int line, int index , CHAR_DATACHAR elemen
elementnum = element / (sizeof( char )*8); elementnum = element / (sizeof( char )*8);
bitnum = element % (sizeof( char )*8); bitnum = element % (sizeof( char )*8);
/* 樯及袄毛转 */ /* 昔の値を退避 */
buf = CHAR_chara[index].flg[elementnum] buf = CHAR_chara[index].flg[elementnum]
& CHAR_flgbitmaskpattern[bitnum]; & CHAR_flgbitmaskpattern[bitnum];

View File

@ -47,73 +47,73 @@ typedef struct tagdefaultCharcterGet
static defaultCharacterGet CHAR_defaultCharacterGet[]= static defaultCharacterGet CHAR_defaultCharacterGet[]=
{ {
/* CHAR_DEFAULTPLAYER */ /* CHAR_DEFAULTPLAYER */
//阂间裆ㄠ //子供男1
{SPR_001em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, {SPR_001em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY},
{SPR_002em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, {SPR_002em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY},
{SPR_003em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, {SPR_003em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY},
{SPR_004em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, {SPR_004em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY},
//剂 ㄠ //少年1
{SPR_011em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_011em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
{SPR_012em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_012em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
{SPR_013em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_013em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
{SPR_014em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_014em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
//剂 ㄡ //少年2
{SPR_021em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_021em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
{SPR_022em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_022em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
{SPR_023em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_023em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
{SPR_024em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_024em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
//剂 ㄢ //少年3
{SPR_031em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_031em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
{SPR_032em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_032em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
{SPR_033em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_033em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
{SPR_034em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, {SPR_034em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY},
//敛 ㄠ //青年1
{SPR_041em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, {SPR_041em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN},
{SPR_042em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, {SPR_042em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN},
{SPR_043em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, {SPR_043em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN},
{SPR_044em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, {SPR_044em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN},
//敛 ㄡ //青年2
{SPR_051em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, {SPR_051em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN},
{SPR_052em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, {SPR_052em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN},
{SPR_053em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, {SPR_053em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN},
{SPR_054em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, {SPR_054em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN},
//阂间辉ㄠ //子供女1
{SPR_061em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, {SPR_061em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL},
{SPR_062em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, {SPR_062em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL},
{SPR_063em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, {SPR_063em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL},
{SPR_064em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, {SPR_064em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL},
//剂辉ㄠ //少女1
{SPR_071em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_071em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
{SPR_072em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_072em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
{SPR_073em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_073em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
{SPR_074em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_074em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
//剂辉ㄡ //少女2
{SPR_081em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_081em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
{SPR_082em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_082em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
{SPR_083em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_083em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
{SPR_084em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_084em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
//剂辉ㄢ //少女3
{SPR_091em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_091em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
{SPR_092em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_092em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
{SPR_093em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_093em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
{SPR_094em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, {SPR_094em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL},
//辉岭ㄠ //女性1
{SPR_101em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, {SPR_101em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN},
{SPR_102em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, {SPR_102em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN},
{SPR_103em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, {SPR_103em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN},
{SPR_104em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, {SPR_104em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN},
//辉岭ㄡ //女性2
{SPR_111em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, {SPR_111em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN},
{SPR_112em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, {SPR_112em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN},
{SPR_113em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, {SPR_113em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN},
@ -207,11 +207,11 @@ BOOL CHAR_checkPlayerImageNumber( int imagenumber)
else return TRUE; else return TRUE;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* *
* number = * number =
* CG_CHR_MAKE_FACE + (number*100) + ( number * 25) + ( * 5 ) + * CG_CHR_MAKE_FACE + (number*100) + (number * 25) + ( * 5 ) +
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
BOOL CHAR_checkFaceImageNumber( int imagenumber, int faceimagenumber) BOOL CHAR_checkFaceImageNumber( int imagenumber, int faceimagenumber)
@ -224,9 +224,9 @@ BOOL CHAR_checkFaceImageNumber( int imagenumber, int faceimagenumber)
if( image != number + color ) return FALSE; if( image != number + color ) return FALSE;
return TRUE; return TRUE;
} }
// 平乓仿 飓 □皮伙[ㄠ 丐凶曰隶 ㄤ潘 // キャラ画像テーブル。1体あたり装備5種類
int CHAR_eqimagetbl[][5]={ int CHAR_eqimagetbl[][5]={
// 允匹 轺徇 键 菰 // すで 斧     棍棒 槍 弓
{ SPR_001em,SPR_001ax,SPR_001cl,SPR_001sp,SPR_001bw }, { SPR_001em,SPR_001ax,SPR_001cl,SPR_001sp,SPR_001bw },
{ SPR_002em,SPR_002ax,SPR_002cl,SPR_002sp,SPR_002bw }, { SPR_002em,SPR_002ax,SPR_002cl,SPR_002sp,SPR_002bw },
{ SPR_003em,SPR_003ax,SPR_003cl,SPR_003sp,SPR_003bw }, { SPR_003em,SPR_003ax,SPR_003cl,SPR_003sp,SPR_003bw },
@ -313,18 +313,18 @@ int CHAR_eqimagetbl[][5]={
}; };
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* basebaseimagenumber int * basebaseimagenumber int
* category ITEM_CATEGORY * category ITEM_CATEGORY
* *
* 仿-1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int CHAR_getNewImagenumberFromEquip( int basebaseimagenumber, int CHAR_getNewImagenumberFromEquip( int basebaseimagenumber,
ITEM_CATEGORY category ) ITEM_CATEGORY category )
{ {
int i; int i;
/* ITEM_CATEGORY 民尼永弁 */ /* ITEM_CATEGORY チェック */
if( category < 0 || category > arraysizeof(CHAR_eqimagetbl[0]) ) if( category < 0 || category > arraysizeof(CHAR_eqimagetbl[0]) )
return -1; return -1;
for( i=0 ; i<arraysizeof(CHAR_eqimagetbl) ; i++ ){ for( i=0 ; i<arraysizeof(CHAR_eqimagetbl) ; i++ ){
@ -338,10 +338,10 @@ int CHAR_getNewImagenumberFromEquip( int basebaseimagenumber,
/*------------------------------------------------------------ /*------------------------------------------------------------
* hash * hash
* *
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
/* /*
void CHAR_initSeekGraphicNumberFromString( void ) void CHAR_initSeekGraphicNumberFromString( void )
@ -381,12 +381,12 @@ void CHAR_initSeekGraphicNumberFromString( void )
} }
*/ */
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* string char* * string char*
* *
* 仿 -1 * -1
* 仿 *
------------------------------------------------------------*/ ------------------------------------------------------------*/
int CHAR_seekGraphicNumberFromString( char* string ) int CHAR_seekGraphicNumberFromString( char* string )
{ {
@ -394,7 +394,7 @@ int CHAR_seekGraphicNumberFromString( char* string )
int i; int i;
int ret; int ret;
/* 公及引引及醒侬分匀凶日公及引引忒允[ */ /* そのままの数字だったらそのまま返す。 */
if( strtolchecknum( string, &ret,10,INT ) )return ret; if( strtolchecknum( string, &ret,10,INT ) )return ret;
hashvalue = hashpjw( string ); hashvalue = hashpjw( string );
@ -409,8 +409,8 @@ int CHAR_seekGraphicNumberFromString( char* string )
/*==================== 衬桦赭====================*/ /*====================無敵場所====================*/
/* 衬桦赭毛忡 允月 */ /* 無敵場所を保持する */
typedef struct tagCHAR_invinsibleArea typedef struct tagCHAR_invinsibleArea
{ {
CHAR_AREAKIND kind; CHAR_AREAKIND kind;
@ -422,12 +422,12 @@ CHAR_invincibleArea* CHAR_invarea;
int CHAR_invareanum; int CHAR_invareanum;
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* filename char* * filename char*
* *
* TRUE(1) * TRUE(1)
* FALSE(0) * FALSE(0)
*------------------------------------------------------------*/ *------------------------------------------------------------*/
BOOL CHAR_initInvinciblePlace( char* filename ) BOOL CHAR_initInvinciblePlace( char* filename )
{ {
@ -444,7 +444,7 @@ BOOL CHAR_initInvinciblePlace( char* filename )
CHAR_invareanum=0; CHAR_invareanum=0;
/* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ /* まず有効な行が何行あるかどうか調べる */
while( fgets( line, sizeof( line ), f ) ){ while( fgets( line, sizeof( line ), f ) ){
linenum ++; linenum ++;
if( line[0] == '#' )continue; /* comment */ if( line[0] == '#' )continue; /* comment */
@ -468,7 +468,7 @@ BOOL CHAR_initInvinciblePlace( char* filename )
fclose( f ); fclose( f );
return FALSE; return FALSE;
} }
/* 赓渝祭 */ /* 初期化 */
{ {
int i; int i;
for( i = 0; i < CHAR_invareanum; i ++ ) { for( i = 0; i < CHAR_invareanum; i ++ ) {
@ -672,7 +672,7 @@ BOOL CHAR_initAppearPosition( char* filename )
char token[256]; char token[256];
int ret; int ret;
/* 夫午勾户及玄□弁件毛苇月 */ /* ひとつめのトークンを見る */
ret = getStringFromIndexWithDelim( line," ",1,token, ret = getStringFromIndexWithDelim( line," ",1,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -794,15 +794,15 @@ BOOL CHAR_getInitElderPosition( Char* ch,int hometown)
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* elderindex int * elderindex int
* fl int* * fl int*
* x int* x毛熬仃潸月桦赭 * x int* xを受け取る場所
* y int* y毛熬仃潸月桦赭 * y int* yを受け取る場所
* *
* TRUE(1) * TRUE(1)
* FALSE(0) * FALSE(0)
------------------------------------------------------------*/ ------------------------------------------------------------*/
BOOL CHAR_getElderPosition( int elderindex, int* fl, int* x, int* y ) BOOL CHAR_getElderPosition( int elderindex, int* fl, int* x, int* y )
{ {
@ -814,14 +814,14 @@ BOOL CHAR_getElderPosition( int elderindex, int* fl, int* x, int* y )
return TRUE; return TRUE;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* NPC互愤坌及赓渝祭及午五卞 * NPCが自分の初期化のときに
* *
* *
* index int FALSE * index int FALSE
* fl int * fl int
* x int * x int
* y int * y int
* NPC及伙 * NPCのルーチンから使われるのだ
------------------------------------------------------------*/ ------------------------------------------------------------*/
BOOL CHAR_ElderSetPosition( int elderindex ,int fl,int x ,int y) BOOL CHAR_ElderSetPosition( int elderindex ,int fl,int x ,int y)
{ {
@ -1013,7 +1013,7 @@ static int EnemyExpTbl[]={
// 酵烂读卅烦董袄煌遥 // 暫定的な経験値計算
int GetEnemyExp( int level ){ int GetEnemyExp( int level ){
/* /*
int exp = 0; int exp = 0;
@ -1390,7 +1390,7 @@ int CHAR_PetLevelUp( int petindex )
#ifdef _TEACHER_SYSTEM #ifdef _TEACHER_SYSTEM
int iGetFame = 0; int iGetFame = 0;
#endif #endif
// 娄醒民尼永弁 // 引数チェック
if( CHAR_CHECKINDEX( petindex ) == FALSE ) return -1; if( CHAR_CHECKINDEX( petindex ) == FALSE ) return -1;
if( CHAR_getInt( petindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET && if( CHAR_getInt( petindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET &&
CHAR_getInt( petindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYERNPC && CHAR_getInt( petindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYERNPC &&
@ -1398,32 +1398,32 @@ int CHAR_PetLevelUp( int petindex )
LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT );
// 矢永玄及仿件弁 // ペットのランク
petrank = CHAR_getInt( petindex, CHAR_PETRANK ); petrank = CHAR_getInt( petindex, CHAR_PETRANK );
if( petrank < 0 || petrank > 5 ) petrank = 0; if( petrank < 0 || petrank > 5 ) petrank = 0;
// //取得
vital = (float)(( LevelUpPoint >> 24 ) & 0xFF); vital = (float)(( LevelUpPoint >> 24 ) & 0xFF);
str = (float)(( LevelUpPoint >> 16 ) & 0xFF); str = (float)(( LevelUpPoint >> 16 ) & 0xFF);
tgh = (float)(( LevelUpPoint >> 8 ) & 0xFF); tgh = (float)(( LevelUpPoint >> 8 ) & 0xFF);
dex = (float)(( LevelUpPoint >> 0 ) & 0xFF); dex = (float)(( LevelUpPoint >> 0 ) & 0xFF);
// ㄠㄟ荚ㄣ 扔奶戊夫毛蕊匀化备嫩 卞ㄠ箫允 // 10回4面体サイコロを振って各項目に1足す
for( i = 0; i < 10; i ++ ){ for( i = 0; i < 10; i ++ ){
Param[RAND( 0, 3 )] += 1.0; Param[RAND( 0, 3 )] += 1.0;
} }
// 仿件弁卞方月 区及仿件母丞 // ランクによる範囲のランダム
fRand = (float)RAND( RankRandTbl[petrank].min, RankRandTbl[petrank].max ) fRand = (float)RAND( RankRandTbl[petrank].min, RankRandTbl[petrank].max )
* 0.01; * 0.01;
// 喃曰蕊曰禾奶件玄方曰煌遥 // 割り振りポイントより計算
vital = (float)vital * fRand + Param[0] * fRand; vital = (float)vital * fRand + Param[0] * fRand;
str = (float)str * fRand + Param[1] * fRand; str = (float)str * fRand + Param[1] * fRand;
tgh = (float)tgh * fRand + Param[2] * fRand; tgh = (float)tgh * fRand + Param[2] * fRand;
dex = (float)dex * fRand + Param[3] * fRand; dex = (float)dex * fRand + Param[3] * fRand;
// 煌遥 // 計算
CHAR_setInt( petindex, CHAR_VITAL, CHAR_setInt( petindex, CHAR_VITAL,
CHAR_getInt( petindex, CHAR_VITAL ) + (int)vital ); CHAR_getInt( petindex, CHAR_VITAL ) + (int)vital );
CHAR_setInt( petindex, CHAR_STR, CHAR_setInt( petindex, CHAR_STR,

View File

@ -54,7 +54,7 @@ void CHAR_allpostwalk( int index )
BOOL CHAR_makeCADefaultString( int objindex,char* buf,int buflen, int act ) BOOL CHAR_makeCADefaultString( int objindex,char* buf,int buflen, int act )
{ {
char objindexbuf[64]; char objindexbuf[64];
/* 民尼永弁 */ /* チェック */
if( CHECKOBJECT(objindex) == FALSE ) return FALSE; if( CHECKOBJECT(objindex) == FALSE ) return FALSE;
if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE; if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE;
snprintf( buf,buflen,"%s|%d|%d|%d|%d", snprintf( buf,buflen,"%s|%d|%d|%d|%d",
@ -260,8 +260,8 @@ void CHAR_sendWallDamage( int charaindex,int x, int y, int damage )
static struct ParamShow static struct ParamShow
{ {
int paramindex; /* 由仿丢□正及奶件犯永弁旦 */ int paramindex; /* パラメータのインデックス */
char* offmessage; /* 匀凶凛及丢永本□斥 侬 */ char* offmessage; /* 直った時のメッセージ文字列 */
}pShow[]={ }pShow[]={
{CHAR_PARALYSIS, CHAR_RECOVERPARALYSISSTRING}, {CHAR_PARALYSIS, CHAR_RECOVERPARALYSISSTRING},
{CHAR_SLEEP, CHAR_RECOVERSILENCESTRING}, {CHAR_SLEEP, CHAR_RECOVERSILENCESTRING},

View File

@ -639,7 +639,7 @@ void CHAR_moveEquipItem( int index, int fromindex, int toindex )
#define MOVEITEM_ITEMTOEQUIP 1 << 1 #define MOVEITEM_ITEMTOEQUIP 1 << 1
#define MOVEITEM_ITEMTOITEM 1 << 2 #define MOVEITEM_ITEMTOITEM 1 << 2
int fromid; /* item 匹及奶件犯永弁旦 */ int fromid; /* item配列でのインデックス */
unsigned int moved_any = 0; unsigned int moved_any = 0;
@ -839,12 +839,12 @@ void CHAR_ItemUse( int charaindex, int to_charaindex, int haveitemindex )
if( usefunc ){ if( usefunc ){
{ {
LogItem( LogItem(
CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿抩 */ CHAR_getChar( charaindex, CHAR_NAME ), /* キャラ名 */
CHAR_getChar( charaindex, CHAR_CDKEY ), CHAR_getChar( charaindex, CHAR_CDKEY ),
#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 #ifdef _add_item_log_name // WON ADD 在item的log中增加item名称
itemindex, itemindex,
#else #else
ITEM_getInt( itemindex, ITEM_ID ), /* 失奶泛丞?寞 */ ITEM_getInt( itemindex, ITEM_ID ), /* アイテム番号 */
#endif #endif
"Use(使用道具)", "Use(使用道具)",
CHAR_getInt( charaindex,CHAR_FLOOR), CHAR_getInt( charaindex,CHAR_FLOOR),
@ -944,12 +944,12 @@ BOOL CHAR_DropItemFXY( int charaindex, int itemcharaindex, int fl,
sprintf(tmpbuf,"丢弃 %s (道具消失时间%d秒)。",ITEM_getChar( itemindex, ITEM_NAME),getItemdeletetime()); sprintf(tmpbuf,"丢弃 %s (道具消失时间%d秒)。",ITEM_getChar( itemindex, ITEM_NAME),getItemdeletetime());
CHAR_talkToCli( charaindex, -1, tmpbuf, CHAR_COLORYELLOW ); CHAR_talkToCli( charaindex, -1, tmpbuf, CHAR_COLORYELLOW );
LogItem( LogItem(
CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ CHAR_getChar( charaindex, CHAR_NAME ), /* キャラ名 */
CHAR_getChar( charaindex, CHAR_CDKEY ), CHAR_getChar( charaindex, CHAR_CDKEY ),
#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 #ifdef _add_item_log_name // WON ADD 在item的log中增加item名称
itemindex, itemindex,
#else #else
ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ ITEM_getInt( itemindex, ITEM_ID ), /* アイテム番号 */
#endif #endif
"Drop(丢出道具)", "Drop(丢出道具)",
CHAR_getInt( charaindex,CHAR_FLOOR), CHAR_getInt( charaindex,CHAR_FLOOR),
@ -1909,9 +1909,9 @@ void CHAR_PickUpItem( int charaindex, int dir )
snprintf( mesg,sizeof(mesg), "拾获 %s", p); snprintf( mesg,sizeof(mesg), "拾获 %s", p);
CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE);
} }
// 矢永玄毛胶匀凶夫弘 // ペットを拾ったログ
LogPet( LogPet(
CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ CHAR_getChar( charaindex, CHAR_NAME ), /* キャラ名 */
CHAR_getChar( charaindex, CHAR_CDKEY ), CHAR_getChar( charaindex, CHAR_CDKEY ),
CHAR_getChar( contents, CHAR_NAME), CHAR_getChar( contents, CHAR_NAME),
CHAR_getInt( contents, CHAR_LV), CHAR_getInt( contents, CHAR_LV),
@ -1926,7 +1926,7 @@ void CHAR_PickUpItem( int charaindex, int dir )
// Robin 0701 petFollow // Robin 0701 petFollow
case 3: case 3:
/* 引歹曰卞仇木毛壅六午中丹 */ /* まわりにこれを消せという */
CHAR_ObjectDelete(objindex); CHAR_ObjectDelete(objindex);
CHAR_setWorkInt( contents, CHAR_WORKOBJINDEX, -1); CHAR_setWorkInt( contents, CHAR_WORKOBJINDEX, -1);
{ {
@ -1940,9 +1940,9 @@ void CHAR_PickUpItem( int charaindex, int dir )
snprintf( mesg,sizeof(mesg), "拾回 %s", p); snprintf( mesg,sizeof(mesg), "拾回 %s", p);
CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE);
} }
// 矢永玄毛胶匀凶夫弘 // ペットを拾ったログ
LogPet( LogPet(
CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ CHAR_getChar( charaindex, CHAR_NAME ), /* キャラ名 */
CHAR_getChar( charaindex, CHAR_CDKEY ), CHAR_getChar( charaindex, CHAR_CDKEY ),
CHAR_getChar( contents, CHAR_NAME), CHAR_getChar( contents, CHAR_NAME),
CHAR_getInt( contents, CHAR_LV), CHAR_getInt( contents, CHAR_LV),
@ -1980,23 +1980,23 @@ void CHAR_PickUpItem( int charaindex, int dir )
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* CHAR_DropMoney井日及心匹银丹仪 * CHAR_DropMoneyからのみで使う事
* *
* charaindex int 仿 * charaindex int
* itemindex int (仿 ) * itemindex int ()
* fl int * fl int
* x int x * x int x
* y int y * y int y
* force BOOL * force BOOL
* objindex int* Object * objindex int* Object
* *
* ( ) -1 * () -1
* () -2 * () -2
* -3 * -3
* () -4 * () -4
* -5 * -5
* -6 * -6
* 0 * 0
------------------------------------------------------------*/ ------------------------------------------------------------*/
static BOOL CHAR_DropMoneyFXY( int charaindex, int amount, int fl , int x, static BOOL CHAR_DropMoneyFXY( int charaindex, int amount, int fl , int x,
int y, BOOL force, int* objindex ) int y, BOOL force, int* objindex )
@ -2031,10 +2031,10 @@ static BOOL CHAR_DropMoneyFXY( int charaindex, int amount, int fl , int x,
#ifdef _DEL_DROP_GOLD #ifdef _DEL_DROP_GOLD
OBJECT_setTime( index, NowTime.tv_sec); OBJECT_setTime( index, NowTime.tv_sec);
#endif #endif
if( amount >= 100 ){ /* 云嗯毛 中凶夫弘 */ if( amount >= 100 ){ /* お金を置いたログ */
LogStone(-1,CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ LogStone(-1,CHAR_getChar( charaindex, CHAR_NAME ), /* キャラ名 */
CHAR_getChar( charaindex, CHAR_CDKEY ), /* 交□扒□ID */ CHAR_getChar( charaindex, CHAR_CDKEY ), /* ユーザーID */
amount, /* 嗯喊 */ amount, /* 金額 */
CHAR_getInt( charaindex, CHAR_GOLD ), CHAR_getInt( charaindex, CHAR_GOLD ),
"Drop(放置金钱)", "Drop(放置金钱)",
CHAR_getInt( charaindex,CHAR_FLOOR), CHAR_getInt( charaindex,CHAR_FLOOR),
@ -2047,12 +2047,12 @@ static BOOL CHAR_DropMoneyFXY( int charaindex, int amount, int fl , int x,
if( force==TRUE ) if( force==TRUE )
continue; continue;
else else
/* 允匹卞失奶 丞互丐月及匹分户 */ /* すでにアイテムがあるのでだめ */
return -5; return -5;
} }
} }
/* 仇仇引匹谗琼允月午中丹仪反蕙筋瓒 允月 */ /* ここまで到達するという事は新規登録する */
{ {
Object one; Object one;
one.type = OBJTYPE_GOLD; one.type = OBJTYPE_GOLD;
@ -2065,22 +2065,22 @@ static BOOL CHAR_DropMoneyFXY( int charaindex, int amount, int fl , int x,
one.index = amount; one.index = amount;
*objindex = initObjectOne( &one ); *objindex = initObjectOne( &one );
/* 左皮斥尼弁玄瓒 允月 */ /* オブジェクト登録する */
if( *objindex == -1 ) if( *objindex == -1 )
/* 瓒 撩 */ /* 登録失敗 */
return -3; return -3;
/*云嗯毛蛹日允*/ /*お金を減らす*/
CHAR_setInt(charaindex,CHAR_GOLD, CHAR_setInt(charaindex,CHAR_GOLD,
(unsigned int)CHAR_getInt(charaindex,CHAR_GOLD ) (unsigned int)CHAR_getInt(charaindex,CHAR_GOLD )
- amount ); - amount );
#ifdef _DEL_DROP_GOLD #ifdef _DEL_DROP_GOLD
OBJECT_setTime( *objindex, NowTime.tv_sec); OBJECT_setTime( *objindex, NowTime.tv_sec);
#endif #endif
if( amount >= 100 ){ /* 云嗯毛 中凶夫弘 */ if( amount >= 100 ){ /* お金を置いたログ */
LogStone(-1,CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ LogStone(-1,CHAR_getChar( charaindex, CHAR_NAME ), /* キャラ名 */
CHAR_getChar( charaindex, CHAR_CDKEY ), /* 交□扒□ID */ CHAR_getChar( charaindex, CHAR_CDKEY ), /* ユーザーID */
amount, /* 嗯喊 */ amount, /* 金額 */
CHAR_getInt( charaindex, CHAR_GOLD ), CHAR_getInt( charaindex, CHAR_GOLD ),
"Drop(放置金钱)", "Drop(放置金钱)",
CHAR_getInt( charaindex,CHAR_FLOOR), CHAR_getInt( charaindex,CHAR_FLOOR),
@ -2093,13 +2093,13 @@ static BOOL CHAR_DropMoneyFXY( int charaindex, int amount, int fl , int x,
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* charaindex int 仿 * charaindex int
* amount int * amount int
* *
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
void CHAR_DropMoney( int charaindex, int amount ) void CHAR_DropMoney( int charaindex, int amount )
{ {
@ -2313,7 +2313,7 @@ int CHAR_pickupFollowPet( int charaindex, int pickupindex )
if( (pickupindex == -1) || (pickupindex == CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ) ) ) if( (pickupindex == -1) || (pickupindex == CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ) ) )
CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 ); CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 );
/* CDKEY 午平乓仿 互域谯仄卅中午五反胶尹卅中 */ /* CDKEY とキャラ名が一致しないときは拾えない */
if( strcmp( CHAR_getChar( petindex, CHAR_OWNERCDKEY), CHAR_getChar( charaindex, CHAR_CDKEY)) != 0 || if( strcmp( CHAR_getChar( petindex, CHAR_OWNERCDKEY), CHAR_getChar( charaindex, CHAR_CDKEY)) != 0 ||
strcmp( CHAR_getChar( petindex, CHAR_OWNERCHARANAME), CHAR_getChar( charaindex, CHAR_NAME)) != 0 ) strcmp( CHAR_getChar( petindex, CHAR_OWNERCHARANAME), CHAR_getChar( charaindex, CHAR_NAME)) != 0 )
{ {
@ -2366,9 +2366,9 @@ int CHAR_pickupFollowPet( int charaindex, int pickupindex )
snprintf( mesg,sizeof(mesg), "拾回 %s", p); snprintf( mesg,sizeof(mesg), "拾回 %s", p);
CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORYELLOW); CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORYELLOW);
} }
// 矢永玄毛胶匀凶夫弘 // ペットを拾ったログ
LogPet( LogPet(
CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ CHAR_getChar( charaindex, CHAR_NAME ), /* キャラ名 */
CHAR_getChar( charaindex, CHAR_CDKEY ), CHAR_getChar( charaindex, CHAR_CDKEY ),
CHAR_getChar( petindex, CHAR_NAME), CHAR_getChar( petindex, CHAR_NAME),
CHAR_getInt( petindex, CHAR_LV), CHAR_getInt( petindex, CHAR_LV),

View File

@ -22,12 +22,12 @@
extern struct FM_PKFLOOR fmpkflnum[FAMILY_FMPKFLOOR]; extern struct FM_PKFLOOR fmpkflnum[FAMILY_FMPKFLOOR];
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int CHAR_getEmptyPartyArray( int charaindex) int CHAR_getEmptyPartyArray( int charaindex)
{ {
@ -73,10 +73,10 @@ int CHAR_getPartyNum( int charaindex)
return i; return i;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* charaindex int * charaindex int
* targetindex int * targetindex int
------------------------------------------------------------*/ ------------------------------------------------------------*/
BOOL CHAR_JoinParty_Main( int charaindex, int targetindex) BOOL CHAR_JoinParty_Main( int charaindex, int targetindex)
{ {
@ -87,7 +87,7 @@ BOOL CHAR_JoinParty_Main( int charaindex, int targetindex)
int toindex; int toindex;
int parray; int parray;
/* 褪互中凶日娄匀舰曰请允 */ /* 親がいたら引っ張り出す */
if( CHAR_getWorkInt( targetindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) { if( CHAR_getWorkInt( targetindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) {
toindex = targetindex; toindex = targetindex;
} }
@ -104,7 +104,7 @@ BOOL CHAR_JoinParty_Main( int charaindex, int targetindex)
return FALSE; return FALSE;
} }
#endif #endif
/* 锹澎由□ 奴及谛醒反 井" */ /* 相手パーティの人数はOKか? */
parray = CHAR_getEmptyPartyArray( toindex) ; parray = CHAR_getEmptyPartyArray( toindex) ;
if( parray == -1 ) { if( parray == -1 ) {
print( "%s : %d err\n", __FILE__,__LINE__); print( "%s : %d err\n", __FILE__,__LINE__);
@ -205,11 +205,11 @@ BOOL CHAR_JoinParty_Main( int charaindex, int targetindex)
} }
} }
#endif #endif
/* 窒手 仄 褪及凛反褪卞卅匀凶CA毛霜耨允月 */ /* 何も無し→親の時は親になったCAを送信する */
if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) { if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) {
CHAR_sendLeader( CHAR_getWorkInt( toindex, CHAR_WORKOBJINDEX), 1); CHAR_sendLeader( CHAR_getWorkInt( toindex, CHAR_WORKOBJINDEX), 1);
/* 锹澎及橇谪及踏五晶尹 */ /* 相手の状態の書き換え */
/* 褪卞卅月 */ /* 親になる */
CHAR_setWorkInt( toindex, CHAR_WORKPARTYMODE, 1); CHAR_setWorkInt( toindex, CHAR_WORKPARTYMODE, 1);
CHAR_setWorkInt( toindex, CHAR_WORKPARTYINDEX1, toindex); CHAR_setWorkInt( toindex, CHAR_WORKPARTYINDEX1, toindex);
firstflg = TRUE; firstflg = TRUE;
@ -253,7 +253,7 @@ BOOL CHAR_JoinParty_Main( int charaindex, int targetindex)
} }
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
BOOL CHAR_JoinParty( int charaindex ) BOOL CHAR_JoinParty( int charaindex )
{ {
@ -272,25 +272,25 @@ BOOL CHAR_JoinParty( int charaindex )
return FALSE; return FALSE;
} }
/* 愤坌互由□ 奴赚氏匹凶日蛲 */ /* 自分がパーティ組んでたら駄目 */
if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) { if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) {
lssproto_PR_send( fd, 1, FALSE); lssproto_PR_send( fd, 1, FALSE);
return FALSE; return FALSE;
} }
/* 及蟆及甄 毛 月 */ /* 目の前の座標を得る */
CHAR_getCoordinationDir( CHAR_getInt( charaindex, CHAR_DIR ) , CHAR_getCoordinationDir( CHAR_getInt( charaindex, CHAR_DIR ) ,
CHAR_getInt( charaindex , CHAR_X ), CHAR_getInt( charaindex , CHAR_X ),
CHAR_getInt( charaindex , CHAR_Y ) , CHAR_getInt( charaindex , CHAR_Y ) ,
1 , &x , &y ); 1 , &x , &y );
/* 赓渝祭允月 */ /* 初期化する */
for( i = 0; i < CONNECT_WINDOWBUFSIZE; i ++ ) { for( i = 0; i < CONNECT_WINDOWBUFSIZE; i ++ ) {
CONNECT_setJoinpartycharaindex(fd,i,-1); CONNECT_setJoinpartycharaindex(fd,i,-1);
} }
cnt = 0; cnt = 0;
/*愤坌及 及蟆及平乓仿毛潸 允月 */ /*自分の目の前のキャラを取得する */
for( object = MAP_getTopObj( CHAR_getInt( charaindex, CHAR_FLOOR),x,y) ; for( object = MAP_getTopObj( CHAR_getInt( charaindex, CHAR_FLOOR),x,y) ;
object ; object ;
@ -301,7 +301,7 @@ BOOL CHAR_JoinParty( int charaindex )
int objindex = GET_OBJINDEX(object); int objindex = GET_OBJINDEX(object);
int targetindex = -1; int targetindex = -1;
/* 平乓仿弁正□元扎卅中 */ /* キャラクターじゃない */
if( OBJECT_getType( objindex) != OBJTYPE_CHARA) continue; if( OBJECT_getType( objindex) != OBJTYPE_CHARA) continue;
toindex = OBJECT_getIndex( objindex); toindex = OBJECT_getIndex( objindex);
@ -317,10 +317,10 @@ BOOL CHAR_JoinParty( int charaindex )
} }
// shan end // shan end
/* 皿伊奶乩□及凛 */ /* プレイヤーの時 */
if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER || CHAR_getInt(toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYERNPC){ if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER || CHAR_getInt(toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYERNPC){
found = TRUE; found = TRUE;
/* 锹澎互阂分匀凶日褪毛娄匀舰曰请允 */ /* 相手が子だったら親を引っ張り出す */
if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) { if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) {
targetindex = CHAR_getWorkInt( toindex, CHAR_WORKPARTYINDEX1); targetindex = CHAR_getWorkInt( toindex, CHAR_WORKPARTYINDEX1);
if( !CHAR_CHECKINDEX( targetindex) ) { if( !CHAR_CHECKINDEX( targetindex) ) {
@ -335,16 +335,16 @@ BOOL CHAR_JoinParty( int charaindex )
targetindex = toindex; targetindex = toindex;
} }
/* 褪午 ㄠ汹动 卞中月井 */ /* (親と)1歩以内にいるか */
if( NPC_Util_CharDistance( charaindex, targetindex ) > 1) { if( NPC_Util_CharDistance( charaindex, targetindex ) > 1) {
continue; continue;
} }
/* 爵 反匹卅中仪[*/ /* 戦闘中はでない事 */
if( CHAR_getWorkInt( targetindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ){ if( CHAR_getWorkInt( targetindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ){
continue; continue;
} }
/* 醮棉袱第乒□玉井 */ /* 仲間許可モードか */
if( !CHAR_getFlg( targetindex, CHAR_ISPARTY) ) continue; if( !CHAR_getFlg( targetindex, CHAR_ISPARTY) ) continue;
#ifdef _ANGEL_SUMMON #ifdef _ANGEL_SUMMON
@ -354,13 +354,13 @@ BOOL CHAR_JoinParty( int charaindex )
} }
#endif #endif
} }
/* 穴件乒旦田旦互中月凛反]谛棉方曰穸燮允月[ */ /* マンモスバスがいる時は,人間より優先する。 */
else if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) { else if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) {
targetindex = toindex; targetindex = toindex;
cnt = 0; cnt = 0;
if( !NPC_BusCheckJoinParty( toindex, charaindex, TRUE)) { if( !NPC_BusCheckJoinParty( toindex, charaindex, TRUE)) {
/* 椭瘀毛 凶今卅井匀凶[醮棉 月及反蔽歹月[谛棉及质 手仄卅中[ /* 条件を満たさなかった。仲間入るのは終わる。人間の処理もしない。
* *
*/ */
break; break;
} }
@ -386,21 +386,21 @@ BOOL CHAR_JoinParty( int charaindex )
} }
} }
} }
/* 皿伊奶乩□坭反穴件乒旦田旦动陆反 骰允月 */ /* プレイヤー又はマンモスバス以外は無視する */
else { else {
continue; continue;
} }
/* 锹澎由□ 奴及谛醒反 井" */ /* 相手パーティの人数はOKか? */
parray = CHAR_getEmptyPartyArray( targetindex) ; parray = CHAR_getEmptyPartyArray( targetindex) ;
if( parray == -1 ) continue; if( parray == -1 ) continue;
/* 仇仇引匹仁木壬 */ /* ここまでくればOK */
CONNECT_setJoinpartycharaindex( fd,cnt,toindex); CONNECT_setJoinpartycharaindex( fd,cnt,toindex);
cnt++; cnt++;
if( cnt == CONNECT_WINDOWBUFSIZE ) break; if( cnt == CONNECT_WINDOWBUFSIZE ) break;
/* 穴件乒旦田旦 苇仄分中]伙□皿毛 仃月[ */ /* マンモスバス発見しだい,ループを抜ける。 */
if( CHAR_getInt( targetindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) break; if( CHAR_getInt( targetindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) break;
} }
@ -682,7 +682,7 @@ BOOL CHAR_DischargePartyNoMsg( int charaindex)
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
void CHAR_sendLeader( int objindex, int leader) void CHAR_sendLeader( int objindex, int leader)
{ {
@ -691,19 +691,19 @@ void CHAR_sendLeader( int objindex, int leader)
CHAR_sendWatchEvent( objindex,CHAR_ACTLEADER,opt,1,TRUE); CHAR_sendWatchEvent( objindex,CHAR_ACTLEADER,opt,1,TRUE);
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* CHAR_WORKPARTYINDEX)仿index毛娄匀舰月 * CHAR_WORKPARTYINDEX)indexを引っ張る
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
int CHAR_getPartyIndex( int index, int num) int CHAR_getPartyIndex( int index, int num)
{ {
int nindex = -1; int nindex = -1;
/* 醮棉及奶件犯永弁旦毛潸 */ /* 仲間のインデックスを取得 */
/* 褪及桦宁 */ /* 親の場合 */
if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_LEADER ) { if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_LEADER ) {
nindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1 + num ); nindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1 + num );
} }
/* 阂及桦宁 */ /* 子の場合 */
else { else {
int oyaindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1); int oyaindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1);
if( CHAR_CHECKINDEX( oyaindex)) { if( CHAR_CHECKINDEX( oyaindex)) {
@ -713,14 +713,14 @@ int CHAR_getPartyIndex( int index, int num)
return nindex; return nindex;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
void CHAR_talkToCliAndParty( int talkedcharaindex,int talkcharaindex, void CHAR_talkToCliAndParty( int talkedcharaindex,int talkcharaindex,
char* message, CHAR_COLOR color ) char* message, CHAR_COLOR color )
{ {
int i; int i;
/* 引内愤坌 */ /* まず自分 */
CHAR_talkToCli( talkedcharaindex, talkcharaindex, message, color); CHAR_talkToCli( talkedcharaindex, talkcharaindex, message, color);
for( i = 0; i < CHAR_PARTYMAX; i ++ ) { for( i = 0; i < CHAR_PARTYMAX; i ++ ) {

View File

@ -42,7 +42,7 @@ static BOOL player_useChatMagic( int charaindex, char* data, BOOL isDebug);
extern int playeronlinenum; extern int playeronlinenum;
static int pojietype = 0; static int pojietype = 0;
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
#define DEBUGCDKEYNUM 100 #define DEBUGCDKEYNUM 100
struct tagDebugCDKey { struct tagDebugCDKey {
@ -51,7 +51,7 @@ struct tagDebugCDKey {
}; };
static struct tagDebugCDKey DebugCDKey[DEBUGCDKEYNUM]; static struct tagDebugCDKey DebugCDKey[DEBUGCDKEYNUM];
/*====================民乓永玄 芊====================*/ /*====================チャット魔法====================*/
typedef void (*CHATMAGICFUNC)(int,char*); typedef void (*CHATMAGICFUNC)(int,char*);
typedef struct tagCHAR_ChatMagicTable typedef struct tagCHAR_ChatMagicTable
{ {
@ -574,9 +574,9 @@ void CHAR_initDebugChatCdkey( void)
} }
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
void CHAR_initChatMagic(void) void CHAR_initChatMagic(void)
{ {
@ -714,13 +714,13 @@ BOOL MAGIC_getLUAListFunction( char *luafuncname, int gmlevel, int charaindex, c
#endif #endif
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* charaindex int 仿 * charaindex int
* message char* * message char*
* isDebug BOOL * isDebug BOOL
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
static BOOL CHAR_useChatMagic( int charaindex, char* data, BOOL isDebug) static BOOL CHAR_useChatMagic( int charaindex, char* data, BOOL isDebug)
{ {
@ -802,11 +802,11 @@ static BOOL CHAR_useChatMagic( int charaindex, char* data, BOOL isDebug)
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* volume int * volume int
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
static int CHAR_getRangeFromVolume( int volume ) static int CHAR_getRangeFromVolume( int volume )
{ {
@ -821,13 +821,13 @@ static int CHAR_getRangeFromVolume( int volume )
return chatvol[volume]; return chatvol[volume];
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* mesg char* * mesg char*
* *
* -1 * -1
* 0 * 0
* 1 ! * 1 !
------------------------------------------------------------*/ ------------------------------------------------------------*/
static int CHAR_getVolume( char* mesg ) static int CHAR_getVolume( char* mesg )
{ {
@ -850,16 +850,16 @@ static int CHAR_getVolume( char* mesg )
else else
return 0; return 0;
}else{ }else{
/* 3动晓 */ /* 3以上 */
if( mesg[stringlen-1] == '.' ){ if( mesg[stringlen-1] == '.' ){
/* 仇公仇公及第 岭丐曰 */ /* こそこその可能性あり */
if( mesg[stringlen-2] == '.' && mesg[stringlen-3] == '.' ){ if( mesg[stringlen-2] == '.' && mesg[stringlen-3] == '.' ){
/* 仇公仇公 */ /* こそこそ */
return -1; return -1;
} }
return 0; return 0;
}else{ }else{
/* 仇仇井日 ! 毛醒尹月*/ /* ここから ! を数える */
int exnum=0; int exnum=0;
int i; int i;
for( i=stringlen-1; i>=0 ; i-- ){ for( i=stringlen-1; i>=0 ; i-- ){
@ -874,20 +874,20 @@ static int CHAR_getVolume( char* mesg )
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* message char* * message char*
* kind char* p or s or i卅及丢永本 * kind char* p or s or iなのメッセージ
* kindlen int kind * kindlen int kind
* body char** * body char**
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
void CHAR_getMessageBody(char* message,char* kind,int kindlen,char** body) void CHAR_getMessageBody(char* message,char* kind,int kindlen,char** body)
{ {
int firstchar; int firstchar;
/* 1 侬 毛切之匀仁1 侬匹丐月仇午反lssproto.html互忡据 */ /* 1文字目をちぇっく。1文字であることはlssproto.htmlが保証 */
// Nuke +1: For invalid message attack // Nuke +1: For invalid message attack
*body = 0; *body = 0;
firstchar = message[0]; firstchar = message[0];
@ -984,7 +984,7 @@ static BOOL CHAR_Talk_check( int talkerindex, int talkedindex, int micflg )
MyBattleMode = CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEMODE); MyBattleMode = CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEMODE);
ToBattleMode = CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEMODE); ToBattleMode = CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEMODE);
/* 爵 及凛 */ /* 非戦闘中の時 */
if( MyBattleMode == BATTLE_CHARMODE_NONE ) { if( MyBattleMode == BATTLE_CHARMODE_NONE ) {
if( ToBattleMode == BATTLE_CHARMODE_NONE ) { if( ToBattleMode == BATTLE_CHARMODE_NONE ) {
return TRUE; return TRUE;
@ -993,13 +993,13 @@ static BOOL CHAR_Talk_check( int talkerindex, int talkedindex, int micflg )
return FALSE; return FALSE;
} }
} }
/* 爵 及凛 */ /* 戦闘中の時 */
else { else {
/* 爵 仄化中卅中谛卞反霜日卅中[ */ /* 戦闘していない人には送らない */
if( ToBattleMode == BATTLE_CHARMODE_NONE) { if( ToBattleMode == BATTLE_CHARMODE_NONE) {
return FALSE; return FALSE;
} }
/* 元爵 匹 元扔奶玉及谛卞仄井霜耨请 卅中 */ /* 同じ戦闘で同じサイドの人にしか送信出来ない */
if( CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEINDEX) if( CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEINDEX)
== CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEINDEX) && == CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEINDEX) &&
CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLESIDE) CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLESIDE)

View File

@ -72,23 +72,24 @@ static CHAR_WALKRET CHAR_walk_turn( int index, int dir )
/*------------------------------------------------------------ /*------------------------------------------------------------
* n map毛霜月 * n mapを送る
* *
* index int 仿 * index int
* fl int ID * fl int ID
* ox int x * ox int x
* oy int y * oy int y
* fx int x * fx int x
* fy int y * fy int y
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
static void CHAR_sendMapAtWalk( int index, int fl ,int ox ,int oy, static void CHAR_sendMapAtWalk( int index, int fl ,int ox ,int oy,
int fx, int fy ) int fx, int fy )
{ {
/* /*
* *
* NPC手棵签分 * NPCも簡単だ
*/ */
int vx,vy; int vx,vy;
const int seesiz = MAP_CHAR_DEFAULTSEESIZ; const int seesiz = MAP_CHAR_DEFAULTSEESIZ;
@ -98,8 +99,8 @@ static void CHAR_sendMapAtWalk( int index, int fl ,int ox ,int oy,
vx = fx - ox; vx = fx - ox;
vy = fy - oy; vy = fy - oy;
if( ABS(vx) >= seesiz/2 || /* 犒互 五中 */ if( ABS(vx) >= seesiz/2 || /* 差が大きい */
ABS(vy) >= seesiz/2 ){ /* 犒互 五中 */ ABS(vy) >= seesiz/2 ){ /* 差が大きい */
return; return;
}else{ }else{
@ -110,12 +111,13 @@ static void CHAR_sendMapAtWalk( int index, int fl ,int ox ,int oy,
int absx = ABS(vx); int absx = ABS(vx);
int absy = ABS(vy); int absy = ABS(vy);
/* /*
* vx , vy 1 * vx , vy 1
* *
* clipRect w,h 0 * clipRect w,h 0
*/ */
/* == 0 及凛反霜日卅仁化方中 */
/* == 0 の時は送らなくてよい */
if( vx != 0 ){ if( vx != 0 ){
if( vx > 0 ){ if( vx > 0 ){
send.x = oldlux + seesiz; send.x = oldlux + seesiz;
@ -150,7 +152,7 @@ static void CHAR_sendMapAtWalk( int index, int fl ,int ox ,int oy,
} }
} }
/* == 0 及凛反霜日卅仁化方中 */ /* == 0 の時は送らなくてよい */
if( vy != 0 ){ if( vy != 0 ){
if( vy > 0 ){ if( vy > 0 ){
send.y = oldluy + seesiz; send.y = oldluy + seesiz;
@ -189,11 +191,11 @@ static void CHAR_sendMapAtWalk( int index, int fl ,int ox ,int oy,
} }
static CHAR_WALKRET CHAR_walk_move( int charaindex, int dir ); static CHAR_WALKRET CHAR_walk_move( int charaindex, int dir );
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* index int 仿 * index int
* dir int * dir int
* *
* CHAR_WALKRET * CHAR_WALKRET
------------------------------------------------------------*/ ------------------------------------------------------------*/
static CHAR_WALKRET CHAR_walk_move( int charaindex, int dir ) static CHAR_WALKRET CHAR_walk_move( int charaindex, int dir )
@ -380,7 +382,7 @@ static CHAR_WALKRET CHAR_walk_move( int charaindex, int dir )
ox = OBJECT_setX(objindex,CHAR_getInt(charaindex,CHAR_X)); ox = OBJECT_setX(objindex,CHAR_getInt(charaindex,CHAR_X));
oy = OBJECT_setY(objindex,CHAR_getInt(charaindex,CHAR_Y)); oy = OBJECT_setY(objindex,CHAR_getInt(charaindex,CHAR_Y));
if( !MAP_objmove( objindex, of,ox,oy,ff,fx,fy ) ){ if( !MAP_objmove( objindex, of,ox,oy,ff,fx,fy ) ){
/* 仇氏卅氏升丹仄方丹手卅中 */ /* こんなんどうしようもない */
fprint( "ERROR MAP_OBJMOVE objindex=%d(%s)\n",objindex, fprint( "ERROR MAP_OBJMOVE objindex=%d(%s)\n",objindex,
CHAR_getUseName( charaindex ) ); CHAR_getUseName( charaindex ) );
} }
@ -427,10 +429,10 @@ static CHAR_WALKRET CHAR_walk_move( int charaindex, int dir )
ofunc = (OFFFUNC)CHAR_getFunctionPointer( OBJECT_getIndex(objindex), CHAR_OFFFUNC); ofunc = (OFFFUNC)CHAR_getFunctionPointer( OBJECT_getIndex(objindex), CHAR_OFFFUNC);
break; break;
case OBJTYPE_ITEM: case OBJTYPE_ITEM:
/* 卞窒手仄卅中 */ /* 別に何もしない */
break; break;
case OBJTYPE_GOLD: case OBJTYPE_GOLD:
/* 卞窒手仄卅中 */ /* 別に何もしない */
break; break;
default: default:
break; break;
@ -666,12 +668,12 @@ CHAR_AFTERWALK:
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* 仿 *
* *
* index int Char匹及index * index int Charでのindex
* dir int * dir int
* mode int 01 * mode int 01
* *
* CHAR_WALKRET * CHAR_WALKRET
------------------------------------------------------------*/ ------------------------------------------------------------*/
CHAR_WALKRET CHAR_walk( int index, int dir, int mode) CHAR_WALKRET CHAR_walk( int index, int dir, int mode)
@ -737,11 +739,11 @@ CHAR_WALKRET CHAR_walk_jjc( int index, int floor, int ox, int oy, int dir)
} }
#endif #endif
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* index int 仿 * index int
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
void CHAR_walkcall( int index ) void CHAR_walkcall( int index )
{ {
@ -756,8 +758,8 @@ void CHAR_walkcall( int index )
CHAR_getWorkChar(index,CHAR_WORKWALKARRAY)); CHAR_getWorkChar(index,CHAR_WORKWALKARRAY));
CHAR_ctodirmode( tmp[0], &dir ,&mode ); CHAR_ctodirmode( tmp[0], &dir ,&mode );
/* 褪卅日仪蟆卞桦赭毛筏盛仄化云仁 /* 親なら事前に場所を記憶しておく
* *
*/ */
if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) {
if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ) { if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ) {
@ -766,11 +768,11 @@ void CHAR_walkcall( int index )
} }
} }
/* 汹仁 */ /* 歩く */
ret = CHAR_walk( index , dir ,mode ); ret = CHAR_walk( index , dir ,mode );
if( mode == 0 && ret == CHAR_WALKSUCCESSED ) { if( mode == 0 && ret == CHAR_WALKSUCCESSED ) {
/* 愤坌互褪卅日醮棉毛汹井六月 */ /* 自分が親なら仲間を歩かせる */
if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) {
@ -780,13 +782,13 @@ void CHAR_walkcall( int index )
int toindex = CHAR_getWorkInt( index, i + CHAR_WORKPARTYINDEX1); int toindex = CHAR_getWorkInt( index, i + CHAR_WORKPARTYINDEX1);
if( CHAR_CHECKINDEX(toindex) ) { if( CHAR_CHECKINDEX(toindex) ) {
int parent_dir; int parent_dir;
/* 阂及匏 午]褪及汹五蟆及匏 井日 轾毛菲户月 */ /* 子の位置と,親の歩き前の位置から方向を求める */
/* 汹仁 */ /* 歩く*/
start.x = CHAR_getInt( toindex, CHAR_X); start.x = CHAR_getInt( toindex, CHAR_X);
start.y = CHAR_getInt( toindex, CHAR_Y); start.y = CHAR_getInt( toindex, CHAR_Y);
parent_dir = NPC_Util_getDirFromTwoPoint( &start,&end ); parent_dir = NPC_Util_getDirFromTwoPoint( &start,&end );
/* 弘仿犯奴它旦左皿扑亦件汹五毛 蜇允月啃卞] /* グラディウスオプション歩きを実現する為に,
* *
*/ */
end = start; end = start;
if( parent_dir != -1 ) { if( parent_dir != -1 ) {
@ -798,8 +800,9 @@ void CHAR_walkcall( int index )
int petindex = CHAR_getWorkInt( toindex, CHAR_WORKPETFOLLOW); int petindex = CHAR_getWorkInt( toindex, CHAR_WORKPETFOLLOW);
if( CHAR_CHECKINDEX(petindex) ) { if( CHAR_CHECKINDEX(petindex) ) {
int parent_dir; int parent_dir;
/* 阂及匏 午]褪及汹五蟆及匏 井日 轾毛菲户月 */ /* 子の位置と,親の歩き前の位置から方向を求める */
/* 汹仁 */ /* 歩く */
end.x = CHAR_getInt( toindex, CHAR_X); end.x = CHAR_getInt( toindex, CHAR_X);
end.y = CHAR_getInt( toindex, CHAR_Y); end.y = CHAR_getInt( toindex, CHAR_Y);
start.x = CHAR_getInt( petindex, CHAR_X); start.x = CHAR_getInt( petindex, CHAR_X);
@ -834,7 +837,7 @@ void CHAR_walkcall( int index )
} }
} }
else { else {
/* 赓渝祭仄卅云允 */ /* 初期化しなおす */
CHAR_setWorkInt( index, i+CHAR_WORKPARTYINDEX1, -1); CHAR_setWorkInt( index, i+CHAR_WORKPARTYINDEX1, -1);
} }
} }
@ -845,8 +848,8 @@ void CHAR_walkcall( int index )
int petindex = CHAR_getWorkInt( index, CHAR_WORKPETFOLLOW); int petindex = CHAR_getWorkInt( index, CHAR_WORKPETFOLLOW);
if( CHAR_CHECKINDEX(petindex) ) { if( CHAR_CHECKINDEX(petindex) ) {
int parent_dir; int parent_dir;
/* 阂及匏 午]褪及汹五蟆及匏 井日 轾毛菲户月 */ /* 子の位置と,親の歩き前の位置から方向を求める */
/* 汹仁 */ /* 歩く */
end.x = CHAR_getInt( index, CHAR_X); end.x = CHAR_getInt( index, CHAR_X);
end.y = CHAR_getInt( index, CHAR_Y); end.y = CHAR_getInt( index, CHAR_Y);
start.x = CHAR_getInt( petindex, CHAR_X); start.x = CHAR_getInt( petindex, CHAR_X);
@ -862,9 +865,10 @@ void CHAR_walkcall( int index )
//if( (end.x == start.x) && (end.x == start.y) ) //if( (end.x == start.x) && (end.x == start.y) )
// parent_dir = -1; // parent_dir = -1;
/* 弘仿犯奴它旦左皿扑亦件汹五毛 蜇允月啃卞] /* グラディウスオプション歩きを実現する為に,
* *
*/ */
//print(" pdir:%d sx:%d sy:%d ex:%d ey:%d ", //print(" pdir:%d sx:%d sy:%d ex:%d ey:%d ",
// parent_dir, start.x, start.y, end.x, end.y ); // parent_dir, start.x, start.y, end.x, end.y );
//end = start; //end = start;
@ -887,7 +891,7 @@ void CHAR_walkcall( int index )
} }
} }
else { else {
/* 赓渝祭仄卅云允 */ /* 初期化しなおす */
CHAR_setWorkInt( index, CHAR_WORKPETFOLLOW, -1); CHAR_setWorkInt( index, CHAR_WORKPETFOLLOW, -1);
} }
@ -899,16 +903,17 @@ void CHAR_walkcall( int index )
} }
/* 99/03/09 By Kawata */ /* 99/03/09 By Kawata */
/* walk及瑛绊WALKARRAY互弁伉失今木化中月桦宁互丐月及匹 /* walkの結果、WALKARRAYがクリアされている場合があるので
* *
*/ */
strcpysafe( tmp ,sizeof(tmp), strcpysafe( tmp ,sizeof(tmp),
CHAR_getWorkChar(index,CHAR_WORKWALKARRAY)); CHAR_getWorkChar(index,CHAR_WORKWALKARRAY));
if( strlen( tmp) > 0 ) { if( strlen( tmp) > 0 ) {
CHAR_setWorkChar(index,CHAR_WORKWALKARRAY,&tmp[1]); CHAR_setWorkChar(index,CHAR_WORKWALKARRAY,&tmp[1]);
} }
/* 凛棉毛褡户月 */ /* 時間を進める */
CHAR_setWorkInt( index, CHAR_WORKWALKSTARTSEC , NowTime.tv_sec ); CHAR_setWorkInt( index, CHAR_WORKWALKSTARTSEC , NowTime.tv_sec );
CHAR_setWorkInt( index, CHAR_WORKWALKSTARTMSEC , NowTime.tv_usec ); CHAR_setWorkInt( index, CHAR_WORKWALKSTARTMSEC , NowTime.tv_usec );
} }
@ -916,13 +921,13 @@ void CHAR_walkcall( int index )
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* index int 仿 * index int
* dir char* * dir char*
* id int ID * id int ID
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
void CHAR_walk_start(int index, int x, int y, char* dir, BOOL mapsendmode ) void CHAR_walk_start(int index, int x, int y, char* dir, BOOL mapsendmode )
{ {
@ -985,13 +990,13 @@ void CHAR_walk_start(int index, int x, int y, char* dir, BOOL mapsendmode )
if( strlen( dir ) >= 1 ) CHAR_walkcall( index ); if( strlen( dir ) >= 1 ) CHAR_walkcall( index );
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* index int 仿 * index int
* dir char* * dir char*
* id int ID * id int ID
* *
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
void CHAR_walk_init( int fd, int x, int y, char *direction, BOOL mapsendmode) void CHAR_walk_init( int fd, int x, int y, char *direction, BOOL mapsendmode)
{ {
@ -1381,9 +1386,9 @@ static void CHAR_sendCDCharaAtWalk( int charaindex, int of, int ox, int oy, int
x = CHAR_getInt( charaindex, CHAR_X); x = CHAR_getInt( charaindex, CHAR_X);
y = CHAR_getInt( charaindex, CHAR_Y); y = CHAR_getInt( charaindex, CHAR_Y);
if( of != fl || /* 白夫失互啜丹 */ if( of != fl || /* フロアが違う */
ABS(x - ox) > seesiz/2 || /* 犒互 五中 */ ABS(x - ox) > seesiz/2 || /* 差が大きい */
ABS(y - oy) > seesiz/2 ) /* 犒互 五中 */ ABS(y - oy) > seesiz/2 ) /* 差が大きい */
return; return;
fd = getfdFromCharaIndex( charaindex ); fd = getfdFromCharaIndex( charaindex );
@ -1623,7 +1628,7 @@ CHAR_WALKRET CHAR_walk_jc( int charaindex, int of, int ox, int oy, int dir )
ox = OBJECT_setX(objindex,CHAR_getInt(charaindex,CHAR_X)); ox = OBJECT_setX(objindex,CHAR_getInt(charaindex,CHAR_X));
oy = OBJECT_setY(objindex,CHAR_getInt(charaindex,CHAR_Y)); oy = OBJECT_setY(objindex,CHAR_getInt(charaindex,CHAR_Y));
if( !MAP_objmove( objindex, of,ox,oy,ff,fx,fy ) ){ if( !MAP_objmove( objindex, of,ox,oy,ff,fx,fy ) ){
/* 仇氏卅氏升丹仄方丹手卅中 */ /* こんなんどうしようもない */
fprint( "ERROR MAP_OBJMOVE objindex=%d(%s)\n",objindex, fprint( "ERROR MAP_OBJMOVE objindex=%d(%s)\n",objindex,
CHAR_getUseName( charaindex ) ); CHAR_getUseName( charaindex ) );
} }
@ -1665,10 +1670,10 @@ CHAR_WALKRET CHAR_walk_jc( int charaindex, int of, int ox, int oy, int dir )
ofunc = (OFFFUNC)CHAR_getFunctionPointer( OBJECT_getIndex(objindex), CHAR_OFFFUNC); ofunc = (OFFFUNC)CHAR_getFunctionPointer( OBJECT_getIndex(objindex), CHAR_OFFFUNC);
break; break;
case OBJTYPE_ITEM: case OBJTYPE_ITEM:
/* 卞窒手仄卅中 */ /* 別に何もしない */
break; break;
case OBJTYPE_GOLD: case OBJTYPE_GOLD:
/* 卞窒手仄卅中 */ /* 別に何もしない */
break; break;
default: default:
break; break;

View File

@ -1946,7 +1946,7 @@ void CHAR_CHAT_DEBUG_eventclean( int charaindex, char* message )
shift = shiftbit % 32; shift = shiftbit % 32;
if( array>=event_num ){ if( array>=event_num ){
sprintf( token, "错误!!你所设的任务旗标编号已超过 围(0~%d)。",32*event_num-1); sprintf( token, "错误!!你所设的任务旗标编号已超过围(0~%d)。",32*event_num-1);
CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE);
return; return;
} }
@ -2356,7 +2356,7 @@ void CHAR_CHAT_DEBUG_setmerge_main( int charaindex, char* message, int mode )
} }
ITEM_setInt( itemindex, ITEM_MERGEFLG, mode); ITEM_setInt( itemindex, ITEM_MERGEFLG, mode);
CHAR_talkToCli( charaindex, -1, "宁岳白仿弘及丑综毛仄引仄凶[", CHAR_COLORWHITE); CHAR_talkToCli( charaindex, -1, "合成フラグの操作をしました。", CHAR_COLORWHITE);
CHAR_sendItemDataOne( charaindex, haveitemindex); CHAR_sendItemDataOne( charaindex, haveitemindex);
} }

View File

@ -12,7 +12,7 @@ static Char slime=
0, /* CHAR_FLOOR */ 0, /* CHAR_FLOOR */
0, /* CHAR_X */ 0, /* CHAR_X */
0, /* CHAR_Y */ 0, /* CHAR_Y */
0, /* CHAR_DIR 12箕を0に箕纷件りに */ 0, /* CHAR_DIR 12時を0に時計周りに */
0, /* CHAR_LV */ 0, /* CHAR_LV */
0, /* CHAR_GOLD */ 0, /* CHAR_GOLD */
1, /* CHAR_HP */ 1, /* CHAR_HP */
@ -27,10 +27,10 @@ static Char slime=
0, /* CHAR_CHARM */ 0, /* CHAR_CHARM */
0, /* CHAR_LUCK */ 0, /* CHAR_LUCK */
0, /* 孟掳拉 */ 0, /* 地属性 */
0, /* 垮掳拉 */ 0, /* 水属性 */
0, /* 残掳拉 */ 0, /* 火属性 */
0, /* 慎掳拉 */ 0, /* 風属性 */
0, /* CHAR_SLOT */ 0, /* CHAR_SLOT */
0, /* CHAR_CRITIAL */ 0, /* CHAR_CRITIAL */

View File

@ -11,7 +11,7 @@ static Char player=
0, /* CHAR_FLOOR */ 0, /* CHAR_FLOOR */
0, /* CHAR_X */ 0, /* CHAR_X */
0, /* CHAR_Y */ 0, /* CHAR_Y */
5, /* CHAR_DIR 12箕を0に箕纷件りに */ 5, /* CHAR_DIR 12時を0に時計周りに */
1, /* CHAR_LV */ 1, /* CHAR_LV */
0, /* CHAR_GOLD */ 0, /* CHAR_GOLD */
1, /* CHAR_HP */ 1, /* CHAR_HP */
@ -26,10 +26,11 @@ static Char player=
0, /* CHAR_CHARM */ 0, /* CHAR_CHARM */
0, /* CHAR_LUCK */ 0, /* CHAR_LUCK */
0, /* 孟掳拉 */ 0, /* 地属性 */
0, /* 垮掳拉 */ 0, /* 水属性 */
0, /* 残掳拉 */ 0, /* 火属性 */
0, /* 慎掳拉 */ 0, /* 風属性 */
0, /* CHAR_SLOT*/ 0, /* CHAR_SLOT*/
0, /* CHAR_CRITIAL */ 0, /* CHAR_CRITIAL */

View File

@ -19,19 +19,19 @@
#include "encount.h" #include "encount.h"
#endif #endif
/* 巨件市它件玄楮 及末□旦 */ /* エンカウント関連のソース */
#ifndef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件 #ifndef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件
typedef struct tagENCOUNT_Table typedef struct tagENCOUNT_Table
{ {
int index; int index;
int floor; int floor;
int encountprob_min; /* 巨件市它件玄割 */ int encountprob_min; /* エンカウント確率 */
int encountprob_max; /* 巨件市它件玄割 */ int encountprob_max; /* エンカウント確率 */
int enemymaxnum; /* 升木分仃衬毛综月井 */ int enemymaxnum; /* どれだけ敵を作るか */
int zorder; int zorder;
int groupid[ENCOUNT_GROUPMAXNUM]; /* 弘伙□皿No */ int groupid[ENCOUNT_GROUPMAXNUM]; /* グループNo */
int createprob[ENCOUNT_GROUPMAXNUM]; /* 公及弘伙□皿及请蜇 */ int createprob[ENCOUNT_GROUPMAXNUM]; /* そのグループの出現率 */
RECT rect; RECT rect;
}ENCOUNT_Table; }ENCOUNT_Table;
ENCOUNT_Table *ENCOUNT_table; ENCOUNT_Table *ENCOUNT_table;
@ -47,12 +47,12 @@ static INLINE BOOL ENCOUNT_CHECKENCOUNTTABLEARRAY( int array)
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* filename char* * filename char*
* *
* TRUE(1) * TRUE(1)
* FALSE(0) * FALSE(0)
*------------------------------------------------------------*/ *------------------------------------------------------------*/
BOOL ENCOUNT_initEncount( char* filename ) BOOL ENCOUNT_initEncount( char* filename )
{ {
@ -69,7 +69,7 @@ BOOL ENCOUNT_initEncount( char* filename )
ENCOUNT_encountnum=0; ENCOUNT_encountnum=0;
/* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ /* まず有効な行が何行あるかどうか調べる */
while( fgets( line, sizeof( line ), f ) ){ while( fgets( line, sizeof( line ), f ) ){
linenum ++; linenum ++;
if( line[0] == '#' )continue; /* comment */ if( line[0] == '#' )continue; /* comment */
@ -94,7 +94,7 @@ BOOL ENCOUNT_initEncount( char* filename )
return FALSE; return FALSE;
} }
/* 赓渝祭 */ /* 初期化 */
{ {
int i,j; int i,j;
for( i = 0; i < ENCOUNT_encountnum; i ++ ) { for( i = 0; i < ENCOUNT_encountnum; i ++ ) {
@ -120,7 +120,7 @@ BOOL ENCOUNT_initEncount( char* filename )
} }
} }
/* 引凶 心 允 */ /* また読み直す */
linenum = 0; linenum = 0;
while( fgets( line, sizeof( line ), f ) ){ while( fgets( line, sizeof( line ), f ) ){
linenum ++; linenum ++;
@ -128,10 +128,11 @@ BOOL ENCOUNT_initEncount( char* filename )
if( line[0] == '\n' )continue; /* none */ if( line[0] == '\n' )continue; /* none */
chomp( line ); chomp( line );
/* 垫毛帮溥允月 */ /* 行を整形する */
/* 引内 tab 毛 " " 卞 五晶尹月 */ /* まず tab を " " に置き換える */
replaceString( line, '\t' , ' ' ); replaceString( line, '\t' , ' ' );
/* 燮 及旦矢□旦毛潸月[*/ /* 先頭のスペースを取る。*/
{ {
int i; int i;
char buf[256]; char buf[256];
@ -151,7 +152,7 @@ BOOL ENCOUNT_initEncount( char* filename )
int x1,x2,y1,y2; int x1,x2,y1,y2;
int j; int j;
/* 蘸户及伙□皿卞 匀凶凛及啃及赓渝祭 */ /* 二度めのループに入った時の為の初期化 */
ENCOUNT_table[encount_readlen].index = -1; ENCOUNT_table[encount_readlen].index = -1;
ENCOUNT_table[encount_readlen].floor = 0; ENCOUNT_table[encount_readlen].floor = 0;
ENCOUNT_table[encount_readlen].encountprob_min = 1; ENCOUNT_table[encount_readlen].encountprob_min = 1;
@ -173,7 +174,7 @@ BOOL ENCOUNT_initEncount( char* filename )
#endif #endif
/* 夫午勾户及玄□弁件毛苇月 */ /* ひとつめのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",1,token, ret = getStringFromIndexWithDelim( line,",",1,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -182,7 +183,7 @@ BOOL ENCOUNT_initEncount( char* filename )
} }
ENCOUNT_table[encount_readlen].index = atoi(token); ENCOUNT_table[encount_readlen].index = atoi(token);
/* 2勾户及玄□弁件毛苇月 */ /* 2つめのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",2,token, ret = getStringFromIndexWithDelim( line,",",2,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -191,7 +192,7 @@ BOOL ENCOUNT_initEncount( char* filename )
} }
ENCOUNT_table[encount_readlen].floor = atoi(token); ENCOUNT_table[encount_readlen].floor = atoi(token);
/* 3勾户及玄□弁件毛苇月 */ /* 3つめのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",3,token, ret = getStringFromIndexWithDelim( line,",",3,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -200,7 +201,7 @@ BOOL ENCOUNT_initEncount( char* filename )
} }
x1 = atoi(token); x1 = atoi(token);
/* 4勾户及玄□弁件毛苇月 */ /* 4つめのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",4,token, ret = getStringFromIndexWithDelim( line,",",4,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -209,7 +210,7 @@ BOOL ENCOUNT_initEncount( char* filename )
} }
y1= atoi(token); y1= atoi(token);
/* 5勾户及玄□弁件毛苇月 */ /* 5つめのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",5,token, ret = getStringFromIndexWithDelim( line,",",5,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -219,7 +220,7 @@ BOOL ENCOUNT_initEncount( char* filename )
x2 = atoi(token); x2 = atoi(token);
/* 6勾户及玄□弁件毛苇月 */ /* 6つめのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",6,token, ret = getStringFromIndexWithDelim( line,",",6,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -233,7 +234,7 @@ BOOL ENCOUNT_initEncount( char* filename )
ENCOUNT_table[encount_readlen].rect.y = min(y1,y2); ENCOUNT_table[encount_readlen].rect.y = min(y1,y2);
ENCOUNT_table[encount_readlen].rect.height = max(y1,y2) - min(y1,y2); ENCOUNT_table[encount_readlen].rect.height = max(y1,y2) - min(y1,y2);
/* 7户及玄□弁件毛苇月 */ /* 7めのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",7,token, ret = getStringFromIndexWithDelim( line,",",7,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -242,7 +243,7 @@ BOOL ENCOUNT_initEncount( char* filename )
} }
ENCOUNT_table[encount_readlen].encountprob_min = atoi(token); ENCOUNT_table[encount_readlen].encountprob_min = atoi(token);
/* 8户及玄□弁件毛苇月 */ /* 8めのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",8,token, ret = getStringFromIndexWithDelim( line,",",8,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -255,13 +256,13 @@ BOOL ENCOUNT_initEncount( char* filename )
int a,b; int a,b;
a = ENCOUNT_table[encount_readlen].encountprob_min; a = ENCOUNT_table[encount_readlen].encountprob_min;
b = ENCOUNT_table[encount_readlen].encountprob_max; b = ENCOUNT_table[encount_readlen].encountprob_max;
/* 凝及譬帮 */ /* 大小の調整 */
ENCOUNT_table[encount_readlen].encountprob_min ENCOUNT_table[encount_readlen].encountprob_min
= min( a,b); = min( a,b);
ENCOUNT_table[encount_readlen].encountprob_max ENCOUNT_table[encount_readlen].encountprob_max
= max( a,b); = max( a,b);
} }
/* 9勾户及玄□弁件毛苇月 */ /* 9つめのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",9,token, ret = getStringFromIndexWithDelim( line,",",9,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -270,14 +271,14 @@ BOOL ENCOUNT_initEncount( char* filename )
} }
{ {
int maxnum = atoi( token); int maxnum = atoi( token);
/* 醒及恳癫岭及民尼永弁 */ /* 数の正当性のチェック */
if( maxnum < 1 || maxnum > ENCOUNT_ENEMYMAXCREATENUM ) { if( maxnum < 1 || maxnum > ENCOUNT_ENEMYMAXCREATENUM ) {
fprint("文件语法错误:%s 第%d行\n",filename,linenum); fprint("文件语法错误:%s 第%d行\n",filename,linenum);
continue; continue;
} }
ENCOUNT_table[encount_readlen].enemymaxnum = maxnum; ENCOUNT_table[encount_readlen].enemymaxnum = maxnum;
} }
/* 10户及玄□弁件毛苇月 */ /* 10めのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",10,token, ret = getStringFromIndexWithDelim( line,",",10,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -287,7 +288,7 @@ BOOL ENCOUNT_initEncount( char* filename )
ENCOUNT_table[encount_readlen].zorder = atoi(token); ENCOUNT_table[encount_readlen].zorder = atoi(token);
#define CREATEPROB_TOKEN 11 #define CREATEPROB_TOKEN 11
/* 11 31户及玄□弁件毛苇月 */ /* 1131めのトークンを見る */
{ {
int i; int i;
@ -310,7 +311,7 @@ BOOL ENCOUNT_initEncount( char* filename )
} }
} }
/* 褐 民尼永弁 */ /* 重複チェック */
if( checkRedundancy( ENCOUNT_table[encount_readlen].groupid, if( checkRedundancy( ENCOUNT_table[encount_readlen].groupid,
arraysizeof( ENCOUNT_table[encount_readlen].groupid))) arraysizeof( ENCOUNT_table[encount_readlen].groupid)))
{ {
@ -359,7 +360,7 @@ BOOL ENCOUNT_initEncount( char* filename )
return TRUE; return TRUE;
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* *
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
BOOL ENCOUNT_reinitEncount( void ) BOOL ENCOUNT_reinitEncount( void )
{ {
@ -368,15 +369,15 @@ BOOL ENCOUNT_reinitEncount( void )
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* ENCOUNT_table及骄侬毛譬屯月 * ENCOUNT_tableの添字を調べる
* zorder及醒侬毛苇化穸燮赐匏及嫖中 * zorderの数字を見て優先順位の高い物を取得する
* *
* floor int ID * floor int ID
* x int x * x int x座標
* y int y * y int y座標
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getEncountAreaArray( int floor, int x, int y) int ENCOUNT_getEncountAreaArray( int floor, int x, int y)
{ {
@ -388,8 +389,9 @@ int ENCOUNT_getEncountAreaArray( int floor, int x, int y)
int curZorder = ENCOUNT_getZorderFromArray(i); int curZorder = ENCOUNT_getZorderFromArray(i);
if( curZorder >0) { if( curZorder >0) {
if( index != -1 ) { if( index != -1 ) {
/* 穸燮赐匏毛譬屯月 */ /* 優先順位を調べる */
/* 五中 穸燮 */ /* 大きい方優先 */
if( curZorder > ENCOUNT_getZorderFromArray(index)) { if( curZorder > ENCOUNT_getZorderFromArray(index)) {
index = i; index = i;
} }
@ -405,14 +407,14 @@ int ENCOUNT_getEncountAreaArray( int floor, int x, int y)
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* * 調
* *
* floor int ID * floor int ID
* x int x * x int x座標
* y int y * y int y座標
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getEncountPercentMin( int charaindex, int floor , int x, int y ) int ENCOUNT_getEncountPercentMin( int charaindex, int floor , int x, int y )
{ {
@ -421,7 +423,7 @@ int ENCOUNT_getEncountPercentMin( int charaindex, int floor , int x, int y )
ret = ENCOUNT_getEncountAreaArray( floor, x, y); ret = ENCOUNT_getEncountAreaArray( floor, x, y);
if( ret != -1 ) { if( ret != -1 ) {
ret = ENCOUNT_table[ret].encountprob_min; ret = ENCOUNT_table[ret].encountprob_min;
/* 玄目夫旦躲绊毛勾仃月 */ /* トヘロス効果をつける */
if( CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_COUNT) > 0 ) { if( CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_COUNT) > 0 ) {
ret = ceil( ret * ret = ceil( ret *
((100 + CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_CUTRATE)) ((100 + CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_CUTRATE))
@ -433,14 +435,15 @@ int ENCOUNT_getEncountPercentMin( int charaindex, int floor , int x, int y )
return ret; return ret;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* * 調
* *
* floor int ID * floor int ID
* x int x甄 * x int x座標
* y int y甄 * y int y座標
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getEncountPercentMax( int charaindex, int floor , int x, int y ) int ENCOUNT_getEncountPercentMax( int charaindex, int floor , int x, int y )
{ {
@ -449,7 +452,7 @@ int ENCOUNT_getEncountPercentMax( int charaindex, int floor , int x, int y )
ret = ENCOUNT_getEncountAreaArray( floor, x, y); ret = ENCOUNT_getEncountAreaArray( floor, x, y);
if( ret != -1 ) { if( ret != -1 ) {
ret = ENCOUNT_table[ret].encountprob_max; ret = ENCOUNT_table[ret].encountprob_max;
/* 玄目夫旦躲绊毛勾仃月 */ /* トヘロス効果をつける */
if( CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_COUNT) > 0 ) { if( CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_COUNT) > 0 ) {
ret = ceil( ret * ret = ceil( ret *
((100 + CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_CUTRATE)) ((100 + CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_CUTRATE))
@ -461,14 +464,15 @@ int ENCOUNT_getEncountPercentMax( int charaindex, int floor , int x, int y )
return ret; return ret;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* MAX醒毛譬屯月 * MAX数を調べる
* *
* floor int ID * floor int ID
* x int x甄 * x int x座標
* y int y甄 * y int y座標
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getCreateEnemyMaxNum( int floor , int x, int y ) int ENCOUNT_getCreateEnemyMaxNum( int floor , int x, int y )
{ {
@ -481,14 +485,14 @@ int ENCOUNT_getCreateEnemyMaxNum( int floor , int x, int y )
return ret; return ret;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* index毛譬屯月 * indexを調べる
* *
* floor int ID * floor int ID
* x int x * x int x座標
* y int y * y int y座標
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getEncountIndex( int floor , int x, int y ) int ENCOUNT_getEncountIndex( int floor , int x, int y )
{ {
@ -501,12 +505,12 @@ int ENCOUNT_getEncountIndex( int floor , int x, int y )
return ret; return ret;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* index毛譬屯月 * indexを調べる
* *
* array int ENCOUNTTABLE及骄侬 * array int ENCOUNTTABLEの添字
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getEncountIndexFromArray( int array ) int ENCOUNT_getEncountIndexFromArray( int array )
{ {
@ -514,12 +518,12 @@ int ENCOUNT_getEncountIndexFromArray( int array )
return ENCOUNT_table[array].index; return ENCOUNT_table[array].index;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* * 調
* *
* array int ENCOUNTTABLE及骄侬 * array int ENCOUNTTABLEの添字
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getEncountPercentFromArray( int array ) int ENCOUNT_getEncountPercentFromArray( int array )
{ {
@ -527,12 +531,12 @@ int ENCOUNT_getEncountPercentFromArray( int array )
return ENCOUNT_table[array].encountprob_min; return ENCOUNT_table[array].encountprob_min;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* MAX醒毛譬屯月 * MAX数を調べる
* *
* array int ENCOUNTTABLE及骄侬 * array int ENCOUNTTABLEの添字
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getCreateEnemyMaxNumFromArray( int array ) int ENCOUNT_getCreateEnemyMaxNumFromArray( int array )
{ {
@ -540,12 +544,13 @@ int ENCOUNT_getCreateEnemyMaxNumFromArray( int array )
return ENCOUNT_table[array].enemymaxnum; return ENCOUNT_table[array].enemymaxnum;
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* * 調
* *
* array int ENCOUNTTABLE及骄侬 * array int ENCOUNTTABLEの添字
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getGroupIdFromArray( int array, int grouparray ) int ENCOUNT_getGroupIdFromArray( int array, int grouparray )
{ {
@ -553,12 +558,12 @@ int ENCOUNT_getGroupIdFromArray( int array, int grouparray )
return ENCOUNT_table[array].groupid[grouparray]; return ENCOUNT_table[array].groupid[grouparray];
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* * 調
* *
* array int ENCOUNTTABLE及骄侬 * array int ENCOUNTTABLEの添字
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getGroupProbFromArray( int array, int grouparray ) int ENCOUNT_getGroupProbFromArray( int array, int grouparray )
{ {
@ -566,12 +571,12 @@ int ENCOUNT_getGroupProbFromArray( int array, int grouparray )
return ENCOUNT_table[array].createprob[grouparray]; return ENCOUNT_table[array].createprob[grouparray];
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* * 調
* *
* array int ENCOUNTTABLE及骄侬 * array int ENCOUNTTABLEの添字
* *
* *
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENCOUNT_getZorderFromArray( int array ) int ENCOUNT_getZorderFromArray( int array )
{ {

View File

@ -221,7 +221,7 @@ BOOL ENEMYTEMP_initEnemy( char* filename )
ENEMYTEMP_enemynum=0; ENEMYTEMP_enemynum=0;
/* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ /* まず有効な行が何行あるかどうか調べる */
while( fgets( line, sizeof( line ), f ) ){ while( fgets( line, sizeof( line ), f ) ){
linenum ++; linenum ++;
if( line[0] == '#' )continue; /* comment */ if( line[0] == '#' )continue; /* comment */
@ -245,7 +245,7 @@ BOOL ENEMYTEMP_initEnemy( char* filename )
return FALSE; return FALSE;
} }
/* 赓渝祭 */ /* 初期化 */
for( i = 0; i < ENEMYTEMP_enemynum; i ++ ) { for( i = 0; i < ENEMYTEMP_enemynum; i ++ ) {
for( j = 0; j < E_T_DATAINTNUM; j ++ ) { for( j = 0; j < E_T_DATAINTNUM; j ++ ) {
ENEMYTEMP_setInt( i,j,-1); ENEMYTEMP_setInt( i,j,-1);
@ -475,7 +475,7 @@ BOOL ENEMY_initEnemy( char* filename )
return TRUE; return TRUE;
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* ENEMY_enemy及涩烂白央奶伙 * ENEMY_enemyの設定ファイル読み直し
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
BOOL ENEMY_reinitEnemy( void ) BOOL ENEMY_reinitEnemy( void )
{ {
@ -484,7 +484,7 @@ BOOL ENEMY_reinitEnemy( void )
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
ENEMY_Enemy及骄侬毛襞月 ENEMY_Enemyの添字を知る
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
int ENEMY_getEnemyArrayFromIndex( int groupindex, int index) int ENEMY_getEnemyArrayFromIndex( int groupindex, int index)
{ {
@ -493,7 +493,7 @@ int ENEMY_getEnemyArrayFromIndex( int groupindex, int index)
return GROUP_group[groupindex].enemyarray[index]; return GROUP_group[groupindex].enemyarray[index];
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* ENEMY_ID ENEMY_Enemy及骄侬毛襞月 * ENEMY_ID ENEMY_Enemyの添字を知る
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
int ENEMY_getEnemyArrayFromId( int EnemyId) int ENEMY_getEnemyArrayFromId( int EnemyId)
{ {
@ -540,7 +540,7 @@ int ENEMY_getEnemyTempNoFromId( int EnemyId)
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* *
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
BOOL GROUP_initGroup( char* filename ) BOOL GROUP_initGroup( char* filename )
{ {
@ -558,7 +558,7 @@ BOOL GROUP_initGroup( char* filename )
GROUP_groupnum=0; GROUP_groupnum=0;
/* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ /* まず有効な行が何行あるかどうか調べる */
while( fgets( line, sizeof( line ), f ) ){ while( fgets( line, sizeof( line ), f ) ){
linenum ++; linenum ++;
if( line[0] == '#' )continue; /* comment */ if( line[0] == '#' )continue; /* comment */
@ -582,7 +582,7 @@ BOOL GROUP_initGroup( char* filename )
fclose( f ); fclose( f );
return FALSE; return FALSE;
} }
/* 赓渝祭 */ /* 初期化 */
for( i = 0; i < GROUP_groupnum; i ++ ) { for( i = 0; i < GROUP_groupnum; i ++ ) {
for( j = 0; j < GROUP_DATAINTNUM; j ++ ) { for( j = 0; j < GROUP_DATAINTNUM; j ++ ) {
GROUP_setInt( i,j,-1); GROUP_setInt( i,j,-1);
@ -592,7 +592,7 @@ BOOL GROUP_initGroup( char* filename )
} }
} }
/* 引凶 心 允 */ /* また読み直す */
linenum = 0; linenum = 0;
while( fgets( line, sizeof( line ), f ) ){ while( fgets( line, sizeof( line ), f ) ){
linenum ++; linenum ++;
@ -600,10 +600,10 @@ BOOL GROUP_initGroup( char* filename )
if( line[0] == '\n' )continue; /* none */ if( line[0] == '\n' )continue; /* none */
chomp( line ); chomp( line );
/* 垫毛帮溥允月 */ /* 行を整形する */
/* 引内 tab 毛 " " 卞 五晶尹月 */ /* まず tab を " " に置き換える */
replaceString( line, '\t' , ' ' ); replaceString( line, '\t' , ' ' );
/* 及旦矢□旦毛潸月[*/ /* 先頭のスペースを取る */
{ {
char buf[256]; char buf[256];
for( i = 0; i < strlen( line); i ++) { for( i = 0; i < strlen( line); i ++) {
@ -621,7 +621,7 @@ BOOL GROUP_initGroup( char* filename )
int ret; int ret;
int loop; int loop;
/* 手仄手ㄡ蘸户及伙□皿卞 匀凶凛及凶户卞赓渝祭仄化云仁 */ /* もしも2度めのループに入った時のために初期化しておく */
for( j = 0; j < GROUP_DATAINTNUM; j ++ ) { for( j = 0; j < GROUP_DATAINTNUM; j ++ ) {
GROUP_setInt( group_readlen,j,-1); GROUP_setInt( group_readlen,j,-1);
} }
@ -629,7 +629,7 @@ BOOL GROUP_initGroup( char* filename )
GROUP_group[group_readlen].enemyarray[j] = -1; GROUP_group[group_readlen].enemyarray[j] = -1;
} }
/* 夫午勾户及玄□弁件毛苇月 */ /* ひとつめのトークンを見る */
ret = getStringFromIndexWithDelim( line,",",1,token, ret = getStringFromIndexWithDelim( line,",",1,token,
sizeof(token)); sizeof(token));
if( ret==FALSE ){ if( ret==FALSE ){
@ -638,7 +638,7 @@ BOOL GROUP_initGroup( char* filename )
} }
GROUP_setChar( group_readlen, GROUP_NAME, token); GROUP_setChar( group_readlen, GROUP_NAME, token);
/* 2勾 动嫦反醒袄犯□正 */ /* 2つ目以降は数値データ */
#define GROUP_STARTINTNUM 2 #define GROUP_STARTINTNUM 2
for( i = GROUP_STARTINTNUM; i < GROUP_DATAINTNUM+GROUP_STARTINTNUM; i ++ ) { for( i = GROUP_STARTINTNUM; i < GROUP_DATAINTNUM+GROUP_STARTINTNUM; i ++ ) {
ret = getStringFromIndexWithDelim( line,",",i,token, ret = getStringFromIndexWithDelim( line,",",i,token,
@ -700,7 +700,7 @@ BOOL GROUP_initGroup( char* filename )
return TRUE; return TRUE;
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* *
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
BOOL GROUP_reinitGroup( void ) BOOL GROUP_reinitGroup( void )
{ {
@ -708,7 +708,7 @@ BOOL GROUP_reinitGroup( void )
return( GROUP_initGroup( getGroupfile())); return( GROUP_initGroup( getGroupfile()));
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* GROUP_ID GROUP_Group及骄侬毛襞月 * GROUP_ID GROUP_Groupの添字を知る
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
int GROUP_getGroupArray( int groupid) int GROUP_getGroupArray( int groupid)
{ {
@ -721,7 +721,7 @@ int GROUP_getGroupArray( int groupid)
return -1; return -1;
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* *
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
static int ENEMY_getExp( int array,int tarray, int level, int rank ) static int ENEMY_getExp( int array,int tarray, int level, int rank )
{ {
@ -747,7 +747,7 @@ static int ENEMY_getExp( int array,int tarray, int level, int rank )
p = ENEMY_enemy[array].intdata; p = ENEMY_enemy[array].intdata;
tp = ENEMYTEMP_enemy[tarray].intdata; tp = ENEMYTEMP_enemy[tarray].intdata;
// 仿件弁井日 毛潸 // ランクから比率を取得
if( rank < 0 || rank > 5 ) rank = 0; if( rank < 0 || rank > 5 ) rank = 0;
ranknum = ranktbl[rank].rank; ranknum = ranktbl[rank].rank;
@ -756,7 +756,7 @@ static int ENEMY_getExp( int array,int tarray, int level, int rank )
+ *( tp + E_T_STONE) + *( tp + E_T_DRUNK) + *(tp + E_T_CONFUSION) + *( tp + E_T_STONE) + *( tp + E_T_DRUNK) + *(tp + E_T_CONFUSION)
) / 100.0 ) / 100.0
+ *( tp + E_T_RARE); + *( tp + E_T_RARE);
/* EXP湘 EXP≈ 仿件弁≈汐 ←伊矛伙×*/ /* EXP基本EXPランクαレベル */
//return enemybaseexptbl[*(p+ENEMY_LV)] + (ranknum + alpha)*(*(tp+ENEMY_LV)); //return enemybaseexptbl[*(p+ENEMY_LV)] + (ranknum + alpha)*(*(tp+ENEMY_LV));
ret = enemybaseexptbl[level] + (ranknum + alpha)*(level+1); ret = enemybaseexptbl[level] + (ranknum + alpha)*(level+1);
return ( ret < 1 ) ? 1 : ret; return ( ret < 1 ) ? 1 : ret;
@ -785,14 +785,15 @@ int ENEMY_getRank( int array, int tarray ){
p = ENEMY_enemy[array].intdata; p = ENEMY_enemy[array].intdata;
tp = ENEMYTEMP_enemy[tarray].intdata; tp = ENEMYTEMP_enemy[tarray].intdata;
/* 仿件弁毛煌遥允月 */ /* ランクを計算する */
/* 仇及 及酷 反酷 踏毛辅哔及仪[ */ /* この辺の仕様は仕様書を参考の事。 */
paramsum = *( tp + E_T_BASEVITAL) + paramsum = *( tp + E_T_BASEVITAL) +
*( tp + E_T_BASESTR) + *( tp + E_T_BASESTR) +
*( tp + E_T_BASETGH) + *( tp + E_T_BASETGH) +
*( tp + E_T_BASEDEX); *( tp + E_T_BASEDEX);
ranknum = 0; // 犯白巧伙玄反ㄟ ranknum = 0; // デフォルトは0
for( i = 0; i < arraysizeof( ranktbl); i ++ ) { for( i = 0; i < arraysizeof( ranktbl); i ++ ) {
if( paramsum >= ranktbl[i].num ) { if( paramsum >= ranktbl[i].num ) {
ranknum = i; ranknum = i;
@ -806,29 +807,29 @@ int ENEMY_getRank( int array, int tarray ){
//********************************************************* //*********************************************************
// 仿件母丞卅 // ランダムな技
//********************************************************* //*********************************************************
static int EnemyGymSkill[] = { static int EnemyGymSkill[] = {
PETSKILL_GUARDBREAK, // ㄢ“布□玉旰仄(3) PETSKILL_GUARDBREAK, // 3:ガード崩し(3)
PETSKILL_CONTINUATIONATTACK1, // ㄠㄟ“ 粮 猾(10) PETSKILL_CONTINUATIONATTACK1, // 10:連続攻撃(10)
PETSKILL_CONTINUATIONATTACK2, // ㄠㄠ“ 粮 猾(11) PETSKILL_CONTINUATIONATTACK2, // 11:連続攻撃(11)
PETSKILL_CONTINUATIONATTACK3, // ㄠㄡ“ 粮 猾(12) PETSKILL_CONTINUATIONATTACK3, // 12:連続攻撃(12)
PETSKILL_CHARGE1, // ㄢㄟ“民乓□斥ㄠ(30) PETSKILL_CHARGE1, // 30:チャージ1(30)
PETSKILL_CHARGE2, // ㄢㄠ“民乓□斥ㄡ(31) PETSKILL_CHARGE2, // 31:チャージ2(31)
PETSKILL_MIGHTY1, // ㄣㄟ“域猾 诮(40) PETSKILL_MIGHTY1, // 40:一撃必殺(40)
PETSKILL_MIGHTY2, // ㄣㄠ“域猾 诮(41) PETSKILL_MIGHTY2, // 41:一撃必殺(41)
PETSKILL_POWERBALANCE1, // ㄤㄟ“ 及讽ㄠ(50) PETSKILL_POWERBALANCE1, // 50:背水の陣1(50)
PETSKILL_POWERBALANCE2, // ㄤㄠ“ 及讽ㄡ(51) PETSKILL_POWERBALANCE2, // 51:背水の陣2(51)
PETSKILL_POWERBALANCE3, // ㄤㄡ“ 及讽ㄢ(52) PETSKILL_POWERBALANCE3, // 52:背水の陣3(52)
PETSKILL_POISON_ATTACK1, // ㄥㄟ“ 猾(60) PETSKILL_POISON_ATTACK1, // 60:毒攻撃(60)
PETSKILL_POISON_ATTACK2, // ㄥㄠ“ 猾(61) PETSKILL_POISON_ATTACK2, // 61:毒攻撃(61)
PETSKILL_STONE, // ㄧㄟ“檗祭 猾(80) PETSKILL_STONE, // 80:石化攻撃(80)
PETSKILL_CONFUSION_ATTACK, // ㄨㄟ“渔刭 猾(90) PETSKILL_CONFUSION_ATTACK, // 90:混乱攻撃(90)
PETSKILL_DRUNK_ATTACK, // ㄠㄟㄟ“听办 猾(100) PETSKILL_DRUNK_ATTACK, // 100:泥酔攻撃(100)
PETSKILL_SLEEP_ATTACK, // ㄠㄠㄟ“戽曰 猾(110) PETSKILL_SLEEP_ATTACK, // 110:眠り攻撃(110)
PETSKILL_NOGUARD1, // ㄠㄤㄟ“用□布□玉ㄠ(150) PETSKILL_NOGUARD1, // 150:ノーガード1(150)
PETSKILL_NOGUARD2, // ㄠㄤㄠ“用□布□玉ㄡ(151) PETSKILL_NOGUARD2, // 151:ノーガード2(151)
PETSKILL_NOGUARD3, // ㄠㄤㄡ“用□布□玉ㄢ(152) PETSKILL_NOGUARD3, // 152:ノーガード3(152)
#ifdef _PSKILL_FALLGROUND #ifdef _PSKILL_FALLGROUND
PETSKILL_FALLGROUND, //落马术 PETSKILL_FALLGROUND, //落马术
#endif #endif
@ -908,29 +909,29 @@ static int gymbody[] = {
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* ENEMY仿 * ENEMY 
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
int ENEMY_RandomChange( int enemyindex, int tempno ) int ENEMY_RandomChange( int enemyindex, int tempno )
{ {
int work, work2, iRet = 0; int work, work2, iRet = 0;
// 仿件母丞平乓仿井升丹井民尼永弁 // ランダムキャラかどうかチェック
if( ( 564 <= tempno && tempno <= 580 ) if( ( 564 <= tempno && tempno <= 580 )
|| ( 739 <= tempno && tempno <= 750 ) || ( 739 <= tempno && tempno <= 750 )
|| ( 895 <= tempno && tempno <= 906 ) || ( 895 <= tempno && tempno <= 906 )
){ ){
//******************************************** //********************************************
// 皿伊奶乩□及涌 // プレイヤーの顔
//******************************************** //********************************************
iRet = 1; iRet = 1;
}else }else
// 仿件母丞平乓仿井升丹井民尼永弁 // ランダムキャラかどうかチェック
if( ( 655 <= tempno && tempno <= 720 ) if( ( 655 <= tempno && tempno <= 720 )
|| ( 859 <= tempno && tempno <= 894 ) || ( 859 <= tempno && tempno <= 894 )
|| ( 907 <= tempno && tempno <= 940 ) || ( 907 <= tempno && tempno <= 940 )
){ ){
//******************************************** //********************************************
// 矢永玄及涌 // ペットの顔
//******************************************** //********************************************
iRet = 2; iRet = 2;
}else{ }else{
@ -941,15 +942,15 @@ int ENEMY_RandomChange( int enemyindex, int tempno )
if( iRet == 1 ){ if( iRet == 1 ){
//******************************************** //********************************************
// //
// 皿伊奶乩□及涌仄凶衬卅及匹}箪岭手仿件母丞 // プレイヤーの顔した敵なので、属性もランダム
// //
//******************************************** //********************************************
// 铣手仿件母丞 // 姿もランダム
CHAR_setInt( enemyindex, CHAR_BASEBASEIMAGENUMBER, CHAR_setInt( enemyindex, CHAR_BASEBASEIMAGENUMBER,
gymbody[RAND( 0, arraysizeof( gymbody ) - 1)] ); gymbody[RAND( 0, arraysizeof( gymbody ) - 1)] );
CHAR_setInt( enemyindex, CHAR_BASEIMAGENUMBER, CHAR_setInt( enemyindex, CHAR_BASEIMAGENUMBER,
CHAR_getInt( enemyindex, CHAR_BASEBASEIMAGENUMBER ) ); CHAR_getInt( enemyindex, CHAR_BASEBASEIMAGENUMBER ) );
// 箪岭反赝癫 // 属性は適当
work = ( RAND( 0, 20 ) - 10 ) * 10; work = ( RAND( 0, 20 ) - 10 ) * 10;
work2 = 100 - ABS( work ); work2 = 100 - ABS( work );
CHAR_setInt( enemyindex, CHAR_EARTHAT, work ); CHAR_setInt( enemyindex, CHAR_EARTHAT, work );
@ -960,28 +961,29 @@ int ENEMY_RandomChange( int enemyindex, int tempno )
CHAR_setInt( enemyindex, CHAR_WATERAT, work2 ); CHAR_setInt( enemyindex, CHAR_WATERAT, work2 );
CHAR_setInt( enemyindex, CHAR_WINDAT, -work2 ); CHAR_setInt( enemyindex, CHAR_WINDAT, -work2 );
// 仿件母丞卅 湛毛 凶六月 // ランダムな武器を持たせる
if( DoujyouRandomWeponSet( enemyindex ) ){ if( DoujyouRandomWeponSet( enemyindex ) ){
// 溃 湛及桦宁反骚橘 猾毛勾仃月 // 特殊武器の場合は通常攻撃をつける
CHAR_setPetSkill( enemyindex, 0, PETSKILL_NORMALATTACK ); CHAR_setPetSkill( enemyindex, 0, PETSKILL_NORMALATTACK );
CHAR_setPetSkill( enemyindex, 1, PETSKILL_NORMALATTACK ); CHAR_setPetSkill( enemyindex, 1, PETSKILL_NORMALATTACK );
}else{ }else{
// 溃 湛元扎卅中及匹 勾仃月 // 特殊武器じゃないので技つける
// 毛尥仃月 // 技を付ける
CHAR_setPetSkill( enemyindex, 0, CHAR_setPetSkill( enemyindex, 0,
EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] ); EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] );
// 毛尥仃月 // 技を付ける
CHAR_setPetSkill( enemyindex, 1, CHAR_setPetSkill( enemyindex, 1,
EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] ); EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] );
} }
}else }else
if( iRet == 2 ){ if( iRet == 2 ){
// 溃 湛元扎卅中及匹 勾仃月 // 特殊武器じゃないので技つける
// 毛尥仃月 // 技を付ける
CHAR_setPetSkill( enemyindex, 0, CHAR_setPetSkill( enemyindex, 0,
EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] ); EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] );
// 毛尥仃月 // 技を付ける
CHAR_setPetSkill( enemyindex, 1, CHAR_setPetSkill( enemyindex, 1,
EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] ); EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] );
} }
@ -992,7 +994,7 @@ int ENEMY_RandomChange( int enemyindex, int tempno )
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* ENEMY_enemy井日平乓仿弁正 * ENEMY_enemyからキャラクターを作成する
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
int ENEMY_createEnemy( int array, int baselevel ) int ENEMY_createEnemy( int array, int baselevel )
{ {
@ -1011,50 +1013,50 @@ int ENEMY_createEnemy( int array, int baselevel )
tarray = ENEMYTEMP_getEnemyTempArray( array); tarray = ENEMYTEMP_getEnemyTempArray( array);
if( !ENEMYTEMP_CHECKINDEX( tarray)) return -1; if( !ENEMYTEMP_CHECKINDEX( tarray)) return -1;
// tp = ENEMYTEMP_enemy[tarray].intdata; // tp = ENEMYTEMP_enemy[tarray].intdata;
// 犯□正戊疋□ // データコピー
for( i = 0; i < E_T_DATAINTNUM; i ++ ){ for( i = 0; i < E_T_DATAINTNUM; i ++ ){
tp[i] = ENEMYTEMP_enemy[tarray].intdata[i]; tp[i] = ENEMYTEMP_enemy[tarray].intdata[i];
} }
// 赓渝祭 // 配列初期化
memset( &CharNew, 0, sizeof( Char ) ); memset( &CharNew, 0, sizeof( Char ) );
if( !CHAR_getDefaultChar( &CharNew,31010 ) )return -1; if( !CHAR_getDefaultChar( &CharNew,31010 ) )return -1;
/* 飓 寞 */ /* 画像番号 */
CharNew.data[CHAR_BASEBASEIMAGENUMBER] CharNew.data[CHAR_BASEBASEIMAGENUMBER]
= CharNew.data[CHAR_BASEIMAGENUMBER] = *(tp+E_T_IMGNUMBER); = CharNew.data[CHAR_BASEIMAGENUMBER] = *(tp+E_T_IMGNUMBER);
/* 衬匹丐月午涩烂允月 */ /* 敵であると設定する */
CharNew.data[CHAR_WHICHTYPE] = CHAR_TYPEENEMY; CharNew.data[CHAR_WHICHTYPE] = CHAR_TYPEENEMY;
/* 毛壅允 */ /* dpを消す */
CharNew.data[CHAR_DUELPOINT] = 0; CharNew.data[CHAR_DUELPOINT] = 0;
/* 伊矛伙毛瑁烂允月[ */ /* レベルを決定する */
if( baselevel > 0 ){ if( baselevel > 0 ){
level = baselevel; // 伊矛伙裔烂 level = baselevel; // レベル固定
}else{ }else{
level = RAND( (*(p + ENEMY_LV_MIN)), (*(p+ ENEMY_LV_MAX))); level = RAND( (*(p + ENEMY_LV_MIN)), (*(p+ ENEMY_LV_MAX)));
} }
#define E_PAR( a) (*(p + (a))) #define E_PAR( a) (*(p + (a)))
#define ET_PAR( a) (*(tp + (a))) #define ET_PAR( a) (*(tp + (a)))
/* 由仿丢□正隙醒井日 端及湘 由仿丢□正尺及煌遥挚 */ /* パラメータ指数から実際の基本パラメータへの計算式 */
#if 1 #if 1
#define PARAM_CAL( l) ( ( level -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l)) #define PARAM_CAL( l) ( ( level -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l))
#else #else
#define PARAM_CAL( l) ( (E_PAR(ENEMY_LV) -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l)) #define PARAM_CAL( l) ( (E_PAR(ENEMY_LV) -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l))
#endif #endif
/* 燮内湘 喃曰蕊曰禾奶件玄卞+ㄡ毛仿件母丞匹垫丹 */ /* 先ず基本割り振りポイントに±2をランダムで行う */
tp[E_T_BASEVITAL] += RAND( 0, 4 ) - 2; tp[E_T_BASEVITAL] += RAND( 0, 4 ) - 2;
tp[E_T_BASESTR] += RAND( 0, 4 ) - 2; tp[E_T_BASESTR] += RAND( 0, 4 ) - 2;
tp[E_T_BASETGH] += RAND( 0, 4 ) - 2; tp[E_T_BASETGH] += RAND( 0, 4 ) - 2;
tp[E_T_BASEDEX] += RAND( 0, 4 ) - 2; tp[E_T_BASEDEX] += RAND( 0, 4 ) - 2;
/* 仇及凛鳔匹喃曰蕊曰禾奶件玄毛忡绣仄化云仁 */ /* この時点で割り振りポイントを保存しておく */
CharNew.data[CHAR_ALLOCPOINT] CharNew.data[CHAR_ALLOCPOINT]
= ( tp[E_T_BASEVITAL] << 24 ) = ( tp[E_T_BASEVITAL] << 24 )
+ ( tp[E_T_BASESTR] << 16 ) + ( tp[E_T_BASESTR] << 16 )
+ ( tp[E_T_BASETGH] << 8 ) + ( tp[E_T_BASETGH] << 8 )
+ ( tp[E_T_BASEDEX] << 0 ); + ( tp[E_T_BASEDEX] << 0 );
/* 公及 }仿件母丞匹禾奶件玄毛ㄠ勿勾笛遥[仇木毛ㄠㄟ荚楞曰忒允[*/ /* その後、ランダムでポイントを1づつ加算。これを10回繰り返す */
for( i = 0; i < 10; i ++ ){ for( i = 0; i < 10; i ++ ){
int work = RAND( 0, 3 ); int work = RAND( 0, 3 );
if( work == 0 )tp[E_T_BASEVITAL]++; if( work == 0 )tp[E_T_BASEVITAL]++;
@ -1063,7 +1065,7 @@ int ENEMY_createEnemy( int array, int baselevel )
if( work == 3 )tp[E_T_BASEDEX]++; if( work == 3 )tp[E_T_BASEDEX]++;
} }
/* 由仿丢□正本永玄 */ /* パラメータセット */
CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL); CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL);
CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR); CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR);
CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH); CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH);
@ -1139,13 +1141,13 @@ if (CHAR_getInt( newindex, CHAR_LV) == 1){//宝宝
{ int style, wepon = -1; { int style, wepon = -1;
style = (*(p + ENEMY_STYLE)); style = (*(p + ENEMY_STYLE));
switch( style ){ switch( style ){
case 1: wepon = 0;break; // case 1: wepon = 0;break; //
case 2: wepon = 100;break; // 轺徇 case 2: wepon = 100;break; // 棍棒
case 3: wepon = 200;break; // case 3: wepon = 200;break; //
case 4: wepon = 400;break; // case 4: wepon = 400;break; //
case 5: wepon = 500;break; // 皮□丢仿件 case 5: wepon = 500;break; // ブーメラン
case 6: wepon = 700;break; // 髑仆檗 case 6: wepon = 700;break; // 投げ石
case 7: wepon = 600;break; // 髑仆 case 7: wepon = 600;break; // 投げ斧
default:break; default:break;
} }
if( wepon >= 0 ){ if( wepon >= 0 ){
@ -1246,35 +1248,35 @@ static RANDOMENEMY RandomEnemyTbl[] = {
/*------------------------------------------------------------ /*------------------------------------------------------------
* 仿 *
------------------------------------------------------------*/ ------------------------------------------------------------*/
int ENEMY_RandomEnemyArray( int e_array, int *pNew ) int ENEMY_RandomEnemyArray( int e_array, int *pNew )
{ {
int i = 0, randwork, work; int i = 0, randwork, work;
// RANDOMENEMY *pRandomEnemy; // RANDOMENEMY *pRandomEnemy;
*pNew = -1; *pNew = -1;
// 仇及 区反仿件母丞 // この範囲はランダム
if( if(
( RANDOMENEMY_TOP <= e_array && e_array <= RANDOMENEMY_END ) ( RANDOMENEMY_TOP <= e_array && e_array <= RANDOMENEMY_END )
|| ( 964 <= e_array && e_array <= 969 ) || ( 964 <= e_array && e_array <= 969 )
){ ){
// 升及母立□井譬屯月 // どのダミーか調べる
for( i = 0; i < arraysizeof( RandomEnemyTbl ); i ++ ){ for( i = 0; i < arraysizeof( RandomEnemyTbl ); i ++ ){
if( RandomEnemyTbl[i].num == e_array ){ if( RandomEnemyTbl[i].num == e_array ){
break; break;
} }
} }
// 区毛译尹化中凶日巨仿□匹 仃月 // 範囲を超えていたらエラーで抜ける
if( i >= arraysizeof( RandomEnemyTbl ) ) return 0; if( i >= arraysizeof( RandomEnemyTbl ) ) return 0;
// 仿件母丞涩烂 // ランダム設定
randwork = RAND( 0, RandomEnemyTbl[i].arraysize - 1 ); randwork = RAND( 0, RandomEnemyTbl[i].arraysize - 1 );
// 井日蕙仄中 寞毛潸 // 配列から新しい番号を取得
work = RandomEnemyTbl[i].pTbl[randwork]; work = RandomEnemyTbl[i].pTbl[randwork];
*pNew = ENEMY_getEnemyArrayFromId( work ); *pNew = ENEMY_getEnemyArrayFromId( work );
return 1; return 1;
}else{ }else{
// 窒仪手卅中 // 何事もない
return 0; return 0;
} }
} }
@ -1525,7 +1527,7 @@ int ENEMY_createPetFromEnemyIndex( int charaindex, int array)
if( work == 2 )tp[E_T_BASETGH]++; if( work == 2 )tp[E_T_BASETGH]++;
if( work == 3 )tp[E_T_BASEDEX]++; if( work == 3 )tp[E_T_BASEDEX]++;
} }
/* 由仿丢□正本永玄 */ /* パラメータセット */
CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL); CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL);
CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR); CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR);
CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH); CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH);
@ -1657,7 +1659,7 @@ int ENEMY_createPet( int array, int vital, int str, int tgh, int dex)
if( work == 2 )tp[E_T_BASETGH]++; if( work == 2 )tp[E_T_BASETGH]++;
if( work == 3 )tp[E_T_BASEDEX]++; if( work == 3 )tp[E_T_BASEDEX]++;
} }
/* 由仿丢□正本永玄 */ /* パラメータセット */
CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL); CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL);
CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR); CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR);
CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH); CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH);
@ -1781,7 +1783,7 @@ int ENEMY_createPetFromEnemyBaseIndex( int charaindex, int array, int level )
if( work == 2 )tp[E_T_BASETGH]++; if( work == 2 )tp[E_T_BASETGH]++;
if( work == 3 )tp[E_T_BASEDEX]++; if( work == 3 )tp[E_T_BASEDEX]++;
} }
/* 由仿丢□正本永玄 */ /* パラメータセット */
CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL); CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL);
CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR); CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR);
CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH); CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH);

View File

@ -18,11 +18,11 @@ static int EVENY_npcEncount( int charaindex,int echaraindex,int fl,int x, int y
typedef int (*FUNC)( int charaindex,int echaraindex,int fl,int x, int y ); typedef int (*FUNC)( int charaindex,int echaraindex,int fl,int x, int y );
static FUNC functbl[] = { static FUNC functbl[] = {
NULL, NULL,
NULL, /* 裔烂NPC */ NULL, /* 固定NPC */
EVENY_npcEncount, /* 裔烂衬巨件市它件玄 */ EVENY_npcEncount, /* 固定敵エンカウント */
EVENT_onWarpNPC, /* warp*/ EVENT_onWarpNPC, /* warp*/
NULL, /* 裔烂NPC */ NULL, /* 固定NPC */
NULL, /* 裔烂NPC */ NULL, /* 固定NPC */
EVENT_onWarpNPC, /* warp*/ EVENT_onWarpNPC, /* warp*/
EVENT_onWarpNPC, /* warp*/ EVENT_onWarpNPC, /* warp*/
EVENT_onWarpNPC, /* warp*/ EVENT_onWarpNPC, /* warp*/

View File

@ -17,12 +17,12 @@
/* /*
* *
*/ */
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* *
* CHAR厌瞻 * CHAR構造体にのみ作成される
* 仿index -1 * index -1
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
char hanzibuf[5000][8] = {"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","", char hanzibuf[5000][8] = {"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
@ -152,31 +152,31 @@ int PET_DEBUG_initPetOne( int charaindex)
Char ch; Char ch;
int havepetindex; int havepetindex;
int index; int index;
/* 矢永玄毛 化月井譬屯月 */ /* ペットを持てるか調べる */
havepetindex = CHAR_getCharPetElement( charaindex) ; havepetindex = CHAR_getCharPetElement( charaindex) ;
memset( &ch, 0, sizeof( ch)); memset( &ch, 0, sizeof( ch));
if( !CHAR_getDefaultChar( &ch,31010 ) )return -1; if( !CHAR_getDefaultChar( &ch,31010 ) )return -1;
/* 飓 寞 */ /* 画像番号 */
ch.data[CHAR_BASEBASEIMAGENUMBER] ch.data[CHAR_BASEBASEIMAGENUMBER]
= ch.data[CHAR_BASEIMAGENUMBER] = 30008; = ch.data[CHAR_BASEIMAGENUMBER] = 30008;
ch.data[CHAR_WHICHTYPE] = CHAR_TYPEPET; ch.data[CHAR_WHICHTYPE] = CHAR_TYPEPET;
/* */ /* 攻撃力 */
ch.workint[CHAR_WORKATTACKPOWER] = 100; ch.workint[CHAR_WORKATTACKPOWER] = 100;
/* */ /* 守備力 */
ch.workint[CHAR_WORKDEFENCEPOWER] = 50; ch.workint[CHAR_WORKDEFENCEPOWER] = 50;
/* HP */ /* HP */
ch.data[CHAR_HP] = 100; ch.data[CHAR_HP] = 100;
/* */ /* 名前 */
strcpysafe( ch.string[CHAR_NAME].string, 32, "宠物1" ); strcpysafe( ch.string[CHAR_NAME].string, 32, "宠物1" );
/* CHAR卞喃曰癫化月 */ /* CHARに割り当てる */
index = PET_initCharOneArray( &ch); index = PET_initCharOneArray( &ch);
if( index < 0 ) return -1; if( index < 0 ) return -1;
/* 仍潜谛本永玄 */ /* ご主人セット */
CHAR_setWorkInt( index, CHAR_WORKPLAYERINDEX, charaindex); CHAR_setWorkInt( index, CHAR_WORKPLAYERINDEX, charaindex);
CHAR_setWorkInt( index,CHAR_WORKOBJINDEX,-1); CHAR_setWorkInt( index,CHAR_WORKOBJINDEX,-1);
CHAR_setCharPet( charaindex, havepetindex, index); CHAR_setCharPet( charaindex, havepetindex, index);
@ -309,16 +309,16 @@ static int _PET_dropPet( int charaindex, int havepetindex, int tofl, int tox, in
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
* *
* itemindex int * itemindex int
* floor int ID * floor int ID
* x int x * x int x座標
* y int y * y int y座標
* net BOOL * net BOOL
* *
* objindex * objindex
* -1 * -1
------------------------------------------------------------*/ ------------------------------------------------------------*/
int PET_dropPetAbsolute( int petindex, int floor, int x, int y,BOOL net) int PET_dropPetAbsolute( int petindex, int floor, int x, int y,BOOL net)
{ {
@ -333,10 +333,10 @@ int PET_dropPetAbsolute( int petindex, int floor, int x, int y,BOOL net)
object.y = y; object.y = y;
object.floor = floor; object.floor = floor;
/* 左皮斥尼弁玄瓒 允月 */ /* オブジェクト登録する */
objindex = initObjectOne( &object ); objindex = initObjectOne( &object );
/* 生永玄伐□弁白仿弘互凶匀化中月午五反允月 by ringo*/ /* ネットワークフラグがたっているときはする by ringo*/
if( net ) if( net )
CHAR_sendWatchEvent( objindex,CHAR_ACTSTAND,NULL,0,TRUE); CHAR_sendWatchEvent( objindex,CHAR_ACTSTAND,NULL,0,TRUE);
@ -785,7 +785,7 @@ int PET_dropPetFLXY( int charaindex, int havepetindex, int fl, int x, int y)
} }
/*------------------------------------------------------------ /*------------------------------------------------------------
* *
------------------------------------------------------------*/ ------------------------------------------------------------*/
int PET_initCharOneArray( Char *ch) int PET_initCharOneArray( Char *ch)
{ {
@ -927,10 +927,10 @@ int PET_createPetFromCharaIndex( int charaindex, int enemyindex)
BOOL PET_SelectBattleEntryPet( int charaindex, int petarray) BOOL PET_SelectBattleEntryPet( int charaindex, int petarray)
{ {
int pindex; int pindex;
/* 爵 反轮仁 仿弘匹仇木卞娄匀井井月第 岭丐曰 */ /* 戦闘中は除く (ラグでこれに引っかかる可能性あり) */
if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE)
!= BATTLE_CHARMODE_NONE) return FALSE; != BATTLE_CHARMODE_NONE) return FALSE;
/* -1及桦宁反]-1卞仄化本永玄仄化蔽歹曰*/ /* -1の場合は,-1にしてセットして終わり */
if( petarray == -1 ) { if( petarray == -1 ) {
CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1 ); CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1 );
return TRUE; return TRUE;

View File

@ -301,12 +301,12 @@ BOOL PetTalk_DelItem(int meindex,int talker,char *buf)
cnt++; cnt++;
LogItem( LogItem(
CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ CHAR_getChar( talker, CHAR_NAME ), /* キャラ名 */
CHAR_getChar( talker, CHAR_CDKEY ), CHAR_getChar( talker, CHAR_CDKEY ),
#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 #ifdef _add_item_log_name // WON ADD 在item的log中增加item名称
itemindex, itemindex,
#else #else
ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ ITEM_getInt( itemindex, ITEM_ID), /* アイテム番号 */
#endif #endif
"WarpManDelItem(NPC收道具後传至某点)", "WarpManDelItem(NPC收道具後传至某点)",
CHAR_getInt( talker, CHAR_FLOOR), CHAR_getInt( talker, CHAR_FLOOR),
@ -326,19 +326,19 @@ BOOL PetTalk_DelItem(int meindex,int talker,char *buf)
} }
} }
}else{ }else{
/*--蓟氏分 寞及失奶 丞毛蓟请---*/ /*--選んだ番号のアイテムを選出---*/
for( j = 0 ; j < CHAR_MAXITEMHAVE ; j++){ for( j = 0 ; j < CHAR_MAXITEMHAVE ; j++){
itemindex = CHAR_getItemIndex( talker ,j); itemindex = CHAR_getItemIndex( talker ,j);
if( ITEM_CHECKINDEX(itemindex) ){ if( ITEM_CHECKINDEX(itemindex) ){
if( atoi( buff3) == ITEM_getInt(itemindex,ITEM_ID)){ if( atoi( buff3) == ITEM_getInt(itemindex,ITEM_ID)){
LogItem( LogItem(
CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ CHAR_getChar( talker, CHAR_NAME ), /* キャラ名 */
CHAR_getChar( talker, CHAR_CDKEY ), CHAR_getChar( talker, CHAR_CDKEY ),
#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 #ifdef _add_item_log_name // WON ADD 在item的log中增加item名称
itemindex, itemindex,
#else #else
ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ ITEM_getInt( itemindex, ITEM_ID), /* アイテム番号 */
#endif #endif
"WarpManDelItem(NPC收道具後传至某点)", "WarpManDelItem(NPC收道具後传至某点)",
CHAR_getInt( talker,CHAR_FLOOR), CHAR_getInt( talker,CHAR_FLOOR),