1
This commit is contained in:
parent
ee6df70741
commit
0c3bb3a161
@ -650,7 +650,9 @@ namespace MetaData
|
|||||||
{
|
{
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(i->pre_appear_effect(), strings, '|');
|
a8::Split(i->pre_appear_effect(), strings, '|');
|
||||||
|
#if 0
|
||||||
a8::XPrintf("%d,pre_appear_effect:%s\n", {i->id(), i->pre_appear_effect()});
|
a8::XPrintf("%d,pre_appear_effect:%s\n", {i->id(), i->pre_appear_effect()});
|
||||||
|
#endif
|
||||||
for (auto& str : strings) {
|
for (auto& str : strings) {
|
||||||
std::vector<std::string> strings2;
|
std::vector<std::string> strings2;
|
||||||
a8::Split(str, strings2, ':');
|
a8::Split(str, strings2, ':');
|
||||||
@ -662,6 +664,21 @@ namespace MetaData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
pve_score = std::make_tuple(0, 0);
|
||||||
|
if (!i->pve_score().empty()) {
|
||||||
|
std::vector<std::string> strings;
|
||||||
|
a8::Split(i->pve_score(), strings, '|');
|
||||||
|
if (strings.size() != 2) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
pve_score = std::make_tuple(a8::XValue(strings[0]).GetInt(), a8::XValue(strings[1]).GetInt());
|
||||||
|
if (std::get<0>(pve_score) <= 0 ||
|
||||||
|
std::get<1>(pve_score) <= 0) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Player::RandDrop()
|
int Player::RandDrop()
|
||||||
@ -1692,6 +1709,21 @@ namespace MetaData
|
|||||||
}
|
}
|
||||||
waves[content.pb->round() - 1].push_back(&content);
|
waves[content.pb->round() - 1].push_back(&content);
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
std::vector<std::string> strings;
|
||||||
|
a8::Split(pb->score_reward(), strings, '|');
|
||||||
|
int last_val = 0;
|
||||||
|
for (std::string& str : strings) {
|
||||||
|
if (a8::XValue(str).GetInt() <= last_val) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
score_reward.push_back(a8::XValue(str).GetInt());
|
||||||
|
last_val = a8::XValue(str);
|
||||||
|
}
|
||||||
|
if (score_reward.size() < 0) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -138,6 +138,7 @@ namespace MetaData
|
|||||||
std::vector<std::tuple<int, int>> dead_drop;
|
std::vector<std::tuple<int, int>> dead_drop;
|
||||||
std::vector<std::tuple<int, int>> pre_appear_effect;
|
std::vector<std::tuple<int, int>> pre_appear_effect;
|
||||||
bool HasDrop() { return !dead_drop.empty();};
|
bool HasDrop() { return !dead_drop.empty();};
|
||||||
|
std::tuple<int, int> pve_score;
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
int RandDrop();
|
int RandDrop();
|
||||||
@ -414,6 +415,7 @@ namespace MetaData
|
|||||||
std::vector<int> mode_time;
|
std::vector<int> mode_time;
|
||||||
std::vector<MetaData::SafeArea*> area;
|
std::vector<MetaData::SafeArea*> area;
|
||||||
std::vector<std::vector<PveGeminiContent*>> waves;
|
std::vector<std::vector<PveGeminiContent*>> waves;
|
||||||
|
std::vector<int> score_reward;
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
};
|
};
|
||||||
|
@ -242,6 +242,8 @@ message Player
|
|||||||
|
|
||||||
optional int32 damage = 51;
|
optional int32 damage = 51;
|
||||||
optional int32 defence = 52;
|
optional int32 defence = 52;
|
||||||
|
|
||||||
|
optional string pve_score = 53;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Robot
|
message Robot
|
||||||
@ -483,6 +485,7 @@ message PveGeminiMode
|
|||||||
optional int32 map_id = 2;
|
optional int32 map_id = 2;
|
||||||
optional string mode_time = 3;
|
optional string mode_time = 3;
|
||||||
optional string area = 4;
|
optional string area = 4;
|
||||||
|
optional string score_reward = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
//end
|
//end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user