Exemple #1
0
 private void ExecBlueBullet(Character player, Character target, CriticalType critical)
 {
     for (int ii = 0; ii < 3; ii++)
     {
         ExecMagicAttack(player, target, SecondaryLogic.BlueBullet(player), Fix.DamageSource.Ice, critical);
     }
 }
Exemple #2
0
 public void ExecIrregularStep(Character player, Character target)
 {
     this.NowIrregularStepPlayer  = player;
     this.NowIrregularStepTarget  = target;
     this.NowIrregularStepCounter = SecondaryLogic.IrregularStep_GaugeStep(player) * BATTLE_GAUGE_WITDH;
     this.NowIrregularStepMode    = true;
 }
Exemple #3
0
 private void ExecCircleSlash(Character player, List <Character> target_list, CriticalType critical)
 {
     Debug.Log(MethodBase.GetCurrentMethod());
     for (int ii = 0; ii < target_list.Count; ii++)
     {
         ExecNormalAttack(player, target_list[ii], SecondaryLogic.NormalAttack(player), critical);
     }
 }
Exemple #4
0
 private void ExecMeteorBullet(Character player, List <Character> target_list, CriticalType critical)
 {
     for (int ii = 0; ii < 3; ii++)
     {
         int rand = AP.Math.RandomInteger(target_list.Count);
         ExecMagicAttack(player, target_list[rand], SecondaryLogic.MeteorBullet(player), Fix.DamageSource.Fire, critical);
     }
 }
Exemple #5
0
    private void ExecOracleCommand(Character player, Character target)
    {
        Debug.Log(MethodBase.GetCurrentMethod());
        int effectValue = SecondaryLogic.OracleCommand(player);

        target.CurrentActionPoint += effectValue;
        StartAnimation(target.objGroup.gameObject, "AP +" + effectValue.ToString(), Fix.COLOR_NORMAL);
    }
Exemple #6
0
 private void ExecDoubleSlash(Character player, Character target, CriticalType critical)
 {
     Debug.Log(MethodBase.GetCurrentMethod());
     for (int ii = 0; ii < 2; ii++)
     {
         ExecNormalAttack(player, target, SecondaryLogic.NormalAttack(player), critical);
     }
 }
Exemple #7
0
    public void ExecConcussiveHit(Character player, Character target, CriticalType critical)
    {
        bool success = ExecNormalAttack(player, target, SecondaryLogic.ConcussiveHit(player), critical);

        if (success)
        {
            ExecBuffPhysicalDown(player, target, SecondaryLogic.ConcussiveHit_Turn(player), SecondaryLogic.ConcussiveHit(player));
        }
    }
Exemple #8
0
    private void ExecDivineCircle(Character player, Character target, BuffField target_field_obj)
    {
        if (target_field_obj == null)
        {
            Debug.Log("target_field_obj is null..."); return;
        }

        target_field_obj.AddBuff(prefab_Buff, Fix.DIVINE_CIRCLE, SecondaryLogic.DivineCircle_Turn(player), SecondaryLogic.DivineCircle(player), 0);
        StartAnimation(target_field_obj.gameObject, Fix.DIVINE_CIRCLE, Fix.COLOR_NORMAL);
    }
Exemple #9
0
    public void ExecVoiceOfVigor(Character player, List <Character> target_list)
    {
        for (int ii = 0; ii < target_list.Count; ii++)
        {
            target_list[ii].objBuffPanel.AddBuff(prefab_Buff, Fix.VOICE_OF_VIGOR, SecondaryLogic.VoiceOfVigor_Turn(player), SecondaryLogic.VoiceOfVigor(player), 0);
            StartAnimation(target_list[ii].objGroup.gameObject, Fix.VOICE_OF_VIGOR, Fix.COLOR_NORMAL);

            ExecLifeGain(target_list[ii], (target_list[ii].MaxLife / 10.0f));
        }
    }
Exemple #10
0
    private void ExecInvisibleBind(Character player, Character target, CriticalType critical)
    {
        Debug.Log(MethodBase.GetCurrentMethod());
        bool success = ExecNormalAttack(player, target, SecondaryLogic.InvisibleBind(player), critical);

        if (success)
        {
            target.objBuffPanel.AddBuff(prefab_Buff, Fix.EFFECT_BIND, SecondaryLogic.InvibisleBind_Turn(player), 0, 0);
            StartAnimation(target.objGroup.gameObject, Fix.EFFECT_BIND, Fix.COLOR_NORMAL);
        }
    }
Exemple #11
0
    private void ExecVenomSlash(Character player, Character target, CriticalType critical)
    {
        Debug.Log(MethodBase.GetCurrentMethod());
        bool success = ExecNormalAttack(player, target, SecondaryLogic.VenomSlash(player), critical);

        if (success)
        {
            target.objBuffPanel.AddBuff(prefab_Buff, Fix.EFFECT_POISON, SecondaryLogic.VenomSlash_Turn(player), SecondaryLogic.VenomSlash_2(player), 0);
            StartAnimation(target.objGroup.gameObject, Fix.EFFECT_POISON, Fix.COLOR_NORMAL);
        }
    }
Exemple #12
0
    private void ExecHunterShot(Character player, Character target, CriticalType critical)
    {
        Debug.Log(MethodBase.GetCurrentMethod());
        bool success = ExecNormalAttack(player, target, SecondaryLogic.HunterShot(player), critical);

        if (success)
        {
            target.objBuffPanel.AddBuff(prefab_Buff, Fix.HUNTER_SHOT, SecondaryLogic.HunterShot_Turn(player), SecondaryLogic.HunterShot_Value(player), 0);
            StartAnimation(target.objGroup.gameObject, Fix.HUNTER_SHOT, Fix.COLOR_NORMAL);
        }
    }
Exemple #13
0
 private void ExecSpiritualRest(Character player, Character target)
 {
     Debug.Log(MethodBase.GetCurrentMethod());
     if (target.IsStun)
     {
         target.RemoveStun();
         StartAnimation(target.objGroup.gameObject, Fix.EFFECT_REMOVE_STUN, Fix.COLOR_NORMAL);
     }
     target.objBuffPanel.AddBuff(prefab_Buff, Fix.BUFF_RESIST_STUN, SecondaryLogic.SpiritualRest_Turn(player), 0, 0);
     StartAnimation(target.objGroup.gameObject, Fix.BUFF_RESIST_STUN, Fix.COLOR_NORMAL);
 }
Exemple #14
0
    private void ExecIceNeedle(Character player, Character target, CriticalType critical)
    {
        Debug.Log(MethodBase.GetCurrentMethod());
        bool success = ExecMagicAttack(player, target, SecondaryLogic.IceNeedle(player), Fix.DamageSource.Ice, critical);

        if (success)
        {
            target.objBuffPanel.AddBuff(prefab_Buff, Fix.ICE_NEEDLE, SecondaryLogic.IceNeedle_Turn(player), SecondaryLogic.IceNeedle_Value(player), 0);
            StartAnimation(target.objGroup.gameObject, Fix.ICE_NEEDLE, Fix.COLOR_NORMAL);
        }
    }
Exemple #15
0
    private void ExecShadowBlast(Character player, Character target, CriticalType critical)
    {
        Debug.Log(MethodBase.GetCurrentMethod());
        bool success = ExecMagicAttack(player, target, SecondaryLogic.ShadowBlast(player), Fix.DamageSource.DarkMagic, critical);

        if (success)
        {
            target.objBuffPanel.AddBuff(prefab_Buff, Fix.SHADOW_BLAST, SecondaryLogic.ShadowBlast_Turn(player), SecondaryLogic.ShadowBlast_Value(player), 0);
            StartAnimation(target.objGroup.gameObject, Fix.SHADOW_BLAST, Fix.COLOR_NORMAL);
        }
    }
Exemple #16
0
    private void ExecShieldBash(Character player, Character target, CriticalType critical)
    {
        Debug.Log(MethodBase.GetCurrentMethod());
        bool success = ExecNormalAttack(player, target, SecondaryLogic.ShieldBash(player), critical);

        if (success)
        {
            if (target.IsResistStun)
            {
                StartAnimation(target.objGroup.gameObject, Fix.EFFECT_RESIST_STUN, Fix.COLOR_NORMAL);
                return;
            }

            target.objBuffPanel.AddBuff(prefab_Buff, Fix.EFFECT_STUN, SecondaryLogic.ShieldBash_Turn(player), 0, 0);
            StartAnimation(target.objGroup.gameObject, Fix.EFFECT_STUN, Fix.COLOR_NORMAL);
        }
    }
Exemple #17
0
    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);
    }
Exemple #18
0
    /// <summary>
    /// 基本ロジックを内包した物理攻撃実行コマンド
    /// </summary>
    private bool ExecNormalAttack(Character player, Character target, double magnify, CriticalType critical)
    {
        Debug.Log(MethodBase.GetCurrentMethod());

        // ターゲットが既に死んでいる場合
        if (target.Dead)
        {
            StartAnimation(target.objGroup.gameObject, Fix.BATTLE_MISS, Fix.COLOR_NORMAL);
            this.NowAnimationMode = true;
            return(false);
        }

        // ターゲットに対して命中していない場合
        if (player.IsDizzy)
        {
            if (AP.Math.RandomInteger(100) > (int)player.IsDizzy.EffectValue)
            {
                StartAnimation(target.objGroup.gameObject, Fix.BATTLE_DIZZY_MISS, Fix.COLOR_NORMAL);
                this.NowAnimationMode = true;
                return(false);
            }
        }

        // 攻撃コマンドのダメージを算出
        double damageValue = PhysicalDamageLogic(player, target, magnify, Fix.DamageSource.Physical, critical);

        // ディバイン・フィールドによる効果
        BuffField panelField = GetPanelFieldFromPlayer(target);

        if (panelField != null)
        {
            BuffImage buffImage = PreCheckFieldEffect(panelField.gameObject, Fix.DIVINE_CIRCLE);
            if (buffImage != null)
            {
                Debug.Log("DivineShiled: " + player.FullName + " -> " + damageValue.ToString("F2") + " " + buffImage.EffectValue.ToString("F2"));
                buffImage.EffectValue -= damageValue;
                StartAnimationGroupPanel(buffImage.gameObject, Fix.BATTLE_DIVINE + "\r\n " + (int)(buffImage.EffectValue), Fix.COLOR_NORMAL);
                if (buffImage.EffectValue <= 0)
                {
                    buffImage.RemoveBuff();
                }
                return(false); // ディバイン・フィールドで吸収された場合はヒットしたことにならない。
            }
        }

        // ダメージ適用
        ApplyDamage(player, target, damageValue);

        // 追加効果
        if (player.IsFlameBlade && player.Dead == false)
        {
            double addDamageValue = MagicDamageLogic(player, target, SecondaryLogic.MagicAttack(player), Fix.DamageSource.Fire, critical);
            ApplyDamage(player, target, addDamageValue);
        }
        BuffImage stanceOfTheBlade = player.IsStanceOfTheBlade;

        if (stanceOfTheBlade != null)
        {
            stanceOfTheBlade.Cumulative++;
        }
        BuffImage stanceOfTheGuard = target.IsStanceOfTheGuard;

        if (target.IsStanceOfTheGuard && target.IsDefense && target.Dead == false)
        {
            stanceOfTheGuard.Cumulative++;
        }

        return(true);
    }
Exemple #19
0
    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);
    }
Exemple #20
0
    public void ExecMuteImpulse(Character player, Character target, CriticalType critical)
    {
        int positiveCount = target.GetPositiveBuff() + 1;

        ExecMagicAttack(player, target, SecondaryLogic.MuteImpulse(player) * positiveCount, Fix.DamageSource.Colorless, critical);
    }
Exemple #21
0
 public void ExecStormArmor(Character player, Character target)
 {
     target.objBuffPanel.AddBuff(prefab_Buff, Fix.STORM_ARMOR, SecondaryLogic.StormArmor_Turn(player), SecondaryLogic.StormArmor_SpeedUp(player), SecondaryLogic.StormArmor_Damage(player));
     StartAnimation(target.objGroup.gameObject, Fix.STORM_ARMOR, Fix.COLOR_NORMAL);
 }
Exemple #22
0
    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;
        }
    }
Exemple #23
0
 private void ExecFlameBlade(Character player, Character target)
 {
     Debug.Log(MethodBase.GetCurrentMethod());
     target.objBuffPanel.AddBuff(prefab_Buff, Fix.FLAME_BLADE, SecondaryLogic.FlameBlade_Turn(player), SecondaryLogic.FlameBlade(player), 0);
     StartAnimation(target.objBuffPanel.gameObject, Fix.FLAME_BLADE, Fix.COLOR_NORMAL);
 }
Exemple #24
0
 public void ExecEyeOfTheTruth(Character player, Character target)
 {
     player.objBuffPanel.AddBuff(prefab_Buff, Fix.EYE_OF_THE_TRUTH, SecondaryLogic.EyeOfTheTruth_Turn(player), SecondaryLogic.EyeOfTheTruth(player), 0);
     StartAnimation(target.objGroup.gameObject, Fix.EYE_OF_THE_TRUTH, Fix.COLOR_NORMAL);
 }
Exemple #25
0
 private void ExecBloodSign(Character player, Character target)
 {
     Debug.Log(MethodBase.GetCurrentMethod());
     target.objBuffPanel.AddBuff(prefab_Buff, Fix.BLOOD_SIGN, SecondaryLogic.BloodSign_Turn(player), SecondaryLogic.BloodSign(player), 0);
     StartAnimation(target.objGroup.gameObject, Fix.BLOOD_SIGN, Fix.COLOR_NORMAL);
 }
Exemple #26
0
 public void ExecBlackContract(Character player)
 {
     player.objBuffPanel.AddBuff(prefab_Buff, Fix.BLACK_CONTRACT, SecondaryLogic.BlackContract_Turn(player), SecondaryLogic.BlackContract(player), 0);
     StartAnimation(player.objGroup.gameObject, Fix.BLACK_CONTRACT, Fix.COLOR_NORMAL);
 }
Exemple #27
0
 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);
     }
 }
Exemple #28
0
 private void ExecSkyShield(Character player, Character target)
 {
     Debug.Log(MethodBase.GetCurrentMethod());
     target.objBuffPanel.AddBuff(prefab_Buff, Fix.SKY_SHIELD, SecondaryLogic.SkyShield_Turn(player), SecondaryLogic.SkyShield_Value(player), 0);
     StartAnimation(target.objGroup.gameObject, Fix.SKY_SHIELD, Fix.COLOR_NORMAL);
 }
Exemple #29
0
 private void ExecStanceOfTheGuard(Character player, Character target)
 {
     Debug.Log(MethodBase.GetCurrentMethod());
     target.objBuffPanel.AddBuff(prefab_Buff, Fix.STANCE_OF_THE_GUARD, SecondaryLogic.StanceOfTheGuard_Turn(player), SecondaryLogic.StanceOfTheGuard(player), 0);
     StartAnimation(target.objGroup.gameObject, Fix.STANCE_OF_THE_GUARD, Fix.COLOR_NORMAL);
 }
Exemple #30
0
 private void ExecFortuneSpirit(Character player, Character target)
 {
     Debug.Log(MethodBase.GetCurrentMethod());
     target.objBuffPanel.AddBuff(prefab_Buff, Fix.FORTUNE_SPIRIT, SecondaryLogic.FortuneSpirit_Turn(player), SecondaryLogic.FortuneSpirit(player), 0);
     StartAnimation(target.objGroup.gameObject, Fix.FORTUNE_SPIRIT, Fix.COLOR_NORMAL);
 }