chore: initialize OshimaBot repository (rename from Enhancement)
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
/// <summary>
|
||||
/// 装备 · 饰品【万能钥匙】—— 周期性的「全能决策点配额」
|
||||
/// <para/>设计意图:`TempActionQuota` 的 **全能档**(`AddTempActionQuota(effect, null, n)`)
|
||||
/// 是本项目**完全空白**的维度——现有 3 处配额用法全都指定了具体行动类型
|
||||
/// (`疾走`/`闪现` 给战技、`咒怨洪流` 给普攻)。全能配额意味着"这一回合任何行动都能多做一次"。
|
||||
/// <para/>⚠ 关键:**配额必须与决策点一起给**。实测表明决策点才是硬约束(AI 行动循环持续到
|
||||
/// `CurrentDecisionPoints` 耗尽),只给配额而不给 DP 等于空给(`咒怨洪流` 即受此限制)
|
||||
/// ⇒ 本装备每次都**同时**发放「+1 全能配额」与「+1 决策点」。
|
||||
/// <para/>品质决定技能等级(Orange 4 / Red 7 / Gold 10),等级只影响发放间隔(39 / 34.5 / 30 秒)。
|
||||
/// </summary>
|
||||
public abstract class 万能钥匙 : Item
|
||||
{
|
||||
protected 万能钥匙(Character? character, int 技能等级) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 万能钥匙技能(character, this) { Level = 技能等级 });
|
||||
}
|
||||
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "黄铜齿面被磨得发亮。它不保证你打开哪扇门,只保证你总多一次机会去试。";
|
||||
}
|
||||
|
||||
public class 万能钥匙1 : 万能钥匙
|
||||
{
|
||||
public override long Id => (long)AccessoryID.万能钥匙1;
|
||||
public override string Name => "万能钥匙 Lv.4";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
public 万能钥匙1(Character? character = null) : base(character, 4) { }
|
||||
}
|
||||
|
||||
public class 万能钥匙2 : 万能钥匙
|
||||
{
|
||||
public override long Id => (long)AccessoryID.万能钥匙2;
|
||||
public override string Name => "万能钥匙 Lv.7";
|
||||
public override QualityType QualityType => QualityType.Red;
|
||||
public 万能钥匙2(Character? character = null) : base(character, 7) { }
|
||||
}
|
||||
|
||||
public class 万能钥匙3 : 万能钥匙
|
||||
{
|
||||
public override long Id => (long)AccessoryID.万能钥匙3;
|
||||
public override string Name => "万能钥匙 Lv.10";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
public 万能钥匙3(Character? character = null) : base(character, 10) { }
|
||||
}
|
||||
|
||||
public class 万能钥匙技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.万能钥匙;
|
||||
public override string Name => "万能钥匙";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 万能钥匙技能(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 4; // 最低档兜底;三档装备分别写入 4 / 7 / 10
|
||||
Item = item;
|
||||
Effects.Add(new 万能钥匙特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 万能钥匙特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description =>
|
||||
$"每 {间隔:0.##} {GameplayEquilibriumConstant.InGameTime}获得一次「全能决策点配额」与 {决策点补充} 点决策点 —— " +
|
||||
$"本回合内任何行动(普攻 / 战技 / 魔法 / 爆发技 / 物品)都能多做一次。";
|
||||
|
||||
private double _剩余间隔 = 0;
|
||||
|
||||
/// <summary>发放间隔(秒):技能等级越高越短(Lv4 = 39 / Lv7 = 34.5 / Lv10 = 30)</summary>
|
||||
private double 间隔 => 45 - Skill.Level * 1.5;
|
||||
|
||||
/// <summary>随配额一起发放的决策点(保证配额能被兑现)</summary>
|
||||
private const int 决策点补充 = 1;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (Skill.Character is null || Skill.Character != character) return;
|
||||
_剩余间隔 = 间隔;
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (Skill.Character is null || Skill.Character != character) return;
|
||||
if (GamingQueue is null) return;
|
||||
_剩余间隔 -= ctx.Elapsed;
|
||||
if (_剩余间隔 > 0) return;
|
||||
_剩余间隔 = 间隔;
|
||||
if (!GamingQueue.CharacterDecisionPoints.TryGetValue(character, out DecisionPoints? dp) || dp is null) return;
|
||||
int before = dp.CurrentDecisionPoints;
|
||||
dp.CurrentDecisionPoints = Math.Min(before + 决策点补充, dp.MaxDecisionPoints);
|
||||
dp.AddTempActionQuota(this, null, 1); // type = null ⇒ 全能配额
|
||||
WriteLine($"[ {character} ] 的万能钥匙生效:获得 {dp.CurrentDecisionPoints - before} 点决策点与一次全能行动配额!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
/// <summary>
|
||||
/// 装备 · 饰品【共鸣核心】—— 把队友的出手转成自身能量的「电池」
|
||||
/// <para/>设计意图:与【行军医箱】(消耗能量换队友生命)互补,本条是<b>反向</b>的资源流:
|
||||
/// 队友的每一次有效伤害都会为穿戴者充能。它把"队友愿不愿意持续输出"变成自身的续航条件,
|
||||
/// 因此不需要任何数值增益,也能让通用的普攻/技能变得对团队有价值。
|
||||
/// <para/>触发:穿戴者为每名队友挂【共鸣标记】,标记以宿主身份收到
|
||||
/// <see cref="Effect.AfterDamageCalculation"/>(宿主为攻击方)后转发给穿戴者;穿戴者回复能量。
|
||||
/// <para/>数值:回能量由技能等级决定(Orange 4 级 = 4、Red 7 级 = 8、Gold 10 级 = 12),
|
||||
/// 等级 < 4 时取兜底 1(正常用不到)。
|
||||
/// <para/>⚠ 只对<b>队友</b>(不含穿戴者本人)生效,因此必须身处一支有输出能力的队伍才有收益。
|
||||
/// <para/>⚠ 幂等约定:装备会被周期空投<b>随时替换</b>,因此
|
||||
/// <see cref="共鸣核心特效.OnEffectLost"/> 必须把挂在他人状态栏上的【共鸣标记】全部撤回。
|
||||
/// </summary>
|
||||
public abstract class 共鸣核心 : Item
|
||||
{
|
||||
protected 共鸣核心(Character? character, int 技能等级) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 共鸣核心技能(character, this) { Level = 技能等级 });
|
||||
}
|
||||
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
|
||||
public override string BackgroundStory => "核心内部封着一枚悬停的结晶。每当共鸣的同伴出手,它便泛起一圈微光——那是被传递回来的节拍。";
|
||||
}
|
||||
|
||||
public class 共鸣核心1 : 共鸣核心
|
||||
{
|
||||
public override long Id => (long)AccessoryID.共鸣核心1;
|
||||
public override string Name => "共鸣核心 +4";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
|
||||
public 共鸣核心1(Character? character = null) : base(character, 4) { }
|
||||
}
|
||||
|
||||
public class 共鸣核心2 : 共鸣核心
|
||||
{
|
||||
public override long Id => (long)AccessoryID.共鸣核心2;
|
||||
public override string Name => "共鸣核心 +8";
|
||||
public override QualityType QualityType => QualityType.Red;
|
||||
|
||||
public 共鸣核心2(Character? character = null) : base(character, 7) { }
|
||||
}
|
||||
|
||||
public class 共鸣核心3 : 共鸣核心
|
||||
{
|
||||
public override long Id => (long)AccessoryID.共鸣核心3;
|
||||
public override string Name => "共鸣核心 +12";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 共鸣核心3(Character? character = null) : base(character, 10) { }
|
||||
}
|
||||
|
||||
public class 共鸣核心技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.共鸣核心;
|
||||
public override string Name => "共鸣核心";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 共鸣核心技能(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 4; // 最低档兜底;三档装备分别写入 4 / 7 / 10
|
||||
Item = item;
|
||||
Effects.Add(new 共鸣核心特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 【共鸣核心】的控制器:常驻在穿戴者身上,负责维护队友身上的【共鸣标记】并结算回能。
|
||||
/// <para/>冷却集中在这里,因此队友的同一轮多段伤害(含 AoE)只会触发一次回能。
|
||||
/// </summary>
|
||||
public class 共鸣核心特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description =>
|
||||
$"共鸣范围内的队友每次造成伤害,你回复 {每次回能:0.##} 点能量" +
|
||||
$"(每 {冷却时间:0.##} {GameplayEquilibriumConstant.InGameTime}至多一次)。";
|
||||
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
|
||||
private double _剩余冷却 = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 每次回能:等级 < 4 时取兜底 1(正常用不到);否则按等级线性增长
|
||||
/// (Orange 4 级 = 4、Red 7 级 = 8、Gold 10 级 = 12)
|
||||
/// </summary>
|
||||
private double 每次回能 => Level < 4 ? 1 : 4 * (Level - 1) / 3.0;
|
||||
|
||||
/// <summary>回能冷却(穿戴者共享,避免 AoE 多段伤害刷爆)</summary>
|
||||
private const double 冷却时间 = 2;
|
||||
|
||||
public 共鸣核心特效(Skill skill) : base(skill)
|
||||
{
|
||||
}
|
||||
|
||||
private Character? 穿戴者 => Skill.Character;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
_剩余冷却 = 0;
|
||||
// 开局前队列可能尚未就绪,真正的挂载交给 OnGameStart / OnTimeElapsed 兜底
|
||||
发送标记();
|
||||
}
|
||||
|
||||
public override void OnGameStart(HookContext ctx)
|
||||
{
|
||||
发送标记();
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (穿戴者 is null || 穿戴者 != character) return;
|
||||
if (_剩余冷却 > 0) _剩余冷却 = Math.Max(0, _剩余冷却 - ctx.Elapsed);
|
||||
// 兜底:新入场 / 复活的队友补挂标记(内部去重)
|
||||
发送标记();
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
// 卸装 / 换装:必须把挂在他人状态栏上的标记全部撤回,保证幂等
|
||||
撤回标记();
|
||||
}
|
||||
|
||||
/// <summary>为每名存活队友补挂【共鸣标记】(按本控制器的技能实例去重)</summary>
|
||||
private void 发送标记()
|
||||
{
|
||||
Character? wearer = 穿戴者;
|
||||
if (GamingQueue is null || wearer is null) return;
|
||||
foreach (Character ally in GamingQueue.GetTeammates(wearer))
|
||||
{
|
||||
if (ally.HP <= 0) continue;
|
||||
if (ally.Effects.Any(e => e is 共鸣标记 m && m.Skill == Skill)) continue;
|
||||
new 共鸣标记(Skill, wearer, this).AddToCharacter(ally);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>撤回所有由本装备挂出的【共鸣标记】</summary>
|
||||
private void 撤回标记()
|
||||
{
|
||||
Character? wearer = 穿戴者;
|
||||
if (GamingQueue is null || wearer is null) return;
|
||||
List<Character> all = [.. GamingQueue.AllCharacters.Union(GamingQueue.Queue)];
|
||||
foreach (Character character in all)
|
||||
{
|
||||
List<共鸣标记> markers = [.. character.Effects.OfType<共鸣标记>().Where(m => m.Skill == Skill)];
|
||||
foreach (共鸣标记 marker in markers)
|
||||
{
|
||||
marker.RemoveFromCharacter(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>由【共鸣标记】转发:队友造成伤害后为穿戴者充能</summary>
|
||||
public bool TryGainEnergy(Character ally)
|
||||
{
|
||||
Character? wearer = 穿戴者;
|
||||
if (GamingQueue is null || wearer is null) return false;
|
||||
if (wearer.HP <= 0) return false;
|
||||
if (_剩余冷却 > 0) return false;
|
||||
_剩余冷却 = 冷却时间;
|
||||
wearer.EP += 每次回能;
|
||||
WriteLine($"[ {wearer} ] 的共鸣核心因 [ {ally} ] 的出手而充能,回复了 {每次回能:0.##} 点能量!(当前 {wearer.EP:0.##})");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
/// <summary>
|
||||
/// 装备 · 饰品【应急装置】—— 主动型团队应急模块
|
||||
/// <para/>设计意图:此前的辅助装备都是「被动监听」,本条补上「主动按钮」这一形态:
|
||||
/// 把它挂在身上,就多了一个「全队混合护盾 + 弱驱散」的应急按钮,代价是一次高额能量与较长冷却。
|
||||
/// <para/>实现:<c>Skills.Active = new 应急装置技能(character) { Level = f(QualityType) }</c>,
|
||||
/// 品质决定技能等级(Orange 4 / Red 5 / Gold 6)。战技等级上限即 6,故 Gold 档刚好拉满。
|
||||
/// <para/>效果由 <see cref="增加混合护盾值"/> 与 <see cref="弱驱散特效"/> 提供;
|
||||
/// 技能类型为 <c>SkillType.Skill</c>,由 <c>AddCharacterEquipSlotSkills</c> 纳入回合可选列表并消耗能量。
|
||||
/// <para/>⚠ 换装约定:主动技能不给他人挂监听器,因此换装无需清理状态;
|
||||
/// <see cref="Skill.CurrentCD"/> 属于技能自身,重新抽到即为满冷却状态。
|
||||
/// </summary>
|
||||
public abstract class 应急装置 : Item
|
||||
{
|
||||
protected 应急装置(Character? character, int 技能等级) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Active = new 应急装置技能(character, this)
|
||||
{
|
||||
Level = 技能等级
|
||||
};
|
||||
}
|
||||
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
|
||||
public override string BackgroundStory => "巴掌大的金属匣,侧面的拉环上结着一层薄霜。匣子从不主动说话——它只在有人快要倒下时,嗡的一声展开。";
|
||||
}
|
||||
|
||||
public class 应急装置1 : 应急装置
|
||||
{
|
||||
public override long Id => (long)AccessoryID.应急装置1;
|
||||
public override string Name => "应急装置 Lv.4";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
|
||||
public 应急装置1(Character? character = null) : base(character, 4) { }
|
||||
}
|
||||
|
||||
public class 应急装置2 : 应急装置
|
||||
{
|
||||
public override long Id => (long)AccessoryID.应急装置2;
|
||||
public override string Name => "应急装置 Lv.5";
|
||||
public override QualityType QualityType => QualityType.Red;
|
||||
|
||||
public 应急装置2(Character? character = null) : base(character, 5) { }
|
||||
}
|
||||
|
||||
public class 应急装置3 : 应急装置
|
||||
{
|
||||
public override long Id => (long)AccessoryID.应急装置3;
|
||||
public override string Name => "应急装置 Lv.6";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 应急装置3(Character? character = null) : base(character, 6) { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 【应急装置】的主动技能:为全队(含自己)提供混合护盾并弱驱散。
|
||||
/// <para/>· 消耗能量、较长冷却,是一次「全队级」的救场
|
||||
/// <para/>· 护盾量随等级提升、冷却也随等级变长,等级由装备品质决定
|
||||
/// </summary>
|
||||
public class 应急装置技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemActiveID.应急装置;
|
||||
public override string Name => "应急装置";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override double EPCost => Level > 0 ? 能量消耗基础 + 能量消耗等级成长 * (Level - 1) : 能量消耗基础;
|
||||
|
||||
/// <summary>冷却随等级提升:Orange(Lv.4) 72 → Red(Lv.5) 76 → Gold(Lv.6) 80 秒</summary>
|
||||
public override double CD => Level > 0 ? 冷却基础 + 冷却等级成长 * (Level - 1) : 冷却基础;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool SelectAllTeammates => true;
|
||||
|
||||
private const double 能量消耗基础 = 70;
|
||||
private const double 能量消耗等级成长 = 4;
|
||||
private const double 冷却基础 = 60;
|
||||
private const double 冷却等级成长 = 4;
|
||||
private const double 护盾基础 = 80;
|
||||
private const double 护盾等级成长 = 80;
|
||||
|
||||
public 应急装置技能(Character? character = null, Item? item = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
Item = item;
|
||||
Effects.Add(new 增加混合护盾值(this, 护盾基础, 护盾等级成长));
|
||||
Effects.Add(new 弱驱散特效(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
/// <summary>
|
||||
/// 装备 · 饰品【接力信标】—— 持续压制团队硬直的「节奏器」
|
||||
/// <para/>设计意图:硬直决定出手频率,但模组里几乎没有「跨角色削减硬直」的辅助。
|
||||
/// 本装备把队友普攻 / 技能后的硬直整体下调,让团队出手衔接更紧凑(接力);
|
||||
/// 并把「被空投重新部署」这个节奏本身变成一次全队回能。
|
||||
/// <para/>实现:给每名队友挂【信标标记】,标记在硬直钩子里返回比率修正
|
||||
/// (不做任何属性增减,天然幂等)。
|
||||
/// <para/>数值:由技能等级决定(Orange 4 级 = −8% / 6,Red 7 级 = −11% / 12,Gold 10 级 = −14% / 18);
|
||||
/// 等级 < 4 时取兜底 −5% 与 1(正常用不到)。
|
||||
/// <para/>标尺(手册 §6.4 被动·增益 ≤36%):Gold 档硬直 −14% ✓
|
||||
/// <para/>⚠ 幂等约定:装备会被周期空投<b>随时替换</b>,因此
|
||||
/// <see cref="接力信标特效.OnEffectLost"/> 必须把挂在他人状态栏上的【信标标记】全部撤回,
|
||||
/// 否则光环会残留在队友身上。
|
||||
/// </summary>
|
||||
public abstract class 接力信标 : Item
|
||||
{
|
||||
protected 接力信标(Character? character, int 技能等级) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 接力信标技能(character, this) { Level = 技能等级 });
|
||||
}
|
||||
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
|
||||
public override string BackgroundStory => "一截被磨得发亮的信号杆,顶端绑着褪色的布条。它不发声,只是把每一个人的步点悄悄对齐。";
|
||||
}
|
||||
|
||||
public class 接力信标1 : 接力信标
|
||||
{
|
||||
public override long Id => (long)AccessoryID.接力信标1;
|
||||
public override string Name => "接力信标 -8%";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
|
||||
public 接力信标1(Character? character = null) : base(character, 4) { }
|
||||
}
|
||||
|
||||
public class 接力信标2 : 接力信标
|
||||
{
|
||||
public override long Id => (long)AccessoryID.接力信标2;
|
||||
public override string Name => "接力信标 -11%";
|
||||
public override QualityType QualityType => QualityType.Red;
|
||||
|
||||
public 接力信标2(Character? character = null) : base(character, 7) { }
|
||||
}
|
||||
|
||||
public class 接力信标3 : 接力信标
|
||||
{
|
||||
public override long Id => (long)AccessoryID.接力信标3;
|
||||
public override string Name => "接力信标 -14%";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 接力信标3(Character? character = null) : base(character, 10) { }
|
||||
}
|
||||
|
||||
public class 接力信标技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.接力信标;
|
||||
public override string Name => "接力信标";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 接力信标技能(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 4; // 最低档兜底;三档装备分别写入 4 / 7 / 10
|
||||
Item = item;
|
||||
Effects.Add(new 接力信标特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 【接力信标】的控制器:常驻在穿戴者身上,负责维护队友身上的【信标标记】,
|
||||
/// 并在「部署」时(装备 / 被空投换上)为全队结算一次回能。
|
||||
/// </summary>
|
||||
public class 接力信标特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description =>
|
||||
$"装备期间,队友的普攻与技能硬直减少 {硬直减免 * 100:0.##}%;" +
|
||||
$"每次被重新部署(装备)时,全体队友回复 {部署回能:0.##} 点能量。";
|
||||
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
|
||||
private bool _已部署 = false;
|
||||
|
||||
/// <summary>
|
||||
/// 硬直减免:等级 < 4 时取兜底 5%(正常用不到);
|
||||
/// 否则 Orange 4 级 = 8%,Red 7 级 = 11%,Gold 10 级 = 14%
|
||||
/// </summary>
|
||||
private double 硬直减免 => Level < 4 ? 0.05 : (Level + 4) * 0.01;
|
||||
|
||||
/// <summary>
|
||||
/// 部署回能(对每名队友):等级 < 4 时取兜底 1(正常用不到);
|
||||
/// 否则 Orange 4 级 = 6,Red 7 级 = 12,Gold 10 级 = 18
|
||||
/// </summary>
|
||||
private double 部署回能 => Level < 4 ? 1 : 2 * (Level - 1);
|
||||
|
||||
public 接力信标特效(Skill skill) : base(skill)
|
||||
{
|
||||
}
|
||||
|
||||
private Character? 穿戴者 => Skill.Character;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
// 装备 = 部署:挂光环 + 全队回能(队伍未就绪时交给 OnGameStart / OnTimeElapsed 重试)
|
||||
发送标记();
|
||||
部署();
|
||||
}
|
||||
|
||||
public override void OnGameStart(HookContext ctx)
|
||||
{
|
||||
发送标记();
|
||||
部署();
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (穿戴者 is null || 穿戴者 != character) return;
|
||||
// 兜底:新入场 / 复活的队友补挂标记;部署若因队伍未就绪而错过,这里补结算
|
||||
发送标记();
|
||||
部署();
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
// 卸装 / 换装:撤回光环标记,保证幂等;同时允许重新装备时再次"部署"
|
||||
撤回标记();
|
||||
_已部署 = false;
|
||||
}
|
||||
|
||||
/// <summary>为每名存活队友补挂【信标标记】(按本控制器的技能实例去重)</summary>
|
||||
private void 发送标记()
|
||||
{
|
||||
Character? wearer = 穿戴者;
|
||||
if (GamingQueue is null || wearer is null) return;
|
||||
foreach (Character ally in GamingQueue.GetTeammates(wearer))
|
||||
{
|
||||
if (ally.HP <= 0) continue;
|
||||
if (ally.Effects.Any(e => e is 信标标记 m && m.Skill == Skill)) continue;
|
||||
new 信标标记(Skill, wearer, 硬直减免).AddToCharacter(ally);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>撤回所有由本装备挂出的【信标标记】</summary>
|
||||
private void 撤回标记()
|
||||
{
|
||||
Character? wearer = 穿戴者;
|
||||
if (GamingQueue is null || wearer is null) return;
|
||||
List<Character> all = [.. GamingQueue.AllCharacters.Union(GamingQueue.Queue)];
|
||||
foreach (Character character in all)
|
||||
{
|
||||
List<信标标记> markers = [.. character.Effects.OfType<信标标记>().Where(m => m.Skill == Skill)];
|
||||
foreach (信标标记 marker in markers)
|
||||
{
|
||||
marker.RemoveFromCharacter(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>部署结算:为全队回复能量,每个装备实例只结算一次</summary>
|
||||
private void 部署()
|
||||
{
|
||||
if (_已部署) return;
|
||||
Character? wearer = 穿戴者;
|
||||
if (GamingQueue is null || wearer is null) return;
|
||||
List<Character> allies = [.. GamingQueue.GetTeammates(wearer).Where(c => c.HP > 0)];
|
||||
if (allies.Count == 0) return; // 队伍未就绪:留给后续钩子重试
|
||||
_已部署 = true;
|
||||
foreach (Character ally in allies)
|
||||
{
|
||||
ally.EP += 部署回能;
|
||||
}
|
||||
WriteLine($"[ {wearer} ] 部署了接力信标,全体队友回复了 {部署回能:0.##} 点能量!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 攻击之爪10 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪10;
|
||||
public override string Name => "攻击之爪 +10";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "里面藏着的小尖刃不容小觑。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
|
||||
public 攻击之爪10(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 10));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪25 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪25;
|
||||
public override string Name => "攻击之爪 +25";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "里面藏着的小尖刃不容小觑。";
|
||||
public override QualityType QualityType => QualityType.Green;
|
||||
|
||||
public 攻击之爪25(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 25));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪40 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪40;
|
||||
public override string Name => "攻击之爪 +40";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "里面藏着的小尖刃不容小觑。";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
|
||||
public 攻击之爪40(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 40));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪55 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪55;
|
||||
public override string Name => "攻击之爪 +55";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "里面藏着的小尖刃不容小觑。";
|
||||
public override QualityType QualityType => QualityType.Purple;
|
||||
|
||||
public 攻击之爪55(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 55));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪70 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪70;
|
||||
public override string Name => "攻击之爪 +70";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "里面藏着的小尖刃不容小觑。";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
|
||||
public 攻击之爪70(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 70));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪85 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪85;
|
||||
public override string Name => "攻击之爪 +85";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "里面藏着的小尖刃不容小觑。";
|
||||
public override QualityType QualityType => QualityType.Red;
|
||||
|
||||
public 攻击之爪85(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 85));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪100 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.攻击之爪100;
|
||||
public override string Name => "攻击之爪 +100";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "里面藏着的小尖刃不容小觑。";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 攻击之爪100(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 攻击之爪技能(character, this, 100));
|
||||
}
|
||||
}
|
||||
|
||||
public class 攻击之爪技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.攻击之爪;
|
||||
public override string Name => "攻击之爪";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 攻击之爪技能(Character? character = null, Item? item = null, double exATK = 0) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Dictionary<string, object> values = new()
|
||||
{
|
||||
{ "exatk", exATK }
|
||||
};
|
||||
Effects.Add(new ExATK(this, values));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 糖糖一周年纪念饰品1 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.糖糖一周年纪念饰品1;
|
||||
public override string Name => "回忆糖纸";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "在魔法视觉下,可见其由无数层半透明糖纸压缩而成,每层糖纸都印着微缩画面。";
|
||||
public override string Category => "糖糖一周年限定纪念物品";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 糖糖一周年纪念饰品1(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Price = 0;
|
||||
IsSellable = false;
|
||||
IsTradable = false;
|
||||
IsLock = true;
|
||||
Skills.Passives.Add(new 糖糖一周年纪念饰品技能1(character, this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 糖糖一周年纪念饰品技能1 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.糖糖一周年纪念饰品1;
|
||||
public override string Name => "回忆糖纸";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
|
||||
public 糖糖一周年纪念饰品技能1(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Dictionary<string, object> values = new()
|
||||
{
|
||||
{ "exls", 0.25 },
|
||||
{ "shtr", 0.25 }
|
||||
};
|
||||
Effects.Add(new ExLifesteal(this, values, character));
|
||||
Effects.Add(new SkillHardTimeReduce2(this, values, character));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 糖糖一周年纪念饰品2 : Item
|
||||
{
|
||||
public override long Id => (long)AccessoryID.糖糖一周年纪念饰品2;
|
||||
public override string Name => "蜂糖蜜酿";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "一对以秘银细链连接,随着光线折射散发极微弱糖霜光泽的耳坠。左耳为蜂糖,右耳为蜜酿。";
|
||||
public override string Category => "糖糖一周年限定纪念物品";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 糖糖一周年纪念饰品2(Character? character = null) : base(ItemType.Accessory)
|
||||
{
|
||||
Price = 0;
|
||||
IsSellable = false;
|
||||
IsTradable = false;
|
||||
IsLock = true;
|
||||
Skills.Passives.Add(new 糖糖一周年纪念饰品技能2(character, this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 糖糖一周年纪念饰品技能2 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.糖糖一周年纪念饰品2;
|
||||
public override string Name => "蜂糖蜜酿";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
|
||||
public 糖糖一周年纪念饰品技能2(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Dictionary<string, object> values = new()
|
||||
{
|
||||
{ "exhp", 1550 },
|
||||
{ "exmp", 800 }
|
||||
};
|
||||
Effects.Add(new ExMaxHP(this, values, character));
|
||||
Effects.Add(new ExMaxMP(this, values, character));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
/// <summary>
|
||||
/// 装备 · 饰品【节拍器】—— 击杀回响,把「战果」转成「节奏」
|
||||
/// <para/>设计意图:决策点的常规来源是每回合恢复,本装备把它接到**击杀**上——
|
||||
/// 击杀是低频、高价值事件,天然自带限流,不会退化成常驻增益(对比"每回合 +N"那类)。
|
||||
/// <para/>触发:<see cref="Effect.AfterDeathCalculation"/>(全队列广播)中,自己为击杀者
|
||||
/// ⇒ 记入待兑现;到**下一个自身回合开始**时一次性发放(避免在他人的回合里改动自己的决策点)。
|
||||
/// <para/>效果:+N 决策点(Orange Lv4 = 2 / Red Lv7 = 2 / Gold Lv10 = 3),**带累积上限**防止连续击杀溢出。
|
||||
/// <para/>⚠ 召唤物 / 随从的死亡不计(`DeathContext.HasMaster`)。
|
||||
/// </summary>
|
||||
public abstract class 节拍器 : Item
|
||||
{
|
||||
protected 节拍器(Character? character, int 技能等级) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 节拍器技能(character, this) { Level = 技能等级 });
|
||||
}
|
||||
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
public override string BackgroundStory => "摆在腰侧的小小节拍器,指针只随倒下的人跳动一次。";
|
||||
}
|
||||
|
||||
public class 节拍器1 : 节拍器
|
||||
{
|
||||
public override long Id => (long)AccessoryID.节拍器1;
|
||||
public override string Name => "节拍器 Lv.4";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
public 节拍器1(Character? character = null) : base(character, 4) { }
|
||||
}
|
||||
|
||||
public class 节拍器2 : 节拍器
|
||||
{
|
||||
public override long Id => (long)AccessoryID.节拍器2;
|
||||
public override string Name => "节拍器 Lv.7";
|
||||
public override QualityType QualityType => QualityType.Red;
|
||||
public 节拍器2(Character? character = null) : base(character, 7) { }
|
||||
}
|
||||
|
||||
public class 节拍器3 : 节拍器
|
||||
{
|
||||
public override long Id => (long)AccessoryID.节拍器3;
|
||||
public override string Name => "节拍器 Lv.10";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
public 节拍器3(Character? character = null) : base(character, 10) { }
|
||||
}
|
||||
|
||||
public class 节拍器技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.节拍器;
|
||||
public override string Name => "节拍器";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 节拍器技能(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 4; // 最低档兜底;三档装备分别写入 4 / 7 / 10
|
||||
Item = item;
|
||||
Effects.Add(new 节拍器特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 节拍器特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description =>
|
||||
$"每次击杀为其积累 {单次补充} 点决策点,在下一个自身回合开始时发放(最多累积 {累积上限} 点)。";
|
||||
|
||||
/// <summary>待兑现的决策点(击杀时累积,自身回合开始时发放)</summary>
|
||||
private int _待兑现 = 0;
|
||||
|
||||
/// <summary>单次击杀补充量(Lv4–7 = 2 / Lv10 = 3)</summary>
|
||||
private int 单次补充 => 1 + Skill.Level / 4;
|
||||
|
||||
/// <summary>累积上限:防止连续击杀一次性灌入过多决策点</summary>
|
||||
private int 累积上限 => 单次补充 * 2;
|
||||
|
||||
public override void AfterDeathCalculation(DeathContext ctx)
|
||||
{
|
||||
if (Skill.Character is null) return;
|
||||
if (ctx.Killer != Skill.Character) return;
|
||||
if (ctx.Trigger == Skill.Character) return;
|
||||
if (ctx.HasMaster) return; // 召唤物 / 随从的死亡不计
|
||||
_待兑现 = Math.Min(_待兑现 + 单次补充, 累积上限);
|
||||
WriteLine($"[ {Skill.Character} ] 的节拍器记下了战果,将在下个自身回合兑现 {_待兑现} 点决策点。");
|
||||
}
|
||||
|
||||
public override void OnTurnStart(TurnContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (Skill.Character is null || Skill.Character != character) return;
|
||||
if (_待兑现 <= 0) return;
|
||||
if (GamingQueue is null) return;
|
||||
if (!GamingQueue.CharacterDecisionPoints.TryGetValue(character, out DecisionPoints? dp) || dp is null) return;
|
||||
int before = dp.CurrentDecisionPoints;
|
||||
dp.CurrentDecisionPoints = Math.Min(before + _待兑现, dp.MaxDecisionPoints);
|
||||
int actual = dp.CurrentDecisionPoints - before;
|
||||
WriteLine($"[ {character} ] 的节拍器兑现了战果:获得 {actual} 点决策点({before} → {dp.CurrentDecisionPoints} / {dp.MaxDecisionPoints})。");
|
||||
_待兑现 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
/// <summary>
|
||||
/// 装备 · 饰品【行军医箱】—— 可携带的团队急救模块
|
||||
/// <para/>设计意图:模组中角色的被动 / 爆发技几乎都为自身服务,缺少「跨角色监听」的辅助。
|
||||
/// 本装备把「监听队友受击 → 消耗自身能量急救」做成与穿戴者身份<b>解耦</b>的模块:
|
||||
/// 任意角色穿上它都会临时成为队伍的治疗点,因此它可以随空投在不同角色之间流转。
|
||||
/// <para/>触发:穿戴者为每名队友挂【巡诊标记】,标记以宿主身份收到
|
||||
/// <see cref="Effect.AfterDamageCalculation"/> 后转发给穿戴者;穿戴者消耗能量为其回血。
|
||||
/// <para/>标尺(手册 §6.4 被动·回复 ≤2–3%/秒):Gold 档 10% 最大生命值 / 10 秒 ⇒ 约 1%/秒 ✓
|
||||
/// <para/>⚠ 幂等约定:装备会被周期空投<b>随时替换</b>,因此
|
||||
/// <see cref="行军医箱特效.OnEffectLost"/> 必须把挂在他人状态栏上的【巡诊标记】全部撤回,
|
||||
/// 否则会残留成「幽灵治疗」。
|
||||
/// <para/>⚠ 主动权约定:是否救援由<b>装备持有者</b>通过询问(<see cref="Effect.Inquiry"/>)决定。
|
||||
/// 询问的 <c>DefaultChoice</c> 用条件表达式计算——只有当持有者处于预释放爆发技状态、
|
||||
/// 且这次扣能量会让预释放付不起能量时,才默认「否」(门槛取「角色所有爆发技的最高门槛」作保守上界,
|
||||
/// 见 <see cref="行军医箱特效.够付预释放门槛"/>);其余情况默认「是」。
|
||||
/// 「否」会作为 AI 托管 / 无人应答时的行为,也会成为玩家弹窗的默认高亮项。玩家拒绝<b>不消耗冷却</b>。
|
||||
/// </summary>
|
||||
public abstract class 行军医箱 : Item
|
||||
{
|
||||
protected 行军医箱(Character? character, int 技能等级) : base(ItemType.Accessory)
|
||||
{
|
||||
Skills.Passives.Add(new 行军医箱技能(character, this) { Level = 技能等级 });
|
||||
}
|
||||
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
|
||||
public override string BackgroundStory => "随军多年的旧式医疗箱,扣锁处还缠着一圈早已褪色的绷带。打开时会有温热的光晕沿着箱内的试剂管缓缓流转——只要队伍里还有人站着,它就不算用完。";
|
||||
}
|
||||
|
||||
public class 行军医箱1 : 行军医箱
|
||||
{
|
||||
public override long Id => (long)AccessoryID.行军医箱1;
|
||||
public override string Name => "行军医箱 +4%";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
|
||||
public 行军医箱1(Character? character = null) : base(character, 4) { }
|
||||
}
|
||||
|
||||
public class 行军医箱2 : 行军医箱
|
||||
{
|
||||
public override long Id => (long)AccessoryID.行军医箱2;
|
||||
public override string Name => "行军医箱 +7%";
|
||||
public override QualityType QualityType => QualityType.Red;
|
||||
|
||||
public 行军医箱2(Character? character = null) : base(character, 7) { }
|
||||
}
|
||||
|
||||
public class 行军医箱3 : 行军医箱
|
||||
{
|
||||
public override long Id => (long)AccessoryID.行军医箱3;
|
||||
public override string Name => "行军医箱 +10%";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 行军医箱3(Character? character = null) : base(character, 10) { }
|
||||
}
|
||||
|
||||
public class 行军医箱技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.行军医箱;
|
||||
public override string Name => "行军医箱";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 行军医箱技能(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 4; // 最低档兜底;三档装备分别写入 4 / 7 / 10
|
||||
Item = item;
|
||||
Effects.Add(new 行军医箱特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 【行军医箱】的控制器:常驻在穿戴者身上,负责维护队友身上的【巡诊标记】并执行急救。
|
||||
/// <para/>冷却 / 能量状态集中在这里,因此多名队友同时受击时只有一次响应(救援成功后共享冷却)。
|
||||
/// <para/>是否救援由穿戴者本人通过询问决定;拒绝不消耗冷却。
|
||||
/// </summary>
|
||||
public class 行军医箱特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description =>
|
||||
$"当生命值低于 {触发阈值 * 100:0}% 的队友受到伤害时,可由你决定是否消耗自身 {EP消耗:0.##} 点能量," +
|
||||
$"为其回复 {回复系数 * 100:0.##}% 最大生命值(成功救援后 {冷却时间:0.##} {GameplayEquilibriumConstant.InGameTime}内不再响应)。";
|
||||
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
|
||||
private double _剩余冷却 = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 回复系数:等级 < 4 时取兜底 1%(低于最低档,正常用不到);否则等于技能等级
|
||||
/// (Orange 4 级 = 4%,Red 7 级 = 7%,Gold 10 级 = 10%)
|
||||
/// </summary>
|
||||
private double 回复系数 => Level < 4 ? 0.01 : Level * 0.01;
|
||||
|
||||
/// <summary>目标生命值低于该比例才响应</summary>
|
||||
private const double 触发阈值 = 0.5;
|
||||
|
||||
/// <summary>响应冷却(穿戴者共享,避免多名队友同时触发)</summary>
|
||||
private const double 冷却时间 = 10;
|
||||
|
||||
/// <summary>每次响应消耗的能量,作为「急救要付出代价」的取舍点</summary>
|
||||
private const double EP消耗 = 20;
|
||||
|
||||
public 行军医箱特效(Skill skill) : base(skill)
|
||||
{
|
||||
}
|
||||
|
||||
private Character? 穿戴者 => Skill.Character;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
_剩余冷却 = 0;
|
||||
// 开局前队列可能尚未就绪,真正的挂载交给 OnGameStart / OnTimeElapsed 兜底
|
||||
发送标记();
|
||||
}
|
||||
|
||||
public override void OnGameStart(HookContext ctx)
|
||||
{
|
||||
发送标记();
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (穿戴者 is null || 穿戴者 != character) return;
|
||||
if (_剩余冷却 > 0) _剩余冷却 = Math.Max(0, _剩余冷却 - ctx.Elapsed);
|
||||
// 兜底:新入场 / 复活的队友补挂标记(内部去重)
|
||||
发送标记();
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
// 卸装 / 换装:必须把挂在他人状态栏上的标记全部撤回,保证幂等
|
||||
撤回标记();
|
||||
}
|
||||
|
||||
/// <summary>为每名存活队友补挂【巡诊标记】(按本控制器的技能实例去重)</summary>
|
||||
private void 发送标记()
|
||||
{
|
||||
Character? wearer = 穿戴者;
|
||||
if (GamingQueue is null || wearer is null) return;
|
||||
foreach (Character ally in GamingQueue.GetTeammates(wearer))
|
||||
{
|
||||
if (ally.HP <= 0) continue;
|
||||
if (ally.Effects.Any(e => e is 巡诊标记 m && m.Skill == Skill)) continue;
|
||||
new 巡诊标记(Skill, wearer, this).AddToCharacter(ally);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>撤回所有由本装备挂出的【巡诊标记】</summary>
|
||||
private void 撤回标记()
|
||||
{
|
||||
Character? wearer = 穿戴者;
|
||||
if (GamingQueue is null || wearer is null) return;
|
||||
List<Character> all = [.. GamingQueue.AllCharacters.Union(GamingQueue.Queue)];
|
||||
foreach (Character character in all)
|
||||
{
|
||||
List<巡诊标记> markers = [.. character.Effects.OfType<巡诊标记>().Where(m => m.Skill == Skill)];
|
||||
foreach (巡诊标记 marker in markers)
|
||||
{
|
||||
marker.RemoveFromCharacter(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 由【巡诊标记】转发:队友受击且跌破阈值时,向穿戴者发起询问,由其决定是否消耗能量急救。
|
||||
/// <para/>询问的 <c>DefaultChoice</c> 用条件表达式计算——穿戴者处于预释放爆发技状态时为「否」,
|
||||
/// 否则为「是」;它同时决定 AI 托管 / 无人应答时的实际行为,也是玩家弹窗的默认高亮项。
|
||||
/// <para/>玩家拒绝<b>不消耗冷却</b>。
|
||||
/// </summary>
|
||||
public bool TryEmergencyHeal(Character host)
|
||||
{
|
||||
Character? wearer = 穿戴者;
|
||||
if (GamingQueue is null || wearer is null) return false;
|
||||
if (wearer.HP <= 0 || host.HP <= 0) return false;
|
||||
if (_剩余冷却 > 0) return false;
|
||||
if (host.HP / Math.Max(1, host.MaxHP) >= 触发阈值) return false;
|
||||
if (wearer.EP < EP消耗) return false;
|
||||
double heal = host.MaxHP * 回复系数;
|
||||
if (heal <= 0) return false;
|
||||
|
||||
// 预释放期间:只有当这次扣能量真的会让预释放的爆发技付不起能量时,才默认保守(玩家仍可强行救援)
|
||||
bool 危及预释放 = wearer.CharacterState == CharacterState.PreCastSuperSkill && !够付预释放门槛(wearer, EP消耗);
|
||||
|
||||
InquiryResponse response = Inquiry(wearer, new InquiryOptions(InquiryType.BinaryChoice, nameof(行军医箱))
|
||||
{
|
||||
Description = $"队友 [ {host} ] 生命值告急,是否消耗 {EP消耗:0.##} 点能量为其回复 {heal:0.##} 点生命值?"
|
||||
+ (危及预释放 ? "(警告:你正处于预释放爆发技状态,扣减能量将使该爆发技因能量不足而无法释放)" : ""),
|
||||
DefaultChoice = 危及预释放 ? "否" : "是",
|
||||
CanCancel = false
|
||||
});
|
||||
|
||||
// 拒绝不消耗冷却,玩家可以连续拒绝而不被惩罚
|
||||
if (response.Choices.Count == 0 || response.Choices[0] != "是") return false;
|
||||
|
||||
_剩余冷却 = 冷却时间;
|
||||
wearer.EP -= EP消耗;
|
||||
WriteLine($"[ {wearer} ] 展开了行军医箱,消耗 {EP消耗:0.##} 点能量,为 [ {host} ] 回复 {heal:0.##} 点生命值!");
|
||||
HealToTarget(wearer, host, heal);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扣除 <paramref name="消耗"/> 点能量后,是否仍付得起该角色任一爆发技的预释放门槛。
|
||||
/// <para/>Core 未公开预释放字典(<c>_castingSuperSkills</c>),因此这里对「角色所有爆发技」取最高门槛作为<b>保守上界</b>:
|
||||
/// 只要上界付得起,无论预释放的是哪一个都不会失败。
|
||||
/// <para/>· 普通爆发技:门槛 = <see cref="Skill.RealEPCost"/>(即固定的 <see cref="Skill.EPCost"/>)
|
||||
/// <para/>· <see cref="Skill.CostAllEP"/> 型:真实门槛是 <see cref="Skill.MinCostEP"/>。
|
||||
/// 它的 <c>RealEPCost</c> 是 <c>max(MinCostEP, 当前EP)</c>,跟着当前 EP 走,直接取会显著过估
|
||||
/// (例如 EP 150 时上界被算成 150,于是永远拒绝救援)。
|
||||
/// </summary>
|
||||
private static bool 够付预释放门槛(Character wearer, double 消耗)
|
||||
{
|
||||
double 门槛 = wearer.Skills
|
||||
.Where(s => s.SkillType == SkillType.SuperSkill)
|
||||
.Select(s => s.CostAllEP ? s.MinCostEP : s.RealEPCost)
|
||||
.DefaultIfEmpty(0)
|
||||
.Max();
|
||||
return wearer.EP - 消耗 >= 门槛;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 糖糖一周年纪念防具 : Item
|
||||
{
|
||||
public override long Id => (long)ArmorID.糖糖一周年纪念防具;
|
||||
public override string Name => "糖之誓约";
|
||||
public override string Description => $"{Skills.Passives.FirstOrDefault()?.Description}{(Skills.Active != null ? $"{Skills.Active.Name}:{Skills.Active.Description}" : "")}";
|
||||
public override string BackgroundStory => "及膝的米白色复古风衣,在光线下会泛起珍珠母贝般柔和的七彩光泽,如同撒上了一层极细的糖霜。";
|
||||
public override string Category => "糖糖一周年限定纪念物品";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 糖糖一周年纪念防具(Character? character = null) : base(ItemType.Armor)
|
||||
{
|
||||
Price = 0;
|
||||
IsSellable = false;
|
||||
IsTradable = false;
|
||||
IsLock = true;
|
||||
Skills.Active = new 神圣祝福复(character)
|
||||
{
|
||||
Level = 6
|
||||
};
|
||||
Skills.Passives.Add(new 糖糖一周年纪念防具技能(character, this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 糖糖一周年纪念防具技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.糖糖一周年纪念防具;
|
||||
public override string Name => "糖之誓约";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
|
||||
private readonly double 物理护甲加成 = 180;
|
||||
|
||||
public 糖糖一周年纪念防具技能(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Dictionary<string, object> values = new()
|
||||
{
|
||||
{ "exdef", 物理护甲加成 }
|
||||
};
|
||||
Effects.Add(new ExDEF(this, values, character));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,349 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 青松() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.青松;
|
||||
public override string Name => nameof(青松);
|
||||
public override string Description => "青松即使在风雪中也保持着生命的坚韧,象征着永不放弃的精神。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 流星石() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.流星石;
|
||||
public override string Name => nameof(流星石);
|
||||
public override string Description => "据说,捕捉到流星的人,能实现一个愿望。不妨许下心愿,心诚则灵。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 向日葵() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.向日葵;
|
||||
public override string Name => nameof(向日葵);
|
||||
public override string Description => "向日葵永远追随太阳,就像你的好运追随着你的每一步。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 金铃花() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.金铃花;
|
||||
public override string Name => nameof(金铃花);
|
||||
public override string Description => "金铃花象征着辉煌与幸运,提醒你要抓住每一个闪光的时刻。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 琉璃珠() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.琉璃珠;
|
||||
public override string Name => nameof(琉璃珠);
|
||||
public override string Description => "琉璃珠晶莹剔透,代表着纯净与希望,预示着你的好运将如彩虹般绚丽。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 鸣草() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.鸣草;
|
||||
public override string Name => nameof(鸣草);
|
||||
public override string Description => "向往着雷神大人的青睐,只在稻妻列岛上生长。摘下鸣草时酥酥麻麻的触感,据说和幸福的滋味很像。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 马尾() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.马尾;
|
||||
public override string Name => nameof(马尾);
|
||||
public override string Description => "马尾随大片荻草生长,但却更为挺拔。与傲然挺立于此世的你一定很是相配。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 鬼兜虫() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.鬼兜虫;
|
||||
public override string Name => nameof(鬼兜虫);
|
||||
public override string Description => "鬼兜虫是爱好和平、不愿意争斗的小生物。这份追求平和的心一定能为你带来幸福吧。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 烈焰花花蕊() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.烈焰花花蕊;
|
||||
public override string Name => nameof(烈焰花花蕊);
|
||||
public override string Description => "烈焰花的炙热来自于火辣辣的花心。万事顺利是因为心中自有一条明路。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 堇瓜() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.堇瓜;
|
||||
public override string Name => nameof(堇瓜);
|
||||
public override string Description => "人们常说表里如一是美德,但堇瓜明艳的外貌下隐藏着的是谦卑而甘甜的内在。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 水晶球() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.水晶球;
|
||||
public override string Name => nameof(水晶球);
|
||||
public override string Description => "水晶象征着纯净与洞察力,帮助你看清未来的路。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 薰衣草() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.薰衣草;
|
||||
public override string Name => nameof(薰衣草);
|
||||
public override string Description => "薰衣草的香气能安抚心灵,象征着宁静与放松,提醒你要在忙碌中找到内心的平和。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 青石() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.青石;
|
||||
public override string Name => nameof(青石);
|
||||
public override string Description => "青石虽不起眼,却象征着坚韧与持久,寓意着你脚踏实地的每一步都会累积成未来的成功。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 莲花() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.莲花;
|
||||
public override string Name => nameof(莲花);
|
||||
public override string Description => "莲花在泥中绽放,象征着净化与重生,愿你心中平和坚定。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 陶罐() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.陶罐;
|
||||
public override string Name => nameof(陶罐);
|
||||
public override string Description => "陶罐虽不起眼,却有着悠久的历史和稳定的实用性,寓意安稳平和。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 海灵芝() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.海灵芝;
|
||||
public override string Name => nameof(海灵芝);
|
||||
public override string Description => "弱小的海灵芝虫经历多年的风风雨雨,才能结成海灵芝。为目标而努力前行的人们,最终也必将拥有胜利的果实。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 四叶草() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.四叶草;
|
||||
public override string Name => nameof(四叶草);
|
||||
public override string Description => "四叶草的每一片叶子都代表着好运、健康、爱情和财富。带上一片四叶草,收获一整天的幸运吧。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 露珠() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.露珠;
|
||||
public override string Name => nameof(露珠);
|
||||
public override string Description => "露珠是清晨的祝福,虽然短暂,但每一滴都晶莹剔透。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 茉莉花() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.茉莉花;
|
||||
public override string Name => nameof(茉莉花);
|
||||
public override string Description => "茉莉花的香气淡雅而持久,给人宁静与舒适的感觉。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 绿萝() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.绿萝;
|
||||
public override string Name => nameof(绿萝);
|
||||
public override string Description => "绿萝坚韧耐阴,象征着生命的顽强与希望,提醒你在平静中也能找到力量。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 檀木扇() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.檀木扇;
|
||||
public override string Name => nameof(檀木扇);
|
||||
public override string Description => "檀木扇散发着淡雅的香气,象征着沉稳与内敛,让你在宁静中感受力量。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 鸟蛋() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.鸟蛋;
|
||||
public override string Name => nameof(鸟蛋);
|
||||
public override string Description => "鸟蛋孕育着无限的可能性,是未来之种。反过来,这个世界对鸟蛋中的生命而言,也充满了令其兴奋的未知事物吧。要温柔对待鸟蛋喔。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 竹笋() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.竹笋;
|
||||
public override string Name => nameof(竹笋);
|
||||
public override string Description => "竹笋拥有着无限的潜力,没有人知道一颗竹笋,到底能长成多高的竹子。看着竹笋,会让人不由自主期待起未来吧。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 晶核() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.晶核;
|
||||
public override string Name => nameof(晶核);
|
||||
public override string Description => "晶蝶是凝聚天地间的元素,而长成的细小生物。而元素是这个世界许以天地当中的人们的祝福。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 手工围巾() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.手工围巾;
|
||||
public override string Name => nameof(手工围巾);
|
||||
public override string Description => "手工围巾的每一针每一线都饱含着爱意,提醒你要珍惜眼前的人。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 柳条篮() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.柳条篮;
|
||||
public override string Name => nameof(柳条篮);
|
||||
public override string Description => "柳条篮细密结实,寓意着人与人之间的深厚情感,提醒你珍惜生活中的点滴温情。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 风筝() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.风筝;
|
||||
public override string Name => nameof(风筝);
|
||||
public override string Description => "风筝在天空中自由翱翔,提醒你即使在平凡的日子里,也要心怀梦想,勇敢飞翔。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 羽毛() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.羽毛;
|
||||
public override string Name => nameof(羽毛);
|
||||
public override string Description => "羽毛虽轻,但象征着自由与轻盈,提醒你在轻松中前行。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 发光髓() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.发光髓;
|
||||
public override string Name => nameof(发光髓);
|
||||
public override string Description => "发光髓努力地发出微弱的光芒。虽然比不过其他光源,但看清前路也够用了。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 紫罗兰() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.紫罗兰;
|
||||
public override string Name => nameof(紫罗兰);
|
||||
public override string Description => "紫罗兰象征着谦逊和内在的力量,即使在逆境中也能默默绽放。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 松果() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.松果;
|
||||
public override string Name => nameof(松果);
|
||||
public override string Description => "并不是所有的松果都能长成高大的松树,成长需要适宜的环境,更需要一点运气。所以不用给自己过多压力,耐心等待彩虹吧。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 电气水晶() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.电气水晶;
|
||||
public override string Name => nameof(电气水晶);
|
||||
public override string Description => "电气水晶蕴含着无限的能量。如果能够好好导引这股能量,说不定就能成就什么事业。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 薄荷() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.薄荷;
|
||||
public override string Name => nameof(薄荷);
|
||||
public override string Description => "只要有草木生长的空间,就一定有薄荷。这么看来,薄荷是世界上最强韧的生灵。据说连蒙德的雪山上也长着薄荷呢。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 竹节() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.竹节;
|
||||
public override string Name => nameof(竹节);
|
||||
public override string Description => "竹节虽然看似脆弱,但却有着极强的韧性,提醒你在困难面前要保持坚毅的心态。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 铁砧() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.铁砧;
|
||||
public override string Name => nameof(铁砧);
|
||||
public override string Description => "铁砧坚固无比,象征着在困境中保持坚强的信念,提醒你在风雨中不动摇。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 冰雾花() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.冰雾花;
|
||||
public override string Name => nameof(冰雾花);
|
||||
public override string Description => "冰雾花散发着「生人勿进」的寒气。但有时冰冷的气质,也能让人的心情与头脑冷静下来。据此采取正确的判断,明智地行动。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 海草() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.海草;
|
||||
public override string Name => nameof(海草);
|
||||
public override string Description => "海草是相当温柔而坚强的植物,即使在苦涩的海水中,也不愿改变自己。即使在逆境中,也不要放弃温柔的心灵。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 磐石() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.磐石;
|
||||
public override string Name => nameof(磐石);
|
||||
public override string Description => "磐石虽沉重,但象征着稳定与耐心,今天你需要的正是这份定力。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 砂砾() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.砂砾;
|
||||
public override string Name => nameof(砂砾);
|
||||
public override string Description => "砂砾虽微小,却是坚固大地的一部分,提醒你在困难中也要保持坚韧。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 铁甲贝壳() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.铁甲贝壳;
|
||||
public override string Name => nameof(铁甲贝壳);
|
||||
public override string Description => "坚硬的外壳保护着脆弱的内心。有时适当的防护,能让你更加安全。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 蜥蜴尾巴() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.蜥蜴尾巴;
|
||||
public override string Name => nameof(蜥蜴尾巴);
|
||||
public override string Description => "蜥蜴遇到潜在的危险时,大多数会断尾求生。若是遇到无法整理的情绪,那么该断则断吧。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 古老钟摆() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.古老钟摆;
|
||||
public override string Name => nameof(古老钟摆);
|
||||
public override string Description => "尽管钟摆已停,但时间仍在前行。即使眼下步履维艰,也终会走出黑暗。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
|
||||
public class 枯藤() : Item(ItemType.Collectible)
|
||||
{
|
||||
public override long Id => (long)CollectibleID.枯藤;
|
||||
public override string Name => nameof(枯藤);
|
||||
public override string Description => "枯藤虽已失去生机,但春天的复苏指日可待,提醒你在低谷中也要坚守希望。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.ItemEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 回复药
|
||||
{
|
||||
public interface HPRecovery
|
||||
{
|
||||
public double HP { get; set; }
|
||||
}
|
||||
|
||||
public static void Init(Item item, double hp, int remainUseTimes = 1, bool isPercentage = false)
|
||||
{
|
||||
item.Skills.Active = new 回复药技能(item, hp, isPercentage);
|
||||
item.RemainUseTimes = remainUseTimes;
|
||||
item.IsReduceTimesAfterUse = true;
|
||||
item.IsRemoveAfterUse = true;
|
||||
}
|
||||
|
||||
public static string UseItem(User user, Item item, Character character)
|
||||
{
|
||||
if (item.Skills.Active != null)
|
||||
{
|
||||
item.Skills.Active.OnSkillCasted(user, [character]);
|
||||
string msg = $"对角色 [ {character} ] 使用 [ {item.Name} ] 成功!";
|
||||
if (item is HPRecovery hpBook)
|
||||
{
|
||||
msg += $"回复了 {hpBook.HP} 点生命值!";
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
return "此物品没有主动技能,无法被使用!";
|
||||
}
|
||||
|
||||
public static bool OnItemUsed(User user, Item item, int times, Dictionary<string, object> args)
|
||||
{
|
||||
string msg = "";
|
||||
bool result = false;
|
||||
Character[] targets = [];
|
||||
string key = args.Keys.FirstOrDefault(s => s.Equals("targets", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out object? value) && value is Character[] temp)
|
||||
{
|
||||
if (temp.Length > 0)
|
||||
{
|
||||
targets = [temp[0]];
|
||||
msg = UseItem(user, item, temp[0]);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = $"使用物品失败,没有作用目标!";
|
||||
}
|
||||
}
|
||||
args["msg"] = msg;
|
||||
if (result)
|
||||
{
|
||||
key = args.Keys.FirstOrDefault(s => s.Equals("useCount", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out value) && value is int count && targets.Length > 0)
|
||||
{
|
||||
string truemsg = $"对角色 [ {targets[0]} ] 使用 {count} 个 [ {item.Name} ] 成功!";
|
||||
if (item is HPRecovery expBook)
|
||||
{
|
||||
truemsg += $"回复了 {expBook.HP * count} 点生命值!";
|
||||
}
|
||||
args["truemsg"] = truemsg;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
args["truemsg"] = msg;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class 小回复药 : Item, 回复药.HPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.小回复药;
|
||||
public override string Name => "小回复药";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public double HP { get; set; } = 600;
|
||||
|
||||
public 小回复药(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
回复药.Init(this, HP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 回复药.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 中回复药 : Item, 回复药.HPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.中回复药;
|
||||
public override string Name => "中回复药";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Green;
|
||||
public double HP { get; set; } = 1800;
|
||||
|
||||
public 中回复药(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
回复药.Init(this, HP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 回复药.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 大回复药 : Item, 回复药.HPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.大回复药;
|
||||
public override string Name => "大回复药";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
public double HP { get; set; } = 3000;
|
||||
|
||||
public 大回复药(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
回复药.Init(this, HP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 回复药.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 全回复药 : Item, 回复药.HPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.全回复药;
|
||||
public override string Name => "全回复药";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Purple;
|
||||
public double HP { get; set; } = 1;
|
||||
|
||||
public 全回复药(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
回复药.Init(this, HP, remainUseTimes, true);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 回复药.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 回复药技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemActiveID.回复药;
|
||||
public override string Name => "回复药";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 回复药技能(Item? item = null, double hp = 0, bool isPercentage = false) : base(SkillType.Item)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP);
|
||||
if (!isPercentage)
|
||||
{
|
||||
Effects.Add(new RecoverHP(this, new()
|
||||
{
|
||||
{ "hp", hp }
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
Effects.Add(new RecoverHP2(this, new()
|
||||
{
|
||||
{ "hp", hp }
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.ItemEffects;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 复苏药
|
||||
{
|
||||
public interface HPRecovery
|
||||
{
|
||||
public double HP { get; set; }
|
||||
}
|
||||
|
||||
public static void Init(Item item, double hp, int remainUseTimes = 1, bool isPercentage = false)
|
||||
{
|
||||
item.Skills.Active = new 复苏药技能(item, hp, isPercentage);
|
||||
item.RemainUseTimes = remainUseTimes;
|
||||
item.IsReduceTimesAfterUse = true;
|
||||
item.IsRemoveAfterUse = true;
|
||||
}
|
||||
|
||||
public static string UseItem(User user, Item item, Character character)
|
||||
{
|
||||
if (item.Skills.Active != null)
|
||||
{
|
||||
item.Skills.Active.OnSkillCasted(user, [character]);
|
||||
string msg = $"对角色 [ {character} ] 使用 [ {item.Name} ] 成功!";
|
||||
if (item is HPRecovery hpBook)
|
||||
{
|
||||
msg += $"回复了 {hpBook.HP} 点生命值!";
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
return "此物品没有主动技能,无法被使用!";
|
||||
}
|
||||
|
||||
public static bool OnItemUsed(User user, Item item, int times, Dictionary<string, object> args)
|
||||
{
|
||||
string msg = "";
|
||||
bool result = false;
|
||||
Character[] targets = [];
|
||||
string key = args.Keys.FirstOrDefault(s => s.Equals("targets", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out object? value) && value is Character[] temp)
|
||||
{
|
||||
if (temp.Length > 0)
|
||||
{
|
||||
targets = [temp[0]];
|
||||
msg = UseItem(user, item, temp[0]);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = $"使用物品失败,没有作用目标!";
|
||||
}
|
||||
}
|
||||
args["msg"] = msg;
|
||||
if (result)
|
||||
{
|
||||
key = args.Keys.FirstOrDefault(s => s.Equals("useCount", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out value) && value is int count && targets.Length > 0)
|
||||
{
|
||||
string truemsg = $"对角色 [ {targets[0]} ] 使用 {count} 个 [ {item.Name} ] 成功!";
|
||||
if (item is HPRecovery expBook)
|
||||
{
|
||||
truemsg += $"回复了 {expBook.HP * count} 点生命值!";
|
||||
}
|
||||
args["truemsg"] = truemsg;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
args["truemsg"] = msg;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class 复苏药1 : Item, 复苏药.HPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.复苏药1;
|
||||
public override string Name => "复苏药";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Green;
|
||||
public double HP { get; set; } = 500;
|
||||
|
||||
public 复苏药1(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
复苏药.Init(this, HP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 复苏药.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 复苏药2 : Item, 复苏药.HPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.复苏药2;
|
||||
public override string Name => "复苏药·改";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
public double HP { get; set; } = 2500;
|
||||
|
||||
public 复苏药2(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
复苏药.Init(this, HP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 复苏药.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 复苏药3 : Item, 复苏药.HPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.复苏药3;
|
||||
public override string Name => "复苏药·全";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Purple;
|
||||
public double HP { get; set; } = 1;
|
||||
|
||||
public 复苏药3(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
复苏药.Init(this, HP, remainUseTimes, true);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 复苏药.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 复苏药技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemActiveID.复苏药;
|
||||
public override string Name => "复苏药";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override bool SelectAllTeammates => _canSelectAllTeammates;
|
||||
public override bool SelectAllEnemies => _canSelectAllEnemies;
|
||||
public override bool CanSelectSelf => _canSelectSelf;
|
||||
public override bool CanSelectTeammate => _canSelectTeammate;
|
||||
public override bool CanSelectEnemy => _canSelectEnemy;
|
||||
public override int CanSelectTargetCount => _canSelectCount;
|
||||
public override bool AllowSelectDead => true;
|
||||
|
||||
private readonly bool _canSelectAllTeammates;
|
||||
private readonly bool _canSelectAllEnemies;
|
||||
private readonly bool _canSelectSelf;
|
||||
private readonly bool _canSelectTeammate;
|
||||
private readonly bool _canSelectEnemy;
|
||||
private readonly int _canSelectCount;
|
||||
|
||||
public 复苏药技能(Item? item = null, double hp = 0, bool isPercentage = false, bool canSelectAllTeammates = false, bool canSelectAllEnemies = false, bool canSelectSelf = true, bool canSelectTeammate = true, bool canSelectEnemy = false, int canSelectCount = 1) : base(SkillType.Item)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
_canSelectAllTeammates = canSelectAllTeammates;
|
||||
_canSelectAllEnemies = canSelectAllEnemies;
|
||||
_canSelectSelf = canSelectSelf;
|
||||
_canSelectTeammate = canSelectTeammate;
|
||||
_canSelectEnemy = canSelectEnemy;
|
||||
_canSelectCount = canSelectCount;
|
||||
SelectTargetPredicates.Add(c => c.HP >= 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 强驱散特效(this));
|
||||
if (!isPercentage)
|
||||
{
|
||||
Effects.Add(new RecoverHP(this, new()
|
||||
{
|
||||
{ "hp", hp },
|
||||
{ "respawn", true }
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
Effects.Add(new RecoverHP2(this, new()
|
||||
{
|
||||
{ "hp", hp },
|
||||
{ "respawn", true }
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.ItemEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 经验书
|
||||
{
|
||||
public interface EXPBook
|
||||
{
|
||||
public double EXP { get; set; }
|
||||
}
|
||||
|
||||
public static void Init(Item item, double exp, int remainUseTimes = 1)
|
||||
{
|
||||
item.Skills.Active = new 经验书技能(item, exp);
|
||||
item.RemainUseTimes = remainUseTimes;
|
||||
item.IsInGameItem = false;
|
||||
item.IsReduceTimesAfterUse = true;
|
||||
item.IsRemoveAfterUse = true;
|
||||
}
|
||||
|
||||
public static string UseItem(User user, Item item, Character character)
|
||||
{
|
||||
if (item.Skills.Active != null)
|
||||
{
|
||||
item.Skills.Active.OnSkillCasted(user, [character]);
|
||||
string msg = $"对角色 [ {character} ] 使用 [ {item.Name} ] 成功!";
|
||||
if (item is EXPBook expBook)
|
||||
{
|
||||
msg += $"获得了 {expBook.EXP} 点经验值!";
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
return "此物品没有主动技能,无法被使用!";
|
||||
}
|
||||
|
||||
public static bool OnItemUsed(User user, Item item, int times, Dictionary<string, object> args)
|
||||
{
|
||||
string msg = "";
|
||||
bool result = false;
|
||||
Character[] targets = [];
|
||||
string key = args.Keys.FirstOrDefault(s => s.Equals("targets", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out object? value) && value is Character[] temp)
|
||||
{
|
||||
if (temp.Length > 0)
|
||||
{
|
||||
targets = [temp[0]];
|
||||
msg = UseItem(user, item, temp[0]);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = $"使用物品失败,没有作用目标!";
|
||||
}
|
||||
}
|
||||
args["msg"] = msg;
|
||||
if (result)
|
||||
{
|
||||
key = args.Keys.FirstOrDefault(s => s.Equals("useCount", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out value) && value is int count && targets.Length > 0)
|
||||
{
|
||||
string truemsg = $"对角色 [ {targets[0]} ] 使用 {count} 个 [ {item.Name} ] 成功!";
|
||||
if (item is EXPBook expBook)
|
||||
{
|
||||
truemsg += $"获得了 {expBook.EXP * count} 点经验值!";
|
||||
}
|
||||
args["truemsg"] = truemsg;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
args["truemsg"] = msg;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class 小经验书 : Item, 经验书.EXPBook
|
||||
{
|
||||
public override long Id => (long)ConsumableID.小经验书;
|
||||
public override string Name => "小经验书";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public double EXP { get; set; } = 200;
|
||||
|
||||
public 小经验书(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
经验书.Init(this, EXP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 经验书.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 中经验书 : Item, 经验书.EXPBook
|
||||
{
|
||||
public override long Id => (long)ConsumableID.中经验书;
|
||||
public override string Name => "中经验书";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Green;
|
||||
public double EXP { get; set; } = 500;
|
||||
|
||||
public 中经验书(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
经验书.Init(this, EXP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 经验书.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 大经验书 : Item, 经验书.EXPBook
|
||||
{
|
||||
public override long Id => (long)ConsumableID.大经验书;
|
||||
public override string Name => "大经验书";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
public double EXP { get; set; } = 1000;
|
||||
|
||||
public 大经验书(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
经验书.Init(this, EXP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 经验书.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 经验书技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemActiveID.经验书;
|
||||
public override string Name => "经验书";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 经验书技能(Item? item = null, double exp = 0) : base(SkillType.Item)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Effects.Add(new GetEXP(this, new()
|
||||
{
|
||||
{ "exp", exp }
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.ItemEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 能量饮料
|
||||
{
|
||||
public interface EPAdd
|
||||
{
|
||||
public double EP { get; set; }
|
||||
}
|
||||
|
||||
public static void Init(Item item, double ep, int remainUseTimes = 1)
|
||||
{
|
||||
item.Skills.Active = new 能量饮料技能(item, ep);
|
||||
item.RemainUseTimes = remainUseTimes;
|
||||
item.IsReduceTimesAfterUse = true;
|
||||
item.IsRemoveAfterUse = true;
|
||||
}
|
||||
|
||||
public static string UseItem(User user, Item item, Character character)
|
||||
{
|
||||
if (item.Skills.Active != null)
|
||||
{
|
||||
item.Skills.Active.OnSkillCasted(user, [character]);
|
||||
string msg = $"对角色 [ {character} ] 使用 [ {item.Name} ] 成功!";
|
||||
if (item is EPAdd hpBook)
|
||||
{
|
||||
msg += $"获得了 {hpBook.EP} 点能量值!";
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
return "此物品没有主动技能,无法被使用!";
|
||||
}
|
||||
|
||||
public static bool OnItemUsed(User user, Item item, int times, Dictionary<string, object> args)
|
||||
{
|
||||
string msg = "";
|
||||
bool result = false;
|
||||
Character[] targets = [];
|
||||
string key = args.Keys.FirstOrDefault(s => s.Equals("targets", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out object? value) && value is Character[] temp)
|
||||
{
|
||||
if (temp.Length > 0)
|
||||
{
|
||||
targets = [temp[0]];
|
||||
msg = UseItem(user, item, temp[0]);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = $"使用物品失败,没有作用目标!";
|
||||
}
|
||||
}
|
||||
args["msg"] = msg;
|
||||
if (result)
|
||||
{
|
||||
key = args.Keys.FirstOrDefault(s => s.Equals("useCount", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out value) && value is int count && targets.Length > 0)
|
||||
{
|
||||
string truemsg = $"对角色 [ {targets[0]} ] 使用 {count} 个 [ {item.Name} ] 成功!";
|
||||
if (item is EPAdd expBook)
|
||||
{
|
||||
truemsg += $"获得了 {expBook.EP * count} 点能量值!";
|
||||
}
|
||||
args["truemsg"] = truemsg;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
args["truemsg"] = msg;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class 能量饮料1 : Item, 能量饮料.EPAdd
|
||||
{
|
||||
public override long Id => (long)ConsumableID.能量饮料1;
|
||||
public override string Name => "能量饮料";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Green;
|
||||
public double EP { get; set; } = 50;
|
||||
|
||||
public 能量饮料1(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
能量饮料.Init(this, EP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 能量饮料.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 能量饮料2 : Item, 能量饮料.EPAdd
|
||||
{
|
||||
public override long Id => (long)ConsumableID.能量饮料2;
|
||||
public override string Name => "能量饮料 Pro";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
public double EP { get; set; } = 100;
|
||||
|
||||
public 能量饮料2(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
能量饮料.Init(this, EP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 能量饮料.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 能量饮料3 : Item, 能量饮料.EPAdd
|
||||
{
|
||||
public override long Id => (long)ConsumableID.能量饮料3;
|
||||
public override string Name => "能量饮料 Pro Max";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Purple;
|
||||
public double EP { get; set; } = 200;
|
||||
|
||||
public 能量饮料3(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
能量饮料.Init(this, EP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 能量饮料.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 能量饮料技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemActiveID.能量饮料;
|
||||
public override string Name => "能量饮料";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 能量饮料技能(Item? item = null, double ep = 0) : base(SkillType.Item)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Effects.Add(new GetEP(this, new()
|
||||
{
|
||||
{ "ep", ep }
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.ItemEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 魔力填充剂
|
||||
{
|
||||
public interface MPRecovery
|
||||
{
|
||||
public double MP { get; set; }
|
||||
}
|
||||
|
||||
public static void Init(Item item, double mp, int remainUseTimes = 1, bool isPercentage = false)
|
||||
{
|
||||
item.Skills.Active = new 魔力填充剂技能(item, mp, isPercentage);
|
||||
item.RemainUseTimes = remainUseTimes;
|
||||
item.IsReduceTimesAfterUse = true;
|
||||
item.IsRemoveAfterUse = true;
|
||||
}
|
||||
|
||||
public static string UseItem(User user, Item item, Character character)
|
||||
{
|
||||
if (item.Skills.Active != null)
|
||||
{
|
||||
item.Skills.Active.OnSkillCasted(user, [character]);
|
||||
string msg = $"对角色 [ {character} ] 使用 [ {item.Name} ] 成功!";
|
||||
if (item is MPRecovery hpBook)
|
||||
{
|
||||
msg += $"回复了 {hpBook.MP} 点魔法值!";
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
return "此物品没有主动技能,无法被使用!";
|
||||
}
|
||||
|
||||
public static bool OnItemUsed(User user, Item item, int times, Dictionary<string, object> args)
|
||||
{
|
||||
string msg = "";
|
||||
bool result = false;
|
||||
Character[] targets = [];
|
||||
string key = args.Keys.FirstOrDefault(s => s.Equals("targets", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out object? value) && value is Character[] temp)
|
||||
{
|
||||
if (temp.Length > 0)
|
||||
{
|
||||
targets = [temp[0]];
|
||||
msg = UseItem(user, item, temp[0]);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = $"使用物品失败,没有作用目标!";
|
||||
}
|
||||
}
|
||||
args["msg"] = msg;
|
||||
if (result)
|
||||
{
|
||||
key = args.Keys.FirstOrDefault(s => s.Equals("useCount", StringComparison.CurrentCultureIgnoreCase)) ?? "";
|
||||
if (key != "" && args.TryGetValue(key, out value) && value is int count && targets.Length > 0)
|
||||
{
|
||||
string truemsg = $"对角色 [ {targets[0]} ] 使用 {count} 个 [ {item.Name} ] 成功!";
|
||||
if (item is MPRecovery expBook)
|
||||
{
|
||||
truemsg += $"回复了 {expBook.MP * count} 点魔法值!";
|
||||
}
|
||||
args["truemsg"] = truemsg;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
args["truemsg"] = msg;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class 魔力填充剂1 : Item, 魔力填充剂.MPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.魔力填充剂1;
|
||||
public override string Name => "魔力填充剂Ⅰ型";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public double MP { get; set; } = 300;
|
||||
|
||||
public 魔力填充剂1(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
魔力填充剂.Init(this, MP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 魔力填充剂.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 魔力填充剂2 : Item, 魔力填充剂.MPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.魔力填充剂2;
|
||||
public override string Name => "魔力填充剂Ⅱ型";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Green;
|
||||
public double MP { get; set; } = 700;
|
||||
|
||||
public 魔力填充剂2(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
魔力填充剂.Init(this, MP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 魔力填充剂.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 魔力填充剂3 : Item, 魔力填充剂.MPRecovery
|
||||
{
|
||||
public override long Id => (long)ConsumableID.魔力填充剂3;
|
||||
public override string Name => "魔力填充剂Ⅲ型";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
public double MP { get; set; } = 1500;
|
||||
|
||||
public 魔力填充剂3(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
|
||||
{
|
||||
User = user;
|
||||
魔力填充剂.Init(this, MP, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 魔力填充剂.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 魔力填充剂技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemActiveID.魔力填充剂;
|
||||
public override string Name => "魔力填充剂";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 魔力填充剂技能(Item? item = null, double mp = 0, bool isPercentage = false) : base(SkillType.Item)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
if (!isPercentage)
|
||||
{
|
||||
Effects.Add(new RecoverMP(this, new()
|
||||
{
|
||||
{ "mp", mp }
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
Effects.Add(new RecoverMP2(this, new()
|
||||
{
|
||||
{ "mp", mp }
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 礼包
|
||||
{
|
||||
public interface GiftBox
|
||||
{
|
||||
public Dictionary<string, int> Gifts { get; set; }
|
||||
}
|
||||
|
||||
public static void Init(Item item, Dictionary<string, int> gifts, int remainUseTimes = 1)
|
||||
{
|
||||
if (item is GiftBox box)
|
||||
{
|
||||
box.Gifts = gifts;
|
||||
}
|
||||
item.Skills.Active = new 礼包技能(item);
|
||||
item.RemainUseTimes = remainUseTimes;
|
||||
item.IsInGameItem = false;
|
||||
item.IsReduceTimesAfterUse = true;
|
||||
item.IsRemoveAfterUse = true;
|
||||
}
|
||||
|
||||
public static bool OnItemUsed(User user, Item item, int times, Dictionary<string, object> args)
|
||||
{
|
||||
string msg = "";
|
||||
if (item is GiftBox box)
|
||||
{
|
||||
|
||||
}
|
||||
args["msg"] = msg;
|
||||
return msg.Trim() != "";
|
||||
}
|
||||
}
|
||||
|
||||
public class 年夜饭 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.年夜饭;
|
||||
public override string Name => "年夜饭";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 年夜饭(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ General.GameplayEquilibriumConstant.InGameCurrency, 100000 },
|
||||
{ General.GameplayEquilibriumConstant.InGameMaterial, 2000 },
|
||||
{ new 技能卷轴().Name, 20 },
|
||||
{ new 升华之印().Name, 20 },
|
||||
{ new 流光之印().Name, 10 },
|
||||
{ new 大经验书().Name, 20 },
|
||||
{ new 大回复药().Name, 5 },
|
||||
{ new 魔力填充剂3().Name, 5 },
|
||||
{ new 能量饮料3().Name, 5 }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 礼包.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 蛇年大吉 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.蛇年大吉;
|
||||
public override string Name => "蛇年大吉";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 蛇年大吉(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ General.GameplayEquilibriumConstant.InGameCurrency, 88888 },
|
||||
{ General.GameplayEquilibriumConstant.InGameMaterial, 888 },
|
||||
{ new 技能卷轴().Name, 20 },
|
||||
{ new 智慧之果().Name, 10 },
|
||||
{ new 奥术符文().Name, 5 },
|
||||
{ new 混沌之核().Name, 3 },
|
||||
{ new 升华之印().Name, 20 },
|
||||
{ new 流光之印().Name, 10 },
|
||||
{ new 永恒之印().Name, 3 },
|
||||
{ new 大经验书().Name, 20 }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 礼包.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 新春快乐 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.新春快乐;
|
||||
public override string Name => "新春快乐";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 新春快乐(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ General.GameplayEquilibriumConstant.InGameCurrency, 100000 },
|
||||
{ General.GameplayEquilibriumConstant.InGameMaterial, 2000 },
|
||||
{ new 技能卷轴().Name, 20 },
|
||||
{ new 升华之印().Name, 20 },
|
||||
{ new 流光之印().Name, 10 },
|
||||
{ new 大经验书().Name, 20 },
|
||||
{ new 大回复药().Name, 5 },
|
||||
{ new 魔力填充剂3().Name, 5 },
|
||||
{ new 能量饮料3().Name, 5 }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 礼包.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 毕业礼包 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.毕业礼包;
|
||||
public override string Name => "毕业礼包";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 毕业礼包(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ General.GameplayEquilibriumConstant.InGameCurrency, 667000 },
|
||||
{ General.GameplayEquilibriumConstant.InGameMaterial, 6450 },
|
||||
{ new 升华之印().Name, 126 },
|
||||
{ new 流光之印().Name, 62 },
|
||||
{ new 永恒之印().Name, 45 },
|
||||
{ new 原初之印().Name, 35 },
|
||||
{ new 创生之印().Name, 15 },
|
||||
{ new 技能卷轴().Name, 190 },
|
||||
{ new 智慧之果().Name, 94 },
|
||||
{ new 奥术符文().Name, 68 },
|
||||
{ new 混沌之核().Name, 42 },
|
||||
{ new 法则精粹().Name, 22 },
|
||||
{ new 大经验书().Name, 164 }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
}
|
||||
|
||||
public class 魔法卡礼包 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.魔法卡礼包;
|
||||
public override string Name => $"{ItemSet.GetQualityTypeName(QualityType)}魔法卡礼包";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public int Count { get; set; } = 1;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
private const string GiftName = "与礼包同品质、随机属性、随机魔法技能的魔法卡";
|
||||
|
||||
public 魔法卡礼包(QualityType type = QualityType.White, int count = 1, User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
QualityType = type;
|
||||
Others.Add("QualityType", (int)type);
|
||||
Count = count;
|
||||
Others.Add("Count", count);
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ GiftName, count }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override void AfterCopy()
|
||||
{
|
||||
if (Others.TryGetValue("QualityType", out object? value) && int.TryParse(value.ToString(), out int qualityType))
|
||||
{
|
||||
QualityType = (QualityType)qualityType;
|
||||
}
|
||||
if (Others.TryGetValue("Count", out value) && int.TryParse(value.ToString(), out int count))
|
||||
{
|
||||
Count = count;
|
||||
Gifts[GiftName] = count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class 探索助力礼包 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.探索助力礼包;
|
||||
public override string Name => "探索助力礼包";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 探索助力礼包(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ General.GameplayEquilibriumConstant.InGameCurrency, 20000 },
|
||||
{ General.GameplayEquilibriumConstant.InGameMaterial, 50 },
|
||||
{ new 升华之印().Name, 20 },
|
||||
{ new 技能卷轴().Name, 20 },
|
||||
}, remainUseTimes);
|
||||
}
|
||||
}
|
||||
|
||||
public class 一周年纪念礼包 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.一周年纪念礼包;
|
||||
public override string Name => "一周年纪念礼包";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 一周年纪念礼包(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
Price = 0;
|
||||
IsSellable = false;
|
||||
IsTradable = false;
|
||||
IsLock = true;
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ General.GameplayEquilibriumConstant.InGameCurrency, 50000 },
|
||||
{ General.GameplayEquilibriumConstant.InGameMaterial, 100 },
|
||||
{ new 一周年纪念套装().Name, 1 }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
}
|
||||
|
||||
public class 一周年纪念套装 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.一周年纪念套装;
|
||||
public override string Name => "一周年纪念套装";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 一周年纪念套装(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
Price = 0;
|
||||
IsSellable = false;
|
||||
IsTradable = false;
|
||||
IsLock = true;
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ new 糖糖一周年纪念武器().Name, 1 },
|
||||
{ new 糖糖一周年纪念防具().Name, 1 },
|
||||
{ new 糖糖一周年纪念鞋子().Name, 1 },
|
||||
{ new 糖糖一周年纪念饰品1().Name, 1 },
|
||||
{ new 糖糖一周年纪念饰品2().Name, 1 }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
}
|
||||
|
||||
public class 冬至快乐 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.冬至快乐;
|
||||
public override string Name => "冬至快乐";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 冬至快乐(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ General.GameplayEquilibriumConstant.InGameCurrency, 40000 },
|
||||
{ General.GameplayEquilibriumConstant.InGameMaterial, 500 },
|
||||
{ new 魔法卡礼包(QualityType.Orange, 5).Name, 5 }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
}
|
||||
|
||||
public class 圣诞礼包 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.圣诞礼包;
|
||||
public override string Name => "圣诞礼包";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 圣诞礼包(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ General.GameplayEquilibriumConstant.InGameCurrency, 10000 },
|
||||
{ General.GameplayEquilibriumConstant.InGameMaterial, 100 },
|
||||
{ "YukiのCalfSocks-圣诞限定", 1 }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 礼包.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 元旦快乐 : Item, 礼包.GiftBox
|
||||
{
|
||||
public override long Id => (long)GiftBoxID.元旦快乐;
|
||||
public override string Name => "元旦快乐";
|
||||
public override string Description => Skills.Active?.Description ?? "";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
public Dictionary<string, int> Gifts { get; set; } = [];
|
||||
|
||||
public 元旦快乐(User? user = null, int remainUseTimes = 1) : base(ItemType.GiftBox)
|
||||
{
|
||||
User = user;
|
||||
礼包.Init(this, new()
|
||||
{
|
||||
{ General.GameplayEquilibriumConstant.InGameCurrency, 40000 },
|
||||
{ General.GameplayEquilibriumConstant.InGameMaterial, 500 },
|
||||
{ new 魔法卡礼包(QualityType.Orange, 5).Name, 5 },
|
||||
{ new 魔法卡礼包(QualityType.Red, 2).Name, 2 }
|
||||
}, remainUseTimes);
|
||||
}
|
||||
|
||||
protected override bool OnItemUsed(User user, int times, Dictionary<string, object> args)
|
||||
{
|
||||
return 礼包.OnItemUsed(user, this, times, args);
|
||||
}
|
||||
}
|
||||
|
||||
public class 礼包技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemActiveID.礼包;
|
||||
public override string Name => "礼包";
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Item is 礼包.GiftBox box && box.Gifts.Count > 0)
|
||||
{
|
||||
return "打开后可立即获得:" + string.Join(",", box.Gifts.Select(kv => $"{kv.Key} * {kv.Value}"));
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public 礼包技能(Item? item = null) : base(SkillType.Item)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public enum WeaponID : long
|
||||
{
|
||||
糖糖一周年纪念武器 = 11001,
|
||||
独奏弓 = 11002
|
||||
}
|
||||
|
||||
public enum ArmorID : long
|
||||
{
|
||||
糖糖一周年纪念防具 = 12001
|
||||
}
|
||||
|
||||
public enum ShoesID : long
|
||||
{
|
||||
糖糖一周年纪念鞋子 = 13001
|
||||
}
|
||||
|
||||
public enum AccessoryID : long
|
||||
{
|
||||
攻击之爪10 = 14001,
|
||||
攻击之爪25 = 14002,
|
||||
攻击之爪40 = 14003,
|
||||
攻击之爪55 = 14004,
|
||||
攻击之爪70 = 14005,
|
||||
攻击之爪85 = 14006,
|
||||
攻击之爪100 = 14007,
|
||||
糖糖一周年纪念饰品1 = 14008,
|
||||
糖糖一周年纪念饰品2 = 14009,
|
||||
行军医箱1 = 14010,
|
||||
行军医箱2 = 14011,
|
||||
行军医箱3 = 14012,
|
||||
共鸣核心1 = 14013,
|
||||
共鸣核心2 = 14014,
|
||||
共鸣核心3 = 14015,
|
||||
接力信标1 = 14016,
|
||||
接力信标2 = 14017,
|
||||
接力信标3 = 14018,
|
||||
应急装置1 = 14019,
|
||||
应急装置2 = 14020,
|
||||
应急装置3 = 14021,
|
||||
// —— 节奏维度(2026-09-23 新增)——
|
||||
万能钥匙1 = 14022,
|
||||
万能钥匙2 = 14023,
|
||||
万能钥匙3 = 14024,
|
||||
节拍器1 = 14025,
|
||||
节拍器2 = 14026,
|
||||
节拍器3 = 14027
|
||||
}
|
||||
|
||||
public enum ConsumableID : long
|
||||
{
|
||||
小经验书 = 15001,
|
||||
中经验书 = 15002,
|
||||
大经验书 = 15003,
|
||||
小回复药 = 15004,
|
||||
中回复药 = 15005,
|
||||
大回复药 = 15006,
|
||||
魔力填充剂1 = 15007,
|
||||
魔力填充剂2 = 15008,
|
||||
魔力填充剂3 = 15009,
|
||||
能量饮料1 = 15010,
|
||||
能量饮料2 = 15011,
|
||||
能量饮料3 = 15012,
|
||||
复苏药1 = 15013,
|
||||
复苏药2 = 15014,
|
||||
复苏药3 = 15015,
|
||||
全回复药 = 15016
|
||||
}
|
||||
|
||||
public enum CollectibleID
|
||||
{
|
||||
青松 = 17001,
|
||||
流星石 = 17002,
|
||||
向日葵 = 17003,
|
||||
金铃花 = 17004,
|
||||
琉璃珠 = 17005,
|
||||
鸣草 = 17006,
|
||||
马尾 = 17007,
|
||||
鬼兜虫 = 17008,
|
||||
烈焰花花蕊 = 17009,
|
||||
堇瓜 = 17010,
|
||||
水晶球 = 17011,
|
||||
薰衣草 = 17012,
|
||||
青石 = 17013,
|
||||
莲花 = 17014,
|
||||
陶罐 = 17015,
|
||||
海灵芝 = 17016,
|
||||
四叶草 = 17017,
|
||||
露珠 = 17018,
|
||||
茉莉花 = 17019,
|
||||
绿萝 = 17020,
|
||||
檀木扇 = 17021,
|
||||
鸟蛋 = 17022,
|
||||
竹笋 = 17023,
|
||||
晶核 = 17024,
|
||||
手工围巾 = 17025,
|
||||
柳条篮 = 17026,
|
||||
风筝 = 17027,
|
||||
羽毛 = 17028,
|
||||
发光髓 = 17029,
|
||||
紫罗兰 = 17030,
|
||||
松果 = 17031,
|
||||
电气水晶 = 17032,
|
||||
薄荷 = 17033,
|
||||
竹节 = 17034,
|
||||
铁砧 = 17035,
|
||||
冰雾花 = 17036,
|
||||
海草 = 17037,
|
||||
磐石 = 17038,
|
||||
砂砾 = 17039,
|
||||
铁甲贝壳 = 17040,
|
||||
蜥蜴尾巴 = 17041,
|
||||
古老钟摆 = 17042,
|
||||
枯藤 = 17043
|
||||
}
|
||||
|
||||
public enum SpecialItemID : long
|
||||
{
|
||||
升华之印 = 18001,
|
||||
流光之印 = 18002,
|
||||
永恒之印 = 18003,
|
||||
技能卷轴 = 18004,
|
||||
智慧之果 = 18005,
|
||||
奥术符文 = 18006,
|
||||
混沌之核 = 18007,
|
||||
奖券 = 18008,
|
||||
十连奖券 = 18009,
|
||||
改名卡 = 18010,
|
||||
原初之印 = 18011,
|
||||
创生之印 = 18012,
|
||||
法则精粹 = 18013,
|
||||
大师锻造券 = 18014,
|
||||
钻石 = 18998,
|
||||
探索许可 = 18999
|
||||
}
|
||||
|
||||
public enum GiftBoxID : long
|
||||
{
|
||||
年夜饭 = 20001,
|
||||
蛇年大吉 = 20002,
|
||||
新春快乐 = 20003,
|
||||
毕业礼包 = 20004,
|
||||
魔法卡礼包 = 20005,
|
||||
探索助力礼包 = 20006,
|
||||
一周年纪念礼包 = 20007,
|
||||
一周年纪念套装 = 20008,
|
||||
冬至快乐 = 20009,
|
||||
圣诞礼包 = 20010,
|
||||
元旦快乐 = 20011,
|
||||
马年大吉 = 20012
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 糖糖一周年纪念鞋子 : Item
|
||||
{
|
||||
public override long Id => (long)ShoesID.糖糖一周年纪念鞋子;
|
||||
public override string Name => "蜜步流心";
|
||||
public override string Description => $"{Skills.Passives.FirstOrDefault()?.Description}{(Skills.Active != null ? $"{Skills.Active.Name}:{Skills.Active.Description}" : "")}";
|
||||
public override string BackgroundStory => "一双棕色及踝短靴,靴面有蜂窝状暗纹,靴底内嵌彩色糖豆,每走一步糖豆轻轻碰撞,发出微不可闻的清脆声响。";
|
||||
public override string Category => "糖糖一周年限定纪念物品";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 糖糖一周年纪念鞋子(Character? character = null) : base(ItemType.Shoes)
|
||||
{
|
||||
Price = 0;
|
||||
IsSellable = false;
|
||||
IsTradable = false;
|
||||
IsLock = true;
|
||||
Skills.Active = new 疾风步(character)
|
||||
{
|
||||
Level = 5
|
||||
};
|
||||
Skills.Passives.Add(new 糖糖一周年纪念鞋子技能(character, this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 糖糖一周年纪念鞋子技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.糖糖一周年纪念鞋子;
|
||||
public override string Name => "蜜步流心";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
|
||||
private readonly double 行动速度加成 = 180;
|
||||
private readonly double 移动距离加成 = 4;
|
||||
private readonly double 加速系数加成 = 0.2;
|
||||
|
||||
public 糖糖一周年纪念鞋子技能(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Dictionary<string, object> values = new()
|
||||
{
|
||||
{ "exspd", 行动速度加成 },
|
||||
{ "exmov", 移动距离加成 },
|
||||
{ "exacc", 加速系数加成 }
|
||||
};
|
||||
Effects.Add(new ExSPD(this, values, character));
|
||||
Effects.Add(new ExMOV(this, values, character));
|
||||
Effects.Add(new AccelerationCoefficient(this, values, character));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class RegionItem : Item
|
||||
{
|
||||
public HashSet<Func<Region, bool>> GenerationPredicates { get; } = [];
|
||||
|
||||
public RegionItem(long id, string name, string description, string story = "", QualityType quality = QualityType.White, params IEnumerable<Func<Region, bool>> predicates) : base(ItemType.SpecialItem)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
Description = description;
|
||||
BackgroundStory = story;
|
||||
QualityType = quality;
|
||||
foreach (Func<Region, bool> predicate in predicates)
|
||||
{
|
||||
GenerationPredicates.Add(predicate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 创生之印() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.创生之印;
|
||||
public override string Name => "创生之印";
|
||||
public override string Description => "角色突破等阶必备的终级材料。";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 十连奖券() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.十连奖券;
|
||||
public override string Name => "十连奖券";
|
||||
public override string Description => "进行十连抽卡时,优先使用十连奖券替代金币。";
|
||||
public override QualityType QualityType => QualityType.Purple;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 升华之印() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.升华之印;
|
||||
public override string Name => "升华之印";
|
||||
public override string Description => "角色突破等阶必备的初级材料。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 原初之印() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.原初之印;
|
||||
public override string Name => "原初之印";
|
||||
public override string Description => "角色突破等阶必备的特级材料。";
|
||||
public override QualityType QualityType => QualityType.Purple;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 大师锻造券() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.大师锻造券;
|
||||
public override string Name => "大师锻造券";
|
||||
public override string Description => "锻造大师为你的锻造护航。当库存存在任意一张大师锻造券时,你可以在锻造时指定锻造的出货地区和品质,当锻造失败或锻造结果的出货地区和品质与你指定的不符时,将消耗一张大师锻造券并返还所有材料。\r\n" +
|
||||
"使用指令:大师锻造 <目标地区编号> <目标品质序号>\r\n地区编号请通过【世界地图】查询,品质序号为 0~5(对应:普通/优秀/稀有/史诗/传说/神话)。";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 奖券() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.奖券;
|
||||
public override string Name => "奖券";
|
||||
public override string Description => "进行抽卡时,优先使用奖券替代金币。";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 奥术符文() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.奥术符文;
|
||||
public override string Name => "奥术符文";
|
||||
public override string Description => "升级技能必备的高级材料。";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 技能卷轴() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.技能卷轴;
|
||||
public override string Name => "技能卷轴";
|
||||
public override string Description => "升级技能必备的初级材料。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 探索许可() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.探索许可;
|
||||
public override string Name => "探索许可";
|
||||
public override string Description => "铎京探索者协会为每位探索者发放的地区准入证明,拥有此证明可以接取各种各样的探索任务,并且享受铎京探索者协会的救援和协助服务。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 改名卡() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.改名卡;
|
||||
public override string Name => "改名卡";
|
||||
public override string Description => "拥有改名卡时,可以使用【自定义改名】指令,来自定义个性化昵称。新昵称需要经过审核。";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 智慧之果() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.智慧之果;
|
||||
public override string Name => "智慧之果";
|
||||
public override string Description => "升级技能必备的中级材料。";
|
||||
public override QualityType QualityType => QualityType.Green;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 永恒之印() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.永恒之印;
|
||||
public override string Name => "永恒之印";
|
||||
public override string Description => "角色突破等阶必备的高级材料。";
|
||||
public override QualityType QualityType => QualityType.Blue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 法则精粹() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.法则精粹;
|
||||
public override string Name => "法则精粹";
|
||||
public override string Description => "升级技能必备的终级材料。";
|
||||
public override QualityType QualityType => QualityType.Orange;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 流光之印() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.流光之印;
|
||||
public override string Name => "流光之印";
|
||||
public override string Description => "角色突破等阶必备的中级材料。";
|
||||
public override QualityType QualityType => QualityType.Green;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 混沌之核() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.混沌之核;
|
||||
public override string Name => "混沌之核";
|
||||
public override string Description => "升级技能必备的特级材料。";
|
||||
public override QualityType QualityType => QualityType.Purple;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 钻石() : Item(ItemType.SpecialItem)
|
||||
{
|
||||
public override long Id => (long)SpecialItemID.钻石;
|
||||
public override string Name => "钻石";
|
||||
public override string Description => "钻石是筽祀牻大陆通用的稀有矿物,是第二流通货币。钻石可以以稳定的 1:200 兑换率兑换大陆第一流通货币金币。";
|
||||
public override QualityType QualityType => QualityType.White;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
[Obsolete("测试物品请勿使用")]
|
||||
public class 独奏弓 : Item
|
||||
{
|
||||
public override long Id => (long)WeaponID.独奏弓;
|
||||
public override string Name => "独奏弓";
|
||||
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
|
||||
|
||||
public 独奏弓(Character? character = null) : base(ItemType.Weapon)
|
||||
{
|
||||
WeaponType = WeaponType.Bow;
|
||||
Skills.Passives.Add(new 独奏弓技能(character, this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 独奏弓技能 : Skill
|
||||
{
|
||||
public override long Id => (long)WeaponID.独奏弓;
|
||||
public override string Name => "独奏弓";
|
||||
public override string Description => string.Join("\r\n", Effects.Select(e => e.Description));
|
||||
|
||||
private readonly double 攻击力加成 = 80;
|
||||
private readonly double 硬直时间减少 = 2;
|
||||
|
||||
public 独奏弓技能(Character? character, Item item) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Dictionary<string, object> values = new()
|
||||
{
|
||||
{ "exatk", 攻击力加成 },
|
||||
{ "hatr", 硬直时间减少 }
|
||||
};
|
||||
Effects.Add(new ExATK(this, values, character));
|
||||
Effects.Add(new NormalAttackHardTimeReduce(this, values, character));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
using OshimaBot.Content.Skills;
|
||||
|
||||
namespace OshimaBot.Content.Items
|
||||
{
|
||||
public class 糖糖一周年纪念武器 : Item
|
||||
{
|
||||
public override long Id => (long)WeaponID.糖糖一周年纪念武器;
|
||||
public override string Name => "粉糖雾蝶";
|
||||
public override string Description => $"{Skills.Passives.First().Description}{Skills.Passives.Last().Name}:{Skills.Passives.Last().Description}";
|
||||
public override string BackgroundStory => "可长达1.5米的权杖,通体呈半透明的琥珀金色,内部可见如星河般缓缓流动的魔法糖浆。";
|
||||
public override string Category => "糖糖一周年限定纪念物品";
|
||||
public override QualityType QualityType => QualityType.Gold;
|
||||
|
||||
public 糖糖一周年纪念武器(Character? character = null) : base(ItemType.Weapon)
|
||||
{
|
||||
Price = 0;
|
||||
IsSellable = false;
|
||||
IsTradable = false;
|
||||
IsLock = true;
|
||||
WeaponType = WeaponType.Staff;
|
||||
Skills.Passives.Add(new 糖糖一周年纪念武器技能(character, this));
|
||||
Skills.Passives.Add(new 致命节奏(character)
|
||||
{
|
||||
Level = 1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class 糖糖一周年纪念武器技能 : Skill
|
||||
{
|
||||
public override long Id => (long)ItemPassiveID.糖糖一周年纪念武器;
|
||||
public override string Name => "粉糖雾蝶";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
|
||||
private readonly double 攻击力加成 = 0.46;
|
||||
|
||||
public 糖糖一周年纪念武器技能(Character? character = null, Item? item = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Level = 1;
|
||||
Item = item;
|
||||
Dictionary<string, object> values = new()
|
||||
{
|
||||
{ "exatk", 攻击力加成 }
|
||||
};
|
||||
Effects.Add(new ExATK2(this, values, character));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user