• PUDN用户
    了解作者
  • Visual C++
    开发工具
  • 1.3MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 24
    下载次数
  • 2010-04-14 16:59
    上传日期
一款完整的游戏源代码,大家可以学习学习!
StoneAge.rar
  • 石器时代
  • saac
  • wk
  • vssver.scc
    176B
  • makefile
    179B
  • TCPIP.h
    244B
  • version.h
    532B
  • wk.c
    19.2KB
  • TCPIP.c
    3.7KB
  • tools.c
    5.6KB
  • error.c
    1.2KB
  • tools.h
    1KB
  • error.h
    435B
  • auction.c
    2.2KB
  • vssver.scc
    720B
  • char.c
    31.9KB
  • saacproto_serv.c
    107.5KB
  • SAAC.dsp
    6.8KB
  • db.h
    772B
  • saacproto_oac.c
    9.7KB
  • saacproto_work.h
    751B
  • saacproto_lserver.h
    2.6KB
  • lock.c
    9.7KB
  • saacproto_lserver.c
    17.5KB
  • acfamily.c
    130KB
  • tcpip_util.h
    1.2KB
  • deathcontend.c
    32.1KB
  • makefile
    16.6KB
  • defend.c
    11.6KB
  • chatroom.c
    14.5KB
  • version.h
    5.8KB
  • SAAC.vcproj
    15.5KB
  • saacproto_serv.h
    20.9KB
  • recv.c
    89.5KB
  • char.h
    3.2KB
  • saacproto_util.c
    46.4KB
  • chatroom.h
    1.4KB
  • SAAC.plg
    6.4KB
  • util.c
    8.8KB
  • saacproto_work.c
    6.1KB
  • mail.h
    411B
  • recv.h
    3.7KB
  • lock.h
    1.7KB
  • util.h
    841B
  • deathcontend.h
    2.2KB
  • auction.h
    654B
  • mail.c
    18KB
  • sasql.c
    12.7KB
  • main.c
    55.2KB
  • defend.h
    1.3KB
  • saacproto_oac.h
    1.3KB
  • sasql.h
    662B
  • tcpip_util.c
    12.6KB
  • mssccprj.scc
    136B
  • saacproto_util.h
    5.3KB
  • main.h
    4.6KB
  • db.c
    41.2KB
  • acfamily.h
    8.4KB
  • gmsv
  • char
  • vssver.scc
    464B
  • char_party.c
    20.1KB
  • char.c
    261.9KB
  • title.c
    29.9KB
  • encount.c
    19.7KB
  • defaultGroundEnemy.h
    4.5KB
  • deathcontend.c
    59.3KB
  • family.c
    94KB
  • defend.c
    520B
  • chatroom.c
    31.4KB
  • enemy.c
    79KB
  • char_data.c
    56.6KB
  • pet_event.c
    27.5KB
  • defaultPlayer.h
    11.1KB
  • char_talk.c
    41.1KB
  • char_angel.c
    21.5KB
  • Makefile
    40.8KB
  • char_item.c
    73.5KB
  • skill.c
    19.7KB
  • char_walk.c
    43.6KB
  • chatmagic.c
    148.9KB
  • pet.c
    20.6KB
  • petmail.c
    35.6KB
  • char_event.c
    18.6KB
  • addressbook.c
    26.2KB
  • char_base.c
    111.2KB
  • event.c
    2.8KB
  • trade.c
    62.8KB
  • battle
  • vssver.scc
    176B
  • profession_skill.c
    39.4KB
  • battle_item.c
    30.8KB
  • battle_command.c
    31.8KB
  • battle_ai.c
    17.3KB
  • Makefile
    14.5KB
  • battle.c
    279KB
  • battle_event.c
    298.7KB
  • pet_skill.c
    74.3KB
  • battle_magic.c
    166.2KB
  • item
内容介绍
#include "version.h" #include <string.h> #include <math.h> #include "char.h" #include "char_event.h" #include "battle.h" #include "battle_event.h" #include "configfile.h" #include "pet.h" #include "log.h" #include "lssproto_serv.h" #include "anim_tbl.h" #include "battle_magic.h" #include "util.h" #include "enemy.h" #include "pet_skill.h" #include "char_base.h" #include "item_event.h" #ifdef _PROFESSION_SKILL // WON ADD 人物職業技能 #include "profession_skill.h" #include "item.h" #include "skill.h" #endif #ifdef _PETSKILL_LER #include "magic_base.h" #endif #define DEFENSE_RATE (0.5) #define DAMAGE_RATE (2.0) #define CRITICAL_RATE (1.0) #define KAWASHI_MAX_RATE (75) #define AJ_SAME (1.0) #define AJ_UP (1.5) #define AJ_DOWN (0.6) #define ATTR_MAX 100 #define D_ATTR (1.0/(ATTR_MAX*ATTR_MAX)) #define D_16 (1.0/16) #define D_8 (1.0/8) float gKawashiPara = 0.02; float gCounterPara = 0.08; float gCriticalPara = 0.09; float gBattleDamageModyfy; int gBattleDuckModyfy; int gBattleStausChange; int gBattleStausTurn; float gDuckPer; int gCriper; int gBattleBadStatusTbl[BATTLE_ENTRY_MAX*2]; #ifdef _OTHER_MAGICSTAUTS #ifdef _MAGICSTAUTS_RESIST char MagicStatus[MAXSTATUSTYPE][36] = { "NULL","魔抗","鐵壁","火抗","電抗","冰抗"}; int MagicTbl[] = { -1, CHAR_DEFMAGICSTATUS, CHAR_MAGICSUPERWALL, CHAR_MAGICFIRE, CHAR_MAGICTHUNDER, CHAR_MAGICICE }; #else char MagicStatus[MAXSTATUSTYPE][36] = { "NULL","魔抗","鐵壁"}; int MagicTbl[] = { -1, CHAR_DEFMAGICSTATUS, CHAR_MAGICSUPERWALL }; #endif //_MAGICSTAUTS_RESIST #endif char *aszStatus[] = { "全", "毒", "麻", "眠", "石", "醉", "亂", "虛", "劇", "障", "默" #ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 ,"煞" #endif #ifdef _PROFESSION_SKILL // WON ADD 人物職業技能 ,"暈","纏","羅","爆","忘","箭","蠱","針","挑","燒","霜","電","專","火","冰","雷","炎","凍","擊" #endif #ifdef _PROFESSION_ADDSKILL ,"抗" #endif }; char *aszStatusFull[] = { "全快", "毒", "麻痺", "睡眠", "石化", "酒醉", "混亂", "虛弱", "劇毒", "魔障", "沉默" #ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 ,"毒煞" #endif #ifdef _PROFESSION_SKILL // WON ADD 人物職業技能 ,"暈眩","纏繞","天羅","冰爆","遺忘","冰箭","嗜血蠱","一針見血","挑撥","火附體", "冰附體","雷附體","專注戰鬥","火抗","冰抗","雷抗","火附","冰附","雷附" #endif }; int StatusTbl[] = { -1, CHAR_WORKPOISON, CHAR_WORKPARALYSIS, CHAR_WORKSLEEP, CHAR_WORKSTONE, CHAR_WORKDRUNK, CHAR_WORKCONFUSION, CHAR_WORKWEAKEN, CHAR_WORKDEEPPOISON, CHAR_WORKBARRIER, CHAR_WORKNOCAST #ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 ,CHAR_WORKSARS #endif #ifdef _PROFESSION_SKILL // WON ADD 人物職業技能 ,CHAR_WORKDIZZY, CHAR_WORKENTWINE ,CHAR_WORKDRAGNET, CHAR_WORKICECRACK ,CHAR_WORKOBLIVION, CHAR_WORKICEARROW ,CHAR_WORKBLOODWORMS, CHAR_WORKSIGN ,CHAR_WORKINSTIGATE, CHAR_WORK_F_ENCLOSE ,CHAR_WORK_I_ENCLOSE, CHAR_WORK_T_ENCLOSE ,CHAR_WORK_FOCUS, CHAR_WORKRESIST_F ,CHAR_WORKRESIST_I, CHAR_WORKRESIST_T ,CHAR_WORK_F_ENCLOSE_2, CHAR_WORK_I_ENCLOSE_2 ,CHAR_WORK_T_ENCLOSE_2 #endif #ifdef _PROFESSION_ADDSKILL ,CHAR_WORKERSIST_F_I_T, CHAR_WORKWATER//水附體 ,CHAR_WORKANNEX//附身 ,CHAR_WORKFEAR//恐懼 ,CHAR_WORKICECRACK2 ,CHAR_WORKICECRACK3 ,CHAR_WORKICECRACK4 ,CHAR_WORKICECRACK5 ,CHAR_WORKICECRACK6 ,CHAR_WORKICECRACK7 ,CHAR_WORKICECRACK8 ,CHAR_WORKICECRACK9 ,CHAR_WORKICECRACK10 #endif }; int RegTbl[] = { -1, CHAR_WORKMODPOISON, CHAR_WORKMODPARALYSIS, CHAR_WORKMODSLEEP, CHAR_WORKMODSTONE, CHAR_WORKMODDRUNK, CHAR_WORKMODCONFUSION, CHAR_WORKMODWEAKEN, CHAR_WORKMODDEEPPOISON, CHAR_WORKMODBARRIER, CHAR_WORKMODNOCAST #ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 ,CHAR_WORKMODSARS #endif #ifdef _PROFESSION_SKILL // WON ADD 人物職業技能 ,CHAR_WORKMODDIZZY, CHAR_WORKMODENTWINE ,CHAR_WORKMODDRAGNET, CHAR_WORKMODICECRACK ,CHAR_WORKMODOBLIVION, CHAR_WORKMODICEARROW ,CHAR_WORKMODBLOODWORMS, CHAR_WORKMODSIGN ,CHAR_WORKMODINSTIGATE, CHAR_WORKMOD_F_ENCLOSE ,CHAR_WORKMOD_I_ENCLOSE, CHAR_WORKMOD_T_ENCLOSE ,CHAR_WORKMOD_FOCUS, CHAR_WORKMODRESIST_F ,CHAR_WORKMODRESIST_I, CHAR_WORKMODRESIST_T ,CHAR_WORKMOD_F_ENCLOSE_2, CHAR_WORKMOD_I_ENCLOSE_2 ,CHAR_WORKMOD_T_ENCLOSE_2 #endif }; char *aszMagicDef[] = { "常", "吸", "反", "無" #ifdef _PROFESSION_SKILL // WON ADD 人物職業技能 ,"陷" #endif #ifdef _PETSKILL_ACUPUNCTURE ,"刺" #endif }; char *aszMagicDefFull[] = { "通常", "吸收", "反射", "無效化" #ifdef _PROFESSION_SKILL // WON ADD 人物職業技能 ,"陷阱" #endif #ifdef _PETSKILL_ACUPUNCTURE ,"針刺" #endif }; int MagicDefTbl[] = { -1, CHAR_WORKDAMAGEABSROB, CHAR_WORKDAMAGEREFLEC, CHAR_WORKDAMAGEVANISH #ifdef _PROFESSION_SKILL // WON ADD 人物職業技能 ,CHAR_WORKTRAP #endif #ifdef _PETSKILL_ACUPUNCTURE ,CHAR_WORKACUPUNCTURE #endif }; char *aszParamChange[] = { "無", "攻", "防", "早", "魅", "捕" }; char *aszParamChangeFull[] = { "無", "攻擊力", "防禦力", "速度", "魅力", "捕獲率" }; int aParamChangeTbl[] = { -1, CHAR_WORKMODATTACK, CHAR_WORKMODDEFENCE, CHAR_WORKMODQUICK, CHAR_WORKMODCHARM, CHAR_WORKMODCAPTURE }; // Robin 0727 Ride Pet // 取得騎寵的index int BATTLE_getRidePet( int charaindex ) { int petindex = -1; if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) return -1; else { int rideIndex = CHAR_getInt( charaindex, CHAR_RIDEPET ); if( rideIndex == -1 ) return -1; petindex = CHAR_getCharPet( charaindex, rideIndex ); if( !CHAR_CHECKINDEX( petindex ) ) return -1; } return petindex; } #ifdef _BACK_VERSION // 復刻版騎寵公式修改 // Robin 0727 Ride Pet // 取得騎寵時的三圍 復刻版 float BATTLE_adjustRidePet3A( int charaindex, int petindex, int workindex, int action ) { float ret = CHAR_getWorkInt( charaindex, workindex ); BOOL throwweapon = BATTLE_IsThrowWepon(CHAR_getItemIndex( charaindex, CHAR_ARM ) ); switch( workindex ) { case CHAR_WORKATTACKPOWER : // 攻擊力 if( throwweapon ) // 投擲 ret = CHAR_getWorkInt( charaindex, CHAR_WORKATTACKPOWER );//間接攻擊:人物 else // 近戰 ret = CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER );//直接攻擊:寵物 break; case CHAR_WORKDEFENCEPOWER : // 防禦力 ret = ( CHAR_getWorkInt( charaindex, CHAR_WORKDEFENCEPOWER ) + CHAR_getWorkInt( petindex, CHAR_WORKDEFENCEPOWER ) ) / 2; break; case CHAR_WORKQUICK : // 敏捷力 if( action == ATTACKSIDE ) { if( throwweapon ) { ret = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK ); }else { ret = CHAR_getWorkInt( petindex, CHAR_WORKQUICK ); } }else if( action == DEFFENCESIDE ){ ret = CHAR_getWorkInt( petindex, CHAR_WORKQUICK ); } break; default : ret = CHAR_getWorkInt( charaindex, workindex ); } //print(" adj3A_Old:%d:%d=%f ", charaindex, workindex, ret); return ret; } #else // 取得騎寵時的三圍 正常版 float BATTLE_adjustRidePet3A( int charaindex, int petindex, int workindex, int action ) { float ret = CHAR_getWorkInt( charaindex, workindex ); BOOL throwweapon = BATTLE_IsThrowWepon(CHAR_getItemIndex( charaindex, CHAR_ARM ) ); switch( workindex ) { case CHAR_WORKATTACKPOWER : // 攻擊力 if( throwweapon ) // 投擲 ret = CHAR_getWorkInt( charaindex, CHAR_WORKATTACKPOWER ) #ifdef _BATTLE_NEWPOWER //andy 1/24 reEdit + CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER )*0.4; #else + CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER )*0.2; #endif else // 近戰 ret = CHAR_getWorkInt( charaindex, CHAR_WORKATTACKPOWER )*0.8 + CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER )*0.8; break;
评论
    相关推荐