mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 00:06:02 +00:00
调整一些事件接入的位置;使用复苏道具复活不会回复满状态
This commit is contained in:
parent
f8f7df94b7
commit
cb44cb5672
@ -1581,7 +1581,11 @@ namespace Milimoe.FunGame.Core.Model
|
|||||||
{
|
{
|
||||||
WriteLine($"[ {target} ] 复苏了,并回复了 {heal:0.##} 点生命值!!");
|
WriteLine($"[ {target} ] 复苏了,并回复了 {heal:0.##} 点生命值!!");
|
||||||
}
|
}
|
||||||
|
double hp = target.HP;
|
||||||
|
double mp = target.MP;
|
||||||
await SetCharacterRespawn(target);
|
await SetCharacterRespawn(target);
|
||||||
|
target.HP = hp;
|
||||||
|
target.MP = mp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1717,14 +1721,14 @@ namespace Milimoe.FunGame.Core.Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
_continuousKilling.Remove(death);
|
_continuousKilling.Remove(death);
|
||||||
|
_eliminated.Add(death);
|
||||||
if (MaxRespawnTimes == 0)
|
if (MaxRespawnTimes == 0)
|
||||||
{
|
{
|
||||||
_eliminated.Add(death);
|
// do nothing
|
||||||
}
|
}
|
||||||
else if (_respawnTimes.TryGetValue(death, out int times) && MaxRespawnTimes != -1 && times == MaxRespawnTimes)
|
else if (_respawnTimes.TryGetValue(death, out int times) && MaxRespawnTimes != -1 && times == MaxRespawnTimes)
|
||||||
{
|
{
|
||||||
WriteLine($"[ {death} ] 已达到复活次数上限,将不能再复活!!");
|
WriteLine($"[ {death} ] 已达到复活次数上限,将不能再复活!!");
|
||||||
_eliminated.Add(death);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2462,15 +2466,16 @@ namespace Milimoe.FunGame.Core.Model
|
|||||||
{
|
{
|
||||||
double hardnessTime = 5;
|
double hardnessTime = 5;
|
||||||
character.Respawn(_original[character.Guid]);
|
character.Respawn(_original[character.Guid]);
|
||||||
|
_eliminated.Remove(character);
|
||||||
WriteLine($"[ {character} ] 已复活!获得 {hardnessTime} {GameplayEquilibriumConstant.InGameTime}的硬直时间。");
|
WriteLine($"[ {character} ] 已复活!获得 {hardnessTime} {GameplayEquilibriumConstant.InGameTime}的硬直时间。");
|
||||||
AddCharacter(character, hardnessTime, false);
|
AddCharacter(character, hardnessTime, false);
|
||||||
await OnQueueUpdatedAsync(_queue, character, hardnessTime, QueueUpdatedReason.Respawn, "设置角色复活后的硬直时间。");
|
|
||||||
LastRound.Respawns.Add(character);
|
LastRound.Respawns.Add(character);
|
||||||
_respawnCountdown.Remove(character);
|
_respawnCountdown.Remove(character);
|
||||||
if (!_respawnTimes.TryAdd(character, 1))
|
if (!_respawnTimes.TryAdd(character, 1))
|
||||||
{
|
{
|
||||||
_respawnTimes[character] += 1;
|
_respawnTimes[character] += 1;
|
||||||
}
|
}
|
||||||
|
await OnQueueUpdatedAsync(_queue, character, hardnessTime, QueueUpdatedReason.Respawn, "设置角色复活后的硬直时间。");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -2505,8 +2510,8 @@ namespace Milimoe.FunGame.Core.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
AddCharacter(character, Calculation.Round2Digits(baseHardnessTime + preCastSSCount * 0.01), false);
|
AddCharacter(character, Calculation.Round2Digits(baseHardnessTime + preCastSSCount * 0.01), false);
|
||||||
await OnQueueUpdatedAsync(_queue, character, 0, QueueUpdatedReason.PreCastSuperSkill, "设置角色预释放爆发技的硬直时间。");
|
|
||||||
skill.OnSkillCasting(this, character, []);
|
skill.OnSkillCasting(this, character, []);
|
||||||
|
await OnQueueUpdatedAsync(_queue, character, 0, QueueUpdatedReason.PreCastSuperSkill, "设置角色预释放爆发技的硬直时间。");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user