卡片召唤师
精华
|
战斗力 鹅
|
回帖 0
注册时间 2016-12-26
|
本帖最后由 yksoft1 于 2021-4-6 11:18 编辑
typedef struct tagALLEXPERIENCE
{
EXPERIENCE rgPrimaryExp[MAX_PLAYER_ROLES];
EXPERIENCE rgHealthExp[MAX_PLAYER_ROLES];
EXPERIENCE rgMagicExp[MAX_PLAYER_ROLES];
EXPERIENCE rgAttackExp[MAX_PLAYER_ROLES];
EXPERIENCE rgMagicPowerExp[MAX_PLAYER_ROLES];
EXPERIENCE rgDefenseExp[MAX_PLAYER_ROLES];
EXPERIENCE rgDexterityExp[MAX_PLAYER_ROLES];
EXPERIENCE rgFleeExp[MAX_PLAYER_ROLES];
} ALLEXPERIENCE, *LPALLEXPERIENCE;- //
- // Increasing of other hidden levels
- //
- iTotalCount = 0;
- iTotalCount += gpGlobals->Exp.rgAttackExp[w].wCount;
- iTotalCount += gpGlobals->Exp.rgDefenseExp[w].wCount;
- iTotalCount += gpGlobals->Exp.rgDexterityExp[w].wCount;
- iTotalCount += gpGlobals->Exp.rgFleeExp[w].wCount;
- iTotalCount += gpGlobals->Exp.rgHealthExp[w].wCount;
- iTotalCount += gpGlobals->Exp.rgMagicExp[w].wCount;
- iTotalCount += gpGlobals->Exp.rgMagicPowerExp[w].wCount;
- if (iTotalCount > 0)
- {
- #define CHECK_HIDDEN_EXP(expname, statname, label) \
- { \
- dwExp = g_Battle.iExpGained; \
- dwExp *= gpGlobals->Exp.expname[w].wCount; \
- dwExp /= iTotalCount; \
- dwExp *= 2; \
- \
- dwExp += gpGlobals->Exp.expname[w].wExp; \
- \
- if (gpGlobals->Exp.expname[w].wLevel > MAX_LEVELS) \
- { \
- gpGlobals->Exp.expname[w].wLevel = MAX_LEVELS; \
- } \
- \
- while (dwExp >= gpGlobals->g.rgLevelUpExp[gpGlobals->Exp.expname[w].wLevel]) \
- { \
- dwExp -= gpGlobals->g.rgLevelUpExp[gpGlobals->Exp.expname[w].wLevel]; \
- gpGlobals->g.PlayerRoles.statname[w] += RandomLong(1, 2); \
- if (gpGlobals->Exp.expname[w].wLevel < MAX_LEVELS) \
- { \
- gpGlobals->Exp.expname[w].wLevel++; \
- } \
- } \
- \
- gpGlobals->Exp.expname[w].wExp = (WORD)dwExp; \
- \
- if (gpGlobals->g.PlayerRoles.statname[w] != OrigPlayerRoles.statname[w]) \
- { \
- WCHAR buffer[256] = L""; \
- PAL_swprintf(buffer, sizeof(buffer) / sizeof(WCHAR), L"%ls%ls%ls", PAL_GetWord(gpGlobals->g.PlayerRoles.rgwName[w]), PAL_GetWord(label), PAL_GetWord(BATTLEWIN_LEVELUP_LABEL)); \
- PAL_CreateSingleLineBox(PAL_XY(offsetX+78, 60), maxNameWidth+maxPropertyWidth+PAL_TextWidth(PAL_GetWord(BATTLEWIN_LEVELUP_LABEL))/32+4, FALSE); \
- PAL_DrawText(buffer, PAL_XY(offsetX+90, 70), 0, FALSE, FALSE, FALSE); \
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.statname[w] - OrigPlayerRoles.statname[w], 5, PAL_XY(183+(maxNameWidth+maxPropertyWidth-3)*8, 74), kNumColorYellow, kNumAlignRight); \
- VIDEO_UpdateScreen(&rect); \
- PAL_WaitForKey(3000); \
- } \
- }
- CHECK_HIDDEN_EXP(rgHealthExp, rgwMaxHP, STATUS_LABEL_HP);
- CHECK_HIDDEN_EXP(rgMagicExp, rgwMaxMP, STATUS_LABEL_MP);
- CHECK_HIDDEN_EXP(rgAttackExp, rgwAttackStrength, STATUS_LABEL_ATTACKPOWER);
- CHECK_HIDDEN_EXP(rgMagicPowerExp, rgwMagicStrength, STATUS_LABEL_MAGICPOWER);
- CHECK_HIDDEN_EXP(rgDefenseExp, rgwDefense, STATUS_LABEL_RESISTANCE);
- CHECK_HIDDEN_EXP(rgDexterityExp, rgwDexterity, STATUS_LABEL_DEXTERITY);
- CHECK_HIDDEN_EXP(rgFleeExp, rgwFleeRate, STATUS_LABEL_FLEERATE);
- #undef CHECK_HIDDEN_EXP
复制代码
每一项属性都有相应的经验值,会累积升级,升级时相应的属性增加1~2点。有点类似口袋妖怪的努力值,不过后者是全隐藏的,仙剑的属性升级还会有提示。
|
|