-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.Add Occupation; 2.Add Character Manager
- Loading branch information
Showing
18 changed files
with
570 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public class BaiLongma:IOccupation | ||
{ | ||
public int MoveSpeed { get; } = GameData.NumOfStepPerSecond; | ||
public int MaxHp { get; } = GameData.BaiLongmaHP; | ||
public int ViewRange { get; } = GameData.Viewrange; | ||
public int Cost { get; } = GameData.BaiLongmacost; | ||
public int BaseAttackSize { get; } = GameData.BaiLongmaATKsize; | ||
public bool IsEquipValid(EquipmentType equiptype) => equiptype switch | ||
{ | ||
EquipmentType.SPEEDBOOTS => false, | ||
|
||
EquipmentType.SMALL_HEALTH_POTION => false, | ||
EquipmentType.MEDIUM_HEALTH_POTION => false, | ||
EquipmentType.LARGE_HEALTH_POTION => false, | ||
|
||
EquipmentType.SMALL_SHIELD => false, | ||
EquipmentType.MEDIUM_SHIELD => false, | ||
EquipmentType.LARGE_SHIELD => false, | ||
|
||
EquipmentType.BERSERK_POTION => false, | ||
|
||
EquipmentType.INVISIBILITY_POTION => false, | ||
|
||
_ => false | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public class HongHaier : IOccupation | ||
{ | ||
public int MoveSpeed { get; } = GameData.NumOfStepPerSecond; | ||
public int MaxHp { get; } = GameData.HongHaierHP; | ||
public int ViewRange { get; } = GameData.Viewrange; | ||
public int Cost { get; } = GameData.HongHaiercost; | ||
public int BaseAttackSize { get; } = GameData.HongHaierATKsize; | ||
public bool IsEquipValid(EquipmentType equiptype) => equiptype switch | ||
{ | ||
EquipmentType.SPEEDBOOTS => false, | ||
|
||
EquipmentType.SMALL_HEALTH_POTION => false, | ||
EquipmentType.MEDIUM_HEALTH_POTION => false, | ||
EquipmentType.LARGE_HEALTH_POTION => false, | ||
|
||
EquipmentType.SMALL_SHIELD => false, | ||
EquipmentType.MEDIUM_SHIELD => false, | ||
EquipmentType.LARGE_SHIELD => false, | ||
|
||
EquipmentType.BERSERK_POTION => false, | ||
|
||
EquipmentType.INVISIBILITY_POTION => false, | ||
|
||
_ => false | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public class JiuLing : IOccupation | ||
{ | ||
public int MoveSpeed { get; } = GameData.NumOfStepPerSecond; | ||
public int MaxHp { get; } = GameData.JiuLingHP; | ||
public int ViewRange { get; } = GameData.Viewrange; | ||
public int Cost { get; } = 0; | ||
public int BaseAttackSize { get; } = GameData.JiuLingATKsize; | ||
public bool IsEquipValid(EquipmentType equiptype) => equiptype switch | ||
{ | ||
EquipmentType.SPEEDBOOTS => false, | ||
|
||
EquipmentType.SMALL_HEALTH_POTION => false, | ||
EquipmentType.MEDIUM_HEALTH_POTION => false, | ||
EquipmentType.LARGE_HEALTH_POTION => false, | ||
|
||
EquipmentType.SMALL_SHIELD => false, | ||
EquipmentType.MEDIUM_SHIELD => false, | ||
EquipmentType.LARGE_SHIELD => false, | ||
|
||
EquipmentType.BERSERK_POTION => false, | ||
|
||
EquipmentType.INVISIBILITY_POTION => false, | ||
|
||
_ => false | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public class Monkid : IOccupation | ||
{ | ||
public int MoveSpeed { get; } = GameData.NumOfStepPerSecond; | ||
public int MaxHp { get; } = GameData.MonkidHP; | ||
public int ViewRange { get; } = GameData.Viewrange; | ||
public int Cost { get; } = GameData.Monkidcost; | ||
public int BaseAttackSize { get; } = GameData.MonkidATKsize; | ||
public bool IsEquipValid(EquipmentType equiptype) => equiptype switch | ||
{ | ||
EquipmentType.SPEEDBOOTS => false, | ||
|
||
EquipmentType.SMALL_HEALTH_POTION => false, | ||
EquipmentType.MEDIUM_HEALTH_POTION => false, | ||
EquipmentType.LARGE_HEALTH_POTION => false, | ||
|
||
EquipmentType.SMALL_SHIELD => false, | ||
EquipmentType.MEDIUM_SHIELD => false, | ||
EquipmentType.LARGE_SHIELD => false, | ||
|
||
EquipmentType.BERSERK_POTION => false, | ||
|
||
EquipmentType.INVISIBILITY_POTION => false, | ||
|
||
_ => false | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public class NiuMowang : IOccupation | ||
{ | ||
public int MoveSpeed { get; } = GameData.NumOfStepPerSecond; | ||
public int MaxHp { get; } = GameData.NiuMowangHP; | ||
public int ViewRange { get; } = GameData.Viewrange; | ||
public int Cost { get; } = GameData.NiuMowangcost; | ||
public int BaseAttackSize { get; } = GameData.NiuMowangATKsize; | ||
public bool IsEquipValid(EquipmentType equiptype) => equiptype switch | ||
{ | ||
EquipmentType.SPEEDBOOTS => false, | ||
|
||
EquipmentType.SMALL_HEALTH_POTION => false, | ||
EquipmentType.MEDIUM_HEALTH_POTION => false, | ||
EquipmentType.LARGE_HEALTH_POTION => false, | ||
|
||
EquipmentType.SMALL_SHIELD => false, | ||
EquipmentType.MEDIUM_SHIELD => false, | ||
EquipmentType.LARGE_SHIELD => false, | ||
|
||
EquipmentType.BERSERK_POTION => false, | ||
|
||
EquipmentType.INVISIBILITY_POTION => false, | ||
|
||
_ => false | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public static class OccupationFactory | ||
{ | ||
public static IOccupation FindIOccupation(CharacterType charactertype) => charactertype switch | ||
{ | ||
CharacterType.TangSeng => new TangSeng(), | ||
CharacterType.SunWukong => new SunWukong(), | ||
CharacterType.ZhuBajie => new ZhuBajie(), | ||
CharacterType.ShaWujing => new ShaWujing(), | ||
CharacterType.BaiLongma => new BaiLongma(), | ||
CharacterType.Monkid => new Monkid(), | ||
CharacterType.JiuLing => new JiuLing(), | ||
CharacterType.HongHaier => new HongHaier(), | ||
CharacterType.NiuMowang => new NiuMowang(), | ||
CharacterType.TieShan => new TieShan(), | ||
CharacterType.ZhiZhujing => new ZhiZhujing(), | ||
CharacterType.Pawn => new Pawn(), | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public class Pawn : IOccupation | ||
{ | ||
public int MoveSpeed { get; } = GameData.NumOfStepPerSecond; | ||
public int MaxHp { get; } = GameData.PawnHP; | ||
public int ViewRange { get; } = GameData.Viewrange; | ||
public int Cost { get; } = GameData.Pawncost; | ||
public int BaseAttackSize { get; } = GameData.PawnATKsize; | ||
public bool IsEquipValid(EquipmentType equiptype) => equiptype switch | ||
{ | ||
EquipmentType.SPEEDBOOTS => false, | ||
|
||
EquipmentType.SMALL_HEALTH_POTION => false, | ||
EquipmentType.MEDIUM_HEALTH_POTION => false, | ||
EquipmentType.LARGE_HEALTH_POTION => false, | ||
|
||
EquipmentType.SMALL_SHIELD => false, | ||
EquipmentType.MEDIUM_SHIELD => false, | ||
EquipmentType.LARGE_SHIELD => false, | ||
|
||
EquipmentType.BERSERK_POTION => false, | ||
|
||
EquipmentType.INVISIBILITY_POTION => false, | ||
|
||
_ => false | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public class ShaWujing : IOccupation | ||
{ | ||
public int MoveSpeed { get; } = GameData.NumOfStepPerSecond; | ||
public int MaxHp { get; } = GameData.ShaWujingHP; | ||
public int ViewRange { get; } = GameData.Viewrange; | ||
public int Cost { get; } = GameData.ShaWujingcost; | ||
public int BaseAttackSize { get; } = GameData.ShaWujingATKsize; | ||
public bool IsEquipValid(EquipmentType equiptype) => equiptype switch | ||
{ | ||
EquipmentType.SPEEDBOOTS => false, | ||
|
||
EquipmentType.SMALL_HEALTH_POTION => false, | ||
EquipmentType.MEDIUM_HEALTH_POTION => false, | ||
EquipmentType.LARGE_HEALTH_POTION => false, | ||
|
||
EquipmentType.SMALL_SHIELD => false, | ||
EquipmentType.MEDIUM_SHIELD => false, | ||
EquipmentType.LARGE_SHIELD => false, | ||
|
||
EquipmentType.BERSERK_POTION => false, | ||
|
||
EquipmentType.INVISIBILITY_POTION => false, | ||
|
||
_ => false | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public class SunWukong : IOccupation | ||
{ | ||
public int MoveSpeed { get; } = GameData.NumOfStepPerSecond; | ||
public int MaxHp { get; } = GameData.SunWukongHP; | ||
public int ViewRange { get; } = GameData.Viewrange; | ||
public int Cost { get; } = GameData.SunWukongcost; | ||
public int BaseAttackSize { get; } = GameData.SunWukongATKsize; | ||
public bool IsEquipValid(EquipmentType equiptype) => equiptype switch | ||
{ | ||
EquipmentType.SPEEDBOOTS => false, | ||
|
||
EquipmentType.SMALL_HEALTH_POTION => false, | ||
EquipmentType.MEDIUM_HEALTH_POTION => false, | ||
EquipmentType.LARGE_HEALTH_POTION => false, | ||
|
||
EquipmentType.SMALL_SHIELD => false, | ||
EquipmentType.MEDIUM_SHIELD => false, | ||
EquipmentType.LARGE_SHIELD => false, | ||
|
||
EquipmentType.BERSERK_POTION => false, | ||
|
||
EquipmentType.INVISIBILITY_POTION => false, | ||
|
||
_ => false | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Preparation.Interface; | ||
using Preparation.Utility; | ||
|
||
namespace GameClass.GameObj.Occupations | ||
{ | ||
public class TangSeng : IOccupation | ||
{ | ||
public int MoveSpeed { get; } = GameData.NumOfStepPerSecond; | ||
public int MaxHp { get; } = GameData.TangSengHP; | ||
public int ViewRange { get; } = GameData.Viewrange; | ||
public int Cost { get; } = 0; | ||
public int BaseAttackSize { get; } = GameData.TangSengATKsize; | ||
public bool IsEquipValid(EquipmentType equiptype) => equiptype switch | ||
{ | ||
EquipmentType.SPEEDBOOTS => false, | ||
|
||
EquipmentType.SMALL_HEALTH_POTION => false, | ||
EquipmentType.MEDIUM_HEALTH_POTION => false, | ||
EquipmentType.LARGE_HEALTH_POTION => false, | ||
|
||
EquipmentType.SMALL_SHIELD => false, | ||
EquipmentType.MEDIUM_SHIELD => false, | ||
EquipmentType.LARGE_SHIELD => false, | ||
|
||
EquipmentType.BERSERK_POTION => false, | ||
|
||
EquipmentType.INVISIBILITY_POTION => false, | ||
|
||
_ => false | ||
}; | ||
} | ||
} |
Oops, something went wrong.