forked from Oshima-Studios/OshimaGameModule
GamiingQueue优化
This commit is contained in:
parent
88af0b3ad0
commit
4737780742
@ -39,12 +39,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEffectLost(Character character)
|
public override void OnEffectLost(Character character)
|
||||||
{
|
|
||||||
if (character.PrimaryAttribute == PrimaryAttribute.INT)
|
|
||||||
{
|
{
|
||||||
ResetEffect(character, false);
|
ResetEffect(character, false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void ResetEffect(Character character, bool isAdd)
|
private void ResetEffect(Character character, bool isAdd)
|
||||||
{
|
{
|
||||||
@ -107,12 +104,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
c.ExINT -= 交换的基础智力;
|
c.ExINT -= 交换的基础智力;
|
||||||
c.ExSTR += 交换的基础智力;
|
c.ExSTR += 交换的基础智力;
|
||||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||||
if (已经加过)
|
|
||||||
{
|
|
||||||
ResetEffect(character, false);
|
ResetEffect(character, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (c.PrimaryAttribute == PrimaryAttribute.STR)
|
if (c.PrimaryAttribute == PrimaryAttribute.STR)
|
||||||
@ -126,8 +120,6 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
c.ExINT += 交换的基础智力;
|
c.ExINT += 交换的基础智力;
|
||||||
交换的基础智力 = 0;
|
交换的基础智力 = 0;
|
||||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||||
if (!已经加过)
|
|
||||||
{
|
|
||||||
ResetEffect(character, true);
|
ResetEffect(character, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -135,4 +127,3 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -171,6 +171,7 @@ namespace Oshima.FunGame.OshimaServers
|
|||||||
{
|
{
|
||||||
SendAllGamingMessage(obj, data, str);
|
SendAllGamingMessage(obj, data, str);
|
||||||
});
|
});
|
||||||
|
actionQueue.InitActionQueue();
|
||||||
actionQueue.SetCharactersToAIControl(false, inGameCharacters);
|
actionQueue.SetCharactersToAIControl(false, inGameCharacters);
|
||||||
|
|
||||||
// 总游戏时长
|
// 总游戏时长
|
||||||
|
|||||||
@ -35,6 +35,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
MaxRespawnTimes = maxRespawnTimes,
|
MaxRespawnTimes = maxRespawnTimes,
|
||||||
MaxScoreToWin = maxScoreToWin
|
MaxScoreToWin = maxScoreToWin
|
||||||
};
|
};
|
||||||
|
actionQueue.InitActionQueue();
|
||||||
actionQueue.SetCharactersToAIControl(false, characters);
|
actionQueue.SetCharactersToAIControl(false, characters);
|
||||||
foreach (Character dead in characters)
|
foreach (Character dead in characters)
|
||||||
{
|
{
|
||||||
@ -251,6 +252,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
MaxRespawnTimes = maxRespawnTimes,
|
MaxRespawnTimes = maxRespawnTimes,
|
||||||
MaxScoreToWin = maxScoreToWin
|
MaxScoreToWin = maxScoreToWin
|
||||||
};
|
};
|
||||||
|
actionQueue.InitActionQueue();
|
||||||
actionQueue.SetCharactersToAIControl(false, characters);
|
actionQueue.SetCharactersToAIControl(false, characters);
|
||||||
foreach (Character dead in characters)
|
foreach (Character dead in characters)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -125,6 +125,10 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
Level = slevel
|
Level = slevel
|
||||||
};
|
};
|
||||||
c.Skills.Add(疾风步);
|
c.Skills.Add(疾风步);
|
||||||
|
foreach (Effect e in c.Effects)
|
||||||
|
{
|
||||||
|
e.OnEffectLost(c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建顺序表并排序
|
// 创建顺序表并排序
|
||||||
@ -201,9 +205,8 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
// 显示角色信息
|
// 显示角色信息
|
||||||
if (PrintOut) characters.ForEach(c => Console.WriteLine(c.GetInfo()));
|
if (PrintOut) characters.ForEach(c => Console.WriteLine(c.GetInfo()));
|
||||||
|
|
||||||
// 因赋予了装备,所以清除排序重新排
|
// 初始化队列,准备开始游戏
|
||||||
actionQueue.ClearQueue();
|
actionQueue.InitActionQueue();
|
||||||
actionQueue.InitCharacterQueue(characters);
|
|
||||||
actionQueue.SetCharactersToAIControl(false, characters);
|
actionQueue.SetCharactersToAIControl(false, characters);
|
||||||
if (PrintOut) Console.WriteLine();
|
if (PrintOut) Console.WriteLine();
|
||||||
|
|
||||||
@ -226,7 +229,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
user.Username = FunGameService.GenerateRandomChineseUserName();
|
user.Username = FunGameService.GenerateRandomChineseUserName();
|
||||||
user.Inventory.Credits = 20;
|
user.Inventory.Credits = 20;
|
||||||
Character thisCharacter = shuffledCharacters[cid];
|
Character thisCharacter = shuffledCharacters[cid];
|
||||||
thisCharacter.User = user;
|
//thisCharacter.User = user;
|
||||||
|
|
||||||
if (cid % 2 == 0)
|
if (cid % 2 == 0)
|
||||||
{
|
{
|
||||||
@ -238,9 +241,9 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加到团队字典,第一个用户为队长
|
// 添加到团队字典,第一个为队长
|
||||||
tg.AddTeam($"{group1.First().User.Username}的小队", group1);
|
tg.AddTeam($"{group1.First()}的小队", group1);
|
||||||
tg.AddTeam($"{group2.First().User.Username}的小队", group2);
|
tg.AddTeam($"{group2.First()}的小队", group2);
|
||||||
|
|
||||||
foreach (string team in tg.Teams.Keys)
|
foreach (string team in tg.Teams.Keys)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user