This commit is contained in:
aozhiwei 2022-12-23 12:37:04 +08:00
parent 18ea98dff7
commit 25a43f3f8d
11 changed files with 86 additions and 33 deletions

View File

@ -0,0 +1,10 @@
#include "precompile.h"
#include "mt/Dress.h"
IMPL_TABLE(mt::Dress)
namespace mt
{
}

View File

@ -0,0 +1,16 @@
#pragma once
#include "mt/macro.h"
#include "mtb/Dress.h"
namespace mt
{
DECLARE_ID_TABLE(Dress, mtb::Dress,
"dress@dress.csv",
"id")
public:
};
}

View File

@ -0,0 +1,10 @@
#include "precompile.h"
#include "mt/EquipUpgrade.h"
IMPL_TABLE(mt::EquipUpgrade)
namespace mt
{
}

View File

@ -0,0 +1,16 @@
#pragma once
#include "mt/macro.h"
#include "mtb/EquipUpgrade.h"
namespace mt
{
DECLARE_ID_TABLE(EquipUpgrade, mtb::EquipUpgrade,
"equipUpgrade@equipUpgrade.csv",
"id")
public:
};
}

View File

@ -1,8 +1,10 @@
#include "precompile.h"
#include <math.h>
#include "mt/HeroQuality.h"
IMPL_TABLE(mt::HeroQualiy)
IMPL_TABLE(mt::HeroQuality)
namespace mt
{
@ -10,7 +12,6 @@ namespace mt
long long HeroQuality::GetPvpCegUpLimit()
{
double sys_param = 0;
double lucky = lucky();
long long up_limit = round
(
(
@ -20,9 +21,9 @@ namespace mt
4.01892
) +
(
0.0268*pow(lucky, 3) -
2.15712*pow(lucky, 2) +
60.944*lucky -
0.0268*pow(lucky(), 3) -
2.15712*pow(lucky(), 2) +
60.944*lucky() -
560.24
)
) + sys_param;

View File

@ -13,7 +13,7 @@ namespace mt
std::vector<std::string> strings;
a8::Split(buff_list(), strings, '|');
for (const std::string& tmp_str : strings) {
buff_list.push_back(a8::XValue(tmp_str));
_buff_list.push_back(a8::XValue(tmp_str));
}
}
{
@ -23,7 +23,7 @@ namespace mt
std::vector<std::string> strings2;
a8::Split(str, strings2, ':');
assert(strings2.size() == 2);
preexplosion_summon.push_back
_preexplosion_summon.push_back
(std::make_tuple(
a8::XValue(strings2[0]),
a8::XValue(strings2[1])
@ -41,7 +41,7 @@ namespace mt
int drop_id = a8::XValue(strings2[0]);
int weight = strings2.size() > 1 ? a8::XValue(strings2[1]).GetInt() : 10000;
total_weight += weight;
drop.push_back
_drop.push_back
(std::make_tuple(
drop_id,
total_weight
@ -53,7 +53,7 @@ namespace mt
std::vector<std::string> strings;
a8::Split(monster_list(), strings, '|');
for (const std::string& tmp_str : strings) {
airdrop_mon_list.push_back(a8::XValue(tmp_str));
_airdrop_mon_list.push_back(a8::XValue(tmp_str));
}
}
{
@ -64,7 +64,7 @@ namespace mt
if (n <= 0 || n > 63) {
A8_ABORT();
}
a8::SetBitFlag(special_damage_type, n);
a8::SetBitFlag(_special_damage_type, n);
}
}
{
@ -75,7 +75,7 @@ namespace mt
if (n <= 0 || n > 63) {
A8_ABORT();
}
a8::SetBitFlag(receive_special_damage_type, n);
a8::SetBitFlag(_receive_special_damage_type, n);
}
}
{
@ -86,22 +86,22 @@ namespace mt
if (n <= 0 || n > 63) {
A8_ABORT();
}
a8::SetBitFlag(sweep_tags, n);
a8::SetBitFlag(_sweep_tags, n);
}
}
{
int_param1 = a8::XValue(param1());
float_param1 = a8::XValue(param1()).GetDouble();
_int_param1 = a8::XValue(param1());
_float_param1 = a8::XValue(param1()).GetDouble();
}
{
int_param2 = a8::XValue(param2());
float_param2 = a8::XValue(param2()).GetDouble();
_int_param2 = a8::XValue(param2());
_float_param2 = a8::XValue(param2()).GetDouble();
}
{
std::vector<std::string> strings;
a8::Split(param2(), strings, '|');
for (auto& str : strings) {
param2_list.push_back(a8::XValue(str));
_param2_list.push_back(a8::XValue(str));
}
}
{
@ -110,7 +110,7 @@ namespace mt
for (auto& str : strings) {
std::vector<std::string> strings2;
a8::Split(str, strings2, ':');
shapes.push_back(std::make_tuple
_shapes.push_back(std::make_tuple
(
a8::XValue(strings2[0]).GetInt(),
a8::XValue(strings2[1]).GetInt(),
@ -123,9 +123,9 @@ namespace mt
int MapThing::RandDrop()
{
if (HasDrop()) {
int total_weight = std::get<1>(drop[drop.size() - 1]);
int total_weight = std::get<1>(_drop[_drop.size() - 1]);
int rnd = rand() % total_weight;
for (auto& tuple : drop) {
for (auto& tuple : _drop) {
if (rnd < std::get<1>(tuple)) {
return std::get<0>(tuple);
}

View File

@ -7,8 +7,8 @@ namespace mt
{
DECLARE_AUTO_ID_TABLE(MapTplThingJson, mtb::MapTplThingJson,
"",
"")
""
)
public:
};

View File

@ -23,7 +23,7 @@
#include "mt/Robot.h"
#include "mt/AirLine.h"
#include "mt/AirRaid.h"
#include "mt/AirdDrop.h"
#include "mt/AirDrop.h"
#include "mt/Dress.h"
#include "mt/Drop.h"
#include "mt/NpcStandard.h"

View File

@ -11,12 +11,12 @@ namespace mt
"id")
public:
std::vector<int> mode_time;
std::vector<MetaData::SafeArea*> area;
std::vector<std::vector<PveGeminiContent*>> waves;
std::vector<int> score_reward;
std::vector<int> round_score;
std::vector<glm::vec3> next_door;
std::vector<int> _mode_time;
std::vector<mt::SafeArea*> _area;
std::vector<std::vector<PveGeminiContent*>> _waves;
std::vector<int> _score_reward;
std::vector<int> _round_score;
std::vector<glm::vec3> _next_door;
void Init1();
int CalcStar(int score);

View File

@ -12,7 +12,7 @@ namespace mt
public:
void Init1();
static const mt::Robot* RandRobot(std::set<int>& refreshed_robot_set)
static const mt::Robot* RandRobot(std::set<int>& refreshed_robot_set);
private:
std::vector<int> _skin_id;
};

View File

@ -37,9 +37,9 @@ namespace mt
Skill* base_skill_meta = nullptr;
float value_up = 0.0f;
std::set<int> buff_list;
std::map<int, std::set<MetaData::Buff*>> trigger_type_buffs;
std::vector<MetaData::SkillPhase> phases;
std::vector<MetaData::SkillPhase> raw_phases;
std::map<int, std::set<const mt::Buff*>> trigger_type_buffs;
std::vector<mt::SkillPhase> phases;
std::vector<mt::SkillPhase> raw_phases;
bool IsTurnOverSkill() const;
int GetMagicId() const;
private: