
//============================================================================================
/**
 * @file	battle_server.h
 * @bfief	戦闘用ソースのヘッダで使用する定数定義のみを定義（battle_common.hから戦闘特化の定義を抽出）
 * @author	HisashiSogabe
 * @date	05.05.30
 */
//============================================================================================

#ifndef __BATTLE_SERVER_H_
#define __BATTLE_SERVER_H_

#ifndef	__ASM_NO_DEF_
#include "bugfix.h"
#else	__ASM_NO_DEF_
	.include "../../../include/bugfix.h"
#endif	__ASM_NO_DEF_

//client_statusの定義
#define	CLIENT_STATUS_POKE_RESHUFFLE		(0x00000001)			///<気絶によるポケモン入れ替え起動

#define	CLIENT_STATUS_POKE_RESHUFFLE_OFF	(0x00000001)^0xffffffff	///<気絶によるポケモン入れ替え起動

#define	BATTLE_MSG_WAIT		(1)		///<戦闘メッセージのウエイト

#define	NO_SEL_MONS			(6)		///<入れ替えるポケモンを持たないClientのSelMonsNo

//ADD_STATUSのナンバー（追加効果）
#define	ADD_COND_NONE					(0x00000000)			//なし
#define	ADD_COND_NEMURI					(0x00000001)			//ねむり
#define	ADD_COND_DOKU					(0x00000002)			//毒
#define	ADD_COND_YAKEDO					(0x00000003)			//やけど
#define	ADD_COND_KOORI					(0x00000004)			//こおり
#define	ADD_COND_MAHI					(0x00000005)			//まひ
#define	ADD_COND_DOKUDOKU				(0x00000006)			//どくどく
#define	ADD_COND2_KONRAN				(0x00000007)			//こんらん
#define	ADD_COND2_HIRUMU				(0x00000008)			//ひるむ
#define	ADD_COND2_NEMURU				(0x00000009)			//ねむる
#define	ADD_COND2_SAWAGU				(0x0000000a)			//さわぐ
#define	ADD_COND2_NEKONIKOBAN			(0x0000000b)			//ねこにこばん
#define	ADD_COND2_KEEP					(0x0000000c)			//ため系の技
#define	ADD_COND2_SHIME					(0x0000000d)			//しめ系の技
#define	ADD_COND2_HANEKAERI				(0x0000000e)			//はねかえり系の技(1/4)
#define	ADD_COND2_POWUP					(0x0000000f)			//攻撃力アップ
#define	ADD_COND2_DEFUP					(0x00000010)			//防御力アップ
#define	ADD_COND2_AGIUP					(0x00000011)			//素早さアップ
#define	ADD_COND2_SPEPOWUP				(0x00000012)			//特攻アップ
#define	ADD_COND2_SPEDEFUP				(0x00000013)			//特防アップ
#define	ADD_COND2_HITUP					(0x00000014)			//命中率アップ
#define	ADD_COND2_AVOIDUP				(0x00000015)			//回避率アップ
#define	ADD_COND2_POWDOWN				(0x00000016)			//攻撃力ダウン
#define	ADD_COND2_DEFDOWN				(0x00000017)			//防御力ダウン
#define	ADD_COND2_AGIDOWN				(0x00000018)			//素早さダウン
#define	ADD_COND2_SPEPOWDOWN			(0x00000019)			//特攻ダウン
#define	ADD_COND2_SPEDEFDOWN			(0x0000001a)			//特防ダウン
#define	ADD_COND2_HITDOWN				(0x0000001b)			//命中率ダウン
#define	ADD_COND2_AVOIDDOWN				(0x0000001c)			//回避率ダウン
#define	ADD_COND2_HANDOU				(0x0000001d)			//はんどう
#define	ADD_COND2_IKARI					(0x0000001e)			//いかり
#define	ADD_COND2_DOROBOU				(0x0000001f)			//どろぼう
#define	ADD_COND2_KUROIMANAZASHI		(0x00000020)			//くろいまなざし
#define	ADD_COND2_AKUMU					(0x00000021)			//あくむ
#define	ADD_COND2_GENSHINOCHIKARA		(0x00000022)			//げんしのちから
#define	ADD_COND2_KOUSOKUSPIN			(0x00000023)			//こうそくスピン
#define	ADD_COND_NOMAHI					(0x00000024)			//まひをなおす
#define	ADD_COND2_BAKADIKARA			(0x00000025)			//ばかぢから
#define	ADD_COND2_HANEKAERI2			(0x00000026)			//はねかえり系の技(1/3)
#define	ADD_COND2_POWUP2				(0x00000027)			//攻撃力アップ(2段階）
#define	ADD_COND2_DEFUP2				(0x00000028)			//防御力アップ(2段階）
#define	ADD_COND2_AGIUP2				(0x00000029)			//素早さアップ(2段階）
#define	ADD_COND2_SPEPOWUP2				(0x0000002a)			//特攻アップ(2段階）
#define	ADD_COND2_SPEDEFUP2				(0x0000002b)			//特防アップ(2段階）
#define	ADD_COND2_HITUP2				(0x0000002c)			//命中率アップ(2段階）
#define	ADD_COND2_AVOIDUP2				(0x0000002d)			//回避率アップ(2段階）
#define	ADD_COND2_POWDOWN2				(0x0000002e)			//攻撃力ダウン(2段階）
#define	ADD_COND2_DEFDOWN2				(0x0000002f)			//防御力ダウン(2段階）
#define	ADD_COND2_AGIDOWN2				(0x00000030)			//素早さダウン(2段階）
#define	ADD_COND2_SPEPOWDOWN2			(0x00000031)			//特攻ダウン(2段階）
#define	ADD_COND2_SPEDEFDOWN2			(0x00000032)			//特防ダウン(2段階）
#define	ADD_COND2_HITDOWN2				(0x00000033)			//命中率ダウン(2段階）
#define	ADD_COND2_AVOIDDOWN2			(0x00000034)			//回避率ダウン(2段階）
#define	ADD_COND2_ABARERU				(0x00000035)			//あばれる
#define	ADD_COND2_HATAKIOTOSU			(0x00000036)			//はたきおとす
#define	ADD_COND2_COSMO_POWER			(0x00000037)			//コスモパワー（複数アップ（abiritycnt系））
#define	ADD_COND2_BUILD_UP				(0x00000038)			//ビルドアップ（複数アップ（abiritycnt系））
#define	ADD_COND2_KUSUGURU				(0x00000039)			//くすぐる（複数ダウン（abiritycnt系））
#define	ADD_COND2_MEISOU				(0x0000003a)			//めいそう（複数アップ（abiritycnt系））
#define	ADD_COND2_RYUUNOMAI				(0x0000003b)			//りゅうのまい（複数アップ（abiritycnt系））
#define	ADD_COND2_SUITORI				(0x0000003c)			//HPすいとり系
#define	ADD_COND2_YUMEKUI				(0x0000003d)			//ゆめくい
#define	ADD_COND2_KUROIKIRI				(0x0000003e)			//くろいきり
#define	ADD_COND2_GAMAN					(0x0000003f)			//がまん
#define	ADD_COND2_WARUAGAKI				(0x00000040)			//わるあがき
#define	ADD_COND2_TEXTURE				(0x00000041)			//テクスチャー
#define	ADD_COND2_JIKOSAISEI			(0x00000042)			//じこさいせい
#define	ADD_COND2_HIKARINOKABE			(0x00000043)			//ひかりのかべ
#define	ADD_COND2_RIHUREKUTAA			(0x00000044)			//リフレクター
#define	ADD_COND2_SIROIKIRI				(0x00000045)			//しろいきり
#define	ADD_COND2_KIAIDAME				(0x00000046)			//きあいだめ
#define	ADD_COND2_MONOMANE				(0x00000047)			//ものまね
#define	ADD_COND2_YADORIGI				(0x00000048)			//やどりぎ
#define	ADD_COND2_KANASIBARI			(0x00000049)			//かなしばり
#define	ADD_COND2_ENCORE				(0x0000004a)			//アンコール
#define	ADD_COND2_ITAMIWAKE				(0x0000004b)			//いたみわけ
#define	ADD_COND2_TEXTURE2				(0x0000004c)			//テクスチャ２
#define	ADD_COND2_LOCKON				(0x0000004d)			//ロックオン
#define	ADD_COND2_SKETCH				(0x0000004e)			//スケッチ
#define	ADD_COND2_FEINT					(0x0000004f)			//フェイント
#define	ADD_COND2_MICHIDURE				(0x00000050)			//みちづれ
#define	ADD_COND2_URAMI					(0x00000051)			//うらみ
#define	ADD_COND2_GUARD					(0x00000052)			//まもる、みきり、こらえるなど
#define	ADD_COND2_IYASINOSUZU			(0x00000053)			//いやしのすず
#define	ADD_COND2_MIGAWARI				(0x00000054)			//みがわり
#define	ADD_COND2_HUKITOBASI			(0x00000055)			//ふきとばし
#define	ADD_COND2_HENSIN				(0x00000056)			//へんしん
#define	ADD_COND2_CHIISAKUNARU			(0x00000057)			//ちいさくなる
#define	ADD_COND2_NORMAL_NOROI			(0x00000058)			//のろい（ノーマル）
#define	ADD_COND2_GHOST_NOROI			(0x00000059)			//のろい（ゴースト）
#define	ADD_COND2_MESSAGE_WORK			(0x0000005a)			//メッセージ表示
#define	ADD_COND2_MIYABURU				(0x0000005b)			//みやぶる
#define	ADD_COND2_HOROBINOUTA			(0x0000005c)			//ほろびのうた
#define	ADD_COND2_TENKOU				(0x0000005d)			//天気系
#define	ADD_COND2_IBARU					(0x0000005e)			//いばる
#define	ADD_COND2_MEROMERO				(0x0000005f)			//メロメロ
#define	ADD_COND2_SHINPI				(0x00000060)			//しんぴのまもり
#define	ADD_COND2_PRESENT				(0x00000061)			//プレゼント
#define	ADD_COND2_MAGNITUDE				(0x00000062)			//マグニチュード
#define	ADD_COND2_BATONTOUCH			(0x00000063)			//バトンタッチ
#define	ADD_COND2_HARADAIKO				(0x00000064)			//はらだいこ
#define	ADD_COND2_TELEPORT				(0x00000065)			//テレポート
#define	ADD_COND2_HUKURODATAKI			(0x00000066)			//ふくろだたき
#define	ADD_COND2_TAKUWAERU				(0x00000067)			//たくわえる
#define	ADD_COND2_NOMIKOMU				(0x00000068)			//のみこむ
#define	ADD_COND2_ICHAMON				(0x00000069)			//いちゃもん
#define	ADD_COND2_ODATERU				(0x0000006a)			//おだてる
#define	ADD_COND2_OKIMIYAGE				(0x0000006b)			//おきみやげ
#define	ADD_COND2_JUUDEN				(0x0000006c)			//じゅうでん
#define	ADD_COND2_CHOUHATSU				(0x0000006d)			//ちょうはつ
#define	ADD_COND2_TRICK					(0x0000006e)			//トリック
#define	ADD_COND2_NARIKIRI				(0x0000006f)			//なりきり
#define	ADD_COND2_KAWARAWARI			(0x00000070)			//かわらわり
#define	ADD_COND2_AKUBI					(0x00000071)			//あくび
#define	ADD_COND2_SKILLSWAP				(0x00000072)			//スキルスワップ
#define	ADD_COND2_REFRESH				(0x00000073)			//リフレッシュ
#define	ADD_COND2_HANEYASUME			(0x00000074)			//はねやすめ
#define	ADD_COND_NONEMURI				(0x00000075)			//めざましビンタ
#define	ADD_COND2_JUURYOKU				(0x00000076)			//じゅうりょく
#define	ADD_COND2_MIRACLE_EYE			(0x00000077)			//ミラクルアイ
#define	ADD_COND2_IYASINONEGAI			(0x00000078)			//いやしのねがい
#define	ADD_COND2_OIKAZE				(0x00000079)			//おいかぜ
#define	ADD_COND2_INFIGHT				(0x0000007a)			//インファイト
#define	ADD_COND2_POWER_TRICK			(0x0000007b)			//パワートリック
#define	ADD_COND2_IEKI					(0x0000007c)			//いえき
#define	ADD_COND2_OMAZINAI				(0x0000007d)			//おまじない
#define	ADD_COND2_POWER_SWAP			(0x0000007e)			//パワースワップ
#define	ADD_COND2_GUARD_SWAP			(0x0000007f)			//ガードスワップ
#define	ADD_COND2_NAYAMINOTANE			(0x00000080)			//なやみのたね
#define	ADD_COND2_HEART_SWAP			(0x00000081)			//ハートスワップ
#define	ADD_COND2_HEAT_ATTACK			(0x00000082)			//ヒートアタック
#define	ADD_COND2_KIRIHARAI				(0x00000083)			//きりはらい
#define	ADD_COND2_HEALBLOCK				(0x00000084)			//ヒールブロック
#define	ADD_COND2_TONBOGAERI			(0x00000085)			//とんぼがえり
#define	ADD_COND2_SHUTOUT				(0x00000086)			//シャットアウト
#define	ADD_COND2_TSUIBAMU				(0x00000087)			//ついばむ
#define	ADD_COND2_NAGETSUKERU			(0x00000088)			//なげつける
#define	ADD_COND2_VOLT					(0x00000089)			//ボルテッカー
#define	ADD_COND2_HANEKAERI3			(0x0000008a)			//はねかえり系の技(1/2)
#define	ADD_COND2_YAKEDO_HIRUMU			(0x0000008b)			//やけど＋ひるむの追加効果
#define	ADD_COND2_KOORI_HIRUMU			(0x0000008c)			//こおり＋ひるむの追加効果
#define	ADD_COND2_MAHI_HIRUMU			(0x0000008d)			//まひ＋ひるむの追加効果
#define	ADD_COND2_OSYABERI				(0x0000008e)			//おしゃべり
#define	ADD_COND2_MIKADUKINOMAI			(0x0000008f)			//みかづきのまい
#define	ADD_COND2_SURIKOMI				(0x00000090)			//すりこみ
	
#define	ADD_STATUS_WAZAKOUKA_KAWARAWARI	(0x00800000)			//技特有の追加効果（かわらわり特有）
#define	ADD_STATUS_WAZAKOUKA_NOHP		(0x01000000)			//技特有の追加効果（NoHit、身代わりもチェック）
#define	ADD_STATUS_WAZAKOUKA_CHECK		(0x02000000)			//技特有の追加効果（NoHit、NoHp、身代わりもチェック）
#define	ADD_STATUS_WAZAKOUKA_PROB		(0x04000000)			//技特有の追加効果（確率で発動するかもチェック）
#define	ADD_STATUS_NO_TOKUSEI			(0x08000000)			//特性などで防げない
#define	ADD_STATUS_WAZAKOUKA_NOHIT		(0x10000000)			//技特有の追加効果（技が外れていてもチェック）
#define	ADD_STATUS_WAZAKOUKA			(0x20000000)			//技特有の追加効果
#define	ADD_STATUS_ATTACK				(0x40000000)			//AttckClientを追加効果対象にする
#define	ADD_STATUS_DEFENCE				(0x80000000)			//DefenceClientを追加効果対象にする

#define	ADD_STATUS_MASK				(0x007fffff)			//追加効果ナンバーだけを取り出すMASK

#define	ADD_STATUS_NONE				(0)						//追加効果種類：追加効果なし
#define	ADD_STATUS_DIRECT			(1)						//追加効果種類：直接
#define	ADD_STATUS_INDIRECT			(2)						//追加効果種類：間接
#define	ADD_STATUS_TOKUSEI			(3)						//追加効果種類：特性
#define	ADD_STATUS_WAZA_KOUKA		(4)						//追加効果種類：技効果
#define	ADD_STATUS_SOUBIITEM		(5)						//追加効果種類：装備アイテム効果
#define	ADD_STATUS_DOKUBISI			(6)						//追加効果種類：どくびし追加効果

//abiritycntの添え字
#define	COND_HP				(0x00)	///<体力
#define	COND_POW			(0x01)	///<攻撃力
#define	COND_DEF			(0x02)	///<防御力
#define	COND_AGI			(0x03)	///<素早さ
#define	COND_SPEPOW			(0x04)	///<特攻
#define	COND_SPEDEF			(0x05)	///<特防
#define	COND_HIT			(0x06)	///<命中率
#define	COND_AVOID			(0x07)	///<回避率
#define	COND_MAX			(0x08)	///<CONDのMAX（くろいきり用）

#define	COND_NUM_DEFAULT	(6)		///<abiritycntのデフォルト値

//メッセージ用の状態異常ナンバー定義
#define	MSG_COND_NEMURI		(0)
#define	MSG_COND_DOKU		(1)
#define	MSG_COND_YAKEDO		(2)
#define	MSG_COND_MAHI		(3)
#define	MSG_COND_KOORI		(4)
#define	MSG_COND_KONRAN		(5)
#define	MSG_COND_MEROMERO	(6)

//天候ダメージ用の定義
#define	TENKOU_URUOIBODY	(1)
#define	TENKOU_SUNPOWER		(2)

///<サーバシーケンスのインデックス宣言
#define	SUB_SEQ_START_NO					(0)
#define	SUB_SEQ_POKEMON_ENCOUNT				(SUB_SEQ_START_NO+0)
#define	SUB_SEQ_WAZA_OUT					(SUB_SEQ_START_NO+1)
#define	SUB_SEQ_HP_CALC						(SUB_SEQ_START_NO+2)
#define	SUB_SEQ_ESCAPE						(SUB_SEQ_START_NO+3)
#define	SUB_SEQ_FIGHT_WIN					(SUB_SEQ_START_NO+4)
#define	SUB_SEQ_FIGHT_LOSE					(SUB_SEQ_START_NO+5)
#define	SUB_SEQ_KIZETSU						(SUB_SEQ_START_NO+6)
#define	SUB_SEQ_WAZA_NO_HIT					(SUB_SEQ_START_NO+7)
#define	SUB_SEQ_ESCAPE_NG					(SUB_SEQ_START_NO+8)
#define	SUB_SEQ_POKEMON_RESHUFFLE			(SUB_SEQ_START_NO+9)
#define	SUB_SEQ_POKEMON_LIST				(SUB_SEQ_START_NO+10)
#define	SUB_SEQ_BALL_THROW					(SUB_SEQ_START_NO+11)
#define	SUB_SEQ_ABICNT_CALC					(SUB_SEQ_START_NO+12)
#define	SUB_SEQ_KEEP						(SUB_SEQ_START_NO+13)
#define	SUB_SEQ_HIRUMU						(SUB_SEQ_START_NO+14)
#define	SUB_SEQ_HIRUMU_WAZA_NO_HIT			(SUB_SEQ_START_NO+15)
#define	SUB_SEQ_CRITICAL_HIT				(SUB_SEQ_START_NO+16)
#define	SUB_SEQ_LOOP_HIT					(SUB_SEQ_START_NO+17)
#define	SUB_SEQ_NEMURI						(SUB_SEQ_START_NO+18)
#define	SUB_SEQ_MEZAME						(SUB_SEQ_START_NO+19)
#define	SUB_SEQ_SLEEPING					(SUB_SEQ_START_NO+20)
#define	SUB_SEQ_WAZA_STATUS_MSG				(SUB_SEQ_START_NO+21)
#define	SUB_SEQ_DOKU						(SUB_SEQ_START_NO+22)
#define	SUB_SEQ_DOKU_HP_DEC					(SUB_SEQ_START_NO+23)
#define	SUB_SEQ_SUITORI						(SUB_SEQ_START_NO+24)
#define	SUB_SEQ_YAKEDO						(SUB_SEQ_START_NO+25)
#define	SUB_SEQ_YAKEDO_HP_DEC				(SUB_SEQ_START_NO+26)
#define	SUB_SEQ_KOORI						(SUB_SEQ_START_NO+27)
#define	SUB_SEQ_FREEZING					(SUB_SEQ_START_NO+28)
#define	SUB_SEQ_MELT						(SUB_SEQ_START_NO+29)
#define	SUB_SEQ_WAZA_MELT					(SUB_SEQ_START_NO+30)
#define	SUB_SEQ_MAHI						(SUB_SEQ_START_NO+31)
#define	SUB_SEQ_PARALYSIS					(SUB_SEQ_START_NO+32)
#define	SUB_SEQ_YUMEKUI						(SUB_SEQ_START_NO+33)
#define	SUB_SEQ_KUROIKIRI					(SUB_SEQ_START_NO+34)
#define	SUB_SEQ_GAMAN						(SUB_SEQ_START_NO+35)
#define	SUB_SEQ_GAMAN_AFTER					(SUB_SEQ_START_NO+36)
#define	SUB_SEQ_KONRAN						(SUB_SEQ_START_NO+37)
#define	SUB_SEQ_CONFUSE						(SUB_SEQ_START_NO+38)
#define	SUB_SEQ_CONFUSE_MINE_ATTACK			(SUB_SEQ_START_NO+39)
#define	SUB_SEQ_CONFUSE_END					(SUB_SEQ_START_NO+40)
#define	SUB_SEQ_TRAINER_MESSAGE				(SUB_SEQ_START_NO+41)
#define	SUB_SEQ_PP_NONE						(SUB_SEQ_START_NO+42)
#define	SUB_SEQ_WARUAGAKI					(SUB_SEQ_START_NO+43)
#define	SUB_SEQ_ABARERU						(SUB_SEQ_START_NO+44)
#define	SUB_SEQ_TEXTURE						(SUB_SEQ_START_NO+45)
#define	SUB_SEQ_JIKOSAISEI					(SUB_SEQ_START_NO+46)
#define	SUB_SEQ_DOKUDOKU					(SUB_SEQ_START_NO+47)
#define	SUB_SEQ_NEKONIKOBAN					(SUB_SEQ_START_NO+48)
#define	SUB_SEQ_HIKARINOKABE				(SUB_SEQ_START_NO+49)
#define	SUB_SEQ_WAZA_KOUKA_END				(SUB_SEQ_START_NO+50)
#define	SUB_SEQ_ABARERU_END					(SUB_SEQ_START_NO+51)
#define	SUB_SEQ_RIHUREKUTAA					(SUB_SEQ_START_NO+52)
#define	SUB_SEQ_KABE						(SUB_SEQ_START_NO+53)
#define	SUB_SEQ_SIROIKIRI					(SUB_SEQ_START_NO+54)
#define	SUB_SEQ_NEMURU						(SUB_SEQ_START_NO+55)
#define	SUB_SEQ_SAWAGU						(SUB_SEQ_START_NO+56)
#define	SUB_SEQ_MESSAGE_WORK				(SUB_SEQ_START_NO+57)
#define	SUB_SEQ_SHIME						(SUB_SEQ_START_NO+58)
#define	SUB_SEQ_SHIME_HP_DEC				(SUB_SEQ_START_NO+59)
#define	SUB_SEQ_SHIME_END					(SUB_SEQ_START_NO+60)
#define	SUB_SEQ_NOHIT_PENALTY				(SUB_SEQ_START_NO+61)
#define	SUB_SEQ_KIAIDAME					(SUB_SEQ_START_NO+62)
#define	SUB_SEQ_HANEKAERI					(SUB_SEQ_START_NO+63)
#define	SUB_SEQ_HANDOU						(SUB_SEQ_START_NO+64)
#define	SUB_SEQ_HANDOU_NOHIT				(SUB_SEQ_START_NO+65)
#define	SUB_SEQ_IKARI						(SUB_SEQ_START_NO+66)
#define	SUB_SEQ_MONOMANE					(SUB_SEQ_START_NO+67)
#define	SUB_SEQ_YADORIGI					(SUB_SEQ_START_NO+68)
#define	SUB_SEQ_YADORIGI_HP_DEC				(SUB_SEQ_START_NO+69)
#define	SUB_SEQ_KANASIBARI					(SUB_SEQ_START_NO+70)
#define	SUB_SEQ_KANASIBARI_NG				(SUB_SEQ_START_NO+71)
#define	SUB_SEQ_KANASIBARI_END				(SUB_SEQ_START_NO+72)
#define	SUB_SEQ_ENCORE						(SUB_SEQ_START_NO+73)
#define	SUB_SEQ_ENCORE_END					(SUB_SEQ_START_NO+74)
#define	SUB_SEQ_UMAKUKIMARAN				(SUB_SEQ_START_NO+75)
#define	SUB_SEQ_WAZA_OUT_EFF				(SUB_SEQ_START_NO+76)
#define	SUB_SEQ_ITAMIWAKE					(SUB_SEQ_START_NO+77)
#define	SUB_SEQ_TEXTURE2					(SUB_SEQ_START_NO+78)
#define	SUB_SEQ_LOCKON						(SUB_SEQ_START_NO+79)
#define	SUB_SEQ_SKETCH						(SUB_SEQ_START_NO+80)
#define	SUB_SEQ_FEINT						(SUB_SEQ_START_NO+81)	
#define	SUB_SEQ_MICHIDURE					(SUB_SEQ_START_NO+82)
#define	SUB_SEQ_MICHIDURE_KIZETSU			(SUB_SEQ_START_NO+83)
#define	SUB_SEQ_URAMI						(SUB_SEQ_START_NO+84)
#define	SUB_SEQ_DOROBOU						(SUB_SEQ_START_NO+85)
#define	SUB_SEQ_KUROIMANAZASI				(SUB_SEQ_START_NO+86)
#define	SUB_SEQ_GUARD						(SUB_SEQ_START_NO+87)
#define	SUB_SEQ_IYASINOSUZU					(SUB_SEQ_START_NO+88)
#define	SUB_SEQ_MIGAWARI					(SUB_SEQ_START_NO+89)
#define	SUB_SEQ_MIGAWARI_HIT				(SUB_SEQ_START_NO+90)
#define	SUB_SEQ_HUKITOBASI					(SUB_SEQ_START_NO+91)
#define	SUB_SEQ_HENSIN						(SUB_SEQ_START_NO+92)
#define	SUB_SEQ_AKUMU						(SUB_SEQ_START_NO+93)
#define	SUB_SEQ_AKUMU_HP_DEC				(SUB_SEQ_START_NO+94)
#define	SUB_SEQ_CHIISAKUNARU				(SUB_SEQ_START_NO+95)
#define	SUB_SEQ_NORMAL_NOROI				(SUB_SEQ_START_NO+96)
#define	SUB_SEQ_GHOST_NOROI					(SUB_SEQ_START_NO+97)
#define	SUB_SEQ_NOROI_HP_DEC				(SUB_SEQ_START_NO+98)
#define	SUB_SEQ_MAKIBISI_CHECK				(SUB_SEQ_START_NO+99)
#define	SUB_SEQ_MIYABURU					(SUB_SEQ_START_NO+100)
#define	SUB_SEQ_HOROBINOUTA					(SUB_SEQ_START_NO+101)
#define	SUB_SEQ_HOROBINOUTA_COUNTDOWN		(SUB_SEQ_START_NO+102)
#define	SUB_SEQ_TENKOU						(SUB_SEQ_START_NO+103)
#define	SUB_SEQ_TENKOU_KEEP					(SUB_SEQ_START_NO+104)
#define	SUB_SEQ_IBARU						(SUB_SEQ_START_NO+105)
#define	SUB_SEQ_MEROMERO					(SUB_SEQ_START_NO+106)
#define	SUB_SEQ_MEROMERO_KEEP				(SUB_SEQ_START_NO+107)
#define	SUB_SEQ_MEROMERO_NG					(SUB_SEQ_START_NO+108)
#define	SUB_SEQ_SHINPI						(SUB_SEQ_START_NO+109)
#define	SUB_SEQ_SHINPI_END					(SUB_SEQ_START_NO+110)
#define	SUB_SEQ_KAIFUKU						(SUB_SEQ_START_NO+111)
#define	SUB_SEQ_PRESENT						(SUB_SEQ_START_NO+112)
#define	SUB_SEQ_MAGNITUDE					(SUB_SEQ_START_NO+113)
#define	SUB_SEQ_BATONTOUCH					(SUB_SEQ_START_NO+114)
#define	SUB_SEQ_KOUSOKUSPIN					(SUB_SEQ_START_NO+115)
#define	SUB_SEQ_SHIME_ESCAPE				(SUB_SEQ_START_NO+116)
#define	SUB_SEQ_KOUSOKUSPIN_ESCAPE			(SUB_SEQ_START_NO+117)
#define	SUB_SEQ_SURIKOMI					(SUB_SEQ_START_NO+118)
#define	SUB_SEQ_GENSHINOCHIKARA				(SUB_SEQ_START_NO+119)
#define	SUB_SEQ_HARADAIKO					(SUB_SEQ_START_NO+120)
#define	SUB_SEQ_MIRAIYOCHI_DAMAGE			(SUB_SEQ_START_NO+121)
#define	SUB_SEQ_TELEPORT					(SUB_SEQ_START_NO+122)
#define	SUB_SEQ_HUKURODATAKI				(SUB_SEQ_START_NO+123)
#define	SUB_SEQ_TAKUWAERU					(SUB_SEQ_START_NO+124)
#define	SUB_SEQ_NOMIKOMU					(SUB_SEQ_START_NO+125)
#define	SUB_SEQ_ADD_MESSAGE_WORK			(SUB_SEQ_START_NO+126)
#define	SUB_SEQ_ICHAMON						(SUB_SEQ_START_NO+127)
#define	SUB_SEQ_ODATERU						(SUB_SEQ_START_NO+128)
#define	SUB_SEQ_OKIMIYAGE					(SUB_SEQ_START_NO+129)
#define	SUB_SEQ_NO_MAHI						(SUB_SEQ_START_NO+130)
#define	SUB_SEQ_JUUDEN						(SUB_SEQ_START_NO+131)
#define	SUB_SEQ_CHOUHATSU					(SUB_SEQ_START_NO+132)
#define	SUB_SEQ_CHOUHATSU_NG				(SUB_SEQ_START_NO+133)
#define	SUB_SEQ_TRICK						(SUB_SEQ_START_NO+134)
#define	SUB_SEQ_NARIKIRI					(SUB_SEQ_START_NO+135)
#define	SUB_SEQ_NEGAIGOTO					(SUB_SEQ_START_NO+136)
#define	SUB_SEQ_NEWOHARU					(SUB_SEQ_START_NO+137)
#define	SUB_SEQ_BAKADIKARA					(SUB_SEQ_START_NO+138)
#define	SUB_SEQ_MAGIC_CORT					(SUB_SEQ_START_NO+139)
#define	SUB_SEQ_KAWARAWARI					(SUB_SEQ_START_NO+140)
#define	SUB_SEQ_AKUBI						(SUB_SEQ_START_NO+141)
#define	SUB_SEQ_HATAKIOTOSU					(SUB_SEQ_START_NO+142)
#define	SUB_SEQ_SKILLSWAP					(SUB_SEQ_START_NO+143)
#define	SUB_SEQ_HUUIN_NG					(SUB_SEQ_START_NO+144)
#define	SUB_SEQ_REFRESH						(SUB_SEQ_START_NO+145)
#define	SUB_SEQ_YOKODORI					(SUB_SEQ_START_NO+146)
#define	SUB_SEQ_HANEKAERI2					(SUB_SEQ_START_NO+147)
#define	SUB_SEQ_KUSUGURU					(SUB_SEQ_START_NO+148)
#define	SUB_SEQ_COSMO_POWER					(SUB_SEQ_START_NO+149)
#define	SUB_SEQ_BUILD_UP					(SUB_SEQ_START_NO+150)
#define	SUB_SEQ_MEISOU						(SUB_SEQ_START_NO+151)
#define	SUB_SEQ_RYUUNOMAI					(SUB_SEQ_START_NO+152)
#define	SUB_SEQ_OIUCHI						(SUB_SEQ_START_NO+153)
#define	SUB_SEQ_HANEYASUME					(SUB_SEQ_START_NO+154)
#define	SUB_SEQ_NO_NEMURI					(SUB_SEQ_START_NO+155)
#define	SUB_SEQ_JUURYOKU					(SUB_SEQ_START_NO+156)
#define	SUB_SEQ_JUURYOKU_NG					(SUB_SEQ_START_NO+157)
#define	SUB_SEQ_MIRACLE_EYE					(SUB_SEQ_START_NO+158)
#define	SUB_SEQ_IYASINONEGAI				(SUB_SEQ_START_NO+159)
#define	SUB_SEQ_OIKAZE						(SUB_SEQ_START_NO+160)
#define	SUB_SEQ_INFIGHT						(SUB_SEQ_START_NO+161)
#define	SUB_SEQ_POWER_TRICK					(SUB_SEQ_START_NO+162)
#define	SUB_SEQ_IEKI						(SUB_SEQ_START_NO+163)
#define	SUB_SEQ_OMAZINAI					(SUB_SEQ_START_NO+164)
#define	SUB_SEQ_POWER_SWAP					(SUB_SEQ_START_NO+165)
#define	SUB_SEQ_GUARD_SWAP					(SUB_SEQ_START_NO+166)
#define	SUB_SEQ_NAYAMINOTANE				(SUB_SEQ_START_NO+167)
#define	SUB_SEQ_HEART_SWAP					(SUB_SEQ_START_NO+168)
#define	SUB_SEQ_WAZAKOUKA_HP_KAIFUKU		(SUB_SEQ_START_NO+169)
#define	SUB_SEQ_HEAT_ATTACK					(SUB_SEQ_START_NO+170)
#define	SUB_SEQ_KIRIHARAI					(SUB_SEQ_START_NO+171)
#define	SUB_SEQ_KIRIHARAI_MSG				(SUB_SEQ_START_NO+172)
#define	SUB_SEQ_HEALBLOCK					(SUB_SEQ_START_NO+173)
#define	SUB_SEQ_HEALBLOCK_NG				(SUB_SEQ_START_NO+174)
#define	SUB_SEQ_TONBOGAERI					(SUB_SEQ_START_NO+175)
#define	SUB_SEQ_ATARANAKATTA				(SUB_SEQ_START_NO+176)
#define	SUB_SEQ_KATAYABURI					(SUB_SEQ_START_NO+177)
#define	SUB_SEQ_TOKUSEI_HP_KAIFUKU			(SUB_SEQ_START_NO+178)
#define	SUB_SEQ_MORAIBI						(SUB_SEQ_START_NO+179)
#define	SUB_SEQ_HIRAISIN					(SUB_SEQ_START_NO+180)
#define	SUB_SEQ_BOUON						(SUB_SEQ_START_NO+181)
#define	SUB_SEQ_DENKIENZIN					(SUB_SEQ_START_NO+182)
#define	SUB_SEQ_AMEHURASI					(SUB_SEQ_START_NO+183)
#define	SUB_SEQ_SUNAOKOSI					(SUB_SEQ_START_NO+184)
#define	SUB_SEQ_HIDERI						(SUB_SEQ_START_NO+185)
#define	SUB_SEQ_IKAKU						(SUB_SEQ_START_NO+186)
#define	SUB_SEQ_TRACE						(SUB_SEQ_START_NO+187)
#define	SUB_SEQ_HENSYOKU					(SUB_SEQ_START_NO+188)
#define	SUB_SEQ_SAMEHADA					(SUB_SEQ_START_NO+189)
#define	SUB_SEQ_DAPPI						(SUB_SEQ_START_NO+190)
#define	SUB_SEQ_NAMAKE						(SUB_SEQ_START_NO+191)
#define	SUB_SEQ_TOKUSEI_HP_KAIFUKU_TURN		(SUB_SEQ_START_NO+192)
#define	SUB_SEQ_YUUBAKU						(SUB_SEQ_START_NO+193)
#define	SUB_SEQ_KIKENYOCHI					(SUB_SEQ_START_NO+194)
#define	SUB_SEQ_YOCHIMU						(SUB_SEQ_START_NO+195)
#define	SUB_SEQ_SLOWSTART					(SUB_SEQ_START_NO+196)
#define	SUB_SEQ_SLOWSTART_END				(SUB_SEQ_START_NO+197)
#define	SUB_SEQ_EQPITEM_HP_KAIHUKU			(SUB_SEQ_START_NO+198)
#define	SUB_SEQ_EQPITEM_NO_MAHI				(SUB_SEQ_START_NO+199)
#define	SUB_SEQ_EQPITEM_NO_NEMURI			(SUB_SEQ_START_NO+200)
#define	SUB_SEQ_EQPITEM_NO_DOKU				(SUB_SEQ_START_NO+201)
#define	SUB_SEQ_EQPITEM_NO_YAKEDO			(SUB_SEQ_START_NO+202)
#define	SUB_SEQ_EQPITEM_NO_KOORI			(SUB_SEQ_START_NO+203)
#define	SUB_SEQ_EQPITEM_PP_KAIHUKU			(SUB_SEQ_START_NO+204)
#define	SUB_SEQ_EQPITEM_NO_KONRAN			(SUB_SEQ_START_NO+205)
#define	SUB_SEQ_EQPITEM_NO_JOUTAIIJOU		(SUB_SEQ_START_NO+206)
#define	SUB_SEQ_EQPITEM_HP_KAIHUKU_KONRAN	(SUB_SEQ_START_NO+207)
#define	SUB_SEQ_EQPITEM_CONDUP				(SUB_SEQ_START_NO+208)
#define	SUB_SEQ_EQPITEM_CRITICALUP			(SUB_SEQ_START_NO+209)
#define	SUB_SEQ_EQPITEM_CONDUP_MAX			(SUB_SEQ_START_NO+210)
#define	SUB_SEQ_EQPITEM_ABIRITY_KAIHUKU		(SUB_SEQ_START_NO+211)
#define	SUB_SEQ_EQPITEM_NO_MEROMERO			(SUB_SEQ_START_NO+212)
#define	SUB_SEQ_EQPITEM_HP_KAIHUKUMAITURN	(SUB_SEQ_START_NO+213)
#define	SUB_SEQ_EQPITEM_HP_MAINASU			(SUB_SEQ_START_NO+214)
#define	SUB_SEQ_EQPITEM_DAMAGE				(SUB_SEQ_START_NO+215)
#define	SUB_SEQ_EQPITEM_KUTTUKI				(SUB_SEQ_START_NO+216)
#define	SUB_SEQ_EQPITEM_2TURNWO1TURN		(SUB_SEQ_START_NO+217)
#define	SUB_SEQ_SHUTOUT						(SUB_SEQ_START_NO+218)
#define	SUB_SEQ_TSUIBAMU					(SUB_SEQ_START_NO+219)
#define	SUB_SEQ_NAGETSUKERU					(SUB_SEQ_START_NO+220)
#define	SUB_SEQ_TOKUSEI_CONDITION_RECOVER	(SUB_SEQ_START_NO+221)
#define	SUB_SEQ_ITEM_ESCAPE					(SUB_SEQ_START_NO+222)
#define	SUB_SEQ_ITEM_BATTLE_ITEM			(SUB_SEQ_START_NO+223)
#define	SUB_SEQ_ITEM_HP_RECOVER				(SUB_SEQ_START_NO+224)
#define	SUB_SEQ_ITEM_PP_RECOVER				(SUB_SEQ_START_NO+225)
#define	SUB_SEQ_VOLT						(SUB_SEQ_START_NO+226)
#define	SUB_SEQ_ESA_THROW					(SUB_SEQ_START_NO+227)
#define	SUB_SEQ_DORO_THROW					(SUB_SEQ_START_NO+228)
#define	SUB_SEQ_YOUSUMI						(SUB_SEQ_START_NO+229)
#define	SUB_SEQ_ENEMY_ESCAPE				(SUB_SEQ_START_NO+230)
#define	SUB_SEQ_POKEMON_IREKAE				(SUB_SEQ_START_NO+231)
#define	SUB_SEQ_KIAIPUNCH_BEFORE			(SUB_SEQ_START_NO+232)
#define	SUB_SEQ_OIKAZE_END					(SUB_SEQ_START_NO+233)
#define	SUB_SEQ_AMAGOI_END					(SUB_SEQ_START_NO+234)
#define	SUB_SEQ_SUNAARASHI_END				(SUB_SEQ_START_NO+235)
#define	SUB_SEQ_NIHONBARE_END				(SUB_SEQ_START_NO+236)
#define	SUB_SEQ_ARARE_END					(SUB_SEQ_START_NO+237)
#define	SUB_SEQ_JUURYOKU_END				(SUB_SEQ_START_NO+238)
#define	SUB_SEQ_HEALBLOCK_RECOVER_NG		(SUB_SEQ_START_NO+239)
#define	SUB_SEQ_NOISY						(SUB_SEQ_START_NO+240)
#define	SUB_SEQ_SAWAGU_END					(SUB_SEQ_START_NO+241)
#define	SUB_SEQ_DENZIHUYUU_END				(SUB_SEQ_START_NO+242)
#define	SUB_SEQ_HEALBLOCK_END				(SUB_SEQ_START_NO+243)
#define	SUB_SEQ_SHUTOUT_END					(SUB_SEQ_START_NO+244)
#define	SUB_SEQ_IKARI_VOLTAGE_UP			(SUB_SEQ_START_NO+245)
#define	SUB_SEQ_HANEKAERI3					(SUB_SEQ_START_NO+246)
#define	SUB_SEQ_YAKEDO_HIRUMU				(SUB_SEQ_START_NO+247)
#define	SUB_SEQ_KOORI_HIRUMU				(SUB_SEQ_START_NO+248)
#define	SUB_SEQ_MAHI_HIRUMU					(SUB_SEQ_START_NO+249)
#define	SUB_SEQ_OMAZINAI_END				(SUB_SEQ_START_NO+250)
#define	SUB_SEQ_TRICKROOM_END				(SUB_SEQ_START_NO+251)
#define	SUB_SEQ_YUKIHURASI					(SUB_SEQ_START_NO+252)
#define	SUB_SEQ_OMITOOSHI					(SUB_SEQ_START_NO+253)
#define	SUB_SEQ_ORDER_IGNORE_SLEEP			(SUB_SEQ_START_NO+254)
#define	SUB_SEQ_NAMAKERU					(SUB_SEQ_START_NO+255)
#define	SUB_SEQ_ORDER_IGNORE				(SUB_SEQ_START_NO+256)
#define	SUB_SEQ_HIRUNE						(SUB_SEQ_START_NO+257)
#define	SUB_SEQ_OWN_ATTACK					(SUB_SEQ_START_NO+258)
#define	SUB_SEQ_TAME_AFTER					(SUB_SEQ_START_NO+259)
#define	SUB_SEQ_OSYABERI					(SUB_SEQ_START_NO+260)
#define	SUB_SEQ_MIKADUKINOMAI				(SUB_SEQ_START_NO+261)
#define	SUB_SEQ_TENKIYA						(SUB_SEQ_START_NO+262)
#define	SUB_SEQ_NIGHTMARE					(SUB_SEQ_START_NO+263)
#define	SUB_SEQ_SOUBI_BATSUGUN_DOWN_CHECK	(SUB_SEQ_START_NO+264)
#define	SUB_SEQ_EQPITEM_ONCE_HIT_UP			(SUB_SEQ_START_NO+265)
#define	SUB_SEQ_EQPITEM_HIT_DAMAGE			(SUB_SEQ_START_NO+266)
#define	SUB_SEQ_TRUSE_RECV_HP				(SUB_SEQ_START_NO+267)
#define	SUB_SEQ_TRUSE_RECV_CONDITION		(SUB_SEQ_START_NO+268)
#define	SUB_SEQ_TRUSE_ABIRITY_UP			(SUB_SEQ_START_NO+269)
#define	SUB_SEQ_TRUSE_EFFECT_GUARD			(SUB_SEQ_START_NO+270)
#define	SUB_SEQ_FIELD_AME					(SUB_SEQ_START_NO+271)
#define	SUB_SEQ_FIELD_ARARE					(SUB_SEQ_START_NO+272)
#define	SUB_SEQ_FIELD_SUNAARASHI			(SUB_SEQ_START_NO+273)
#define	SUB_SEQ_FIELD_HUKAIKIRI				(SUB_SEQ_START_NO+274)
#define	SUB_SEQ_SAFARI_BALL_THROW			(SUB_SEQ_START_NO+275)
#define	SUB_SEQ_GET_EXP						(SUB_SEQ_START_NO+276)
#define	SUB_SEQ_JIBAKU_KIZETSU				(SUB_SEQ_START_NO+277)
#define	SUB_SEQ_SENSEI_CHECK				(SUB_SEQ_START_NO+278)
#define	SUB_SEQ_AD_PUSH						(SUB_SEQ_START_NO+279)
#define	SUB_SEQ_AD_POP						(SUB_SEQ_START_NO+280)
#define	SUB_SEQ_NO_DEFENCE					(SUB_SEQ_START_NO+281)
#define	SUB_SEQ_GAMAN_NO_DEFENCE			(SUB_SEQ_START_NO+282)
#define	SUB_SEQ_SIO_WIN_LOSE				(SUB_SEQ_START_NO+283)
#define	SUB_SEQ_WIN_ESCAPE					(SUB_SEQ_START_NO+284)
#define	SUB_SEQ_PRESSURE					(SUB_SEQ_START_NO+285)
#define	SUB_SEQ_ENEMY_ESCAPE_NG				(SUB_SEQ_START_NO+286)
#define	SUB_SEQ_VANISH_OFF					(SUB_SEQ_START_NO+287)
#define	SUB_SEQ_CHOUHATSU_END				(SUB_SEQ_START_NO+288)
#define	SUB_SEQ_TRUSE_KAIHUKUNOKUSURI		(SUB_SEQ_START_NO+289)
#define	SUB_SEQ_TSUIBAMU_CHECK				(SUB_SEQ_START_NO+290)
#define	SUB_SEQ_WAZA_EFFECT_WAIT			(SUB_SEQ_START_NO+291)
#define	SUB_SEQ_EQPITEM_2TURNWO1TURN_ROCKET	(SUB_SEQ_START_NO+292)

//=========================================================================
//		waza_status_flag
//=========================================================================

#define	WAZA_STATUS_FLAG_NOHIT					(0x00000001)	//命中率計算ではずれ
#define	WAZA_STATUS_FLAG_BATSUGUN				(0x00000002)	//効果は抜群
#define	WAZA_STATUS_FLAG_IMAHITOTSU				(0x00000004)	//効果はいまひとつ
#define	WAZA_STATUS_FLAG_KOUKANAI				(0x00000008)	//効果がない
#define	WAZA_STATUS_FLAG_CRITICAL				(0x00000010)	//急所
#define	WAZA_STATUS_FLAG_ICHIGEKI				(0x00000020)	//一撃必殺
#define	WAZA_STATUS_FLAG_UMAKUKIMARAN			(0x00000040)	//うまくきまらん
#define	WAZA_STATUS_FLAG_KORAETA				(0x00000080)	//こらえる
#define	WAZA_STATUS_FLAG_ITEM_KORAETA			(0x00000100)	//装備アイテムでこらえる
#define	WAZA_STATUS_FLAG_PP_NONE				(0x00000200)	//PPがない
#define	WAZA_STATUS_FLAG_LOCK_ON				(0x00000400)	//ロックオン状態でヒット
#define	WAZA_STATUS_FLAG_JIMEN_NOHIT			(0x00000800)	//じめん技が当たらない
#define	WAZA_STATUS_FLAG_ICHIGEKI_NOHIT			(0x00001000)	//一撃必殺命中率計算結果で当たらない
#define	WAZA_STATUS_FLAG_NANIMOOKORAN			(0x00002000)	//なにもおこらない（はねる）
#define	WAZA_STATUS_FLAG_RENZOKU_NOHIT			(0x00004000)	//連続攻撃の途中で外れた
#define	WAZA_STATUS_FLAG_MAMORU_NOHIT			(0x00008000)	//まもられた
#define	WAZA_STATUS_FLAG_KIE_NOHIT				(0x00010000)	//場にいないので外れた
#define	WAZA_STATUS_FLAG_WAZA_KOYUU_NOHIT		(0x00020000)	//技ごとに固有なはずれメッセージを出す
#define	WAZA_STATUS_FLAG_BATSUGUN_NOHIT			(0x00040000)	//ばつぐん以外当たらない
#define	WAZA_STATUS_FLAG_GANZYOU_NOHIT			(0x00080000)	//がんじょうで当たらない
#define	WAZA_STATUS_FLAG_DENZIHUYUU_NOHIT		(0x00100000)	//でんじふゆうで当たらない

#define	WAZA_STATUS_FLAG_SIPPAI					(0x80000000)	//技の発動に失敗（技のシーケンス自体を終了する）

#define	WAZA_STATUS_FLAG_NOHIT_OFF		(WAZA_STATUS_FLAG_NOHIT^0xffffffff)
#define	WAZA_STATUS_FLAG_BATSUGUN_OFF	(WAZA_STATUS_FLAG_BATSUGUN^0xffffffff)
#define	WAZA_STATUS_FLAG_IMAHITOTSU_OFF	(WAZA_STATUS_FLAG_IMAHITOTSU^0xffffffff)

//技が当たらない系のフラグ
#define	WAZA_STATUS_FLAG_HAZURE			(WAZA_STATUS_FLAG_NOHIT|WAZA_STATUS_FLAG_KOUKANAI|\
										 WAZA_STATUS_FLAG_UMAKUKIMARAN|\
										 WAZA_STATUS_FLAG_JIMEN_NOHIT|\
										 WAZA_STATUS_FLAG_ICHIGEKI_NOHIT|\
										 WAZA_STATUS_FLAG_RENZOKU_NOHIT|\
										 WAZA_STATUS_FLAG_MAMORU_NOHIT|\
										 WAZA_STATUS_FLAG_KIE_NOHIT|\
										 WAZA_STATUS_FLAG_WAZA_KOYUU_NOHIT|\
										 WAZA_STATUS_FLAG_BATSUGUN_NOHIT|\
										 WAZA_STATUS_FLAG_GANZYOU_NOHIT|\
										 WAZA_STATUS_FLAG_DENZIHUYUU_NOHIT)

#define	WAZA_STATUS_FLAG_NO_OUT			(WAZA_STATUS_FLAG_HAZURE|\
										 WAZA_STATUS_FLAG_PP_NONE|\
										 WAZA_STATUS_FLAG_SIPPAI)

//タイプによる、ばつぐんといまひとつの相殺
#define	WAZA_STATUS_FLAG_SOUSAI			(WAZA_STATUS_FLAG_BATSUGUN|\
										 WAZA_STATUS_FLAG_IMAHITOTSU)

//ペナルティを課さないNOHIT系フラグ
//#define	WAZA_STATUS_FLAG_NOHIT_PENALTY	(WAZA_STATUS_FLAG_NOHIT|\
//										 WAZA_STATUS_FLAG_KIE_NOHIT|\
//										 WAZA_STATUS_FLAG_MAMORU_NOHIT)^0xffffffff

//ペナルティを課すNOHIT系フラグ
#define	WAZA_STATUS_FLAG_NOHIT_PENALTY	(WAZA_STATUS_FLAG_NOHIT|\
										 WAZA_STATUS_FLAG_KIE_NOHIT|\
										 WAZA_STATUS_FLAG_MAMORU_NOHIT)

//うまくきまらんに変化させるNOHIT系フラグ
#define	WAZA_STATUS_FLAG_NOHIT_CHG		(WAZA_STATUS_FLAG_NOHIT|WAZA_STATUS_FLAG_KIE_NOHIT)

//かわらわりの追加効果を発動させるNOHIT系フラグ
#define	WAZA_STATUS_FLAG_KAWARAWARI		(WAZA_STATUS_FLAG_KOUKANAI|WAZA_STATUS_FLAG_BATSUGUN_NOHIT)

//POKEMON_BLINK_SET用の定義

#define	WAZA_HIT_NORMAL			(0)
#define	WAZA_HIT_IMAHITOTSU		(1)
#define	WAZA_HIT_BATSUGUN		(2)

//=========================================================================
//		field_condition
//=========================================================================

#define	FIELD_CONDITION_AME				(0x00000001)	//雨状態
#define	FIELD_CONDITION_AMEHURASHI		(0x00000002)	//雨状態（特性orフィールド天候）
#define	FIELD_CONDITION_AME_ALL			(0x00000003)	//雨状態（すべて）
#define	FIELD_CONDITION_SUNAARASHI		(0x00000004)	//砂嵐状態
#define	FIELD_CONDITION_SUNAOKOSHI		(0x00000008)	//砂嵐状態(特性orフィールド天候）
#define	FIELD_CONDITION_SUNAARASHI_ALL	(0x0000000c)	//砂嵐状態(すべて）
#define	FIELD_CONDITION_HARE			(0x00000010)	//晴れ状態
#define	FIELD_CONDITION_HIDERI			(0x00000020)	//晴れ状態(特性orフィールド天候）
#define	FIELD_CONDITION_HARE_ALL		(0x00000030)	//晴れ状態(すべて）
#define	FIELD_CONDITION_ARARE			(0x00000040)	//あられ状態
#define	FIELD_CONDITION_YUKIHURASHI		(0x00000080)	//あられ状態(特性orフィールド天候）
#define	FIELD_CONDITION_ARARE_ALL		(0x000000c0)	//あられ状態(すべて）

#define	FIELD_CONDITION_SAWAGU			(0x00000f00)	//さわがしい状態（ClientNoで立てる）
#define	FIELD_CONDITION_JUURYOKU		(0x00007000)	//じゅうりょく
#define	FIELD_CONDITION_HUKAIKIRI		(0x00008000)	//ふかいきり
#define	FIELD_CONDITION_TRICKROOM		(0x00070000)	//トリックルーム

#define	FIELD_CONDITION_AME_OFF			(0x00000001^0xffffffff)
#define	FIELD_CONDITION_AMEHURASHI_OFF	(0x00000002^0xffffffff)
#define	FIELD_CONDITION_SUNAARASHI_OFF	(0x00000004^0xffffffff)
#define	FIELD_CONDITION_SUNAOKOSHI_OFF	(0x00000008^0xffffffff)
#define	FIELD_CONDITION_HARE_OFF		(0x00000010^0xffffffff)
#define	FIELD_CONDITION_HIDERI_OFF		(0x00000020^0xffffffff)
#define	FIELD_CONDITION_ARARE_OFF		(0x00000040^0xffffffff)
#define	FIELD_CONDITION_SAWAGU_OFF		(0x00000f00^0xffffffff)
#define	FIELD_CONDITION_JUURYOKU_OFF	(0x00007000^0xffffffff)	//じゅうりょく
#define	FIELD_CONDITION_HUKAIKIRI_OFF	(0x00008000^0xffffffff)	//ふかいきり
#define	FIELD_CONDITION_TRICKROOM_OFF	(0x00070000^0xffffffff)	//トリックルーム

#define	FIELD_CONDITION_TENKI_CHG		(FIELD_CONDITION_AME_ALL|FIELD_CONDITION_HARE_ALL|FIELD_CONDITION_ARARE_ALL)
#define	FIELD_CONDITION_TENKI			(FIELD_CONDITION_AME_ALL|FIELD_CONDITION_SUNAARASHI_ALL|FIELD_CONDITION_HARE_ALL|FIELD_CONDITION_ARARE_ALL|FIELD_CONDITION_HUKAIKIRI)
#define	FIELD_CONDITION_TENKI_OFF		(FIELD_CONDITION_AME_ALL|FIELD_CONDITION_SUNAARASHI_ALL|FIELD_CONDITION_HARE_ALL|FIELD_CONDITION_ARARE_ALL|FIELD_CONDITION_HUKAIKIRI)^0xffffffff

//ソーラービームの威力を半減する天候
#define	FIELD_CONDITION_NO_SOLAR		(FIELD_CONDITION_AME_ALL|FIELD_CONDITION_SUNAARASHI_ALL|\
										 FIELD_CONDITION_ARARE_ALL|FIELD_CONDITION_HUKAIKIRI)

#define	AMAGOI_COUNT			(5)
#define	SUNAARASHI_COUNT		(5)
#define	NIHONBARE_COUNT			(5)
#define	ARARE_COUNT				(5)
#define	JUURYOKU_COUNT			(5)
#define	DENZIHUYUU_COUNT		(5)
#define	HEALBLOCK_COUNT			(5)
#define	TRICKROOM_COUNT			(5)
#define	SHUTOUT_COUNT			(5)

#define	FIELD_SAWAGU_SHIFT		(8)
#define	FIELD_JUURYOKU_SHIFT	(12)
#define	FIELD_TRICKROOM_SHIFT	(16)

//=========================================================================
//		side_condition
//=========================================================================

#define	SIDE_CONDITION_BUTSURIGUARD		(0x00000001)	//物理攻撃ダメージ半減
#define	SIDE_CONDITION_TOKUSYUGUARD		(0x00000002)	//特殊攻撃ダメージ半減
#define	SIDE_CONDITION_MAKIBISHI		(0x00000004)	//まきびし（トレーナーAIで使用）
#define	SIDE_CONDITION_SHINPI			(0x00000008)	//しんぴのまもり
#define	SIDE_CONDITION_MIRAIYOCHI		(0x00000010)	//みらいよち（トレーナーAIで使用）
#define	SIDE_CONDITION_NEGAIGOTO		(0x00000020)	//ねがいごと
#define	SIDE_CONDITION_SHIROIKIRI		(0x00000040)	//しろいきり
#define	SIDE_CONDITION_STEALTHROCK		(0x00000080)	//ステルスロック
#define	SIDE_CONDITION_OIKAZE			(0x00000300)	//おいかぜ
#define	SIDE_CONDITION_DOKUBISHI		(0x00000400)	//どくびし（トレーナーAIで使用）
//#define	あいてます					(0x00000800)	//空き
#define	SIDE_CONDITION_OMAZINAI			(0x00007000)	//おまじない

#define	SIDE_CONDITION_BUTSURIGUARD_OFF		(0x00000001^0xffffffff)
#define	SIDE_CONDITION_TOKUSYUGUARD_OFF		(0x00000002^0xffffffff)
#define	SIDE_CONDITION_MAKIBISHI_OFF		(0x00000004^0xffffffff)
#define	SIDE_CONDITION_SHINPI_OFF			(0x00000008^0xffffffff)
#define	SIDE_CONDITION_MIRAIYOCHI_OFF		(0x00000010^0xffffffff)
#define	SIDE_CONDITION_NEGAIGOTO_OFF		(0x00000020^0xffffffff)
#define	SIDE_CONDITION_SHIROIKIRI_OFF		(0x00000040^0xffffffff)
#define	SIDE_CONDITION_STEALTHROCK_OFF		(0x00000080^0xffffffff)
#define	SIDE_CONDITION_DOKUBISHI_OFF		(0x00000400^0xffffffff)

#define	OIKAZE_SHIFT	(8)
#define	OMAZINAI_SHIFT	(12)

//=========================================================================
//	waza_kouka（AIのIF_WAZAKOUKAでも使用する）
//=========================================================================

#define	WAZAKOUKA_YADORIGI		0x00000003		//ヤドリギ出したClientNoを格納
#define	WAZAKOUKA_YADORARE		0x00000004		//ヤドリギ
#define	WAZAKOUKA_LOCKON		0x00000018		//ロックオンされている
#define	WAZAKOUKA_HOROBINOUTA	0x00000020		//ほろびのうた
#define	WAZAKOUKA_SORAWOTOBU	0x00000040		//そらをとぶ
#define	WAZAKOUKA_ANAWOHORU		0x00000080		//あなをほる
#define	WAZAKOUKA_CHIISAKUNARU	0x00000100		//ちいさくなる
#define	WAZAKOUKA_JUUDEN		0x00000200		//じゅうでん
#define	WAZAKOUKA_NEWOHARU		0x00000400		//ねをはる
#define	WAZAKOUKA_AKUBI			0x00001800		//あくび
#define	WAZAKOUKA_HUUIN			0x00002000		//ふういん
#define	WAZAKOUKA_ONNEN			0x00004000		//おんねん
#define	WAZAKOUKA_NOCRITICAL	0x00008000		//クリティカルヒットしない
#define	WAZAKOUKA_DOROASOBI		0x00010000		//どろあそび
#define	WAZAKOUKA_MIZUASOBI		0x00020000		//みずあそび
#define	WAZAKOUKA_DAIBINGU		0x00040000		//ダイビング
#define	WAZAKOUKA_IKAKU			0x00080000		//いかく
#define	WAZAKOUKA_TRACE			0x00100000		//トレース
#define	WAZAKOUKA_IEKI			0x00200000		//いえき
#define	WAZAKOUKA_MIRACLE_EYE	0x00400000		//ミラクルアイ
#define	WAZAKOUKA_POWER_TRICK	0x00800000		//パワートリック
#define	WAZAKOUKA_AQUARING		0x01000000		//アクアリング
#define	WAZAKOUKA_HEALBLOCK		0x02000000		//かいふくふうじ
#define	WAZAKOUKA_SHUTOUT		0x04000000		//シャットアウト
#define	WAZAKOUKA_DENZIHUYUU	0x08000000		//でんじふゆう
#define	WAZAKOUKA_HOGOSYOKU		0x10000000		//ほごしょく中（技AIのために必要）
#define	WAZAKOUKA_SHADOW_DIVE	0x20000000		//シャドウダイブ中
#define	WAZAKOUKA_HUUIN_DID		0x40000000		//ふういんをためした（技AIのために必要）

#define	LOCKON_COUNT			0x00000008
#define	AKUBI_COUNT				0x00000800
#define BATTLE_VRAM_TRANFER_TASK_NUM	(64)
#define	WAZAKOUKA_YADORIGI_OFF		(0x00000003^0xffffffff)	//ヤドリギ出したClientNoを格納
#define	WAZAKOUKA_YADORARE_OFF		(0x00000004^0xffffffff)	//ヤドリギ
#define	WAZAKOUKA_LOCKON_OFF		(0x00000018^0xffffffff)	//ロックオンされている
#define	WAZAKOUKA_HOROBINOUTA_OFF	(0x00000020^0xffffffff)	//ほろびのうた

#define	WAZAKOUKA_SORAWOTOBU_OFF	(0x00000040^0xffffffff)	//そらをとぶ
#define	WAZAKOUKA_ANAWOHORU_OFF		(0x00000080^0xffffffff)	//あなをほる
#define	WAZAKOUKA_CHIISAKUNARU_OFF	(0x00000100^0xffffffff)	//ちいさくなる
#define	WAZAKOUKA_JUUDEN_OFF		(0x00000200^0xffffffff)	//じゅうでん
#define	WAZAKOUKA_NEWOHARU_OFF		(0x00000400^0xffffffff)	//ねをはる
#define	WAZAKOUKA_AKUBI_OFF			(0x00001800^0xffffffff)	//あくび
#define	WAZAKOUKA_HUUIN_OFF			(0x00002000^0xffffffff)	//ふういん
#define	WAZAKOUKA_ONNEN_OFF			(0x00004000^0xffffffff)	//おんねん
#define	WAZAKOUKA_NOCRITICAL_OFF	(0x00008000^0xffffffff)	//クリティカルヒットしない
#define	WAZAKOUKA_DAIBINGU_OFF		(0x00040000^0xffffffff)	//ダイビング
#define	WAZAKOUKA_IKAKU_OFF			(0x00080000^0xffffffff)	//いかく
#define	WAZAKOUKA_TRACE_OFF			(0x00100000^0xffffffff)	//トレース
#define	WAZAKOUKA_IEKI_OFF			(0x00200000^0xffffffff)	//いえき
#define	WAZAKOUKA_MIRACLE_EYE_OFF	(0x00400000^0xffffffff)	//ミラクルアイ
#define	WAZAKOUKA_POWER_TRICK_OFF	(0x00800000^0xffffffff)	//パワートリック
#define	WAZAKOUKA_AQUARING_OFF		(0x01000000^0xffffffff)	//アクアリング
#define	WAZAKOUKA_HEALBLOCK_OFF		(0x02000000^0xffffffff)	//かいふくふうじ
#define	WAZAKOUKA_SHUTOUT_OFF		(0x04000000^0xffffffff)	//シャットアウト
#define	WAZAKOUKA_DENZIHUYUU_OFF	(0x08000000^0xffffffff)	//でんじふゆう
#define	WAZAKOUKA_HOGOSYOKU_OFF		(0x10000000^0xffffffff)	//ほごしょく中（技AIのために必要）
#define	WAZAKOUKA_SHADOW_DIVE_OFF	(0x20000000^0xffffffff)	//シャドウダイブ中
#define	WAZAKOUKA_HUUIN_DID_OFF		(0x40000000^0xffffffff)	//ふういんをためした（技AIのために必要）

//バトンタッチで引き継ぐものをOR
#define	WAZAKOUKA_BATON_TOUCH_ON	(WAZAKOUKA_YADORIGI|WAZAKOUKA_YADORARE|WAZAKOUKA_LOCKON|\
									 WAZAKOUKA_HOROBINOUTA|WAZAKOUKA_NEWOHARU|WAZAKOUKA_DOROASOBI|\
									 WAZAKOUKA_MIZUASOBI|WAZAKOUKA_NOCRITICAL|WAZAKOUKA_POWER_TRICK|\
									 WAZAKOUKA_AQUARING|WAZAKOUKA_IEKI|WAZAKOUKA_SHUTOUT|WAZAKOUKA_HEALBLOCK|\
									 WAZAKOUKA_DENZIHUYUU)

#define	WAZAKOUKA_KIE		(WAZAKOUKA_SORAWOTOBU|WAZAKOUKA_ANAWOHORU|WAZAKOUKA_DAIBINGU|WAZAKOUKA_SHADOW_DIVE)
#define	WAZAKOUKA_KIE_OFF	(WAZAKOUKA_SORAWOTOBU_OFF&WAZAKOUKA_ANAWOHORU_OFF&WAZAKOUKA_DAIBINGU_OFF&WAZAKOUKA_SHADOW_DIVE_OFF)

//=========================================================================
//		server_status_flag
//=========================================================================

#define	SERVER_STATUS_FLAG_NO_ATTACK_MSG		(0x00000001)			//アタックメッセージを表示しない
#define	SERVER_STATUS_FLAG_NO_DOUBLE_CHECK		(0x00000002)			//2体に当たるチェックをしない（ため技系の1ターン目など）
#define	SERVER_STATUS_FLAG_SORAWOTOBU_HIT		(0x00000004)			//「そらをとぶ」に当てる
#define	SERVER_STATUS_FLAG_ANAWOHORU_HIT		(0x00000008)			//「あなをほる」に当てる
#define	SERVER_STATUS_FLAG_DAIBINGU_HIT			(0x00000010)			//「ダイビング」に当てる
#define	SERVER_STATUS_FLAG_TAME					(0x00000020)			//ため状態にした
#define	SERVER_STATUS_FLAG_NO_BLINK				(0x00000040)			//ダメージエフェクトの点滅をしない
#define	SERVER_STATUS_FLAG_SINKURO_TSUIKA		(0x00000080)			//シンクロする追加効果があったことを示すフラグ
#define	SERVER_STATUS_FLAG_BATON_TOUCH			(0x00000100)			//バトンタッチした
#define	SERVER_STATUS_FLAG_TAME_AFTER			(0x00000200)			//ため状態後の開放状態
#define	SERVER_STATUS_FLAG_OTHER_HIT_CALC		(0x00000400)			//ServerHitCheck以外の命中率計算をした
#define	SERVER_STATUS_FLAG_TYPE_FLAT			(0x00000800)			//タイプ補正計算を無視する
#define	SERVER_STATUS_FLAG_NOHIT_PENALTY		(0x00001000)			//技が外れた時にペナルティを課す
#define	SERVER_STATUS_FLAG_WAZA_HIT				(0x00002000)			//技があたったことを示すフラグ
#define	SERVER_STATUS_FLAG_NO_WAZA_EFFECT		(0x00004000)			//技エフェクトを表示しない
#define	SERVER_STATUS_FLAG_TYPE_NONE			(0x00008000)			//タイプを無属性にする
#define	SERVER_STATUS_FLAG_NO_LOOP_HIT_MSG		(0x00010000)			//連続攻撃のHit回数メッセージを表示しない
#define	SERVER_STATUS_FLAG_COND_CHG_NG			(0x00020000)			//abiritycntを上げ下げ出来なかった
#define	SERVER_STATUS_FLAG_MORE_NOHIT_MSG		(0x00040000)			//技がはずれたメッセージに追加あり
// ----------------------------------------------------------------------------
// localize_spec_mark(LANG_ALL) imatake 2007/04/21
// シャドーダイブの挙動が「あなをほる」等と一致するように修正
#if AFTER_MASTER_070409_49_EUR_FIX
#define	SERVER_STATUS_FLAG_SHADOW_DIVE_HIT		(0x00080000)	//「シャドウダイブ」に当てる
#else AFTER_MASTER_070409_49_EUR_FIX
#define	SERVER_STATUS_FLAG_ESCAPE				(0x00080000)			//逃げるを選択
#endif //AFTER_MASTER_070409_49_EUR_FIX
// ----------------------------------------------------------------------------
#define	SERVER_STATUS_FLAG_NO_WAZANO_SET		(0x00100000)			//AttackClientが変化したので、技ナンバーの格納をしない
																		//（マジックコート、よこどりが発動したなど）
#define	SERVER_STATUS_FLAG_NO_DIRECT_MSG		(0x00200000)			//直接追加系のアサートメッセージを非表示
#define	SERVER_STATUS_FLAG_TSUIKA				(0x00400000)			//追加効果発動（ヒートアタック用）
#define	SERVER_STATUS_FLAG_KATAYABURI			(0x00800000)			//かたやぶり発動

#define	SERVER_STATUS_FLAG_KIZETSU				(0x0f000000)			//ポケモンが気絶した
#define	SERVER_STATUS_FLAG_KIZETSU_SHIFT		(24)					//気絶したしたフラグのシフト回数

#define	SERVER_STATUS_FLAG_JIBAKU				(0x10000000)			//自爆した
#define	SERVER_STATUS_FLAG_JIBAKU_MASK			(0xf0000000)			//自爆したClientNoをBitで格納
#define	SERVER_STATUS_FLAG_JIBAKU_MASK_OFF		(0xf0000000^0xffffffff)	//
#define	SERVER_STATUS_FLAG_JIBAKU_SHIFT			(28)					//自爆したフラグのシフト回数

#define	SERVER_STATUS_FLAG_NO_ATTACK_MSG_OFF	(0x00000001^0xffffffff)	//アタックメッセージを表示しない
#define	SERVER_STATUS_FLAG_NO_DOUBLE_CHECK_OFF	(0x00000002^0xffffffff)	//2体に当たるチェックをしない（ため技系の1ターン目など）
#define	SERVER_STATUS_FLAG_SINKURO_TSUIKA_OFF	(0x00000080^0xffffffff)	//シンクロする追加効果があったことを示すフラグ
#define	SERVER_STATUS_FLAG_TYPE_FLAT_OFF		(0x00000800^0xffffffff)	//タイプ補正計算を無視する
#define	SERVER_STATUS_FLAG_NO_WAZA_EFFECT_OFF	(0x00004000^0xffffffff)	//技エフェクトを表示しない
#define	SERVER_STATUS_FLAG_COND_CHG_NG_OFF		(0x00020000^0xffffffff)	//abiritycntを上げ下げ出来なかった
#define	SERVER_STATUS_FLAG_ESCAPE_OFF			(0x00080000^0xffffffff)	//逃げるを選択
#define	SERVER_STATUS_FLAG_TSUIKA_OFF			(0x00400000^0xffffffff)	//追加効果発動（ヒートアタック用）
#define	SERVER_STATUS_FLAG_KATAYABURI_OFF		(0x00800000^0xffffffff)	//かたやぶり発動

//ため系の技の、ためターン時に立てるフラグをOR
#define	SERVER_STATUS_FLAG_TAME_BEFORE	(SERVER_STATUS_FLAG_NO_ATTACK_MSG|\
										 SERVER_STATUS_FLAG_NO_DOUBLE_CHECK|\
										 SERVER_STATUS_FLAG_TAME)

// ----------------------------------------------------------------------------
// localize_spec_mark(LANG_ALL) imatake 2007/04/21
// シャドーダイブの挙動が「あなをほる」等と一致するように修正
#if AFTER_MASTER_070409_49_EUR_FIX
//消えている相手でも当てるフラグをOR
#define	SERVER_STATUS_FLAG_KIE_HIT		(SERVER_STATUS_FLAG_SORAWOTOBU_HIT|\
										 SERVER_STATUS_FLAG_ANAWOHORU_HIT|\
										 SERVER_STATUS_FLAG_SHADOW_DIVE_HIT|\
										 SERVER_STATUS_FLAG_DAIBINGU_HIT)
#else //AFTER_MASTER_070409_49_EUR_FIX
//消えている相手でも当てるフラグをOR
#define	SERVER_STATUS_FLAG_KIE_HIT		(SERVER_STATUS_FLAG_SORAWOTOBU_HIT|\
										 SERVER_STATUS_FLAG_ANAWOHORU_HIT|\
										 SERVER_STATUS_FLAG_DAIBINGU_HIT)
#endif //AFTER_MASTER_070409_49_EUR_FIX
// ----------------------------------------------------------------------------

//自分のターンのみフラグが有効なものをOR
//ばかくさいけど、1行の長さをオーバーしてるので、2分割した
// ----------------------------------------------------------------------------
// localize_spec_mark(LANG_ALL) imatake 2007/04/21
// シャドーダイブの挙動が「あなをほる」等と一致するように修正
#if AFTER_MASTER_070409_49_EUR_FIX
#define	SERVER_STATUS_FLAG_ATTACK_TURN_1	(SERVER_STATUS_FLAG_NO_ATTACK_MSG|SERVER_STATUS_FLAG_NO_DOUBLE_CHECK|\
											 SERVER_STATUS_FLAG_SORAWOTOBU_HIT|SERVER_STATUS_FLAG_ANAWOHORU_HIT|\
											 SERVER_STATUS_FLAG_DAIBINGU_HIT|SERVER_STATUS_FLAG_TAME|\
											 SERVER_STATUS_FLAG_BATON_TOUCH|SERVER_STATUS_FLAG_TAME_AFTER|\
											 SERVER_STATUS_FLAG_OTHER_HIT_CALC|SERVER_STATUS_FLAG_TYPE_FLAT|\
											 SERVER_STATUS_FLAG_SHADOW_DIVE_HIT|SERVER_STATUS_FLAG_WAZA_HIT)
#else //AFTER_MASTER_070409_49_EUR_FIX
#define	SERVER_STATUS_FLAG_ATTACK_TURN_1	(SERVER_STATUS_FLAG_NO_ATTACK_MSG|SERVER_STATUS_FLAG_NO_DOUBLE_CHECK|\
											 SERVER_STATUS_FLAG_SORAWOTOBU_HIT|SERVER_STATUS_FLAG_ANAWOHORU_HIT|\
											 SERVER_STATUS_FLAG_DAIBINGU_HIT|SERVER_STATUS_FLAG_TAME|\
											 SERVER_STATUS_FLAG_BATON_TOUCH|SERVER_STATUS_FLAG_TAME_AFTER|\
											 SERVER_STATUS_FLAG_OTHER_HIT_CALC|SERVER_STATUS_FLAG_TYPE_FLAT|\
											 SERVER_STATUS_FLAG_WAZA_HIT)
#endif //AFTER_MASTER_070409_49_EUR_FIX
// ----------------------------------------------------------------------------

// ----------------------------------------------------------------------------
// localize_spec_mark(JP_VER10) imatake 2006/12/01
#if B1376_060818_FIX
#define	SERVER_STATUS_FLAG_ATTACK_TURN_2	(SERVER_STATUS_FLAG_NOHIT_PENALTY|SERVER_STATUS_FLAG_NO_WAZA_EFFECT|\
											 SERVER_STATUS_FLAG_TYPE_NONE|SERVER_STATUS_FLAG_NO_LOOP_HIT_MSG|\
											 SERVER_STATUS_FLAG_COND_CHG_NG|SERVER_STATUS_FLAG_MORE_NOHIT_MSG|\
											 SERVER_STATUS_FLAG_NO_WAZANO_SET|SERVER_STATUS_FLAG_NO_DIRECT_MSG|\
											 SERVER_STATUS_FLAG_TSUIKA|SERVER_STATUS_FLAG_SINKURO_TSUIKA|\
											 SERVER_STATUS_FLAG_NO_BLINK)
#else //B1376_060818_FIX
#define	SERVER_STATUS_FLAG_ATTACK_TURN_2	(SERVER_STATUS_FLAG_NOHIT_PENALTY|SERVER_STATUS_FLAG_NO_WAZA_EFFECT|\
											 SERVER_STATUS_FLAG_TYPE_NONE|SERVER_STATUS_FLAG_NO_LOOP_HIT_MSG|\
											 SERVER_STATUS_FLAG_COND_CHG_NG|SERVER_STATUS_FLAG_MORE_NOHIT_MSG|\
											 SERVER_STATUS_FLAG_NO_WAZANO_SET|SERVER_STATUS_FLAG_NO_DIRECT_MSG|\
											 SERVER_STATUS_FLAG_TSUIKA|SERVER_STATUS_FLAG_SINKURO_TSUIKA)
#endif //B1376_060818_FIX
// ----------------------------------------------------------------------------

#define	SERVER_STATUS_FLAG_ATTACK_TURN		(SERVER_STATUS_FLAG_ATTACK_TURN_1|SERVER_STATUS_FLAG_ATTACK_TURN_2)^0xffffffff

//=========================================================================
//		server_status_flag2
//=========================================================================

#define	SERVER_STATUS_FLAG2_NO_EXP_KIZETSU		(0x00000001)	//経験値の入らない気絶処理
#define	SERVER_STATUS_FLAG2_ABICNT_EFF_FLAG		(0x00000002)	//ステータス上昇下降エフェクト発動
#define	SERVER_STATUS_FLAG2_ATTACK_MSG			(0x00000004)	//アタックメッセージを表示した
#define	SERVER_STATUS_FLAG2_MAGIC_CORT_A_D		(0x00000008)	//マジックコートでAttackとDefenceを入れ替えた
#define	SERVER_STATUS_FLAG2_TONBOGAERI			(0x00000010)	//とんぼがえりでの入れ替えがあった
#define	SERVER_STATUS_FLAG2_FIRST_DAMAGE_MSG	(0x00000020)	//最初のダメージメッセージ表示
#define	SERVER_STATUS_FLAG2_WAZA_OUT			(0x00000040)	//あたりはずれは問わず技が出せた
#define	SERVER_STATUS_FLAG2_ABICNT_EFF_CHECK	(0x00000080)	//ステータス上昇下降エフェクト発動チェックフラグ
#define	SERVER_STATUS_FLAG2_KAIFUKU_EFFECT		(0x00000100)	//回復エフェクトありにする（SUB_SEQ_KAIFUKU用）

#define	SERVER_STATUS_FLAG2_GET_EXP			(0xf0000000)	//経験値取得のためのClientNoをBitで格納
#define	SERVER_STATUS_FLAG2_GET_EXP_SHIFT	(28)			//フラグのシフト回数

#define	SERVER_STATUS_FLAG2_SIO_WAIT		(0x0f000000)	//通信待ちメッセージのためのClientNoをBitで格納
#define	SERVER_STATUS_FLAG2_SIO_WAIT_SHIFT	(24)			//フラグのシフト回数

#define	SERVER_STATUS_FLAG2_ABICNT_EFF_FLAG_OFF	(0x00000002^0xffffffff)	//ステータス上昇下降エフェクト発動
#define	SERVER_STATUS_FLAG2_MAGIC_CORT_A_D_OFF	(0x00000008^0xffffffff)	//マジックコートでAttackとDefenceを入れ替えた
#define	SERVER_STATUS_FLAG2_SIO_WAIT_OFF		(0x0f000000^0xffffffff)	//通信待ちメッセージのためのClientNoをBitで格納

#define	SERVER_STATUS_FLAG2_ATTACK_TURN		(SERVER_STATUS_FLAG2_ABICNT_EFF_FLAG|SERVER_STATUS_FLAG2_ATTACK_MSG|\
											 SERVER_STATUS_FLAG2_MAGIC_CORT_A_D|SERVER_STATUS_FLAG2_TONBOGAERI|\
											 SERVER_STATUS_FLAG2_WAZA_OUT|SERVER_STATUS_FLAG2_KAIFUKU_EFFECT)^0xffffffff

//=========================================================================
//		ostf->status_flag
//=========================================================================

#define	OSTF_STATUS_FLAG_EQPITEM_POWDOWN	(0x00000001)	//装備効果によって技の威力を弱めたフラグ
#define	OSTF_STATUS_FLAG_TSUIBAMU			(0x00000002)	//ついばむ発動
#define	OSTF_STATUS_FLAG_MEROMERO			(0x00000004)	//メロメロになった
#define	OSTF_STATUS_FLAG_MIGAWARI_HIT		(0x00000008)	//みがわりで防いだ

//=======================================================================
//		わるあがきチェック用フラグ
//=======================================================================

#define	SSWC_WAZA_NONE		0x00000001	//技が無い（技ナンバー０）
#define	SSWC_PP_NONE		0x00000002	//PPが無い
#define	SSWC_KANASHIBARI	0x00000004	//かなしばりされている
#define	SSWC_ICHAMON		0x00000008	//いちゃもんをつけられている
#define	SSWC_CHOUHATSU		0x00000010	//ちょうはつされている
#define	SSWC_HUUIN			0x00000020	//ふういんされている
#define	SSWC_JUURYOKU		0x00000040	//じゅうりょくを受けている
#define	SSWC_HEALBLOCK		0x00000080	//ヒールブロックを受けている
#define	SSWC_ENCORE			0x00000100	//アンコールを受けている
#define	SSWC_KODAWARI		0x00000200	//こだわりハチマキ
#define	SSWC_ALL			0xffffffff	//すべてチェック

//=======================================================================
//		気絶チェック用フラグ
//=======================================================================
#define	SKC_MICHIDURE_ON	(0)		//みちづれチェックあり
#define	SKC_MICHIDURE_OFF	(1)		//みちづれチェックなし

//=========================================================================
//	ST_PokemonServerParamGetで使用するID定義（技シーケンスでも使用）
//=========================================================================

#define	ID_PSP_monsno						(0)
#define	ID_PSP_pow							(1)
#define	ID_PSP_def							(2)
#define	ID_PSP_agi							(3)
#define	ID_PSP_spepow						(4)
#define	ID_PSP_spedef						(5)
#define	ID_PSP_waza1						(6)
#define	ID_PSP_waza2						(7)
#define	ID_PSP_waza3						(8)
#define	ID_PSP_waza4						(9)
#define	ID_PSP_hp_rnd						(10)
#define	ID_PSP_pow_rnd						(11)
#define	ID_PSP_def_rnd						(12)
#define	ID_PSP_agi_rnd						(13)
#define	ID_PSP_spepow_rnd					(14)
#define	ID_PSP_spedef_rnd					(15)
#define	ID_PSP_tamago_flag					(16)				//0x10
#define	ID_PSP_nickname_flag				(17)
#define	ID_PSP_abiritycnt_hp				(18)
#define	ID_PSP_abiritycnt_pow				(19)
#define	ID_PSP_abiritycnt_def				(20)
#define	ID_PSP_abiritycnt_agi				(21)
#define	ID_PSP_abiritycnt_spepow			(22)
#define	ID_PSP_abiritycnt_spedef			(23)
#define	ID_PSP_abiritycnt_hit				(24)
#define	ID_PSP_abiritycnt_avoid				(25)
#define	ID_PSP_speabino						(26)
#define	ID_PSP_type1						(27)
#define	ID_PSP_type2						(28)
#define	ID_PSP_sex							(29)
#define	ID_PSP_rare							(30)
#define	ID_PSP_pp1							(31)
#define	ID_PSP_pp2							(32)				//0x20
#define	ID_PSP_pp3							(33)
#define	ID_PSP_pp4							(34)
#define	ID_PSP_pp_count1					(35)
#define	ID_PSP_pp_count2					(36)
#define	ID_PSP_pp_count3					(37)
#define	ID_PSP_pp_count4					(38)
#define	ID_PSP_pp_max1						(39)
#define	ID_PSP_pp_max2						(40)
#define	ID_PSP_pp_max3						(41)
#define	ID_PSP_pp_max4						(42)
#define	ID_PSP_level						(43)
#define	ID_PSP_friend						(44)
#define	ID_PSP_nickname						(45)
#define	ID_PSP_nickname_buf					(46)
#define	ID_PSP_hp							(47)
#define	ID_PSP_hpmax						(48)
#define	ID_PSP_oyaname						(49)
#define	ID_PSP_exp							(50)
#define	ID_PSP_personal_rnd					(51)
#define	ID_PSP_condition					(52)
#define	ID_PSP_condition2					(53)				//0x30
#define	ID_PSP_id_no						(54)
#define	ID_PSP_item							(55)
#define	ID_PSP_hit_count					(56)
#define	ID_PSP_message_flag					(57)
#define	ID_PSP_oyasex						(58)
#define	ID_PSP_waza_kouka					(59)
#define	ID_PSP_waza_kouka_temp				(60)
#define	ID_PSP_wkw_kanashibari_count		(61)
#define	ID_PSP_wkw_encore_count				(62)
#define	ID_PSP_wkw_juuden_count				(63)
#define	ID_PSP_wkw_chouhatsu_count			(64)
#define	ID_PSP_wkw_success_count			(65)
#define	ID_PSP_wkw_horobinouta_count		(66)
#define	ID_PSP_wkw_korogaru_count			(67)
#define	ID_PSP_wkw_renzokugiri_count		(68)
#define	ID_PSP_wkw_takuwaeru_count			(69)
#define	ID_PSP_wkw_takuwaeru_def_count		(70)
#define	ID_PSP_wkw_takuwaeru_spedef_count	(71)				//0x40
#define	ID_PSP_wkw_namake_bit				(72)
#define	ID_PSP_wkw_moraibi_flag				(73)
#define	ID_PSP_wkw_lockon_client_no			(74)
#define	ID_PSP_wkw_monomane_bit				(75)
#define	ID_PSP_wkw_shime_client_no			(76)
#define	ID_PSP_wkw_manazashi_client_no		(77)
#define	ID_PSP_wkw_totteoki_count			(78)
#define	ID_PSP_wkw_denzihuyuu_count			(79)
#define	ID_PSP_wkw_healblock_count			(80)
#define	ID_PSP_wkw_shutout_count			(81)
#define	ID_PSP_wkw_karuwaza_flag			(82)
#define	ID_PSP_wkw_metronome_work			(83)
#define	ID_PSP_wkw_once_hit_up				(84)
#define	ID_PSP_wkw_once_agi_up				(85)
#define	ID_PSP_wkw_sensei_flag				(86)
#define	ID_PSP_wkw_handou_count				(87)
#define	ID_PSP_wkw_nekodamashi_count		(88)
#define	ID_PSP_wkw_slow_start_count			(89)
#define	ID_PSP_wkw_migawari_hp				(90)
#define	ID_PSP_wkw_henshin_rnd				(91)
#define	ID_PSP_wkw_kanashibari_wazano		(92)
#define	ID_PSP_wkw_encore_wazano			(93)
#define	ID_PSP_wkw_shime_wazano				(94)
#define	ID_PSP_wkw_item_hp_recover			(95)
#define	ID_PSP_slow_start_flag				(96)
#define	ID_PSP_slow_start_end_flag			(97)

#define	ID_PSP_work							(100)				//sp->temp_workに格納されている値をIDにして取得

//=========================================================================
//	ST_ServerParamDataGetで使用するID定義（技シーケンスでも使用）
//=========================================================================

#define	ID_SP_side_condition				(0)
#define	ID_SP_shiroikiri_count				(1)
#define	ID_SP_sel_mons_no					(2)
#define	ID_SP_total_turn					(3)
#define	ID_SP_level_up_pokemon				(4)
#define	ID_SP_safari_escape_count			(5)
#define	ID_SP_total_hinshi					(6)
#define	ID_SP_total_damage					(7)
#define ID_SP_act_no						(8)
#define ID_SP_ai_defence_client				(9)
#define ID_SP_no_reshuffle_client			(10)
#define ID_SP_dir_select_client				(11)
#define ID_SP_act_work						(12)

//=========================================================================
//		WS_MESSAGE用の定数定義
//=========================================================================
//=========================================================================
//		TAGタイプ
//=========================================================================
#define	TAG_NONE						(0)		//タグなし

#define	TAG_NONE_DIR					(1)		//タグなし（てき、みかた判定あり）
#define	TAG_NICK						(2)		//nickname
#define	TAG_WAZA						(3)		//技名
#define	TAG_STAT						(4)		//ステータス名
#define	TAG_ITEM						(5)		//道具名
#define	TAG_NUM							(6)		//数値
#define	TAG_NUMS						(7)		//数値（右詰め）
#define	TAG_TRNAME						(8)		//trainer名

#define	TAG_NICK_NICK					(9)		//nickname		nickname
#define	TAG_NICK_WAZA					(10)	//nickname		技名
#define	TAG_NICK_TOKU					(11)	//nickname		特性名
#define	TAG_NICK_STAT					(12)	//nickname		ステータス名
#define	TAG_NICK_TYPE					(13)	//nickname		タイプ名
#define	TAG_NICK_POKE					(14)	//nickname		ポケモン名
#define	TAG_NICK_ITEM					(15)	//nickname		道具名
#define	TAG_NICK_PLOC					(16)	//nickname		ポロック名
#define	TAG_NICK_NUM					(17)	//nickname		数値
#define	TAG_NICK_TRNAME					(18)	//nickname		trainer名
#define	TAG_NICK_BOX					(19)	//nickname		ボックス名
#define	TAG_WAZA_DIR					(20)	//技名（てき、みかた判定あり）
#define	TAG_WAZA_NICK					(21)	//技名			nickname
#define	TAG_WAZA_WAZA					(22)	//技名			技名
#define	TAG_TOKU_NICK					(23)	//特性名		nickname
#define	TAG_ITEM_WAZA					(24)	//道具名		技名
#define	TAG_NUM_NUM						(25)	//数値			数値
#define	TAG_TRNAME_TRNAME				(26)	//trainer名		trainer名
#define	TAG_TRNAME_NICK					(27)	//trainer名		nickname
#define	TAG_TRNAME_ITEM					(28)	//trainer名		道具名
#define	TAG_TRNAME_NUM					(29)	//trainer名		数値
#define	TAG_TRTYPE_TRNAME				(30)	//trainer種別	trainer名

#define	TAG_NICK_NICK_WAZA				(31)	//nickname		nickname		技名
#define	TAG_NICK_NICK_TOKU				(32)	//nickname		nickname		特性名
#define	TAG_NICK_NICK_ITEM				(33)	//nickname		nickname		道具名
#define	TAG_NICK_WAZA_WAZA				(34)	//nickname		技名			技名
#define	TAG_NICK_WAZA_NUM				(35)	//nickname		技名			数値
#define	TAG_NICK_TOKU_NICK				(36)	//nickname		特性名			nickname
#define	TAG_NICK_TOKU_WAZA				(37)	//nickname		特性名			技名
#define	TAG_NICK_TOKU_ITEM				(38)	//nickname		特性名			道具名
#define	TAG_NICK_TOKU_STAT				(39)	//nickname		特性名			ステータス名
#define	TAG_NICK_TOKU_TYPE				(40)	//nickname		特性名			タイプ名
#define	TAG_NICK_TOKU_COND				(41)	//nickname		特性名			状態異常名
#define	TAG_NICK_TOKU_NUM				(42)	//nickname		特性名			数値
#define	TAG_NICK_ITEM_NICK				(43)	//nickname		道具名			nickname
#define	TAG_NICK_ITEM_WAZA				(44)	//nickname		道具名			技名
#define	TAG_NICK_ITEM_STAT				(45)	//nickname		道具名			ステータス名
#define	TAG_NICK_ITEM_COND				(46)	//nickname		道具名			状態異常名
#define	TAG_NICK_BOX_BOX				(47)	//nickname		ボックス名		ボックス名
#define	TAG_ITEM_NICK_TASTE				(48)	//道具名		nickname		木の実の味
#define	TAG_TRNAME_NICK_NICK			(49)	//trainer名		nickname		nickname
#define	TAG_TRTYPE_TRNAME_NICK			(50)	//trainer種別	trainer名		nickname
#define	TAG_TRTYPE_TRNAME_ITEM			(51)	//trainer種別	trainer名		道具名

#define	TAG_NICK_TOKU_NICK_WAZA			(52)	//nickname		特性名			nickname		技名
#define	TAG_NICK_TOKU_NICK_TOKU			(53)	//nickname		特性名			nickname		特性名
#define	TAG_NICK_TOKU_NICK_STAT			(54)	//nickname		特性名			nickname		ステータス名
#define	TAG_NICK_ITEM_NICK_ITEM			(55)	//nickname		道具名			nickname		道具名
#define	TAG_TRNAME_NICK_TRNAME_NICK		(56)	//trainer名		nickname		trainer名		nickname
#define	TAG_TRTYPE_TRNAME_NICK_NICK		(57)	//trainer種別	trainer名		nickname		nickname
#define	TAG_TRTYPE_TRNAME_NICK_TRNAME	(58)	//trainer種別	trainer名		nickname		trainer名
#define	TAG_TRTYPE_TRNAME_TRTYPE_TRNAME	(59)	//trainer種別	trainer名		trainer種別		trainer名

#define	TAG_TRTYPE_TRNAME_NICKx2		(60)	//trainer種別	trainer名		nickname ｘ２

#define	TAG_NO_DIR						(0x80)	//敵、味方、判定をしない
#define	TAG_DIR							(0x40)	//敵、味方、判定あり
#define	TAG_NO_DIR_OFF					(0x3f)	//敵、味方、判定をしない

//=========================================================================
//		WS_IF用の定数定義
//=========================================================================
//=========================================================================
//		actパラメータ
//=========================================================================
#define	IF_FLAG_EQ		(0)		//一致
#define	IF_FLAG_NE		(1)		//不一致
#define	IF_FLAG_C		(2)		//超える
#define	IF_FLAG_NC		(3)		//以下
#define	IF_FLAG_BIT		(4)		//ビットON
#define	IF_FLAG_NBIT	(5)		//ビットOFF
#define	IF_FLAG_AND		(6)		//ビットMASKして完全一致するか？

#define	IF_FLAG_END		(6)		//上の定義の最後の値と同じにする（VAL_〜系のスタート値に使用）

//=========================================================================
//		WS_VALUE用の定数定義
//=========================================================================
//=========================================================================
//		actパラメータ（WS_VALUE,WS_PSP_VALUE）
//=========================================================================
#define	VAL_START		(IF_FLAG_END+1)

#define	VAL_SET			(VAL_START+0)		//値をセット
#define	VAL_ADD			(VAL_START+1)		//値を加算
#define	VAL_SUB			(VAL_START+2)		//値を減算
#define	VAL_BIT			(VAL_START+3)		//値をOR
#define	VAL_NBIT		(VAL_START+4)		//値をビット反転してAND
#define	VAL_MUL			(VAL_START+5)		//掛け算
#define	VAL_DIV			(VAL_START+6)		//割り算
#define	VAL_LSH			(VAL_START+7)		//左シフト
#define	VAL_RSH			(VAL_START+8)		//右シフト
#define	VAL_TO_BIT		(VAL_START+9)		//右シフト
#define	VAL_GET			(VAL_START+10)		//値をゲット WS_PSP_VALUE_WORK限定
#define	VAL_SUB_ZERO	(VAL_START+11)		//値を減算（引いた値がマイナスになったら、０にする）
#define	VAL_XOR			(VAL_START+12)		//値をXOR
#define	VAL_AND			(VAL_START+13)		//値をAND

//=========================================================================
//		WS_TOKUSEI_CHECK用の定数定義
//=========================================================================
//=========================================================================
//		flagパラメータ
//=========================================================================
#define	TOKUSEI_HAVE	(0)		//持っている
#define	TOKUSEI_NO_HAVE	(1)		//持っていない

//=========================================================================
//		WS_SOUBI_CHECK用の定数定義
//=========================================================================
//=========================================================================
//		flagパラメータ
//=========================================================================
#define	SOUBI_HAVE		(0)		//持っている
#define	SOUBI_NO_HAVE	(1)		//持っていない

//=========================================================================
//		srcパラメータ(WS_IF,WS_VALUE)	かならず4バイトの変数を指定すること！
//=========================================================================
#define	BUF_PARA_FIGHT_TYPE					(0)		//bw->fight_type
#define	BUF_PARA_CRITICAL_COUNT				(1)		//sp->critical_count
#define	BUF_PARA_ADD_STATUS_DIRECT			(2)		//sp->add_status_flag_direct
#define	BUF_PARA_ADD_STATUS_INDIRECT		(3)		//sp->add_status_flag_indirect
#define	BUF_PARA_ADD_STATUS_TOKUSEI			(4)		//sp->add_status_flag_tokusei
#define	BUF_PARA_TSUIKA_TYPE				(5)		//sp->tsuika_type
#define	BUF_PARA_SERVER_STATUS_FLAG			(6)		//sp->server_status_flag
#define	BUF_PARA_FIELD_CONDITION			(7)		//sp->field_condition
#define	BUF_PARA_DAMAGE_VALUE				(8)		//sp->damage_value
#define	BUF_PARA_CALC_WORK					(9)		//sp->calc_work
#define	BUF_PARA_WAZA_STATUS_FLAG			(10)	//sp->waza_status_flag
#define	BUF_PARA_SIDE_CONDITION_ATTACK		(11)	//sp->side_condition[sp->attack_client&1]
#define	BUF_PARA_SIDE_CONDITION_DEFENCE		(12)	//sp->side_condition[sp->defence_client&1]
#define	BUF_PARA_SIDE_CONDITION_TSUIKA		(13)	//sp->side_condition[sp->tsuika_client&1]
#define	BUF_PARA_DAMAGE						(14)	//sp->damage
#define	BUF_PARA_ATTACK_CLIENT				(15)	//sp->attack_client
#define	BUF_PARA_DEFENCE_CLIENT				(16)	//sp->defence_client
#define	BUF_PARA_TSUIKA_CLIENT				(17)	//sp->tsuika_client
#define	BUF_PARA_KIZETSU_CLIENT				(18)	//sp->kizetsu_client
#define	BUF_PARA_RESHUFFLE_CLIENT			(19)	//sp->reshuffle_client
#define	BUF_PARA_CLIENT_WORK				(20)	//sp->client_work
#define	BUF_PARA_STORE_DAMAGE_ATTACK		(21)	//sp->store_damage[sp->attack_client]
#define	BUF_PARA_MSG_WORK					(22)	//sp->msg_work
#define	BUF_PARA_KOBAN_COUNTER				(23)	//sp->koban_counter
#define	BUF_PARA_WAZA_NO_NOW				(24)	//sp->waza_no_now
#define	BUF_PARA_TOTAL_TURN					(25)	//sp->total_turn
#define	BUF_PARA_ATTACK_CLIENT_WORK			(26)	//sp->attack_client_work
#define	BUF_PARA_DEFENCE_CLIENT_WORK		(27)	//sp->defence_client_work
#define	BUF_PARA_WAZA_NO_TEMP				(28)	//sp->waza_no_temp
#define	BUF_PARA_PUSH_CLIENT				(29)	//sp->push_client
#define	BUF_PARA_DAMAGE_POWER				(30)	//sp->damage_power
#define	BUF_PARA_SWOAM_TYPE					(31)	//sp->swoam_type
#define	BUF_PARA_HP_CALC_WORK				(32)	//sp->hp_calc_work
#define	BUF_PARA_WIN_LOSE_FLAG				(33)	//sp->win_lose_flag
#define	BUF_PARA_TSUIKA_PARA				(34)	//sp->tsuika_para
#define	BUF_PARA_WAZA_WORK					(35)	//sp->waza_work
#define	BUF_PARA_ITEM_WORK					(36)	//sp->item_work
#define	BUF_PARA_TOKUSEI_WORK				(37)	//sp->tokusei_work
#define	BUF_PARA_WEATHER_COUNT				(38)	//sp->fcc.weather_count
#define	BUF_PARA_CLIENT_NO_AGI				(39)	//sp->client_no_agi
#define	BUF_PARA_LOOP_FLAG					(40)	//sp->loop_flag
#define	BUF_PARA_BUTSURI_DAMAGE_ATTACK		(41)	//sp->otf[sp->attack_client].butsuri_otf_damage
#define	BUF_PARA_TOKUSYU_DAMAGE_ATTACK		(42)	//sp->otf[sp->attack_client].tokusyu_otf_damage
#define	BUF_PARA_TEMP_WORK					(43)	//sp->temp_work
#define	BUF_PARA_CRITICAL					(44)	//sp->critical
#define	BUF_PARA_LAST_DAMAGE_ATTACK			(45)	//sp->otf[sp->attack_client].last_otf_damage
#define	BUF_PARA_LAST_DAMAGE_DEFENCE		(46)	//sp->otf[sp->defence_client].last_otf_damage
#define	BUF_PARA_OSTF_STATUS_FLAG_ATTACK	(47)	//sp->ostf[sp->attack_client].status_flag
#define	BUF_PARA_OSTF_STATUS_FLAG_DEFENCE	(48)	//sp->ostf[sp->defence_client].status_flag
#define	BUF_PARA_OSTF_STATUS_FLAG_TSUIKA	(49)	//sp->ostf[sp->tsuika_client].status_flag
#define	BUF_PARA_NAGETSUKERU_WORK			(50)	//sp->nagetsukeru_work
#define	BUF_PARA_NAGETSUKERU_SEQ_NO			(51)	//sp->nagetsukeru_seq_no
#define	BUF_PARA_BATTLE_STATUS_FLAG			(52)	//bw->battle_status_flag
#define	BUF_PARA_WAZA_NO_KEEP_ATTACK		(53)	//sp->waza_no_keep[sp->attack_client]
#define	BUF_PARA_HIT_DAMAGE					(54)	//sp->hit_damage
#define	BUF_PARA_SAFARI_BALL_COUNT			(55)	//bw->safari_ball
#define	BUF_PARA_RESHUFFLE_CLIENT_TEMP		(56)	//sp->reshuffle_client_temp
#define	BUF_PARA_WAZA_TYPE					(57)	//sp->waza_type
#define	BUF_PARA_WAZA_EFF_CNT				(58)	//sp->waza_eff_cnt
#define	BUF_PARA_REGULATION_FLAG			(59)	//bw->regulation_flag
#define	BUF_PARA_SERVER_STATUS_FLAG2		(60)	//sp->server_status_flag2
#define	BUF_PARA_AGI_CNT					(61)	//sp->agi_cnt
#define	BUF_PARA_CLIENT_SET_MAX				(62)	//bw->client_set_max
#define	BUF_PARA_ATTACK_CLIENT_TEMP			(63)	//sp->attack_client_temp
#define	BUF_PARA_DEFENCE_CLIENT_TEMP		(64)	//sp->defence_client_temp
#define	BUF_PARA_BUTSURI_OSTF_DAMAGE_D		(65)	//sp->ostf[sp->defence_client].butsuri_ostf_damage
#define	BUF_PARA_DAMEOSHI_DAMAGE			(66)	//sp->otf[sp->client_work].dameoshi_damage
#define	BUF_PARA_DAMEOSHI_DAMAGE_DEFENCE	(67)	//sp->otf[sp->defence_client].dameoshi_damage
// ----------------------------------------------------------------------------
// localize_spec_mark(LANG_ALL) imatake 2007/02/10
// 入れ替え「おいうち」発生時に「かいがらのすず」の効果が出ない不具合の修正
#if AFTER_MASTER_070202_BT2_FIX
#define	BUF_PARA_OSTF_KAIGARA_DAMAGE		(68)	//sp->ostf[sp->attack_client].kaigara_damage
#endif //AFTER_MASTER_070202_BT2_FIX
// ----------------------------------------------------------------------------

//=========================================================================
//		WS_VANISH_ON_OFF用の定数定義
//=========================================================================
#define	SW_VANISH_OFF	(0)	//ポケモン表示
#define	SW_VANISH_ON	(1)	//ポケモン非表示

//=========================================================================
//		WS_RENZOKU用の定数定義
//=========================================================================
#define	BADGE_CHECK_OFF		(0x00000001)	//バッジチェックなし
#define	TYPE_CHECK_OFF		(0x00000002)	//タイプチェックなし
#define	STATUS_CHECK_OFF	(0x00000004)	//ステータスチェックなし
#define	PP_CHECK_OFF		(0x00000008)	//PPチェックなし
#define	TOKUSEI_CHECK_OFF	(0x00000010)	//特性チェックなし
#define	HIT_CHECK_OFF		(0x00000020)	//命中率チェックなし
#define	WAZAKOUKA_CHECK_OFF	(0x00000040)	//技効果チェックなし
#define	WAZAKOYUU_CHECK_OFF	(0x00000080)	//技固有チェックなし

//複数体ヒット系のビット
#define	DOUBLE_HIT_OFF		(BADGE_CHECK_OFF|STATUS_CHECK_OFF|PP_CHECK_OFF)
//連続系のビット
#define	RENZOKU_HIT_OFF		(BADGE_CHECK_OFF|STATUS_CHECK_OFF|PP_CHECK_OFF|\
							 TOKUSEI_CHECK_OFF|HIT_CHECK_OFF|WAZAKOUKA_CHECK_OFF|WAZAKOYUU_CHECK_OFF)

//トリプルキックのビット
#define	TRIPLEKICK_HIT_OFF	(BADGE_CHECK_OFF|STATUS_CHECK_OFF|PP_CHECK_OFF|\
							 TOKUSEI_CHECK_OFF|WAZAKOUKA_CHECK_OFF|WAZAKOYUU_CHECK_OFF)

//=========================================================================
//		WS_RESHUFFLE_CHECK用の定数定義
//=========================================================================
#define	POKE_LIST_OFF	(0)	//ポケモンリストフラグは立てない
#define	POKE_LIST_ON	(1)	//ポケモンリストフラグを立てる

//=========================================================================
//		WS_OTF_SET用の定数定義
//=========================================================================
#define	OTF_waruagaki_flag		(0)		//わるあがきフラグ
#define	OTF_pp_dec_flag			(1)		//PPを減らしたフラグ
#define	OTF_mamoru_flag			(2)		//まもるフラグ
#define	OTF_tedasuke_flag		(3)		//てだすけフラグ
#define	OTF_magic_cort_flag		(4)
#define	OTF_yokodori_flag		(5)
#define	OTF_haneyasume_flag		(6)

//=========================================================================
//		WS_SIDE_CONDITION_CHECK用の定数定義
//=========================================================================
#define	SCC_MODE_Z_CHECK		(0)		//0だったら、JUMP
#define	SCC_MODE_NZ_CHECK		(1)		//0以外だったら、JUMP
#define	SCC_MODE_CLEAR			(2)		//カウンタをクリア（JUMPはしない）

#define	SCC_butsuri_guard_count	(0)
#define	SCC_tokusyu_guard_count	(1)
#define	SCC_shiroikiri_count	(2)
#define	SCC_shinpi_count		(3)
#define	SCC_makibisi_count		(4)
#define	SCC_dokubisi_count		(5)

//=========================================================================
//		WS_JUMP_WAZA_WORK用の定数定義
//=========================================================================
#define	JWW_FLAG_NORMAL			(0)		//通常動作
#define	JWW_FLAG_SET_DEFENCE	(1)		//DefenceClientはセット済み

//=========================================================================
//		ServerWazaOutAfterMessage用の定数定義
//=========================================================================
#define	SWOAM_NORMAL	(0)	//通常
#define	SWOAM_LOOP		(1)	//ループの時

//=========================================================================
//		特性ぼうおんをもっているフラグ
//=========================================================================
#define	BOUON_SIDE_1	(1)	//自分
#define	BOUON_SIDE_2	(2)	//パートナー
#define	NOSET_SIDE_1	(4)	//自分
#define	NOSET_SIDE_2	(8)	//パートナー

//=========================================================================
//		メッセージのウエイト
//=========================================================================
#define	MSG_WAIT		(20)
#define	SLIDE_WAIT		(20)

//=========================================================================
//		TRAINER_IN用登場位置フラグ
//=========================================================================
#define	POS_APPEAR	(0)
#define	POS_MSG		(1)

//=========================================================================
//		トレーナーメッセージ用フラグ
//=========================================================================
#define	TRAINER_MESSAGE_FLAG_FIRST_DAMAGE		(0x01)	//最初の攻撃がヒット
#define	TRAINER_MESSAGE_FLAG_POKE_HP_HALF		(0x02)	//HPが半分以下
#define	TRAINER_MESSAGE_FLAG_POKE_LAST			(0x03)	//ポケモンが最後の１体
#define	TRAINER_MESSAGE_FLAG_POKE_LAST_HP_HALF	(0x04)	//ポケモンが最後の１体でHPが半分以下

//=========================================================================
//		メッセージ用木の実の味定義
//=========================================================================
#define	TASTE_KARAI		(0)
#define	TASTE_SIBUI		(1)
#define	TASTE_AMAI		(2)
#define	TASTE_NIGAI		(3)
#define	TASTE_SUPPAI	(4)

//=========================================================================
//		木の実の味定義
//=========================================================================
#define	LIKE_TASTE		(1)
#define	NORMAL_TASTE	(0)
#define	DISLIKE_TASTE	(-1)

//=========================================================================
//		自爆HP(自爆した時、一瞬でHPを0表示にする為、ダメージ値にこの値を入れる)
//=========================================================================
#define JIBAKU_HP			(0x7fff)

//=========================================================================
//		BattleMSG_PrintXY用定義
//=========================================================================
#define BATTLE_MSG_WIN_CLEAR	(0x00000001)	///<メッセージウインドウをクリア
#define BATTLE_MSG_WIDTH_OFS	(0x00000002)	///<メッセージの右詰め補正をする

//=========================================================================
//		サファリゾーン用定義
//=========================================================================
#define	SAFARI_COUNT_FLAT		(6)				///<捕獲率、逃走率計算用カウンタの等倍時の値
#define	SAFARI_COUNT_MAX		(12)			///<捕獲率、逃走率計算用カウンタのMAX値

#define	SAFARI_ATARI			(10)			///<捕獲率、逃走率計算用カウンタの大当たりの確率(gf_rand()%??==0)

//=========================================================================
//		YES_NO_SELECT用のフラグ
//=========================================================================
#define	YNTYPE_YES_NO				(0)			//通常のはい／いいえ
#define	YNTYPE_WASURE				(1)			//技忘れ用
#define	YNTYPE_AKIRAME				(2)			//技覚えあきらめ用
#define	YNTYPE_NEXT_POKEMON			(3)			//「つぎの　ポケモンを　つかう」
#define	YNTYPE_CHANGE_POKEMON		(4)			//「ポケモンを　いれかえる」
#define	YNTYPE_NICK_NAME			(5)			//ニックネームをつけるのはい／いいえ

//=========================================================================
//	ポケモンのフォルムナンバー定義
//=========================================================================
//ポワルン
#define	FORMNO_POWARUN_NORMAL		(0)		///<ノーマルポワルン
#define	FORMNO_POWARUN_SUN			(1)		///<太陽ポワルン
#define	FORMNO_POWARUN_RAIN			(2)		///<雨ポワルン
#define	FORMNO_POWARUN_SNOW			(3)		///<あられポワルン

#define	FORMNO_POWARUN_MAX			(3)		///<ポワルンの別フォルムMAX

//ミノムッチ
#define	FORMNO_MINOMUTTI_KUSA		(0)		///<くさみの
#define	FORMNO_MINOMUTTI_SUNA		(1)		///<すなみの
#define	FORMNO_MINOMUTTI_TETSU		(2)		///<てつみの

#define	FORMNO_MINOMUTTI_MAX		(2)		///<ミノムッチの別フォルムMAX

//チェリシュ
#define	FORMNO_THERISYU_NORMAL		(0)		///<つぼみチェリシュ
#define	FORMNO_THERISYU_SUN			(1)		///<咲いてるチェリシュ

#define	FORMNO_THERISYU_MAX			(1)		///<チェリシュの別フォルムMAX

//シーウシ・シードルゴ
#define	FORMNO_SII_WEST				(0)		///<西シーウシ・シードルゴ
#define	FORMNO_SII_EAST				(1)		///<東シーウシ・シードルゴ

#define	FORMNO_SII_MAX				(1)		///<シーウシ・シードルゴの別フォルムMAX

//デオキシス
#define	FORMNO_DEOKISISU_NORMAL		(0)		///<ノーマルフォルム
#define	FORMNO_DEOKISISU_ATTACK		(1)		///<アタックフォルム
#define	FORMNO_DEOKISISU_DEFENCE	(2)		///<ディフェンスフォルム
#define	FORMNO_DEOKISISU_SPEED		(3)		///<スピードフォルム

#define	FORMNO_DEOKISISU_MAX		(3)		///<デオキシスの別フォルムMAX

//=========================================================================
//		アイテムタイプ（AI用）
//=========================================================================
#define	ITEMTYPE_KAIHUKUNOKUSURI	(0)
#define	ITEMTYPE_HP_KAIHUKU			(1)
#define	ITEMTYPE_CONDITION_KAIHUKU	(2)
#define	ITEMTYPE_ABIRITY_UP			(3)
#define	ITEMTYPE_EFFECT_GUARD		(4)
#define	ITEMTYPE_UNKOWN				(5)

//=========================================================================
//		アイテムUSEメッセージインデックス
//=========================================================================
#define	ITEM_USE_MSG_RECV_KONRAN	(0)		//こんらん直し
#define	ITEM_USE_MSG_RECV_MAHI		(1)		//まひ直し
#define	ITEM_USE_MSG_RECV_KOORI		(2)		//こおり直し
#define	ITEM_USE_MSG_RECV_YAKEDO	(3)		//やけど直し
#define	ITEM_USE_MSG_RECV_DOKU		(4)		//どく直し
#define	ITEM_USE_MSG_RECV_NEMURI	(5)		//ねむり直し
#define	ITEM_USE_MSG_RECV_MULTI		(6)		//こんらん＋α直し

//=========================================================================
//		トレーナー背面グラフィック用TRTYPE定義
//=======================================================================
#define	TRTYPE_TRB_BOY				(0)		//男主人公
#define	TRTYPE_TRB_GIRL				(1)		//女主人公
#define	TRTYPE_TRB_RIVAL			(2)		//ライバル（パール？）
#define	TRTYPE_TRB_BTFIVE1			(3)		//五人衆（モミ）
#define	TRTYPE_TRB_BTFIVE2			(4)		//五人衆（ゲン）
#define	TRTYPE_TRB_BTFIVE3			(5)		//五人衆（マイ）
#define	TRTYPE_TRB_BTFIVE4			(6)		//五人衆（バク）
#define	TRTYPE_TRB_BTFIVE5			(7)		//五人衆（ミル）

//=========================================================================
//		POKEMON_GET_INITにセットするタイプ
//=======================================================================
#define	GET_NORMAL					(0)		//通常捕獲
#define	GET_SAFARI					(1)		//サファリ捕獲

//=========================================================================
//		TRAINER_THROWにセットするタイプ
//=======================================================================
#define	TT_TYPE_ENCOUNT				(0)		//エンカウント
#define	TT_TYPE_SAFARI_BALL			(1)		//サファリボール投げ
#define	TT_TYPE_SAFARI_STONE		(2)		//サファリ石投げ
#define	TT_TYPE_SAFARI_FOOD			(3)		//サファリえさ投げ
#define	TT_TYPE_PARK_BALL			(4)		//ポケパークボール投げ

//=========================================================================
//		INC_RECORDにセットするフラグ
//=======================================================================
#define	CLIENT_BOOT_TYPE_MINE		(0)		//自分制御
#define	CLIENT_BOOT_TYPE_NOMINE		(1)		//自分制御以外

//=========================================================================
//		POKEMON_APPEARのフラグ
//=======================================================================
#define	POKEMON_APPEAR_KURIDASI		(0)		//繰り出し
#define	POKEMON_APPEAR_GET_FAILED	(1)		//捕獲失敗

//=========================================================================
//		command_select_flagのフラグ
//=======================================================================
#define	SLIDE_IN_BEFORE				(0)		//スライド前
#define	SLIDE_IN_AFTER				(1)		//スライド後

//=========================================================================
//		デバッグ用フラグ
//=========================================================================
#define	DEBUG_FLAG_ADD_STATUS				(0x00000001)			///<追加効果100%
#define	DEBUG_FLAG_TOKUSYU					(0x00000002)			///<特性発動100%
#define	DEBUG_FLAG_SOUBI					(0x00000004)			///<装備効果発動100%
#define	DEBUG_FLAG_DAMAGE_LOCK				(0x00000008)			///<ダメージ乱数を固定
#define	DEBUG_FLAG_RESHUFFLE_CONTROL		(0x00000010)			///<ポケモン入れ替えを制御
#define	DEBUG_FLAG_YUBIHURU_DEBUG_SET		(0x00000020)			///<ゆびをふるデバッグ技固定
#define	DEBUG_FLAG_YUBIHURU_DEBUG_RANGE		(0x00000040)			///<ゆびをふるデバッグ技範囲
#define	DEBUG_FLAG_CRITICAL					(0x00000080)			///<急所100%

#define	DEBUG_FLAG_ADD_STATUS_OFF			(0x00000001)^0xffffffff	///<追加効果100%
#define	DEBUG_FLAG_TOKUSYU_OFF				(0x00000002)^0xffffffff	///<特性発動100%
#define	DEBUG_FLAG_SOUBI_OFF				(0x00000004)^0xffffffff	///<装備効果発動100%
#define	DEBUG_FLAG_DAMAGE_LOCK_OFF			(0x00000008)^0xffffffff	///<ダメージ乱数を固定
#define	DEBUG_FLAG_RESHUFFLE_CONTROL_OFF	(0x00000010)^0xffffffff	///<ポケモン入れ替えを制御
#define	DEBUG_FLAG_YUBIHURU_DEBUG_SET_OFF	(0x00000020)^0xffffffff	///<ゆびをふるデバッグ技固定
#define	DEBUG_FLAG_YUBIHURU_DEBUG_RANGE_OFF	(0x00000040)^0xffffffff	///<ゆびをふるデバッグ技範囲
#define	DEBUG_FLAG_CRITICAL_OFF				(0x00000080)^0xffffffff	///<急所100%

#endif __BATTLE_SERVER_H_
