本帖最後由 cs8530602 於 2016-1-13 00:35 編輯
先感谢了。。。
这类set的以前认为是敌我双方都适用,所以我改的并不是这里。。。
然后我改动的地方是 onskillattack(sp消耗0)
public void OnSkillAttack(CharacterCtrl ctrl)
{
if (ctrl.Status.IsSkillStart)
{
BattleDataSkill skillData = ctrl.Status.GetSkillData();
if (BattleOptionSetting.Instance.AutoBattle.RengekiState[!ctrl.Status.IsPlayerSide ? 1 : 0].IsEnableToPlayNoRengekiSkill() || skillData.IsRengeki)
{
this.PlaySound(ctrl);
PlayerCtrl ctrl2 = ctrl as PlayerCtrl;
if (ctrl2 != null)
{
ctrl2.AddSkillPoint(-skillData.Cost);
calcnormaldamage(普通伤害)
public static int CalcNoramalDamage(CharacterCtrl myCtrl, CharacterCtrl target, bool isCritical = false)
{
Constant.Element myElem = myCtrl.Status.Element;
return CalcDamage(myCtrl.Status.Power, target.Status.Defense, myCtrl.Status.AdditionalPower, target.Status.AdditionalDefense, GetDamageTypeRatioUpperAmount(myCtrl.Status), GetDamageTypeRatioDownerAmount(myCtrl.Status), GetPhysicalTypeRatioUpperAmount(target.Status), GetPhysicalTypeRatioDownerAmount(target.Status), GetDamageTypeFixedUpperAmount(myCtrl.Status), GetDamageTypeFixedDownerAmount(myCtrl.Status), GetPhysicalTypeFixedUpperAmount(target.Status), GetPhysicalTypeFixedDownerAmount(target.Status), CheckAdvantageousElement(myElem, target.Status.Element), skillRatioDefaultValue, (float) skillFixedDefaultValue, GetIgnoreDefenseAmount(myCtrl.Status), GetAbsoluteDamageRatioUpperAmount(target.Status), GetAbsoluteDamageRatioDownerAmount(target.Status), GetAbsoluteDamageFixedUpperAmount(target.Status), GetAbsoluteDamageFixedDownerAmount(target.Status), GetDamageRatePerHit(target), myCtrl.Status.BaseType != Constant.BaseModelType.Monster, myCtrl.Status.BaseType != Constant.BaseModelType.Monster, myCtrl.Status.IsPlayerSide, false);
}
calcskilldamage(技能伤害)
public static int CalcSkillDamage(CharacterCtrl myCtrl, CharacterCtrl target, BattleDataSkillEffect data, bool isCritical = false)
{
float num = (data.EffectValueType != Constant.ValueType.Fixed) ? 0f : data.EffectValue;
float ratioAmount = (data.EffectValueType != Constant.ValueType.Ratio) ? 1f : ToPermil(data.EffectValue);
num += data.GodFixedDamage;
Constant.Element myElem = myCtrl.Status.Element;
if (data.EffectValueType == Constant.ValueType.Gravity)
{
ratioAmount = target.Status.HP.MaxValue * ToPermil(data.EffectValue);
}
else if (data.EffectValueType == Constant.ValueType.Ignore)
{
ratioAmount = data.EffectValue;
}
return CalcDamage(myCtrl.Status.Power, target.Status.Defense, myCtrl.Status.AdditionalPower, target.Status.AdditionalDefense, GetDamageTypeRatioUpperAmount(myCtrl.Status), GetDamageTypeRatioDownerAmount(myCtrl.Status), GetPhysicalTypeRatioUpperAmount(target.Status), GetPhysicalTypeRatioDownerAmount(target.Status), GetDamageTypeFixedUpperAmount(myCtrl.Status), GetDamageTypeFixedDownerAmount(myCtrl.Status), GetPhysicalTypeFixedUpperAmount(target.Status), GetPhysicalTypeFixedDownerAmount(target.Status), CheckAdvantageousElement(myElem, target.Status.Element), CorrectRatioAmountToMultiply(CorrectBuffRatioAmountToAdd(ratioAmount, ratioAmount >= 1f)), (float) CalcToInt(num), GetIgnoreDefenseAmount(myCtrl.Status), GetAbsoluteDamageRatioUpperAmount(target.Status) * data.GodMultiDamageRate, GetAbsoluteDamageRatioDownerAmount(target.Status), GetAbsoluteDamageFixedUpperAmount(target.Status), GetAbsoluteDamageFixedDownerAmount(target.Status), GetDamageRatePerHit(target), myCtrl.Status.BaseType != Constant.BaseModelType.Monster, myCtrl.Status.BaseType != Constant.BaseModelType.Monster, myCtrl.Status.IsPlayerSide, IsIgnoreDefenceDamage(data.EffectValueType));
}
看不太懂il语言,用的是c#展示。。。 |