예제 #1
0
    public void SetAllyStatus(AllyStatus charaStatus)
    {
        if (!partyMembers.Contains(charaStatus))
        {
            partyMembers.Add(charaStatus);
            //プレイヤーのレベルを取得
            int playerLevel = this.GetAllyStatus()[0].GetLevel();
            //加入するキャラのステータスを初期化
            charaStatus.StatusInit();
            // 変数を初期化
            int raisedAgility          = 0;
            int raisedPower            = 0;
            int raisedStrikingStrength = 0;
            int raisedMagicPower       = 0;
            //ステータスアップのテーブル
            LevelUpData levelUpData                 = charaStatus.GetLevelUpData();
            List <int>  agilityRisingTable          = levelUpData.GetAgilityRisingTable();
            List <int>  powerRisingTable            = levelUpData.GetPowerRisingTable();
            List <int>  strikingStrengthRisingTable = levelUpData.GetStrikingStrengthRisingTable();
            List <int>  magicPowerRisingTable       = levelUpData.GetMagicPowerRisingTable();
            // プレイヤーとのレベル差分、ステータスアップを計算し反映する
            for (int i = 1; i < playerLevel; i++)
            {
                // レベルを反映
                charaStatus.SetLevel(charaStatus.GetLevel() + 1);

                raisedAgility          += agilityRisingTable[charaStatus.GetLevel() % agilityRisingTable.Count()];
                raisedPower            += powerRisingTable[charaStatus.GetLevel() % powerRisingTable.Count()];
                raisedStrikingStrength += strikingStrengthRisingTable[charaStatus.GetLevel() % strikingStrengthRisingTable.Count()];
                raisedMagicPower       += magicPowerRisingTable[charaStatus.GetLevel() % strikingStrengthRisingTable.Count];
            }

            charaStatus.StatusUpdate(raisedPower, raisedAgility, raisedStrikingStrength, raisedMagicPower);
            //HP、MPを満タンに
            charaStatus.SetHp(charaStatus.GetMaxHp());
            charaStatus.SetMp(charaStatus.GetMaxMp());
        }
    }
예제 #2
0
 // ステータスをセーブ用にコピー
 public void StatusCopy(AllyStatus allyStatus)
 {
     // キャラクターの名前
     this.characterName = allyStatus.GetCharacterName();
     // 毒状態かどうか
     this.isPoisonState = allyStatus.IsPoisonState();
     // 痺れ状態かどうか
     this.isNumbnessState = allyStatus.IsNumbnessState();
     // キャラクターのレベル
     this.level = allyStatus.GetLevel();
     // 素早さ
     this.agility = allyStatus.GetAgility();
     // 力
     this.power = allyStatus.GetPower();
     // 打たれ強さ
     this.strikingStrength = allyStatus.GetStrikingStrength();
     // 魔法力
     this.magicPower = allyStatus.GetMagicPower();
     // 攻撃力
     this.attackPower = allyStatus.GetAttackPower();
     // 守備力
     this.defencePower = allyStatus.GetDefencePower();
     // 最大HP
     this.maxHp = allyStatus.GetMaxHp();
     // HP
     this.hp = allyStatus.GetHp();
     // 最大MP
     this.maxMp = allyStatus.GetMaxMp();
     // MP
     this.mp = allyStatus.GetMp();
     // 持っているスキル
     this.skillList = allyStatus.GetSkillList();
     //属性カット率
     this.cutFlame   = allyStatus.GetCutFlame();
     this.cutThunder = allyStatus.GetCutThunder();
     this.cutIce     = allyStatus.GetcutIce();
     // 獲得経験値
     this.earnedExperience = allyStatus.GetEarnedExperience();
     // 装備している武器
     this.equipWeapon = allyStatus.GetEquipWeapon();
     // 装備している鎧
     this.equipArmor = allyStatus.GetEquipArmor();
     //装備しているアクセサリ
     this.equipAccessory1 = allyStatus.GetEquipAccessory1();
     this.equipAccessory2 = allyStatus.GetEquipAccessory2();
 }
예제 #3
0
    //キャラクターのステータス表示
    public void ShowStatus(AllyStatus allyStatus)
    {
        currentCommand = CommandMode.StatusPanel;
        statusPanel.SetActive(true);
        //キャラクターの名前を表示
        characterNameText.text = allyStatus.GetCharacterName();

        //タイトルの表示
        var text = "レベル\n";

        text += "HP\n";
        text += "MP\n";
        text += "経験値\n";
        text += "状態異常\n";
        text += "力\n";
        text += "素早さ\n";
        text += "打たれ強さ\n";
        text += "魔法力\n";
        text += "装備武器\n";
        text += "装備鎧\n";
        text += "攻撃力\n";
        text += "防御力\n";
        statusTitleText.text = text;

        //HPとMPのDivision記号の表示
        text  = "\n";
        text += allyStatus.GetHp() + "\n";
        text += allyStatus.GetMp() + "\n";
        statusParam1Text.text = text;

        //ステータスパラメータの表示
        text  = allyStatus.GetLevel() + "\n";
        text += allyStatus.GetMaxHp() + "\n";
        text += allyStatus.GetMaxMp() + "\n";
        text += allyStatus.GetEarnedExperience() + "\n";
        if (!allyStatus.IsPoisonState() && !allyStatus.IsNumbnessState())
        {
            text += "正常";
        }
        else
        {
            if (allyStatus.IsPoisonState())
            {
                text += "毒";
                if (allyStatus.IsNumbnessState())
                {
                    text += "、痺れ";
                }
            }
            else
            {
                if (allyStatus.IsNumbnessState())
                {
                    text += "痺れ";
                }
            }
        }

        text += "\n";
        text += allyStatus.GetPower() + "\n";
        text += allyStatus.GetAgility() + "\n";
        text += allyStatus.GetStrikingStrength() + "\n";
        text += allyStatus.GetMagicPower() + "\n";
        text += allyStatus?.GetEquipWeapon()?.GetKanjiName() ?? "";
        text += "\n";
        text += allyStatus.GetEquipArmor()?.GetKanjiName() ?? "";
        text += "\n";
        text += allyStatus.GetPower() + (allyStatus.GetEquipWeapon()?.GetAmount() ?? 0) + "\n";
        text += allyStatus.GetStrikingStrength() + (allyStatus.GetEquipArmor()?.GetAmount() ?? 0) + "\n";
        statusParam2Text.text = text;
    }
예제 #4
0
    // キャラクターのステータス表示
    public void ShowStatus(AllyStatus allyStatus)
    {
        currentCommand = CommandMode.StatusPanel;
        statusPanel.SetActive(true);
        // キャラクターの名前を表示
        characterNameText.text = allyStatus.GetCharacterName();

        // タイトルの表示
        var text = "レベル\n";

        text += "HP\n";
        text += "MP\n";
        text += "けいけんち\n";
        text += "たいちょう\n";
        text += "ちから\n";
        text += "すばやさ\n";
        text += "うたれづよさ\n";
        text += "まほうりょく\n";
        text += "そうびぶき\n";
        text += "そうびよろい\n";
        text += "こうげきりょく\n";
        text += "ぼうぎょりょく\n";
        statusTitleText.text = text;

        // HPとMPのDivision記号の表示
        text  = "\n";
        text += allyStatus.GetHp() + "\n";
        text += allyStatus.GetMp() + "\n";
        statusParam1Text.text = text;

        // ステータスパラメータの表示
        text  = allyStatus.GetLevel() + "\n";
        text += allyStatus.GetMaxHp() + "\n";
        text += allyStatus.GetMaxMp() + "\n";
        text += allyStatus.GetEarnedExperience() + "\n";
        if (!allyStatus.IsPoisonState() && !allyStatus.IsParalyzeState() && !allyStatus.IsSilentState())
        {
            text += "ふつう";
        }
        else
        {
            if (allyStatus.IsPoisonState())
            {
                text += "どく";
                if (allyStatus.IsParalyzeState())
                {
                    text += "、しびれ";
                    if (allyStatus.IsSilentState())
                    {
                        text += "、ちんもく";
                    }
                }
            }
            else if (allyStatus.IsParalyzeState())
            {
                text += "しびれ";
                if (allyStatus.IsSilentState())
                {
                    text += "、ちんもく";
                }
            }
            else if (allyStatus.IsSilentState())
            {
                text += "ちんもく";
            }
        }

        text += "\n";
        text += allyStatus.GetPower() + "\n";
        text += allyStatus.GetAgility() + "\n";
        text += allyStatus.GetStrikingStrength() + "\n";
        text += allyStatus.GetMagicPower() + "\n";
        text += allyStatus?.GetEquipWeapon()?.GetKanjiName() ?? "";
        text += "\n";
        text += allyStatus.GetEquipArmor()?.GetKanjiName() ?? "";
        text += "\n";
        text += allyStatus.GetPower() + (allyStatus.GetEquipWeapon()?.GetAmount() ?? 0) + "\n";
        text += allyStatus.GetStrikingStrength() + (allyStatus.GetEquipArmor()?.GetAmount() ?? 0) + "\n";
        statusParam2Text.text = text;
    }