| @@ -55,6 +55,7 @@ namespace THUAI6 | |||||
| AddLifeOrAp = 5, | AddLifeOrAp = 5, | ||||
| AddHpOrAp = 6, | AddHpOrAp = 6, | ||||
| ShieldOrSpear = 7, | ShieldOrSpear = 7, | ||||
| RecoveryFromDizziness = 8, | |||||
| }; | }; | ||||
| enum class BulletType : unsigned char | enum class BulletType : unsigned char | ||||
| @@ -62,8 +63,8 @@ namespace THUAI6 | |||||
| NullBulletType = 0, | NullBulletType = 0, | ||||
| FlyingKnife = 1, | FlyingKnife = 1, | ||||
| CommonAttackOfTricker = 2, | CommonAttackOfTricker = 2, | ||||
| FastBullet = 3, | |||||
| OrdinaryBullet = 4, | |||||
| BombBomb = 3, | |||||
| JumpyDumpty = 4, | |||||
| AtomBomb = 5, | AtomBomb = 5, | ||||
| }; | }; | ||||
| @@ -80,8 +81,8 @@ namespace THUAI6 | |||||
| { | { | ||||
| NullStudentType = 0, | NullStudentType = 0, | ||||
| Athlete = 1, | Athlete = 1, | ||||
| StudentType2 = 2, | |||||
| StudentType3 = 3, | |||||
| Teacher = 2, | |||||
| StraightAStudent = 3, | |||||
| StudentType4 = 4, | StudentType4 = 4, | ||||
| }; | }; | ||||
| @@ -90,8 +91,8 @@ namespace THUAI6 | |||||
| { | { | ||||
| NullTrickerType = 0, | NullTrickerType = 0, | ||||
| Assassin = 1, | Assassin = 1, | ||||
| TrickerType2 = 2, | |||||
| TrickerType3 = 3, | |||||
| Klee = 2, | |||||
| ANoisyPerson = 3, | |||||
| TrickerType4 = 4, | TrickerType4 = 4, | ||||
| }; | }; | ||||
| @@ -99,19 +100,20 @@ namespace THUAI6 | |||||
| enum class StudentBuffType : unsigned char | enum class StudentBuffType : unsigned char | ||||
| { | { | ||||
| NullStudentBuffType = 0, | NullStudentBuffType = 0, | ||||
| StudentBuffType1 = 1, | |||||
| StudentBuffType2 = 2, | |||||
| StudentBuffType3 = 3, | |||||
| StudentBuffType4 = 4, | |||||
| AddSpeed = 1, | |||||
| AddLife = 2, | |||||
| Shield = 3, | |||||
| Invisible = 4, | |||||
| }; | }; | ||||
| enum class TrickerBuffType : unsigned char | enum class TrickerBuffType : unsigned char | ||||
| { | { | ||||
| NullTrickerBuffType = 0, | NullTrickerBuffType = 0, | ||||
| TrickerBuffType1 = 1, | |||||
| TrickerBuffType2 = 2, | |||||
| TrickerBuffType3 = 3, | |||||
| TrickerBuffType4 = 4, | |||||
| AddSpeed = 1, | |||||
| Spear = 2, | |||||
| AddAp = 3, | |||||
| Clairaudience = 4, | |||||
| Invisible = 5, | |||||
| }; | }; | ||||
| // 学生状态枚举 | // 学生状态枚举 | ||||
| @@ -258,7 +260,7 @@ namespace THUAI6 | |||||
| struct GameInfo | struct GameInfo | ||||
| { | { | ||||
| int32_t gameTime; | int32_t gameTime; | ||||
| int32_t subjectLeft; | |||||
| int32_t subjectFinished; | |||||
| int32_t studentGraduated; | int32_t studentGraduated; | ||||
| int32_t studentQuited; | int32_t studentQuited; | ||||
| int32_t studentScore; | int32_t studentScore; | ||||
| @@ -275,6 +277,19 @@ namespace THUAI6 | |||||
| {GameState::GameEnd, "GameEnd"}, | {GameState::GameEnd, "GameEnd"}, | ||||
| }; | }; | ||||
| inline std::map<StudentType, std::string> studentTypeDict{ | |||||
| {StudentType::NullStudentType, "NullStudentType"}, | |||||
| {StudentType::Athlete, "Athlete"}, | |||||
| {StudentType::Teacher, "Teacher"}, | |||||
| {StudentType::StraightAStudent, "StraightAStudent"}, | |||||
| }; | |||||
| inline std::map<TrickerType, std::string> trickerTypeDict{ | |||||
| {TrickerType::NullTrickerType, "NullTrickerType"}, | |||||
| {TrickerType::Assassin, "Assassin"}, | |||||
| {TrickerType::Klee, "Klee"}, | |||||
| }; | |||||
| inline std::map<PlayerState, std::string> playerStateDict{ | inline std::map<PlayerState, std::string> playerStateDict{ | ||||
| {PlayerState::NullState, "NullState"}, | {PlayerState::NullState, "NullState"}, | ||||
| {PlayerState::Idle, "Idle"}, | {PlayerState::Idle, "Idle"}, | ||||
| @@ -327,6 +342,7 @@ namespace THUAI6 | |||||
| {PropType::AddLifeOrAp, "AddLifeOrAp"}, | {PropType::AddLifeOrAp, "AddLifeOrAp"}, | ||||
| {PropType::AddHpOrAp, "AddHpOrAp"}, | {PropType::AddHpOrAp, "AddHpOrAp"}, | ||||
| {PropType::ShieldOrSpear, "ShieldOrSpear"}, | {PropType::ShieldOrSpear, "ShieldOrSpear"}, | ||||
| {PropType::RecoveryFromDizziness, "RecoveryFromDizziness"}, | |||||
| }; | }; | ||||
| @@ -334,18 +350,27 @@ namespace THUAI6 | |||||
| {BulletType::NullBulletType, "NullBulletType"}, | {BulletType::NullBulletType, "NullBulletType"}, | ||||
| {BulletType::FlyingKnife, "FlyingKnife"}, | {BulletType::FlyingKnife, "FlyingKnife"}, | ||||
| {BulletType::CommonAttackOfTricker, "CommonAttackOfTricker"}, | {BulletType::CommonAttackOfTricker, "CommonAttackOfTricker"}, | ||||
| {BulletType::FastBullet, "FastBullet"}, | |||||
| {BulletType::OrdinaryBullet, "OrdinaryBullet"}, | |||||
| {BulletType::BombBomb, "BombBomb"}, | |||||
| {BulletType::JumpyDumpty, "JumpyDumpty"}, | |||||
| {BulletType::AtomBomb, "AtomBomb"}, | {BulletType::AtomBomb, "AtomBomb"}, | ||||
| }; | }; | ||||
| inline std::map<StudentBuffType, std::string> studentBuffDict{ | inline std::map<StudentBuffType, std::string> studentBuffDict{ | ||||
| {StudentBuffType::NullStudentBuffType, "NullStudentBuffType"}, | {StudentBuffType::NullStudentBuffType, "NullStudentBuffType"}, | ||||
| {StudentBuffType::AddSpeed, "AddSpeed"}, | |||||
| {StudentBuffType::AddLife, "AddLife"}, | |||||
| {StudentBuffType::Shield, "Shield"}, | |||||
| {StudentBuffType::Invisible, "Invisible"}, | |||||
| }; | }; | ||||
| inline std::map<TrickerBuffType, std::string> trickerBuffDict{ | inline std::map<TrickerBuffType, std::string> trickerBuffDict{ | ||||
| {TrickerBuffType::NullTrickerBuffType, "NullTrickerBuffType"}, | {TrickerBuffType::NullTrickerBuffType, "NullTrickerBuffType"}, | ||||
| {TrickerBuffType::AddSpeed, "AddSpeed"}, | |||||
| {TrickerBuffType::Spear, "Spear"}, | |||||
| {TrickerBuffType::Clairaudience, "Clairaudience"}, | |||||
| {TrickerBuffType::AddAp, "AddAp"}, | |||||
| {TrickerBuffType::Invisible, "Invisible"}, | |||||
| }; | }; | ||||
| @@ -95,6 +95,7 @@ namespace Proto2THUAI6 | |||||
| {protobuf::PropType::ADD_HP_OR_AP, THUAI6::PropType::AddHpOrAp}, | {protobuf::PropType::ADD_HP_OR_AP, THUAI6::PropType::AddHpOrAp}, | ||||
| {protobuf::PropType::ADD_LIFE_OR_AP, THUAI6::PropType::AddLifeOrAp}, | {protobuf::PropType::ADD_LIFE_OR_AP, THUAI6::PropType::AddLifeOrAp}, | ||||
| {protobuf::PropType::SHIELD_OR_SPEAR, THUAI6::PropType::ShieldOrSpear}, | {protobuf::PropType::SHIELD_OR_SPEAR, THUAI6::PropType::ShieldOrSpear}, | ||||
| {protobuf::PropType::RECOVERY_FROM_DIZZINESS, THUAI6::PropType::RecoveryFromDizziness}, | |||||
| }; | }; | ||||
| inline std::map<protobuf::PlayerType, THUAI6::PlayerType> playerTypeDict{ | inline std::map<protobuf::PlayerType, THUAI6::PlayerType> playerTypeDict{ | ||||
| @@ -106,33 +107,34 @@ namespace Proto2THUAI6 | |||||
| inline std::map<protobuf::StudentType, THUAI6::StudentType> studentTypeDict{ | inline std::map<protobuf::StudentType, THUAI6::StudentType> studentTypeDict{ | ||||
| {protobuf::StudentType::NULL_STUDENT_TYPE, THUAI6::StudentType::NullStudentType}, | {protobuf::StudentType::NULL_STUDENT_TYPE, THUAI6::StudentType::NullStudentType}, | ||||
| {protobuf::StudentType::ATHLETE, THUAI6::StudentType::Athlete}, | {protobuf::StudentType::ATHLETE, THUAI6::StudentType::Athlete}, | ||||
| {protobuf::StudentType::STUDENTTYPE2, THUAI6::StudentType::StudentType2}, | |||||
| {protobuf::StudentType::STUDENTTYPE3, THUAI6::StudentType::StudentType3}, | |||||
| {protobuf::StudentType::STUDENTTYPE2, THUAI6::StudentType::Teacher}, | |||||
| {protobuf::StudentType::STUDENTTYPE3, THUAI6::StudentType::StraightAStudent}, | |||||
| {protobuf::StudentType::STUDENTTYPE4, THUAI6::StudentType::StudentType4}, | {protobuf::StudentType::STUDENTTYPE4, THUAI6::StudentType::StudentType4}, | ||||
| }; | }; | ||||
| inline std::map<protobuf::TrickerType, THUAI6::TrickerType> trickerTypeDict{ | inline std::map<protobuf::TrickerType, THUAI6::TrickerType> trickerTypeDict{ | ||||
| {protobuf::TrickerType::NULL_TRICKER_TYPE, THUAI6::TrickerType::NullTrickerType}, | {protobuf::TrickerType::NULL_TRICKER_TYPE, THUAI6::TrickerType::NullTrickerType}, | ||||
| {protobuf::TrickerType::ASSASSIN, THUAI6::TrickerType::Assassin}, | {protobuf::TrickerType::ASSASSIN, THUAI6::TrickerType::Assassin}, | ||||
| {protobuf::TrickerType::TRICKERTYPE2, THUAI6::TrickerType::TrickerType2}, | |||||
| {protobuf::TrickerType::TRICKERTYPE3, THUAI6::TrickerType::TrickerType3}, | |||||
| {protobuf::TrickerType::TRICKERTYPE2, THUAI6::TrickerType::Klee}, | |||||
| {protobuf::TrickerType::TRICKERTYPE3, THUAI6::TrickerType::ANoisyPerson}, | |||||
| {protobuf::TrickerType::TRICKERTYPE4, THUAI6::TrickerType::TrickerType4}, | {protobuf::TrickerType::TRICKERTYPE4, THUAI6::TrickerType::TrickerType4}, | ||||
| }; | }; | ||||
| inline std::map<protobuf::StudentBuffType, THUAI6::StudentBuffType> studentBuffTypeDict{ | inline std::map<protobuf::StudentBuffType, THUAI6::StudentBuffType> studentBuffTypeDict{ | ||||
| {protobuf::StudentBuffType::NULL_SBUFF_TYPE, THUAI6::StudentBuffType::NullStudentBuffType}, | {protobuf::StudentBuffType::NULL_SBUFF_TYPE, THUAI6::StudentBuffType::NullStudentBuffType}, | ||||
| {protobuf::StudentBuffType::SBUFFTYPE1, THUAI6::StudentBuffType::StudentBuffType1}, | |||||
| {protobuf::StudentBuffType::SBUFFTYPE2, THUAI6::StudentBuffType::StudentBuffType2}, | |||||
| {protobuf::StudentBuffType::SBUFFTYPE3, THUAI6::StudentBuffType::StudentBuffType3}, | |||||
| {protobuf::StudentBuffType::SBUFFTYPE4, THUAI6::StudentBuffType::StudentBuffType4}, | |||||
| {protobuf::StudentBuffType::SBUFFTYPE1, THUAI6::StudentBuffType::AddSpeed}, | |||||
| {protobuf::StudentBuffType::SBUFFTYPE2, THUAI6::StudentBuffType::AddLife}, | |||||
| {protobuf::StudentBuffType::SBUFFTYPE3, THUAI6::StudentBuffType::Shield}, | |||||
| {protobuf::StudentBuffType::SBUFFTYPE4, THUAI6::StudentBuffType::Invisible}, | |||||
| }; | }; | ||||
| inline std::map<protobuf::TrickerBuffType, THUAI6::TrickerBuffType> trickerBuffTypeDict{ | inline std::map<protobuf::TrickerBuffType, THUAI6::TrickerBuffType> trickerBuffTypeDict{ | ||||
| {protobuf::TrickerBuffType::NULL_TBUFF_TYPE, THUAI6::TrickerBuffType::NullTrickerBuffType}, | {protobuf::TrickerBuffType::NULL_TBUFF_TYPE, THUAI6::TrickerBuffType::NullTrickerBuffType}, | ||||
| {protobuf::TrickerBuffType::TBUFFTYPE1, THUAI6::TrickerBuffType::TrickerBuffType1}, | |||||
| {protobuf::TrickerBuffType::TBUFFTYPE2, THUAI6::TrickerBuffType::TrickerBuffType2}, | |||||
| {protobuf::TrickerBuffType::TBUFFTYPE3, THUAI6::TrickerBuffType::TrickerBuffType3}, | |||||
| {protobuf::TrickerBuffType::TBUFFTYPE4, THUAI6::TrickerBuffType::TrickerBuffType4}, | |||||
| {protobuf::TrickerBuffType::TBUFFTYPE1, THUAI6::TrickerBuffType::AddSpeed}, | |||||
| {protobuf::TrickerBuffType::TBUFFTYPE2, THUAI6::TrickerBuffType::Spear}, | |||||
| {protobuf::TrickerBuffType::TBUFFTYPE3, THUAI6::TrickerBuffType::AddAp}, | |||||
| {protobuf::TrickerBuffType::TBUFFTYPE4, THUAI6::TrickerBuffType::Clairaudience}, | |||||
| {protobuf::TrickerBuffType::INVISIBLE, THUAI6::TrickerBuffType::Invisible}, | |||||
| }; | }; | ||||
| inline std::map<protobuf::PlayerState, THUAI6::PlayerState> playerStateDict{ | inline std::map<protobuf::PlayerState, THUAI6::PlayerState> playerStateDict{ | ||||
| @@ -168,8 +170,8 @@ namespace Proto2THUAI6 | |||||
| {protobuf::BulletType::NULL_BULLET_TYPE, THUAI6::BulletType::NullBulletType}, | {protobuf::BulletType::NULL_BULLET_TYPE, THUAI6::BulletType::NullBulletType}, | ||||
| {protobuf::BulletType::FLYING_KNIFE, THUAI6::BulletType::FlyingKnife}, | {protobuf::BulletType::FLYING_KNIFE, THUAI6::BulletType::FlyingKnife}, | ||||
| {protobuf::BulletType::COMMON_ATTACK_OF_TRICKER, THUAI6::BulletType::CommonAttackOfTricker}, | {protobuf::BulletType::COMMON_ATTACK_OF_TRICKER, THUAI6::BulletType::CommonAttackOfTricker}, | ||||
| {protobuf::BulletType::FAST_BULLET, THUAI6::BulletType::FastBullet}, | |||||
| {protobuf::BulletType::ORDINARY_BULLET, THUAI6::BulletType::OrdinaryBullet}, | |||||
| {protobuf::BulletType::FAST_BULLET, THUAI6::BulletType::BombBomb}, | |||||
| {protobuf::BulletType::ORDINARY_BULLET, THUAI6::BulletType::JumpyDumpty}, | |||||
| {protobuf::BulletType::ATOM_BOMB, THUAI6::BulletType::AtomBomb}, | {protobuf::BulletType::ATOM_BOMB, THUAI6::BulletType::AtomBomb}, | ||||
| }; | }; | ||||
| @@ -274,7 +276,7 @@ namespace Proto2THUAI6 | |||||
| { | { | ||||
| auto gameInfo = std::make_shared<THUAI6::GameInfo>(); | auto gameInfo = std::make_shared<THUAI6::GameInfo>(); | ||||
| gameInfo->gameTime = allMsg.game_time(); | gameInfo->gameTime = allMsg.game_time(); | ||||
| gameInfo->subjectLeft = allMsg.subject_left(); | |||||
| gameInfo->subjectFinished = allMsg.subject_finished(); | |||||
| gameInfo->studentGraduated = allMsg.student_graduated(); | gameInfo->studentGraduated = allMsg.student_graduated(); | ||||
| gameInfo->studentQuited = allMsg.student_quited(); | gameInfo->studentQuited = allMsg.student_quited(); | ||||
| gameInfo->studentScore = allMsg.student_score(); | gameInfo->studentScore = allMsg.student_score(); | ||||
| @@ -362,8 +364,8 @@ namespace THUAI62Proto | |||||
| inline std::map<THUAI6::StudentType, protobuf::StudentType> studentTypeDict{ | inline std::map<THUAI6::StudentType, protobuf::StudentType> studentTypeDict{ | ||||
| {THUAI6::StudentType::NullStudentType, protobuf::StudentType::NULL_STUDENT_TYPE}, | {THUAI6::StudentType::NullStudentType, protobuf::StudentType::NULL_STUDENT_TYPE}, | ||||
| {THUAI6::StudentType::Athlete, protobuf::StudentType::ATHLETE}, | {THUAI6::StudentType::Athlete, protobuf::StudentType::ATHLETE}, | ||||
| {THUAI6::StudentType::StudentType2, protobuf::StudentType::STUDENTTYPE2}, | |||||
| {THUAI6::StudentType::StudentType3, protobuf::StudentType::STUDENTTYPE3}, | |||||
| {THUAI6::StudentType::Teacher, protobuf::StudentType::STUDENTTYPE2}, | |||||
| {THUAI6::StudentType::StraightAStudent, protobuf::StudentType::STUDENTTYPE3}, | |||||
| {THUAI6::StudentType::StudentType4, protobuf::StudentType::STUDENTTYPE4}, | {THUAI6::StudentType::StudentType4, protobuf::StudentType::STUDENTTYPE4}, | ||||
| }; | }; | ||||
| @@ -378,8 +380,8 @@ namespace THUAI62Proto | |||||
| inline std::map<THUAI6::TrickerType, protobuf::TrickerType> trickerTypeDict{ | inline std::map<THUAI6::TrickerType, protobuf::TrickerType> trickerTypeDict{ | ||||
| {THUAI6::TrickerType::NullTrickerType, protobuf::TrickerType::NULL_TRICKER_TYPE}, | {THUAI6::TrickerType::NullTrickerType, protobuf::TrickerType::NULL_TRICKER_TYPE}, | ||||
| {THUAI6::TrickerType::Assassin, protobuf::TrickerType::ASSASSIN}, | {THUAI6::TrickerType::Assassin, protobuf::TrickerType::ASSASSIN}, | ||||
| {THUAI6::TrickerType::TrickerType2, protobuf::TrickerType::TRICKERTYPE2}, | |||||
| {THUAI6::TrickerType::TrickerType3, protobuf::TrickerType::TRICKERTYPE3}, | |||||
| {THUAI6::TrickerType::Klee, protobuf::TrickerType::TRICKERTYPE2}, | |||||
| {THUAI6::TrickerType::ANoisyPerson, protobuf::TrickerType::TRICKERTYPE3}, | |||||
| {THUAI6::TrickerType::TrickerType4, protobuf::TrickerType::TRICKERTYPE4}, | {THUAI6::TrickerType::TrickerType4, protobuf::TrickerType::TRICKERTYPE4}, | ||||
| }; | }; | ||||
| @@ -619,23 +619,24 @@ void StudentDebugAPI::PrintStudent() const | |||||
| { | { | ||||
| for (const auto& student : logic.GetStudents()) | for (const auto& student : logic.GetStudents()) | ||||
| { | { | ||||
| logger->info("******Student Info******"); | |||||
| logger->info("\n******Student Info******"); | |||||
| logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); | logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); | ||||
| logger->info("speed={}, view range={}, place={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place]); | |||||
| logger->info("state={}, determination={}, addiction={}", THUAI6::playerStateDict[student->playerState], student->determination, student->addiction); | |||||
| std::string skillTime = "skill time="; | |||||
| logger->info("speed={}, view range={}, place={}, radius={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place], student->radius); | |||||
| std::string skillTime = ""; | |||||
| for (const auto& time : student->timeUntilSkillAvailable) | for (const auto& time : student->timeUntilSkillAvailable) | ||||
| skillTime += std::to_string(time) + ", "; | skillTime += std::to_string(time) + ", "; | ||||
| logger->info(skillTime); | |||||
| std::string studentBuff = "buff="; | |||||
| std::string studentProp = "prop="; | |||||
| logger->info("score={}, facing direction={}, skill time={}", student->score, student->facingDirection, skillTime); | |||||
| std::string props = ""; | |||||
| for (const auto& prop : student->props) | |||||
| props += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info("state={}, bullet={}, props={}", THUAI6::playerStateDict[student->playerState], THUAI6::bulletTypeDict[student->bulletType], props); | |||||
| logger->info("type={}, determination={}, addiction={}, danger alert={}", THUAI6::studentTypeDict[student->studentType], student->determination, student->addiction, student->dangerAlert); | |||||
| logger->info("learning speed={}, treat speed={}, treat progress={}, rescue progress={}", student->learningSpeed, student->treatSpeed, student->treatProgress, student->rescueProgress); | |||||
| std::string studentBuff = ""; | |||||
| for (const auto& buff : student->buff) | for (const auto& buff : student->buff) | ||||
| studentBuff += THUAI6::studentBuffDict[buff] + ", "; | studentBuff += THUAI6::studentBuffDict[buff] + ", "; | ||||
| for (const auto& prop : student->props) | |||||
| studentProp += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info(studentBuff); | |||||
| logger->info(studentProp); | |||||
| logger->info("**********************"); | |||||
| logger->info("buff={}", studentBuff); | |||||
| logger->info("************************\n"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -643,23 +644,24 @@ void TrickerDebugAPI::PrintStudent() const | |||||
| { | { | ||||
| for (const auto& student : logic.GetStudents()) | for (const auto& student : logic.GetStudents()) | ||||
| { | { | ||||
| logger->info("******Student Info******"); | |||||
| logger->info("\n******Student Info******"); | |||||
| logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); | logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); | ||||
| logger->info("speed={}, view range={}, place={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place]); | |||||
| logger->info("state={}, determination={}, addiction={}", THUAI6::playerStateDict[student->playerState], student->determination, student->addiction); | |||||
| std::string skillTime = "skill time="; | |||||
| logger->info("speed={}, view range={}, place={}, radius={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place], student->radius); | |||||
| std::string skillTime = ""; | |||||
| for (const auto& time : student->timeUntilSkillAvailable) | for (const auto& time : student->timeUntilSkillAvailable) | ||||
| skillTime += std::to_string(time) + ", "; | skillTime += std::to_string(time) + ", "; | ||||
| logger->info(skillTime); | |||||
| std::string studentBuff = "buff="; | |||||
| std::string studentProp = "prop="; | |||||
| logger->info("score={}, facing direction={}, skill time={}", student->score, student->facingDirection, skillTime); | |||||
| std::string props = ""; | |||||
| for (const auto& prop : student->props) | |||||
| props += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info("state={}, bullet={}, props={}", THUAI6::playerStateDict[student->playerState], THUAI6::bulletTypeDict[student->bulletType], props); | |||||
| logger->info("type={}, determination={}, addiction={}, danger alert={}", THUAI6::studentTypeDict[student->studentType], student->determination, student->addiction, student->dangerAlert); | |||||
| logger->info("learning speed={}, treat speed={}, treat progress={}, rescue progress={}", student->learningSpeed, student->treatSpeed, student->treatProgress, student->rescueProgress); | |||||
| std::string studentBuff = ""; | |||||
| for (const auto& buff : student->buff) | for (const auto& buff : student->buff) | ||||
| studentBuff += THUAI6::studentBuffDict[buff] + ", "; | studentBuff += THUAI6::studentBuffDict[buff] + ", "; | ||||
| for (const auto& prop : student->props) | |||||
| studentProp += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info(studentBuff); | |||||
| logger->info(studentProp); | |||||
| logger->info("**********************"); | |||||
| logger->info("buff={}", studentBuff); | |||||
| logger->info("************************\n"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -667,23 +669,23 @@ void StudentDebugAPI::PrintTricker() const | |||||
| { | { | ||||
| for (const auto& tricker : logic.GetTrickers()) | for (const auto& tricker : logic.GetTrickers()) | ||||
| { | { | ||||
| logger->info("******Tricker Info******"); | |||||
| logger->info("\n******Tricker Info******"); | |||||
| logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y); | logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y); | ||||
| logger->info("speed={}, view range={}, place={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place]); | |||||
| logger->info("state={}", THUAI6::playerStateDict[tricker->playerState]); | |||||
| std::string skillTime = "skill time="; | |||||
| logger->info("speed={}, view range={}, place={}, radius={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place], tricker->radius); | |||||
| std::string skillTime = ""; | |||||
| for (const auto& time : tricker->timeUntilSkillAvailable) | for (const auto& time : tricker->timeUntilSkillAvailable) | ||||
| skillTime += std::to_string(time) + ", "; | skillTime += std::to_string(time) + ", "; | ||||
| logger->info(skillTime); | |||||
| std::string trickerBuff = "buff="; | |||||
| logger->info("score={}, facing direction={}, skill time={}", tricker->score, tricker->facingDirection, skillTime); | |||||
| std::string props = ""; | |||||
| for (const auto& prop : tricker->props) | |||||
| props += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info("state={}, bullet={}, props={}", THUAI6::playerStateDict[tricker->playerState], THUAI6::bulletTypeDict[tricker->bulletType], props); | |||||
| logger->info("type={}, trick desire={}, class volume={}", THUAI6::trickerTypeDict[tricker->trickerType], tricker->trickDesire, tricker->classVolume); | |||||
| std::string trickerBuff = ""; | |||||
| for (const auto& buff : tricker->buff) | for (const auto& buff : tricker->buff) | ||||
| trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; | trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; | ||||
| logger->info(trickerBuff); | |||||
| std::string trickerProp = "prop="; | |||||
| for (const auto& prop : tricker->props) | |||||
| trickerProp += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info(trickerProp); | |||||
| logger->info("************************"); | |||||
| logger->info("buff={}", trickerBuff); | |||||
| logger->info("************************\n"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -691,23 +693,23 @@ void TrickerDebugAPI::PrintTricker() const | |||||
| { | { | ||||
| for (auto tricker : logic.GetTrickers()) | for (auto tricker : logic.GetTrickers()) | ||||
| { | { | ||||
| logger->info("******Tricker Info******"); | |||||
| logger->info("\n******Tricker Info******"); | |||||
| logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y); | logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y); | ||||
| logger->info("speed={}, view range={}, place={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place]); | |||||
| logger->info("state={}", THUAI6::playerStateDict[tricker->playerState]); | |||||
| std::string skillTime = "skill time="; | |||||
| logger->info("speed={}, view range={}, place={}, radius={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place], tricker->radius); | |||||
| std::string skillTime = ""; | |||||
| for (const auto& time : tricker->timeUntilSkillAvailable) | for (const auto& time : tricker->timeUntilSkillAvailable) | ||||
| skillTime += std::to_string(time) + ", "; | skillTime += std::to_string(time) + ", "; | ||||
| logger->info(skillTime); | |||||
| std::string trickerBuff = "buff="; | |||||
| logger->info("score={}, facing direction={}, skill time={}", tricker->score, tricker->facingDirection, skillTime); | |||||
| std::string props = ""; | |||||
| for (const auto& prop : tricker->props) | |||||
| props += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info("state={}, bullet={}, props={}", THUAI6::playerStateDict[tricker->playerState], THUAI6::bulletTypeDict[tricker->bulletType], props); | |||||
| logger->info("type={}, trick desire={}, class volume={}", THUAI6::trickerTypeDict[tricker->trickerType], tricker->trickDesire, tricker->classVolume); | |||||
| std::string trickerBuff = ""; | |||||
| for (const auto& buff : tricker->buff) | for (const auto& buff : tricker->buff) | ||||
| trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; | trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; | ||||
| logger->info(trickerBuff); | |||||
| std::string trickerProp = "prop="; | |||||
| for (const auto& prop : tricker->props) | |||||
| trickerProp += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info(trickerProp); | |||||
| logger->info("************************"); | |||||
| logger->info("buff={}", trickerBuff); | |||||
| logger->info("************************\n"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -715,9 +717,9 @@ void StudentDebugAPI::PrintProp() const | |||||
| { | { | ||||
| for (auto prop : logic.GetProps()) | for (auto prop : logic.GetProps()) | ||||
| { | { | ||||
| logger->info("******Prop Info******"); | |||||
| logger->info("GUID={}, x={}, y={}, place={}", prop->guid, prop->x, prop->y, THUAI6::placeTypeDict[prop->place]); | |||||
| logger->info("*********************"); | |||||
| logger->info("\n******Prop Info******"); | |||||
| logger->info("GUID={}, x={}, y={}, place={}, facing direction={}", prop->guid, prop->x, prop->y, THUAI6::placeTypeDict[prop->place], prop->facingDirection); | |||||
| logger->info("*********************\n"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -725,54 +727,55 @@ void TrickerDebugAPI::PrintProp() const | |||||
| { | { | ||||
| for (auto prop : logic.GetProps()) | for (auto prop : logic.GetProps()) | ||||
| { | { | ||||
| logger->info("******Prop Info******"); | |||||
| logger->info("GUID={}, x={}, y={}, place={}", prop->guid, prop->x, prop->y, THUAI6::placeTypeDict[prop->place]); | |||||
| logger->info("*********************"); | |||||
| logger->info("\n******Prop Info******"); | |||||
| logger->info("GUID={}, x={}, y={}, place={}, facing direction={}", prop->guid, prop->x, prop->y, THUAI6::placeTypeDict[prop->place], prop->facingDirection); | |||||
| logger->info("*********************\n"); | |||||
| } | } | ||||
| } | } | ||||
| void StudentDebugAPI::PrintSelfInfo() const | void StudentDebugAPI::PrintSelfInfo() const | ||||
| { | { | ||||
| auto self = logic.StudentGetSelfInfo(); | |||||
| logger->info("******Self Info******"); | |||||
| logger->info("playerID={}, GUID={}, x={}, y={}", self->playerID, self->guid, self->x, self->y); | |||||
| logger->info("speed={}, view range={}, place={}", self->speed, self->viewRange, THUAI6::placeTypeDict[self->place]); | |||||
| logger->info("state={}, determination={}, addiction", THUAI6::playerStateDict[self->playerState], self->determination, self->addiction); | |||||
| std::string skillTime = "skill time="; | |||||
| for (const auto& time : self->timeUntilSkillAvailable) | |||||
| auto student = logic.StudentGetSelfInfo(); | |||||
| logger->info("\n******Self Info******"); | |||||
| logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y); | |||||
| logger->info("speed={}, view range={}, place={}, radius={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place], student->radius); | |||||
| std::string skillTime = ""; | |||||
| for (const auto& time : student->timeUntilSkillAvailable) | |||||
| skillTime += std::to_string(time) + ", "; | skillTime += std::to_string(time) + ", "; | ||||
| logger->info(skillTime); | |||||
| std::string studentBuff = "buff="; | |||||
| for (const auto& buff : self->buff) | |||||
| logger->info("score={}, facing direction={}, skill time={}", student->score, student->facingDirection, skillTime); | |||||
| std::string props = ""; | |||||
| for (const auto& prop : student->props) | |||||
| props += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info("state={}, bullet={}, props={}", THUAI6::playerStateDict[student->playerState], THUAI6::bulletTypeDict[student->bulletType], props); | |||||
| logger->info("type={}, determination={}, addiction={}, danger alert={}", THUAI6::studentTypeDict[student->studentType], student->determination, student->addiction, student->dangerAlert); | |||||
| logger->info("learning speed={}, treat speed={}, treat progress={}, rescue progress={}", student->learningSpeed, student->treatSpeed, student->treatProgress, student->rescueProgress); | |||||
| std::string studentBuff = ""; | |||||
| for (const auto& buff : student->buff) | |||||
| studentBuff += THUAI6::studentBuffDict[buff] + ", "; | studentBuff += THUAI6::studentBuffDict[buff] + ", "; | ||||
| logger->info(studentBuff); | |||||
| std::string studentProp = "prop="; | |||||
| for (const auto& prop : self->props) | |||||
| studentProp += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info(studentProp); | |||||
| logger->info("*********************"); | |||||
| logger->info("buff={}", studentBuff); | |||||
| logger->info("*********************\n"); | |||||
| } | } | ||||
| void TrickerDebugAPI::PrintSelfInfo() const | void TrickerDebugAPI::PrintSelfInfo() const | ||||
| { | { | ||||
| auto self = logic.TrickerGetSelfInfo(); | |||||
| logger->info("******Self Info******"); | |||||
| logger->info("playerID={}, GUID={}, x={}, y={}", self->playerID, self->guid, self->x, self->y); | |||||
| logger->info("speed={}, view range={}, place={}", self->speed, self->viewRange, THUAI6::placeTypeDict[self->place]); | |||||
| logger->info("state={}", THUAI6::playerStateDict[self->playerState]); | |||||
| std::string skillTime = "skill time="; | |||||
| for (const auto& time : self->timeUntilSkillAvailable) | |||||
| auto tricker = logic.TrickerGetSelfInfo(); | |||||
| logger->info("\n******Self Info******"); | |||||
| logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y); | |||||
| logger->info("speed={}, view range={}, place={}, radius={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place], tricker->radius); | |||||
| std::string skillTime = ""; | |||||
| for (const auto& time : tricker->timeUntilSkillAvailable) | |||||
| skillTime += std::to_string(time) + ", "; | skillTime += std::to_string(time) + ", "; | ||||
| logger->info(skillTime); | |||||
| std::string trickerBuff = "buff="; | |||||
| for (const auto& buff : self->buff) | |||||
| logger->info("score={}, facing direction={}, skill time={}", tricker->score, tricker->facingDirection, skillTime); | |||||
| std::string props = ""; | |||||
| for (const auto& prop : tricker->props) | |||||
| props += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info("state={}, bullet={}, props={}", THUAI6::playerStateDict[tricker->playerState], THUAI6::bulletTypeDict[tricker->bulletType], props); | |||||
| logger->info("type={}, trick desire={}, class volume={}", THUAI6::trickerTypeDict[tricker->trickerType], tricker->trickDesire, tricker->classVolume); | |||||
| std::string trickerBuff = ""; | |||||
| for (const auto& buff : tricker->buff) | |||||
| trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; | trickerBuff += THUAI6::trickerBuffDict[buff] + ", "; | ||||
| logger->info(trickerBuff); | |||||
| std::string trickerProp = "prop="; | |||||
| for (const auto& prop : self->props) | |||||
| trickerProp += THUAI6::propTypeDict[prop] + ", "; | |||||
| logger->info(trickerProp); | |||||
| logger->info("*********************"); | |||||
| logger->info("buff={}", trickerBuff); | |||||
| logger->info("*********************\n"); | |||||
| } | } | ||||
| void StudentDebugAPI::Play(IAI& ai) | void StudentDebugAPI::Play(IAI& ai) | ||||
| @@ -356,7 +356,7 @@ namespace protobuf | |||||
| ::_pbi::ConstantInitialized | ::_pbi::ConstantInitialized | ||||
| ) : | ) : | ||||
| _impl_{ | _impl_{ | ||||
| /*decltype(_impl_.game_time_)*/ 0, /*decltype(_impl_.subject_left_)*/ 0, /*decltype(_impl_.student_graduated_)*/ 0, /*decltype(_impl_.student_quited_)*/ 0, /*decltype(_impl_.student_score_)*/ 0, /*decltype(_impl_.tricker_score_)*/ 0, /*decltype(_impl_.gate_opened_)*/ false, /*decltype(_impl_.hidden_gate_refreshed_)*/ false, /*decltype(_impl_.hidden_gate_opened_)*/ false, /*decltype(_impl_._cached_size_)*/ {}} | |||||
| /*decltype(_impl_.game_time_)*/ 0, /*decltype(_impl_.subject_finished_)*/ 0, /*decltype(_impl_.student_graduated_)*/ 0, /*decltype(_impl_.student_quited_)*/ 0, /*decltype(_impl_.student_score_)*/ 0, /*decltype(_impl_.tricker_score_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} | |||||
| { | { | ||||
| } | } | ||||
| struct MessageOfAllDefaultTypeInternal | struct MessageOfAllDefaultTypeInternal | ||||
| @@ -644,14 +644,11 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V | |||||
| ~0u, // no _weak_field_map_ | ~0u, // no _weak_field_map_ | ||||
| ~0u, // no _inlined_string_donated_ | ~0u, // no _inlined_string_donated_ | ||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.game_time_), | PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.game_time_), | ||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.subject_left_), | |||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.subject_finished_), | |||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.student_graduated_), | PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.student_graduated_), | ||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.student_quited_), | PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.student_quited_), | ||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.student_score_), | PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.student_score_), | ||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.tricker_score_), | PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.tricker_score_), | ||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.gate_opened_), | |||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.hidden_gate_refreshed_), | |||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfAll, _impl_.hidden_gate_opened_), | |||||
| ~0u, // no _has_bits_ | ~0u, // no _has_bits_ | ||||
| PROTOBUF_FIELD_OFFSET(::protobuf::MessageToClient, _internal_metadata_), | PROTOBUF_FIELD_OFFSET(::protobuf::MessageToClient, _internal_metadata_), | ||||
| ~0u, // no _extensions_ | ~0u, // no _extensions_ | ||||
| @@ -695,9 +692,9 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode | |||||
| {163, -1, -1, sizeof(::protobuf::MessageOfNews)}, | {163, -1, -1, sizeof(::protobuf::MessageOfNews)}, | ||||
| {172, -1, -1, sizeof(::protobuf::MessageOfObj)}, | {172, -1, -1, sizeof(::protobuf::MessageOfObj)}, | ||||
| {191, -1, -1, sizeof(::protobuf::MessageOfAll)}, | {191, -1, -1, sizeof(::protobuf::MessageOfAll)}, | ||||
| {206, -1, -1, sizeof(::protobuf::MessageToClient)}, | |||||
| {215, -1, -1, sizeof(::protobuf::MoveRes)}, | |||||
| {224, -1, -1, sizeof(::protobuf::BoolRes)}, | |||||
| {203, -1, -1, sizeof(::protobuf::MessageToClient)}, | |||||
| {212, -1, -1, sizeof(::protobuf::MoveRes)}, | |||||
| {221, -1, -1, sizeof(::protobuf::BoolRes)}, | |||||
| }; | }; | ||||
| static const ::_pb::Message* const file_default_instances[] = { | static const ::_pb::Message* const file_default_instances[] = { | ||||
| @@ -796,20 +793,18 @@ const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_ | |||||
| "\n \001(\0132\035.protobuf.MessageOfHiddenGateH\000\022/" | "\n \001(\0132\035.protobuf.MessageOfHiddenGateH\000\022/" | ||||
| "\n\014news_message\030\013 \001(\0132\027.protobuf.MessageO" | "\n\014news_message\030\013 \001(\0132\027.protobuf.MessageO" | ||||
| "fNewsH\000\022-\n\013map_message\030\014 \001(\0132\026.protobuf." | "fNewsH\000\022-\n\013map_message\030\014 \001(\0132\026.protobuf." | ||||
| "MessageOfMapH\000B\020\n\016message_of_obj\"\350\001\n\014Mes" | |||||
| "sageOfAll\022\021\n\tgame_time\030\001 \001(\005\022\024\n\014subject_" | |||||
| "left\030\002 \001(\005\022\031\n\021student_graduated\030\003 \001(\005\022\026\n" | |||||
| "\016student_quited\030\004 \001(\005\022\025\n\rstudent_score\030\005" | |||||
| " \001(\005\022\025\n\rtricker_score\030\006 \001(\005\022\023\n\013gate_open" | |||||
| "ed\030\007 \001(\010\022\035\n\025hidden_gate_refreshed\030\010 \001(\010\022" | |||||
| "\032\n\022hidden_gate_opened\030\t \001(\010\"\224\001\n\017MessageT" | |||||
| "oClient\022+\n\013obj_message\030\001 \003(\0132\026.protobuf." | |||||
| "MessageOfObj\022\'\n\ngame_state\030\002 \001(\0162\023.proto" | |||||
| "buf.GameState\022+\n\013all_message\030\003 \001(\0132\026.pro" | |||||
| "tobuf.MessageOfAll\"J\n\007MoveRes\022\024\n\014actual_" | |||||
| "speed\030\001 \001(\003\022\024\n\014actual_angle\030\002 \001(\001\022\023\n\013act" | |||||
| "_success\030\003 \001(\010\"\036\n\007BoolRes\022\023\n\013act_success" | |||||
| "\030\001 \001(\010b\006proto3"; | |||||
| "MessageOfMapH\000B\020\n\016message_of_obj\"\234\001\n\014Mes" | |||||
| "sageOfAll\022\021\n\tgame_time\030\001 \001(\005\022\030\n\020subject_" | |||||
| "finished\030\002 \001(\005\022\031\n\021student_graduated\030\003 \001(" | |||||
| "\005\022\026\n\016student_quited\030\004 \001(\005\022\025\n\rstudent_sco" | |||||
| "re\030\005 \001(\005\022\025\n\rtricker_score\030\006 \001(\005\"\224\001\n\017Mess" | |||||
| "ageToClient\022+\n\013obj_message\030\001 \003(\0132\026.proto" | |||||
| "buf.MessageOfObj\022\'\n\ngame_state\030\002 \001(\0162\023.p" | |||||
| "rotobuf.GameState\022+\n\013all_message\030\003 \001(\0132\026" | |||||
| ".protobuf.MessageOfAll\"J\n\007MoveRes\022\024\n\014act" | |||||
| "ual_speed\030\001 \001(\003\022\024\n\014actual_angle\030\002 \001(\001\022\023\n" | |||||
| "\013act_success\030\003 \001(\010\"\036\n\007BoolRes\022\023\n\013act_suc" | |||||
| "cess\030\001 \001(\010b\006proto3"; | |||||
| static const ::_pbi::DescriptorTable* const descriptor_table_Message2Clients_2eproto_deps[1] = { | static const ::_pbi::DescriptorTable* const descriptor_table_Message2Clients_2eproto_deps[1] = { | ||||
| &::descriptor_table_MessageType_2eproto, | &::descriptor_table_MessageType_2eproto, | ||||
| }; | }; | ||||
| @@ -817,7 +812,7 @@ static ::_pbi::once_flag descriptor_table_Message2Clients_2eproto_once; | |||||
| const ::_pbi::DescriptorTable descriptor_table_Message2Clients_2eproto = { | const ::_pbi::DescriptorTable descriptor_table_Message2Clients_2eproto = { | ||||
| false, | false, | ||||
| false, | false, | ||||
| 3454, | |||||
| 3378, | |||||
| descriptor_table_protodef_Message2Clients_2eproto, | descriptor_table_protodef_Message2Clients_2eproto, | ||||
| "Message2Clients.proto", | "Message2Clients.proto", | ||||
| &descriptor_table_Message2Clients_2eproto_once, | &descriptor_table_Message2Clients_2eproto_once, | ||||
| @@ -7327,10 +7322,10 @@ namespace protobuf | |||||
| MessageOfAll* const _this = this; | MessageOfAll* const _this = this; | ||||
| (void)_this; | (void)_this; | ||||
| new (&_impl_) Impl_{ | new (&_impl_) Impl_{ | ||||
| decltype(_impl_.game_time_){}, decltype(_impl_.subject_left_){}, decltype(_impl_.student_graduated_){}, decltype(_impl_.student_quited_){}, decltype(_impl_.student_score_){}, decltype(_impl_.tricker_score_){}, decltype(_impl_.gate_opened_){}, decltype(_impl_.hidden_gate_refreshed_){}, decltype(_impl_.hidden_gate_opened_){}, /*decltype(_impl_._cached_size_)*/ {}}; | |||||
| decltype(_impl_.game_time_){}, decltype(_impl_.subject_finished_){}, decltype(_impl_.student_graduated_){}, decltype(_impl_.student_quited_){}, decltype(_impl_.student_score_){}, decltype(_impl_.tricker_score_){}, /*decltype(_impl_._cached_size_)*/ {}}; | |||||
| _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); | ||||
| ::memcpy(&_impl_.game_time_, &from._impl_.game_time_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.hidden_gate_opened_) - reinterpret_cast<char*>(&_impl_.game_time_)) + sizeof(_impl_.hidden_gate_opened_)); | |||||
| ::memcpy(&_impl_.game_time_, &from._impl_.game_time_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.tricker_score_) - reinterpret_cast<char*>(&_impl_.game_time_)) + sizeof(_impl_.tricker_score_)); | |||||
| // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfAll) | // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfAll) | ||||
| } | } | ||||
| @@ -7341,7 +7336,7 @@ namespace protobuf | |||||
| (void)arena; | (void)arena; | ||||
| (void)is_message_owned; | (void)is_message_owned; | ||||
| new (&_impl_) Impl_{ | new (&_impl_) Impl_{ | ||||
| decltype(_impl_.game_time_){0}, decltype(_impl_.subject_left_){0}, decltype(_impl_.student_graduated_){0}, decltype(_impl_.student_quited_){0}, decltype(_impl_.student_score_){0}, decltype(_impl_.tricker_score_){0}, decltype(_impl_.gate_opened_){false}, decltype(_impl_.hidden_gate_refreshed_){false}, decltype(_impl_.hidden_gate_opened_){false}, /*decltype(_impl_._cached_size_)*/ {}}; | |||||
| decltype(_impl_.game_time_){0}, decltype(_impl_.subject_finished_){0}, decltype(_impl_.student_graduated_){0}, decltype(_impl_.student_quited_){0}, decltype(_impl_.student_score_){0}, decltype(_impl_.tricker_score_){0}, /*decltype(_impl_._cached_size_)*/ {}}; | |||||
| } | } | ||||
| MessageOfAll::~MessageOfAll() | MessageOfAll::~MessageOfAll() | ||||
| @@ -7372,7 +7367,7 @@ namespace protobuf | |||||
| // Prevent compiler warnings about cached_has_bits being unused | // Prevent compiler warnings about cached_has_bits being unused | ||||
| (void)cached_has_bits; | (void)cached_has_bits; | ||||
| ::memset(&_impl_.game_time_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.hidden_gate_opened_) - reinterpret_cast<char*>(&_impl_.game_time_)) + sizeof(_impl_.hidden_gate_opened_)); | |||||
| ::memset(&_impl_.game_time_, 0, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.tricker_score_) - reinterpret_cast<char*>(&_impl_.game_time_)) + sizeof(_impl_.tricker_score_)); | |||||
| _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); | ||||
| } | } | ||||
| @@ -7397,11 +7392,11 @@ namespace protobuf | |||||
| else | else | ||||
| goto handle_unusual; | goto handle_unusual; | ||||
| continue; | continue; | ||||
| // int32 subject_left = 2; | |||||
| // int32 subject_finished = 2; | |||||
| case 2: | case 2: | ||||
| if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) | ||||
| { | { | ||||
| _impl_.subject_left_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); | |||||
| _impl_.subject_finished_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); | |||||
| CHK_(ptr); | CHK_(ptr); | ||||
| } | } | ||||
| else | else | ||||
| @@ -7447,36 +7442,6 @@ namespace protobuf | |||||
| else | else | ||||
| goto handle_unusual; | goto handle_unusual; | ||||
| continue; | continue; | ||||
| // bool gate_opened = 7; | |||||
| case 7: | |||||
| if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) | |||||
| { | |||||
| _impl_.gate_opened_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); | |||||
| CHK_(ptr); | |||||
| } | |||||
| else | |||||
| goto handle_unusual; | |||||
| continue; | |||||
| // bool hidden_gate_refreshed = 8; | |||||
| case 8: | |||||
| if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) | |||||
| { | |||||
| _impl_.hidden_gate_refreshed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); | |||||
| CHK_(ptr); | |||||
| } | |||||
| else | |||||
| goto handle_unusual; | |||||
| continue; | |||||
| // bool hidden_gate_opened = 9; | |||||
| case 9: | |||||
| if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) | |||||
| { | |||||
| _impl_.hidden_gate_opened_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); | |||||
| CHK_(ptr); | |||||
| } | |||||
| else | |||||
| goto handle_unusual; | |||||
| continue; | |||||
| default: | default: | ||||
| goto handle_unusual; | goto handle_unusual; | ||||
| } // switch | } // switch | ||||
| @@ -7518,11 +7483,11 @@ namespace protobuf | |||||
| target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_game_time(), target); | target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_game_time(), target); | ||||
| } | } | ||||
| // int32 subject_left = 2; | |||||
| if (this->_internal_subject_left() != 0) | |||||
| // int32 subject_finished = 2; | |||||
| if (this->_internal_subject_finished() != 0) | |||||
| { | { | ||||
| target = stream->EnsureSpace(target); | target = stream->EnsureSpace(target); | ||||
| target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_subject_left(), target); | |||||
| target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_subject_finished(), target); | |||||
| } | } | ||||
| // int32 student_graduated = 3; | // int32 student_graduated = 3; | ||||
| @@ -7553,27 +7518,6 @@ namespace protobuf | |||||
| target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_tricker_score(), target); | target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_tricker_score(), target); | ||||
| } | } | ||||
| // bool gate_opened = 7; | |||||
| if (this->_internal_gate_opened() != 0) | |||||
| { | |||||
| target = stream->EnsureSpace(target); | |||||
| target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_gate_opened(), target); | |||||
| } | |||||
| // bool hidden_gate_refreshed = 8; | |||||
| if (this->_internal_hidden_gate_refreshed() != 0) | |||||
| { | |||||
| target = stream->EnsureSpace(target); | |||||
| target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_hidden_gate_refreshed(), target); | |||||
| } | |||||
| // bool hidden_gate_opened = 9; | |||||
| if (this->_internal_hidden_gate_opened() != 0) | |||||
| { | |||||
| target = stream->EnsureSpace(target); | |||||
| target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_hidden_gate_opened(), target); | |||||
| } | |||||
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) | ||||
| { | { | ||||
| target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( | ||||
| @@ -7599,10 +7543,10 @@ namespace protobuf | |||||
| total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_game_time()); | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_game_time()); | ||||
| } | } | ||||
| // int32 subject_left = 2; | |||||
| if (this->_internal_subject_left() != 0) | |||||
| // int32 subject_finished = 2; | |||||
| if (this->_internal_subject_finished() != 0) | |||||
| { | { | ||||
| total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_subject_left()); | |||||
| total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_subject_finished()); | |||||
| } | } | ||||
| // int32 student_graduated = 3; | // int32 student_graduated = 3; | ||||
| @@ -7629,24 +7573,6 @@ namespace protobuf | |||||
| total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_tricker_score()); | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_tricker_score()); | ||||
| } | } | ||||
| // bool gate_opened = 7; | |||||
| if (this->_internal_gate_opened() != 0) | |||||
| { | |||||
| total_size += 1 + 1; | |||||
| } | |||||
| // bool hidden_gate_refreshed = 8; | |||||
| if (this->_internal_hidden_gate_refreshed() != 0) | |||||
| { | |||||
| total_size += 1 + 1; | |||||
| } | |||||
| // bool hidden_gate_opened = 9; | |||||
| if (this->_internal_hidden_gate_opened() != 0) | |||||
| { | |||||
| total_size += 1 + 1; | |||||
| } | |||||
| return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); | ||||
| } | } | ||||
| @@ -7671,9 +7597,9 @@ namespace protobuf | |||||
| { | { | ||||
| _this->_internal_set_game_time(from._internal_game_time()); | _this->_internal_set_game_time(from._internal_game_time()); | ||||
| } | } | ||||
| if (from._internal_subject_left() != 0) | |||||
| if (from._internal_subject_finished() != 0) | |||||
| { | { | ||||
| _this->_internal_set_subject_left(from._internal_subject_left()); | |||||
| _this->_internal_set_subject_finished(from._internal_subject_finished()); | |||||
| } | } | ||||
| if (from._internal_student_graduated() != 0) | if (from._internal_student_graduated() != 0) | ||||
| { | { | ||||
| @@ -7691,18 +7617,6 @@ namespace protobuf | |||||
| { | { | ||||
| _this->_internal_set_tricker_score(from._internal_tricker_score()); | _this->_internal_set_tricker_score(from._internal_tricker_score()); | ||||
| } | } | ||||
| if (from._internal_gate_opened() != 0) | |||||
| { | |||||
| _this->_internal_set_gate_opened(from._internal_gate_opened()); | |||||
| } | |||||
| if (from._internal_hidden_gate_refreshed() != 0) | |||||
| { | |||||
| _this->_internal_set_hidden_gate_refreshed(from._internal_hidden_gate_refreshed()); | |||||
| } | |||||
| if (from._internal_hidden_gate_opened() != 0) | |||||
| { | |||||
| _this->_internal_set_hidden_gate_opened(from._internal_hidden_gate_opened()); | |||||
| } | |||||
| _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); | ||||
| } | } | ||||
| @@ -7725,7 +7639,7 @@ namespace protobuf | |||||
| using std::swap; | using std::swap; | ||||
| _internal_metadata_.InternalSwap(&other->_internal_metadata_); | _internal_metadata_.InternalSwap(&other->_internal_metadata_); | ||||
| ::PROTOBUF_NAMESPACE_ID::internal::memswap< | ::PROTOBUF_NAMESPACE_ID::internal::memswap< | ||||
| PROTOBUF_FIELD_OFFSET(MessageOfAll, _impl_.hidden_gate_opened_) + sizeof(MessageOfAll::_impl_.hidden_gate_opened_) - PROTOBUF_FIELD_OFFSET(MessageOfAll, _impl_.game_time_)>( | |||||
| PROTOBUF_FIELD_OFFSET(MessageOfAll, _impl_.tricker_score_) + sizeof(MessageOfAll::_impl_.tricker_score_) - PROTOBUF_FIELD_OFFSET(MessageOfAll, _impl_.game_time_)>( | |||||
| reinterpret_cast<char*>(&_impl_.game_time_), | reinterpret_cast<char*>(&_impl_.game_time_), | ||||
| reinterpret_cast<char*>(&other->_impl_.game_time_) | reinterpret_cast<char*>(&other->_impl_.game_time_) | ||||
| ); | ); | ||||
| @@ -4521,14 +4521,11 @@ namespace protobuf | |||||
| enum : int | enum : int | ||||
| { | { | ||||
| kGameTimeFieldNumber = 1, | kGameTimeFieldNumber = 1, | ||||
| kSubjectLeftFieldNumber = 2, | |||||
| kSubjectFinishedFieldNumber = 2, | |||||
| kStudentGraduatedFieldNumber = 3, | kStudentGraduatedFieldNumber = 3, | ||||
| kStudentQuitedFieldNumber = 4, | kStudentQuitedFieldNumber = 4, | ||||
| kStudentScoreFieldNumber = 5, | kStudentScoreFieldNumber = 5, | ||||
| kTrickerScoreFieldNumber = 6, | kTrickerScoreFieldNumber = 6, | ||||
| kGateOpenedFieldNumber = 7, | |||||
| kHiddenGateRefreshedFieldNumber = 8, | |||||
| kHiddenGateOpenedFieldNumber = 9, | |||||
| }; | }; | ||||
| // int32 game_time = 1; | // int32 game_time = 1; | ||||
| void clear_game_time(); | void clear_game_time(); | ||||
| @@ -4540,14 +4537,14 @@ namespace protobuf | |||||
| void _internal_set_game_time(int32_t value); | void _internal_set_game_time(int32_t value); | ||||
| public: | public: | ||||
| // int32 subject_left = 2; | |||||
| void clear_subject_left(); | |||||
| int32_t subject_left() const; | |||||
| void set_subject_left(int32_t value); | |||||
| // int32 subject_finished = 2; | |||||
| void clear_subject_finished(); | |||||
| int32_t subject_finished() const; | |||||
| void set_subject_finished(int32_t value); | |||||
| private: | private: | ||||
| int32_t _internal_subject_left() const; | |||||
| void _internal_set_subject_left(int32_t value); | |||||
| int32_t _internal_subject_finished() const; | |||||
| void _internal_set_subject_finished(int32_t value); | |||||
| public: | public: | ||||
| // int32 student_graduated = 3; | // int32 student_graduated = 3; | ||||
| @@ -4589,36 +4586,6 @@ namespace protobuf | |||||
| int32_t _internal_tricker_score() const; | int32_t _internal_tricker_score() const; | ||||
| void _internal_set_tricker_score(int32_t value); | void _internal_set_tricker_score(int32_t value); | ||||
| public: | |||||
| // bool gate_opened = 7; | |||||
| void clear_gate_opened(); | |||||
| bool gate_opened() const; | |||||
| void set_gate_opened(bool value); | |||||
| private: | |||||
| bool _internal_gate_opened() const; | |||||
| void _internal_set_gate_opened(bool value); | |||||
| public: | |||||
| // bool hidden_gate_refreshed = 8; | |||||
| void clear_hidden_gate_refreshed(); | |||||
| bool hidden_gate_refreshed() const; | |||||
| void set_hidden_gate_refreshed(bool value); | |||||
| private: | |||||
| bool _internal_hidden_gate_refreshed() const; | |||||
| void _internal_set_hidden_gate_refreshed(bool value); | |||||
| public: | |||||
| // bool hidden_gate_opened = 9; | |||||
| void clear_hidden_gate_opened(); | |||||
| bool hidden_gate_opened() const; | |||||
| void set_hidden_gate_opened(bool value); | |||||
| private: | |||||
| bool _internal_hidden_gate_opened() const; | |||||
| void _internal_set_hidden_gate_opened(bool value); | |||||
| public: | public: | ||||
| // @@protoc_insertion_point(class_scope:protobuf.MessageOfAll) | // @@protoc_insertion_point(class_scope:protobuf.MessageOfAll) | ||||
| @@ -4632,14 +4599,11 @@ namespace protobuf | |||||
| struct Impl_ | struct Impl_ | ||||
| { | { | ||||
| int32_t game_time_; | int32_t game_time_; | ||||
| int32_t subject_left_; | |||||
| int32_t subject_finished_; | |||||
| int32_t student_graduated_; | int32_t student_graduated_; | ||||
| int32_t student_quited_; | int32_t student_quited_; | ||||
| int32_t student_score_; | int32_t student_score_; | ||||
| int32_t tricker_score_; | int32_t tricker_score_; | ||||
| bool gate_opened_; | |||||
| bool hidden_gate_refreshed_; | |||||
| bool hidden_gate_opened_; | |||||
| mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; | mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; | ||||
| }; | }; | ||||
| union | union | ||||
| @@ -8922,28 +8886,28 @@ namespace protobuf | |||||
| // @@protoc_insertion_point(field_set:protobuf.MessageOfAll.game_time) | // @@protoc_insertion_point(field_set:protobuf.MessageOfAll.game_time) | ||||
| } | } | ||||
| // int32 subject_left = 2; | |||||
| inline void MessageOfAll::clear_subject_left() | |||||
| // int32 subject_finished = 2; | |||||
| inline void MessageOfAll::clear_subject_finished() | |||||
| { | { | ||||
| _impl_.subject_left_ = 0; | |||||
| _impl_.subject_finished_ = 0; | |||||
| } | } | ||||
| inline int32_t MessageOfAll::_internal_subject_left() const | |||||
| inline int32_t MessageOfAll::_internal_subject_finished() const | |||||
| { | { | ||||
| return _impl_.subject_left_; | |||||
| return _impl_.subject_finished_; | |||||
| } | } | ||||
| inline int32_t MessageOfAll::subject_left() const | |||||
| inline int32_t MessageOfAll::subject_finished() const | |||||
| { | { | ||||
| // @@protoc_insertion_point(field_get:protobuf.MessageOfAll.subject_left) | |||||
| return _internal_subject_left(); | |||||
| // @@protoc_insertion_point(field_get:protobuf.MessageOfAll.subject_finished) | |||||
| return _internal_subject_finished(); | |||||
| } | } | ||||
| inline void MessageOfAll::_internal_set_subject_left(int32_t value) | |||||
| inline void MessageOfAll::_internal_set_subject_finished(int32_t value) | |||||
| { | { | ||||
| _impl_.subject_left_ = value; | |||||
| _impl_.subject_finished_ = value; | |||||
| } | } | ||||
| inline void MessageOfAll::set_subject_left(int32_t value) | |||||
| inline void MessageOfAll::set_subject_finished(int32_t value) | |||||
| { | { | ||||
| _internal_set_subject_left(value); | |||||
| // @@protoc_insertion_point(field_set:protobuf.MessageOfAll.subject_left) | |||||
| _internal_set_subject_finished(value); | |||||
| // @@protoc_insertion_point(field_set:protobuf.MessageOfAll.subject_finished) | |||||
| } | } | ||||
| // int32 student_graduated = 3; | // int32 student_graduated = 3; | ||||
| @@ -9042,78 +9006,6 @@ namespace protobuf | |||||
| // @@protoc_insertion_point(field_set:protobuf.MessageOfAll.tricker_score) | // @@protoc_insertion_point(field_set:protobuf.MessageOfAll.tricker_score) | ||||
| } | } | ||||
| // bool gate_opened = 7; | |||||
| inline void MessageOfAll::clear_gate_opened() | |||||
| { | |||||
| _impl_.gate_opened_ = false; | |||||
| } | |||||
| inline bool MessageOfAll::_internal_gate_opened() const | |||||
| { | |||||
| return _impl_.gate_opened_; | |||||
| } | |||||
| inline bool MessageOfAll::gate_opened() const | |||||
| { | |||||
| // @@protoc_insertion_point(field_get:protobuf.MessageOfAll.gate_opened) | |||||
| return _internal_gate_opened(); | |||||
| } | |||||
| inline void MessageOfAll::_internal_set_gate_opened(bool value) | |||||
| { | |||||
| _impl_.gate_opened_ = value; | |||||
| } | |||||
| inline void MessageOfAll::set_gate_opened(bool value) | |||||
| { | |||||
| _internal_set_gate_opened(value); | |||||
| // @@protoc_insertion_point(field_set:protobuf.MessageOfAll.gate_opened) | |||||
| } | |||||
| // bool hidden_gate_refreshed = 8; | |||||
| inline void MessageOfAll::clear_hidden_gate_refreshed() | |||||
| { | |||||
| _impl_.hidden_gate_refreshed_ = false; | |||||
| } | |||||
| inline bool MessageOfAll::_internal_hidden_gate_refreshed() const | |||||
| { | |||||
| return _impl_.hidden_gate_refreshed_; | |||||
| } | |||||
| inline bool MessageOfAll::hidden_gate_refreshed() const | |||||
| { | |||||
| // @@protoc_insertion_point(field_get:protobuf.MessageOfAll.hidden_gate_refreshed) | |||||
| return _internal_hidden_gate_refreshed(); | |||||
| } | |||||
| inline void MessageOfAll::_internal_set_hidden_gate_refreshed(bool value) | |||||
| { | |||||
| _impl_.hidden_gate_refreshed_ = value; | |||||
| } | |||||
| inline void MessageOfAll::set_hidden_gate_refreshed(bool value) | |||||
| { | |||||
| _internal_set_hidden_gate_refreshed(value); | |||||
| // @@protoc_insertion_point(field_set:protobuf.MessageOfAll.hidden_gate_refreshed) | |||||
| } | |||||
| // bool hidden_gate_opened = 9; | |||||
| inline void MessageOfAll::clear_hidden_gate_opened() | |||||
| { | |||||
| _impl_.hidden_gate_opened_ = false; | |||||
| } | |||||
| inline bool MessageOfAll::_internal_hidden_gate_opened() const | |||||
| { | |||||
| return _impl_.hidden_gate_opened_; | |||||
| } | |||||
| inline bool MessageOfAll::hidden_gate_opened() const | |||||
| { | |||||
| // @@protoc_insertion_point(field_get:protobuf.MessageOfAll.hidden_gate_opened) | |||||
| return _internal_hidden_gate_opened(); | |||||
| } | |||||
| inline void MessageOfAll::_internal_set_hidden_gate_opened(bool value) | |||||
| { | |||||
| _impl_.hidden_gate_opened_ = value; | |||||
| } | |||||
| inline void MessageOfAll::set_hidden_gate_opened(bool value) | |||||
| { | |||||
| _internal_set_hidden_gate_opened(value); | |||||
| // @@protoc_insertion_point(field_set:protobuf.MessageOfAll.hidden_gate_opened) | |||||
| } | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // MessageToClient | // MessageToClient | ||||
| @@ -39,38 +39,39 @@ const char descriptor_table_protodef_MessageType_2eproto[] PROTOBUF_SECTION_VARI | |||||
| "SSROOM\020\004\022\010\n\004GATE\020\005\022\017\n\013HIDDEN_GATE\020\006\022\n\n\006W" | "SSROOM\020\004\022\010\n\004GATE\020\005\022\017\n\013HIDDEN_GATE\020\006\022\n\n\006W" | ||||
| "INDOW\020\007\022\t\n\005DOOR3\020\010\022\t\n\005DOOR5\020\t\022\t\n\005DOOR6\020\n" | "INDOW\020\007\022\t\n\005DOOR3\020\010\022\t\n\005DOOR5\020\t\022\t\n\005DOOR6\020\n" | ||||
| "\022\t\n\005CHEST\020\013*8\n\tShapeType\022\023\n\017NULL_SHAPE_T" | "\022\t\n\005CHEST\020\013*8\n\tShapeType\022\023\n\017NULL_SHAPE_T" | ||||
| "YPE\020\000\022\n\n\006CIRCLE\020\001\022\n\n\006SQUARE\020\002*\206\001\n\010PropTy" | |||||
| "YPE\020\000\022\n\n\006CIRCLE\020\001\022\n\n\006SQUARE\020\002*\243\001\n\010PropTy" | |||||
| "pe\022\022\n\016NULL_PROP_TYPE\020\000\022\r\n\tADD_SPEED\020\001\022\022\n" | "pe\022\022\n\016NULL_PROP_TYPE\020\000\022\r\n\tADD_SPEED\020\001\022\022\n" | ||||
| "\016ADD_LIFE_OR_AP\020\002\022\020\n\014ADD_HP_OR_AP\020\003\022\023\n\017S" | "\016ADD_LIFE_OR_AP\020\002\022\020\n\014ADD_HP_OR_AP\020\003\022\023\n\017S" | ||||
| "HIELD_OR_SPEAR\020\004\022\010\n\004KEY3\020\005\022\010\n\004KEY5\020\006\022\010\n\004" | "HIELD_OR_SPEAR\020\004\022\010\n\004KEY3\020\005\022\010\n\004KEY5\020\006\022\010\n\004" | ||||
| "KEY6\020\007*f\n\017StudentBuffType\022\023\n\017NULL_SBUFF_" | |||||
| "TYPE\020\000\022\016\n\nSBUFFTYPE1\020\001\022\016\n\nSBUFFTYPE2\020\002\022\016" | |||||
| "\n\nSBUFFTYPE3\020\003\022\016\n\nSBUFFTYPE4\020\004*\251\002\n\013Playe" | |||||
| "rState\022\017\n\013NULL_STATUS\020\000\022\010\n\004IDLE\020\001\022\014\n\010LEA" | |||||
| "RNING\020\002\022\014\n\010ADDICTED\020\003\022\010\n\004QUIT\020\004\022\r\n\tGRADU" | |||||
| "ATED\020\005\022\013\n\007TREATED\020\006\022\013\n\007RESCUED\020\007\022\013\n\007STUN" | |||||
| "NED\020\010\022\014\n\010TREATING\020\t\022\014\n\010RESCUING\020\n\022\014\n\010SWI" | |||||
| "NGING\020\013\022\r\n\tATTACKING\020\014\022\013\n\007LOCKING\020\r\022\r\n\tR" | |||||
| "UMMAGING\020\016\022\014\n\010CLIMBING\020\017\022\023\n\017OPENING_A_CH" | |||||
| "EST\020\020\022\027\n\023USING_SPECIAL_SKILL\020\021\022\022\n\016OPENIN" | |||||
| "G_A_GATE\020\022*f\n\017TrickerBuffType\022\023\n\017NULL_TB" | |||||
| "UFF_TYPE\020\000\022\016\n\nTBUFFTYPE1\020\001\022\016\n\nTBUFFTYPE2" | |||||
| "\020\002\022\016\n\nTBUFFTYPE3\020\003\022\016\n\nTBUFFTYPE4\020\004*J\n\nPl" | |||||
| "ayerType\022\024\n\020NULL_PLAYER_TYPE\020\000\022\022\n\016STUDEN" | |||||
| "T_PLAYER\020\001\022\022\n\016TRICKER_PLAYER\020\002*g\n\013Studen" | |||||
| "tType\022\025\n\021NULL_STUDENT_TYPE\020\000\022\013\n\007ATHLETE\020" | |||||
| "\001\022\020\n\014STUDENTTYPE2\020\002\022\020\n\014STUDENTTYPE3\020\003\022\020\n" | |||||
| "\014STUDENTTYPE4\020\004*h\n\013TrickerType\022\025\n\021NULL_T" | |||||
| "RICKER_TYPE\020\000\022\014\n\010ASSASSIN\020\001\022\020\n\014TRICKERTY" | |||||
| "PE2\020\002\022\020\n\014TRICKERTYPE3\020\003\022\020\n\014TRICKERTYPE4\020" | |||||
| "\004*P\n\tGameState\022\023\n\017NULL_GAME_STATE\020\000\022\016\n\nG" | |||||
| "AME_START\020\001\022\020\n\014GAME_RUNNING\020\002\022\014\n\010GAME_EN" | |||||
| "D\020\003b\006proto3"; | |||||
| "KEY6\020\007\022\033\n\027RECOVERY_FROM_DIZZINESS\020\010*f\n\017S" | |||||
| "tudentBuffType\022\023\n\017NULL_SBUFF_TYPE\020\000\022\016\n\nS" | |||||
| "BUFFTYPE1\020\001\022\016\n\nSBUFFTYPE2\020\002\022\016\n\nSBUFFTYPE" | |||||
| "3\020\003\022\016\n\nSBUFFTYPE4\020\004*\251\002\n\013PlayerState\022\017\n\013N" | |||||
| "ULL_STATUS\020\000\022\010\n\004IDLE\020\001\022\014\n\010LEARNING\020\002\022\014\n\010" | |||||
| "ADDICTED\020\003\022\010\n\004QUIT\020\004\022\r\n\tGRADUATED\020\005\022\013\n\007T" | |||||
| "REATED\020\006\022\013\n\007RESCUED\020\007\022\013\n\007STUNNED\020\010\022\014\n\010TR" | |||||
| "EATING\020\t\022\014\n\010RESCUING\020\n\022\014\n\010SWINGING\020\013\022\r\n\t" | |||||
| "ATTACKING\020\014\022\013\n\007LOCKING\020\r\022\r\n\tRUMMAGING\020\016\022" | |||||
| "\014\n\010CLIMBING\020\017\022\023\n\017OPENING_A_CHEST\020\020\022\027\n\023US" | |||||
| "ING_SPECIAL_SKILL\020\021\022\022\n\016OPENING_A_GATE\020\022*" | |||||
| "u\n\017TrickerBuffType\022\023\n\017NULL_TBUFF_TYPE\020\000\022" | |||||
| "\016\n\nTBUFFTYPE1\020\001\022\016\n\nTBUFFTYPE2\020\002\022\016\n\nTBUFF" | |||||
| "TYPE3\020\003\022\016\n\nTBUFFTYPE4\020\004\022\r\n\tINVISIBLE\020\005*J" | |||||
| "\n\nPlayerType\022\024\n\020NULL_PLAYER_TYPE\020\000\022\022\n\016ST" | |||||
| "UDENT_PLAYER\020\001\022\022\n\016TRICKER_PLAYER\020\002*g\n\013St" | |||||
| "udentType\022\025\n\021NULL_STUDENT_TYPE\020\000\022\013\n\007ATHL" | |||||
| "ETE\020\001\022\020\n\014STUDENTTYPE2\020\002\022\020\n\014STUDENTTYPE3\020" | |||||
| "\003\022\020\n\014STUDENTTYPE4\020\004*h\n\013TrickerType\022\025\n\021NU" | |||||
| "LL_TRICKER_TYPE\020\000\022\014\n\010ASSASSIN\020\001\022\020\n\014TRICK" | |||||
| "ERTYPE2\020\002\022\020\n\014TRICKERTYPE3\020\003\022\020\n\014TRICKERTY" | |||||
| "PE4\020\004*P\n\tGameState\022\023\n\017NULL_GAME_STATE\020\000\022" | |||||
| "\016\n\nGAME_START\020\001\022\020\n\014GAME_RUNNING\020\002\022\014\n\010GAM" | |||||
| "E_END\020\003b\006proto3"; | |||||
| static ::_pbi::once_flag descriptor_table_MessageType_2eproto_once; | static ::_pbi::once_flag descriptor_table_MessageType_2eproto_once; | ||||
| const ::_pbi::DescriptorTable descriptor_table_MessageType_2eproto = { | const ::_pbi::DescriptorTable descriptor_table_MessageType_2eproto = { | ||||
| false, | false, | ||||
| false, | false, | ||||
| 1411, | |||||
| 1455, | |||||
| descriptor_table_protodef_MessageType_2eproto, | descriptor_table_protodef_MessageType_2eproto, | ||||
| "MessageType.proto", | "MessageType.proto", | ||||
| &descriptor_table_MessageType_2eproto_once, | &descriptor_table_MessageType_2eproto_once, | ||||
| @@ -176,6 +177,7 @@ namespace protobuf | |||||
| case 5: | case 5: | ||||
| case 6: | case 6: | ||||
| case 7: | case 7: | ||||
| case 8: | |||||
| return true; | return true; | ||||
| default: | default: | ||||
| return false; | return false; | ||||
| @@ -250,6 +252,7 @@ namespace protobuf | |||||
| case 2: | case 2: | ||||
| case 3: | case 3: | ||||
| case 4: | case 4: | ||||
| case 5: | |||||
| return true; | return true; | ||||
| default: | default: | ||||
| return false; | return false; | ||||
| @@ -162,12 +162,13 @@ namespace protobuf | |||||
| KEY3 = 5, | KEY3 = 5, | ||||
| KEY5 = 6, | KEY5 = 6, | ||||
| KEY6 = 7, | KEY6 = 7, | ||||
| RECOVERY_FROM_DIZZINESS = 8, | |||||
| PropType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | PropType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | ||||
| PropType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | PropType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | ||||
| }; | }; | ||||
| bool PropType_IsValid(int value); | bool PropType_IsValid(int value); | ||||
| constexpr PropType PropType_MIN = NULL_PROP_TYPE; | constexpr PropType PropType_MIN = NULL_PROP_TYPE; | ||||
| constexpr PropType PropType_MAX = KEY6; | |||||
| constexpr PropType PropType_MAX = RECOVERY_FROM_DIZZINESS; | |||||
| constexpr int PropType_ARRAYSIZE = PropType_MAX + 1; | constexpr int PropType_ARRAYSIZE = PropType_MAX + 1; | ||||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PropType_descriptor(); | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PropType_descriptor(); | ||||
| @@ -272,12 +273,13 @@ namespace protobuf | |||||
| TBUFFTYPE2 = 2, | TBUFFTYPE2 = 2, | ||||
| TBUFFTYPE3 = 3, | TBUFFTYPE3 = 3, | ||||
| TBUFFTYPE4 = 4, | TBUFFTYPE4 = 4, | ||||
| INVISIBLE = 5, | |||||
| TrickerBuffType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | TrickerBuffType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | ||||
| TrickerBuffType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | TrickerBuffType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | ||||
| }; | }; | ||||
| bool TrickerBuffType_IsValid(int value); | bool TrickerBuffType_IsValid(int value); | ||||
| constexpr TrickerBuffType TrickerBuffType_MIN = NULL_TBUFF_TYPE; | constexpr TrickerBuffType TrickerBuffType_MIN = NULL_TBUFF_TYPE; | ||||
| constexpr TrickerBuffType TrickerBuffType_MAX = TBUFFTYPE4; | |||||
| constexpr TrickerBuffType TrickerBuffType_MAX = INVISIBLE; | |||||
| constexpr int TrickerBuffType_ARRAYSIZE = TrickerBuffType_MAX + 1; | constexpr int TrickerBuffType_ARRAYSIZE = TrickerBuffType_MAX + 1; | ||||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TrickerBuffType_descriptor(); | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TrickerBuffType_descriptor(); | ||||
| @@ -295,61 +295,80 @@ class StudentDebugAPI(IStudentAPI, IGameTimer): | |||||
| def PrintStudent(self) -> None: | def PrintStudent(self) -> None: | ||||
| for student in self.__logic.GetStudents(): | for student in self.__logic.GetStudents(): | ||||
| self.__logger.info("******Student Info******") | |||||
| self.__logger.info("\n******Student Info******") | |||||
| self.__logger.info( | self.__logger.info( | ||||
| f"playerID={student.playerID}, GUID={student.guid}, x={student.x}, y={student.y}") | f"playerID={student.playerID}, GUID={student.guid}, x={student.x}, y={student.y}") | ||||
| self.__logger.info( | self.__logger.info( | ||||
| f"speed={student.speed}, view range={student.viewRange}, skill time={student.timeUntilSkillAvailable},place={student.place.name}") | |||||
| studentBuff = "buff=" | |||||
| for buff in student.buff: | |||||
| studentBuff += buff.name + ", " | |||||
| self.__logger.info(studentBuff) | |||||
| studentProp = "prop=" | |||||
| f"speed={student.speed}, view range={student.viewRange}, place={student.place.name}, radius={student.radius}") | |||||
| self.__logger.info( | |||||
| f"score={student.score}, facing direction={student.facingDirection}, skill time={student.timeUntilSkillAvailable}") | |||||
| studentProp = "" | |||||
| for prop in student.prop: | for prop in student.prop: | ||||
| studentProp += prop.name + ", " | studentProp += prop.name + ", " | ||||
| self.__logger.info(studentProp) | |||||
| self.__logger.info("**********************") | |||||
| self.__logger.info( | |||||
| f"state={student.playerState.name}, bullet={student.bulletType.name}, prop={studentProp}") | |||||
| self.__logger.info( | |||||
| f"type={student.studentType.name}, determination={student.determination}, addiction={student.addiction}, danger alert={student.dangerAlert}") | |||||
| self.__logger.info( | |||||
| f"learning speed={student.learningSpeed}, treat speed={student.treatSpeed}, treat progress={student.treatProgress}, rescue progress={student.rescueProgress}") | |||||
| studentBuff = "" | |||||
| for buff in student.buff: | |||||
| studentBuff += buff.name + ", " | |||||
| self.__logger.info(f"buff={studentBuff}") | |||||
| self.__logger.info("************************\n") | |||||
| def PrintTricker(self) -> None: | def PrintTricker(self) -> None: | ||||
| for tricker in self.__logic.GetTrickers(): | for tricker in self.__logic.GetTrickers(): | ||||
| self.__logger.info("******Tricker Info******") | |||||
| self.__logger.info("\n******Tricker Info******") | |||||
| self.__logger.info( | self.__logger.info( | ||||
| f"playerID={tricker.playerID}, GUID={tricker.guid}, x={tricker.x}, y={tricker.y}") | f"playerID={tricker.playerID}, GUID={tricker.guid}, x={tricker.x}, y={tricker.y}") | ||||
| self.__logger.info( | self.__logger.info( | ||||
| f"speed={tricker.speed}, view range={tricker.viewRange}, skill time={tricker.timeUntilSkillAvailable}, place={tricker.place.name}") | |||||
| self.__logger.info("buff=") | |||||
| f"speed={tricker.speed}, view range={tricker.viewRange}, place={tricker.place.name}, radius={tricker.radius}") | |||||
| self.__logger.info( | |||||
| f"score={tricker.score}, facing direction={tricker.facingDirection}, skill time={tricker.timeUntilSkillAvailable}") | |||||
| trickerProp = "" | |||||
| for prop in tricker.prop: | |||||
| trickerProp += prop.name + ", " | |||||
| self.__logger.info( | |||||
| f"state={tricker.playerState.name}, bullet={tricker.bulletType.name}, prop={trickerProp}") | |||||
| self.__logger.info( | |||||
| f"type={tricker.trickerType.name}, trick desire={tricker.trickDesire}, class volume={tricker.classVolume}") | |||||
| trickerBuff = "" | trickerBuff = "" | ||||
| for buff in tricker.buff: | for buff in tricker.buff: | ||||
| trickerBuff += buff.name + ", " | trickerBuff += buff.name + ", " | ||||
| self.__logger.info(trickerBuff) | |||||
| self.__logger.info("************************") | |||||
| self.__logger.info(f"buff={trickerBuff}") | |||||
| self.__logger.info("************************\n") | |||||
| def PrintProp(self) -> None: | def PrintProp(self) -> None: | ||||
| for prop in self.__logic.GetProps(): | for prop in self.__logic.GetProps(): | ||||
| self.__logger.info("******Prop Info******") | self.__logger.info("******Prop Info******") | ||||
| self.__logger.info( | self.__logger.info( | ||||
| f"GUID={prop.guid}, x={prop.x}, y={prop.y}, place={prop.place.name}, ") | |||||
| f"GUID={prop.guid}, x={prop.x}, y={prop.y}, place={prop.place.name}, facing direction={prop.facingDirection}") | |||||
| self.__logger.info("*********************") | self.__logger.info("*********************") | ||||
| def PrintSelfInfo(self) -> None: | def PrintSelfInfo(self) -> None: | ||||
| mySelf = self.__logic.GetSelfInfo() | |||||
| self.__logger.info("******Self Info******") | |||||
| student = cast(THUAI6.Student, self.__logic.GetSelfInfo()) | |||||
| self.__logger.info("\n******Student Info******") | |||||
| self.__logger.info( | self.__logger.info( | ||||
| f"playerID={mySelf.playerID}, GUID={mySelf.guid}, x={mySelf.x}, y={mySelf.y}") | |||||
| f"playerID={student.playerID}, GUID={student.guid}, x={student.x}, y={student.y}") | |||||
| self.__logger.info( | self.__logger.info( | ||||
| f"speed={mySelf.speed}, view range={mySelf.viewRange}, skill time={mySelf.timeUntilSkillAvailable}, place={mySelf.place.name}") | |||||
| if isinstance(mySelf, THUAI6.Student): | |||||
| self.__logger.info( | |||||
| f"state={mySelf.playerState.name}, determination={mySelf.determination},") | |||||
| mySelfBuff = "buff=" | |||||
| for buff in mySelf.buff: | |||||
| mySelfBuff += buff.name + ", " | |||||
| self.__logger.info(mySelfBuff) | |||||
| studentProp = "prop=" | |||||
| for prop in mySelf.prop: | |||||
| f"speed={student.speed}, view range={student.viewRange}, place={student.place.name}, radius={student.radius}") | |||||
| self.__logger.info( | |||||
| f"score={student.score}, facing direction={student.facingDirection}, skill time={student.timeUntilSkillAvailable}") | |||||
| studentProp = "" | |||||
| for prop in student.prop: | |||||
| studentProp += prop.name + ", " | studentProp += prop.name + ", " | ||||
| self.__logger.info(studentProp) | |||||
| self.__logger.info("*********************") | |||||
| self.__logger.info( | |||||
| f"state={student.playerState.name}, bullet={student.bulletType.name}, prop={studentProp}") | |||||
| self.__logger.info( | |||||
| f"type={student.studentType.name}, determination={student.determination}, addiction={student.addiction}, danger alert={student.dangerAlert}") | |||||
| self.__logger.info( | |||||
| f"learning speed={student.learningSpeed}, treat speed={student.treatSpeed}, treat progress={student.treatProgress}, rescue progress={student.rescueProgress}") | |||||
| studentBuff = "" | |||||
| for buff in student.buff: | |||||
| studentBuff += buff.name + ", " | |||||
| self.__logger.info(f"buff={studentBuff}") | |||||
| self.__logger.info("************************\n") | |||||
| # 人类阵营的特殊函数 | # 人类阵营的特殊函数 | ||||
| @@ -410,8 +429,8 @@ class StudentDebugAPI(IStudentAPI, IGameTimer): | |||||
| # Timer用 | # Timer用 | ||||
| def __GetTime(self) -> int: | |||||
| return int((datetime.datetime.now() - self.__startPoint).total_seconds() * 1000) | |||||
| def __GetTime(self) -> float: | |||||
| return (datetime.datetime.now() - self.__startPoint) / datetime.timedelta(milliseconds=1) | |||||
| def StartTimer(self) -> None: | def StartTimer(self) -> None: | ||||
| self.__startPoint = datetime.datetime.now() | self.__startPoint = datetime.datetime.now() | ||||
| @@ -712,57 +731,78 @@ class TrickerDebugAPI(ITrickerAPI, IGameTimer): | |||||
| def PrintStudent(self) -> None: | def PrintStudent(self) -> None: | ||||
| for student in self.__logic.GetStudents(): | for student in self.__logic.GetStudents(): | ||||
| self.__logger.info("******Student Info******") | |||||
| self.__logger.info("\n******Student Info******") | |||||
| self.__logger.info( | self.__logger.info( | ||||
| f"playerID={student.playerID}, GUID={student.guid}, x={student.x}, y={student.y}") | f"playerID={student.playerID}, GUID={student.guid}, x={student.x}, y={student.y}") | ||||
| self.__logger.info( | self.__logger.info( | ||||
| f"speed={student.speed}, view range={student.viewRange}, skill time={student.timeUntilSkillAvailable}, place={student.place.name}") | |||||
| f"speed={student.speed}, view range={student.viewRange}, place={student.place.name}, radius={student.radius}") | |||||
| self.__logger.info( | |||||
| f"score={student.score}, facing direction={student.facingDirection}, skill time={student.timeUntilSkillAvailable}") | |||||
| studentProp = "" | |||||
| for prop in student.prop: | |||||
| studentProp += prop.name + ", " | |||||
| self.__logger.info( | |||||
| f"state={student.playerState.name}, bullet={student.bulletType.name}, prop={studentProp}") | |||||
| self.__logger.info( | |||||
| f"type={student.studentType.name}, determination={student.determination}, addiction={student.addiction}, danger alert={student.dangerAlert}") | |||||
| self.__logger.info( | self.__logger.info( | ||||
| f"state={student.playerState.name}, determination={student.determination}") | |||||
| self.__logger.info("buff=") | |||||
| f"learning speed={student.learningSpeed}, treat speed={student.treatSpeed}, treat progress={student.treatProgress}, rescue progress={student.rescueProgress}") | |||||
| studentBuff = "" | studentBuff = "" | ||||
| for buff in student.buff: | for buff in student.buff: | ||||
| studentBuff += buff.name + ", " | studentBuff += buff.name + ", " | ||||
| self.__logger.info(studentBuff) | |||||
| self.__logger.info("**********************") | |||||
| self.__logger.info(f"buff={studentBuff}") | |||||
| self.__logger.info("************************\n") | |||||
| def PrintTricker(self) -> None: | def PrintTricker(self) -> None: | ||||
| for tricker in self.__logic.GetTrickers(): | for tricker in self.__logic.GetTrickers(): | ||||
| self.__logger.info("******Tricker Info******") | |||||
| self.__logger.info("\n******Tricker Info******") | |||||
| self.__logger.info( | self.__logger.info( | ||||
| f"playerID={tricker.playerID}, GUID={tricker.guid}, x={tricker.x}, y={tricker.y}") | f"playerID={tricker.playerID}, GUID={tricker.guid}, x={tricker.x}, y={tricker.y}") | ||||
| self.__logger.info( | self.__logger.info( | ||||
| f"speed={tricker.speed}, view range={tricker.viewRange}, skill time={tricker.timeUntilSkillAvailable}, place={tricker.place.name}") | |||||
| self.__logger.info("buff=") | |||||
| f"speed={tricker.speed}, view range={tricker.viewRange}, place={tricker.place.name}, radius={tricker.radius}") | |||||
| self.__logger.info( | |||||
| f"score={tricker.score}, facing direction={tricker.facingDirection}, skill time={tricker.timeUntilSkillAvailable}") | |||||
| trickerProp = "" | |||||
| for prop in tricker.prop: | |||||
| trickerProp += prop.name + ", " | |||||
| self.__logger.info( | |||||
| f"state={tricker.playerState.name}, bullet={tricker.bulletType.name}, prop={trickerProp}") | |||||
| self.__logger.info( | |||||
| f"type={tricker.trickerType.name}, trick desire={tricker.trickDesire}, class volume={tricker.classVolume}") | |||||
| trickerBuff = "" | trickerBuff = "" | ||||
| for buff in tricker.buff: | for buff in tricker.buff: | ||||
| trickerBuff += buff.name + ", " | trickerBuff += buff.name + ", " | ||||
| self.__logger.info(trickerBuff) | |||||
| self.__logger.info("************************") | |||||
| self.__logger.info(f"buff={trickerBuff}") | |||||
| self.__logger.info("************************\n") | |||||
| def PrintProp(self) -> None: | def PrintProp(self) -> None: | ||||
| for prop in self.__logic.GetProps(): | for prop in self.__logic.GetProps(): | ||||
| self.__logger.info("******Prop Info******") | self.__logger.info("******Prop Info******") | ||||
| self.__logger.info( | self.__logger.info( | ||||
| f"GUID={prop.guid}, x={prop.x}, y={prop.y}, place={prop.place.name}") | |||||
| f"GUID={prop.guid}, x={prop.x}, y={prop.y}, place={prop.place.name}, facing direction={prop.facingDirection}") | |||||
| self.__logger.info("*********************") | self.__logger.info("*********************") | ||||
| def PrintSelfInfo(self) -> None: | def PrintSelfInfo(self) -> None: | ||||
| mySelf = self.__logic.GetSelfInfo() | |||||
| self.__logger.info("******Self Info******") | |||||
| tricker = cast(THUAI6.Tricker, self.__logic.GetSelfInfo()) | |||||
| self.__logger.info("\n******Tricker Info******") | |||||
| self.__logger.info( | self.__logger.info( | ||||
| f"playerID={mySelf.playerID}, GUID={mySelf.guid}, x={mySelf.x}, y={mySelf.y}") | |||||
| f"playerID={tricker.playerID}, GUID={tricker.guid}, x={tricker.x}, y={tricker.y}") | |||||
| self.__logger.info( | self.__logger.info( | ||||
| f"speed={mySelf.speed}, view range={mySelf.viewRange}, skill time={mySelf.timeUntilSkillAvailable}, place={mySelf.place.name}") | |||||
| if isinstance(mySelf, THUAI6.Student): | |||||
| self.__logger.info( | |||||
| f"state={mySelf.playerState.name}, determination={mySelf.determination}") | |||||
| self.__logger.info("buff=") | |||||
| mySelfBuff = "" | |||||
| for buff in mySelf.buff: | |||||
| mySelfBuff += buff.name + ", " | |||||
| self.__logger.info(mySelfBuff) | |||||
| self.__logger.info("*********************") | |||||
| f"speed={tricker.speed}, view range={tricker.viewRange}, place={tricker.place.name}, radius={tricker.radius}") | |||||
| self.__logger.info( | |||||
| f"score={tricker.score}, facing direction={tricker.facingDirection}, skill time={tricker.timeUntilSkillAvailable}") | |||||
| trickerProp = "" | |||||
| for prop in tricker.prop: | |||||
| trickerProp += prop.name + ", " | |||||
| self.__logger.info( | |||||
| f"state={tricker.playerState.name}, bullet={tricker.bulletType.name}, prop={trickerProp}") | |||||
| self.__logger.info( | |||||
| f"type={tricker.trickerType.name}, trick desire={tricker.trickDesire}, class volume={tricker.classVolume}") | |||||
| trickerBuff = "" | |||||
| for buff in tricker.buff: | |||||
| trickerBuff += buff.name + ", " | |||||
| self.__logger.info(f"buff={trickerBuff}") | |||||
| self.__logger.info("************************\n") | |||||
| # 屠夫阵营的特殊函数 | # 屠夫阵营的特殊函数 | ||||
| @@ -772,7 +812,7 @@ class TrickerDebugAPI(ITrickerAPI, IGameTimer): | |||||
| # Timer用 | # Timer用 | ||||
| def __GetTime(self) -> float: | def __GetTime(self) -> float: | ||||
| return (datetime.datetime.now() - self.__startPoint).total_seconds() * 1000 | |||||
| return (datetime.datetime.now() - self.__startPoint) / datetime.timedelta(milliseconds=1) | |||||
| def StartTimer(self) -> None: | def StartTimer(self) -> None: | ||||
| self.__startPoint = datetime.datetime.now() | self.__startPoint = datetime.datetime.now() | ||||
| @@ -45,35 +45,47 @@ class PropType(Enum): | |||||
| AddLifeOrAp = 5 | AddLifeOrAp = 5 | ||||
| AddHpOrAp = 6 | AddHpOrAp = 6 | ||||
| ShieldOrSpear = 7 | ShieldOrSpear = 7 | ||||
| RecoveryFromDizziness = 8 | |||||
| class BulletType(Enum): | class BulletType(Enum): | ||||
| NullBulletType = 0 | NullBulletType = 0 | ||||
| FlyingKnife = 1 | FlyingKnife = 1 | ||||
| CommonAttackOfTricker = 2 | CommonAttackOfTricker = 2 | ||||
| FastBullet = 3 | |||||
| OrdinaryBullet = 4 | |||||
| BombBomb = 3 | |||||
| JumpyDumpty = 4 | |||||
| AtomBomb = 5 | AtomBomb = 5 | ||||
| class StudentType(Enum): | class StudentType(Enum): | ||||
| NullStudentType = 0 | NullStudentType = 0 | ||||
| Athlete = 1 | Athlete = 1 | ||||
| Teacher = 2 | |||||
| StraightAStudent = 3 | |||||
| class TrickerType(Enum): | class TrickerType(Enum): | ||||
| NullTrickerType = 0 | NullTrickerType = 0 | ||||
| Assassin = 1 | Assassin = 1 | ||||
| Klee = 2 | |||||
| ANoisyPerson = 3 | |||||
| class StudentBuffType(Enum): | class StudentBuffType(Enum): | ||||
| NullStudentBuffType = 0 | NullStudentBuffType = 0 | ||||
| StudentBuffType1 = 1 | |||||
| AddSpeed = 1 | |||||
| AddLife = 2 | |||||
| Shield = 3 | |||||
| Invisible = 4 | |||||
| class TrickerBuffType(Enum): | class TrickerBuffType(Enum): | ||||
| NullTrickerBuffType = 0 | NullTrickerBuffType = 0 | ||||
| TrickerBuffType1 = 1 | |||||
| AddSpeed = 1 | |||||
| Spear = 2 | |||||
| AddAp = 3 | |||||
| Clairaudience = 4 | |||||
| Invisible = 5 | |||||
| class PlayerState(Enum): | class PlayerState(Enum): | ||||
| @@ -198,7 +210,7 @@ class GameMap: | |||||
| class GameInfo: | class GameInfo: | ||||
| gameTime: int | gameTime: int | ||||
| subjectLeft: int | |||||
| subjectFinished: int | |||||
| studentGraduated: int | studentGraduated: int | ||||
| studentQuited: int | studentQuited: int | ||||
| studentScore: int | studentScore: int | ||||
| @@ -91,7 +91,8 @@ class Proto2THUAI6(NoInstance): | |||||
| MessageType.ADD_SPEED: THUAI6.PropType.AddSpeed, | MessageType.ADD_SPEED: THUAI6.PropType.AddSpeed, | ||||
| MessageType.ADD_HP_OR_AP: THUAI6.PropType.AddHpOrAp, | MessageType.ADD_HP_OR_AP: THUAI6.PropType.AddHpOrAp, | ||||
| MessageType.ADD_LIFE_OR_AP: THUAI6.PropType.AddLifeOrAp, | MessageType.ADD_LIFE_OR_AP: THUAI6.PropType.AddLifeOrAp, | ||||
| MessageType.SHIELD_OR_SPEAR: THUAI6.PropType.ShieldOrSpear, } | |||||
| MessageType.SHIELD_OR_SPEAR: THUAI6.PropType.ShieldOrSpear, | |||||
| MessageType.RECOVERY_FROM_DIZZINESS: THUAI6.PropType.RecoveryFromDizziness, } | |||||
| playerTypeDict: Final[dict] = { | playerTypeDict: Final[dict] = { | ||||
| MessageType.NULL_PLAYER_TYPE: THUAI6.PlayerType.NullPlayerType, | MessageType.NULL_PLAYER_TYPE: THUAI6.PlayerType.NullPlayerType, | ||||
| @@ -100,19 +101,30 @@ class Proto2THUAI6(NoInstance): | |||||
| studentTypeDict: Final[dict] = { | studentTypeDict: Final[dict] = { | ||||
| MessageType.NULL_STUDENT_TYPE: THUAI6.StudentType.NullStudentType, | MessageType.NULL_STUDENT_TYPE: THUAI6.StudentType.NullStudentType, | ||||
| MessageType.ATHLETE: THUAI6.StudentType.Athlete, } | |||||
| MessageType.ATHLETE: THUAI6.StudentType.Athlete, | |||||
| MessageType.STUDENTTYPE2: THUAI6.StudentType.Teacher, | |||||
| MessageType.STUDENTTYPE3: THUAI6.StudentType.StraightAStudent, } | |||||
| trickerTypeDict: Final[dict] = { | trickerTypeDict: Final[dict] = { | ||||
| MessageType.NULL_TRICKER_TYPE: THUAI6.TrickerType.NullTrickerType, | MessageType.NULL_TRICKER_TYPE: THUAI6.TrickerType.NullTrickerType, | ||||
| MessageType.ASSASSIN: THUAI6.TrickerType.Assassin, } | |||||
| MessageType.ASSASSIN: THUAI6.TrickerType.Assassin, | |||||
| MessageType.TRICKERTYPE2: THUAI6.TrickerType.Klee, | |||||
| MessageType.TRICKERTYPE3: THUAI6.TrickerType.ANoisyPerson, } | |||||
| studentBuffTypeDict: Final[dict] = { | studentBuffTypeDict: Final[dict] = { | ||||
| MessageType.NULL_SBUFF_TYPE: THUAI6.StudentBuffType.NullStudentBuffType, | MessageType.NULL_SBUFF_TYPE: THUAI6.StudentBuffType.NullStudentBuffType, | ||||
| MessageType.SBUFFTYPE1: THUAI6.StudentBuffType.StudentBuffType1, } | |||||
| MessageType.SBUFFTYPE1: THUAI6.StudentBuffType.AddSpeed, | |||||
| MessageType.SBUFFTYPE2: THUAI6.StudentBuffType.AddLife, | |||||
| MessageType.SBUFFTYPE3: THUAI6.StudentBuffType.Shield, | |||||
| MessageType.SBUFFTYPE4: THUAI6.StudentBuffType.Invisible, } | |||||
| trickerBuffTypeDict: Final[dict] = { | trickerBuffTypeDict: Final[dict] = { | ||||
| MessageType.NULL_TBUFF_TYPE: THUAI6.TrickerBuffType.NullTrickerBuffType, | MessageType.NULL_TBUFF_TYPE: THUAI6.TrickerBuffType.NullTrickerBuffType, | ||||
| MessageType.TBUFFTYPE1: THUAI6.TrickerBuffType.TrickerBuffType1, } | |||||
| MessageType.TBUFFTYPE1: THUAI6.TrickerBuffType.AddSpeed, | |||||
| MessageType.TBUFFTYPE2: THUAI6.TrickerBuffType.Spear, | |||||
| MessageType.TBUFFTYPE3: THUAI6.TrickerBuffType.AddAp, | |||||
| MessageType.TBUFFTYPE4: THUAI6.TrickerBuffType.Clairaudience, | |||||
| MessageType.INVISIBLE: THUAI6.TrickerBuffType.Invisible, } | |||||
| playerStateDict: Final[dict] = { | playerStateDict: Final[dict] = { | ||||
| MessageType.NULL_STATUS: THUAI6.PlayerState.NullState, | MessageType.NULL_STATUS: THUAI6.PlayerState.NullState, | ||||
| @@ -144,9 +156,9 @@ class Proto2THUAI6(NoInstance): | |||||
| bulletTypeDict: Final[dict] = { | bulletTypeDict: Final[dict] = { | ||||
| MessageType.NULL_BULLET_TYPE: THUAI6.BulletType.NullBulletType, | MessageType.NULL_BULLET_TYPE: THUAI6.BulletType.NullBulletType, | ||||
| MessageType.FLYING_KNIFE: THUAI6.BulletType.FlyingKnife, | MessageType.FLYING_KNIFE: THUAI6.BulletType.FlyingKnife, | ||||
| MessageType.FAST_BULLET: THUAI6.BulletType.FastBullet, | |||||
| MessageType.FAST_BULLET: THUAI6.BulletType.BombBomb, | |||||
| MessageType.COMMON_ATTACK_OF_TRICKER: THUAI6.BulletType.CommonAttackOfTricker, | MessageType.COMMON_ATTACK_OF_TRICKER: THUAI6.BulletType.CommonAttackOfTricker, | ||||
| MessageType.ORDINARY_BULLET: THUAI6.BulletType.OrdinaryBullet, | |||||
| MessageType.ORDINARY_BULLET: THUAI6.BulletType.JumpyDumpty, | |||||
| MessageType.ATOM_BOMB: THUAI6.BulletType.AtomBomb, } | MessageType.ATOM_BOMB: THUAI6.BulletType.AtomBomb, } | ||||
| # 用于将Proto的对象转为THUAI6的对象 | # 用于将Proto的对象转为THUAI6的对象 | ||||
| @@ -229,7 +241,7 @@ class Proto2THUAI6(NoInstance): | |||||
| def Protobuf2THUAI6GameInfo(allMsg: Message2Clients.MessageOfAll): | def Protobuf2THUAI6GameInfo(allMsg: Message2Clients.MessageOfAll): | ||||
| gameInfo = THUAI6.GameInfo() | gameInfo = THUAI6.GameInfo() | ||||
| gameInfo.gameTime = allMsg.game_time | gameInfo.gameTime = allMsg.game_time | ||||
| gameInfo.subjectLeft = allMsg.subject_left | |||||
| gameInfo.subjectFinished = allMsg.subject_finished | |||||
| gameInfo.studentGraduated = allMsg.student_graduated | gameInfo.studentGraduated = allMsg.student_graduated | ||||
| gameInfo.studentQuited = allMsg.student_quited | gameInfo.studentQuited = allMsg.student_quited | ||||
| gameInfo.studentScore = allMsg.student_score | gameInfo.studentScore = allMsg.student_score | ||||
| @@ -290,11 +302,15 @@ class THUAI62Proto(NoInstance): | |||||
| studentTypeDict: Final[dict] = { | studentTypeDict: Final[dict] = { | ||||
| THUAI6.StudentType.NullStudentType: MessageType.NULL_STUDENT_TYPE, | THUAI6.StudentType.NullStudentType: MessageType.NULL_STUDENT_TYPE, | ||||
| THUAI6.StudentType.Athlete: MessageType.ATHLETE, } | |||||
| THUAI6.StudentType.Athlete: MessageType.ATHLETE, | |||||
| THUAI6.StudentType.Teacher: MessageType.STUDENTTYPE2, | |||||
| THUAI6.StudentType.StraightAStudent: MessageType.STUDENTTYPE3, } | |||||
| trickerTypeDict: Final[dict] = { | trickerTypeDict: Final[dict] = { | ||||
| THUAI6.TrickerType.NullTrickerType: MessageType.NULL_TRICKER_TYPE, | THUAI6.TrickerType.NullTrickerType: MessageType.NULL_TRICKER_TYPE, | ||||
| THUAI6.TrickerType.Assassin: MessageType.ASSASSIN, } | |||||
| THUAI6.TrickerType.Assassin: MessageType.ASSASSIN, | |||||
| THUAI6.TrickerType.Klee: MessageType.TRICKERTYPE2, | |||||
| THUAI6.TrickerType.ANoisyPerson: MessageType.TRICKERTYPE3, } | |||||
| propTypeDict: Final[dict] = { | propTypeDict: Final[dict] = { | ||||
| THUAI6.PropType.NullPropType: MessageType.NULL_PROP_TYPE, | THUAI6.PropType.NullPropType: MessageType.NULL_PROP_TYPE, | ||||