智慧与力量技能变更

This commit is contained in:
milimoe 2024-11-10 23:23:44 +08:00
parent f07401af3c
commit 7a7218f062
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E

View File

@ -1,4 +1,5 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Interface.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Skills namespace Oshima.FunGame.OshimaModules.Skills
@ -24,11 +25,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"当生命值低于 30% 时,智力转化为力量;当生命值高于或等于 30% 时,力量转化为智力。力量模式下,造成伤害必定暴击;智力模式下,获得 30% 闪避率和 25% 魔法抗性。" + public override string Description => $"当生命值低于 30% 时,进入力量模式,核心属性转为力量,将所有基础智力转化为额外力量;当生命值高于或等于 30% 时,进入智力模式,核心属性转为智力,还原所有基础智力。力量模式下,造成伤害必定暴击;智力模式下,获得 30% 闪避率和 25% 魔法抗性。" +
(Skill.Character != null ? "(当前模式:" + CharacterSet.GetPrimaryAttributeName(Skill.Character.PrimaryAttribute) + "" : ""); (Skill.Character != null ? "(当前模式:" + CharacterSet.GetPrimaryAttributeName(Skill.Character.PrimaryAttribute) + "" : "");
private double = 0; private double = 0;
private double = 0;
private double = 0.3; private double = 0.3;
private double = 0.25; private double = 0.25;
private bool = false; private bool = false;
@ -78,23 +78,6 @@ namespace Oshima.FunGame.OshimaModules.Skills
} }
} }
public override void OnAttributeChanged(Character character)
{
if (Skill.Character != null)
{
if (Skill.Character.PrimaryAttribute == PrimaryAttribute.INT)
{
double diff = character.ExSTR - ;
character.ExINT = + character.BaseSTR + diff;
}
else if (Skill.Character.PrimaryAttribute == PrimaryAttribute.STR)
{
double diff = character.ExINT - ;
character.ExSTR = + character.BaseINT + diff;
}
}
}
public override bool BeforeCriticalCheck(Character character, ref double throwingBonus) public override bool BeforeCriticalCheck(Character character, ref double throwingBonus)
{ {
throwingBonus += 100; throwingBonus += 100;
@ -102,6 +85,16 @@ namespace Oshima.FunGame.OshimaModules.Skills
} }
public override void OnTimeElapsed(Character character, double elapsed) public override void OnTimeElapsed(Character character, double elapsed)
{
Changed(character);
}
public override void OnAttributeChanged(Character character)
{
Changed(character);
}
private void Changed(Character character)
{ {
if (Skill.Character != null) if (Skill.Character != null)
{ {
@ -115,10 +108,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
double pastMP = c.MP; double pastMP = c.MP;
double pastMaxMP = c.MaxMP; double pastMaxMP = c.MaxMP;
c.PrimaryAttribute = PrimaryAttribute.STR; c.PrimaryAttribute = PrimaryAttribute.STR;
= c.ExINT; = c.BaseINT;
= c.ExSTR; c.ExINT -= ;
c.ExINT = -c.BaseINT; c.ExSTR += ;
c.ExSTR = + c.BaseINT + ;
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
if () if ()
{ {
@ -135,10 +127,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
double pastMP = c.MP; double pastMP = c.MP;
double pastMaxMP = c.MaxMP; double pastMaxMP = c.MaxMP;
c.PrimaryAttribute = PrimaryAttribute.INT; c.PrimaryAttribute = PrimaryAttribute.INT;
= c.ExINT; c.ExSTR -= ;
= c.ExSTR; c.ExINT += ;
c.ExINT = + c.BaseSTR + ; = 0;
c.ExSTR = -c.BaseSTR;
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
if (!) if (!)
{ {