public IMonsterPartsProcessState Update(MonsterParts monsterParts)
    {
        if (monsterParts.GetTimeCounter().measure(Time.deltaTime, monsterParts.GetIdleTimeRegulation()))
        {
            Vector3 vec3 = new Vector3(
                monsterParts.GetEventGameObject().GetGameObject().transform.position.x,
                monsterParts.GetEventGameObject().GetGameObject().transform.position.y + monsterParts.GetProcessIdleState().addPos_,
                monsterParts.GetEventGameObject().GetGameObject().transform.position.z
                );
            t13.UnityUtil.ObjectPosMove(monsterParts.GetEventGameObject().GetGameObject(), vec3);

            monsterParts.SetProcessIdleState(monsterParts.GetProcessIdleState().Next());
        }

        return(this);
    }
    public override bool EffectValueEventSet(BattleManager mgr, BTrainerBattleData attackTrainerBattleData, BTrainerBattleData defenseTrainerBattleData, EffectParts attackEffectParts, EffectParts defenseEffectParts, MonsterParts defenseMonsterParts, StatusInfoParts attackStatusInfoParts, StatusInfoParts defenseStatusInfoParts, DreamPointInfoParts attackDreamPointInfoParts, DreamPointInfoParts defenseDreamPointInfoParts, IMonsterData attackMonsterData, ISkillData attackSkillData, IMonsterData defenseMonsterData)
    {
        //攻撃の成功判定
        //技の命中率×命中補正値M×ランク補正
        bool skillSuccess = AllSceneManager.GetInstance().GetRandom().Next(0, 100) < (int)(attackSkillData.successRateValue_ * (4096 / 4096));

        //技が失敗した時の説明
        if (!skillSuccess)
        {
            AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), "しかし " + attackTrainerBattleData.GetUniqueTrainerName() + attackMonsterData.uniqueName_ + "は\nうまく きめられなかった!");
            AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
            AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

            AllEventManager.GetInstance().EventWaitSet(1.0f);

            return(false);
        }

        //ヒットポイントの変動
        attackMonsterData.nowHitPoint_ += (int)attackSkillData.effectValue_;
        if (attackMonsterData.nowHitPoint_ > attackMonsterData.RealHitPoint())
        {
            attackMonsterData.nowHitPoint_ = attackMonsterData.RealHitPoint();
        }

        //技のアニメーション
        attackSkillData.EffectAnimetionEventSet(attackEffectParts);

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        //ヒットポイントのゲージの変動イベントの設定
        float hpGaugeFillAmount = t13.Utility.ValueForPercentage(attackMonsterData.RealHitPoint(), attackMonsterData.nowHitPoint_, 1);

        AllEventManager.GetInstance().HpGaugePartsSet(attackStatusInfoParts.GetFrameParts().GetHpGaugeParts(), hpGaugeFillAmount, attackMonsterData);
        AllEventManager.GetInstance().HpGaugePartsUpdateExecuteSet(HpGaugePartsEventManagerExecute.GaugeUpdate);
        AllEventManager.GetInstance().AllUpdateEventExecute(0.5f);

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        //文字列の処理
        AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), attackTrainerBattleData.GetUniqueTrainerName() + attackMonsterData.uniqueName_ + "は\nたいりょくを かいふくした!");
        AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
        AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        return(true);
    }
Esempio n. 3
0
 public override bool EffectValueEventSet(BattleManager mgr, BTrainerBattleData attackTrainerBattleData, BTrainerBattleData defenseTrainerBattleData, EffectParts attackEffectParts, EffectParts defenseEffectParts, MonsterParts defenseMonsterParts, StatusInfoParts attackStatusInfoParts, StatusInfoParts defenseStatusInfoParts, DreamPointInfoParts attackDreamPointInfoParts, DreamPointInfoParts defenseDreamPointInfoParts, IMonsterData attackMonsterData, ISkillData attackSkillData, IMonsterData defenseMonsterData)
 {
     return(base.EffectValueEventSet(mgr, attackTrainerBattleData, defenseTrainerBattleData, attackEffectParts, defenseEffectParts, defenseMonsterParts, attackStatusInfoParts, defenseStatusInfoParts, attackDreamPointInfoParts, defenseDreamPointInfoParts, attackMonsterData, attackSkillData, defenseMonsterData));
 }
 public IMonsterPartsProcessState Update(MonsterParts monsterParts)
 {
     return(this);
 }
Esempio n. 5
0
    public override bool EffectValueEventSet(BattleManager mgr, BTrainerBattleData attackTrainerBattleData, BTrainerBattleData defenseTrainerBattleData, EffectParts attackEffectParts, EffectParts defenseEffectParts, MonsterParts defenseMonsterParts, StatusInfoParts attackStatusInfoParts, StatusInfoParts defenseStatusInfoParts, DreamPointInfoParts attackDreamPointInfoParts, DreamPointInfoParts defenseDreamPointInfoParts, IMonsterData attackMonsterData, ISkillData attackSkillData, IMonsterData defenseMonsterData)
    {
        //ランク補正の計算
        float monsterHitRateValue = 0;
        {
            //回避率と命中率のランク
            int monsterHitRank = attackMonsterData.battleData_.GetHitRateParameterRank() - defenseMonsterData.battleData_.GetAvoidRateParameterRank();

            //分子,分母
            float numerator = 3, denominator = 3;

            if (monsterHitRank < 0)
            {
                denominator -= monsterHitRank;
            }
            else
            {
                numerator += monsterHitRank;
            }

            //回避率と命中率のランクの倍率
            monsterHitRateValue = numerator / denominator;
        }

        //攻撃の成功判定
        //技の命中率×命中補正値M×ランク補正
        bool skillSuccess = AllSceneManager.GetInstance().GetRandom().Next(0, 100) < (int)(attackSkillData.successRateValue_ * (4096 / 4096) * monsterHitRateValue);

        //技が失敗した時の説明
        if (!skillSuccess)
        {
            AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), "しかし " + attackTrainerBattleData.GetUniqueTrainerName() + attackMonsterData.uniqueName_ + "の\nこうげきは はずれた!");
            AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
            AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

            AllEventManager.GetInstance().EventWaitSet(1.0f);

            return(false);
        }

        //急所の判定
        float critical = 1;

        if (attackSkillData.criticalParameterRank_ <= 0)
        {
            if (AllSceneManager.GetInstance().GetRandom().Next(0, 24) == 13)
            {
                critical = 1.5f;
            }
        }
        else if (attackSkillData.criticalParameterRank_ == 1)
        {
            if (AllSceneManager.GetInstance().GetRandom().Next(0, 8) == 4)
            {
                critical = 1.5f;
            }
        }
        else if (attackSkillData.criticalParameterRank_ == 2)
        {
            if (AllSceneManager.GetInstance().GetRandom().Next(0, 2) == 0)
            {
                critical = 1.5f;
            }
        }
        else
        {
            critical = 1.5f;
        }

        //ヒットポイントの変動
        int realEffectValue = (int)(MonsterData.BattleDamageCalculate(attackMonsterData, defenseMonsterData, attackSkillData) * critical);

        defenseMonsterData.nowHitPoint_ -= realEffectValue;
        if (defenseMonsterData.nowHitPoint_ < 0)
        {
            defenseMonsterData.nowHitPoint_ = 0;
        }

        //DPの変動
        //PlayerBattleData.GetInstance().dreamPoint_ += playerSkillData.upDpValue_;
        int attackElementSimillarRsult = defenseMonsterData.ElementSimillarCheckerForValue(attackSkillData.elementType_);

        if (attackElementSimillarRsult == 3)
        {
            attackTrainerBattleData.DreamPointAddValue(AllSceneManager.GetInstance().GetUpDPValueBestSimillar());
        }
        else if (attackElementSimillarRsult == 2)
        {
            attackTrainerBattleData.DreamPointAddValue(AllSceneManager.GetInstance().GetUpDPValueNormalSimillar());
        }
        else if (attackElementSimillarRsult == 1)
        {
            attackTrainerBattleData.DreamPointAddValue(AllSceneManager.GetInstance().GetUpDPValueBadSimillar());
        }
        else if (attackElementSimillarRsult == 0)
        {
            attackTrainerBattleData.DreamPointAddValue(AllSceneManager.GetInstance().GetUpDPValueNotSimillar());
        }

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        //DPの演出のイベント
        attackDreamPointInfoParts.DPEffectEventSet(attackTrainerBattleData.GetDreamPoint());

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        //技のアニメーション
        attackSkillData.EffectAnimetionEventSet(defenseEffectParts);

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        //ダメージを受けていたら
        if (realEffectValue > 0)
        {
            //ダメージアクション(点滅)
            defenseMonsterParts.GetEventMonsterSprite().blinkTimeRegulation_ = 0.06f;

            //点滅の開始
            AllEventManager.GetInstance().EventSpriteRendererSet(defenseMonsterParts.GetEventMonsterSprite());
            AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.BlinkStart);
            AllEventManager.GetInstance().AllUpdateEventExecute();

            //ウェイト
            AllEventManager.GetInstance().EventWaitSet(0.48f);

            //点滅の終了
            AllEventManager.GetInstance().EventSpriteRendererSet(defenseMonsterParts.GetEventMonsterSprite());
            AllEventManager.GetInstance().EventSpriteRenderersUpdateExecuteSet(EventSpriteRendererEventManagerExecute.BlinkEnd);
            AllEventManager.GetInstance().AllUpdateEventExecute();

            //ウェイト
            AllEventManager.GetInstance().EventWaitSet(0.2f);

            //ヒットポイントのゲージの変動イベントの設定
            float hpGaugeFillAmount = t13.Utility.ValueForPercentage(defenseMonsterData.RealHitPoint(), defenseMonsterData.nowHitPoint_, 1);
            AllEventManager.GetInstance().HpGaugePartsSet(defenseStatusInfoParts.GetFrameParts().GetHpGaugeParts(), hpGaugeFillAmount, defenseMonsterData);
            AllEventManager.GetInstance().HpGaugePartsUpdateExecuteSet(HpGaugePartsEventManagerExecute.GaugeUpdate);
            AllEventManager.GetInstance().AllUpdateEventExecute(0.5f);

            //ウェイト
            AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

            if (critical > 1.0f)
            {
                //急所の説明
                AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), "きゅうしょに あたった!");
                AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
                AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

                AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());
            }

            //効果の説明
            int defenseElementSimillarResult = defenseMonsterData.ElementSimillarCheckerForValue(attackSkillData.elementType_);
            if (defenseElementSimillarResult == 3)
            {
                //DPの増加
                defenseTrainerBattleData.DreamPointAddValue(AllSceneManager.GetInstance().GetUpDPValueBestSimillar());

                //文字列の処理
                AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), "こうかは ばつぐんだ!");
                AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
                AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

                //ウェイト
                AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());
            }
            else if (defenseElementSimillarResult == 2)
            {
                //DPの増加
                defenseTrainerBattleData.DreamPointAddValue(AllSceneManager.GetInstance().GetUpDPValueNormalSimillar());
            }
            else if (defenseElementSimillarResult == 1)
            {
                //DPの増加
                defenseTrainerBattleData.DreamPointAddValue(AllSceneManager.GetInstance().GetUpDPValueBadSimillar());

                //文字列の処理
                AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), "こうかは いまひとつの ようだ");
                AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
                AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

                //ウェイト
                AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());
            }
            else if (defenseElementSimillarResult == 0)
            {
                //DPの増加
                defenseTrainerBattleData.DreamPointAddValue(AllSceneManager.GetInstance().GetUpDPValueNotSimillar());

                //文字列の処理
                AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), "こうかが ないようだ・・・");
                AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
                AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

                //ウェイト
                AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());
            }

            //DPの演出のイベント
            defenseDreamPointInfoParts.DPEffectEventSet(defenseTrainerBattleData.GetDreamPoint());

            //ウェイト
            AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());
        }

        return(true);
    }
Esempio n. 6
0
 public virtual bool EffectValueEventSet(BattleManager mgr, BTrainerBattleData attackTrainerBattleData, BTrainerBattleData defenseTrainerBattleData, EffectParts attackEffectParts, EffectParts defenseEffectParts, MonsterParts defenseMonsterParts, StatusInfoParts attackStatusInfoParts, StatusInfoParts defenseStatusInfoParts, DreamPointInfoParts attackDreamPointInfoParts, DreamPointInfoParts defenseDreamPointInfoParts, IMonsterData attackMonsterData, ISkillData attackSkillData, IMonsterData defenseMonsterData)
 {
     return(false);
 }
Esempio n. 7
0
    public override bool EffectValueEventSet(BattleManager mgr, BTrainerBattleData attackTrainerBattleData, BTrainerBattleData defenseTrainerBattleData, EffectParts attackEffectParts, EffectParts defenseEffectParts, MonsterParts defenseMonsterParts, StatusInfoParts attackStatusInfoParts, StatusInfoParts defenseStatusInfoParts, DreamPointInfoParts attackDreamPointInfoParts, DreamPointInfoParts defenseDreamPointInfoParts, IMonsterData attackMonsterData, ISkillData attackSkillData, IMonsterData defenseMonsterData)
    {
        //技のアニメーション
        attackSkillData.EffectAnimetionEventSet(defenseEffectParts);
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        return(true);
    }
    private void SkillResultSet(BattleManager mgr, EffectParts attackEffectParts, EffectParts defenseEffectParts, MonsterParts defenseMonsterParts, StatusInfoParts attackStatusInfoParts, StatusInfoParts defenseStatusInfoParts, DreamPointInfoParts attackDreamPointInfoParts, DreamPointInfoParts defenseDreamPointInfoParts, BTrainerBattleData attackTrainerBattleData, BTrainerBattleData defenseTrainerBattleData, IMonsterData attackMonsterData, ISkillData attackSkillData, IMonsterData defenseMonsterData)
    {
        //ダウンしていたら
        if (!attackMonsterData.battleActive_)
        {
            return;
        }

        //交換されていたら
        //if (attackTrainerBattleData.changeMonsterActive_) return;

        //ねむりターンの消費
        mgr.SleepProcessUse(attackTrainerBattleData, attackStatusInfoParts);

        //こんらんターンの消費
        mgr.ConfusionProcessUse(attackTrainerBattleData, attackStatusInfoParts);

        //文字列の設定
        string skillUseContext = attackTrainerBattleData.GetUniqueTrainerName() + attackMonsterData.uniqueName_ + "の\n"
                                 + attackSkillData.skillName_ + "!";

        AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), skillUseContext);
        AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
        AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        //技のイベントの設定
        bool skillResult = attackSkillData.effectValueType_.EffectValueEventSet(
            mgr
            , attackTrainerBattleData
            , defenseTrainerBattleData
            , attackEffectParts
            , defenseEffectParts
            , defenseMonsterParts
            , attackStatusInfoParts
            , defenseStatusInfoParts
            , attackDreamPointInfoParts
            , defenseDreamPointInfoParts
            , attackMonsterData, attackSkillData, defenseMonsterData
            );

        //技が当たっていなかったら
        if (!skillResult)
        {
            return;
        }

        //追加効果の判定
        bool optionEffectTrigger = AllSceneManager.GetInstance().GetRandom().Next(0, 100) < attackSkillData.optionEffectTriggerRateValue_;

        //追加効果の処理
        if (optionEffectTrigger)
        {
            //能力変化の処理
            ParameterRankEventSet(
                mgr
                , attackTrainerBattleData
                , attackMonsterData, attackSkillData, defenseMonsterData
                );

            //状態異常の処理
            AbnormalEventSet(
                mgr
                , attackStatusInfoParts
                , defenseStatusInfoParts
                , attackTrainerBattleData
                , defenseTrainerBattleData
                , attackMonsterData, attackSkillData, defenseMonsterData);
        }

        if (defenseMonsterData.nowHitPoint_ <= 0)
        {
            //モンスターが倒れた時のイベント
            defenseTrainerBattleData.MonsterDownEventSet(mgr);

            AllEventManager.GetInstance().EventFinishSet();
        }
    }
Esempio n. 9
0
    public override bool EffectValueEventSet(BattleManager mgr, BTrainerBattleData attackTrainerBattleData, BTrainerBattleData defenseTrainerBattleData, EffectParts attackEffectParts, EffectParts defenseEffectParts, MonsterParts defenseMonsterParts, StatusInfoParts attackStatusInfoParts, StatusInfoParts defenseStatusInfoParts, DreamPointInfoParts attackDreamPointInfoParts, DreamPointInfoParts defenseDreamPointInfoParts, IMonsterData attackMonsterData, ISkillData attackSkillData, IMonsterData defenseMonsterData)
    {
        //攻撃の成功判定
        //技の命中率×命中補正値M×ランク補正
        bool skillSuccess = AllSceneManager.GetInstance().GetRandom().Next(0, 100) < (int)(attackSkillData.successRateValue_ * (4096 / 4096));

        //技が失敗した時の説明
        if (!skillSuccess)
        {
            AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), "しかし " + attackTrainerBattleData.GetUniqueTrainerName() + attackMonsterData.uniqueName_ + "は\nうまく きめられなかった!");
            AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
            AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

            AllEventManager.GetInstance().EventWaitSet(1.0f);

            return(false);
        }

        //ドリームポイントの変動
        attackTrainerBattleData.DreamPointAddValue((int)attackSkillData.effectValue_);
        defenseTrainerBattleData.DreamPointAddValue(-(int)attackSkillData.effectValue_);

        //技のアニメーション
        attackSkillData.EffectAnimetionEventSet(attackEffectParts);

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        //DPの演出のイベント
        defenseDreamPointInfoParts.DPEffectEventSet(defenseTrainerBattleData.GetDreamPoint());

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        //DPの演出のイベント
        attackDreamPointInfoParts.DPEffectEventSet(attackTrainerBattleData.GetDreamPoint());

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        //文字列の処理
        AllEventManager.GetInstance().EventTextSet(mgr.GetNovelWindowParts().GetNovelWindowEventText(), attackTrainerBattleData.GetUniqueTrainerName() + attackMonsterData.uniqueName_ + "は\nドリームポイントを うばった!");
        AllEventManager.GetInstance().EventTextsUpdateExecuteSet(EventTextEventManagerExecute.CharaUpdate);
        AllEventManager.GetInstance().AllUpdateEventExecute(mgr.GetEventContextUpdateTime());

        //ウェイト
        AllEventManager.GetInstance().EventWaitSet(mgr.GetEventWaitTime());

        return(true);
    }