mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-12-05 16:16:35 +00:00
地区、技能、探索优化;新增锁定物品
This commit is contained in:
parent
11f675c5d7
commit
d2a1a69593
@ -137,7 +137,7 @@ namespace Oshima.FunGame.OshimaModules.Regions
|
|||||||
NPCs.Add("认知矫正师");
|
NPCs.Add("认知矫正师");
|
||||||
NPCs.Add("洛伦佐");
|
NPCs.Add("洛伦佐");
|
||||||
Areas.Add("梦境交易所");
|
Areas.Add("梦境交易所");
|
||||||
Areas.Add("幻疡医院");
|
Areas.Add("幻疡医院");
|
||||||
ContinuousQuestList.Add("谵妄梦境的思维隔离", new("在谵妄海市建立认知过滤系统,阻断思维寄生虫对市民意识的寄生感染路径。"));
|
ContinuousQuestList.Add("谵妄梦境的思维隔离", new("在谵妄海市建立认知过滤系统,阻断思维寄生虫对市民意识的寄生感染路径。"));
|
||||||
ImmediateQuestList.Add("谵妄认知病毒爆发", new("谵妄海市的思维寄生虫释放II型认知病毒,感染市民产生现实扭曲能力,必须一小时内建立精神隔离区。"));
|
ImmediateQuestList.Add("谵妄认知病毒爆发", new("谵妄海市的思维寄生虫释放II型认知病毒,感染市民产生现实扭曲能力,必须一小时内建立精神隔离区。"));
|
||||||
ProgressiveQuestList.Add("梦境碎片毒性分析", new("在谵妄海市分析 {0} 份不同的梦境碎片(需全程佩戴认知过滤器)。", item: "梦境碎片"));
|
ProgressiveQuestList.Add("梦境碎片毒性分析", new("在谵妄海市分析 {0} 份不同的梦境碎片(需全程佩戴认知过滤器)。", item: "梦境碎片"));
|
||||||
|
|||||||
@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Regions
|
|||||||
Crops.Add(new(180901, "菌类样本", "锻造物品的材料。", "共生母体上生长的奇异菌类,能释放麻痹毒素,具有高度研究价值。"));
|
Crops.Add(new(180901, "菌类样本", "锻造物品的材料。", "共生母体上生长的奇异菌类,能释放麻痹毒素,具有高度研究价值。"));
|
||||||
NPCs.Add("伊芙琳");
|
NPCs.Add("伊芙琳");
|
||||||
NPCs.Add("溃烂猎人");
|
NPCs.Add("溃烂猎人");
|
||||||
Areas.Add("母体神经丛");
|
Areas.Add("母体神经丛");
|
||||||
Areas.Add("诱捕菌林");
|
Areas.Add("诱捕菌林");
|
||||||
ContinuousQuestList.Add("腐萤沼渊的共生调查", new("深入腐萤沼渊,研究共生母体的生态系统,记录菌类模仿动物叫声的频率和模式。"));
|
ContinuousQuestList.Add("腐萤沼渊的共生调查", new("深入腐萤沼渊,研究共生母体的生态系统,记录菌类模仿动物叫声的频率和模式。"));
|
||||||
ContinuousQuestList.Add("腐沼菌群的声波分析", new("在腐萤沼渊建立声纹实验室,解析共生母体菌类发出的动物模拟叫声,建立声波防御系统。"));
|
ContinuousQuestList.Add("腐沼菌群的声波分析", new("在腐萤沼渊建立声纹实验室,解析共生母体菌类发出的动物模拟叫声,建立声波防御系统。"));
|
||||||
@ -77,8 +77,8 @@ namespace Oshima.FunGame.OshimaModules.Regions
|
|||||||
Crops.Add(new(181001, "影玫瑰", "锻造物品的材料。", "永夜侧绽放的奇异植物,散发幽光,只在绝对黑暗中盛开。", QualityType.White, [(r => r.Weather == "永夜")]));
|
Crops.Add(new(181001, "影玫瑰", "锻造物品的材料。", "永夜侧绽放的奇异植物,散发幽光,只在绝对黑暗中盛开。", QualityType.White, [(r => r.Weather == "永夜")]));
|
||||||
Crops.Add(new(181002, "星锚晶石", "锻造物品的材料。", "引雷柱上脱落的晶体碎片,蕴含空间束缚能量,能暂时固定空间结构。", QualityType.White, [(r => r.Weather == "永昼")]));
|
Crops.Add(new(181002, "星锚晶石", "锻造物品的材料。", "引雷柱上脱落的晶体碎片,蕴含空间束缚能量,能暂时固定空间结构。", QualityType.White, [(r => r.Weather == "永昼")]));
|
||||||
NPCs.Add("守夜人卡尔");
|
NPCs.Add("守夜人卡尔");
|
||||||
NPCs.Add("星锚祭司");
|
NPCs.Add("星锚祭司");
|
||||||
Areas.Add("永昼庭园");
|
Areas.Add("永昼庭园");
|
||||||
Areas.Add("永夜墓园");
|
Areas.Add("永夜墓园");
|
||||||
Areas.Add("星锚之地");
|
Areas.Add("星锚之地");
|
||||||
Areas.Add("中央之岛");
|
Areas.Add("中央之岛");
|
||||||
|
|||||||
@ -22,7 +22,7 @@ namespace Oshima.FunGame.OshimaModules.Regions
|
|||||||
Crops.Add(new(180502, "活体魔力血", "锻造物品的材料。", "具有自我修复能力的液态魔力,接触会导致身体不可预知的异变。"));
|
Crops.Add(new(180502, "活体魔力血", "锻造物品的材料。", "具有自我修复能力的液态魔力,接触会导致身体不可预知的异变。"));
|
||||||
NPCs.Add("\"噬罪者\"");
|
NPCs.Add("\"噬罪者\"");
|
||||||
NPCs.Add("7号改造体");
|
NPCs.Add("7号改造体");
|
||||||
Areas.Add("忏悔教堂");
|
Areas.Add("忏悔教堂");
|
||||||
Areas.Add("造物车间");
|
Areas.Add("造物车间");
|
||||||
ContinuousQuestList.Add("机械坟场的改造危机", new("潜入齿轮坟场被活体建筑同化的造物车间,研究其机械与生物融合的改造机制,寻找控制方法。"));
|
ContinuousQuestList.Add("机械坟场的改造危机", new("潜入齿轮坟场被活体建筑同化的造物车间,研究其机械与生物融合的改造机制,寻找控制方法。"));
|
||||||
ContinuousQuestList.Add("齿轮活血的污染控制", new("在齿轮坟场建立液态魔力隔离区,防止活体魔力血的生物污染扩散至外部环境。"));
|
ContinuousQuestList.Add("齿轮活血的污染控制", new("在齿轮坟场建立液态魔力隔离区,防止活体魔力血的生物污染扩散至外部环境。"));
|
||||||
|
|||||||
@ -22,7 +22,7 @@ namespace Oshima.FunGame.OshimaModules.Regions
|
|||||||
Crops.Add(new(180302, "深渊火钻", "锻造物品的材料。", "火山深处开采的珍稀矿石,只有被矿工灵魂烙印认可者才能安全触碰。"));
|
Crops.Add(new(180302, "深渊火钻", "锻造物品的材料。", "火山深处开采的珍稀矿石,只有被矿工灵魂烙印认可者才能安全触碰。"));
|
||||||
NPCs.Add("\"铁颚\"巴拉克");
|
NPCs.Add("\"铁颚\"巴拉克");
|
||||||
NPCs.Add("苔丝夫人");
|
NPCs.Add("苔丝夫人");
|
||||||
Areas.Add("鱿熔血池");
|
Areas.Add("鱿熔血池");
|
||||||
Areas.Add("活体锻炉");
|
Areas.Add("活体锻炉");
|
||||||
ContinuousQuestList.Add("元素裂隙的熵增警告", new("使用抗魔探针扫描永燃坩埚第47层矿道,绘制元素裂缝的扩张轨迹,评估其引发位面坍缩的风险等级。"));
|
ContinuousQuestList.Add("元素裂隙的熵增警告", new("使用抗魔探针扫描永燃坩埚第47层矿道,绘制元素裂缝的扩张轨迹,评估其引发位面坍缩的风险等级。"));
|
||||||
ContinuousQuestList.Add("坩埚熔岩的生命观测", new("在永燃坩埚的火山灰层建立实验室,监测活体金属苔藓与岩浆鱿鱼的共生进化过程。"));
|
ContinuousQuestList.Add("坩埚熔岩的生命观测", new("在永燃坩埚的火山灰层建立实验室,监测活体金属苔藓与岩浆鱿鱼的共生进化过程。"));
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace Oshima.FunGame.OshimaModules.Regions
|
|||||||
Crops.Add(new(181203, "矿脉神经纤维", "锻造物品的材料。", "连接神经宝石的活体纤维,触碰导致剧烈痛苦和神经感染。"));
|
Crops.Add(new(181203, "矿脉神经纤维", "锻造物品的材料。", "连接神经宝石的活体纤维,触碰导致剧烈痛苦和神经感染。"));
|
||||||
NPCs.Add("泰坦刻录员");
|
NPCs.Add("泰坦刻录员");
|
||||||
NPCs.Add("矿痛共生体");
|
NPCs.Add("矿痛共生体");
|
||||||
Areas.Add("神经矿脉");
|
Areas.Add("神经矿脉");
|
||||||
Areas.Add("雷霆王座");
|
Areas.Add("雷霆王座");
|
||||||
Areas.Add("裁决矩阵");
|
Areas.Add("裁决矩阵");
|
||||||
ContinuousQuestList.Add("泰坦遗迹的符文解读", new("攀登泰坦遗迹,记录裁决尖碑在月圆之夜投射的泰坦符文,破译其蕴含的宇宙法则。"));
|
ContinuousQuestList.Add("泰坦遗迹的符文解读", new("攀登泰坦遗迹,记录裁决尖碑在月圆之夜投射的泰坦符文,破译其蕴含的宇宙法则。"));
|
||||||
|
|||||||
@ -348,7 +348,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
* 冰川增幅 = 普攻或技能减敌人的行动速度,减速期间友军对其伤害提升
|
* 冰川增幅 = 普攻或技能减敌人的行动速度,减速期间友军对其伤害提升
|
||||||
* 先攻 = 先手攻击英雄时,造成额外真实伤害并获得金币。一段时间内相互未攻击,将重置先手判定
|
* 先攻 = 先手攻击英雄时,造成额外真实伤害并获得金币。一段时间内相互未攻击,将重置先手判定
|
||||||
* 饼干配送 = 每过一段时间获得免费饼干,回复生命值和魔法值
|
* 饼干配送 = 每过一段时间获得免费饼干,回复生命值和魔法值
|
||||||
* 折射 = 受到伤害时,减少受到的伤害,并反弹一部分伤害给攻击者
|
* 折射 = 受到伤害时,减少受到的伤害,并反弹一部分伤害给攻击者
|
||||||
* 恩赐解脱 = 攻击敌人时,有一定概率提升暴击伤害
|
* 恩赐解脱 = 攻击敌人时,有一定概率提升暴击伤害
|
||||||
* 静电场 = 技能命中时,造成额外真实伤害
|
* 静电场 = 技能命中时,造成额外真实伤害
|
||||||
* 竭心光环 = 造成伤害后,对敌人施加持续百分比真实伤害,并无视其生命回复
|
* 竭心光环 = 造成伤害后,对敌人施加持续百分比真实伤害,并无视其生命回复
|
||||||
@ -398,7 +398,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
冰川增幅 = 4029,
|
冰川增幅 = 4029,
|
||||||
先攻 = 4030,
|
先攻 = 4030,
|
||||||
饼干配送 = 4031,
|
饼干配送 = 4031,
|
||||||
折射 = 4032,
|
折射 = 4032,
|
||||||
恩赐解脱 = 4033,
|
恩赐解脱 = 4033,
|
||||||
静电场 = 4034,
|
静电场 = 4034,
|
||||||
竭心光环 = 4035,
|
竭心光环 = 4035,
|
||||||
|
|||||||
@ -25,11 +25,12 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"敏捷提高 20%,然后将目前的力量补充到与敏捷持平,持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。";
|
public override string Description => $"敏捷提高 20% [ {敏捷提升:0.##} ] 点,然后将目前的力量补充到与敏捷持平,持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。";
|
||||||
public override bool Durative => true;
|
public override bool Durative => true;
|
||||||
public override double Duration => 30;
|
public override double Duration => 30;
|
||||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||||
|
|
||||||
|
private double 敏捷提升 => 0.2 * Skill.Character?.BaseAGI ?? 0;
|
||||||
private double 本次提升的敏捷 = 0;
|
private double 本次提升的敏捷 = 0;
|
||||||
private double 本次提升的力量 = 0;
|
private double 本次提升的力量 = 0;
|
||||||
|
|
||||||
@ -41,10 +42,14 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
double pastMaxMP = character.MaxMP;
|
double pastMaxMP = character.MaxMP;
|
||||||
本次提升的敏捷 = character.BaseAGI * 0.2;
|
本次提升的敏捷 = character.BaseAGI * 0.2;
|
||||||
character.ExAGI += 本次提升的敏捷;
|
character.ExAGI += 本次提升的敏捷;
|
||||||
本次提升的力量 = character.AGI - character.STR;
|
本次提升的力量 = 0;
|
||||||
character.ExSTR += 本次提升的力量;
|
if (character.STR < character.AGI)
|
||||||
|
{
|
||||||
|
本次提升的力量 = character.AGI - character.STR;
|
||||||
|
character.ExSTR += 本次提升的力量;
|
||||||
|
}
|
||||||
character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||||
WriteLine($"[ {character} ] 敏捷提升了 {本次提升的敏捷:0.##},力量提升了 {本次提升的力量:0.##}!");
|
WriteLine($"[ {character} ] 敏捷提升了 {本次提升的敏捷:0.##} 点,力量提升了 {本次提升的力量:0.##} 点!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEffectLost(Character character)
|
public override void OnEffectLost(Character character)
|
||||||
|
|||||||
@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 冰狱冥嚎(Character? character = null) : base(SkillType.Magic, character)
|
public 冰狱冥嚎(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 40, 45, 0.2, 0.2));
|
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 30, 35, 0.2, 0.2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 地狱之门(Character? character = null) : base(SkillType.Magic, character)
|
public 地狱之门(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 纯数值伤害(this, 75, 60, DamageType.Magical));
|
Effects.Add(new 纯数值伤害(this, 55, 25, DamageType.Magical));
|
||||||
Effects.Add(new 施加概率负面(this, EffectType.Bleed, true, 3, 0, 0.5, 0.24, 0.08, false, 85.0));
|
Effects.Add(new 施加概率负面(this, EffectType.Bleed, true, 3, 0, 0.5, 0.24, 0.08, false, 85.0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 导力停止(Character? character = null) : base(SkillType.Magic, character)
|
public 导力停止(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 纯数值伤害(this, 35, 50, DamageType.Magical));
|
Effects.Add(new 纯数值伤害(this, 45, 20, DamageType.Magical));
|
||||||
Effects.Add(new 施加概率负面(this, EffectType.Silence, true, 8, 0, 1.2, 0.24, 0.08));
|
Effects.Add(new 施加概率负面(this, EffectType.Silence, true, 8, 0, 1.2, 0.24, 0.08));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 岩石之息(Character? character = null) : base(SkillType.Magic, character)
|
public 岩石之息(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.STR, 40, 20, 0.35, 0.2));
|
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.STR, 30, 10, 0.30, 0.2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 弧形日珥(Character? character = null) : base(SkillType.Magic, character)
|
public 弧形日珥(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.AGI, 55, 35, 0.2, 0.15));
|
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.AGI, 45, 25, 0.2, 0.12));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,14 +9,14 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
public override long Id => (long)MagicID.时间减速;
|
public override long Id => (long)MagicID.时间减速;
|
||||||
public override string Name => "时间减速";
|
public override string Name => "时间减速";
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
public override double MPCost => Level > 0 ? 110 + (100 * (Level - 1)) : 110;
|
public override double MPCost => Level > 0 ? 75 + (85 * (Level - 1)) : 75;
|
||||||
public override double CD => Level > 0 ? 60 - (1 * (Level - 1)) : 60;
|
public override double CD => Level > 0 ? 60 - (1 * (Level - 1)) : 60;
|
||||||
public override double CastTime => Level > 0 ? 7 + (1.5 * (Level - 1)) : 7;
|
public override double CastTime => Level > 0 ? 7 + (1.5 * (Level - 1)) : 7;
|
||||||
public override double HardnessTime { get; set; } = 8;
|
public override double HardnessTime { get; set; } = 8;
|
||||||
|
|
||||||
public 时间减速(Character? character = null) : base(SkillType.Magic, character)
|
public 时间减速(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 降低敌方行动速度(this, 30, 20));
|
Effects.Add(new 降低敌方行动速度(this, 60, 30));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,8 +9,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
public override long Id => (long)MagicID.时间加速;
|
public override long Id => (long)MagicID.时间加速;
|
||||||
public override string Name => "时间加速";
|
public override string Name => "时间加速";
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
public override double MPCost => Level > 0 ? 100 + (115 * (Level - 1)) : 100;
|
public override double MPCost => Level > 0 ? 95 + (105 * (Level - 1)) : 95;
|
||||||
public override double CD => Level > 0 ? 75 - (1 * (Level - 1)) : 75;
|
public override double CD => Level > 0 ? 65 - (1 * (Level - 1)) : 65;
|
||||||
public override double CastTime => Level > 0 ? 2 + (1.5 * (Level - 1)) : 2;
|
public override double CastTime => Level > 0 ? 2 + (1.5 * (Level - 1)) : 2;
|
||||||
public override double HardnessTime { get; set; } = 6;
|
public override double HardnessTime { get; set; } = 6;
|
||||||
public override bool CanSelectSelf => true;
|
public override bool CanSelectSelf => true;
|
||||||
@ -20,7 +20,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 时间加速(Character? character = null) : base(SkillType.Magic, character)
|
public 时间加速(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 提升友方行动速度(this, 65, 25));
|
Effects.Add(new 提升友方行动速度(this, 65, 30));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 死亡咆哮(Character? character = null) : base(SkillType.Magic, character)
|
public 死亡咆哮(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 纯数值伤害(this, 65, 75, DamageType.Magical));
|
Effects.Add(new 纯数值伤害(this, 55, 25, DamageType.Magical));
|
||||||
Effects.Add(new 施加概率负面(this, EffectType.Cripple, true, 3, 0, 1, 0.24, 0.08));
|
Effects.Add(new 施加概率负面(this, EffectType.Cripple, true, 3, 0, 1, 0.24, 0.08));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 水蓝轰炸(Character? character = null) : base(SkillType.Magic, character)
|
public 水蓝轰炸(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 基于核心属性的伤害(this, 30, 25, 0.15, 0.2));
|
Effects.Add(new 基于核心属性的伤害(this, 15, 35, 0.15, 0.2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 火山咆哮(Character? character = null) : base(SkillType.Magic, character)
|
public 火山咆哮(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 基于核心属性的伤害(this, 25, 30, 0.2, 0.15));
|
Effects.Add(new 基于核心属性的伤害(this, 35, 15, 0.2, 0.15));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 灾难冲击波(Character? character = null) : base(SkillType.Magic, character)
|
public 灾难冲击波(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 120, 35, 0.25, 0.04));
|
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 50, 15, 0.1, 0.04));
|
||||||
Effects.Add(new 灾难冲击波特效(this, false, 0, 2, 0, 0.03, 0.02));
|
Effects.Add(new 灾难冲击波特效(this, false, 0, 2, 0, 0.03, 0.02));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 破碎虚空(Character? character = null) : base(SkillType.Magic, character)
|
public 破碎虚空(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 基于攻击力的伤害_无基础伤害(this, 0.65, 0.12));
|
Effects.Add(new 基于攻击力的伤害_无基础伤害(this, 0.60, 0.1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 等离子之波(Character? character = null) : base(SkillType.Magic, character)
|
public 等离子之波(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 纯数值伤害(this, 65, 55, DamageType.Magical));
|
Effects.Add(new 纯数值伤害(this, 60, 20, DamageType.Magical));
|
||||||
Effects.Add(new 施加概率负面(this, EffectType.Silence, false, 0, 2, 0, 0.24, 0.08));
|
Effects.Add(new 施加概率负面(this, EffectType.Silence, false, 0, 2, 0, 0.24, 0.08));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 苍白地狱(Character? character = null) : base(SkillType.Magic, character)
|
public 苍白地狱(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 40, 25, 0.25, 0.25));
|
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 30, 25, 0.25, 0.2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 钻石星尘(Character? character = null) : base(SkillType.Magic, character)
|
public 钻石星尘(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 纯数值伤害(this, 45, 55, DamageType.Magical));
|
Effects.Add(new 纯数值伤害(this, 65, 25, DamageType.Magical));
|
||||||
Effects.Add(new 施加概率负面(this, EffectType.Freeze, false, 0, 2, 0, 0.24, 0.08));
|
Effects.Add(new 施加概率负面(this, EffectType.Freeze, false, 0, 2, 0, 0.24, 0.08));
|
||||||
Effects.Add(new 施加概率负面(this, EffectType.Vulnerable, false, 0, 3, 0, 0.24, 0.08, DamageType.Magical, 0.3));
|
Effects.Add(new 施加概率负面(this, EffectType.Vulnerable, false, 0, 3, 0, 0.24, 0.08, DamageType.Magical, 0.3));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
private double 实际持续时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
|
private double 实际持续时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
|
||||||
private double Damage => Skill.Level > 0 ? 基础数值伤害 + 基础伤害等级成长 * (Skill.Level - 1) : 基础数值伤害;
|
private double Damage => Skill.Level > 0 ? 基础数值伤害 + 基础伤害等级成长 * (Skill.Level - 1) : 基础数值伤害;
|
||||||
private double 基础数值伤害 { get; set; } = 50;
|
private double 基础数值伤害 { get; set; } = 50;
|
||||||
private double 基础伤害等级成长 { get; set; } = 50;
|
private double 基础伤害等级成长 { get; set; } = 40;
|
||||||
private double ActualConfusionProbability => Level > 0 ? _confusionProbability + _confusionProbabilityLevelGrowth * (Level - 1) : _confusionProbability;
|
private double ActualConfusionProbability => Level > 0 ? _confusionProbability + _confusionProbabilityLevelGrowth * (Level - 1) : _confusionProbability;
|
||||||
private readonly bool _durative;
|
private readonly bool _durative;
|
||||||
private readonly double _duration;
|
private readonly double _duration;
|
||||||
|
|||||||
@ -32,7 +32,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public 鬼魅之痛(Character? character = null) : base(SkillType.Magic, character)
|
public 鬼魅之痛(Character? character = null) : base(SkillType.Magic, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 纯数值伤害(this, 55, 70, DamageType.Magical));
|
Effects.Add(new 纯数值伤害(this, 60, 40, DamageType.Magical));
|
||||||
Effects.Add(new 施加概率负面(this, EffectType.Stun, true, 6, 0, 0.7, 0.24, 0.08));
|
Effects.Add(new 施加概率负面(this, EffectType.Stun, true, 6, 0, 0.7, 0.24, 0.08));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -651,36 +651,36 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
switch (r)
|
switch (r)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
if ((int)type > (int)QualityType.Orange) type = QualityType.Orange;
|
Item[] 武器 = [.. FunGameConstant.Equipment.Where(i => i.ItemType == ItemType.Weapon && i.QualityType == type)];
|
||||||
Item[] 武器 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && i.QualityType == type)];
|
|
||||||
Item a = 武器[Random.Shared.Next(武器.Length)].Copy();
|
Item a = 武器[Random.Shared.Next(武器.Length)].Copy();
|
||||||
|
if (a.QualityType >= QualityType.Orange) a.IsLock = true;
|
||||||
SetSellAndTradeTime(a);
|
SetSellAndTradeTime(a);
|
||||||
user.Inventory.Items.Add(a);
|
user.Inventory.Items.Add(a);
|
||||||
msg += ItemSet.GetQualityTypeName(a.QualityType) + ItemSet.GetItemTypeName(a.ItemType) + "【" + a.Name + "】!\r\n" + a.Description;
|
msg += ItemSet.GetQualityTypeName(a.QualityType) + ItemSet.GetItemTypeName(a.ItemType) + "【" + a.Name + "】!\r\n" + a.Description;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if ((int)type > (int)QualityType.Green) type = QualityType.Green;
|
Item[] 防具 = [.. FunGameConstant.Equipment.Where(i => i.ItemType == ItemType.Armor && i.QualityType == type)];
|
||||||
Item[] 防具 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && i.QualityType == type)];
|
|
||||||
Item b = 防具[Random.Shared.Next(防具.Length)].Copy();
|
Item b = 防具[Random.Shared.Next(防具.Length)].Copy();
|
||||||
|
if (b.QualityType >= QualityType.Orange) b.IsLock = true;
|
||||||
SetSellAndTradeTime(b);
|
SetSellAndTradeTime(b);
|
||||||
user.Inventory.Items.Add(b);
|
user.Inventory.Items.Add(b);
|
||||||
msg += ItemSet.GetQualityTypeName(b.QualityType) + ItemSet.GetItemTypeName(b.ItemType) + "【" + b.Name + "】!\r\n" + b.Description;
|
msg += ItemSet.GetQualityTypeName(b.QualityType) + ItemSet.GetItemTypeName(b.ItemType) + "【" + b.Name + "】!\r\n" + b.Description;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
if ((int)type > (int)QualityType.Green) type = QualityType.Green;
|
Item[] 鞋子 = [.. FunGameConstant.Equipment.Where(i => i.ItemType == ItemType.Shoes && i.QualityType == type)];
|
||||||
Item[] 鞋子 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && i.QualityType == type)];
|
|
||||||
Item c = 鞋子[Random.Shared.Next(鞋子.Length)].Copy();
|
Item c = 鞋子[Random.Shared.Next(鞋子.Length)].Copy();
|
||||||
|
if (c.QualityType >= QualityType.Orange) c.IsLock = true;
|
||||||
SetSellAndTradeTime(c);
|
SetSellAndTradeTime(c);
|
||||||
user.Inventory.Items.Add(c);
|
user.Inventory.Items.Add(c);
|
||||||
msg += ItemSet.GetQualityTypeName(c.QualityType) + ItemSet.GetItemTypeName(c.ItemType) + "【" + c.Name + "】!\r\n" + c.Description;
|
msg += ItemSet.GetQualityTypeName(c.QualityType) + ItemSet.GetItemTypeName(c.ItemType) + "【" + c.Name + "】!\r\n" + c.Description;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
if ((int)type > (int)QualityType.Purple) type = QualityType.Purple;
|
Item[] 饰品 = [.. FunGameConstant.Equipment.Where(i => i.ItemType == ItemType.Accessory && i.QualityType == type)];
|
||||||
Item[] 饰品 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && i.QualityType == type)];
|
|
||||||
Item d = 饰品[Random.Shared.Next(饰品.Length)].Copy();
|
Item d = 饰品[Random.Shared.Next(饰品.Length)].Copy();
|
||||||
|
if (d.QualityType >= QualityType.Orange) d.IsLock = true;
|
||||||
SetSellAndTradeTime(d);
|
SetSellAndTradeTime(d);
|
||||||
user.Inventory.Items.Add(d);
|
user.Inventory.Items.Add(d);
|
||||||
msg += ItemSet.GetQualityTypeName(d.QualityType) + ItemSet.GetItemTypeName(d.ItemType) + "【" + d.Name + "】!\r\n" + d.Description;
|
msg += ItemSet.GetQualityTypeName(d.QualityType) + ItemSet.GetItemTypeName(d.ItemType) + "【" + d.Name + "】!\r\n" + d.Description;
|
||||||
@ -702,8 +702,8 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
if ((int)type > (int)QualityType.Orange) type = QualityType.Orange;
|
|
||||||
Item mfk = GenerateMagicCard(type);
|
Item mfk = GenerateMagicCard(type);
|
||||||
|
if (mfk.QualityType >= QualityType.Orange) mfk.IsLock = true;
|
||||||
SetSellAndTradeTime(mfk);
|
SetSellAndTradeTime(mfk);
|
||||||
user.Inventory.Items.Add(mfk);
|
user.Inventory.Items.Add(mfk);
|
||||||
msg += ItemSet.GetQualityTypeName(mfk.QualityType) + ItemSet.GetItemTypeName(mfk.ItemType) + "【" + mfk.Name + "】!\r\n" + mfk.Description;
|
msg += ItemSet.GetQualityTypeName(mfk.QualityType) + ItemSet.GetItemTypeName(mfk.ItemType) + "【" + mfk.Name + "】!\r\n" + mfk.Description;
|
||||||
@ -711,17 +711,22 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
Item 物品 = FunGameConstant.DrawCardItems[Random.Shared.Next(FunGameConstant.DrawCardItems.Count)].Copy();
|
Item 物品 = FunGameConstant.DrawCardItems[Random.Shared.Next(FunGameConstant.DrawCardItems.Count)].Copy();
|
||||||
|
if (物品.QualityType >= QualityType.Orange) 物品.IsLock = true;
|
||||||
SetSellAndTradeTime(物品);
|
SetSellAndTradeTime(物品);
|
||||||
user.Inventory.Items.Add(物品);
|
user.Inventory.Items.Add(物品);
|
||||||
msg += ItemSet.GetQualityTypeName(物品.QualityType) + ItemSet.GetItemTypeName(物品.ItemType) + "【" + 物品.Name + "】!\r\n" + 物品.Description;
|
msg += ItemSet.GetQualityTypeName(物品.QualityType) + ItemSet.GetItemTypeName(物品.ItemType) + "【" + 物品.Name + "】!\r\n" + 物品.Description;
|
||||||
|
// 连接到任务系统
|
||||||
|
AddExploreItemCache(user.Id, 物品.Name);
|
||||||
|
// 连接到活动系统
|
||||||
|
ActivitiesItemCache.Add(物品.Name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
if ((int)type > (int)QualityType.Orange) type = QualityType.Orange;
|
|
||||||
Item? mfkb = GenerateMagicCardPack(3, type);
|
Item? mfkb = GenerateMagicCardPack(3, type);
|
||||||
if (mfkb != null)
|
if (mfkb != null)
|
||||||
{
|
{
|
||||||
|
if (mfkb.QualityType >= QualityType.Orange) mfkb.IsLock = true;
|
||||||
SetSellAndTradeTime(mfkb);
|
SetSellAndTradeTime(mfkb);
|
||||||
user.Inventory.Items.Add(mfkb);
|
user.Inventory.Items.Add(mfkb);
|
||||||
msg += ItemSet.GetQualityTypeName(mfkb.QualityType) + ItemSet.GetItemTypeName(mfkb.ItemType) + "【" + mfkb.Name + "】!\r\n" + mfkb.Description;
|
msg += ItemSet.GetQualityTypeName(mfkb.QualityType) + ItemSet.GetItemTypeName(mfkb.ItemType) + "【" + mfkb.Name + "】!\r\n" + mfkb.Description;
|
||||||
@ -767,44 +772,44 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
switch (r)
|
switch (r)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
if ((int)type > (int)QualityType.Orange) type = QualityType.Orange;
|
|
||||||
Item[] 武器 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && i.QualityType == type)];
|
Item[] 武器 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && i.QualityType == type)];
|
||||||
Item a = 武器[Random.Shared.Next(武器.Length)].Copy();
|
Item a = 武器[Random.Shared.Next(武器.Length)].Copy();
|
||||||
|
if (a.QualityType >= QualityType.Orange) a.IsLock = true;
|
||||||
SetSellAndTradeTime(a);
|
SetSellAndTradeTime(a);
|
||||||
user.Inventory.Items.Add(a);
|
user.Inventory.Items.Add(a);
|
||||||
msg += ItemSet.GetQualityTypeName(a.QualityType) + ItemSet.GetItemTypeName(a.ItemType) + "【" + a.Name + "】!\r\n" + a.Description;
|
msg += ItemSet.GetQualityTypeName(a.QualityType) + ItemSet.GetItemTypeName(a.ItemType) + "【" + a.Name + "】!\r\n" + a.Description;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if ((int)type > (int)QualityType.Green) type = QualityType.Green;
|
|
||||||
Item[] 防具 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && i.QualityType == type)];
|
Item[] 防具 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && i.QualityType == type)];
|
||||||
Item b = 防具[Random.Shared.Next(防具.Length)].Copy();
|
Item b = 防具[Random.Shared.Next(防具.Length)].Copy();
|
||||||
|
if (b.QualityType >= QualityType.Orange) b.IsLock = true;
|
||||||
SetSellAndTradeTime(b);
|
SetSellAndTradeTime(b);
|
||||||
user.Inventory.Items.Add(b);
|
user.Inventory.Items.Add(b);
|
||||||
msg += ItemSet.GetQualityTypeName(b.QualityType) + ItemSet.GetItemTypeName(b.ItemType) + "【" + b.Name + "】!\r\n" + b.Description;
|
msg += ItemSet.GetQualityTypeName(b.QualityType) + ItemSet.GetItemTypeName(b.ItemType) + "【" + b.Name + "】!\r\n" + b.Description;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
if ((int)type > (int)QualityType.Green) type = QualityType.Green;
|
|
||||||
Item[] 鞋子 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && i.QualityType == type)];
|
Item[] 鞋子 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && i.QualityType == type)];
|
||||||
Item c = 鞋子[Random.Shared.Next(鞋子.Length)].Copy();
|
Item c = 鞋子[Random.Shared.Next(鞋子.Length)].Copy();
|
||||||
|
if (c.QualityType >= QualityType.Orange) c.IsLock = true;
|
||||||
SetSellAndTradeTime(c);
|
SetSellAndTradeTime(c);
|
||||||
user.Inventory.Items.Add(c);
|
user.Inventory.Items.Add(c);
|
||||||
msg += ItemSet.GetQualityTypeName(c.QualityType) + ItemSet.GetItemTypeName(c.ItemType) + "【" + c.Name + "】!\r\n" + c.Description;
|
msg += ItemSet.GetQualityTypeName(c.QualityType) + ItemSet.GetItemTypeName(c.ItemType) + "【" + c.Name + "】!\r\n" + c.Description;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
if ((int)type > (int)QualityType.Purple) type = QualityType.Purple;
|
|
||||||
Item[] 饰品 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && i.QualityType == type)];
|
Item[] 饰品 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && i.QualityType == type)];
|
||||||
Item d = 饰品[Random.Shared.Next(饰品.Length)].Copy();
|
Item d = 饰品[Random.Shared.Next(饰品.Length)].Copy();
|
||||||
|
if (d.QualityType >= QualityType.Orange) d.IsLock = true;
|
||||||
SetSellAndTradeTime(d);
|
SetSellAndTradeTime(d);
|
||||||
user.Inventory.Items.Add(d);
|
user.Inventory.Items.Add(d);
|
||||||
msg += ItemSet.GetQualityTypeName(d.QualityType) + ItemSet.GetItemTypeName(d.ItemType) + "【" + d.Name + "】!\r\n" + d.Description;
|
msg += ItemSet.GetQualityTypeName(d.QualityType) + ItemSet.GetItemTypeName(d.ItemType) + "【" + d.Name + "】!\r\n" + d.Description;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
if ((int)type > (int)QualityType.Orange) type = QualityType.Orange;
|
|
||||||
Item mfk = GenerateMagicCard(type);
|
Item mfk = GenerateMagicCard(type);
|
||||||
|
if (mfk.QualityType >= QualityType.Orange) mfk.IsLock = true;
|
||||||
SetSellAndTradeTime(mfk);
|
SetSellAndTradeTime(mfk);
|
||||||
user.Inventory.Items.Add(mfk);
|
user.Inventory.Items.Add(mfk);
|
||||||
msg += ItemSet.GetQualityTypeName(mfk.QualityType) + ItemSet.GetItemTypeName(mfk.ItemType) + "【" + mfk.Name + "】!\r\n" + mfk.Description;
|
msg += ItemSet.GetQualityTypeName(mfk.QualityType) + ItemSet.GetItemTypeName(mfk.ItemType) + "【" + mfk.Name + "】!\r\n" + mfk.Description;
|
||||||
@ -812,10 +817,10 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
if ((int)type > (int)QualityType.Orange) type = QualityType.Orange;
|
|
||||||
Item? mfkb = GenerateMagicCardPack(3, type);
|
Item? mfkb = GenerateMagicCardPack(3, type);
|
||||||
if (mfkb != null)
|
if (mfkb != null)
|
||||||
{
|
{
|
||||||
|
if (mfkb.QualityType >= QualityType.Orange) mfkb.IsLock = true;
|
||||||
SetSellAndTradeTime(mfkb);
|
SetSellAndTradeTime(mfkb);
|
||||||
user.Inventory.Items.Add(mfkb);
|
user.Inventory.Items.Add(mfkb);
|
||||||
msg += ItemSet.GetQualityTypeName(mfkb.QualityType) + ItemSet.GetItemTypeName(mfkb.ItemType) + "【" + mfkb.Name + "】!\r\n" + mfkb.Description;
|
msg += ItemSet.GetQualityTypeName(mfkb.QualityType) + ItemSet.GetItemTypeName(mfkb.ItemType) + "【" + mfkb.Name + "】!\r\n" + mfkb.Description;
|
||||||
@ -1116,6 +1121,10 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
msgs.Add($"{item.Name} 的剩余使用次数为 0,无法使用!");
|
msgs.Add($"{item.Name} 的剩余使用次数为 0,无法使用!");
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
bool tempResult = item.UseItem(user, args);
|
bool tempResult = item.UseItem(user, args);
|
||||||
if (item.EntityState == EntityState.Deleted)
|
if (item.EntityState == EntityState.Deleted)
|
||||||
{
|
{
|
||||||
@ -1165,6 +1174,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
for (int i = 0; i< cardBox.Count; i++)
|
for (int i = 0; i< cardBox.Count; i++)
|
||||||
{
|
{
|
||||||
Item newItem = GenerateMagicCard(item.QualityType);
|
Item newItem = GenerateMagicCard(item.QualityType);
|
||||||
|
if (newItem.QualityType >= QualityType.Orange) newItem.IsLock = true;
|
||||||
SetSellAndTradeTime(newItem);
|
SetSellAndTradeTime(newItem);
|
||||||
newItem.User = user;
|
newItem.User = user;
|
||||||
user.Inventory.Items.Add(newItem);
|
user.Inventory.Items.Add(newItem);
|
||||||
@ -1196,6 +1206,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
for (int i = 0; i < box.Gifts[name]; i++)
|
for (int i = 0; i < box.Gifts[name]; i++)
|
||||||
{
|
{
|
||||||
Item newItem = currentItem.Copy();
|
Item newItem = currentItem.Copy();
|
||||||
|
if (newItem.QualityType >= QualityType.Orange) newItem.IsLock = true;
|
||||||
SetSellAndTradeTime(newItem);
|
SetSellAndTradeTime(newItem);
|
||||||
newItem.User = user;
|
newItem.User = user;
|
||||||
user.Inventory.Items.Add(newItem);
|
user.Inventory.Items.Add(newItem);
|
||||||
@ -1656,15 +1667,44 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
QuestType type = (QuestType)Random.Shared.Next(3);
|
QuestType type = (QuestType)Random.Shared.Next(3);
|
||||||
long id = quests.Count > 0 ? quests.Values.Max(q => q.Id) + 1 : 1;
|
long id = quests.Count > 0 ? quests.Values.Max(q => q.Id) + 1 : 1;
|
||||||
|
|
||||||
|
// 定义概率
|
||||||
|
Dictionary<QualityType, double> pE = new()
|
||||||
|
{
|
||||||
|
{ QualityType.Blue, 0.5 },
|
||||||
|
{ QualityType.Purple, 0.37 },
|
||||||
|
{ QualityType.Orange, 0.1 },
|
||||||
|
{ QualityType.Red, 0.03 },
|
||||||
|
};
|
||||||
|
|
||||||
// 生成任务奖励物品
|
// 生成任务奖励物品
|
||||||
|
QualityType qualityType = QualityType.Blue;
|
||||||
|
foreach (QualityType qt in pE.Keys.OrderByDescending(q => (int)q))
|
||||||
|
{
|
||||||
|
if (Random.Shared.NextDouble() <= pE[qt])
|
||||||
|
{
|
||||||
|
qualityType = qt;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HashSet<Item> items = [];
|
HashSet<Item> items = [];
|
||||||
Dictionary<string, int> itemsCount = [];
|
Dictionary<string, int> itemsCount = [];
|
||||||
int index = Random.Shared.Next(FunGameConstant.DrawCardItems.Count);
|
Item? item = FunGameConstant.DrawCardItems.Where(i => qualityType == QualityType.Blue ? (int)i.QualityType <= (int)qualityType : (int)i.QualityType == (int)qualityType).OrderBy(o => Random.Shared.Next()).FirstOrDefault();
|
||||||
Item item = FunGameConstant.DrawCardItems[index];
|
item ??= FunGameConstant.DrawCardItems.OrderBy(o => Random.Shared.Next()).First();
|
||||||
items.Add(item);
|
items.Add(item);
|
||||||
itemsCount[item.Name] = 1;
|
itemsCount[item.Name] = 1;
|
||||||
index = Random.Shared.Next(FunGameConstant.DrawCardItems.Count);
|
|
||||||
Item item2 = FunGameConstant.DrawCardItems[index];
|
foreach (QualityType qt in pE.Keys.OrderByDescending(q => (int)q))
|
||||||
|
{
|
||||||
|
if (Random.Shared.NextDouble() <= pE[qt])
|
||||||
|
{
|
||||||
|
qualityType = qt;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item? item2 = FunGameConstant.DrawCardItems.Where(i => qualityType == QualityType.Blue ? (int)i.QualityType <= (int)qualityType : (int)i.QualityType == (int)qualityType).OrderBy(o => Random.Shared.Next()).FirstOrDefault();
|
||||||
|
item2 ??= FunGameConstant.DrawCardItems.OrderBy(o => Random.Shared.Next()).First();
|
||||||
items.Add(item2);
|
items.Add(item2);
|
||||||
if (!itemsCount.TryAdd(item2.Name, 1))
|
if (!itemsCount.TryAdd(item2.Name, 1))
|
||||||
{
|
{
|
||||||
@ -1689,8 +1729,8 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
NeedyExploreItemName = exploration.Item,
|
NeedyExploreItemName = exploration.Item,
|
||||||
QuestType = QuestType.Continuous,
|
QuestType = QuestType.Continuous,
|
||||||
EstimatedMinutes = minutes,
|
EstimatedMinutes = minutes,
|
||||||
CreditsAward = minutes * 20,
|
CreditsAward = minutes * 40,
|
||||||
MaterialsAward = minutes / 8 * 1,
|
MaterialsAward = minutes / 4,
|
||||||
Awards = items,
|
Awards = items,
|
||||||
AwardsCount = itemsCount
|
AwardsCount = itemsCount
|
||||||
};
|
};
|
||||||
@ -1708,8 +1748,8 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
RegionId = region.Id,
|
RegionId = region.Id,
|
||||||
NeedyExploreItemName = exploration.Item,
|
NeedyExploreItemName = exploration.Item,
|
||||||
QuestType = QuestType.Immediate,
|
QuestType = QuestType.Immediate,
|
||||||
CreditsAward = difficulty * 80,
|
CreditsAward = difficulty * 160,
|
||||||
MaterialsAward = difficulty / 2 * 1,
|
MaterialsAward = difficulty,
|
||||||
Awards = items,
|
Awards = items,
|
||||||
AwardsCount = itemsCount
|
AwardsCount = itemsCount
|
||||||
};
|
};
|
||||||
@ -1729,8 +1769,8 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
QuestType = QuestType.Progressive,
|
QuestType = QuestType.Progressive,
|
||||||
Progress = 0,
|
Progress = 0,
|
||||||
MaxProgress = maxProgress,
|
MaxProgress = maxProgress,
|
||||||
CreditsAward = maxProgress * 80,
|
CreditsAward = maxProgress * 160,
|
||||||
MaterialsAward = maxProgress / 2 * 1,
|
MaterialsAward = maxProgress,
|
||||||
Awards = items,
|
Awards = items,
|
||||||
AwardsCount = itemsCount,
|
AwardsCount = itemsCount,
|
||||||
Status = QuestState.InProgress
|
Status = QuestState.InProgress
|
||||||
@ -1814,6 +1854,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
{
|
{
|
||||||
Item newItem = item.Copy();
|
Item newItem = item.Copy();
|
||||||
newItem.User = user;
|
newItem.User = user;
|
||||||
|
if (newItem.QualityType >= QualityType.Orange) newItem.IsLock = true;
|
||||||
SetSellAndTradeTime(newItem);
|
SetSellAndTradeTime(newItem);
|
||||||
user.Inventory.Items.Add(newItem);
|
user.Inventory.Items.Add(newItem);
|
||||||
// 连接到任务系统
|
// 连接到任务系统
|
||||||
@ -1947,6 +1988,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
Item newItem = item.Copy(true);
|
Item newItem = item.Copy(true);
|
||||||
|
if (newItem.QualityType >= QualityType.Orange) newItem.IsLock = true;
|
||||||
SetSellAndTradeTime(newItem);
|
SetSellAndTradeTime(newItem);
|
||||||
if (goods.GetPrice(General.GameplayEquilibriumConstant.InGameCurrency, out double price) && price > 0)
|
if (goods.GetPrice(General.GameplayEquilibriumConstant.InGameCurrency, out double price) && price > 0)
|
||||||
{
|
{
|
||||||
@ -1954,6 +1996,10 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
}
|
}
|
||||||
newItem.User = user;
|
newItem.User = user;
|
||||||
user.Inventory.Items.Add(newItem);
|
user.Inventory.Items.Add(newItem);
|
||||||
|
// 连接到任务系统
|
||||||
|
AddExploreItemCache(user.Id, item.Name);
|
||||||
|
// 连接到活动系统
|
||||||
|
ActivitiesItemCache.Add(item.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2345,11 +2391,10 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
// 初始化掉落装备的概率
|
// 初始化掉落装备的概率
|
||||||
Dictionary<QualityType, double> pE = new()
|
Dictionary<QualityType, double> pE = new()
|
||||||
{
|
{
|
||||||
{ QualityType.Blue, 0.4 },
|
{ QualityType.Blue, 0.5 },
|
||||||
{ QualityType.Purple, 0.27 + (0.01 * (characterCount - 1)) },
|
{ QualityType.Purple, 0.37 + (0.01 * (characterCount - 1)) },
|
||||||
{ QualityType.Orange, 0.2 + (0.01 * (characterCount - 1)) },
|
{ QualityType.Orange, 0.1 + (0.01 * (characterCount - 1)) },
|
||||||
{ QualityType.Red, 0.1 + (0.0075 * (characterCount - 1)) },
|
{ QualityType.Red, 0.03 + (0.0075 * (characterCount - 1)) },
|
||||||
{ QualityType.Gold, 0.03 + (0.0075 * (characterCount - 1)) }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 生成奖励
|
// 生成奖励
|
||||||
@ -2400,7 +2445,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
break;
|
break;
|
||||||
case ExploreResult.Fight:
|
case ExploreResult.Fight:
|
||||||
// 小队信息
|
// 小队信息
|
||||||
Character[] squad = [.. user.Inventory.Characters.Where((c, index) => characterIds.Contains(index + 1)).Select(c => CharacterBuilder.Build(c, true, true, user.Inventory, FunGameConstant.AllItems, FunGameConstant.AllSkills, false))];
|
Character[] squad = [.. user.Inventory.Characters.Where((c, index) => characterIds.Contains(index + 1)).Select(c => CharacterBuilder.Build(c, true, true, null, FunGameConstant.AllItems, FunGameConstant.AllSkills, false))];
|
||||||
if (squad.All(c => c.HP <= 0))
|
if (squad.All(c => c.HP <= 0))
|
||||||
{
|
{
|
||||||
model.Result = ExploreResult.Nothing;
|
model.Result = ExploreResult.Nothing;
|
||||||
@ -2478,7 +2523,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item? itemDrop = region.Items.Where(i => qualityType == QualityType.Blue ? (int)i.QualityType <= (int)qualityType : (int)i.QualityType == (int)qualityType).FirstOrDefault();
|
Item? itemDrop = region.Items.Where(i => qualityType == QualityType.Blue ? (int)i.QualityType <= (int)qualityType : (int)i.QualityType == (int)qualityType).OrderBy(o => Random.Shared.Next()).FirstOrDefault();
|
||||||
if (itemDrop != null)
|
if (itemDrop != null)
|
||||||
{
|
{
|
||||||
string itemquality = ItemSet.GetQualityTypeName(itemDrop.QualityType);
|
string itemquality = ItemSet.GetQualityTypeName(itemDrop.QualityType);
|
||||||
@ -2518,7 +2563,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item? itemEarned = region.Items.OrderBy(i => quality == QualityType.Blue ? (int)i.QualityType <= (int)quality : (int)i.QualityType == (int)quality).FirstOrDefault();
|
Item? itemEarned = region.Items.Where(i => quality == QualityType.Blue ? (int)i.QualityType <= (int)quality : (int)i.QualityType == (int)quality).OrderBy(o => Random.Shared.Next()).FirstOrDefault();
|
||||||
if (itemEarned is null)
|
if (itemEarned is null)
|
||||||
{
|
{
|
||||||
model.Result = ExploreResult.Nothing;
|
model.Result = ExploreResult.Nothing;
|
||||||
@ -2584,6 +2629,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
{
|
{
|
||||||
Item newItem = item.Copy();
|
Item newItem = item.Copy();
|
||||||
newItem.User = user;
|
newItem.User = user;
|
||||||
|
if (newItem.QualityType >= QualityType.Orange) newItem.IsLock = true;
|
||||||
SetSellAndTradeTime(newItem);
|
SetSellAndTradeTime(newItem);
|
||||||
user.Inventory.Items.Add(newItem);
|
user.Inventory.Items.Add(newItem);
|
||||||
// 连接到任务系统
|
// 连接到任务系统
|
||||||
|
|||||||
@ -823,13 +823,13 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
IEnumerable<Item> canBuys = store.Where(i => i.Price <= character.User.Inventory.Credits);
|
IEnumerable<Item> canBuys = store.Where(i => i.Price <= character.User.Inventory.Credits);
|
||||||
|
|
||||||
// 然后看能买的东西里,是否品质符合
|
// 然后看能买的东西里,是否品质符合
|
||||||
Item[] weapons = [.. canBuys.Where(i => i.Id.ToString().StartsWith("11") &&
|
Item[] weapons = [.. canBuys.Where(i => i.ItemType == ItemType.Weapon &&
|
||||||
(onlyLarger ? (int)i.QualityType > Convert.ToInt32(character.EquipSlot.Weapon?.QualityType) : (int)i.QualityType >= Convert.ToInt32(character.EquipSlot.Weapon?.QualityType)))];
|
(onlyLarger ? (int)i.QualityType > Convert.ToInt32(character.EquipSlot.Weapon?.QualityType) : (int)i.QualityType >= Convert.ToInt32(character.EquipSlot.Weapon?.QualityType)))];
|
||||||
Item[] armors = [.. canBuys.Where(i => i.Id.ToString().StartsWith("12") &&
|
Item[] armors = [.. canBuys.Where(i => i.ItemType == ItemType.Armor &&
|
||||||
(onlyLarger ? (int)i.QualityType > Convert.ToInt32(character.EquipSlot.Armor?.QualityType) : (int)i.QualityType >= Convert.ToInt32(character.EquipSlot.Armor?.QualityType)))];
|
(onlyLarger ? (int)i.QualityType > Convert.ToInt32(character.EquipSlot.Armor?.QualityType) : (int)i.QualityType >= Convert.ToInt32(character.EquipSlot.Armor?.QualityType)))];
|
||||||
Item[] shoes = [.. canBuys.Where(i => i.Id.ToString().StartsWith("13") &&
|
Item[] shoes = [.. canBuys.Where(i => i.ItemType == ItemType.Shoes &&
|
||||||
(onlyLarger ? (int)i.QualityType > Convert.ToInt32(character.EquipSlot.Shoes?.QualityType) : (int)i.QualityType >= Convert.ToInt32(character.EquipSlot.Shoes?.QualityType)))];
|
(onlyLarger ? (int)i.QualityType > Convert.ToInt32(character.EquipSlot.Shoes?.QualityType) : (int)i.QualityType >= Convert.ToInt32(character.EquipSlot.Shoes?.QualityType)))];
|
||||||
Item[] accessories = [.. canBuys.Where(i => i.Id.ToString().StartsWith("14") &&
|
Item[] accessories = [.. canBuys.Where(i => i.ItemType == ItemType.Accessory &&
|
||||||
(onlyLarger ? (int)i.QualityType > Math.Min(Convert.ToInt32(character.EquipSlot.Accessory1?.QualityType), Convert.ToInt32(character.EquipSlot.Accessory2?.QualityType))
|
(onlyLarger ? (int)i.QualityType > Math.Min(Convert.ToInt32(character.EquipSlot.Accessory1?.QualityType), Convert.ToInt32(character.EquipSlot.Accessory2?.QualityType))
|
||||||
: (int)i.QualityType >= Math.Min(Convert.ToInt32(character.EquipSlot.Accessory1?.QualityType), Convert.ToInt32(character.EquipSlot.Accessory2?.QualityType))))];
|
: (int)i.QualityType >= Math.Min(Convert.ToInt32(character.EquipSlot.Accessory1?.QualityType), Convert.ToInt32(character.EquipSlot.Accessory2?.QualityType))))];
|
||||||
|
|
||||||
@ -1002,10 +1002,10 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
|
|
||||||
public static void DropItems(GamingQueue queue, int mQuality, int wQuality, int aQuality, int sQuality, int acQuality, bool addLevel = true)
|
public static void DropItems(GamingQueue queue, int mQuality, int wQuality, int aQuality, int sQuality, int acQuality, bool addLevel = true)
|
||||||
{
|
{
|
||||||
Item[] weapons = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality)];
|
Item[] weapons = [.. FunGameConstant.Equipment.Where(i => i.ItemType == ItemType.Weapon && (int)i.QualityType == wQuality)];
|
||||||
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)];
|
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.ItemType == ItemType.Armor && (int)i.QualityType == aQuality)];
|
||||||
Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality)];
|
Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.ItemType == ItemType.Shoes && (int)i.QualityType == sQuality)];
|
||||||
Item[] accessories = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)];
|
Item[] accessories = [.. FunGameConstant.Equipment.Where(i => i.ItemType == ItemType.Accessory && (int)i.QualityType == acQuality)];
|
||||||
Item[] consumables = [.. FunGameConstant.AllItems.Where(i => i.ItemType == ItemType.Consumable && i.IsInGameItem)];
|
Item[] consumables = [.. FunGameConstant.AllItems.Where(i => i.ItemType == ItemType.Consumable && i.IsInGameItem)];
|
||||||
foreach (Character character in queue.AllCharacters)
|
foreach (Character character in queue.AllCharacters)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -995,13 +995,13 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
{
|
{
|
||||||
itemsEquipableIndex = string.Join(",", itemsEquipable.Take(10).Select(i => items.IndexOf(i) + 1)) + ",...";
|
itemsEquipableIndex = string.Join(",", itemsEquipable.Take(10).Select(i => items.IndexOf(i) + 1)) + ",...";
|
||||||
}
|
}
|
||||||
IEnumerable<Item> itemsSellable = objs.Where(i => i.IsSellable);
|
IEnumerable<Item> itemsSellable = objs.Where(i => i.IsSellable && !i.IsLock);
|
||||||
string itemsSellableIndex = string.Join(",", itemsSellable.Select(i => items.IndexOf(i) + 1));
|
string itemsSellableIndex = string.Join(",", itemsSellable.Select(i => items.IndexOf(i) + 1));
|
||||||
if (itemsSellable.Count() > 10)
|
if (itemsSellable.Count() > 10)
|
||||||
{
|
{
|
||||||
itemsSellableIndex = string.Join(",", itemsSellable.Take(10).Select(i => items.IndexOf(i) + 1)) + ",...";
|
itemsSellableIndex = string.Join(",", itemsSellable.Take(10).Select(i => items.IndexOf(i) + 1)) + ",...";
|
||||||
}
|
}
|
||||||
IEnumerable<Item> itemsTradable = objs.Where(i => i.IsTradable);
|
IEnumerable<Item> itemsTradable = objs.Where(i => i.IsTradable && !i.IsLock);
|
||||||
string itemsTradableIndex = string.Join(",", itemsTradable.Select(i => items.IndexOf(i) + 1));
|
string itemsTradableIndex = string.Join(",", itemsTradable.Select(i => items.IndexOf(i) + 1));
|
||||||
if (itemsTradable.Count() > 10)
|
if (itemsTradable.Count() > 10)
|
||||||
{
|
{
|
||||||
@ -1012,7 +1012,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
if (itemsSellableIndex != "") str += $"可出售序号:{itemsSellableIndex}\r\n";
|
if (itemsSellableIndex != "") str += $"可出售序号:{itemsSellableIndex}\r\n";
|
||||||
if (itemsTradableIndex != "") str += $"可交易序号:{itemsTradableIndex}\r\n";
|
if (itemsTradableIndex != "") str += $"可交易序号:{itemsTradableIndex}\r\n";
|
||||||
str += $"拥有数量:{objs.Count}(" + (first.IsEquipment ? $"可装备数量:{itemsEquipable.Count()}," : "") +
|
str += $"拥有数量:{objs.Count}(" + (first.IsEquipment ? $"可装备数量:{itemsEquipable.Count()}," : "") +
|
||||||
(FunGameConstant.ItemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.RemainUseTimes > 0)}," : "") +
|
(FunGameConstant.ItemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.RemainUseTimes > 0 && !i.IsLock)}," : "") +
|
||||||
$"可出售数量:{itemsSellable.Count()},可交易数量:{itemsTradable.Count()})";
|
$"可出售数量:{itemsSellable.Count()},可交易数量:{itemsTradable.Count()})";
|
||||||
list.Add(str);
|
list.Add(str);
|
||||||
}
|
}
|
||||||
@ -1101,13 +1101,13 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
{
|
{
|
||||||
itemsEquipableIndex = string.Join(",", itemsEquipable.Take(10).Select(i => items.IndexOf(i) + 1)) + ",...";
|
itemsEquipableIndex = string.Join(",", itemsEquipable.Take(10).Select(i => items.IndexOf(i) + 1)) + ",...";
|
||||||
}
|
}
|
||||||
IEnumerable<Item> itemsSellable = objs.Where(i => i.IsSellable);
|
IEnumerable<Item> itemsSellable = objs.Where(i => i.IsSellable && !i.IsLock);
|
||||||
string itemsSellableIndex = string.Join(",", itemsSellable.Select(i => items.IndexOf(i) + 1));
|
string itemsSellableIndex = string.Join(",", itemsSellable.Select(i => items.IndexOf(i) + 1));
|
||||||
if (itemsSellable.Count() > 10)
|
if (itemsSellable.Count() > 10)
|
||||||
{
|
{
|
||||||
itemsSellableIndex = string.Join(",", itemsSellable.Take(10).Select(i => items.IndexOf(i) + 1)) + ",...";
|
itemsSellableIndex = string.Join(",", itemsSellable.Take(10).Select(i => items.IndexOf(i) + 1)) + ",...";
|
||||||
}
|
}
|
||||||
IEnumerable<Item> itemsTradable = objs.Where(i => i.IsTradable);
|
IEnumerable<Item> itemsTradable = objs.Where(i => i.IsTradable && !i.IsLock);
|
||||||
string itemsTradableIndex = string.Join(",", itemsTradable.Select(i => items.IndexOf(i) + 1));
|
string itemsTradableIndex = string.Join(",", itemsTradable.Select(i => items.IndexOf(i) + 1));
|
||||||
if (itemsTradable.Count() > 10)
|
if (itemsTradable.Count() > 10)
|
||||||
{
|
{
|
||||||
@ -1118,7 +1118,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
if (itemsSellableIndex != "") str += $"可出售序号:{itemsSellableIndex}\r\n";
|
if (itemsSellableIndex != "") str += $"可出售序号:{itemsSellableIndex}\r\n";
|
||||||
if (itemsTradableIndex != "") str += $"可交易序号:{itemsTradableIndex}\r\n";
|
if (itemsTradableIndex != "") str += $"可交易序号:{itemsTradableIndex}\r\n";
|
||||||
str += $"拥有数量:{objs.Count}(" + (first.IsEquipment ? $"可装备数量:{itemsEquipable.Count()}," : "") +
|
str += $"拥有数量:{objs.Count}(" + (first.IsEquipment ? $"可装备数量:{itemsEquipable.Count()}," : "") +
|
||||||
(FunGameConstant.ItemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.RemainUseTimes > 0)}," : "") +
|
(FunGameConstant.ItemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.RemainUseTimes > 0 && !i.IsLock)}," : "") +
|
||||||
$"可出售数量:{itemsSellable.Count()},可交易数量:{itemsTradable.Count()})";
|
$"可出售数量:{itemsSellable.Count()},可交易数量:{itemsTradable.Count()})";
|
||||||
list.Add(str);
|
list.Add(str);
|
||||||
}
|
}
|
||||||
@ -2056,6 +2056,11 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
item = user.Inventory.Items.ToList()[itemIndex - 1];
|
item = user.Inventory.Items.ToList()[itemIndex - 1];
|
||||||
if (FunGameConstant.ItemCanUsed.Contains(item.ItemType))
|
if (FunGameConstant.ItemCanUsed.Contains(item.ItemType))
|
||||||
{
|
{
|
||||||
|
if (item.IsLock)
|
||||||
|
{
|
||||||
|
return $"此物品已上锁,请先解锁:{itemIndex}. {item.Name}";
|
||||||
|
}
|
||||||
|
|
||||||
if (item.ItemType == ItemType.MagicCard)
|
if (item.ItemType == ItemType.MagicCard)
|
||||||
{
|
{
|
||||||
return "此物品为魔法卡,请使用【使用魔法卡】指令!";
|
return "此物品为魔法卡,请使用【使用魔法卡】指令!";
|
||||||
@ -2127,7 +2132,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
{
|
{
|
||||||
User user = FunGameService.GetUser(pc);
|
User user = FunGameService.GetUser(pc);
|
||||||
|
|
||||||
IEnumerable<Item> items = user.Inventory.Items.Where(i => i.Name == name && i.Character is null && i.ItemType != ItemType.MagicCard);
|
IEnumerable<Item> items = user.Inventory.Items.Where(i => i.Name == name && i.Character is null && i.ItemType != ItemType.MagicCard && !i.IsLock);
|
||||||
if (!items.Any())
|
if (!items.Any())
|
||||||
{
|
{
|
||||||
return $"库存中不存在名称为【{name}】的物品!如果是魔法卡,请用【使用魔法卡】指令。";
|
return $"库存中不存在名称为【{name}】的物品!如果是魔法卡,请用【使用魔法卡】指令。";
|
||||||
@ -2202,6 +2207,11 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
item = user.Inventory.Items.ToList()[itemIndex - 1];
|
item = user.Inventory.Items.ToList()[itemIndex - 1];
|
||||||
if (item.ItemType == ItemType.MagicCard)
|
if (item.ItemType == ItemType.MagicCard)
|
||||||
{
|
{
|
||||||
|
if (item.IsLock)
|
||||||
|
{
|
||||||
|
return $"此物品已上锁,请先解锁:{itemIndex}. {item.Name}";
|
||||||
|
}
|
||||||
|
|
||||||
if (item.RemainUseTimes <= 0)
|
if (item.RemainUseTimes <= 0)
|
||||||
{
|
{
|
||||||
return "此物品剩余使用次数为0,无法使用!";
|
return "此物品剩余使用次数为0,无法使用!";
|
||||||
@ -2651,7 +2661,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
int successCount = 0;
|
int successCount = 0;
|
||||||
double totalGained = 0;
|
double totalGained = 0;
|
||||||
Dictionary<int, Item> dict = user.Inventory.Items.Select((item, index) => new { item, index })
|
Dictionary<int, Item> dict = user.Inventory.Items.Select((item, index) => new { item, index })
|
||||||
.Where(x => ids.Contains(x.index) && x.item.Character is null)
|
.Where(x => ids.Contains(x.index) && x.item.Character is null && !x.item.IsLock)
|
||||||
.ToDictionary(x => x.index, x => x.item);
|
.ToDictionary(x => x.index, x => x.item);
|
||||||
|
|
||||||
foreach (int id in dict.Keys)
|
foreach (int id in dict.Keys)
|
||||||
@ -2716,7 +2726,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
{
|
{
|
||||||
User user = FunGameService.GetUser(pc);
|
User user = FunGameService.GetUser(pc);
|
||||||
|
|
||||||
IEnumerable<Item> items = user.Inventory.Items.Where(i => i.Name == name && i.Character is null);
|
IEnumerable<Item> items = user.Inventory.Items.Where(i => i.Name == name && i.Character is null && !i.IsLock);
|
||||||
if (!items.Any())
|
if (!items.Any())
|
||||||
{
|
{
|
||||||
return $"库存中不存在名称为【{name}】的物品!";
|
return $"库存中不存在名称为【{name}】的物品!";
|
||||||
@ -2794,7 +2804,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
User user = FunGameService.GetUser(pc);
|
User user = FunGameService.GetUser(pc);
|
||||||
|
|
||||||
string qualityName = ItemSet.GetQualityTypeName((QualityType)qType);
|
string qualityName = ItemSet.GetQualityTypeName((QualityType)qType);
|
||||||
IEnumerable<Item> items = user.Inventory.Items.Where(i => (int)i.QualityType == qType && i.Character is null);
|
IEnumerable<Item> items = user.Inventory.Items.Where(i => (int)i.QualityType == qType && i.Character is null && !i.IsLock);
|
||||||
if (!items.Any())
|
if (!items.Any())
|
||||||
{
|
{
|
||||||
return $"库存中{qualityName}物品数量为零!";
|
return $"库存中{qualityName}物品数量为零!";
|
||||||
@ -2866,7 +2876,11 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
if (itemIndex > 0 && itemIndex <= user.Inventory.Items.Count)
|
if (itemIndex > 0 && itemIndex <= user.Inventory.Items.Count)
|
||||||
{
|
{
|
||||||
item = user.Inventory.Items.ToList()[itemIndex - 1];
|
item = user.Inventory.Items.ToList()[itemIndex - 1];
|
||||||
if (item.ItemType == ItemType.MagicCard && item.RemainUseTimes > 0)
|
if (item.IsLock)
|
||||||
|
{
|
||||||
|
return $"此物品已上锁,请先解锁:{itemIndex}. {item.Name}";
|
||||||
|
}
|
||||||
|
else if (item.ItemType == ItemType.MagicCard && item.RemainUseTimes > 0)
|
||||||
{
|
{
|
||||||
mfks.Add(item);
|
mfks.Add(item);
|
||||||
}
|
}
|
||||||
@ -5366,7 +5380,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
{
|
{
|
||||||
exploreTimes -= reduce;
|
exploreTimes -= reduce;
|
||||||
|
|
||||||
msg = $"开始探索【{region.Name}】,探索时间预计 {FunGameConstant.ExploreTime} 分钟(系统会自动结算,届时会有提示)。" +
|
msg = $"开始探索【{region.Name}】,探索时间预计 {FunGameConstant.ExploreTime} 分钟(系统会自动结算,届时会有提示)。注意:探索期间的角色状态已被锁定,在此期间修改角色属性不会影响战斗结果。" +
|
||||||
$"探索成员:[ {FunGameService.GetCharacterGroupInfoByInventorySequence(user.Inventory.Characters, characterIds, " ] / [ ")} ]";
|
$"探索成员:[ {FunGameService.GetCharacterGroupInfoByInventorySequence(user.Inventory.Characters, characterIds, " ] / [ ")} ]";
|
||||||
ExploreModel model = await FunGameService.GenerateExploreModel(region, characterIds, user);
|
ExploreModel model = await FunGameService.GenerateExploreModel(region, characterIds, user);
|
||||||
exploreId = model.Guid;
|
exploreId = model.Guid;
|
||||||
@ -5635,6 +5649,69 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost("lockitem")]
|
||||||
|
public string LockItem([FromQuery] long? uid = null, [FromQuery] bool unlock = false, [FromBody] int[]? seq = null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
long userid = uid ?? Convert.ToInt64("10" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 11));
|
||||||
|
int[] items = seq ?? [];
|
||||||
|
|
||||||
|
PluginConfig pc = new("saved", userid.ToString());
|
||||||
|
pc.LoadConfig();
|
||||||
|
|
||||||
|
if (pc.Count > 0)
|
||||||
|
{
|
||||||
|
User user = FunGameService.GetUser(pc);
|
||||||
|
string msg = "";
|
||||||
|
List<int> failedItems = [];
|
||||||
|
foreach (int itemIndex in items)
|
||||||
|
{
|
||||||
|
if (itemIndex > 0 && itemIndex <= user.Inventory.Items.Count)
|
||||||
|
{
|
||||||
|
Item item = user.Inventory.Items.ToList()[itemIndex - 1];
|
||||||
|
if (msg != "") msg += "\r\n";
|
||||||
|
if (unlock)
|
||||||
|
{
|
||||||
|
item.IsLock = false;
|
||||||
|
msg += $"物品解锁成功:{itemIndex}. {item.Name}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item.IsLock = true;
|
||||||
|
msg += $"物品上锁成功:{itemIndex}. {item.Name}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
failedItems.Add(itemIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (failedItems.Count > 0)
|
||||||
|
{
|
||||||
|
if (msg != "") msg += "\r\n";
|
||||||
|
msg += "没有找到与这个序号相对应的物品:" + string.Join(",", failedItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
user.LastTime = DateTime.Now;
|
||||||
|
pc.Add("user", user);
|
||||||
|
pc.SaveConfig();
|
||||||
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return noSaved;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.LogError(e, "Error: ");
|
||||||
|
return busy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost("template")]
|
[HttpPost("template")]
|
||||||
public string Template([FromQuery] long? uid = null)
|
public string Template([FromQuery] long? uid = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2190,6 +2190,54 @@ namespace Oshima.FunGame.WebAPI.Services
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (e.Detail.StartsWith("上锁") || e.Detail.StartsWith("锁定"))
|
||||||
|
{
|
||||||
|
string detail = e.Detail.Replace("上锁", "").Replace("锁定", "").Trim();
|
||||||
|
string msg = "";
|
||||||
|
string[] strings = detail.Split(' ', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
List<int> indexs = [];
|
||||||
|
foreach (string s in strings)
|
||||||
|
{
|
||||||
|
if (int.TryParse(s, out int c))
|
||||||
|
{
|
||||||
|
indexs.Add(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (indexs.Count > 0)
|
||||||
|
{
|
||||||
|
msg = Controller.LockItem(uid, true, [.. indexs]);
|
||||||
|
if (msg.Trim() != "")
|
||||||
|
{
|
||||||
|
await SendAsync(e, "上锁", msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e.Detail.StartsWith("解锁"))
|
||||||
|
{
|
||||||
|
string detail = e.Detail.Replace("解锁", "").Trim();
|
||||||
|
string msg = "";
|
||||||
|
string[] strings = detail.Split(' ', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
List<int> indexs = [];
|
||||||
|
foreach (string s in strings)
|
||||||
|
{
|
||||||
|
if (int.TryParse(s, out int c))
|
||||||
|
{
|
||||||
|
indexs.Add(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (indexs.Count > 0)
|
||||||
|
{
|
||||||
|
msg = Controller.LockItem(uid, true, [.. indexs]);
|
||||||
|
if (msg.Trim() != "")
|
||||||
|
{
|
||||||
|
await SendAsync(e, "解锁", msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
if (uid == GeneralSettings.Master && e.Detail.StartsWith("重载FunGame", StringComparison.CurrentCultureIgnoreCase))
|
if (uid == GeneralSettings.Master && e.Detail.StartsWith("重载FunGame", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string msg = Controller.Relaod(uid);
|
string msg = Controller.Relaod(uid);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user