private void ExecFreshHeal(Character player, Character target) { Debug.Log(MethodBase.GetCurrentMethod()); double healValue = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.FreshHeal(player); AbstractHealCommand(player, target, healValue); }
public void ExecHolyBreath(Character player, List <Character> target_list) { Debug.Log(MethodBase.GetCurrentMethod()); for (int ii = 0; ii < target_list.Count; ii++) { double healValue = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.HolyBreath(player); AbstractHealCommand(player, target_list[ii], healValue); } }
private double DamageFromCommand(Character player, string command_name) { double result = 0; if (command_name == Fix.NORMAL_ATTACK) { result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.NormalAttack(player); } else if (command_name == Fix.MAGIC_ATTACK) { result = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.MagicAttack(player); } else if (command_name == Fix.FIRE_BALL) { result = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.FireBall(player); } else if (command_name == Fix.ICE_NEEDLE) { result = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.IceNeedle(player); } else if (command_name == Fix.SHADOW_BLAST) { result = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.ShadowBlast(player); } else if (command_name == Fix.STRAIGHT_SMASH) { result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.StraightSmash(player); } else if (command_name == Fix.SHIELD_BASH) { result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.ShieldBash(player); } else if (command_name == Fix.HUNTER_SHOT) { result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.HunterShot(player); } else if (command_name == Fix.VENOM_SLASH) { result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.VenomSlash(player); } else if (command_name == Fix.MULTIPLE_SHOT) { result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.MultipleShot(player); } else if (command_name == Fix.CIRCLE_SLASH) { result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.CircleSlash(player); } else if (command_name == Fix.DOUBLE_SLASH) { result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.NormalAttack(player); } return(result); }
/// <summary> /// 装備品を選択します。 /// </summary> /// <param name="sender"></param> public void TapNodeChangeEquip(Text sender) { Debug.Log(MethodBase.GetCurrentMethod() + " " + sender.text); if (CurrentItemType == Fix.ITEMTYPE_MAIN_WEAPON) { this.ShadowPlayer.MainWeapon = null; this.ShadowPlayer.MainWeapon = new Item(sender.text); } else if (CurrentItemType == Fix.ITEMTYPE_SUB_WEAPON) { this.ShadowPlayer.SubWeapon = null; this.ShadowPlayer.SubWeapon = new Item(sender.text); } else if (CurrentItemType == Fix.ITEMTYPE_ARMOR) { this.ShadowPlayer.MainArmor = null; this.ShadowPlayer.MainArmor = new Item(sender.text); } else if (CurrentItemType == Fix.ITEMTYPE_ACCESSORY1) { this.ShadowPlayer.Accessory1 = null; this.ShadowPlayer.Accessory1 = new Item(sender.text); } else if (CurrentItemType == Fix.ITEMTYPE_ACCESSORY2) { this.ShadowPlayer.Accessory2 = null; this.ShadowPlayer.Accessory2 = new Item(sender.text); } else if (CurrentItemType == Fix.ITEMTYPE_ARTIFACT) { this.ShadowPlayer.Artifact = null; this.ShadowPlayer.Artifact = new Item(sender.text); } UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailStrength, CurrentPlayer.TotalStrength, ShadowPlayer.TotalStrength); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailAgility, CurrentPlayer.TotalAgility, ShadowPlayer.TotalAgility); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailIntelligence, CurrentPlayer.TotalIntelligence, ShadowPlayer.TotalIntelligence); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailStamina, CurrentPlayer.TotalStamina, ShadowPlayer.TotalStamina); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailMind, CurrentPlayer.TotalMind, ShadowPlayer.TotalMind); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailLife, CurrentPlayer.MaxLife, ShadowPlayer.MaxLife); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailPhysicalAttack, PrimaryLogic.PhysicalAttack(CurrentPlayer, PrimaryLogic.ValueType.Min), PrimaryLogic.PhysicalAttack(ShadowPlayer, PrimaryLogic.ValueType.Min)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailPhysicalAttackMax, PrimaryLogic.PhysicalAttack(CurrentPlayer, PrimaryLogic.ValueType.Max), PrimaryLogic.PhysicalAttack(ShadowPlayer, PrimaryLogic.ValueType.Max)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailPhysicalDefense, PrimaryLogic.PhysicalDefense(CurrentPlayer), PrimaryLogic.PhysicalDefense(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailMagicAttack, PrimaryLogic.MagicAttack(CurrentPlayer, PrimaryLogic.ValueType.Min), PrimaryLogic.MagicAttack(ShadowPlayer, PrimaryLogic.ValueType.Min)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailMagicAttackMax, PrimaryLogic.MagicAttack(CurrentPlayer, PrimaryLogic.ValueType.Max), PrimaryLogic.MagicAttack(ShadowPlayer, PrimaryLogic.ValueType.Max)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailMagicDefense, PrimaryLogic.MagicDefense(CurrentPlayer), PrimaryLogic.MagicDefense(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailBattleAccuracy, PrimaryLogic.BattleAccuracy(CurrentPlayer), PrimaryLogic.BattleAccuracy(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailBattleSpeed, PrimaryLogic.BattleSpeed(CurrentPlayer), PrimaryLogic.BattleSpeed(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailBattleResponse, PrimaryLogic.BattleResponse(CurrentPlayer), PrimaryLogic.BattleResponse(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailPotential, PrimaryLogic.Potential(CurrentPlayer), PrimaryLogic.Potential(ShadowPlayer)); }
private void ExecPlayIrregularStep() { if (this.NowIrregularStepCounter > 0) { float factor = (float)PrimaryLogic.BattleSpeed(this.NowIrregularStepPlayer) * 2.00f; UpdatePlayerArrow(this.NowIrregularStepPlayer, factor); this.NowIrregularStepCounter = this.NowIrregularStepCounter - factor * BATTLE_GAUGE_WITDH / 100.0f; } if (this.NowIrregularStepCounter <= 0.0f) { ExecNormalAttack(this.NowIrregularStepPlayer, this.NowIrregularStepTarget, SecondaryLogic.IrregularStep_Damage(this.NowIrregularStepPlayer), CriticalType.Random); this.NowIrregularStepPlayer = null; this.NowIrregularStepTarget = null; this.NowIrregularStepCounter = 0; this.NowIrregularStepMode = false; } }
private double MagicDamageLogic(Character player, Character target, double magnify, Fix.DamageSource attr, CriticalType critical) { // 魔法コマンドのダメージを算出 double damageValue = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * magnify; double debug1 = damageValue; Debug.Log("PrimaryLogic.MagicDamage: " + debug1.ToString()); // Buff効果による増強 if (attr == Fix.DamageSource.Fire && player.IsUpFire) { Debug.Log("damageValue UpFire: " + player.IsUpFire.EffectValue.ToString()); damageValue = damageValue * player.IsUpFire.EffectValue; } if (attr == Fix.DamageSource.Ice && player.IsUpIce) { Debug.Log("damageValue IsUpIce: " + player.IsUpIce.EffectValue.ToString()); damageValue = damageValue * player.IsUpIce.EffectValue; } if (attr == Fix.DamageSource.HolyLight && player.IsUpLight) { Debug.Log("damageValue IsUpLight: " + player.IsUpLight.EffectValue.ToString()); damageValue = damageValue * player.IsUpLight.EffectValue; } if (attr == Fix.DamageSource.DarkMagic && player.IsUpShadow) { Debug.Log("damageValue IsUpShadow: " + player.IsUpShadow.EffectValue.ToString()); damageValue = damageValue * player.IsUpShadow.EffectValue; } // ストーム・アーマーによる効果 if (player.IsStormArmor) { damageValue = damageValue * player.IsStormArmor.EffectValue2; Debug.Log("damageValue IsStormArmor(after): " + damageValue.ToString()); } // クリティカル判定 if (player.CannotCritical == false && ((critical == CriticalType.Random && AP.Math.RandomInteger(100) <= 5) || (critical == CriticalType.Absolute)) ) { if (critical == CriticalType.Absolute) { Debug.Log("MagicDamageLogic detect Critical! (Absolute)"); } if (critical == CriticalType.Random) { Debug.Log("MagicDamageLogic detect Critical! (Random)"); } damageValue *= SecondaryLogic.CriticalFactor(player); } // ターゲットの魔法防御を差し引く double defenseValue = PrimaryLogic.MagicDefense(target); double debug2 = defenseValue; damageValue -= defenseValue; double debug3 = damageValue; Debug.Log("Magic-DamageValue: " + debug1.ToString() + " - " + debug2.ToString() + " = " + debug3.ToString()); // ターゲットが防御姿勢であれば、ダメージを軽減する if (target.IsDefense) { damageValue = damageValue * SecondaryLogic.DefenseFactor(target); Debug.Log("Target is Defense mode: " + damageValue.ToString()); } // ダメージ量が負の値になる場合は0とみなす。 if (damageValue <= 0) { damageValue = 0; } return(damageValue); }
private double PhysicalDamageLogic(Character player, Character target, double magnify, Fix.DamageSource attr, CriticalType critical) { // 攻撃コマンドのダメージを算出 double damageValue = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * magnify; double debug1 = damageValue; Debug.Log("PrimaryLogic.PhysicalAttack: " + debug1.ToString()); // Buff効果による増強(物理属性専用UPは現時点では存在しない) // クリティカル判定 if (player.CannotCritical == false && ((critical == CriticalType.Random && AP.Math.RandomInteger(100) <= 5) || (critical == CriticalType.Absolute)) ) { if (critical == CriticalType.Absolute) { Debug.Log("PhysicalDamageLogic detect Critical! (Absolute)"); } if (critical == CriticalType.Random) { Debug.Log("PhysicalDamageLogic detect Critical! (Random)"); } damageValue *= SecondaryLogic.CriticalFactor(player); debug1 = damageValue; Debug.Log("PrimaryLogic.PhysicalAttack(Critical): " + debug1.ToString()); } // ターゲットの物理防御を差し引く double defenseValue = PrimaryLogic.PhysicalDefense(target); double debug2 = defenseValue; Debug.Log("PrimaryLogic.PhysicalDefense: " + debug2.ToString()); if (player.IsEyeOfTheTruth) { double reduce = 1.00f - player.IsEyeOfTheTruth.EffectValue; if (reduce <= 0.0f) { reduce = 0.0f; } Debug.Log("player.IsEyeOfTheTruth.EffectValue: " + reduce.ToString("F2")); defenseValue = defenseValue * reduce; debug2 = defenseValue; Debug.Log("PrimaryLogic.PhysicalDefense(EoT): " + debug2.ToString()); } damageValue -= defenseValue; double debug3 = damageValue; Debug.Log("Physical-DamageValue: " + debug1.ToString() + " - " + debug2.ToString() + " = " + debug3.ToString()); // ターゲットが防御姿勢であれば、ダメージを軽減する if (target.IsDefense) { damageValue = damageValue * SecondaryLogic.DefenseFactor(target); Debug.Log("Target is Defense mode: " + damageValue.ToString()); } // ダメージ量が負の値になる場合は0とみなす。 if (damageValue <= 0) { damageValue = 0; } return(damageValue); }
private void ExecHeartOfLife(Character player, Character target) { Debug.Log(MethodBase.GetCurrentMethod()); target.objBuffPanel.AddBuff(prefab_Buff, Fix.HEART_OF_LIFE, SecondaryLogic.HeartOfLife_Turn(player), PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random), 0); StartAnimation(target.objGroup.gameObject, Fix.HEART_OF_LIFE, Fix.COLOR_NORMAL); }
/// <summary> /// キャラクターデータ(詳細)を画面に反映します。 /// </summary> public void UpdateCharacterDetailView(Character player) { this.GroupMainEquip.SetActive(true); this.GroupChangeEquip.SetActive(false); this.gameObject.SetActive(true); // シャドウデータを生成 CreateShadowData(player); // キャラクター情報を画面に反映 txtDetailName.text = player.FullName; txtDetailLevel.text = player.Level.ToString(); txtDetailLife.text = player.MaxLife.ToString(); txtDetailExp.text = player.Exp.ToString() + " / " + player.GetNextExp().ToString(); txtDetailStrength.text = player.TotalStrength.ToString(); txtDetailAgility.text = player.TotalAgility.ToString(); txtDetailIntelligence.text = player.TotalIntelligence.ToString(); txtDetailStamina.text = player.TotalStamina.ToString(); txtDetailMind.text = player.TotalMind.ToString(); txtDetailPhysicalAttack.text = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Min).ToString("F2"); txtDetailPhysicalAttackMax.text = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Max).ToString("F2"); txtDetailPhysicalDefense.text = PrimaryLogic.PhysicalDefense(player).ToString("F2"); txtDetailMagicAttack.text = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Min).ToString("F2"); txtDetailMagicAttackMax.text = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Max).ToString("F2"); txtDetailMagicDefense.text = PrimaryLogic.MagicDefense(player).ToString("F2"); txtDetailBattleAccuracy.text = PrimaryLogic.BattleAccuracy(player).ToString("F2"); txtDetailBattleSpeed.text = PrimaryLogic.BattleSpeed(player).ToString("F2"); txtDetailBattleResponse.text = PrimaryLogic.BattleResponse(player).ToString("F2"); txtDetailPotential.text = PrimaryLogic.Potential(player).ToString("F2"); txtDetailRemainPoint.text = player.RemainPoint.ToString(); txtDetailMainWeapon.text = (player.MainWeapon?.ItemName ?? "( 装備なし )"); imgDetailMainWeapon.sprite = Resources.Load <Sprite>("Icon_" + player.MainWeapon?.ItemType.ToString() ?? ""); txtDetailSubWeapon.text = (player.SubWeapon?.ItemName ?? "( 装備なし )"); imgDetailSubWeapon.sprite = Resources.Load <Sprite>("Icon_" + player.SubWeapon?.ItemType.ToString() ?? ""); txtDetailArmor.text = (player.MainArmor?.ItemName ?? "( 装備なし )"); imgDetailArmor.sprite = Resources.Load <Sprite>("Icon_" + player.MainArmor?.ItemType.ToString() ?? ""); txtDetailAccessory1.text = (player.Accessory1?.ItemName ?? "( 装備なし )"); imgDetailAccessory1.sprite = Resources.Load <Sprite>("Icon_" + player.Accessory1?.ItemType.ToString() ?? ""); txtDetailAccessory2.text = (player.Accessory2?.ItemName ?? "( 装備なし )"); imgDetailAccessory2.sprite = Resources.Load <Sprite>("Icon_" + player.Accessory2?.ItemType.ToString() ?? ""); txtDetailArtifact.text = (player.Artifact?.ItemName ?? "( 装備なし )"); imgDetailArtifact.sprite = Resources.Load <Sprite>("Icon_" + player.Artifact?.ItemType.ToString() ?? ""); float dx = (float)player.Exp / (float)player.GetNextExp(); if (imgDetailExp != null) { imgDetailExp.rectTransform.localScale = new Vector2(dx, 1.0f); } if (ShadowPlayer != null) { UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailStrength, CurrentPlayer.TotalStrength, ShadowPlayer.TotalStrength); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailAgility, CurrentPlayer.TotalAgility, ShadowPlayer.TotalAgility); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailIntelligence, CurrentPlayer.TotalIntelligence, ShadowPlayer.TotalIntelligence); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailStamina, CurrentPlayer.TotalStamina, ShadowPlayer.TotalStamina); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailMind, CurrentPlayer.TotalMind, ShadowPlayer.TotalMind); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailLife, CurrentPlayer.MaxLife, ShadowPlayer.MaxLife); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailPhysicalAttack, PrimaryLogic.PhysicalAttack(CurrentPlayer, PrimaryLogic.ValueType.Min), PrimaryLogic.PhysicalAttack(ShadowPlayer, PrimaryLogic.ValueType.Min)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailPhysicalAttackMax, PrimaryLogic.PhysicalAttack(CurrentPlayer, PrimaryLogic.ValueType.Max), PrimaryLogic.PhysicalAttack(ShadowPlayer, PrimaryLogic.ValueType.Max)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailPhysicalDefense, PrimaryLogic.PhysicalDefense(CurrentPlayer), PrimaryLogic.PhysicalDefense(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailMagicAttack, PrimaryLogic.MagicAttack(CurrentPlayer, PrimaryLogic.ValueType.Min), PrimaryLogic.MagicAttack(ShadowPlayer, PrimaryLogic.ValueType.Min)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailMagicAttackMax, PrimaryLogic.MagicAttack(CurrentPlayer, PrimaryLogic.ValueType.Max), PrimaryLogic.MagicAttack(ShadowPlayer, PrimaryLogic.ValueType.Max)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailMagicDefense, PrimaryLogic.MagicDefense(CurrentPlayer), PrimaryLogic.MagicDefense(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailBattleAccuracy, PrimaryLogic.BattleAccuracy(CurrentPlayer), PrimaryLogic.BattleAccuracy(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailBattleSpeed, PrimaryLogic.BattleSpeed(CurrentPlayer), PrimaryLogic.BattleSpeed(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailBattleResponse, PrimaryLogic.BattleResponse(CurrentPlayer), PrimaryLogic.BattleResponse(ShadowPlayer)); UpdateBattleValueWithShadow(CurrentPlayer, ShadowPlayer, txtDetailPotential, PrimaryLogic.Potential(CurrentPlayer), PrimaryLogic.Potential(ShadowPlayer)); } if (player.Exp < player.GetNextExp()) { txtDetailLevel.text = this.CurrentPlayer.Level.ToString(); //GroupLevelUp?.SetActive(true); } else { txtDetailLevel.text = this.CurrentPlayer.Level.ToString() + " -> <color=blue>" + (this.CurrentPlayer.Level + 1).ToString() + "</color>"; txtDetailExp.text = "MAX"; //GroupLevelUp?.SetActive(true); } Debug.Log("remain " + CurrentPlayer.FullName + " " + CurrentPlayer.RemainPoint); if (CurrentPlayer.RemainPoint > 0) { for (int ii = 0; ii < btnPlus.Count; ii++) { btnPlus[ii].SetActive(true); } } else { for (int ii = 0; ii < btnPlus.Count; ii++) { btnPlus[ii].SetActive(false); } } }
public static double BloodSign(Character player) { return(PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * 1.00f); }
public static double HeartOfLife(Character player) { return(PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * 1.00f); }
public static double VenomSlash_2(Character player) { return(PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * 0.50f); }