Browse Source

build: 🚧 build the Score System of the Prop

tags/0.1.0
shangfengh 2 years ago
parent
commit
f3d919f61c
4 changed files with 15 additions and 8 deletions
  1. +7
    -7
      dependency/proto/MessageType.proto
  2. +1
    -1
      logic/GameClass/GameObj/Character/Character.Student.cs
  3. +3
    -0
      logic/GameClass/GameObj/Character/Character.cs
  4. +4
    -0
      logic/Preparation/Utility/GameData.cs

+ 7
- 7
dependency/proto/MessageType.proto View File

@@ -42,13 +42,13 @@ enum ShapeType // 形状类型
enum PropType // 地图中的可拾取道具类型 enum PropType // 地图中的可拾取道具类型
{ {
NULL_PROP_TYPE = 0; NULL_PROP_TYPE = 0;
ADD_SPEED = 1;
ADD_LIFE_OR_AP = 2;
ADD_HP_OR_AP = 3;
SHIELD_OR_SPEAR = 4;
KEY3 = 5;
KEY5 = 6;
KEY6 = 7;
ADD_SPEED = 1;
ADD_LIFE_OR_AP = 2;
ADD_HP_OR_AP = 3;
SHIELD_OR_SPEAR = 4;
KEY3 = 5;
KEY5 = 6;
KEY6 = 7;
} }


enum StudentBuffType // 人类可用的增益效果类型 enum StudentBuffType // 人类可用的增益效果类型


+ 1
- 1
logic/GameClass/GameObj/Character/Character.Student.cs View File

@@ -27,7 +27,7 @@ namespace GameClass.GameObj
if (bullet.HasSpear) if (bullet.HasSpear)
{ {
int subHp = TrySubHp(bullet.AP); int subHp = TrySubHp(bullet.AP);
bullet.Parent.AddScore(GameData.TrickerScoreAttackStudent(subHp));
bullet.Parent.AddScore(GameData.TrickerScoreAttackStudent(subHp) + GameData.ScorePropUseSpear);
bullet.Parent.HP = (int)(bullet.Parent.HP + (bullet.Parent.Vampire * subHp)); bullet.Parent.HP = (int)(bullet.Parent.HP + (bullet.Parent.Vampire * subHp));
} }
else else


+ 3
- 0
logic/GameClass/GameObj/Character/Character.cs View File

@@ -523,17 +523,20 @@ namespace GameClass.GameObj
{ {
if (buffManager.TryActivatingLIFE()) if (buffManager.TryActivatingLIFE())
{ {
AddScore(GameData.ScorePropRemainHp);
hp = GameData.RemainHpWhenAddLife; hp = GameData.RemainHpWhenAddLife;
} }
} }


public bool TryAddAp() public bool TryAddAp()
{ {
AddScore(GameData.ScorePropAddAp);
return buffManager.TryAddAp(); return buffManager.TryAddAp();
} }


public bool TryUseShield() public bool TryUseShield()
{ {
AddScore(GameData.ScorePropUseShield);
return buffManager.TryUseShield(); return buffManager.TryUseShield();
} }
#endregion #endregion


+ 4
- 0
logic/Preparation/Utility/GameData.cs View File

@@ -124,6 +124,10 @@ namespace Preparation.Utility
return degree; return degree;
} }
public const int StudentScoreEscape = 1000; public const int StudentScoreEscape = 1000;
public const int ScorePropRemainHp = 20;
public const int ScorePropUseShield = 20;
public const int ScorePropUseSpear = 20;
public const int ScorePropAddAp = 10;


public static int ScoreUseProp(PropType prop, bool IsGhost) public static int ScoreUseProp(PropType prop, bool IsGhost)
{ {


Loading…
Cancel
Save