From f816bbf6efbd880d38ad0eede6057dc3d5a8f25a Mon Sep 17 00:00:00 2001 From: DragonAura Date: Fri, 19 May 2023 19:13:03 +0800 Subject: [PATCH 1/2] feat(CAPI): :sparkles: update constants --- CAPI/cpp/API/include/constants.h | 89 +++++++++++++++++++++----------- CAPI/python/PyAPI/constants.py | 79 ++++++++++++++++++---------- 2 files changed, 109 insertions(+), 59 deletions(-) diff --git a/CAPI/cpp/API/include/constants.h b/CAPI/cpp/API/include/constants.h index 51d2034..6f0375f 100644 --- a/CAPI/cpp/API/include/constants.h +++ b/CAPI/cpp/API/include/constants.h @@ -32,10 +32,10 @@ namespace Constants // 人物属性相关 SCCI int basicEncourageSpeed = 100; SCCI int basicFixSpeed = 123; - SCCI int basicSpeedOfOpeningOrLocking = 4000; + SCCI int basicSpeedOfOpeningOrLocking = 5000; SCCI int basicStudentSpeedOfClimbingThroughWindows = 1222; SCCI int basicTrickerSpeedOfClimbingThroughWindows = 2540; - SCCI int basicSpeedOfOpenChest = 1000; + SCCI int basicSpeedOfOpenChest = 1250; SCCI int basicHp = 3000000; SCCI int basicMaxGamingAddiction = 60000; @@ -138,19 +138,19 @@ namespace Constants SCCI int moveSpeed = basicStudentSpeed * 9 / 10; SCCI int maxHp = basicHp * 10; SCCI int maxAddiction = basicMaxGamingAddiction * 10; - SCCI int fixSpeed = basicFixSpeed * 0; + SCCI int fixSpeed = (int)(basicFixSpeed * 0.4); SCCI int encourageSpeed = basicEncourageSpeed * 8 / 10; SCCI double concealment = 0.5; - SCCI int alertnessRadius = basicStudentAlertnessRadius / 2; - SCCI int viewRange = basicStudentViewRange * 9 / 10; + SCCI int alertnessRadius = basicStudentAlertnessRadius * 3 / 4; + SCCI int viewRange = basicStudentViewRange * 8 / 10; SCCI int speedOfOpeningOrLocking = basicSpeedOfOpeningOrLocking; - SCCI int speedOfClimbingThroughWindows = basicStudentSpeedOfClimbingThroughWindows / 2; + SCCI int speedOfClimbingThroughWindows = (int)(basicStudentSpeedOfClimbingThroughWindows * 0.82); SCCI int speedOfOpenChest = basicSpeedOfOpenChest; }; struct StraightAStudent { - SCCI int moveSpeed = basicStudentSpeed * 96 / 100; + SCCI int moveSpeed = basicStudentSpeed * 24 / 25; SCCI int maxHp = basicHp * 11 / 10; SCCI int maxAddiction = basicMaxGamingAddiction * 13 / 10; SCCI int fixSpeed = basicFixSpeed * 11 / 10; @@ -165,41 +165,41 @@ namespace Constants struct Robot { - SCCI int moveSpeed = basicStudentSpeed; - SCCI int maxHp = basicHp * 0.4; + SCCI int moveSpeed = basicStudentSpeed * 9 / 10; + SCCI int maxHp = basicHp * 0.3; SCCI int maxAddiction = basicMaxGamingAddiction * 0; - SCCI int fixSpeed = basicFixSpeed; + SCCI int fixSpeed = (int)(basicFixSpeed * 0.7); SCCI int encourageSpeed = 0; - SCCI double concealment = 1; - SCCI int alertnessRadius = basicStudentAlertnessRadius * 1; - SCCI int viewRange = basicStudentViewRange; - SCCI int speedOfOpeningOrLocking = basicSpeedOfOpeningOrLocking; + SCCI double concealment = 0.8; + SCCI int alertnessRadius = 0; + SCCI int viewRange = 0; + SCCI int speedOfOpeningOrLocking = 0; SCCI int speedOfClimbingThroughWindows = 1; - SCCI int speedOfOpenChest = basicSpeedOfOpenChest; + SCCI int speedOfOpenChest = basicSpeedOfOpenChest * 4 / 5; }; struct TechOtaku { - SCCI int moveSpeed = basicStudentSpeed * 3 / 4; + SCCI int moveSpeed = (int)(basicStudentSpeed * 0.96); SCCI int maxHp = basicHp * 9 / 10; - SCCI int maxAddiction = basicMaxGamingAddiction * 11 / 10; - SCCI int fixSpeed = basicFixSpeed * 11 / 10; - SCCI int encourageSpeed = basicEncourageSpeed * 9 / 10; - SCCI double concealment = 1; + SCCI int maxAddiction = basicMaxGamingAddiction; + SCCI int fixSpeed = (int)(basicFixSpeed * 0.9); + SCCI int encourageSpeed = basicEncourageSpeed; + SCCI double concealment = 1.1; SCCI int alertnessRadius = basicStudentAlertnessRadius; SCCI int viewRange = basicStudentViewRange * 9 / 10; SCCI int speedOfOpeningOrLocking = basicSpeedOfOpeningOrLocking; - SCCI int speedOfClimbingThroughWindows = basicStudentSpeedOfClimbingThroughWindows * 3 / 4; - SCCI int speedOfOpenChest = basicSpeedOfOpenChest; + SCCI int speedOfClimbingThroughWindows = (int)(basicStudentSpeedOfClimbingThroughWindows * 0.9); + SCCI int speedOfOpenChest = basicSpeedOfOpenChest * 22 / 25; }; struct Sunshine { SCCI int moveSpeed = basicStudentSpeed; - SCCI int maxHp = basicHp * 32 / 30; + SCCI int maxHp = basicHp * 16 / 15; SCCI int maxAddiction = basicMaxGamingAddiction * 11 / 10; SCCI int fixSpeed = basicFixSpeed; - SCCI int encourageSpeed = basicEncourageSpeed * 12 / 10; + SCCI int encourageSpeed = basicEncourageSpeed * 6 / 5; SCCI double concealment = 1; SCCI int alertnessRadius = basicStudentAlertnessRadius; SCCI int viewRange = basicStudentViewRange; @@ -244,7 +244,19 @@ namespace Constants struct Punish { - SCCI int skillCD = commonSkillCD * 1; + SCCI int skillCD = commonSkillCD * 3 / 2; + SCCI int durationTime = commonSkillTime * 0; + }; + + struct SparksNSplash + { + SCCI int skillCD = commonSkillCD * 3 / 2; + SCCI int durationTime = commonSkillTime * 1; + }; + + struct HaveTea + { + SCCI int skillCD = commonSkillCD * 3; SCCI int durationTime = commonSkillTime * 0; }; @@ -292,7 +304,7 @@ namespace Constants struct UseRobot { - SCCI int skillCD = commonSkillCD / 300; + SCCI int skillCD = commonSkillCD / 15; SCCI int durationTime = commonSkillTime * 0; }; @@ -304,8 +316,8 @@ namespace Constants struct SummonGolem { - SCCI int skillCD = commonSkillCD * 1; - SCCI int durationTime = commonSkillTime * 0; + SCCI int skillCD = commonSkillCD * 4 / 3; + SCCI int durationTime = commonSkillTime * 6; }; struct CommonAttackOfTricker @@ -331,10 +343,10 @@ namespace Constants SCCI int Speed = basicBulletMoveSpeed * 25 / 10; SCCI bool IsRemoteAttack = true; - SCCI int CastTime = basicCastTime * 4 / 5; + SCCI int CastTime = basicCastTime * 6 / 5; SCCI int Backswing = 0; SCCI int RecoveryFromHit = 0; - SCCI int cd = basicBackswing / 2; + SCCI int cd = basicBackswing * 3 / 4; SCCI int maxBulletNum = 1; }; @@ -347,7 +359,7 @@ namespace Constants SCCI bool IsRemoteAttack = false; SCCI int CastTime = (int)BulletAttackRange * 1000 / Speed; - SCCI int Backswing = basicRecoveryFromHit; + SCCI int Backswing = basicBackswing * 3 / 2; SCCI int RecoveryFromHit = basicRecoveryFromHit; SCCI int cd = basicCD; SCCI int maxBulletNum = 1; @@ -361,5 +373,20 @@ namespace Constants SCCI int Speed = basicBulletMoveSpeed * 43 / 37; SCCI bool IsRemoteAttack = false; }; + + struct Strike + { + SCCI double BulletBombRange = 0; + SSC double BulletAttackRange = basicAttackShortRange; + SCCI int ap = basicApOfTricker * 16 / 15; + SCCI int Speed = basicBulletMoveSpeed * 125 / 148; + SCCI bool IsRemoteAttack = false; + + SCCI int CastTime = basicCastTime * 16 / 25; + SCCI int Backswing = basicBackswing; + SCCI int RecoveryFromHit = basicRecoveryFromHit; + SCCI int cd = basicBackswing * 3 / 4; + SCCI int maxBulletNum = 1; + }; } // namespace Constants #endif diff --git a/CAPI/python/PyAPI/constants.py b/CAPI/python/PyAPI/constants.py index cdd92cd..ce0ea56 100644 --- a/CAPI/python/PyAPI/constants.py +++ b/CAPI/python/PyAPI/constants.py @@ -27,10 +27,10 @@ class Constants(NoInstance): # 人物属性相关 basicEncourageSpeed = 100 basicLearnSpeed = 123 - basicSpeedOfOpeningOrLocking = 4000 + basicSpeedOfOpeningOrLocking = 5000 basicStudentSpeedOfClimbingThroughWindows = 1222 basicTrickerSpeedOfClimbingThroughWindows = 2540 - basicSpeedOfOpenChest = 1000 + basicSpeedOfOpenChest = 1250 basicHp = 3000000 basicMaxGamingAddiction = 60000 @@ -159,14 +159,14 @@ class Teacher: moveSpeed = (int)(0.9 * Constants.basicStudentSpeed) maxHp = (int)(10.0 * Constants.basicHp) maxAddiction = (int)(10.0 * Constants.basicMaxGamingAddiction) - LearnSpeed = (int)(0.0 * Constants.basicLearnSpeed) + LearnSpeed = (int)(0.4 * Constants.basicLearnSpeed) EncourageSpeed = (int)(0.8 * Constants.basicEncourageSpeed) concealment = 0.5 * Constants.basicConcealment - alertnessRadius = (int)(0.5 * Constants.basicStudentAlertnessRadius) - viewRange = (int)(0.9 * Constants.basicStudentViewRange) + alertnessRadius = (int)(0.75 * Constants.basicStudentAlertnessRadius) + viewRange = (int)(0.8 * Constants.basicStudentViewRange) speedOfOpeningOrLocking = (int)(1.0 * Constants.basicSpeedOfOpeningOrLocking) speedOfClimbingThroughWindows = (int)( - 0.5 * Constants.basicStudentSpeedOfClimbingThroughWindows + 0.82 * Constants.basicStudentSpeedOfClimbingThroughWindows ) speedOfOpenChest = (int)(1.0 * Constants.basicSpeedOfOpenChest) @@ -188,35 +188,35 @@ class StraightAStudent: class Robot: - moveSpeed = (int)(1.0 * Constants.basicStudentSpeed) - maxHp = (int)(0.4 * Constants.basicHp) + moveSpeed = (int)(0.9 * Constants.basicStudentSpeed) + maxHp = (int)(0.3 * Constants.basicHp) maxAddiction = (int)(0.0 * Constants.basicMaxGamingAddiction) - LearnSpeed = (int)(1.0 * Constants.basicLearnSpeed) + LearnSpeed = (int)(0.7 * Constants.basicLearnSpeed) EncourageSpeed = 0 - concealment = 1.0 * Constants.basicConcealment - alertnessRadius = (int)(1.0 * Constants.basicStudentAlertnessRadius) - viewRange = (int)(1.0 * Constants.basicStudentViewRange) - speedOfOpeningOrLocking = (int)(1.0 * Constants.basicSpeedOfOpeningOrLocking) + concealment = 0.8 * Constants.basicConcealment + alertnessRadius = (int)(0.0 * Constants.basicStudentAlertnessRadius) + viewRange = (int)(0.0 * Constants.basicStudentViewRange) + speedOfOpeningOrLocking = (int)(0.0 * Constants.basicSpeedOfOpeningOrLocking) speedOfClimbingThroughWindows = (int)( - 0.0016 * Constants.basicStudentSpeedOfClimbingThroughWindows + 0.0008 * Constants.basicStudentSpeedOfClimbingThroughWindows ) - speedOfOpenChest = (int)(1.0 * Constants.basicSpeedOfOpenChest) + speedOfOpenChest = (int)(0.8 * Constants.basicSpeedOfOpenChest) class TechOtaku: - moveSpeed = (int)(0.75 * Constants.basicStudentSpeed) + moveSpeed = (int)(0.96 * Constants.basicStudentSpeed) maxHp = (int)(0.9 * Constants.basicHp) - maxAddiction = (int)(1.1 * Constants.basicMaxGamingAddiction) - LearnSpeed = (int)(1.1 * Constants.basicLearnSpeed) - EncourageSpeed = (int)(0.9 * Constants.basicEncourageSpeed) + maxAddiction = (int)(1.0 * Constants.basicMaxGamingAddiction) + LearnSpeed = (int)(0.9 * Constants.basicLearnSpeed) + EncourageSpeed = (int)(1.0 * Constants.basicEncourageSpeed) concealment = 1.0 * Constants.basicConcealment alertnessRadius = (int)(1.0 * Constants.basicStudentAlertnessRadius) viewRange = (int)(0.9 * Constants.basicStudentViewRange) speedOfOpeningOrLocking = (int)(1.0 * Constants.basicSpeedOfOpeningOrLocking) speedOfClimbingThroughWindows = (int)( - 0.75 * Constants.basicStudentSpeedOfClimbingThroughWindows + 0.9 * Constants.basicStudentSpeedOfClimbingThroughWindows ) - speedOfOpenChest = (int)(1.0 * Constants.basicSpeedOfOpenChest) + speedOfOpenChest = (int)(0.88 * Constants.basicSpeedOfOpenChest) class Sunshine: @@ -246,7 +246,17 @@ class BecomeInvisible: class Punish: - skillCD = (int)(1.0 * Constants.commonSkillCD) + skillCD = (int)(1.5 * Constants.commonSkillCD) + durationTime = (int)(0.0 * Constants.commonSkillTime) + + +class SparksNSplash: + skillCD = (int)(1.5 * Constants.commonSkillCD) + durationTime = (int)(1.0 * Constants.commonSkillTime) + + +class HaveTea: + skillCD = (int)(3 * Constants.commonSkillCD) durationTime = (int)(0.0 * Constants.commonSkillTime) @@ -286,7 +296,7 @@ class UseKnife: class UseRobot: - skillCD = (int)(0.0017 * Constants.commonSkillCD) + skillCD = (int)(0.0667 * Constants.commonSkillCD) durationTime = (int)(0.0 * Constants.commonSkillTime) @@ -296,8 +306,8 @@ class WriteAnswers: class SummonGolem: - skillCD = (int)(1.0 * Constants.commonSkillCD) - durationTime = (int)(0.0 * Constants.commonSkillTime) + skillCD = (int)(1.25 * Constants.commonSkillCD) + durationTime = (int)(6.0 * Constants.commonSkillTime) class CommonAttackOfTricker: @@ -319,10 +329,10 @@ class FlyingKnife: ap = Constants.basicApOfTricker * 4 / 5 Speed = Constants.basicBulletMoveSpeed * 25 / 10 IsRemoteAttack = True - CastTime = Constants.basicCastTime * 4 / 5 + CastTime = Constants.basicCastTime * 6 / 5 Backswing = 0 RecoveryFromHit = 0 - cd = Constants.basicBackswing / 2 + cd = Constants.basicBackswing * 3 / 4 maxBulletNum = 1 @@ -333,7 +343,7 @@ class BombBomb: Speed = Constants.basicBulletMoveSpeed * 30 / 37 IsRemoteAttack = False CastTime = BulletAttackRange * 1000 / Speed - Backswing = Constants.basicRecoveryFromHit + Backswing = Constants.basicBackswing * 3 / 2 RecoveryFromHit = Constants.basicRecoveryFromHit cd = Constants.basicCD maxBulletNum = 1 @@ -345,3 +355,16 @@ class JumpyDumpty: ap = (int)(Constants.basicApOfTricker * 0.6) Speed = Constants.basicBulletMoveSpeed * 43 / 37 IsRemoteAttack = False + + +class Strike: + BulletBombRange = 0 + BulletAttackRange = Constants.basicAttackShortRange + ap = Constants.basicApOfTricker * 16 / 5 + Speed = Constants.basicBulletMoveSpeed * 125 / 148 + IsRemoteAttack = False + CastTime = Constants.basicCastTime * 16 / 25 + Backswing = Constants.basicBackswing + RecoveryFromHit = Constants.basicRecoveryFromHit + cd = Constants.basicBackswing * 3 / 4 + maxBulletNum = 1 From 8ced8a0f7520609855c6a0d65e78aeb6f013bd07 Mon Sep 17 00:00:00 2001 From: DragonAura Date: Fri, 19 May 2023 20:51:38 +0800 Subject: [PATCH 2/2] refactor(CAPI): :bug: change / to // --- CAPI/python/PyAPI/constants.py | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/CAPI/python/PyAPI/constants.py b/CAPI/python/PyAPI/constants.py index ce0ea56..773b0ab 100644 --- a/CAPI/python/PyAPI/constants.py +++ b/CAPI/python/PyAPI/constants.py @@ -65,8 +65,8 @@ class Constants(NoInstance): # 道具相关 - apPropAdd = basicApOfTricker * 12 / 10 - apSpearAdd = basicApOfTricker * 6 / 10 + apPropAdd = basicApOfTricker * 12 // 10 + apSpearAdd = basicApOfTricker * 6 // 10 # 技能相关 maxNumOfSkill = 3 @@ -85,7 +85,7 @@ class Constants(NoInstance): addedTimeOfSpeedWhenInspire = 1.6 timeOfAddingSpeedWhenInspire = 6000 - addHpWhenEncourage = basicHp / 4 + addHpWhenEncourage = basicHp // 4 checkIntervalWhenShowTime = 200 addAddictionPer100msWhenShowTime = 300 @@ -241,7 +241,7 @@ class CanBeginToCharge: class BecomeInvisible: - skillCD = (int)(4 * Constants.commonSkillCD / 3) + skillCD = (int)(4 * Constants.commonSkillCD // 3) durationTime = (int)(Constants.commonSkillTime) @@ -281,7 +281,7 @@ class Howl: class ShowTime: - skillCD = (int)(8 * Constants.commonSkillCD / 3) + skillCD = (int)(8 * Constants.commonSkillCD // 3) durationTime = (int)(1.0 * Constants.commonSkillTime) @@ -316,7 +316,7 @@ class CommonAttackOfTricker: ap = Constants.basicApOfTricker Speed = Constants.basicBulletMoveSpeed IsRemoteAttack = False - CastTime = BulletAttackRange * 1000 / Speed + CastTime = BulletAttackRange * 1000 // Speed Backswing = Constants.basicBackswing RecoveryFromHit = Constants.basicRecoveryFromHit cd = Constants.basicBackswing @@ -326,45 +326,45 @@ class CommonAttackOfTricker: class FlyingKnife: BulletBombRange = 0 BulletAttackRange = Constants.basicRemoteAttackRange * 13 - ap = Constants.basicApOfTricker * 4 / 5 - Speed = Constants.basicBulletMoveSpeed * 25 / 10 + ap = Constants.basicApOfTricker * 4 // 5 + Speed = Constants.basicBulletMoveSpeed * 25 // 10 IsRemoteAttack = True - CastTime = Constants.basicCastTime * 6 / 5 + CastTime = Constants.basicCastTime * 6 // 5 Backswing = 0 RecoveryFromHit = 0 - cd = Constants.basicBackswing * 3 / 4 + cd = Constants.basicBackswing * 3 // 4 maxBulletNum = 1 class BombBomb: BulletBombRange = Constants.basicBulletBombRange BulletAttackRange = Constants.basicAttackShortRange - ap = Constants.basicApOfTricker * 6 / 5 - Speed = Constants.basicBulletMoveSpeed * 30 / 37 + ap = Constants.basicApOfTricker * 6 // 5 + Speed = Constants.basicBulletMoveSpeed * 30 // 37 IsRemoteAttack = False - CastTime = BulletAttackRange * 1000 / Speed - Backswing = Constants.basicBackswing * 3 / 2 + CastTime = BulletAttackRange * 1000 // Speed + Backswing = Constants.basicBackswing * 3 // 2 RecoveryFromHit = Constants.basicRecoveryFromHit cd = Constants.basicCD maxBulletNum = 1 class JumpyDumpty: - BulletBombRange = Constants.basicBulletBombRange / 2 + BulletBombRange = Constants.basicBulletBombRange // 2 BulletAttackRange = Constants.basicRemoteAttackRange * 2 ap = (int)(Constants.basicApOfTricker * 0.6) - Speed = Constants.basicBulletMoveSpeed * 43 / 37 + Speed = Constants.basicBulletMoveSpeed * 43 // 37 IsRemoteAttack = False class Strike: BulletBombRange = 0 BulletAttackRange = Constants.basicAttackShortRange - ap = Constants.basicApOfTricker * 16 / 5 - Speed = Constants.basicBulletMoveSpeed * 125 / 148 + ap = Constants.basicApOfTricker * 16 // 5 + Speed = Constants.basicBulletMoveSpeed * 125 // 148 IsRemoteAttack = False - CastTime = Constants.basicCastTime * 16 / 25 + CastTime = Constants.basicCastTime * 16 // 25 Backswing = Constants.basicBackswing RecoveryFromHit = Constants.basicRecoveryFromHit - cd = Constants.basicBackswing * 3 / 4 + cd = Constants.basicBackswing * 3 // 4 maxBulletNum = 1