server: AVA2 conqueror level (ENABLE_CONQUEROR_LEVEL)

- Conqueror level/exp/step/points and the four sungma stats on the player
  (db load/save, simple player, actor add/update packets), POINT_CONQUEROR_*.
- Conqueror maps 129-132 give conqueror exp instead of exp; per-map sungma
  requirements from map/<name>/sungma_attr.txt, sent as GC_SUNGMA_ATTR_UPDATE,
  with the AVA2 damage/defence penalties when below them.
- /conqueror_stat, pc.set_conqueror_level / pc.get_conqueror_level, 9th skills
  176-183 (+ Cheonun affects); DAMAGE_BLOCK is spelled (1 << 3) in char_battle.
- tools/conqueror: schema, skill_proto rows, sungma_attr maps, the
  conqueror_unlock quest (lv 120 login/levelup) and install.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-24 20:06:32 +09:00
co-authored by Claude Opus 5.5
parent 794ac41a41
commit 31ebae050b
33 changed files with 968 additions and 11 deletions
+19
View File
@@ -49,6 +49,9 @@ enum EMisc
PLAYER_EXP_TABLE_MAX = 120,
PLAYER_MAX_LEVEL_CONST = 120,
#ifdef ENABLE_CONQUEROR_LEVEL
PLAYER_MAX_CONQUEROR_LEVEL_CONST = 30,
#endif
GUILD_MAX_LEVEL = 20,
MOB_MAX_LEVEL = 100,
@@ -334,6 +337,16 @@ enum ECharacterPosition
POSITION_MAX_NUM
};
#ifdef ENABLE_CONQUEROR_LEVEL
enum EConquerorMap
{
EASTPLAIN_01 = 129,
EASTPLAIN_02 = 130,
EASTPLAIN_03 = 131,
EMPIRECASTLE = 132,
};
#endif
enum EGMLevels
{
GM_PLAYER,
@@ -498,6 +511,12 @@ enum EApplyTypes
// AVA2 ELEMENT_NEW_BONUSES: attack bonus % against monsters of the element (RACE_FLAG_ATT_*), on the talismans.
APPLY_RESIST_MAGIC_REDUCTION = 98, // AVA2 ENABLE_MAGIC_REDUCTION_SYSTEM.
APPLY_RESIST_HUMAN = 99, // AVA2 growing-pet skill 17.
#ifdef ENABLE_CONQUEROR_LEVEL
APPLY_SUNGMA_STR = 119,
APPLY_SUNGMA_HP = 120,
APPLY_SUNGMA_MOVE = 121,
APPLY_SUNGMA_INMUNE = 122,
#endif
APPLY_ENCHANT_ELEC = 123,
APPLY_ENCHANT_FIRE = 124,
APPLY_ENCHANT_ICE = 125,
+1
View File
@@ -16,6 +16,7 @@
#define USE_MOB_BLEEDING_AS_POISON
#define USE_MOB_CLAW_AS_DAGGER
#endif
#define ENABLE_CONQUEROR_LEVEL
#define UNLOCK_INVENTORY_WORLDARD
#define ENABLE_OFFLINESHOP_SYSTEM
#ifdef ENABLE_OFFLINESHOP_SYSTEM
+11
View File
@@ -367,6 +367,10 @@ typedef struct SSimplePlayer
long lAddr;
WORD wPort;
BYTE skill_group;
#ifdef ENABLE_CONQUEROR_LEVEL
BYTE byConquerorLevel;
BYTE bySungmaST, bySungmaHP, bySungmaMove, bySungmaInmune;
#endif
} TSimplePlayer;
typedef struct SAccountTable
@@ -494,6 +498,13 @@ typedef struct SPlayerTable
DWORD logoff_interval;
int aiPremiumTimes[PREMIUM_MAX_NUM];
#ifdef ENABLE_CONQUEROR_LEVEL
BYTE conquerorlevel;
BYTE conqueror_level_step;
short sungma_str, sungma_hp, sungma_move, sungma_inmune;
DWORD conqueror_exp;
short conqueror_point;
#endif
#ifdef UNLOCK_INVENTORY_WORLDARD
DWORD inventory_unlock[UNLOCK_INVENTORY_MAX];
+19 -4
View File
@@ -211,13 +211,13 @@ void CClientManager::RESULT_LOGIN_BY_KEY(CPeer * peer, SQLMsg * msg)
if (g_stLocale == "gb2312")
{
snprintf(szQuery, sizeof(szQuery),
"SELECT id, name, job, level, alignment, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",
"SELECT id, name, job, level, alignment, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name, conquerorlevel, sungma_str, sungma_hp, sungma_move, sungma_inmune FROM player%s WHERE account_id=%u",
GetTablePostfix(), info->pAccountTable->id);
}
else
{
snprintf(szQuery, sizeof(szQuery),
"SELECT id, name, job, level, playtime, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",
"SELECT id, name, job, level, playtime, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name, conquerorlevel, sungma_str, sungma_hp, sungma_move, sungma_inmune FROM player%s WHERE account_id=%u",
GetTablePostfix(), info->pAccountTable->id);
}
@@ -313,6 +313,11 @@ void CreateAccountPlayerDataFromRes(MYSQL_RES * pRes, TAccountTable * pkTab)
pkTab->players[j].y = pt->y;
pkTab->players[j].skill_group = pt->skill_group;
pkTab->players[j].bChangeName = 0;
pkTab->players[j].byConquerorLevel = pt->conquerorlevel;
pkTab->players[j].bySungmaST = pt->sungma_str;
pkTab->players[j].bySungmaHP = pt->sungma_hp;
pkTab->players[j].bySungmaMove = pt->sungma_move;
pkTab->players[j].bySungmaInmune = pt->sungma_inmune;
}
else
{
@@ -334,6 +339,11 @@ void CreateAccountPlayerDataFromRes(MYSQL_RES * pRes, TAccountTable * pkTab)
pkTab->players[j].y = 0;
pkTab->players[j].skill_group = 0;
pkTab->players[j].bChangeName = 0;
pkTab->players[j].byConquerorLevel = 0;
pkTab->players[j].bySungmaST = 0;
pkTab->players[j].bySungmaHP = 0;
pkTab->players[j].bySungmaMove = 0;
pkTab->players[j].bySungmaInmune = 0;
str_to_number(pkTab->players[j].byJob, row[col++]);
str_to_number(pkTab->players[j].byLevel, row[col++]);
@@ -348,6 +358,11 @@ void CreateAccountPlayerDataFromRes(MYSQL_RES * pRes, TAccountTable * pkTab)
str_to_number(pkTab->players[j].y, row[col++]);
str_to_number(pkTab->players[j].skill_group, row[col++]);
str_to_number(pkTab->players[j].bChangeName, row[col++]);
str_to_number(pkTab->players[j].byConquerorLevel, row[col++]);
str_to_number(pkTab->players[j].bySungmaST, row[col++]);
str_to_number(pkTab->players[j].bySungmaHP, row[col++]);
str_to_number(pkTab->players[j].bySungmaMove, row[col++]);
str_to_number(pkTab->players[j].bySungmaInmune, row[col++]);
}
sys_log(0, "%s %lu %lu hair %u",
@@ -399,13 +414,13 @@ void CClientManager::RESULT_LOGIN(CPeer * peer, SQLMsg * msg)
if (g_stLocale == "gb2312")
{
snprintf(queryStr, sizeof(queryStr),
"SELECT id, name, job, level, alignment, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",
"SELECT id, name, job, level, alignment, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name, conquerorlevel, sungma_str, sungma_hp, sungma_move, sungma_inmune FROM player%s WHERE account_id=%u",
GetTablePostfix(), info->pAccountTable->id);
}
else
{
snprintf(queryStr, sizeof(queryStr),
"SELECT id, name, job, level, playtime, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",
"SELECT id, name, job, level, playtime, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name, conquerorlevel, sungma_str, sungma_hp, sungma_move, sungma_inmune FROM player%s WHERE account_id=%u",
GetTablePostfix(), info->pAccountTable->id);
}
+25 -1
View File
@@ -133,6 +133,14 @@ size_t CreatePlayerSaveQuery(char * pszQuery, size_t querySize, TPlayerTable * p
"last_play = NOW(), "
"skill_group = %d, "
"alignment = %ld, "
"conquerorlevel = %d, "
"conqueror_level_step = %d, "
"sungma_str = %d, "
"sungma_hp = %d, "
"sungma_move = %d, "
"sungma_inmune = %d, "
"conqueror_exp = %u, "
"conqueror_point = %d, "
"horse_level = %d, "
"horse_riding = %d, "
"horse_hp = %d, "
@@ -180,6 +188,14 @@ size_t CreatePlayerSaveQuery(char * pszQuery, size_t querySize, TPlayerTable * p
pkTab->parts[PART_HAIR],
pkTab->skill_group,
pkTab->lAlignment,
pkTab->conquerorlevel,
pkTab->conqueror_level_step,
pkTab->sungma_str,
pkTab->sungma_hp,
pkTab->sungma_move,
pkTab->sungma_inmune,
pkTab->conqueror_exp,
pkTab->conqueror_point,
pkTab->horse.bLevel,
pkTab->horse.bRiding,
pkTab->horse.sHealth,
@@ -415,7 +431,7 @@ void CClientManager::QUERY_PLAYER_LOAD(CPeer * peer, DWORD dwHandle, TPlayerLoad
"id,name,job,voice,dir,x,y,z,map_index,exit_x,exit_y,exit_map_index,hp,mp,stamina,random_hp,random_sp,playtime,"
"gold,level,level_step,st,ht,dx,iq,exp,"
"stat_point,skill_point,sub_skill_point,stat_reset_count,part_base,part_hair,"
"skill_level,quickslot,skill_group,alignment,mobile,horse_level,horse_riding,horse_hp,horse_hp_droptime,horse_stamina,"
"skill_level,quickslot,skill_group,alignment,conquerorlevel,conqueror_level_step,sungma_str,sungma_hp,sungma_move,sungma_inmune,conqueror_exp,conqueror_point,mobile,horse_level,horse_riding,horse_hp,horse_hp_droptime,horse_stamina,"
"UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(last_play),horse_skill_point"
#ifdef UNLOCK_INVENTORY_WORLDARD
",inventory_0,inventory_1,inventory_2,inventory_3,inventory_4,inventory_5"
@@ -570,6 +586,14 @@ bool CreatePlayerTableFromRes(MYSQL_RES * res, TPlayerTable * pkTab)
str_to_number(pkTab->skill_group, row[col++]);
str_to_number(pkTab->lAlignment, row[col++]);
str_to_number(pkTab->conquerorlevel, row[col++]);
str_to_number(pkTab->conqueror_level_step, row[col++]);
str_to_number(pkTab->sungma_str, row[col++]);
str_to_number(pkTab->sungma_hp, row[col++]);
str_to_number(pkTab->sungma_move, row[col++]);
str_to_number(pkTab->sungma_inmune, row[col++]);
str_to_number(pkTab->conqueror_exp, row[col++]);
str_to_number(pkTab->conqueror_point, row[col++]);
if (row[col])
{
+11
View File
@@ -113,6 +113,13 @@ enum EAffectTypes
AFFECT_NOG_ABILITY = 302,
AFFECT_HOLLY_STONE_POWER = 303,
#ifdef ENABLE_CONQUEROR_LEVEL
AFFECT_SUNGMA_STR = 907,
AFFECT_SUNGMA_HP = 908,
AFFECT_SUNGMA_MOVE = 909,
AFFECT_SUNGMA_INMUNE = 910,
#endif
AFFECT_QUEST_START_IDX = 1000
};
@@ -174,6 +181,10 @@ enum EAffectBits
AFF_RED_POSSESSION, // 44
AFF_BLUE_POSSESSION, // 45
#endif
#ifdef ENABLE_CONQUEROR_LEVEL
AFF_CHEONUN = 46, // skill_proto setAffectFlag enum index 46
AFF_CHUNWOON_MOOJUK = 47,
#endif
AFF_BITS_MAX
};
+9
View File
@@ -21,6 +21,9 @@
#include "sectree.h"
#include "ani.h"
#include "locale_service.h"
#ifdef ENABLE_CONQUEROR_LEVEL
#include "sectree_manager.h"
#endif
int battle_hit(LPCHARACTER ch, LPCHARACTER victim, int & iRetDam);
@@ -101,6 +104,12 @@ bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim)
if (CArenaManager::instance().CanAttack(ch, victim) == true)
return true;
#ifdef ENABLE_CONQUEROR_LEVEL
// conqueror maps: a player without a conqueror level cannot fight the monsters there
if (ch->IsPC() && !victim->IsPC() && ch->IsConquerorMap(ch->GetMapIndex()) && ch->GetConquerorLevel() == 0)
return false;
#endif
return CPVPManager::instance().CanAttack(ch, victim);
}
+265
View File
@@ -4,6 +4,7 @@
#include "../../common/VnumHelper.h"
#include "char.h"
#include "sectree_manager.h"
#include "port_gaya.h"
#include "port_cube_actor.h"
#include "../../common/cube_mutation.h"
@@ -151,6 +152,9 @@ void CHARACTER::Initialize()
m_bOpeningSafebox = false;
m_fSyncTime = get_float_time()-3;
#ifdef ENABLE_CONQUEROR_LEVEL
m_pkCheonunEvent = NULL;
#endif
m_dwPlayerID = 0;
m_dwKillerPID = 0;
@@ -555,6 +559,9 @@ void CHARACTER::Destroy()
m_set_pkChrSpawnedBy.clear();
StopMuyeongEvent();
#ifdef ENABLE_CONQUEROR_LEVEL
StopCheonunEvent();
#endif
event_cancel(&m_pkWarpNPCEvent);
event_cancel(&m_pkRecoveryEvent);
event_cancel(&m_pkDeadEvent);
@@ -969,6 +976,9 @@ void CHARACTER::EncodeInsertPacket(LPENTITY entity)
{
addPacket.dwLevel = 0;
}
#ifdef ENABLE_CONQUEROR_LEVEL
addPacket.dwConquerorLevel = IsPC() ? GetConquerorLevel() : 0;
#endif
if (false)
{
@@ -1095,6 +1105,9 @@ void CHARACTER::UpdatePacket()
pack.dwAffectFlag[1] = m_afAffectFlag.bits[1];
pack.dwGuildID = 0;
pack.sAlignment = m_iAlignment / 10;
#ifdef ENABLE_CONQUEROR_LEVEL
pack.dwConquerorLevel = IsPC() ? GetConquerorLevel() : 0;
#endif
pack.bPKMode = m_bPKMode;
if (GetGuild())
@@ -1328,6 +1341,16 @@ void CHARACTER::CreatePlayerProto(TPlayerTable & tab)
// REMOVE_REAL_SKILL_LEVLES
thecore_memcpy(tab.skills, m_pSkillLevels, sizeof(TPlayerSkill) * SKILL_MAX_NUM);
// END_OF_REMOVE_REAL_SKILL_LEVLES
#ifdef ENABLE_CONQUEROR_LEVEL
tab.conqueror_exp = GetConquerorExp();
tab.conquerorlevel = GetConquerorLevel();
tab.conqueror_level_step = GetPoint(POINT_CONQUEROR_LEVEL_STEP);
tab.sungma_str = GetRealPoint(POINT_SUNGMA_STR);
tab.sungma_hp = GetRealPoint(POINT_SUNGMA_HP);
tab.sungma_move = GetRealPoint(POINT_SUNGMA_MOVE);
tab.sungma_inmune = GetRealPoint(POINT_SUNGMA_INMUNE);
tab.conqueror_point = GetPoint(POINT_CONQUEROR_POINT);
#endif
tab.horse = GetHorseData();
@@ -1726,6 +1749,12 @@ void CHARACTER::PointsPacket()
for (int i = POINT_ST; i < POINT_MAX_NUM; ++i)
pack.points[i] = GetPoint(i);
#ifdef ENABLE_CONQUEROR_LEVEL
pack.points[POINT_CONQUEROR_LEVEL] = GetConquerorLevel();
pack.points[POINT_CONQUEROR_EXP] = GetConquerorExp();
pack.points[POINT_CONQUEROR_NEXT_EXP] = GetConquerorNextExp();
#endif
GetDesc()->Packet(&pack, sizeof(TPacketGCPoints));
TPacketGCExtendedPointGold goldPack;
@@ -1916,6 +1945,25 @@ void CHARACTER::SetPlayerProto(const TPlayerTable * t)
SetLevel(t->level);
SetExp(t->exp);
SetGold(t->gold);
#ifdef ENABLE_CONQUEROR_LEVEL
SetConquerorLevel(t->conquerorlevel);
SetConquerorExp(t->conqueror_exp);
SetPoint(POINT_CONQUEROR_LEVEL_STEP, t->conqueror_level_step);
SetRealPoint(POINT_CONQUEROR_LEVEL_STEP, t->conqueror_level_step);
SetRealPoint(POINT_SUNGMA_STR, t->sungma_str);
SetRealPoint(POINT_SUNGMA_HP, t->sungma_hp);
SetRealPoint(POINT_SUNGMA_MOVE, t->sungma_move);
SetRealPoint(POINT_SUNGMA_INMUNE, t->sungma_inmune);
SetPoint(POINT_SUNGMA_STR, t->sungma_str);
SetPoint(POINT_SUNGMA_HP, t->sungma_hp);
SetPoint(POINT_SUNGMA_MOVE, t->sungma_move);
SetPoint(POINT_SUNGMA_INMUNE, t->sungma_inmune);
SetPoint(POINT_CONQUEROR_POINT, t->conqueror_point);
SetRealPoint(POINT_CONQUEROR_POINT, t->conqueror_point);
#endif
SetMapIndex(t->lMapIndex);
SetXYZ(t->x, t->y, t->z);
@@ -2335,6 +2383,9 @@ void CHARACTER::ComputeBattlePoints()
PointChange(POINT_MAGIC_ATT_GRADE, GetLevel() * 2 + GetPoint(POINT_IQ) * 2 + GetPoint(POINT_MAGIC_ATT_GRADE_BONUS));
PointChange(POINT_MAGIC_DEF_GRADE, GetLevel() + (GetPoint(POINT_IQ) * 3 + GetPoint(POINT_HT)) / 3 + iArmor / 2 + GetPoint(POINT_MAGIC_DEF_GRADE_BONUS));
#ifdef ENABLE_CONQUEROR_LEVEL
PointChange(POINT_MOV_SPEED, 0); // conqueror maps clamp the move speed by sungma_move
#endif
}
else
{
@@ -2370,6 +2421,10 @@ void CHARACTER::ComputePoints()
long lHPRecovery = GetPoint(POINT_HP_RECOVERY);
long lSPRecovery = GetPoint(POINT_SP_RECOVERY);
#ifdef ENABLE_CONQUEROR_LEVEL
long lConquerorStat = GetPoint(POINT_CONQUEROR_POINT);
long lConquerorLevelStep = GetPoint(POINT_CONQUEROR_LEVEL_STEP);
#endif
memset(m_pointsInstant.points, 0, sizeof(m_pointsInstant.points));
BuffOnAttr_ClearAll();
@@ -2388,6 +2443,15 @@ void CHARACTER::ComputePoints()
SetPoint(POINT_HT, GetRealPoint(POINT_HT));
SetPoint(POINT_DX, GetRealPoint(POINT_DX));
SetPoint(POINT_IQ, GetRealPoint(POINT_IQ));
#ifdef ENABLE_CONQUEROR_LEVEL
SetPoint(POINT_CONQUEROR_POINT, lConquerorStat);
SetPoint(POINT_CONQUEROR_LEVEL_STEP, lConquerorLevelStep);
SetPoint(POINT_SUNGMA_STR, GetRealPoint(POINT_SUNGMA_STR));
SetPoint(POINT_SUNGMA_HP, GetRealPoint(POINT_SUNGMA_HP));
SetPoint(POINT_SUNGMA_MOVE, GetRealPoint(POINT_SUNGMA_MOVE));
SetPoint(POINT_SUNGMA_INMUNE, GetRealPoint(POINT_SUNGMA_INMUNE));
#endif
SetPart(PART_MAIN, GetOriginalPart(PART_MAIN));
SetPart(PART_WEAPON, GetOriginalPart(PART_WEAPON));
@@ -3187,6 +3251,146 @@ void CHARACTER::PointChange(BYTE type, int64_t amount, bool bAmount, bool bBroad
case POINT_NONE:
return;
#ifdef ENABLE_CONQUEROR_LEVEL
case POINT_CONQUEROR_LEVEL:
if ((GetConquerorLevel() + amount) > gPlayerConquerorMaxLevel)
return;
SetConquerorLevel(GetConquerorLevel() + amount);
val = GetConquerorLevel();
sys_log(0, "CONQUEROR_LEVELUP: %s %d NEXT EXP %d", GetName(), GetConquerorLevel(), GetConquerorNextExp());
// PORT: AVA2 also copies the wolfman level-5 skill-group reset here; it keys off the
// conqueror level by mistake, so it is left out.
PointChange(POINT_CONQUEROR_NEXT_EXP, GetConquerorNextExp(), false);
break;
case POINT_CONQUEROR_NEXT_EXP:
val = GetConquerorNextExp();
bAmount = false;
break;
case POINT_CONQUEROR_EXP:
{
DWORD exp = GetConquerorExp();
DWORD next_exp = GetConquerorNextExp();
if (amount < 0 && exp < -amount)
{
sys_log(1, "%s AMOUNT < 0 %d, CUR CONQUEROR EXP: %d", GetName(), -amount, exp);
amount = -exp;
SetConquerorExp(exp + amount);
val = GetConquerorExp();
}
else
{
if (gPlayerConquerorMaxLevel <= GetConquerorLevel())
return;
if (test_server)
ChatPacket(CHAT_TYPE_INFO, "You have gained %d conqueror exp.", amount);
DWORD iExpBalance = 0;
const unsigned long long total = (unsigned long long) exp + (unsigned long long) amount;
if (total >= next_exp)
{
iExpBalance = (DWORD) (total - next_exp);
amount = next_exp - exp;
SetConquerorExp(0);
exp = next_exp;
}
else
{
SetConquerorExp((DWORD) total);
exp = GetConquerorExp();
}
DWORD q = DWORD(next_exp / 4.0f);
int iLevStep = GetRealPoint(POINT_CONQUEROR_LEVEL_STEP);
if (iLevStep >= 4)
{
sys_err("%s CONQUEROR_LEVEL_STEP bigger than 4! (%d)", GetName(), iLevStep);
iLevStep = 4;
}
if (exp >= next_exp && iLevStep < 4)
{
for (int i = 0; i < 4 - iLevStep; ++i)
PointChange(POINT_CONQUEROR_LEVEL_STEP, 1, false, true);
}
else if (exp >= q * 3 && iLevStep < 3)
{
for (int i = 0; i < 3 - iLevStep; ++i)
PointChange(POINT_CONQUEROR_LEVEL_STEP, 1, false, true);
}
else if (exp >= q * 2 && iLevStep < 2)
{
for (int i = 0; i < 2 - iLevStep; ++i)
PointChange(POINT_CONQUEROR_LEVEL_STEP, 1, false, true);
}
else if (exp >= q && iLevStep < 1)
PointChange(POINT_CONQUEROR_LEVEL_STEP, 1);
if (iExpBalance)
{
PointChange(POINT_CONQUEROR_EXP, iExpBalance);
}
val = GetConquerorExp();
}
}
break;
case POINT_CONQUEROR_LEVEL_STEP:
if (amount > 0)
{
val = GetPoint(POINT_CONQUEROR_LEVEL_STEP) + amount;
switch (val)
{
case 1:
case 2:
case 3:
if (GetConquerorLevel() <= gPlayerConquerorMaxLevel)
PointChange(POINT_CONQUEROR_POINT, 1);
break;
case 4:
PointChange(POINT_CONQUEROR_LEVEL, 1, false, true);
val = 0;
break;
}
SetPoint(POINT_CONQUEROR_LEVEL_STEP, val);
SetRealPoint(POINT_CONQUEROR_LEVEL_STEP, val);
Save();
}
else
val = GetPoint(POINT_CONQUEROR_LEVEL_STEP);
break;
case POINT_SUNGMA_STR:
case POINT_SUNGMA_HP:
case POINT_SUNGMA_MOVE:
case POINT_SUNGMA_INMUNE:
SetPoint(type, GetPoint(type) + amount);
val = GetPoint(type);
break;
case POINT_CONQUEROR_POINT:
SetPoint(type, GetPoint(type) + amount);
val = GetPoint(type);
SetRealPoint(type, val);
break;
#endif
case POINT_LEVEL:
if ((GetLevel() + amount) > gPlayerMaxLevel)
return;
@@ -3470,6 +3674,12 @@ void CHARACTER::PointChange(BYTE type, int64_t amount, bool bAmount, bool bBroad
add_hp += GetPoint(POINT_PARTY_TANKER_BONUS);
SetMaxHP(hp + add_hp);
#ifdef ENABLE_CONQUEROR_LEVEL
// conqueror maps: half the bonus HP below the map's sungma_hp requirement
if (IsPC() && IsConquerorMap(GetMapIndex()) &&
GetPoint(POINT_SUNGMA_HP) < SECTREE_MANAGER::instance().GetSungmaValueAffectByRegion(GetMapIndex(), AFFECT_SUNGMA_HP))
SetMaxHP(hp + add_hp / 2);
#endif
val = GetMaxHP();
}
@@ -3576,6 +3786,22 @@ void CHARACTER::PointChange(BYTE type, int64_t amount, bool bAmount, bool bBroad
val = GetPoint(type);
break;
#ifdef ENABLE_CONQUEROR_LEVEL
case POINT_MOV_SPEED:
// AVA2: on a conqueror map the move speed is pinned to 140 below the sungma_move requirement, 209 above it
if (IsPC() && IsConquerorMap(GetMapIndex()))
{
if (GetPoint(POINT_SUNGMA_MOVE) < SECTREE_MANAGER::instance().GetSungmaValueAffectByRegion(GetMapIndex(), AFFECT_SUNGMA_MOVE))
SetPoint(type, 140);
else
SetPoint(type, 209);
}
SetPoint(type, GetPoint(type) + amount);
val = GetPoint(type);
break;
#endif
case POINT_ST:
case POINT_HT:
case POINT_DX:
@@ -3584,7 +3810,9 @@ void CHARACTER::PointChange(BYTE type, int64_t amount, bool bAmount, bool bBroad
case POINT_SP_REGEN:
case POINT_ATT_SPEED:
case POINT_ATT_GRADE:
#ifndef ENABLE_CONQUEROR_LEVEL
case POINT_MOV_SPEED:
#endif
case POINT_CASTING_SPEED:
case POINT_MAGIC_ATT_GRADE:
case POINT_MAGIC_DEF_GRADE:
@@ -3845,6 +4073,13 @@ void CHARACTER::PointChange(BYTE type, int64_t amount, bool bAmount, bool bBroad
case POINT_DX:
case POINT_IQ:
case POINT_HT:
#ifdef ENABLE_CONQUEROR_LEVEL
case POINT_CONQUEROR_LEVEL:
case POINT_SUNGMA_STR:
case POINT_SUNGMA_HP:
case POINT_SUNGMA_MOVE:
case POINT_SUNGMA_INMUNE:
#endif
ComputeBattlePoints();
break;
case POINT_MAX_HP:
@@ -4042,6 +4277,12 @@ void CHARACTER::ApplyPoint(BYTE bApplyType, int iVal)
#endif
case APPLY_ATTBONUS_STONE:
case APPLY_ATTBONUS_BOSS:
#ifdef ENABLE_CONQUEROR_LEVEL
case APPLY_SUNGMA_STR:
case APPLY_SUNGMA_HP:
case APPLY_SUNGMA_MOVE:
case APPLY_SUNGMA_INMUNE:
#endif
case APPLY_ENCHANT_ELEC:
case APPLY_ENCHANT_FIRE:
case APPLY_ENCHANT_ICE:
@@ -7564,6 +7805,30 @@ bool CHARACTER::CanWarp() const
return true;
}
#ifdef ENABLE_CONQUEROR_LEVEL
DWORD CHARACTER::GetConquerorNextExp() const
{
// PORT: AVA2 bounds this by PLAYER_MAX_LEVEL_CONST, which reads past the 31-entry table
if (PLAYER_MAX_CONQUEROR_LEVEL_CONST < GetConquerorLevel())
return 2500000000u;
else
return exp_coqueror_table[GetConquerorLevel()];
}
bool CHARACTER::IsConquerorMap(long lMapIndex) const
{
switch (lMapIndex)
{
case EASTPLAIN_01:
case EASTPLAIN_02:
case EASTPLAIN_03:
case EMPIRECASTLE:
return true;
}
return false;
}
#endif
DWORD CHARACTER::GetNextExp() const
{
if (PLAYER_EXP_TABLE_MAX < GetLevel())
+34
View File
@@ -88,6 +88,9 @@ enum
FLY_CHAIN_LIGHTNING,
FLY_HP_SMALL,
FLY_SKILL_MUYEONG,
#ifdef ENABLE_CONQUEROR_LEVEL
FLY_CONQUEROR_EXP,
#endif
};
enum EDamageType
@@ -324,6 +327,18 @@ enum EPointTypes
POINT_ATTBONUS_CLAW = 239, // PORT: AVA2 auto-numbers it after ATTBONUS_ZODIAC; 239 is free below the 240+ AVA2 ports
#endif
#ifdef ENABLE_CONQUEROR_LEVEL
POINT_CONQUEROR_LEVEL = 205,
POINT_CONQUEROR_LEVEL_STEP = 206,
POINT_SUNGMA_STR = 207,
POINT_SUNGMA_HP = 208,
POINT_SUNGMA_MOVE = 209,
POINT_SUNGMA_INMUNE = 210,
POINT_CONQUEROR_POINT = 211,
POINT_CONQUEROR_EXP = 212,
POINT_CONQUEROR_NEXT_EXP = 213,
#endif
//POINT_MAX_NUM = 129 common/length.h
};
@@ -400,6 +415,10 @@ typedef struct character_point
BYTE voice;
BYTE level;
#ifdef ENABLE_CONQUEROR_LEVEL
BYTE conquerorlevel;
DWORD conqueror_exp;
#endif
DWORD exp;
int64_t gold;
@@ -720,6 +739,14 @@ class CHARACTER : public CEntity, public CFSM, public CHorseRider
void SetLastShoutPulse(DWORD pulse) { m_pointsInstant.dwLastShoutPulse = pulse; }
int GetLevel() const { return m_points.level; }
void SetLevel(BYTE level);
#ifdef ENABLE_CONQUEROR_LEVEL
int GetConquerorLevel() const { return m_points.conquerorlevel; }
void SetConquerorLevel(BYTE level) { m_points.conquerorlevel = level; }
DWORD GetConquerorExp() const { return m_points.conqueror_exp; }
void SetConquerorExp(DWORD exp) { m_points.conqueror_exp = exp; }
DWORD GetConquerorNextExp() const;
bool IsConquerorMap(long lMapIndex) const;
#endif
BYTE GetGMLevel() const;
BOOL IsGM() const;
@@ -1551,9 +1578,16 @@ class CHARACTER : public CEntity, public CFSM, public CHorseRider
public:
void StartMuyeongEvent();
void StopMuyeongEvent();
#ifdef ENABLE_CONQUEROR_LEVEL
void StartCheonunEvent(long lApplyValue);
void StopCheonunEvent();
#endif
private:
LPEVENT m_pkMuyeongEvent;
#ifdef ENABLE_CONQUEROR_LEVEL
LPEVENT m_pkCheonunEvent;
#endif
// for SKILL_CHAIN lighting
public:
+20
View File
@@ -475,6 +475,10 @@ void CHARACTER::LoadAffect(DWORD dwCount, TPacketAffectElement * pElements)
// 무영진은 로드하지않는다.
if (pElements->dwType == SKILL_MUYEONG)
continue;
#ifdef ENABLE_CONQUEROR_LEVEL
if (pElements->dwType == SKILL_CHEONUN)
continue;
#endif
if (AFFECT_AUTO_HP_RECOVERY == pElements->dwType || AFFECT_AUTO_SP_RECOVERY == pElements->dwType)
{
@@ -670,6 +674,16 @@ void CHARACTER::ComputeAffect(CAffect * pkAff, bool bAdd)
else
StopMuyeongEvent();
}
#ifdef ENABLE_CONQUEROR_LEVEL
if (pkAff->dwType == SKILL_CHEONUN)
{
if (bAdd)
StartCheonunEvent(pkAff->lApplyValue);
else
StopCheonunEvent();
}
#endif
}
bool CHARACTER::RemoveAffect(CAffect * pkAff)
@@ -771,6 +785,9 @@ void CHARACTER::RemoveGoodAffect()
RemoveAffect(SKILL_JEOKRANG);
RemoveAffect(SKILL_CHEONGRANG);
#endif
#ifdef ENABLE_CONQUEROR_LEVEL
RemoveAffect(SKILL_CHEONUN);
#endif
}
bool CHARACTER::IsGoodAffect(BYTE bAffectType) const
@@ -803,6 +820,9 @@ bool CHARACTER::IsGoodAffect(BYTE bAffectType) const
// 수인족(WOLFMEN) 버프 추가
case (SKILL_JEOKRANG):
case (SKILL_CHEONGRANG):
#endif
#ifdef ENABLE_CONQUEROR_LEVEL
case (SKILL_CHEONUN):
#endif
return true;
}
+59 -4
View File
@@ -11,6 +11,7 @@
#include "item_manager.h"
#include "mob_manager.h"
#include "battle.h"
#include "sectree_manager.h"
#include "pvp.h"
#include "skill.h"
#include "start_position.h"
@@ -1642,6 +1643,24 @@ void CHARACTER::SendDamagePacket(LPCHARACTER pAttacker, int Damage, BYTE DamageF
bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // returns true if dead
{
if (!CNewMobTimer::instance().CheckDamage(pAttacker,this)) return false;
#ifdef ENABLE_CONQUEROR_LEVEL
if (IsAffectFlag(AFF_CHUNWOON_MOOJUK))
{
if (pAttacker)
SendDamagePacket(pAttacker, 0, (1 << 3)); // client DAMAGE_BLOCK
return false;
}
// conqueror maps: monsters take half damage below the map's sungma_str requirement, none at conqueror level 0
if (pAttacker && pAttacker->IsPC() && !IsPC() && pAttacker->IsConquerorMap(pAttacker->GetMapIndex()))
{
if (pAttacker->GetPoint(POINT_SUNGMA_STR) < SECTREE_MANAGER::instance().GetSungmaValueAffectByRegion(pAttacker->GetMapIndex(), AFFECT_SUNGMA_STR))
dam /= 2;
if (pAttacker->GetConquerorLevel() == 0)
dam = 0;
}
#endif
if (DAMAGE_TYPE_MAGIC == type)
{
dam = (int)((float)dam * (100 + (pAttacker->GetPoint(POINT_MAGIC_ATT_BONUS_PER) + pAttacker->GetPoint(POINT_MELEE_MAGIC_ATT_BONUS_PER))) / 100.f + 0.5f);
@@ -1739,7 +1758,7 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu
// PORT: AVA2 ENABLE_MELEY_LAIR_DUNGEON. A Meley statue turned to stone (npc.set_protect_time "IsMeleyBlock").
if (pAttacker && GetProtectTime("IsMeleyBlock") == 1)
{
SendDamagePacket(pAttacker, 0, DAMAGE_BLOCK);
SendDamagePacket(pAttacker, 0, (1 << 3)); // client DAMAGE_BLOCK
return false;
}
@@ -1854,7 +1873,7 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s 블럭! (%d%%)"), GetName(), GetPoint(POINT_BLOCK));
}
SendDamagePacket(pAttacker, 0, DAMAGE_BLOCK);
SendDamagePacket(pAttacker, 0, (1 << 3)); // client DAMAGE_BLOCK
return false;
}
}
@@ -2564,8 +2583,18 @@ static void GiveExp(LPCHARACTER from, LPCHARACTER to, int iExp)
pet->PointChange(POINT_PET_EXP, iExp * 5);
#endif
to->PointChange(POINT_EXP, iExp, true);
from->CreateFly(FLY_EXP, to);
#ifdef ENABLE_CONQUEROR_LEVEL
if (to->IsConquerorMap(to->GetMapIndex()))
{
to->PointChange(POINT_CONQUEROR_EXP, iExp, true);
from->CreateFly(FLY_CONQUEROR_EXP, to);
}
else
#endif
{
to->PointChange(POINT_EXP, iExp, true);
from->CreateFly(FLY_EXP, to);
}
{
LPCHARACTER you = to->GetMarryPartner();
@@ -3136,6 +3165,27 @@ class CFuncShoot
break;
#ifdef ENABLE_CONQUEROR_LEVEL
case SKILL_PUNGLOEPO:
{
int iUseArrow = 1;
if (iUseArrow == m_me->GetArrowAndBow(&pkBow, &pkArrow, iUseArrow))
{
m_me->OnMove(true);
pkVictim->OnMove();
if (pkVictim->CanBeginFight())
pkVictim->BeginFight(m_me);
sys_log(0, "%s pungloepo %s", m_me->GetName(), pkVictim->GetName());
m_me->ComputeSkill(m_bType, pkVictim);
m_me->UseArrow(pkArrow, iUseArrow);
}
}
break;
#endif
case SKILL_HORSE_WILDATTACK_RANGE:
{
int iUseArrow = 1;
@@ -3164,6 +3214,11 @@ class CFuncShoot
case SKILL_SANGONG:
case SKILL_MAHWAN:
case SKILL_PABEOB:
#ifdef ENABLE_CONQUEROR_LEVEL
case SKILL_ILGWANGPYO:
case SKILL_MABEOBAGGWI:
case SKILL_METEO:
#endif
//case SKILL_CURSE:
{
m_me->OnMove(true);
+122 -1
View File
@@ -772,7 +772,11 @@ void CHARACTER::SkillLevelUp(DWORD dwVnum, BYTE bMethod)
else if (bMethod == SKILL_UP_BY_BOOK)
{
if (pkSk->dwType != 0) // 직업에 속하지 않았거나 포인트로 올릴수 없는 스킬은 처음부터 책으로 배울 수 있다.
#ifdef ENABLE_WOLFMAN_CHARACTER
if (GetSkillMasterType(pkSk->dwVnum) != SKILL_MASTER && (pkSk->dwVnum < SKILL_FINISH || pkSk->dwVnum > SKILL_ILIPUNGU))
#else
if (GetSkillMasterType(pkSk->dwVnum) != SKILL_MASTER && (pkSk->dwVnum < SKILL_FINISH || pkSk->dwVnum > SKILL_CHEONUN))
#endif
return;
}
@@ -2748,6 +2752,10 @@ bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaste
ComputeSkill(dwVnum, pkVictim);
else if (dwVnum == SKILL_MUYEONG || pkSk->IsChargeSkill())
ComputeSkill(dwVnum, pkVictim);
#ifdef ENABLE_CONQUEROR_LEVEL
else if (dwVnum == SKILL_METEO)
ComputeSkill(dwVnum, pkVictim);
#endif
m_dwLastSkillTime = get_dword_time();
@@ -2881,6 +2889,61 @@ void CHARACTER::StopMuyeongEvent()
event_cancel(&m_pkMuyeongEvent);
}
#ifdef ENABLE_CONQUEROR_LEVEL
EVENTINFO(cheonun_event_info)
{
DynamicCharacterPtr ch;
long lApplyCheonun;
};
// SKILL_CHEONUN: every 12 s, lApplyCheonun % chance of a 5 s full damage block (AFF_CHUNWOON_MOOJUK)
EVENTFUNC(skill_cheonun_event)
{
cheonun_event_info* info = dynamic_cast<cheonun_event_info*>(event->info);
if (info == NULL)
{
sys_err("skill_cheonun_event> <Factor> Null pointer");
return 0;
}
LPCHARACTER ch = info->ch;
long lValue = info->lApplyCheonun;
if (ch == NULL || lValue == 0)
return 0;
if (!ch->IsAffectFlag(AFF_CHEONUN))
{
ch->StopCheonunEvent();
return 0;
}
if (number(1, 100) <= lValue)
ch->AddAffect(2000, POINT_NONE, 0, AFF_CHUNWOON_MOOJUK, 5, 0, true);
return PASSES_PER_SEC(12);
}
void CHARACTER::StartCheonunEvent(long lApplyValue)
{
if (m_pkCheonunEvent)
return;
cheonun_event_info* info = AllocEventInfo<cheonun_event_info>();
info->ch = this;
info->lApplyCheonun = lApplyValue;
m_pkCheonunEvent = event_create(skill_cheonun_event, info, PASSES_PER_SEC(1));
}
void CHARACTER::StopCheonunEvent()
{
event_cancel(&m_pkCheonunEvent);
}
#endif
void CHARACTER::SkillLearnWaitMoreTimeMessage(DWORD ms)
{
//const char* str = "";
@@ -3113,7 +3176,9 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
{
DWORD selfJobGroup = (GetJob()+1) * 10 + GetSkillGroup();
#ifdef ENABLE_WOLFMAN_CHARACTER
#ifdef ENABLE_CONQUEROR_LEVEL
const DWORD SKILL_NUM = 184;
#elif defined(ENABLE_WOLFMAN_CHARACTER)
const DWORD SKILL_NUM = 176;
#else
const DWORD SKILL_NUM = 158;
@@ -3296,6 +3361,16 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
51, // job_skill(WOLFMAN SKILL) 173
51, // job_skill(WOLFMAN SKILL) 174
51, // job_skill(WOLFMAN SKILL) 175
#endif
#ifdef ENABLE_CONQUEROR_LEVEL
0, // job_skill(CONQUEROR SKILL) 176
0, // job_skill(CONQUEROR SKILL) 177
0, // job_skill(CONQUEROR SKILL) 178
0, // job_skill(CONQUEROR SKILL) 179
0, // job_skill(CONQUEROR SKILL) 180
0, // job_skill(CONQUEROR SKILL) 181
0, // job_skill(CONQUEROR SKILL) 182
0, // job_skill(CONQUEROR SKILL) 183
#endif
}; // s_anSkill2JobGroup
@@ -3332,7 +3407,11 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
// 1번 직군 기본 스킬 끝
// 여유분
#ifdef ENABLE_CONQUEROR_LEVEL
{ 5, 176, 177, 179, 181, 183 }, // 9
#else
{ 0, 0, 0, 0, 0 }, // 9
#endif
{ 0, 0, 0, 0, 0 }, // 10
{ 0, 0, 0, 0, 0 }, // 11
{ 0, 0, 0, 0, 0 }, // 12
@@ -3353,7 +3432,11 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
// 2번 직군 기본 스킬 끝
// 여유분
#ifdef ENABLE_CONQUEROR_LEVEL
{ 4, 176, 178, 180, 182 }, // 24
#else
{ 0, 0, 0, 0, 0 }, // 24
#endif
{ 0, 0, 0, 0, 0 }, // 25
// 여유분 끝
@@ -3378,7 +3461,11 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
// 1번 직군 마스터 스킬 끝
// 여유분
#ifdef ENABLE_CONQUEROR_LEVEL
{ 5, 176, 177, 179, 181, 183 }, // 34
#else
{ 0, 0, 0, 0, 0 }, // 34
#endif
{ 0, 0, 0, 0, 0 }, // 35
{ 0, 0, 0, 0, 0 }, // 36
{ 0, 0, 0, 0, 0 }, // 37
@@ -3399,7 +3486,11 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
// 2번 직군 마스터 스킬 끝
// 여유분
#ifdef ENABLE_CONQUEROR_LEVEL
{ 4, 176, 178, 180, 182 }, // 49
#else
{ 0, 0, 0, 0, 0 }, // 49
#endif
{ 0, 0, 0, 0, 0 }, // 50
// 여유분 끝
@@ -3424,7 +3515,11 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
// 1번 직군 그랜드 마스터 스킬 끝
// 여유분
#ifdef ENABLE_CONQUEROR_LEVEL
{ 5, 176, 177, 179, 181, 183 }, // 59
#else
{ 0, 0, 0, 0, 0 }, // 59
#endif
{ 0, 0, 0, 0, 0 }, // 60
{ 0, 0, 0, 0, 0 }, // 61
{ 0, 0, 0, 0, 0 }, // 62
@@ -3445,7 +3540,11 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
// 2번 직군 그랜드 마스터 스킬 끝
//여유분
#ifdef ENABLE_CONQUEROR_LEVEL
{ 5, 176, 178, 180, 182, 183 }, // 74
#else
{ 0, 0, 0, 0, 0 }, // 74
#endif
{ 0, 0, 0, 0, 0 }, // 75
// 여유분 끝
@@ -3470,7 +3569,11 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
// 1번 직군 퍼펙트 마스터 스킬 끝
// 여유분
#ifdef ENABLE_CONQUEROR_LEVEL
{ 5, 176, 177, 179, 181, 183 }, // 84
#else
{ 0, 0, 0, 0, 0 }, // 84
#endif
{ 0, 0, 0, 0, 0 }, // 85
{ 0, 0, 0, 0, 0 }, // 86
{ 0, 0, 0, 0, 0 }, // 87
@@ -3491,7 +3594,11 @@ bool CHARACTER::IsUsableSkillMotion(DWORD dwMotionIndex) const
// 2번 직군 퍼펙트 마스터 스킬 끝
// 여유분
#ifdef ENABLE_CONQUEROR_LEVEL
{ 4, 176, 178, 180, 182 }, // 99
#else
{ 0, 0, 0, 0, 0 }, // 99
#endif
{ 0, 0, 0, 0, 0 }, // 100
// 여유분 끝
@@ -3658,15 +3765,29 @@ bool CHARACTER::CanUseSkill(DWORD dwSkillVnum) const
if (0 < GetSkillGroup())
{
#ifdef ENABLE_CONQUEROR_LEVEL
const int SKILL_COUNT = 7;
#else
const int SKILL_COUNT = 6;
#endif
static const DWORD SkillList[JOB_MAX_NUM][SKILL_GROUP_MAX_NUM][SKILL_COUNT] =
{
#ifdef ENABLE_CONQUEROR_LEVEL
{ { 1, 2, 3, 4, 5, 6, 176 }, { 16, 17, 18, 19, 20, 21, 176 } },
{ { 31, 32, 33, 34, 35, 36, 177 }, { 46, 47, 48, 49, 50, 51, 178 } },
{ { 61, 62, 63, 64, 65, 66, 179 }, { 76, 77, 78, 79, 80, 81, 180 } },
{ { 91, 92, 93, 94, 95, 96, 181 }, { 106,107,108,109,110,111,182 } },
#ifdef ENABLE_WOLFMAN_CHARACTER
{ { 170, 171, 172, 173, 174, 175, 183 }, { 0, 0, 0, 0, 0, 0, 0 } },
#endif
#else
{ { 1, 2, 3, 4, 5, 6 }, { 16, 17, 18, 19, 20, 21 } },
{ { 31, 32, 33, 34, 35, 36 }, { 46, 47, 48, 49, 50, 51 } },
{ { 61, 62, 63, 64, 65, 66 }, { 76, 77, 78, 79, 80, 81 } },
{ { 91, 92, 93, 94, 95, 96 }, { 106,107,108,109,110,111 } },
#ifdef ENABLE_WOLFMAN_CHARACTER
{ { 170, 171, 172, 173, 174, 175 }, { 0, 0, 0, 0, 0, 0 } },
#endif
#endif
};
+6
View File
@@ -90,6 +90,9 @@ ACMD(do_console);
ACMD(do_restart);
ACMD(do_advance);
ACMD(do_stat);
#ifdef ENABLE_CONQUEROR_LEVEL
ACMD(do_conqueror_stat);
#endif
ACMD(do_respawn);
ACMD(do_skillup);
ACMD(do_guildskillup);
@@ -364,6 +367,9 @@ struct command_info cmd_info[] =
{ "shutdown", do_shutdown, 0, POS_DEAD, GM_HIGH_WIZARD },
{ "stat", do_stat, 0, POS_DEAD, GM_PLAYER },
#ifdef ENABLE_CONQUEROR_LEVEL
{ "conqueror_stat", do_conqueror_stat, 0, POS_DEAD, GM_PLAYER },
#endif
{ "stat-", do_stat_minus, 0, POS_DEAD, GM_PLAYER },
{ "stat_reset", do_stat_reset, 0, POS_DEAD, GM_LOW_WIZARD },
{ "state", do_state, 0, POS_DEAD, GM_LOW_WIZARD },
+48
View File
@@ -828,6 +828,54 @@ ACMD(do_stat)
ch->ComputePoints();
}
#ifdef ENABLE_CONQUEROR_LEVEL
// AVA2 conqueror stats: /conqueror_stat smh_str|smh_hp|smh_move|smh_inmune spends one conqueror point
ACMD(do_conqueror_stat)
{
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));
if (!*arg1)
return;
if (ch->IsPolymorphed())
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("둔갑 중에는 능력을 올릴 수 없습니다."));
return;
}
if (ch->GetPoint(POINT_CONQUEROR_POINT) <= 0)
return;
BYTE idx = 0;
if (!strcmp(arg1, "smh_str"))
idx = POINT_SUNGMA_STR;
else if (!strcmp(arg1, "smh_hp"))
idx = POINT_SUNGMA_HP;
else if (!strcmp(arg1, "smh_move"))
idx = POINT_SUNGMA_MOVE;
else if (!strcmp(arg1, "smh_inmune"))
idx = POINT_SUNGMA_INMUNE;
else
return;
if (ch->GetRealPoint(idx) >= MAX_STAT)
return;
ch->SetRealPoint(idx, ch->GetRealPoint(idx) + 1);
ch->SetPoint(idx, ch->GetPoint(idx) + 1);
ch->ComputePoints();
ch->PointChange(idx, 0);
if (idx == POINT_SUNGMA_HP)
ch->PointChange(POINT_MAX_HP, 0);
ch->PointChange(POINT_CONQUEROR_POINT, -1);
ch->ComputePoints();
}
#endif
ACMD(do_pvp)
{
if (ch->GetArena() != NULL || CArenaManager::instance().IsArenaMap(ch->GetMapIndex()) == true)
+14
View File
@@ -133,6 +133,9 @@ bool g_noticeBattleZone = false; //
// bool bXTrapEnabled = false;
int gPlayerMaxLevel = 99;
#ifdef ENABLE_CONQUEROR_LEVEL
int gPlayerConquerorMaxLevel = 30;
#endif
bool g_BlockCharCreation = false;
@@ -1142,6 +1145,17 @@ void config_init(const string& st_localeServiceName)
fprintf(stderr, "PLAYER_MAX_LEVEL: %d\n", gPlayerMaxLevel);
}
#ifdef ENABLE_CONQUEROR_LEVEL
TOKEN("max_conqueror_level")
{
str_to_number(gPlayerConquerorMaxLevel, value_string);
gPlayerConquerorMaxLevel = MINMAX(1, gPlayerConquerorMaxLevel, PLAYER_MAX_CONQUEROR_LEVEL_CONST);
fprintf(stderr, "PLAYER_CONQUEROR_MAX_LEVEL: %d\n", gPlayerConquerorMaxLevel);
}
#endif
TOKEN("block_char_creation")
{
int tmp = 0;
+3
View File
@@ -118,6 +118,9 @@ extern DWORD g_GoldDropTimeLimitValue;
// extern bool bXTrapEnabled;
extern int gPlayerMaxLevel;
#ifdef ENABLE_CONQUEROR_LEVEL
extern int gPlayerConquerorMaxLevel;
#endif
extern bool g_BlockCharCreation;
+51
View File
@@ -189,6 +189,44 @@ const DWORD exp_table_euckr[PLAYER_EXP_TABLE_MAX + 1] =
2100000000, // 120
};
#ifdef ENABLE_CONQUEROR_LEVEL
// AVA2 conqueror (Yohara) exp table: index = conqueror level
const DWORD exp_coqueror_table[PLAYER_MAX_CONQUEROR_LEVEL_CONST + 1] =
{
0, // 0
433400, // 1
1300204, // 2
2600413, // 3
4334029, // 4
6501054, // 5
9101490, // 6
12135339, // 7
15602603, // 8
19503284, // 9
23837384, // 10
28604905, // 11
33805849, // 12
39440218, // 13
45508014, // 14
52009239, // 15
58943895, // 16
66311984, // 17
74113508, // 18
82348469, // 19
91016869, // 20
100118710, // 21
109653994, // 22
119622723, // 23
130024899, // 24
140860524, // 25
152129600, // 26
163832129, // 27
175968113, // 28
188537554, // 29
188537554, // 30
};
#endif
const DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1] =
{
0, // 0
@@ -964,10 +1002,17 @@ const TApplyInfo aApplyInfo[MAX_APPLY_NUM] =
{ POINT_NONE }, // 116
{ POINT_NONE }, // 117
{ POINT_NONE }, // 118
#ifdef ENABLE_CONQUEROR_LEVEL
{ POINT_SUNGMA_STR }, // APPLY_SUNGMA_STR 119
{ POINT_SUNGMA_HP }, // APPLY_SUNGMA_HP 120
{ POINT_SUNGMA_MOVE }, // APPLY_SUNGMA_MOVE 121
{ POINT_SUNGMA_INMUNE }, // APPLY_SUNGMA_INMUNE 122
#else
{ POINT_NONE }, // 119
{ POINT_NONE }, // 120
{ POINT_NONE }, // 121
{ POINT_NONE }, // 122
#endif
{ POINT_ENCHANT_ELEC }, // APPLY_ENCHANT_ELEC 123
{ POINT_ENCHANT_FIRE }, // APPLY_ENCHANT_FIRE 124
{ POINT_ENCHANT_ICE }, // APPLY_ENCHANT_ICE 125
@@ -1368,6 +1413,12 @@ TValueName c_aApplyTypeNames[] =
{ "RESIST_MAGIC_REDUCTION", APPLY_RESIST_MAGIC_REDUCTION },
{ "ATTBONUS_STONE", APPLY_ATTBONUS_STONE },
{ "ATTBONUS_BOSS", APPLY_ATTBONUS_BOSS },
#ifdef ENABLE_CONQUEROR_LEVEL
{ "SUNGMA_STR", APPLY_SUNGMA_STR },
{ "SUNGMA_HP", APPLY_SUNGMA_HP },
{ "SUNGMA_MOVE", APPLY_SUNGMA_MOVE },
{ "SUNGMA_INMUNE", APPLY_SUNGMA_INMUNE },
#endif
{ "ENCHANT_ELEC", APPLY_ENCHANT_ELEC },
{ "ENCHANT_FIRE", APPLY_ENCHANT_FIRE },
{ "ENCHANT_ICE", APPLY_ENCHANT_ICE },
+3
View File
@@ -96,6 +96,9 @@ extern const TMobRankStat MobRankStats[MOB_RANK_MAX_NUM];
extern TBattleTypeStat BattleTypeStats[BATTLE_TYPE_MAX_NUM];
extern const DWORD party_exp_distribute_table[PLAYER_MAX_LEVEL_CONST + 1];
#ifdef ENABLE_CONQUEROR_LEVEL
extern const DWORD exp_coqueror_table[PLAYER_MAX_CONQUEROR_LEVEL_CONST + 1];
#endif
extern const DWORD exp_table_euckr[PLAYER_EXP_TABLE_MAX + 1];
extern const DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1];
+15 -1
View File
@@ -10,6 +10,7 @@
#include "desc_manager.h"
#include "char.h"
#include "char_manager.h"
#include "sectree_manager.h"
#include "cmd.h"
#include "buffer_manager.h"
#include "protocol.h"
@@ -572,7 +573,7 @@ void CInputLogin::Entergame(LPDESC d, const char * data)
{
// PORT: wear40 moves dragon-soul/belt cells; older clients must not enter this world.
const char* revision=strstr(d->GetClientVersion(),"mt");
if(!revision || atoi(revision+2)<20261024)
if(!revision || atoi(revision+2)<20261028)
{
if(d->GetCharacter())d->GetCharacter()->ChatPacket(CHAT_TYPE_INFO,"Please update the client before entering the game.");
d->DelayedDisconnect(1);return;
@@ -819,6 +820,19 @@ void CInputLogin::Entergame(LPDESC d, const char * data)
sys_log(0, "TEEN_SEND: (%u, %s)", d->GetAccountTable().id, ch->GetName());
}
#ifdef ENABLE_CONQUEROR_LEVEL
if (ch->IsPC() && ch->IsConquerorMap(ch->GetMapIndex()))
{
TPacketGCSungmaAttrUpdate p;
p.bHeader = HEADER_GC_SUNGMA_ATTR_UPDATE;
p.bSTR = SECTREE_MANAGER::instance().GetSungmaValueAffectByRegion(ch->GetMapIndex(), AFFECT_SUNGMA_STR);
p.bHP = SECTREE_MANAGER::instance().GetSungmaValueAffectByRegion(ch->GetMapIndex(), AFFECT_SUNGMA_HP);
p.bMOVE = SECTREE_MANAGER::instance().GetSungmaValueAffectByRegion(ch->GetMapIndex(), AFFECT_SUNGMA_MOVE);
p.bINMUNE = SECTREE_MANAGER::instance().GetSungmaValueAffectByRegion(ch->GetMapIndex(), AFFECT_SUNGMA_INMUNE);
ch->GetDesc()->Packet(&p, sizeof(p));
}
#endif
if (ch->GetHorseLevel() > 0)
{
DWORD pid = ch->GetPlayerID();
+5
View File
@@ -1754,6 +1754,11 @@ void CInputMain::Attack(LPCHARACTER ch, const BYTE header, const char* data)
case SKILL_NOEJEON:
case SKILL_CHAIN:
case SKILL_HORSE_WILDATTACK_RANGE:
#ifdef ENABLE_CONQUEROR_LEVEL
case SKILL_ILGWANGPYO:
case SKILL_MABEOBAGGWI:
case SKILL_METEO:
#endif
if (HEADER_CG_SHOOT != type->header)
{
if (test_server)
+20
View File
@@ -321,6 +321,9 @@ enum
HEADER_GC_SPECIFIC_EFFECT = 208,
#ifdef ENABLE_CONQUEROR_LEVEL
HEADER_GC_SUNGMA_ATTR_UPDATE = 231,
#endif
HEADER_GC_DRAGON_SOUL_REFINE = 209,
HEADER_GC_RESPOND_CHANNELSTATUS = 210,
HEADER_GC_SASH = 215, // AVA2 sash
@@ -1042,6 +1045,9 @@ typedef struct packet_char_additional_info
BYTE bEmpire;
DWORD dwGuildID;
DWORD dwLevel;
#ifdef ENABLE_CONQUEROR_LEVEL
DWORD dwConquerorLevel;
#endif
short sAlignment;
BYTE bPKMode;
DWORD dwMountVnum;
@@ -1081,6 +1087,9 @@ typedef struct packet_update_char
DWORD dwGuildID;
short sAlignment;
#ifdef ENABLE_CONQUEROR_LEVEL
DWORD dwConquerorLevel;
#endif
BYTE bPKMode;
DWORD dwMountVnum;
//WORD wRaceNum;
@@ -2364,6 +2373,17 @@ typedef struct
BYTE bApplyOn;
} TPacketGCAffectRemove;
#ifdef ENABLE_CONQUEROR_LEVEL
typedef struct packet_sungma_attr_update
{
BYTE bHeader;
BYTE bSTR;
BYTE bHP;
BYTE bMOVE;
BYTE bINMUNE;
} TPacketGCSungmaAttrUpdate;
#endif
typedef struct packet_lover_info
{
BYTE header;
+30
View File
@@ -2815,6 +2815,32 @@ teleport_area:
return 2;
}
#ifdef ENABLE_CONQUEROR_LEVEL
// pc.set_conqueror_level(): unlock the conqueror level (needs max level, only once)
int pc_set_conqueror_level(lua_State * L)
{
LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
if (!ch || ch->GetConquerorLevel() >= 1 || ch->GetLevel() < gPlayerMaxLevel)
{
lua_pushboolean(L, 0);
return 1;
}
ch->PointChange(POINT_CONQUEROR_LEVEL, 1);
lua_pushboolean(L, 1);
return 1;
}
int pc_get_conqueror_level(lua_State * L)
{
LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
lua_pushnumber(L, ch ? ch->GetConquerorLevel() : 0);
return 1;
}
#endif
void RegisterPCFunctionTable()
{
luaL_reg pc_functions[] =
@@ -2824,6 +2850,10 @@ teleport_area:
{ "get_account_id", pc_get_account_id },
{ "get_account", pc_get_account },
{ "get_level", pc_get_level },
#ifdef ENABLE_CONQUEROR_LEVEL
{ "set_conqueror_level", pc_set_conqueror_level },
{ "get_conqueror_level", pc_get_conqueror_level },
#endif
{ "set_level", pc_set_level },
{ "get_next_exp", pc_get_next_exp },
{ "get_exp", pc_get_exp },
+67
View File
@@ -17,6 +17,9 @@
#include "packet.h"
#include "start_position.h"
#include "dev_log.h"
#ifdef ENABLE_CONQUEROR_LEVEL
#include "affect.h"
#endif
WORD SECTREE_MANAGER::current_sectree_version = MAKEWORD(0, 3);
@@ -732,6 +735,65 @@ int SECTREE_MANAGER::GetMapIndex(long x, long y)
return 0;
}
#ifdef ENABLE_CONQUEROR_LEVEL
// <map>/sungma_attr.txt: "sungma_str|sungma_hp|sungma_move|sungma_immune <value>" lines, the stat each
// conqueror map asks for before it stops halving damage / HP / move speed
void SECTREE_MANAGER::LoadSungmaAttr(const char * c_pszFileName, long lMapIndex)
{
FILE * fp = fopen(c_pszFileName, "r");
if (!fp)
return;
char buf[1024];
while (fgets(buf, sizeof(buf), fp))
{
std::istringstream ins(buf, std::ios_base::in);
std::string affect, value;
ins >> affect >> value;
if (ins.fail())
continue;
int iType;
if (affect == "sungma_str")
iType = AFFECT_SUNGMA_STR;
else if (affect == "sungma_hp")
iType = AFFECT_SUNGMA_HP;
else if (affect == "sungma_move")
iType = AFFECT_SUNGMA_MOVE;
else if (affect == "sungma_immune")
iType = AFFECT_SUNGMA_INMUNE;
else
{
sys_err("%s: unknown sungma attr %s", c_pszFileName, affect.c_str());
continue;
}
TSungmaAffectMap aMap;
aMap.lMapIndex = lMapIndex;
aMap.iAffecType = iType;
aMap.iValue = atoi(value.c_str());
m_vec_mapSungmaAffect.push_back(aMap);
}
fclose(fp);
}
int SECTREE_MANAGER::GetSungmaValueAffectByRegion(long lMapIndex, int iAffecType)
{
for (std::vector<TSungmaAffectMap>::const_iterator it = m_vec_mapSungmaAffect.begin(); it != m_vec_mapSungmaAffect.end(); ++it)
{
if (it->lMapIndex == lMapIndex && it->iAffecType == iAffecType)
return it->iValue;
}
return 0; // PORT: AVA2 falls off the end here (UB)
}
#endif
int SECTREE_MANAGER::Build(const char * c_pszListFileName, const char* c_pszMapBasePath)
{
if (true == test_server)
@@ -805,6 +867,11 @@ int SECTREE_MANAGER::Build(const char * c_pszListFileName, const char* c_pszMapB
snprintf(szFilename, sizeof(szFilename), "%s/%s/dungeon.txt", c_pszMapBasePath, szMapName);
LoadDungeon(iIndex, szFilename);
#ifdef ENABLE_CONQUEROR_LEVEL
snprintf(szFilename, sizeof(szFilename), "%s/%s/sungma_attr.txt", c_pszMapBasePath, szMapName);
LoadSungmaAttr(szFilename, iIndex);
#endif
pkMapSectree->Build();
}
+16
View File
@@ -16,6 +16,15 @@ typedef struct SMapRegion
std::string strMapName;
} TMapRegion;
#ifdef ENABLE_CONQUEROR_LEVEL
typedef struct SSungmaAffectMap
{
long lMapIndex;
int iAffecType;
int iValue;
} TSungmaAffectMap;
#endif
struct TAreaInfo
{
int sx, sy, ex, ey, dir;
@@ -146,6 +155,10 @@ class SECTREE_MANAGER : public singleton<SECTREE_MANAGER>
LPSECTREE_MAP BuildSectreeFromSetting(TMapSetting & r_setting);
bool LoadAttribute(LPSECTREE_MAP pkMapSectree, const char * c_pszFileName, TMapSetting & r_setting);
void LoadDungeon(int iIndex, const char * c_pszFileName);
#ifdef ENABLE_CONQUEROR_LEVEL
void LoadSungmaAttr(const char * c_pszFileName, long lMapIndex);
int GetSungmaValueAffectByRegion(long lMapIndex, int iAffecType);
#endif
bool GetValidLocation(long lMapIndex, long x, long y, long & r_lValidMapIndex, PIXEL_POSITION & r_pos, BYTE empire = 0);
bool GetSpawnPosition(long x, long y, PIXEL_POSITION & r_pos);
bool GetSpawnPositionByMapIndex(long lMapIndex, PIXEL_POSITION & r_pos);
@@ -234,6 +247,9 @@ class SECTREE_MANAGER : public singleton<SECTREE_MANAGER>
std::map<DWORD, LPSECTREE_MAP> m_map_pkSectree;
std::map<int, TAreaMap> m_map_pkArea;
std::vector<TMapRegion> m_vec_mapRegion;
#ifdef ENABLE_CONQUEROR_LEVEL
std::vector<TSungmaAffectMap> m_vec_mapSungmaAffect;
#endif
std::map<DWORD, std::vector<npc_info> > m_mapNPCPosition;
// <Factor> Circular private map indexing
+7
View File
@@ -152,6 +152,10 @@ enum ESkillIndexes
SKILL_HORSE = 130, // 승마 스킬
SKILL_HORSE_SUMMON = 131, // 말 소환 스킬
#ifdef ENABLE_CONQUEROR_LEVEL
SKILL_ROLE_PROFICIENCY = 133,
SKILL_INSIGHT = 134,
#endif
SKILL_HORSE_WILDATTACK = 137, // 난무
SKILL_HORSE_CHARGE = 138, // 돌격
SKILL_HORSE_ESCAPE = 139, // 탈출
@@ -191,6 +195,9 @@ enum ESkillIndexes
#ifdef ENABLE_WOLFMAN_CHARACTER
SKILL_ILIPUNGU = 183,
#endif
#ifdef ENABLE_CONQUEROR_LEVEL
SKILL_HIT_ATTRIBUTE = 246,
#endif
GUILD_SKILL_COUNT = GUILD_SKILL_END - GUILD_SKILL_START + 1,
+11
View File
@@ -0,0 +1,11 @@
-- Conqueror (Yohara) level unlock. AVA2 ships pc.set_conqueror_level without a quest that calls it; give
-- conqueror level 1 once a character reaches the max level (the function itself checks gPlayerMaxLevel).
quest conqueror_unlock begin
state start begin
when login or levelup with pc.get_level() >= 120 and pc.get_conqueror_level() == 0 begin
if pc.set_conqueror_level() then
syschat("你已成为征服者!击败成魔地图的怪物可获得征服者经验。")
end
end
end
end
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
# Conqueror (Yohara) level install: player columns, skill_proto rows, per-map sungma_attr.txt, unlock quest.
# sh install.sh <player db> <locale dir> e.g. sh install.sh player_sb /usr/metin2/server/sbtest/share/locale/newcibn
# Restart db + game afterwards (skill_proto and map files are read at boot).
set -e
DB=${1:?player db}
LOC=${2:?locale dir}
HERE=$(cd "$(dirname "$0")" && pwd)
mysql -uroot "$DB" < "$HERE/schema.sql"
mysql -uroot "$DB" < "$HERE/skill_proto.sql"
for d in "$HERE"/map/*; do
m=$(basename "$d")
[ -d "$LOC/map/$m" ] || { echo "missing map dir $LOC/map/$m" >&2; exit 1; }
cp "$d/sungma_attr.txt" "$LOC/map/$m/sungma_attr.txt"
done
# Unlock quest: qc rejects functions missing from quest_functions; the quest text is GB2312 like the locale.
Q="$LOC/quest"
for f in quest_functions locale_list; do
[ -z "$(tail -c 1 "$Q/$f")" ] || echo >> "$Q/$f"
done
for f in pc.set_conqueror_level pc.get_conqueror_level; do
grep -qx "$f" "$Q/quest_functions" || echo "$f" >> "$Q/quest_functions"
done
iconv -f UTF-8 -t GB18030 "$HERE/conqueror_unlock.quest" > "$Q/conqueror_unlock.quest"
grep -qx conqueror_unlock.quest "$Q/locale_list" || echo conqueror_unlock.quest >> "$Q/locale_list"
(cd "$Q" && ./qc conqueror_unlock.quest)
mysql -uroot "$DB" -e "SELECT COUNT(*) AS conqueror_cols FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='$DB' AND TABLE_NAME='player' AND COLUMN_NAME IN ('conquerorlevel','conqueror_level_step','sungma_str','sungma_hp','sungma_move','sungma_inmune','conqueror_exp','conqueror_point'); SELECT dwVnum, szName, setAffectFlag FROM skill_proto WHERE dwVnum IN (133,134) OR dwVnum BETWEEN 176 AND 183;"
@@ -0,0 +1,4 @@
sungma_str 15
sungma_hp 10
sungma_move 15
sungma_immune 20
@@ -0,0 +1,4 @@
sungma_str 20
sungma_hp 10
sungma_move 20
sungma_immune 25
@@ -0,0 +1,4 @@
sungma_str 25
sungma_hp 15
sungma_move 25
sungma_immune 30
@@ -0,0 +1,4 @@
sungma_str 0
sungma_hp 0
sungma_move 1
sungma_immune 0
+21
View File
@@ -0,0 +1,21 @@
-- AVA2 conqueror (Yohara) level: per-player columns read/written by db ClientManagerLogin/Player.
-- Idempotent: run against the player schema (player / player_sb).
DROP PROCEDURE IF EXISTS mt_conqueror_add_columns;
DELIMITER //
CREATE PROCEDURE mt_conqueror_add_columns()
BEGIN
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'player' AND COLUMN_NAME = 'conquerorlevel') THEN
ALTER TABLE player
ADD COLUMN conquerorlevel tinyint(3) unsigned NOT NULL DEFAULT 0,
ADD COLUMN conqueror_level_step tinyint(3) unsigned NOT NULL DEFAULT 0,
ADD COLUMN sungma_str smallint(6) NOT NULL DEFAULT 0,
ADD COLUMN sungma_hp smallint(6) NOT NULL DEFAULT 0,
ADD COLUMN sungma_move smallint(6) NOT NULL DEFAULT 0,
ADD COLUMN sungma_inmune smallint(6) NOT NULL DEFAULT 0,
ADD COLUMN conqueror_exp int(10) unsigned NOT NULL DEFAULT 0,
ADD COLUMN conqueror_point smallint(6) NOT NULL DEFAULT 0;
END IF;
END //
DELIMITER ;
CALL mt_conqueror_add_columns();
DROP PROCEDURE mt_conqueror_add_columns;
+13
View File
@@ -0,0 +1,13 @@
-- AVA2 skill_proto rows: 133/134 (role proficiency / insight) and the conqueror skills 176-183.
-- Copied 1:1 from the AVA2 backup; names folded to ASCII (latin1 table).
REPLACE INTO `skill_proto` VALUES (133,'Carisma',0,1,40,0,'NONE','','','','','','','','DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'NORMAL',0,'1',1000,0);
REPLACE INTO `skill_proto` VALUES (134,'Inspiracion',0,1,40,0,'NONE','','','','','','','','DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'NORMAL',0,'1',1000,0);
REPLACE INTO `skill_proto` VALUES (176,'Terremoto',1,1,1,0,'HP','-(3*atk+(0.9*atk+number(1,1000)+str*5+dex*3+lv)*k)','200+200*k','','','35+20*k','-(3*atk+(0.9*atk+number(1,1000)+str*5+dex*3+lv)*k)','','ATTACK,USE_MELEE_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MELEE',8,'1',0,200);
REPLACE INTO `skill_proto` VALUES (177,'Estrellas',2,1,1,0,'HP','-(atk+(1.7*atk+number(1,1000)+dex*6+lv*5)*k)','200+200*k','','','35+20*k','-(atk+(1.7*atk+number(1,1000)+dex*6+lv*5)*k)','','ATTACK,USE_MELEE_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MELEE',4,'1',2000,200);
REPLACE INTO `skill_proto` VALUES (178,'Tiro tempestad',2,1,1,0,'HP','-(1.9*atk+(2.6*atk+number(1,1000))*k)','200+200*k','','','35+20*k','-(1.9*atk+(2.6*atk+number(1,1000))*k)','','ATTACK,SPLASH,USE_ARROW_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'RANGE',4,'1',2500,500);
REPLACE INTO `skill_proto` VALUES (179,'Golpe infernal',3,1,1,0,'HP','-(1.9*atk+(2.6*atk+number(1,1000))*k)','200+200*k','','','35+20*k','-(1.9*atk+(2.6*atk+number(1,1000))*k)','','ATTACK,USE_MELEE_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MELEE',4,'1',0,0);
REPLACE INTO `skill_proto` VALUES (180,'Onda letal',3,1,1,0,'HP','-(120+6*lv+(5*con+5*dex+30*iq+number(1,1000)+9*mwep)*ar*k)','200+200*k','','','35+20*k','-(120+6*lv+(5*con+5*dex+30*iq+number(1,1000)+9*mwep)*ar*k)','','ATTACK,COMPUTE_MAGIC_DAMAGE,SPLASH,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MAGIC',5,'1',2000,200);
REPLACE INTO `skill_proto` VALUES (181,'Meteoro',4,1,1,0,'HP','-(120+6*lv+(5*con+5*dex+30*iq+number(1,1000)+9*mwep)*ar*k)','200+200*k','','','35+20*k','-(120+6*lv+(5*con+5*dex+30*iq+number(1,1000)+9*mwep)*ar*k)','','ATTACK,SPLASH,ATTACK_FIRE_CONT,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MAGIC',5,'1',2000,500);
REPLACE INTO `skill_proto` VALUES (182,'Escudo etereo',4,1,1,0,'NONE','0.4*k+(18*k)','200+200*k','50+(8*k)','','386+(80*k)','0.4*k+(18*k)','','DISABLE_BY_POINT_UP,PARTY','CHEONUN','NONE','','','YMIR','NONE','','','',0,0,'NORMAL',1,'1',2500,0);
REPLACE INTO `skill_proto` VALUES (183,'Golpe de garra',7,1,1,0,'HP','-(2.3*atk+(4*atk+str*4+con)*k)','200+200*k','','','35+20*k','-(2.3*atk+(4*atk+str*4+con)*k)','','ATTACK,USE_MELEE_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MELEE',8,'1',0,200);