diff options
-rw-r--r-- | src/map/atcommand.cpp | 153 | ||||
-rw-r--r-- | src/map/battle.cpp | 346 | ||||
-rw-r--r-- | src/map/battle.hpp | 10 | ||||
-rw-r--r-- | src/map/pc.cpp | 69 | ||||
-rw-r--r-- | src/map/skill.cpp | 59 | ||||
-rw-r--r-- | src/map/skill.hpp | 14 | ||||
-rw-r--r-- | src/mmo/clif.t.hpp | 55 |
7 files changed, 479 insertions, 227 deletions
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp index b4faed5..f5ca72d 100644 --- a/src/map/atcommand.cpp +++ b/src/map/atcommand.cpp @@ -1687,6 +1687,17 @@ ATCE atcommand_exprate(Session *s, dumb_ptr<map_session_data>, } static +ATCE atcommand_rates(Session *s, dumb_ptr<map_session_data>, + ZString message) +{ + AString output = STRPRINTF("Experience rates: Base %d%% / Job %d%%"_fmt, battle_config.base_exp_rate, battle_config.job_exp_rate); + clif_displaymessage(s, output); + output = STRPRINTF("Drop rate: 100%%"_fmt); + clif_displaymessage(s, output); + return ATCE::OKAY; +} + +static ATCE atcommand_pvpon(Session *s, dumb_ptr<map_session_data> sd, ZString) { @@ -1827,7 +1838,6 @@ ATCE atcommand_mobinfo(Session *s, dumb_ptr<map_session_data> sd, { MobName name; Species mob_id; - int exp; if (!extract(message, &name) || !name) return ATCE::USAGE; @@ -2448,7 +2458,138 @@ ATCE atcommand_character_stats(Session *s, dumb_ptr<map_session_data>, return ATCE::EXIST; } - return ATCE::USAGE; + return ATCE::OKAY; +} + +static +ATCE atcommand_character_stats_full(Session *s, dumb_ptr<map_session_data>, + ZString message) +{ + CharName character; + + if (!asplit(message, &character)) + return ATCE::USAGE; + + dumb_ptr<map_session_data> pl_sd = map_nick2sd(character); + if (pl_sd != nullptr) + { + AString output; + output = STRPRINTF("------ Character Status Full ------"_fmt); + clif_displaymessage(s, output); + output = STRPRINTF( + "Char-Name: %s | BLvl: %d | Job: Novice/Human (Lvl: %d) | HP: %d/%d | SP: %d/%d | Zeny: %d"_fmt, + pl_sd->status_key.name, pl_sd->status.base_level, + pl_sd->status.job_level, + pl_sd->status.hp, pl_sd->status.max_hp, + pl_sd->status.sp, pl_sd->status.max_sp, + pl_sd->status.zeny); + clif_displaymessage(s, output); + output = STRPRINTF("Base-Stats: STR: %d | AGI: %d | VIT: %d | INT: %d | DEX: %d | LUK: %d"_fmt, + pl_sd->status.attrs[ATTR::STR], + pl_sd->status.attrs[ATTR::AGI], + pl_sd->status.attrs[ATTR::VIT], + pl_sd->status.attrs[ATTR::INT], + pl_sd->status.attrs[ATTR::DEX], + pl_sd->status.attrs[ATTR::LUK]); + clif_displaymessage(s, output); + output = STRPRINTF("Equipment-Stats (parame): STR: %d | AGI: %d | VIT: %d | INT: %d | DEX: %d | LUK: %d"_fmt, + pl_sd->parame[ATTR::STR], + pl_sd->parame[ATTR::AGI], + pl_sd->parame[ATTR::VIT], + pl_sd->parame[ATTR::INT], + pl_sd->parame[ATTR::DEX], + pl_sd->parame[ATTR::LUK]); + clif_displaymessage(s, output); + output = STRPRINTF("Full-Stats (paramc): STR: %d | AGI: %d | VIT: %d | INT: %d | DEX: %d | LUK: %d"_fmt, + pl_sd->paramc[ATTR::STR], + pl_sd->paramc[ATTR::AGI], + pl_sd->paramc[ATTR::VIT], + pl_sd->paramc[ATTR::INT], + pl_sd->paramc[ATTR::DEX], + pl_sd->paramc[ATTR::LUK]); + clif_displaymessage(s, output); + // paramb seems to be unused atm + output = STRPRINTF("paramb: STR: %d | AGI: %d | VIT: %d | INT: %d | DEX: %d | LUK: %d"_fmt, + pl_sd->paramb[ATTR::STR], + pl_sd->paramb[ATTR::AGI], + pl_sd->paramb[ATTR::VIT], + pl_sd->paramb[ATTR::INT], + pl_sd->paramb[ATTR::DEX], + pl_sd->paramb[ATTR::LUK]); + clif_displaymessage(s, output); + output = STRPRINTF("paramcard: STR: %d | AGI: %d | VIT: %d | INT: %d | DEX: %d | LUK: %d"_fmt, + pl_sd->paramcard[ATTR::STR], + pl_sd->paramcard[ATTR::AGI], + pl_sd->paramcard[ATTR::VIT], + pl_sd->paramcard[ATTR::INT], + pl_sd->paramcard[ATTR::DEX], + pl_sd->paramcard[ATTR::LUK]); + clif_displaymessage(s, output); + output = STRPRINTF("BASE_ATK: %d | ATK1: %d | ATK2: %d | ATK_RATE: %d | MATK1: %d | MATK2: %d | MATK_RATE: %d"_fmt, + pl_sd->base_atk, + pl_sd->watk, + pl_sd->watk2, + pl_sd->atk_rate, + pl_sd->matk1, + pl_sd->matk2, + pl_sd->matk_rate); + clif_displaymessage(s, output); + output = STRPRINTF("ATTACKRANGE: %d | CRITICAL_DEF: %d | FLEE1: %d | FLEE_RATE: %d | FLEE2: %d | FLEE2_RATE: %d"_fmt, + pl_sd->attackrange, + pl_sd->critical_def, + pl_sd->flee, + pl_sd->flee_rate, + pl_sd->flee2, + pl_sd->flee2_rate); + clif_displaymessage(s, output); + output = STRPRINTF("MDEF1: %d | MDEF_RATE: %d | MDEF2: %d | MDEF2_RATE: %d | DEF1: %d | DEF_RATE: %d | DEF2: %d | DEF2_RATE: %d"_fmt, + pl_sd->mdef, + pl_sd->mdef_rate, + pl_sd->mdef2, + pl_sd->mdef2_rate, + pl_sd->def, + pl_sd->def_rate, + pl_sd->def2, + pl_sd->def2_rate); + clif_displaymessage(s, output); + output = STRPRINTF("ADD_SPEED: %d | SPEED_RATE: %d | SPEED_ADDRATE: %d | ASPD: %d | ASPD_RATE: %d | ASPD_ADDRATE: %d"_fmt, + pl_sd->speed.count(), + pl_sd->speed_rate, + pl_sd->speed_add_rate, + pl_sd->aspd.count(), + pl_sd->aspd_rate, + pl_sd->aspd_add_rate); + clif_displaymessage(s, output); + output = STRPRINTF("MAXHPRATE: %d | HP_RECOV_RATE: %d | MAXSPRATE: %d | SP_RECOV_RATE: %d | DOUBLE_RATE: %d | DOUBLE_ADD_RATE: %d"_fmt, + pl_sd->hprate, + pl_sd->hprecov_rate, + pl_sd->sprate, + pl_sd->sprecov_rate, + pl_sd->double_rate, + pl_sd->double_add_rate); + clif_displaymessage(s, output); + output = STRPRINTF("PERFECT_HIT_RATE: %d | PERFECT_HIT_ADD_RATE: %d | CRITICAL: %d | CRITICAL_RATE: %d | HIT: %d | HIT_RATE: %d"_fmt, + pl_sd->perfect_hit, + pl_sd->perfect_hit_add, + pl_sd->critical, + pl_sd->critical_rate, + pl_sd->hit, + pl_sd->hit_rate); + clif_displaymessage(s, output); + output = STRPRINTF("HP_DRAIN_RATE: %d | HP_DRAIN_RATE per: %d | SP_DRAIN_RATE: %d | SP_DRAIN_RATE per: %d"_fmt, + pl_sd->hp_drain_rate, + pl_sd->hp_drain_per, + pl_sd->sp_drain_rate, + pl_sd->sp_drain_per); + clif_displaymessage(s, output); + } + else + { + clif_displaymessage(s, "Character not found."_s); + return ATCE::EXIST; + } + + return ATCE::OKAY; } static @@ -5448,6 +5589,9 @@ Map<XString, AtCommandInfo> atcommand_info = {"exprate"_s, {"<percent>"_s, 60, atcommand_exprate, "Set base job/exp rate"_s}}, + {"rates"_s, {""_s, + 0, atcommand_rates, + "Show base job/exp rate"_s}}, {"pvpon"_s, {""_s, 60, atcommand_pvpon, "Disable PvP on your map"_s}}, @@ -5509,7 +5653,10 @@ Map<XString, AtCommandInfo> atcommand_info = 60, atcommand_revive, "Restore a player to full health"_s}}, {"charstats"_s, {"<charname>"_s, - 40, atcommand_character_stats, + 60, atcommand_character_stats, + "Show a bunch of stats about a single user"_s}}, + {"charstatsfull"_s, {"<charname>"_s, + 60, atcommand_character_stats_full, "Show a bunch of stats about a single user"_s}}, {"charstatsall"_s, {""_s, 60, atcommand_character_stats_all, diff --git a/src/map/battle.cpp b/src/map/battle.cpp index df01a5c..52be591 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -60,6 +60,8 @@ namespace map /*========================================== * 自分をロックしている対象の数を返す(汎用) * 戻りは整数で0以上 + * Returns the number of targets that have locked me (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ static @@ -78,6 +80,8 @@ int battle_counttargeted(dumb_ptr<block_list> bl, dumb_ptr<block_list> src, /*========================================== * 対象のClassを返す(汎用) * 戻りは整数で0以上 + * Returns the target Class (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ Species battle_get_class(dumb_ptr<block_list> bl) @@ -96,6 +100,8 @@ Species battle_get_class(dumb_ptr<block_list> bl) /*========================================== * 対象の方向を返す(汎用) * 戻りは整数で0以上 + * Returns the direction of the target (generic) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ DIR battle_get_dir(dumb_ptr<block_list> bl) @@ -112,6 +118,8 @@ DIR battle_get_dir(dumb_ptr<block_list> bl) /*========================================== * 対象のレベルを返す(汎用) * 戻りは整数で0以上 + * Returns target level (generic) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_lv(dumb_ptr<block_list> bl) @@ -128,6 +136,8 @@ int battle_get_lv(dumb_ptr<block_list> bl) /*========================================== * 対象の射程を返す(汎用) * 戻りは整数で0以上 + * Returns target's range (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_range(dumb_ptr<block_list> bl) @@ -146,6 +156,8 @@ int battle_get_range(dumb_ptr<block_list> bl) /*========================================== * 対象のHPを返す(汎用) * 戻りは整数で0以上 + * Returns target's HP (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_hp(dumb_ptr<block_list> bl) @@ -162,6 +174,8 @@ int battle_get_hp(dumb_ptr<block_list> bl) /*========================================== * 対象のMHPを返す(汎用) * 戻りは整数で0以上 + * Return the target MHP (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_max_hp(dumb_ptr<block_list> bl) @@ -186,6 +200,11 @@ int battle_get_max_hp(dumb_ptr<block_list> bl) } } +/*========================================== + * Return the name of the target + * Returns an string + *------------------------------------------ + */ VString<23> battle_get_name(dumb_ptr<block_list> bl) { VString<23> name; @@ -215,6 +234,8 @@ VString<23> battle_get_name(dumb_ptr<block_list> bl) /*========================================== * 対象のStrを返す(汎用) * 戻りは整数で0以上 + * Returns the target Str (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_str(dumb_ptr<block_list> bl) @@ -237,6 +258,8 @@ int battle_get_str(dumb_ptr<block_list> bl) /*========================================== * 対象のAgiを返す(汎用) * 戻りは整数で0以上 + * Returns target Agi (generic) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ @@ -260,6 +283,8 @@ int battle_get_agi(dumb_ptr<block_list> bl) /*========================================== * 対象のVitを返す(汎用) * 戻りは整数で0以上 + * Returns target Vit (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_vit(dumb_ptr<block_list> bl) @@ -282,6 +307,8 @@ int battle_get_vit(dumb_ptr<block_list> bl) /*========================================== * 対象のIntを返す(汎用) * 戻りは整数で0以上 + * Returns target Int (generic) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_int(dumb_ptr<block_list> bl) @@ -304,6 +331,8 @@ int battle_get_int(dumb_ptr<block_list> bl) /*========================================== * 対象のDexを返す(汎用) * 戻りは整数で0以上 + * Returns the target Dex (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_dex(dumb_ptr<block_list> bl) @@ -326,6 +355,8 @@ int battle_get_dex(dumb_ptr<block_list> bl) /*========================================== * 対象のLukを返す(汎用) * 戻りは整数で0以上 + * Returns target Luk (generic) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_luk(dumb_ptr<block_list> bl) @@ -348,6 +379,8 @@ int battle_get_luk(dumb_ptr<block_list> bl) /*========================================== * 対象のFleeを返す(汎用) * 戻りは整数で1以上 + * Returns target Flee (general purpose) + * Returns an integer greater than or equal to 1 *------------------------------------------ */ int battle_get_flee(dumb_ptr<block_list> bl) @@ -376,6 +409,8 @@ int battle_get_flee(dumb_ptr<block_list> bl) /*========================================== * 対象のHitを返す(汎用) * 戻りは整数で1以上 + * Returns target hit (general purpose) + * Returns an integer greater than or equal to 1 *------------------------------------------ */ int battle_get_hit(dumb_ptr<block_list> bl) @@ -403,6 +438,8 @@ int battle_get_hit(dumb_ptr<block_list> bl) /*========================================== * 対象の完全回避を返す(汎用) * 戻りは整数で1以上 + * Returns full avoidance of the target (general purpose) + * Returns an integer greater than or equal to 1 *------------------------------------------ */ int battle_get_flee2(dumb_ptr<block_list> bl) @@ -434,6 +471,8 @@ int battle_get_flee2(dumb_ptr<block_list> bl) /*========================================== * 対象のクリティカルを返す(汎用) * 戻りは整数で1以上 + * Returns target critical (general purpose) + * Returns an integer greater than or equal to 1 *------------------------------------------ */ int battle_get_critical(dumb_ptr<block_list> bl) @@ -460,6 +499,8 @@ int battle_get_critical(dumb_ptr<block_list> bl) /*========================================== * base_atkの取得 * 戻りは整数で1以上 + * get base_atk + * Returns an integer greater than or equal to 1 *------------------------------------------ */ int battle_get_baseatk(dumb_ptr<block_list> bl) @@ -470,22 +511,24 @@ int battle_get_baseatk(dumb_ptr<block_list> bl) nullpo_retr(1, bl); sc_data = battle_get_sc_data(bl); if (bl->bl_type == BL::PC) - batk = bl->is_player()->base_atk; //設定されているbase_atk + batk = bl->is_player()->base_atk; // 設定されているbase_atk | set base_atk else - { //それ以外なら + { // それ以外なら | otherwise int str, dstr; - str = battle_get_str(bl); //STR + str = battle_get_str(bl); // STR dstr = str / 10; - batk = dstr * dstr + str; //base_atkを計算する + batk = dstr * dstr + str; // base_atkを計算する | Calculate base_atk } if (batk < 1) - batk = 1; //base_atkは最低でも1 + batk = 1; // base_atkは最低でも1 | base_atk is at least 1 return batk; } /*========================================== * 対象のAtkを返す(汎用) * 戻りは整数で0以上 + * Returns target Atk (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_atk(dumb_ptr<block_list> bl) @@ -508,6 +551,8 @@ int battle_get_atk(dumb_ptr<block_list> bl) /*========================================== * 対象のAtk2を返す(汎用) * 戻りは整数で0以上 + * Returns target Atk2 (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_atk2(dumb_ptr<block_list> bl) @@ -530,6 +575,8 @@ int battle_get_atk2(dumb_ptr<block_list> bl) /*========================================== * 対象のMAtk1を返す(汎用) * 戻りは整数で0以上 + * Returns target MAtk1 (generic) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_matk1(dumb_ptr<block_list> bl) @@ -553,6 +600,8 @@ int battle_get_matk1(dumb_ptr<block_list> bl) /*========================================== * 対象のMAtk2を返す(汎用) * 戻りは整数で0以上 + * Returns target MAtk2 (generic) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_matk2(dumb_ptr<block_list> bl) @@ -574,6 +623,8 @@ int battle_get_matk2(dumb_ptr<block_list> bl) /*========================================== * 対象のDefを返す(汎用) * 戻りは整数で0以上 + * Returns the target Def (general purpose) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_def(dumb_ptr<block_list> bl) @@ -596,7 +647,7 @@ int battle_get_def(dumb_ptr<block_list> bl) { if (sc_data) { - //毒にかかっている時は減算 + // 毒にかかっている時は減算 | Subtract when poisoned if (sc_data[StatusChange::SC_POISON].timer && bl->bl_type != BL::PC) def = def * 75 / 100; @@ -610,6 +661,8 @@ int battle_get_def(dumb_ptr<block_list> bl) /*========================================== * 対象のMDefを返す(汎用) * 戻りは整数で0以上 + * Return target MDef (generic) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_mdef(dumb_ptr<block_list> bl) @@ -628,7 +681,7 @@ int battle_get_mdef(dumb_ptr<block_list> bl) { if (sc_data) { - //バリアー状態時はMDEF100 + // バリアー状態時はMDEF100 | MDEF100 when in barrier state if (mdef < 90 && sc_data[StatusChange::SC_MBARRIER].timer) { mdef += sc_data[StatusChange::SC_MBARRIER].val1; @@ -645,6 +698,8 @@ int battle_get_mdef(dumb_ptr<block_list> bl) /*========================================== * 対象のDef2を返す(汎用) * 戻りは整数で1以上 + * Returns target Def2 (generic) + * Returns an integer greater than or equal to 1 *------------------------------------------ */ int battle_get_def2(dumb_ptr<block_list> bl) @@ -673,6 +728,8 @@ int battle_get_def2(dumb_ptr<block_list> bl) /*========================================== * 対象のMDef2を返す(汎用) * 戻りは整数で0以上 + * Returns target MDef2 (generic) + * Returns an integer greater than or equal to 0 *------------------------------------------ */ int battle_get_mdef2(dumb_ptr<block_list> bl) @@ -700,6 +757,9 @@ int battle_get_mdef2(dumb_ptr<block_list> bl) * 対象のSpeed(移動速度)を返す(汎用) * 戻りは整数で1以上 * Speedは小さいほうが移動速度が速い + * Returns the target Speed (moving speed) (general purpose) + * Returns an integer greater than or equal to 1 + * The smaller the Speed, the faster the movement speed. *------------------------------------------ */ interval_t battle_get_speed(dumb_ptr<block_list> bl) @@ -720,6 +780,8 @@ interval_t battle_get_speed(dumb_ptr<block_list> bl) /*========================================== * 対象のaDelay(攻撃時ディレイ)を返す(汎用) * aDelayは小さいほうが攻撃速度が速い + * Returns target's aDelay (delay when attacking) (general purpose) + * Smaller aDelay means faster attack speed *------------------------------------------ */ // TODO figure out what all the doubling is about @@ -751,6 +813,10 @@ interval_t battle_get_adelay(dumb_ptr<block_list> bl) } } +/*========================================== + * + *------------------------------------------ + */ interval_t battle_get_amotion(dumb_ptr<block_list> bl) { nullpo_retr(2_s, bl); @@ -778,6 +844,10 @@ interval_t battle_get_amotion(dumb_ptr<block_list> bl) } } +/*========================================== + * + *------------------------------------------ + */ interval_t battle_get_dmotion(dumb_ptr<block_list> bl) { nullpo_retr(interval_t::zero(), bl); @@ -793,17 +863,25 @@ interval_t battle_get_dmotion(dumb_ptr<block_list> bl) return 2_s; } +/*========================================== + * + *------------------------------------------ + */ LevelElement battle_get_element(dumb_ptr<block_list> bl) { LevelElement ret = {2, Element::neutral}; nullpo_retr(ret, bl); - if (bl->bl_type == BL::MOB) // 10の位=Lv*2、1の位=属性 + if (bl->bl_type == BL::MOB) // 10の位=Lv*2、1の位=属性 | Ten's place = Lv*2, One's place = Attribute ret = bl->is_mob()->def_ele; return ret; } +/*========================================== + * + *------------------------------------------ + */ PartyId battle_get_party_id(dumb_ptr<block_list> bl) { nullpo_retr(PartyId(), bl); @@ -819,6 +897,10 @@ PartyId battle_get_party_id(dumb_ptr<block_list> bl) return PartyId(); } +/*========================================== + * + *------------------------------------------ + */ Race battle_get_race(dumb_ptr<block_list> bl) { nullpo_retr(Race::formless, bl); @@ -830,15 +912,23 @@ Race battle_get_race(dumb_ptr<block_list> bl) return Race::formless; } +/*========================================== + * + *------------------------------------------ + */ MobMode battle_get_mode(dumb_ptr<block_list> bl) { nullpo_retr(MobMode::CAN_MOVE, bl); if (bl->bl_type == BL::MOB) return get_mob_db(bl->is_mob()->mob_class).mode; - // とりあえず動くということで1 + // とりあえず動くということで1 | For the time being, it will move 1 return MobMode::CAN_MOVE; } +/*========================================== + * + *------------------------------------------ + */ int battle_get_stat(SP stat_id, dumb_ptr<block_list> bl) { switch (stat_id) @@ -860,7 +950,11 @@ int battle_get_stat(SP stat_id, dumb_ptr<block_list> bl) } } -// StatusChange系の所得 +/*========================================== + * + *------------------------------------------ + */ +// StatusChange系の所得 | StatusChange Income eptr<struct status_change, StatusChange, StatusChange::MAX_STATUSCHANGE> battle_get_sc_data(dumb_ptr<block_list> bl) { nullpo_retr(nullptr, bl); @@ -875,6 +969,10 @@ eptr<struct status_change, StatusChange, StatusChange::MAX_STATUSCHANGE> battle_ return nullptr; } +/*========================================== + * + *------------------------------------------ + */ Opt1 *battle_get_opt1(dumb_ptr<block_list> bl) { nullpo_retn(bl); @@ -887,6 +985,10 @@ Opt1 *battle_get_opt1(dumb_ptr<block_list> bl) return nullptr; } +/*========================================== + * + *------------------------------------------ + */ Opt2 *battle_get_opt2(dumb_ptr<block_list> bl) { nullpo_retn(bl); @@ -899,6 +1001,10 @@ Opt2 *battle_get_opt2(dumb_ptr<block_list> bl) return nullptr; } +/*========================================== + * + *------------------------------------------ + */ Opt3 *battle_get_opt3(dumb_ptr<block_list> bl) { nullpo_retn(bl); @@ -911,6 +1017,10 @@ Opt3 *battle_get_opt3(dumb_ptr<block_list> bl) return nullptr; } +/*========================================== + * + *------------------------------------------ + */ Opt0 *battle_get_option(dumb_ptr<block_list> bl) { nullpo_retn(bl); @@ -925,7 +1035,11 @@ Opt0 *battle_get_option(dumb_ptr<block_list> bl) //------------------------------------------------------------------- -// ダメージの遅延 +/*========================================== + * + *------------------------------------------ + */ +// ダメージの遅延 | damage delay struct battle_delay_damage_ { dumb_ptr<block_list> src, *target; @@ -933,11 +1047,15 @@ struct battle_delay_damage_ int flag; }; -// 実際にHPを操作 +/*========================================== + * + *------------------------------------------ + */ +// 実際にHPを操作 | Actually operate HP int battle_damage(dumb_ptr<block_list> bl, dumb_ptr<block_list> target, int damage, int flag) { - nullpo_retz(target); //blはNULLで呼ばれることがあるので他でチェック + nullpo_retz(target); // blはNULLで呼ばれることがあるので他でチェック | bl may be called with NULL, so check elsewhere if (damage == 0) return 0; @@ -957,7 +1075,7 @@ int battle_damage(dumb_ptr<block_list> bl, dumb_ptr<block_list> target, if (target->bl_type == BL::MOB) { // MOB dumb_ptr<mob_data> md = target->is_mob(); - if (md && md->skilltimer && md->state.skillcastcancel) // 詠唱妨害 + if (md && md->skilltimer && md->state.skillcastcancel) // 詠唱妨害 | chant obstruction skill_castcancel(target, 0); return mob_damage(bl, md, damage, 0); } @@ -972,10 +1090,14 @@ int battle_damage(dumb_ptr<block_list> bl, dumb_ptr<block_list> target, return 0; } +/*========================================== + * + *------------------------------------------ + */ int battle_heal(dumb_ptr<block_list> bl, dumb_ptr<block_list> target, int hp, int sp, int flag) { - nullpo_retz(target); //blはNULLで呼ばれることがあるので他でチェック + nullpo_retz(target); // blはNULLで呼ばれることがあるので他でチェック | bl may be called with NULL, so check elsewhere if (target->bl_type == BL::PC && pc_isdead(target->is_player())) @@ -993,7 +1115,11 @@ int battle_heal(dumb_ptr<block_list> bl, dumb_ptr<block_list> target, int hp, return 0; } -// 攻撃停止 +/*========================================== + * + *------------------------------------------ + */ +// 攻撃停止 | stop attack int battle_stopattack(dumb_ptr<block_list> bl) { nullpo_retz(bl); @@ -1006,6 +1132,7 @@ int battle_stopattack(dumb_ptr<block_list> bl) /*========================================== * ダメージ最終計算 + * Final damage calculation *------------------------------------------ */ static @@ -1032,12 +1159,16 @@ int battle_calc_damage(dumb_ptr<block_list>, dumb_ptr<block_list> bl, damage = 3; } - if (md != nullptr && md->hp > 0 && damage > 0) // 反撃などのMOBスキル判定 + if (md != nullptr && md->hp > 0 && damage > 0) // 反撃などのMOBスキル判定 | MOB skill judgment such as counterattack mobskill_event(md, flag); return damage; } +/*========================================== + * + *------------------------------------------ + */ static struct Damage battle_calc_mob_weapon_attack(dumb_ptr<block_list> src, dumb_ptr<block_list> target, @@ -1074,9 +1205,9 @@ struct Damage battle_calc_mob_weapon_attack(dumb_ptr<block_list> src, MobMode t_mode = battle_get_mode(target); t_sc_data = battle_get_sc_data(target); - flag = BF::SHORT | BF::WEAPON | BF::NORMAL; // 攻撃の種類の設定 + flag = BF::SHORT | BF::WEAPON | BF::NORMAL; // 攻撃の種類の設定 | attack type settings - // 回避率計算、回避判定は後で + // 回避率計算、回避判定は後で | Evasion rate calculation, avoidance judgment later flee = battle_get_flee(target); if (battle_config.agi_penaly_type > 0 || battle_config.vit_penaly_type > 0) @@ -1140,8 +1271,8 @@ struct Damage battle_calc_mob_weapon_attack(dumb_ptr<block_list> src, if ((skill_num == SkillID::ZERO) && skill_lv >= 0 && battle_config.enemy_critical && random_::chance({cri, 1000})) - // 判定(スキルの場合は無視) - // 敵の判定 + // 判定(スキルの場合は無視) | Judgment (ignored for skills) + // 敵の判定 | judgment of the enemy { damage += atkmax; type = DamageType::CRITICAL; @@ -1161,10 +1292,10 @@ struct Damage battle_calc_mob_weapon_attack(dumb_ptr<block_list> src, } { - // 対 象の防御力によるダメージの減少 - // ディバインプロテクション(ここでいいのかな?) + // 対 象の防御力によるダメージの減少 | Decreased damage due to target's defense + // ディバインプロテクション(ここでいいのかな?) | Divine Protection (maybe here?) if (def1 < 1000000) - { //DEF, VIT無視 + { // DEF, VIT無視 | DEF, VIT ignore int t_def; target_count = 1 + battle_counttargeted(target, src, @@ -1233,11 +1364,11 @@ struct Damage battle_calc_mob_weapon_attack(dumb_ptr<block_list> src, } } - // 0未満だった場合1に補正 + // 0未満だった場合1に補正 | Corrected to 1 if less than 0 if (damage < 1) damage = 1; - // 回避修正 + // 回避修正 | avoidance fix if (hitrate < 1000000) hitrate = ((hitrate > 95) ? 95 : ((hitrate < 5) ? 5 : hitrate)); @@ -1254,7 +1385,7 @@ struct Damage battle_calc_mob_weapon_attack(dumb_ptr<block_list> src, if (damage < 0) damage = 0; - // 完全回避の判定 + // 完全回避の判定 | Judgment of complete avoidance if (skill_num == SkillID::ZERO && skill_lv >= 0 && tsd != nullptr && random_::chance({battle_get_flee2(target), 1000})) { @@ -1291,6 +1422,10 @@ struct Damage battle_calc_mob_weapon_attack(dumb_ptr<block_list> src, return wd; } +/*========================================== + * + *------------------------------------------ + */ int battle_is_unarmed(dumb_ptr<block_list> bl) { if (!bl) @@ -1310,6 +1445,7 @@ int battle_is_unarmed(dumb_ptr<block_list> bl) /* * ========================================================================= * PCの武器による攻撃 + * Attack with PC weapons *------------------------------------------------------------------------- */ static @@ -1341,47 +1477,47 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, nullpo_retr(wd, target); nullpo_retr(wd, sd); - // アタッカー - sc_data = battle_get_sc_data(src); //ステータス異常 + // アタッカー | attacker + sc_data = battle_get_sc_data(src); // ステータス異常 | Abnormal status - sd->state.attack_type = BF::WEAPON; //攻撃タイプは武器攻撃 + sd->state.attack_type = BF::WEAPON; // 攻撃タイプは武器攻撃 | Attack type is weapon attack // ターゲット - if (target->bl_type == BL::PC) //対象がPCなら - tsd = target->is_player(); //tsdに代入(tmdはNULL) - else if (target->bl_type == BL::MOB) //対象がMobなら - tmd = target->is_mob(); //tmdに代入(tsdはNULL) - MobMode t_mode = battle_get_mode(target); //対象のMode - t_sc_data = battle_get_sc_data(target); //対象のステータス異常 + if (target->bl_type == BL::PC) // 対象がPCなら | If the target is a PC + tsd = target->is_player(); // tsdに代入(tmdはNULL) | Assign to tsd (tmd is NULL) + else if (target->bl_type == BL::MOB) // 対象がMobなら | If the target is a mob + tmd = target->is_mob(); // tmdに代入(tsdはNULL) | Assign to tmd (tsd is NULL) + MobMode t_mode = battle_get_mode(target); // 対象のMode | Target Mode + t_sc_data = battle_get_sc_data(target); // 対象のステータス異常 | Target status ailment - flag = BF::SHORT | BF::WEAPON | BF::NORMAL; // 攻撃の種類の設定 + flag = BF::SHORT | BF::WEAPON | BF::NORMAL; // 攻撃の種類の設定 | attack type settings - // 回避率計算、回避判定は後で + // 回避率計算、回避判定は後で | Evasion rate calculation, avoidance judgment later flee = battle_get_flee(target); - if (battle_config.agi_penaly_type > 0 || battle_config.vit_penaly_type > 0) //AGI、VITペナルティ設定が有効 + if (battle_config.agi_penaly_type > 0 || battle_config.vit_penaly_type > 0) // AGI、VITペナルティ設定が有効 | AGI and VIT penalty settings are enabled target_count += battle_counttargeted(target, src, - battle_config.agi_penaly_count_lv); //対象の数を算出 + battle_config.agi_penaly_count_lv); // 対象の数を算出 | Calculate the number of targets if (battle_config.agi_penaly_type > 0) { if (target_count >= battle_config.agi_penaly_count) - { //ペナルティ設定より対象が多い - if (battle_config.agi_penaly_type == 1) //回避率がagi_penaly_num%ずつ減少 + { // ペナルティ設定より対象が多い | More targets than penalty setting + if (battle_config.agi_penaly_type == 1) // 回避率がagi_penaly_num%ずつ減少 | Evasion rate decreased by agi_penaly_num% flee = (flee * (100 - (target_count - (battle_config.agi_penaly_count - 1)) * battle_config.agi_penaly_num)) / 100; - else if (battle_config.agi_penaly_type == 2) //回避率がagi_penaly_num分減少 + else if (battle_config.agi_penaly_type == 2) // 回避率がagi_penaly_num分減少 | Avoidance rate is reduced flee -= (target_count - (battle_config.agi_penaly_count - 1)) * battle_config.agi_penaly_num; if (flee < 1) - flee = 1; //回避率は最低でも1 + flee = 1; // 回避率は最低でも1 | Evasion rate is at least 1 } } - hitrate = battle_get_hit(src) - flee + 80; //命中率計算 + hitrate = battle_get_hit(src) - flee + 80; // 命中率計算 | hit rate calculation { // [fate] Reduce hit chance by distance int dx = abs(src->bl_x - target->bl_x); @@ -1395,25 +1531,25 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, } dex = battle_get_dex(src); //DEX - watk = battle_get_atk(src); //ATK + watk = battle_get_atk(src); //ATK type = DamageType::NORMAL; - div_ = 1; // single attack + div_ = 1; // single attack { - damage = battle_get_baseatk(sd); //damega,damega2初登場、base_atkの取得 + damage = battle_get_baseatk(sd); // damega,damega2初登場、base_atkの取得 | First appearance of damega and damega2, acquisition of base_atk } if (sd->attackrange > 2) { // [fate] ranged weapon? - const int range_damage_bonus = 80; // up to 31.25% bonus for long-range hit + const int range_damage_bonus = 80; // up to 31.25% bonus for long-range hit damage = damage * (256 + ((range_damage_bonus * target_distance) / sd->attackrange)) >> 8; } - atkmin = dex; //最低ATKはDEXで初期化? - sd->state.arrow_atk = 0; //arrow_atk初期化 + atkmin = dex; // 最低ATKはDEXで初期化? | Minimum ATK initialized with DEX? + sd->state.arrow_atk = 0; // arrow_atk初期化 | arrow_atk initialization IOff0 widx = sd->equip_index_maybe[EQUIP::WEAPON]; @@ -1426,10 +1562,10 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, OMATCH_END (); } if (sd->status.weapon == ItemLook::BOW) - { //武器が弓矢の場合 - atkmin = watk * ((atkmin < watk) ? atkmin : watk) / 100; //弓用最低ATK計算 - flag = (flag & ~BF::RANGEMASK) | BF::LONG; //遠距離攻撃フラグを有効 - sd->state.arrow_atk = 1; //arrow_atk有効化 + { // 武器が弓矢の場合 | If the weapon is a bow and arrow + atkmin = watk * ((atkmin < watk) ? atkmin : watk) / 100; // 弓用最低ATK計算 | Bows are calculated with minimum ATK + flag = (flag & ~BF::RANGEMASK) | BF::LONG; // 遠距離攻撃フラグを有効 | Enable ranged attack flag + sd->state.arrow_atk = 1; // arrow_atk有効化 | arrow_atk enabled } { @@ -1437,14 +1573,14 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, } if (atkmin > atkmax && !(sd->state.arrow_atk)) - atkmin = atkmax; //弓は最低が上回る場合あり + atkmin = atkmax; // 弓は最低が上回る場合あり | Bow may exceed minimum if (sd->double_rate > 0 && skill_num == SkillID::ZERO && skill_lv >= 0) da = random_::chance({sd->double_rate, 100}); if (!da) - { //ダブルアタックが発動していない - // クリティカル計算 + { // ダブルアタックが発動していない | Double Attack is not activated + // クリティカル計算 | critical calculation cri = battle_get_critical(src); if (sd->state.arrow_atk) @@ -1457,8 +1593,8 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, if (tsd && tsd->critical_def) cri = cri * (100 - tsd->critical_def) / 100; - //ダブルアタックが発動していない - // 判定(スキルの場合は無視) + // ダブルアタックが発動していない | Double Attack is not activated + // 判定(スキルの場合は無視) | Judgment (ignored for skills) if (!da && skill_num == SkillID::ZERO && skill_lv >= 0 && random_::chance({cri, 1000})) { @@ -1497,10 +1633,10 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, } { - // 対 象の防御力によるダメージの減少 - // ディバインプロテクション(ここでいいのかな?) + // 対 象の防御力によるダメージの減少 | Decreased damage due to target's defense + // ディバインプロテクション(ここでいいのかな?) | Divine Protection (maybe here?) if (def1 < 1000000) - { //DEF, VIT無視 + { // DEF, VIT無視 | DEF, VIT ignore int t_def; target_count = 1 + battle_counttargeted(target, src, @@ -1570,18 +1706,18 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, } } } - // 精錬ダメージの追加 - { //DEF, VIT無視 + // 精錬ダメージの追加 | Add refining damage + { // DEF, VIT無視 | DEF, VIT ignore damage += battle_get_atk2(src); } - // 0未満だった場合1に補正 + // 0未満だった場合1に補正 | Corrected to 1 if less than 0 if (damage < 1) damage = 1; - // スキル修正2(修練系) - // 修練ダメージ(右手のみ) ソニックブロー時は別処理(1撃に付き1/8適応) - { //修練ダメージ無視 + // スキル修正2(修練系) | Skill Modification 2 (Training) + // 修練ダメージ(右手のみ) ソニックブロー時は別処理(1撃に付き1/8適応) | Training damage (right hand only) Separate processing during sonic blow (1/8 adaptation per hit) + { //修練ダメージ無視 | Ignores training damage } if (sd->perfect_hit > 0) @@ -1590,7 +1726,7 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, hitrate = 1000000; } - // 回避修正 + // 回避修正 | avoidance fix hitrate = (hitrate < 5) ? 5 : hitrate; if (type == DamageType::NORMAL && !random_::chance({hitrate, 100})) { @@ -1605,15 +1741,15 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, if (damage < 0) damage = 0; - // 右手,短剣のみ + // 右手,短剣のみ | right hand, dagger only if (da) - { //ダブルアタックが発動しているか + { // ダブルアタックが発動しているか | Is double attack activated? div_ = 2; damage += damage; type = DamageType::DOUBLED; } - // 完全回避の判定 + // 完全回避の判定 | Judgment of complete avoidance if (skill_num == SkillID::ZERO && skill_lv >= 0 && tsd != nullptr && div_ < 255 && random_::chance({battle_get_flee2(target), 1000})) { @@ -1622,7 +1758,7 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, dmg_lv = ATK::LUCKY; } - // 対象が完全回避をする設定がONなら + // 対象が完全回避をする設定がONなら | If the setting to completely avoid the target is ON if (battle_config.enemy_perfect_flee) { if (skill_num == SkillID::ZERO && skill_lv >= 0 && tmd != nullptr && div_ < 255 @@ -1634,7 +1770,7 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, } } - //MobのModeに頑強フラグが立っているときの処理 + // MobのModeに頑強フラグが立っているときの処理 | Processing when the stubborn flag is set in the mob's mode if (bool(t_mode & MobMode::PLANT)) { if (damage > 0) @@ -1663,6 +1799,7 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src, /*========================================== * 武器ダメージ計算 + * Weapon damage calculator *------------------------------------------ */ static @@ -1686,6 +1823,7 @@ struct Damage battle_calc_weapon_attack(dumb_ptr<block_list> src, /*========================================== * 魔法ダメージ計算 + * magic damage calculation *------------------------------------------ */ static @@ -1723,7 +1861,7 @@ struct Damage battle_calc_magic_attack(dumb_ptr<block_list> bl, if (normalmagic_flag) { - // 一般魔法ダメージ計算 + // 一般魔法ダメージ計算 | General magic damage calculation if (matk1 > matk2) damage = random_::in(matk2, matk1); else @@ -1752,7 +1890,7 @@ struct Damage battle_calc_magic_attack(dumb_ptr<block_list> bl, if (bool(t_mode & MobMode::PLANT) && damage > 0) damage = 1; - damage = battle_calc_damage(bl, target, damage, div_, skill_num, skill_lv, aflag); // 最終修正 + damage = battle_calc_damage(bl, target, damage, div_, skill_num, skill_lv, aflag); // 最終修正 | final revision md.damage = damage; md.div_ = div_; @@ -1766,6 +1904,7 @@ struct Damage battle_calc_magic_attack(dumb_ptr<block_list> bl, /*========================================== * その他ダメージ計算 + * Other damage calculation *------------------------------------------ */ static @@ -1792,7 +1931,7 @@ struct Damage battle_calc_misc_attack(dumb_ptr<block_list> bl, switch (skill_num) { - case SkillID::NPC_SELFDESTRUCTION: // 自爆 + case SkillID::NPC_SELFDESTRUCTION: // 自爆 | blew up damage = battle_get_hp(bl) - (bl == target ? 1 : 0); damagefix = 0; break; @@ -1816,7 +1955,7 @@ struct Damage battle_calc_misc_attack(dumb_ptr<block_list> bl, damage = div_; } - damage = battle_calc_damage(bl, target, damage, div_, skill_num, skill_lv, aflag); // 最終修正 + damage = battle_calc_damage(bl, target, damage, div_, skill_num, skill_lv, aflag); // 最終修正 | final revision md.damage = damage; md.div_ = div_; @@ -1830,6 +1969,7 @@ struct Damage battle_calc_misc_attack(dumb_ptr<block_list> bl, /*========================================== * ダメージ計算一括処理用 + * For damage calculation batch processing *------------------------------------------ */ struct Damage battle_calc_attack(BF attack_type, @@ -1861,6 +2001,7 @@ struct Damage battle_calc_attack(BF attack_type, /*========================================== * 通常攻撃処理まとめ + * Normal attack processing summary *------------------------------------------ */ ATK battle_weapon_attack(dumb_ptr<block_list> src, dumb_ptr<block_list> target, @@ -1894,7 +2035,7 @@ ATK battle_weapon_attack(dumb_ptr<block_list> src, dumb_ptr<block_list> target, if (battle_check_target(src, target, BCT_ENEMY) > 0 && battle_check_range(src, target, 0)) { - // 攻撃対象となりうるので攻撃 + // 攻撃対象となりうるので攻撃 | Attack because it can be attacked if (sd && sd->status.weapon == ItemLook::BOW) { IOff0 aidx = sd->equip_index_maybe[EQUIP::ARROW]; @@ -2012,6 +2153,10 @@ ATK battle_weapon_attack(dumb_ptr<block_list> src, dumb_ptr<block_list> target, return wd.dmg_lv; } +/*========================================== + * + *------------------------------------------ + */ bool battle_check_undead(Race race, Element element) { if (battle_config.undead_detect_type == 0) @@ -2035,6 +2180,12 @@ bool battle_check_undead(Race race, Element element) * = 0x20000:全て(ret:1=敵味方両方) * = 0x40000:敵か判定(ret:1=敵) * = 0x50000:パーティーじゃないか判定(ret:1=パーティでない) + * Friend or foe judgment (1=positive, 0=negative, -1=error) + * flag&0xf0000 = 0x00000: determine if it is an enemy (ret: 1 = not an enemy) + * = 0x10000: party judgment (ret: 1 = party member) + * = 0x20000: all (ret: 1 = both friend and foe) + * = 0x40000: Enemy or not (ret: 1 = enemy) + * = 0x50000: Determine if it is not a party (ret: 1 = not a party) *------------------------------------------ */ int battle_check_target(dumb_ptr<block_list> src, dumb_ptr<block_list> target, @@ -2047,7 +2198,7 @@ int battle_check_target(dumb_ptr<block_list> src, dumb_ptr<block_list> target, nullpo_retz(target); if (flag & BCT_ENEMY) - { // 反転フラグ + { // 反転フラグ | reversal flag int ret = battle_check_target(src, target, flag & (BCT_PARTY | BCT_ALL)); if (ret != -1) return !ret; @@ -2066,25 +2217,25 @@ int battle_check_target(dumb_ptr<block_list> src, dumb_ptr<block_list> target, && target->is_player()->invincible_timer) return -1; - // Mobでmaster_idがあってspecial_mob_aiなら、召喚主を求める + // Mobでmaster_idがあってspecial_mob_aiなら、召喚主を求める | If the mob has a master_id and a special_mob_ai, seek the summoner if (src->bl_type == BL::MOB) { dumb_ptr<mob_data> md = src->is_mob(); if (md && md->master_id) { - if (md->master_id == target->bl_id) // 主なら肯定 + if (md->master_id == target->bl_id) // 主なら肯定 | Yes if the main return 1; if (md->state.special_mob_ai) { if (target->bl_type == BL::MOB) - { //special_mob_aiで対象がMob + { // special_mob_aiで対象がMob | special_mob_ai targets mobs dumb_ptr<mob_data> tmd = target->is_mob(); if (tmd) { - if (tmd->master_id != md->master_id) //召喚主が一緒でなければ否定 + if (tmd->master_id != md->master_id) // 召喚主が一緒でなければ否定 | Deny if the summoner is not with you return 0; else - { //召喚主が一緒なので肯定したいけど自爆は否定 + { // 召喚主が一緒なので肯定したいけど自爆は否定 | I want to affirm because the summoner is the same, but I deny suicide bombing if (md->state.special_mob_ai > 2) return 0; else @@ -2098,20 +2249,20 @@ int battle_check_target(dumb_ptr<block_list> src, dumb_ptr<block_list> target, } } - if (src == target || ss == target) // 同じなら肯定 + if (src == target || ss == target) // 同じなら肯定 | Yes if same return 1; if (target->bl_type == BL::PC && pc_isinvisible(target->is_player())) return -1; - if (src->bl_prev == nullptr || // 死んでるならエラー + if (src->bl_prev == nullptr || // 死んでるならエラー | error if dead (src->bl_type == BL::PC && pc_isdead(src->is_player()))) return -1; if ((ss->bl_type == BL::PC && target->bl_type == BL::MOB) || (ss->bl_type == BL::MOB && target->bl_type == BL::PC)) - return 0; // PCvsMOBなら否定 + return 0; // PCvsMOBなら否定 | Negative if PC vs MOB s_p = battle_get_party_id(ss); @@ -2119,14 +2270,14 @@ int battle_check_target(dumb_ptr<block_list> src, dumb_ptr<block_list> target, if (flag & BCT_PARTY) { - if (s_p && t_p && s_p == t_p) // 同じパーティなら肯定(味方) + if (s_p && t_p && s_p == t_p) // 同じパーティなら肯定(味方) | Yes if same party (ally) return 1; - else // パーティ検索なら同じパーティじゃない時点で否定 + else // パーティ検索なら同じパーティじゃない時点で否定 | If it's a party search, deny it when it's not the same party return 0; } if (ss->bl_type == BL::PC && target->bl_type == BL::PC) - { // 両方PVPモードなら否定(敵) + { // 両方PVPモードなら否定(敵) | Deny if both are PVP mode (enemy) if (ss->bl_m->flag.get(MapFlag::PVP) || pc_iskiller(ss->is_player(), target->is_player())) { // [MouseJstr] @@ -2139,11 +2290,12 @@ int battle_check_target(dumb_ptr<block_list> src, dumb_ptr<block_list> target, } } - return 1; // 該当しないので無関係人物(まあ敵じゃないので味方) + return 1; // 該当しないので無関係人物(まあ敵じゃないので味方) | Unrelated person because it does not apply (Well, not an enemy, so an ally) } /*========================================== * 射程判定 + * range judgment *------------------------------------------ */ int battle_check_range(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, @@ -2163,19 +2315,19 @@ int battle_check_range(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, rangey = abs(dy); arange = ((rangex > rangey) ? rangex : rangey); - if (src->bl_m != bl->bl_m) // 違うマップ + if (src->bl_m != bl->bl_m) // 違うマップ | different map return 0; - if (range > 0 && range < arange) // 遠すぎる + if (range > 0 && range < arange) // 遠すぎる | too far return 0; - if (arange < 2) // 同じマスか隣接 + if (arange < 2) // 同じマスか隣接 | same square or adjacent return 1; // if(bl->bl_type == BL_SKILL && ((struct skill_unit *)bl)->group->unit_id == 0x8d) // return 1; - // 障害物判定 + // 障害物判定 | Obstacle judgment wpd.path_len = 0; wpd.path_pos = 0; wpd.path_half = 0; diff --git a/src/map/battle.hpp b/src/map/battle.hpp index 2925b58..b1b3c0f 100644 --- a/src/map/battle.hpp +++ b/src/map/battle.hpp @@ -35,7 +35,7 @@ namespace tmwa { namespace map { -// ダメージ +// ダメージ | damage struct Damage { int damage; @@ -46,22 +46,22 @@ struct Damage ATK dmg_lv; }; -// ダメージ計算 +// ダメージ計算 | damage calculation struct Damage battle_calc_attack(BF attack_type, dumb_ptr<block_list> bl, dumb_ptr<block_list> target, SkillID skill_num, int skill_lv, int flag); -// 実際にHPを増減 +// 実際にHPを増減 | Actual HP increase/decrease int battle_damage(dumb_ptr<block_list> bl, dumb_ptr<block_list> target, int damage, int flag); int battle_heal(dumb_ptr<block_list> bl, dumb_ptr<block_list> target, int hp, int sp, int flag); -// 攻撃や移動を止める +// 攻撃や移動を止める | stop attacking or moving int battle_stopattack(dumb_ptr<block_list> bl); -// 通常攻撃処理まとめ +// 通常攻撃処理まとめ | Normal attack processing summary ATK battle_weapon_attack(dumb_ptr<block_list> bl, dumb_ptr<block_list> target, tick_t tick); diff --git a/src/map/pc.cpp b/src/map/pc.cpp index ce421d0..9e76ecf 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -1376,6 +1376,11 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first) sd->matk2 = 0; if (sd->matk1 < 0) sd->matk1 = 0; + else + if (sd->matk_rate != 100) + { + sd->matk1 = (sd->matk1 * sd->matk_rate) / 100; + } sd->hit += sd->paramc[ATTR::DEX] + sd->status.base_level; sd->flee += sd->paramc[ATTR::AGI] + sd->status.base_level; @@ -1639,52 +1644,42 @@ int pc_bonus(dumb_ptr<map_session_data> sd, SP type, int val) if (!sd->state.lr_flag_is_arrow_2) sd->parame[sp_to_attr(type)] += val; break; -#if 0 case SP::ATK1: if (!sd->state.lr_flag_is_arrow_2) sd->watk += val; break; -#endif -#if 0 case SP::ATK2: if (!sd->state.lr_flag_is_arrow_2) sd->watk2 += val; break; -#endif -#if 0 case SP::BASE_ATK: if (!sd->state.lr_flag_is_arrow_2) sd->base_atk += val; break; -#endif -#if 0 case SP::MATK1: if (!sd->state.lr_flag_is_arrow_2) sd->matk1 += val; break; -#endif -#if 0 case SP::MATK2: if (!sd->state.lr_flag_is_arrow_2) sd->matk2 += val; break; -#endif -#if 0 case SP::DEF1: if (!sd->state.lr_flag_is_arrow_2) sd->def += val; break; -#endif + case SP::DEF2: + if (!sd->state.lr_flag_is_arrow_2) + sd->def2 += val; + break; case SP::MDEF1: if (!sd->state.lr_flag_is_arrow_2) sd->mdef += val; break; -#if 0 case SP::MDEF2: if (!sd->state.lr_flag_is_arrow_2) - sd->mdef += val; + sd->mdef2 += val; break; -#endif case SP::HIT: if (!sd->state.lr_flag_is_arrow_2) sd->hit += val; @@ -1695,12 +1690,10 @@ int pc_bonus(dumb_ptr<map_session_data> sd, SP type, int val) if (!sd->state.lr_flag_is_arrow_2) sd->flee += val; break; -#if 0 case SP::FLEE2: if (!sd->state.lr_flag_is_arrow_2) sd->flee2 += val * 10; break; -#endif case SP::CRITICAL: if (!sd->state.lr_flag_is_arrow_2) sd->critical += val * 10; @@ -1719,14 +1712,12 @@ int pc_bonus(dumb_ptr<map_session_data> sd, SP type, int val) if (!sd->state.lr_flag_is_arrow_2) sd->hprate += val; break; -#if 0 case SP::MAXSPRATE: if (!sd->state.lr_flag_is_arrow_2) sd->sprate += val; break; -#endif #if 0 - case SP::SPRATE: + case SP::SPRATE: // mana is subtracted at serverdata this can only become useable if spells are handled by servercode if (!sd->state.lr_flag_is_arrow_2) sd->dsprate += val; break; @@ -1737,13 +1728,10 @@ int pc_bonus(dumb_ptr<map_session_data> sd, SP type, int val) else sd->arrow_range += val; break; -#if 0 case SP::ADD_SPEED: if (!sd->state.lr_flag_is_arrow_2) - sd->speed -= val; + sd->speed -= interval_t(val); break; -#endif -#if 0 case SP::SPEED_RATE: if (!sd->state.lr_flag_is_arrow_2) { @@ -1751,17 +1739,14 @@ int pc_bonus(dumb_ptr<map_session_data> sd, SP type, int val) sd->speed_rate = 100 - val; } break; -#endif case SP::SPEED_ADDRATE: if (!sd->state.lr_flag_is_arrow_2) sd->speed_add_rate = sd->speed_add_rate * (100 - val) / 100; break; -#if 0 case SP::ASPD: if (!sd->state.lr_flag_is_arrow_2) - sd->aspd -= val * 10; + sd->aspd -= interval_t(val); break; -#endif case SP::ASPD_RATE: if (!sd->state.lr_flag_is_arrow_2) { @@ -1769,84 +1754,62 @@ int pc_bonus(dumb_ptr<map_session_data> sd, SP type, int val) sd->aspd_rate = 100 - val; } break; -#if 0 case SP::ASPD_ADDRATE: if (!sd->state.lr_flag_is_arrow_2) sd->aspd_add_rate = sd->aspd_add_rate * (100 - val) / 100; break; -#endif case SP::HP_RECOV_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->hprecov_rate += val; break; -#if 0 case SP::SP_RECOV_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->sprecov_rate += val; break; -#endif case SP::CRITICAL_DEF: if (!sd->state.lr_flag_is_arrow_2) sd->critical_def += val; break; -#if 0 case SP::DOUBLE_RATE: if (!sd->state.lr_flag_is_arrow_2 && sd->double_rate < val) sd->double_rate = val; break; -#endif case SP::DOUBLE_ADD_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->double_add_rate += val; break; -#if 0 case SP::MATK_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->matk_rate += val; break; -#endif -#if 0 case SP::ATK_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->atk_rate += val; break; -#endif -#if 0 case SP::PERFECT_HIT_RATE: if (!sd->state.lr_flag_is_arrow_2 && sd->perfect_hit < val) sd->perfect_hit = val; break; -#endif -#if 0 case SP::PERFECT_HIT_ADD_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->perfect_hit_add += val; break; -#endif -#if 0 case SP::CRITICAL_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->critical_rate += val; break; -#endif -#if 0 case SP::HIT_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->hit_rate += val; break; -#endif -#if 0 case SP::FLEE_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->flee_rate += val; break; -#endif -#if 0 case SP::FLEE2_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->flee2_rate += val; break; -#endif case SP::DEF_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->def_rate += val; @@ -1855,18 +1818,14 @@ int pc_bonus(dumb_ptr<map_session_data> sd, SP type, int val) if (!sd->state.lr_flag_is_arrow_2) sd->def2_rate += val; break; -#if 0 case SP::MDEF_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->mdef_rate += val; break; -#endif -#if 0 case SP::MDEF2_RATE: if (!sd->state.lr_flag_is_arrow_2) sd->mdef2_rate += val; break; -#endif case SP::DEAF: sd->special_state.deaf = 1; break; @@ -1896,7 +1855,6 @@ int pc_bonus2(dumb_ptr<map_session_data> sd, SP type, int type2, int val) sd->hp_drain_per += val; } break; -#if 0 case SP::SP_DRAIN_RATE: if (!sd->state.lr_flag_is_arrow_2) { @@ -1904,7 +1862,6 @@ int pc_bonus2(dumb_ptr<map_session_data> sd, SP type, int type2, int val) sd->sp_drain_per += val; } break; -#endif default: if (battle_config.error_log) PRINTF("pc_bonus2: unknown type %d %d %d!\n"_fmt, diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 4182f5a..cdaa0ba 100644 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -171,6 +171,7 @@ int skill_get_castnodex(SkillID id, int lv) /*========================================== * スキル追加効果 + * Additional skill effect *------------------------------------------ */ int skill_additional_effect(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, @@ -204,13 +205,13 @@ int skill_additional_effect(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, sc_def_phys_shield_spell = battle_get_sc_data(bl)[StatusChange::SC_PHYS_SHIELD].val1; - //対象の耐性 + // 対象の耐性 | Target resistance luk = battle_get_luk(bl); sc_def_mdef = 100 - (3 + battle_get_mdef(bl) + luk / 3); sc_def_vit = 100 - (3 + battle_get_vit(bl) + luk / 3); sc_def_int = 100 - (3 + battle_get_int(bl) + luk / 3); sc_def_luk = 100 - (3 + luk); - //自分の耐性 + // 自分の耐性 | my tolerance luk = battle_get_luk(src); if (bl->bl_type == BL::MOB) @@ -249,9 +250,16 @@ int skill_additional_effect(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, * flagの説明。16進図 * 00XRTTff * ff = magicで計算に渡される) - * TT = パケットのtype部分(0でデフォルト) + * TT = パケットのtype部分(0でデフォルト) * X = パケットのスキルLv * R = 予約(skill_area_subで使用する) + * Skill attack effect processing summary + * A description of the flag. hexadecimal diagram + * 00XRTTff + * ff=magic passed to the calculation) + * TT = packet type part (0 is default) + * X = Packet skill Lv + * R = reserved (used by skill_area_sub) *------------------------------------------------------------------------- */ @@ -269,23 +277,23 @@ int skill_attack(BF attack_type, dumb_ptr<block_list> src, sc_data = battle_get_sc_data(bl); -//何もしない判定ここから - if (dsrc->bl_m != bl->bl_m) //対象が同じマップにいなければ何もしない +// 何もしない判定ここから | Judgment to do nothing from here + if (dsrc->bl_m != bl->bl_m) // 対象が同じマップにいなければ何もしない | If the target is not on the same map, do nothing return 0; - if (src->bl_prev == nullptr || dsrc->bl_prev == nullptr || bl->bl_prev == nullptr) //prevよくわからない※ + if (src->bl_prev == nullptr || dsrc->bl_prev == nullptr || bl->bl_prev == nullptr) // prevよくわからない※ | prevI'm not sure* return 0; - if (src->bl_type == BL::PC && pc_isdead(src->is_player())) //術者?がPCですでに死んでいたら何もしない + if (src->bl_type == BL::PC && pc_isdead(src->is_player())) // 術者?がPCですでに死んでいたら何もしない | Surgeon? is already dead on the PC, do nothing return 0; - if (dsrc->bl_type == BL::PC && pc_isdead(dsrc->is_player())) //術者?がPCですでに死んでいたら何もしない + if (dsrc->bl_type == BL::PC && pc_isdead(dsrc->is_player())) // 術者?がPCですでに死んでいたら何もしない | Surgeon? is already dead on the PC, do nothing return 0; - if (bl->bl_type == BL::PC && pc_isdead(bl->is_player())) //対象がPCですでに死んでいたら何もしない + if (bl->bl_type == BL::PC && pc_isdead(bl->is_player())) //対象がPCですでに死んでいたら何もしない | If the target is already dead on PC, do nothing return 0; -//何もしない判定ここまで +// 何もしない判定ここまで | Judgment to do nothing so far type = -1; lv = flag.level; - dmg = battle_calc_attack(attack_type, src, bl, skillid, skilllv, flag.lo); //ダメージ計算 + dmg = battle_calc_attack(attack_type, src, bl, skillid, skilllv, flag.lo); // ダメージ計算 | damage calculation damage = dmg.damage; @@ -307,10 +315,10 @@ int skill_attack(BF attack_type, dumb_ptr<block_list> src, } MapBlockLock lock; - /* 実際にダメージ処理を行う */ + /* 実際にダメージ処理を行う | actually deal damage */ battle_damage(src, bl, damage, 0); - /* ダメージがあるなら追加効果判定 */ + /* ダメージがあるなら追加効果判定 | Additional effect judgment if there is damage */ if (bl->bl_prev != nullptr) { dumb_ptr<map_session_data> sd = bl->is_player(); @@ -318,7 +326,7 @@ int skill_attack(BF attack_type, dumb_ptr<block_list> src, { if (damage > 0) skill_additional_effect(src, bl, skillid, skilllv); - if (bl->bl_type == BL::MOB && src != bl) /* スキル使用条件のMOBスキル */ + if (bl->bl_type == BL::MOB && src != bl) /* スキル使用条件のMOBスキル | MOB skills with skill usage conditions */ { dumb_ptr<mob_data> md = bl->is_mob(); if (battle_config.mob_changetarget_byskill == 1) @@ -357,7 +365,7 @@ int skill_attack(BF attack_type, dumb_ptr<block_list> src, pc_heal(sd, hp, sp); } - return (dmg.damage); /* 与ダメを返す */ + return (dmg.damage); /* 与ダメを返す | return damage dealt */ } typedef int(*SkillFunc)(dumb_ptr<block_list>, dumb_ptr<block_list>, @@ -382,6 +390,8 @@ void skill_area_sub(dumb_ptr<block_list> bl, /*========================================== * スキル使用(詠唱完了、ID指定攻撃系) * (スパゲッティに向けて1歩前進!(ダメポ)) + * Skill use (chanting complete, ID specified attack system) + * (One step forward towards spaghetti! (Damepo)) *------------------------------------------ */ int skill_castend_damage_id(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, @@ -411,10 +421,10 @@ int skill_castend_damage_id(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, flag); break; - case SkillID::NPC_SELFDESTRUCTION: /* 自爆 */ + case SkillID::NPC_SELFDESTRUCTION: /* 自爆 | blew up */ if (flag.lo & 1) { - /* 個別にダメージを与える */ + /* 個別にダメージを与える | damage individually */ if (src->bl_type == BL::MOB) { dumb_ptr<mob_data> mb = src->is_mob(); @@ -443,7 +453,7 @@ int skill_castend_damage_id(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, } break; - /* HP吸収/HP吸収魔法 */ + /* HP吸収/HP吸収魔法 | HP absorption/HP absorption magic */ case SkillID::ZERO: if (sd) { @@ -476,6 +486,7 @@ int skill_castend_damage_id(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, /*========================================== * スキル使用(詠唱完了、ID指定支援系) + * Skill use (chanting complete, ID designation support system) *------------------------------------------ */ // skillid.nk == 1 @@ -553,6 +564,7 @@ int skill_castend_nodamage_id(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, /*========================================== * 詠唱時間計算 + * Casting time calculation *------------------------------------------ */ interval_t skill_castfix(dumb_ptr<block_list> bl, interval_t interval) @@ -605,6 +617,7 @@ interval_t skill_castfix(dumb_ptr<block_list> bl, interval_t interval) /*========================================== * ディレイ計算 + * delay calculation *------------------------------------------ */ interval_t skill_delayfix(dumb_ptr<block_list> bl, interval_t interval) @@ -619,7 +632,7 @@ interval_t skill_delayfix(dumb_ptr<block_list> bl, interval_t interval) if (bl->bl_type == BL::PC) { - if (battle_config.delay_dependon_dex) /* dexの影響を計算する */ + if (battle_config.delay_dependon_dex) /* dexの影響を計算する | Calculate dex impact */ interval = interval * (battle_config.castrate_dex_scale - battle_get_dex(bl)) / @@ -632,6 +645,7 @@ interval_t skill_delayfix(dumb_ptr<block_list> bl, interval_t interval) /*========================================== * スキル詠唱キャンセル + * Skill chant cancel *------------------------------------------ */ int skill_castcancel(dumb_ptr<block_list> bl, int) @@ -1122,13 +1136,15 @@ int skill_status_change_clear(dumb_ptr<block_list> bl, int type) /* *---------------------------------------------------------------------------- * スキルユニット + * skill unit *---------------------------------------------------------------------------- */ /*========================================== * 演奏/ダンスをやめる * flag 1で合奏中なら相方にユニットを任せる - * + * stop playing/dancing + * If you are playing in concert with flag 1, leave the unit to your partner *------------------------------------------ */ void skill_stop_dancing(dumb_ptr<block_list>, int) @@ -1141,11 +1157,14 @@ void skill_unit_timer_sub_ondelete(dumb_ptr<block_list> bl, /*---------------------------------------------------------------------------- * アイテム合成 + * Item synthesis *---------------------------------------------------------------------------- */ /*---------------------------------------------------------------------------- * 初期化系 + * Initialization system + *---------------------------------------------------------------------------- */ static diff --git a/src/map/skill.hpp b/src/map/skill.hpp index 8b3fbc7..83f628d 100644 --- a/src/map/skill.hpp +++ b/src/map/skill.hpp @@ -42,7 +42,7 @@ constexpr int MAX_SKILL_PRODUCE_DB = 150; constexpr int MAX_SKILL_ARROW_DB = 150; constexpr int MAX_SKILL_ABRA_DB = 350; -// スキルデータベース +// スキルデータベース | skill database struct skill_db_ { int range_k, hit, inf, pl, nk, max; @@ -64,7 +64,7 @@ struct skill_db_ struct skill_name_db { - SkillID id; // skill id + SkillID id; // skill id LString name; // search strings RString desc; // description that shows up for searches @@ -79,7 +79,7 @@ skill_name_db& skill_lookup_by_name(XString name); bool skill_readdb(ZString filename); -// スキルデータベースへのアクセサ +// スキルデータベースへのアクセサ | Accessor to skills database int skill_get_hit(SkillID id); int skill_get_inf(SkillID id); int skill_get_nk(SkillID id); @@ -93,7 +93,7 @@ int skill_get_delay(SkillID id, int lv); int skill_get_inf2(SkillID id); int skill_get_maxcount(SkillID id); -// 追加効果 +// 追加効果 | additional effect int skill_additional_effect(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, SkillID skillid, int skilllv); @@ -102,10 +102,10 @@ interval_t skill_delayfix(dumb_ptr<block_list> bl, interval_t time); void skill_stop_dancing(dumb_ptr<block_list> src, int flag); -// 詠唱キャンセル +// 詠唱キャンセル | chant cancel int skill_castcancel(dumb_ptr<block_list> bl, int type); -// ステータス異常 +// ステータス異常 | Abnormal status int skill_status_effect(dumb_ptr<block_list> bl, StatusChange type, int val1, interval_t tick); @@ -116,7 +116,7 @@ int skill_status_change_active(dumb_ptr<block_list> bl, StatusChange type); // void skill_status_change_end(dumb_ptr<block_list> bl, StatusChange type, TimerData *tid); int skill_status_change_clear(dumb_ptr<block_list> bl, int type); -// mobスキルのため +// mobスキルのため | for mob skills int skill_castend_nodamage_id(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, SkillID skillid, int skilllv); int skill_castend_damage_id(dumb_ptr<block_list> src, dumb_ptr<block_list> bl, diff --git a/src/mmo/clif.t.hpp b/src/mmo/clif.t.hpp index f216064..33a6f3c 100644 --- a/src/mmo/clif.t.hpp +++ b/src/mmo/clif.t.hpp @@ -317,6 +317,7 @@ enum class SP : uint16_t #endif // stats from equipment + // sent to client STR2 = 61, // sent to client AGI2 = 62, @@ -328,7 +329,6 @@ enum class SP : uint16_t DEX2 = 65, // sent to client LUK2 = 66, - // sent to client DEAF = 70, @@ -337,19 +337,17 @@ enum class SP : uint16_t // sent to client ATTACKRANGE = 1000, + ELTLVL = 1001, ELTTYPE = 1002, #if 0 CASTRATE = 1003, #endif MAXHPRATE = 1004, -#if 0 MAXSPRATE = 1005, -#endif #if 0 - SPRATE = 1006, + SPRATE = 1006, // mana is subtracted at serverdata this can only become useable if spells are handled by servercode #endif - #if 0 ADDEFF = 1012, #endif @@ -359,12 +357,9 @@ enum class SP : uint16_t BASE_ATK = 1014, ASPD_RATE = 1015, HP_RECOV_RATE = 1016, -#if 0 SP_RECOV_RATE = 1017, -#endif -#if 0 + SPEED_RATE = 1018, -#endif CRITICAL_DEF = 1019, #if 0 NEAR_ATK_DEF = 1020, @@ -372,29 +367,24 @@ enum class SP : uint16_t #if 0 LONG_ATK_DEF = 1021, #endif -#if 0 + DOUBLE_RATE = 1022, -#endif DOUBLE_ADD_RATE = 1023, #if 0 MATK = 1024, #endif -#if 0 + MATK_RATE = 1025, -#endif #if 0 IGNORE_DEF_ELE = 1026, #endif #if 0 IGNORE_DEF_RACE = 1027, #endif -#if 0 + ATK_RATE = 1028, -#endif SPEED_ADDRATE = 1029, -#if 0 ASPD_ADDRATE = 1030, -#endif #if 0 MAGIC_ATK_DEF = 1031, #endif @@ -408,22 +398,15 @@ enum class SP : uint16_t IGNORE_MDEF_RACE = 1034, #endif -#if 0 PERFECT_HIT_RATE = 1038, -#endif -#if 0 PERFECT_HIT_ADD_RATE = 1039, -#endif -#if 0 CRITICAL_RATE = 1040, -#endif #if 0 GET_ZENY_NUM = 1041, #endif #if 0 ADD_GET_ZENY_NUM = 1042, #endif - #if 0 ADD_MONSTER_DROP_ITEM = 1047, #endif @@ -433,26 +416,15 @@ enum class SP : uint16_t #if 0 DEF_RATIO_ATK_RACE = 1049, #endif -#if 0 + ADD_SPEED = 1050, -#endif -#if 0 HIT_RATE = 1051, -#endif -#if 0 FLEE_RATE = 1052, -#endif -#if 0 FLEE2_RATE = 1053, -#endif DEF_RATE = 1054, DEF2_RATE = 1055, -#if 0 MDEF_RATE = 1056, -#endif -#if 0 MDEF2_RATE = 1057, -#endif #if 0 SPLASH_RANGE = 1058, #endif @@ -461,23 +433,28 @@ enum class SP : uint16_t #endif HP_DRAIN_RATE = 1061, -#if 0 SP_DRAIN_RATE = 1062, -#endif #if 0 SHORT_WEAPON_DAMAGE_RETURN = 1063, #endif #if 0 LONG_WEAPON_DAMAGE_RETURN = 1064, #endif - #if 0 ADDEFF2 = 1067, #endif +#if 0 BREAK_WEAPON_RATE = 1068, +#endif +#if 0 BREAK_ARMOR_RATE = 1069, +#endif +#if 0 ADD_STEAL_RATE = 1070, +#endif +#if 0 MAGIC_DAMAGE_RETURN = 1071, +#endif #if 0 RANDOM_ATTACK_INCREASE = 1072, #endif |