mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2026-01-19 14:08:23 +00:00
魔法卡秘境调整
This commit is contained in:
parent
98795dcc5c
commit
bb8977eea7
@ -3984,7 +3984,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
{
|
||||
builder.Append($"小队未能战胜敌人,");
|
||||
IEnumerable<Character> deadEnemys = enemys.Where(c => c.HP <= 0);
|
||||
if (!deadEnemys.Any())
|
||||
if (type == InstanceType.MagicCard || !deadEnemys.Any())
|
||||
{
|
||||
builder.AppendLine("无法获取秘境奖励!");
|
||||
}
|
||||
@ -4165,35 +4165,6 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
builder.AppendLine($"{string.Join("、", skillLevelUpItems)}!");
|
||||
break;
|
||||
case InstanceType.MagicCard:
|
||||
Dictionary<string, int> magicCards = [];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
int roll = Random.Shared.Next(100);
|
||||
double cumulativeProbability = 0.0;
|
||||
RarityType rarityType = RarityType.OneStar;
|
||||
foreach (int loop in rW.Keys)
|
||||
{
|
||||
cumulativeProbability += rW[loop];
|
||||
if (roll < cumulativeProbability)
|
||||
{
|
||||
rarityType = (RarityType)loop;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 从优秀开始
|
||||
QualityType qualityType = (QualityType)((int)rarityType + 1);
|
||||
Item item = GenerateMagicCard(qualityType);
|
||||
AddItemToUserInventory(user, item, copyLevel: true);
|
||||
if (magicCards.TryGetValue(ItemSet.GetQualityTypeName(item.QualityType), out int qCount))
|
||||
{
|
||||
magicCards[ItemSet.GetQualityTypeName(item.QualityType)] = qCount + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
magicCards[ItemSet.GetQualityTypeName(item.QualityType)] = 1;
|
||||
}
|
||||
}
|
||||
builder.AppendLine($"{string.Join("、", magicCards.Select(kv => $"{kv.Value} 张{kv.Key}魔法卡"))}!");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@ -7879,6 +7879,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
||||
{
|
||||
// 检查探索许可
|
||||
int reduce = difficulty * squad.Length;
|
||||
if (type == (int)InstanceType.MagicCard) reduce *= 3;
|
||||
if (pc.TryGetValue("exploreTimes", out object? value) && int.TryParse(value.ToString(), out exploreTimes))
|
||||
{
|
||||
if (exploreTimes <= 0)
|
||||
@ -7889,7 +7890,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
||||
else if (reduce > exploreTimes)
|
||||
{
|
||||
msg = $"本次秘境挑战需要消耗 {reduce} 个探索许可,超过了你的剩余探索许可数量({exploreTimes} 个),请减少小队的角色数量或更改难度系数。" +
|
||||
$"\r\n需要注意:难度系数一比一兑换探索许可,并且参与挑战的角色,都需要消耗相同数量的探索许可。";
|
||||
$"\r\n需要注意:难度系数一比一兑换探索许可,并且参与挑战的角色,都需要消耗相同数量的探索许可。特殊地,魔法卡秘境额外 3 倍探索许可消耗。";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user