This commit is contained in:
aozhiwei 2023-03-09 11:45:39 +08:00
parent 15b320b956
commit c38429f39d
3 changed files with 40 additions and 0 deletions

View File

@ -3504,5 +3504,22 @@ void Human::ProcGemStoneItem(AddItemDTO& dto)
gemstone, gemstone,
0, 0,
false); false);
GetAbility()->AddAtkAddition(dto.item_meta->_atk);
SetMaxHP(GetMaxHP() + dto.item_meta->_max_hp * GetHP());
SetHP(GetMaxHP());
room->frame_event.AddPropChg
(
GetWeakPtrRef(),
kPropHp,
GetHP(),
0,
true);
room->frame_event.AddPropChg
(
GetWeakPtrRef(),
kPropMaxHp,
GetMaxHP(),
0,
true);
dto.handled = true; dto.handled = true;
} }

View File

@ -38,6 +38,28 @@ namespace mt
#endif #endif
} }
} }
{
std::vector<std::string> strings;
a8::Split(atk(), strings, ':');
if (strings.size() > 1) {
_atk = a8::XValue(strings[0]);
_atk_up = a8::XValue(strings[1]);
} else {
_atk = a8::XValue(strings[0]);
_atk_up = _atk;
}
}
{
std::vector<std::string> strings;
a8::Split(max_hp(), strings, ':');
if (strings.size() > 1) {
_max_hp = a8::XValue(strings[0]);
_max_hp_up = a8::XValue(strings[1]);
} else {
_max_hp = a8::XValue(strings[0]);
_max_hp_up = _max_hp;
}
}
{ {
std::vector<std::string> strings; std::vector<std::string> strings;
a8::Split(volume(), strings, '|'); a8::Split(volume(), strings, '|');

View File

@ -31,6 +31,7 @@ namespace mt
int _group_id = 0; int _group_id = 0;
int _atk = 0; int _atk = 0;
int _atk_up = 0; int _atk_up = 0;
int _max_hp = 0;
int _max_hp_up = 0; int _max_hp_up = 0;
std::tuple<int, float> _heal; std::tuple<int, float> _heal;