www.pudn.com > gamedata.rar > skill.c


#include "stdafx.h" 
 
extern struct OBJECT_INFO       object_info[MAX_NUM_OBJ]; 
extern struct NOVELITY_MAP_INFO map[MAX_NUM_MAP]; 
extern signed long citizen_code[11][10]; 
extern long NEEDEXPS[MAX_LEVEL + 1]; 
 
// 技能1 
extern int skill_code1[4][5]; 
// 技能2 
extern int skill_code2[4][3]; 
//  物理攻击控制 
/* 
    int force;           // 力量 
	int somatic;         // 体质 
	int celerity;        // 敏捷 
	int wisdom;          // 智慧 
	int intellect;       // 智力 
	*/ 
int randattacknormal(BYTE mode, BOOL npc, int n1, int n2) 
{ 
/* 
	if (object_info[n1].job == 0) 
	{ 
		if (object_info[n2].job == 0) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 1) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 2) 
		{ 
	//		object_info[n].skill1[(int)skill_code1[2][0]] =  
		} 
		else if (object_info[n2].job == 3) 
		{ 
			; 
		} 
	} 
	else if (object_info[n1].job == 1) 
	{ 
		if (object_info[n2].job == 0) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 1) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 2) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 3) 
		{ 
			; 
		} 
	} 
	else if (object_info[n1].job == 2) 
	{ 
		if (object_info[n2].job == 0) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 1) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 2) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 3) 
		{ 
			; 
		} 
	} 
	else if (object_info[n1].job == 3) 
	{ 
		if (object_info[n2].job == 0) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 1) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 2) 
		{ 
			; 
		} 
		else if (object_info[n2].job == 3) 
		{ 
			; 
		} 
	}*/ 
 
	if (object_info[n1].normalattack1 <= object_info[n2].normaldefence) 
	{ 
		 
		// 无视防御 
		if(getpercentageprobabilitystatus(50)) return object_info[n1].normalattack2; else return (rand() % object_info[n1].normalattack1); 
	} 
	else 
	{   // 无视防御 
		if(getpercentageprobabilitystatus(50)) return object_info[n1].normalattack2; 
		else return (myrand((int)(object_info[n1].normalattack1 *  0.5), (int)(object_info[n1].normalattack1 - object_info[n2].normaldefence))); 
	} 
	 
 
	return 0; 
} 
// 魔法攻击控制 
int randattackspell(BYTE mode, int attack, int defence, int n1, int n2) 
{ 
	// 如果攻击力 <= 防御力 
	if (attack <= defence) 
	{ 
		// 无视防御 
	//	if(getpercentageprobabilitystatus(50)) return attack; else { return 0; } 
		return (rand() % (attack)); 
	} 
	else 
	{ 
		if(getpercentageprobabilitystatus(50)) return attack; 
		else return myrand((int)(attack * 0.5), (int)(attack - defence)); 
	} 
} 
 
// 计算攻击概率 
int TFattacknumber(BOOL spell, BYTE spell_mode, int n1, int n2) 
{ 
	int attack, defence; 
 
	if (spell) 
	{ 
		if (object_info[n1].npc == 0) 
		{ 
			if (spell_mode == 0x02) 
			{ 
				attack = object_info[n1].wisdom * 1 + object_info[n1].spellattack1; 
				defence = object_info[n2].spelldefence; 
				return randattackspell(spell_mode, attack, defence, n1, n2); 
			} 
			else if (spell_mode == 0x03) 
			{ 
				attack = (int)(object_info[n1].wisdom * 1.3 + object_info[n1].spellattack1); 
				defence = object_info[n2].spelldefence; 
				return randattackspell(spell_mode, attack, defence, n1, n2); 
			} 
			else if (spell_mode == 0x04) 
			{ 
				attack = (int)(object_info[n1].wisdom * 1.5 + object_info[n1].spellattack1); 
				defence = object_info[n2].spelldefence; 
				return randattackspell(spell_mode, attack, defence, n1, n2); 
			} 
			else if (spell_mode == 0x05) 
			{ 
				attack = (int)(object_info[n1].wisdom * 1.7 + object_info[n1].spellattack1); 
				defence = object_info[n2].spelldefence; 
				return randattackspell(spell_mode, attack, defence, n1, n2); 
			} 
			else if (spell_mode == 0x08) 
			{ 
				attack = (int)(object_info[n1].wisdom * 2.0 + object_info[n1].spellattack1); 
				defence = object_info[n2].spelldefence; 
				return randattackspell(spell_mode, attack, defence, n1, n2); 
			} 
			else if (spell_mode == 0x0A) 
			{ 
				attack = (int)(object_info[n1].wisdom * 1.7 + object_info[n1].spellattack1); 
				defence = object_info[n2].spelldefence; 
				return randattackspell(spell_mode, attack, defence, n1, n2); 
			} 
		} 
		else if (object_info[n1].npc == 2) 
		{ 
			; 
		} 
		else if (object_info[n1].npc == 4) 
		{ 
			; 
		} 
	} 
	else 
	{ 
		if (object_info[n1].npc == 0) 
		{ 
			return randattacknormal(0xFF, FALSE, n1, n2); 
		} 
		else if (object_info[n1].npc == 2) 
		{ 
			return randattacknormal(0xFF, FALSE, n1, n2); 
		} 
		else if (object_info[n1].npc == 4) 
		{ 
			return randattacknormal(0xFF, FALSE, n1, n2); 
		} 
	} 
 
	return 0; 
} 
 
// 重要攻击代码判断 
void TFattack(SOCKET s, BOOL spell, BYTE code, int n1, int n2, int attacknumber) 
{ 
	int i, m; 
	long b1, b2; 
 
	struct OBJECT_INFO info; 
 
	// 只要有一个死了的,就不执行 
	if ((object_info[n1].died) || (object_info[n2].died))  
	{ 
		if (spell) { object_info[n1].time6 = GetTickCount(); return; } 
		else { object_info[n1].time1 = GetTickCount(); return; } 
	} 
 
	m = getmapstatus(n1); 
 
	if (m == MAX_NUM_MAP) return; 
 
	b1 = (map[m].max_x * (object_info[n1].now_y - 1) + object_info[n1].now_x) - 1; 
	b2 = (map[m].max_x * (object_info[n2].now_y - 1) + object_info[n2].now_x) - 1; 
 
	// 如果对方在安全区里, 则不攻击 
	if ((object_info[n1].npc == 0) && (object_info[n2].npc == 0)) 
	{	 
		if ((map[m].map_info[b1].code[0] == 0xA1) || (map[m].map_info[b2].code[0] == 0xA1)) 
		{ 
			if (GetTickCount() < object_info[n1].time1 + object_info[n1].normal_attack_time) return; 
			 
			attack1(s, n1, n2, 35, TRUE); object_info[n1].time1 = GetTickCount(); return; 
		} 
	} 
 
	{ 
		if (spell) 
		{ 
			if (attacknumber == 0) return;		 
			if (GetTickCount() < object_info[n1].time6 + object_info[n1].spell_attack_time) return;		 
			if (spellconsume(s, n1, code) == -1) return; 
			sendspellinfo(s, code, n1, n2, 35, TRUE);	 
			// 回避成功 
			if (attacknumber == -1) return; 
		} 
		else 
		{	 
			if (GetTickCount() < object_info[n1].time1 + object_info[n1].normal_attack_time) return;	 
			if (attacknumber == 0) { attack1(s, n1, n2, 35, TRUE); object_info[n1].time1 = GetTickCount(); return; } 
			if (attacknumber < object_info[n1].normalattack1)	 
				attack2(s, 0x01, n1, n2, 35, TRUE); 
			else 
				attack2(s, 0x03, n1, n2, 35, TRUE); 
			// 回避成功		 
			if (attacknumber == -1) return;	 
		} 
	} 
	 
 
 
	// 如果是怪物或者警卫你攻击的话 
	if (object_info[n1].npc == 2 || object_info[n1].npc == 4) 
	{ 
		if (object_info[n2].life_now - attacknumber <= 0) 
		{ 
			object_info[n2].died     = TRUE; 
		 
			object_info[n2].time1    = GetTickCount();	 
			object_info[n2].time2    = GetTickCount();	 
			object_info[n2].time3    = GetTickCount();		 
			object_info[n2].time4    = GetTickCount();	 
			object_info[n2].time5    = GetTickCount(); 
			object_info[n2].time6    = GetTickCount(); 
			object_info[n2].time7    = GetTickCount(); 
			object_info[n2].time8    = GetTickCount(); 
			object_info[n2].time9    = GetTickCount(); 
 
			if (!spell) 
				object_info[n1].time1 = GetTickCount();	 
			else 
				object_info[n1].time6 = GetTickCount();	 
 
			info = object_info[n2]; 
			// 死亡了 
			objectdied(s, info, 35, TRUE);	 
			dropnovelitygame(m, n2, n1, n2); 
		} 
		else 
		{ 
			object_info[n2].life_now = object_info[n2].life_now - attacknumber; 
 
			gamemessage(object_info[n2].s, 0x6B, object_info[n2].life_now, 0);			 
			 
		//	if (!spell) 
		//		attack2(s, n1, n2, 25, TRUE); 
		} 
 
		if (!spell) 
			object_info[n1].time1 = GetTickCount();	 
		else 
			object_info[n1].time6 = GetTickCount();	 
	} 
	else if (object_info[n2].npc == 0) 
	{ 
		if (object_info[n2].life_now - attacknumber <= 0) 
		{ 
			object_info[n2].died     = TRUE; 
			object_info[n2].life_now = 0; 
			 
			object_info[n2].time1    = GetTickCount();	 
			object_info[n2].time2    = GetTickCount();	 
			object_info[n2].time3    = GetTickCount();		 
			object_info[n2].time4    = GetTickCount();	 
			object_info[n2].time5    = GetTickCount(); 
			object_info[n2].time6    = GetTickCount(); 
			object_info[n2].time7    = GetTickCount(); 
			object_info[n2].time8    = GetTickCount(); 
			object_info[n2].time9    = GetTickCount(); 
 
			if (!spell) 
				object_info[n1].time1 = GetTickCount();	 
			else 
				object_info[n1].time6 = GetTickCount();	 
 
			// 有恶意玩家攻击你 导致死亡 
			if (object_info[n1].npc == 0) 
			{ 
				// 如果被攻击者是坏蛋,那么将不减少市民经验 
				if ((object_info[n2].citizenlevel <= 5) && (object_info[n1].citizenlevel > 0)) 
				{ 
					if (object_info[n1].citizenlevel >= 9) 
					{ 
						// 市民等级降低 
						object_info[n1].citizenexp = -1500;  
 
						object_info[n1].citizenlevel = 5; 
					} 
					else 
					{ 
						object_info[n1].citizenexp -= 1500;  
					} 
 
					if (object_info[n1].citizenexp <= citizen_code[object_info[n1].citizenlevel - 1][9]) 
					{ 
						object_info[n1].citizenlevel --; 
							 
						sendcitizeninfo(s,  object_info[n1].ServerID, object_info[n1].citizenlevel, 0); 
					}	 
				} 
				else 
				{ 
					;  
				} 
			} 
			// 死亡了 
			objectdied(s, object_info[n2], 35, TRUE); 
			dropnovelitygame(m, n2, n1, n2); 
		} 
		else 
		{ 
			if (object_info[n1].npc == 0) 
			{ 
				// 如果是坏蛋或这变名 
				if ((object_info[n2].citizenlevel <= 4) || (object_info[n2].attack_other > 0)) 
				{   
					; 
				} 
				else if ((object_info[n2].citizenlevel >= 5)) 
				{ 
					object_info[n1].attack_other = GetTickCount(); 
 
					sendcitizeninfo(s,  object_info[n1].ServerID, object_info[n1].citizenlevel, 1); 
				} 
			} 
 
			object_info[n2].life_now = object_info[n2].life_now - attacknumber; 
 
			gamemessage(object_info[n2].s, 0x6B, object_info[n2].life_now, 0);			 
			 
		//	if (!spell) 
		//		attack2(s, n1, n2, 25, TRUE); 
		} 
 
		if (!spell) 
			object_info[n1].time1 = GetTickCount();	 
		else 
			object_info[n1].time6 = GetTickCount();	 
 
		setplayer_status(n1, FALSE); 
	} 
	else if (object_info[n2].npc == 2) 
	{ 
		// 如果物理攻击小于防御力 
		if (object_info[n2].life_now - attacknumber <= 0) 
		{ 
			object_info[n2].died      = TRUE; 
			object_info[n2].life_now  = 0; 
 
			// 判断是否跨越等级 
		//	if ((object_info[n2].level + object_info[n2].level_ >= object_info[n1].level) && 
		//		(object_info[n2].level - object_info[n2].level_ <= object_info[n1].level)) 
			{ 
		 
				object_info[n1].fight_exp ++;		 
			//	object_info[n1].citizenexp += object_info[n2].citizenexp;		 
				object_info[n1].exp        += object_info[n2].exp; 
		 
				if (object_info[n1].exp >= NEEDEXPS[object_info[n1].level - 1])	 
				{ 
					/* 
					     一次升很多等级 
					*/ 
					for(i=0;i= NEEDEXPS[object_info[n1].level]) 
						{ 
							object_info[n1].level ++; 
						 
							object_info[n1].surplusskill1 ++; 
							if (object_info[n1].level <= 10) 
								object_info[n1].surplusskill2 ++; 
							else 
							{ 
								if ((object_info[n1].level > 10) && (object_info[n1].level % 2 == 0)) 
									object_info[n1].surplusskill2 ++; 
							} 
							 
							if ((object_info[n1].level >= 100) && (object_info[n1].skill1[skill_code1[object_info[n1].job][4]] <= 20)) 
								object_info[n1].skill1[skill_code1[object_info[n1].job][4]] ++; 
 
							if (object_info[n1].level >= 120) 
								object_info[n1].surplusskill3 ++; 
 
							continue; 
						} 
						else 
						{ 
							object_info[n1].level ++;  
							object_info[n1].surplusskill1 ++; 
 
							if (object_info[n1].level >= MAX_LEVEL) object_info[n1].level = MAX_LEVEL - 1; 
							if (object_info[n1].level <= 0) object_info[n1].level = 1; 
 
							if (object_info[n1].level <= 10) 
								object_info[n1].surplusskill2 ++; 
							else 
							{ 
								if ((object_info[n1].level > 10) && (object_info[n1].level % 2 == 0)) 
									object_info[n1].surplusskill2 ++; 
							} 
							 
							if ((object_info[n1].level >= 100) && (object_info[n1].skill1[skill_code1[object_info[n1].job][4]] <= 20)) 
								object_info[n1].skill1[skill_code1[object_info[n1].job][4]] ++; 
 
							if (object_info[n1].level >= 120) 
								object_info[n1].surplusskill3 ++;							 
								 
							break; 
						} 
					} 
		 
					// 等级增加 
					if (object_info[n1].npc == 0)	 
					{	 
						// 如果被攻击者是坏蛋,那么将不减少市民经验 
						if (object_info[n1].citizenlevel < 10) 
						{								 
							// 市民等级降低							 
							object_info[n1].citizenexp += object_info[n2].level * 20;  
						 
							if (object_info[n1].citizenexp >= citizen_code[object_info[n1].citizenlevel+1][9])					 
							{						 
								object_info[n1].citizenlevel ++; 
												 
								sendcitizeninfo(s,  object_info[n1].ServerID, object_info[n1].citizenlevel, 0);			 
							} 
						} 
					} 
					else 
					{ 
						; 
					} 
				 
					info = object_info[n1]; 
 
					sendupgradeinfo(object_info[n1].s, info); 
		 
					usestatusinfo(object_info[n1].s, n1, 9, 0, FALSE);				 
					 
					setplayer_status(n1, TRUE);	 
				} 
				else		 
				{ 
					// 等级增加 
					if (object_info[n1].npc == 0)	 
					{	 
						// 如果被攻击者是坏蛋,那么将不减少市民经验 
						if (object_info[n1].citizenlevel < 10) 
						{								 
							// 市民等级降低 
									 
							object_info[n1].citizenexp += object_info[n2].level * 20;  
						 
							if (object_info[n1].citizenexp >= citizen_code[object_info[n1].citizenlevel + 1][9])					 
							{						 
								object_info[n1].citizenlevel ++; 
												 
								sendcitizeninfo(s,  object_info[n1].ServerID, object_info[n1].citizenlevel, 0);			 
							}	 
						}			 
					} 
					else 
					{ 
						; 
					} 
 
					info = object_info[n1]; 
		 
					sendexpinfo(object_info[n1].s, object_info[n1].exp);	 
					sendfightexpinfo(object_info[n1].s, object_info[n1].fight_exp);					 
				}			 
			} 
 
			object_info[n2].time1 = GetTickCount();	 
			object_info[n2].time2 = GetTickCount();	 
			object_info[n2].time3 = GetTickCount();		 
			object_info[n2].time4 = GetTickCount();	 
			object_info[n2].time5 = GetTickCount(); 
			object_info[n2].time6 = GetTickCount(); 
			object_info[n2].time7 = GetTickCount(); 
			object_info[n2].time8 = GetTickCount(); 
			object_info[n2].time9 = GetTickCount(); 
 
			if (!spell) 
				object_info[n1].time1 = GetTickCount();	 
			else 
				object_info[n1].time6 = GetTickCount();	 
 
			info = object_info[n2]; 
			// 死亡了 
			objectdied(s, info, 35, TRUE); 
 
			dropnovelitygame(m, n2, n1, n2); 
		} 
		else 
		{ 
//			if (!spell) 
//				attack2(s, maxkill, n1, n2, 35, TRUE); 
 
			object_info[n2].life_now = object_info[n2].life_now - attacknumber; 
		} 
 
		if (!spell) 
			object_info[n1].time1 = GetTickCount();	 
		else 
			object_info[n1].time6 = GetTickCount();	 
	} 
	else if (object_info[n2].npc == 4) 
	{ 
//		if (!spell) 
//			attack2(s, maxkill, n1, n2, 35, TRUE); 
	 
		object_info[n1].time1 = GetTickCount();	 
	} 
	else if (object_info[n2].npc == 5) 
	{ 
		// 如果在攻击矿石 
 
//		if (spell) 
//			sendspellinfo(s, code, n1, n2, 35, TRUE); 
//		else 
//			attack2(s, maxkill, n1, n2, 35, TRUE); 
 
		if (!spell) 
			object_info[n1].time1 = GetTickCount();	 
		else 
			object_info[n1].time6 = GetTickCount();	 
	} 
} 
 
/* 
	int force;           // 力量 
	int somatic;         // 体质 
	int celerity;        // 敏捷 
	int wisdom;          // 智慧 
	int intellect;       // 智力 
100级以后(包括100级)每种职业每升一级+1点属性+1点100级技能点,系统自动加上! 
100级以下每升一级+1点属性点 到100级共69点技能点,技能点分配为出生1点,1~10级每 
升1级升1点,10~80级每升2级升1点,80~100级每升1级升1点 
具体分配如下 
剑手:每升一级+4点血,2点精神,1点体力,1体质+2点体力。2点力量+1点攻击,1点体质+4点生命 
枪手:每升一级+3点血,3点精神,1点体力,1体质+2点体力。2点敏捷+1点攻击~~1点体质3点血~~回避未知~~~看不到~~5555 
拳手:每升一级+5点血,1点精神,1点体力,1体质+2点体力。3点力量1点攻击,1点体质6点生命,3点力量加2点血~~敏捷不加攻击~ 
法师:每升一级+3点血,4点精神,1点体力,1体质+2点体力。魔攻看不到~~一点体质+3点血~~~ 
以上职业3点体质+1点防!!!!!!!!!所有职业60级以后每5级都有攻击加成~16点 
每4级+10防~~~ 
 
  
 
// 技能1 
int skill_code1[4][5] = {  
	{ 0,  1,  2,  3,  4 }, 
	{ 5,  6,  7,  8,  9 }, 
	{ 10, 11, 12, 13, 14 }, 
	{ 15, 16, 17, 18, 19 } 
} ; 
// 技能2 
int skill_code2[4][3] = { 
	{ 0,  1,  2  }, 
	{ 3,  4,  5  }, 
	{ 6,  7,  8  }, 
	{ 9,  10, 11 } 
} ; 
 
*/ 
// 设置玩家状态 
void setplayer_status(int n, BOOL full) 
{ 
	// 临时数值 
	int i; 
 
	struct NOVELITY_INFO novelity_info; 
 
	object_info[n].normal_attack_time    = 1600; 
	object_info[n].spell_assistance_time = 1600; 
    object_info[n].spell_attack_time     = 1600; 
	object_info[n].life_speed            = 8000; 
	object_info[n].mental_speed          = 8000; 
	object_info[n].brawn_speed           = 8000; 
 
	if (object_info[n].job == 0)      // 拳 
	{ 
		object_info[n].life_max       = object_info[n].level * 5 + object_info[n].somatic * 6 + (object_info[n].force / 2) * 2; 
		object_info[n].mental_max     = object_info[n].level * 1 + object_info[n].intellect * 3; 
		object_info[n].brawn_max      = object_info[n].level * 1 + object_info[n].somatic * 2; 
 
		object_info[n].normalattack1  = (object_info[n].force / 3); 
		object_info[n].normalattack2  = (object_info[n].force / 3); 
		object_info[n].normaldefence  = object_info[n].somatic / 3; 
 
		object_info[n].spellattack1   = 0; 
		object_info[n].spellattack2   = 0; 
		object_info[n].spelldefence   = object_info[n].wisdom * 1; 
 
		if (object_info[n].level >= 60) 
		{ 
			object_info[n].normalattack1  = object_info[n].normalattack1 + ((object_info[n].level - 60) / 5) * 2; 
			object_info[n].normalattack2  = object_info[n].normalattack2 + ((object_info[n].level - 60) / 5) * 2; 
			object_info[n].normaldefence = object_info[n].normaldefence + ((object_info[n].level - 60) / 4) * 2; 
		} 
 
		if (object_info[n].life_now > object_info[n].life_max) object_info[n].life_now = object_info[n].life_max; 
		if (object_info[n].mental_now > object_info[n].mental_max) object_info[n].mental_now = object_info[n].mental_max; 
		if (object_info[n].brawn_now > object_info[n].brawn_max) object_info[n].brawn_now = object_info[n].brawn_max; 
		 
		for(i=0;i<10;i++) 
		{ 
			novelity_info = getNovelity_info(object_info[n].Novelity[i][2], object_info[n].Novelity[i][3]); 
 
			if (novelity_info.have) 
			{ 
				if (i == 4)		 
				{ 
					object_info[n].normalattack1 = object_info[n].normalattack1 + novelity_info.normalattack1 + (int)object_info[n].Novelity[i][15] * 16; 
					object_info[n].normalattack2 = object_info[n].normalattack2 + novelity_info.normalattack2 + (int)object_info[n].Novelity[i][15] * 16; 
				} 
 
				if ((i !=4 ) || (i != 5)) 
					object_info[n].normaldefence = object_info[n].normaldefence + novelity_info.normaldefence + (int)object_info[n].Novelity[i][15] * 4; 
			} 
		} 
 
 
	} 
	else if (object_info[n].job == 1) // 法 
	{ 
		object_info[n].life_max = object_info[n].level * 3 + object_info[n].somatic * 3 + (object_info[n].force / 2); 
		object_info[n].mental_max = object_info[n].level * 4 + object_info[n].intellect * 6; 
		object_info[n].brawn_max = object_info[n].level * 1 + object_info[n].somatic * 2; 
 
		object_info[n].normalattack1  = object_info[n].force / 3; 
		object_info[n].normalattack2  = object_info[n].force / 3; 
		object_info[n].normaldefence  = object_info[n].somatic / 3; 
 
		object_info[n].spellattack1   = 0; 
		object_info[n].spellattack2   = 0; 
		object_info[n].spelldefence   = object_info[n].wisdom; 
 
		if (object_info[n].level >= 60) 
		{ 
			object_info[n].normalattack1  = object_info[n].normalattack1 + ((object_info[n].level - 60) / 5) * 2; 
			object_info[n].normalattack2  = object_info[n].normalattack2 + ((object_info[n].level - 60) / 5) * 2; 
			object_info[n].normaldefence  = object_info[n].normaldefence + ((object_info[n].level - 60) / 4) * 1; 
		} 
 
		if (object_info[n].life_now > object_info[n].life_max) object_info[n].life_now = object_info[n].life_max; 
		if (object_info[n].mental_now > object_info[n].mental_max) object_info[n].mental_now = object_info[n].mental_max; 
		if (object_info[n].brawn_now > object_info[n].brawn_max) object_info[n].brawn_now = object_info[n].brawn_max; 
 
		for(i=0;i<10;i++) 
		{ 
			novelity_info = getNovelity_info(object_info[n].Novelity[i][2], object_info[n].Novelity[i][3]); 
 
			if (novelity_info.have) 
			{ 
				if (i == 4)	 
				{ 
					object_info[n].normalattack1 = object_info[n].normalattack1 + novelity_info.normalattack1 + (int)object_info[n].Novelity[i][15] * 4; 
					object_info[n].normalattack2 = object_info[n].normalattack2 + novelity_info.normalattack2 + (int)object_info[n].Novelity[i][15] * 4; 
					object_info[n].spellattack1 += novelity_info.normalattack1 + (int)object_info[n].Novelity[i][15] * 4; 
					object_info[n].spellattack2 += novelity_info.normalattack2 + (int)object_info[n].Novelity[i][15] * 4; 
				} 
 
				if ((i !=4 ) || (i != 5)) 
					object_info[n].normaldefence = object_info[n].normaldefence + novelity_info.normaldefence + (int)object_info[n].Novelity[i][15] * 4; 
			} 
		} 
 
		if (object_info[n].skill1[(int)skill_code1[1][3]] < 10) 
		{ 
			object_info[n].spell_assistance_time = (int)(object_info[n].spell_assistance_time  
				- object_info[n].spell_assistance_time * (0.10 + object_info[n].skill1[skill_code1[1][3]] * 0.03)); 
			object_info[n].spell_attack_time     = (int)(object_info[n].spell_attack_time  
				- object_info[n].spell_attack_time * (0.10 + object_info[n].skill1[skill_code1[1][3]] * 0.03)); 
		} 
		else 
		{ 
			object_info[n].spell_assistance_time = (int)(object_info[n].spell_assistance_time  
				- object_info[n].spell_assistance_time * (0.10 + object_info[n].skill1[skill_code1[1][3]] * 0.016)); 
			object_info[n].spell_attack_time     = (int)(object_info[n].spell_attack_time  
				- object_info[n].spell_attack_time * (0.10 + object_info[n].skill1[skill_code1[1][3]] * 0.016)); 
		} 
 
		object_info[n].mental_speed          = object_info[n].mental_speed - object_info[n].intellect * 30; 
 
	//	object_info[n].normal_attack_time    = info.skill1[skill_code1[info.job][0]]; 
 
	//	if (info) 
	//	object_info[n].spell_attack_time     =  
	//	object_info[n].spell_assistance_time =  
	} 
	else if (object_info[n].job == 2) // 剑 
	{ 
		object_info[n].life_max = object_info[n].level * 4 + object_info[n].somatic * 4 + (object_info[n].force / 2); 
		object_info[n].mental_max = object_info[n].level * 2 + object_info[n].intellect * 2; 
		object_info[n].brawn_max = object_info[n].level * 1 + object_info[n].somatic * 2; 
 
		object_info[n].normalattack1  = object_info[n].force / 2; 
		object_info[n].normalattack2  = object_info[n].force / 2; 
		object_info[n].normaldefence  = object_info[n].somatic / 2; 
 
		object_info[n].spellattack1   = 0; 
		object_info[n].spellattack2   = 0; 
		object_info[n].spelldefence   = object_info[n].wisdom * 1; 
 
		if (object_info[n].level >= 60) 
		{ 
			object_info[n].normalattack1  = object_info[n].normalattack1 + ((object_info[n].level - 60) / 5) * 2; 
			object_info[n].normalattack2  = object_info[n].normalattack2 + ((object_info[n].level - 60) / 5) * 2; 
			object_info[n].normaldefence = object_info[n].normaldefence + ((object_info[n].level - 60) / 4) * 1; 
		} 
 
		if (object_info[n].life_now > object_info[n].life_max) object_info[n].life_now = object_info[n].life_max; 
		if (object_info[n].mental_now > object_info[n].mental_max) object_info[n].mental_now = object_info[n].mental_max; 
		if (object_info[n].brawn_now > object_info[n].brawn_max) object_info[n].brawn_now = object_info[n].brawn_max; 
 
		for(i=0;i<10;i++) 
		{ 
			novelity_info = getNovelity_info(object_info[n].Novelity[i][2], object_info[n].Novelity[i][3]); 
 
			if (novelity_info.have) 
			{ 
				if (i == 4)		 
				{ 
					object_info[n].normalattack1 = object_info[n].normalattack1 + novelity_info.normalattack1 + (int)object_info[n].Novelity[i][15] * 16; 
					object_info[n].normalattack2 = object_info[n].normalattack2 + novelity_info.normalattack2 + (int)object_info[n].Novelity[i][15] * 16; 
				} 
 
				if ((i !=4 ) || (i != 5)) 
					object_info[n].normaldefence = object_info[n].normaldefence + novelity_info.normaldefence + (int)object_info[n].Novelity[i][15] * 4; 
			} 
		} 
 
		// 命中攻击 
		object_info[n].normalattack1 += (object_info[n].skill1[skill_code1[2][0]] * 2 + 5); 
	} 
	else if (object_info[n].job == 3) // 枪 
	{ 
		object_info[n].life_max = object_info[n].level * 3 + object_info[n].somatic * 3 + (object_info[n].force / 2); 
		object_info[n].mental_max = object_info[n].level * 3 + object_info[n].intellect * 2; 
		object_info[n].brawn_max = object_info[n].level * 1 + object_info[n].somatic * 2; 
 
		object_info[n].normalattack1  = object_info[n].celerity / 2; 
		object_info[n].normalattack2  = object_info[n].celerity / 2; 
		object_info[n].normaldefence  = object_info[n].somatic / 2; 
 
		object_info[n].spellattack1   = 0; 
		object_info[n].spellattack2   = 0; 
		object_info[n].spelldefence   = object_info[n].wisdom * 2; 
 
		if (object_info[n].level >= 60) 
		{ 
			object_info[n].normalattack1  = object_info[n].normalattack1 + ((object_info[n].level - 60) / 5) * 2; 
			object_info[n].normalattack2  = object_info[n].normalattack2 + ((object_info[n].level - 60) / 5) * 2; 
			object_info[n].normaldefence  = object_info[n].normaldefence + ((object_info[n].level - 60) / 4) * 1; 
		} 
 
		if (object_info[n].life_now > object_info[n].life_max) object_info[n].life_now = object_info[n].life_max; 
		if (object_info[n].mental_now > object_info[n].mental_max) object_info[n].mental_now = object_info[n].mental_max; 
		if (object_info[n].brawn_now > object_info[n].brawn_max) object_info[n].brawn_now = object_info[n].brawn_max; 
 
		for(i=0;i<10;i++) 
		{ 
			novelity_info = getNovelity_info(object_info[n].Novelity[i][2], object_info[n].Novelity[i][3]); 
 
			if (novelity_info.have) 
			{ 
				if (i == 4)	 
				{ 
					object_info[n].normalattack1 = object_info[n].normalattack1 + novelity_info.normalattack1 + (int)object_info[n].Novelity[i][15] * 16; 
					object_info[n].normalattack2 = object_info[n].normalattack2 + novelity_info.normalattack2 + (int)object_info[n].Novelity[i][15] * 16; 
				} 
 
				if ((i !=4 ) || (i != 5)) 
					object_info[n].normaldefence = object_info[n].normaldefence + novelity_info.normaldefence + (int)object_info[n].Novelity[i][15] * 4; 
			} 
		} 
	} 
 
	if (full) 
	{ 
		object_info[n].life_now   = object_info[n].life_max; 
		object_info[n].mental_now = object_info[n].mental_max; 
		object_info[n].brawn_now  = object_info[n].brawn_max; 
	} 
 
	if (object_info[n].life_now < 0) object_info[n].life_now = object_info[n].life_max; 
	if (object_info[n].life_now < 0) object_info[n].brawn_now = object_info[n].brawn_max; 
	if (object_info[n].life_now < 0) object_info[n].mental_now = object_info[n].mental_max; 
 
	amountinfo(object_info[n].s, object_info[n]); 
}