Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/cfg/mob_classes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down Expand Up @@ -153,6 +154,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down Expand Up @@ -249,6 +251,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down Expand Up @@ -345,6 +348,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down Expand Up @@ -441,6 +445,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down Expand Up @@ -537,6 +542,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down Expand Up @@ -634,6 +640,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down Expand Up @@ -729,6 +736,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down Expand Up @@ -825,6 +833,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down Expand Up @@ -921,6 +930,7 @@
<param id="kDamNoDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kDamSizeDice" base="3" low_increment="0" threshold_mort="0" increment="0.3" deviation_type="0" deviation="0"/>
<param id="kHitroll" base="4" low_increment="1" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kDamroll" base="1" low_increment="0.5" threshold_mort="20" increment="0" deviation_type="0" deviation="0"/>
<param id="kMorale" base="10" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kInitiative" base="0" low_increment="0" threshold_mort="5" increment="1" deviation_type="0" deviation="0"/>
<param id="kCastSuccess" base="0" low_increment="5" threshold_mort="10" increment="0" deviation_type="0" deviation="0"/>
Expand Down
2 changes: 1 addition & 1 deletion lib/cfg/skills.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ mode - режим умения.
<skill id="kOverwhelm" name="оглушить" abbr="Ог" saving="kStability" difficulty="200" cap="1000"/>
<skill id="kPoisoning" name="отравить" abbr="Отр" saving="kCritical" difficulty="200" cap="1000"/>
<skill id="kLeadership" name="лидерство" abbr="Лд" saving="kReflex" difficulty="100" cap="1000"/>
<skill id="kPunctual" name="точный стиль" abbr="Тс" saving="kCritical" difficulty="110" cap="200"/>
<skill id="kPunctual" name="точный стиль" abbr="Тс" saving="kCritical" difficulty="110" cap="1000"/>
<skill id="kAwake" name="осторожный стиль" abbr="Ос" saving="kReflex" difficulty="100" cap="200"/>
<skill id="kSense" name="найти" abbr="Нйт" saving="kWill" difficulty="160" cap="200"/>
<skill id="kRiding" name="сражение верхом" abbr="Срв" saving="kReflex" difficulty="200" cap="1000"/>
Expand Down
14 changes: 14 additions & 0 deletions src/gameplay/classes/mob_classes_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ void MobClassInfoBuilder::ParseCombatStatsData(ItemPtr &info, DataNode &node) {
} else if (id_str == "kHitroll") {
info->hitroll = data;
info->has_hitroll = true;
} else if (id_str == "kDamroll") {
info->damroll = data;
info->has_damroll = true;
} else if (id_str == "kMorale") {
info->morale = data;
info->has_morale = true;
Expand Down Expand Up @@ -636,6 +639,17 @@ void MobClassInfo::PrintCombatStatsTable(CharData *ch, std::ostringstream &buffe
<< table_wrapper::kEndRow;
}

if (has_damroll) {
table << "Damroll"
<< damroll.base
<< damroll.low_increment
<< damroll.threshold_mort
<< damroll.increment
<< DeviationTypeToString(damroll.deviation_type)
<< damroll.deviation
<< table_wrapper::kEndRow;
}

if (has_morale) {
table << "Morale"
<< morale.base
Expand Down
5 changes: 3 additions & 2 deletions src/gameplay/classes/mob_classes_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,18 @@ class MobClassInfo : public info_container::BaseItem<EMobClass> {
bool has_dam_n_dice{false};
bool has_dam_s_dice{false};

// Hitroll / luck(morale) / cast success
// Hitroll / damroll / luck(morale) / cast success
ParametersData hitroll;
ParametersData damroll;
ParametersData morale;
ParametersData initiative;
ParametersData cast_success;
bool has_hitroll{false};
bool has_damroll{false};
bool has_morale{false};
bool has_initiative{false};
bool has_cast_success{false};


// HP / size / exp / likes_work
ParametersData hit_points;
ParametersData size;
Expand Down
16 changes: 16 additions & 0 deletions src/gameplay/classes/recalc_mob_params_by_vnum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,22 @@ static bool ApplyMobParams(CharData* ch, int level, int remorts, int difficulty)
applied_any = 1;
}

if (info->has_damroll) {
p_data = &info->damroll;

int base_value = CalcBaseValue(p_data, calc, effective_remorts);
base_value = ApplyDeviation(p_data, base_value);

if (is_first_role_pass) {
GET_DR(ch) = base_value;
} else {
if (base_value > GET_DR(ch)) {
GET_DR(ch) = base_value;
}
}
applied_any = 1;
}

if (info->has_morale) {
p_data = &info->morale;

Expand Down
Loading