From 53c16d4f815b61106f694c55ac5b47de63ee64cd Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Sun, 9 Apr 2023 14:44:19 +0800 Subject: [PATCH] fix: :bug: fix the addition of Buff --- CAPI/cpp/API/include/API.h | 3 --- logic/.gitignore | 2 ++ logic/GameClass/GameObj/Character/Character.cs | 6 ++++++ logic/Gaming/CharacterManager .cs | 2 +- logic/规则Logic.md | 3 +++ 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CAPI/cpp/API/include/API.h b/CAPI/cpp/API/include/API.h index d51092c..c4516df 100644 --- a/CAPI/cpp/API/include/API.h +++ b/CAPI/cpp/API/include/API.h @@ -127,12 +127,9 @@ public: // 获取视野内可见的道具信息 [[nodiscard]] virtual std::vector> GetProps() const = 0; -<<<<<<< HEAD -======= // 获取视野内可见的子弹信息 [[nodiscard]] virtual std::vector> GetBullets() const = 0; ->>>>>>> 413ef5584c0bd44e1399284a775da492adf98475 [[nodiscard]] virtual std::vector> GetFullMap() const = 0; [[nodiscard]] virtual THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY) const = 0; diff --git a/logic/.gitignore b/logic/.gitignore index a9bdd24..2694985 100644 --- a/logic/.gitignore +++ b/logic/.gitignore @@ -400,3 +400,5 @@ FodyWeavers.xsd #THUAI playback file *.thuaipb +#private cmd +cmd/gameServerOfSanford.cmd \ No newline at end of file diff --git a/logic/GameClass/GameObj/Character/Character.cs b/logic/GameClass/GameObj/Character/Character.cs index a91c30d..78e81a4 100644 --- a/logic/GameClass/GameObj/Character/Character.cs +++ b/logic/GameClass/GameObj/Character/Character.cs @@ -521,6 +521,12 @@ namespace GameClass.GameObj return this.HasShield; case BuffType.AddLife: return this.HasLIFE; + case BuffType.AddAp: + return this.HasAp; + case BuffType.Clairaudience: + return this.HasClairaudience; + case BuffType.Invisible: + return this.HasInvisible; default: return false; } diff --git a/logic/Gaming/CharacterManager .cs b/logic/Gaming/CharacterManager .cs index ce867fc..8ec3d2c 100644 --- a/logic/Gaming/CharacterManager .cs +++ b/logic/Gaming/CharacterManager .cs @@ -292,6 +292,7 @@ namespace Gaming { ((WriteAnswers)student.FindIActiveSkill(ActiveSkillType.WriteAnswers)).DegreeOfMeditation = 0; } + student.SetDegreeOfTreatment0(); #if DEBUG Debugger.Output(bullet, " 's AP is " + bullet.AP.ToString()); #endif @@ -328,7 +329,6 @@ namespace Gaming bullet.Parent.AddScore(GameData.TrickerScoreAttackStudent(subHp)); bullet.Parent.HP = (int)(bullet.Parent.HP + (bullet.Parent.Vampire * subHp)); } - student.SetDegreeOfTreatment0(); if (student.HP <= 0) student.TryActivatingLIFE(); // 如果有复活甲 diff --git a/logic/规则Logic.md b/logic/规则Logic.md index edf39c2..7f9bbe0 100644 --- a/logic/规则Logic.md +++ b/logic/规则Logic.md @@ -113,6 +113,7 @@ `std::vector> GetFullMap() const`:返回整张地图的地形信息。 - 下面的 CellX 和 CellY 指的是地图格数,而非绝对坐标。 + `THUAI6::PlaceType GetPlaceType(int32_t cellX, int32_t cellY)` :返回某一位置场地种类信息。场地种类详见 structure.h 。 `bool IsDoorOpen(int32_t cellX, int32_t cellY) const`:查询特定位置门是否开启 `int32_t GetChestProgress(int32_t cellX, int32_t cellY) const`:查询特定位置箱子开启进度 @@ -277,7 +278,9 @@ ## 辅助函数 `static inline int CellToGrid(int cell) noexcept`:将地图格数 cell 转换为绝对坐标grid。 + `static inline int GridToCell(int grid) noexcept`:将绝对坐标 grid 转换为地图格数cell。 + 下面为用于DEBUG的输出函数,选手仅在开启Debug模式的情况下可以使用 ~~~c void Print(std::string str) const;