Esempio n. 1
0
    public void EnemyAICharacterAndSkillSelectFunction(CharacterStateControl currentCharacters)
    {
        EnemyAIPattern  enemyAiPattern       = currentCharacters.enemyStatus.enemyAiPattern;
        AIActionPattern currentActionPattern = enemyAiPattern.GetCurrentActionPattern(currentCharacters, base.battleStateData.currentRoundNumber - 1);
        AIActionClip    randomActionClip     = currentActionPattern.GetRandomActionClip();
        int             isSelectSkill        = currentCharacters.SkillIdToIndexOf(base.stateManager.publicAttackSkillId);

        if (!currentCharacters.currentSufferState.FindSufferState(SufferStateProperty.SufferType.SkillLock))
        {
            int num = currentCharacters.SkillIdToIndexOf(randomActionClip.useSkillId);
            if (currentCharacters.isUseSkill(num))
            {
                isSelectSkill = num;
            }
        }
        currentCharacters.isSelectSkill = isSelectSkill;
        CharacterStateControl[] array = this.GetSkillTargetList(currentCharacters, currentCharacters.currentSkillStatus.target);
        if (!randomActionClip.IsFindMachConditionTargets(array))
        {
            currentCharacters.isSelectSkill = currentCharacters.SkillIdToIndexOf(base.stateManager.publicAttackSkillId);
            array = base.battleStateData.playerCharacters;
        }
        CharacterStateControl[] aliveCharacters = CharacterStateControl.GetAliveCharacters(array);
        CharacterStateControl[] array2          = CharacterStateControlSorter.SortedTargetSelect(aliveCharacters, currentCharacters.currentSkillStatus, randomActionClip);
        currentCharacters.targetCharacter = array2[0];
    }
Esempio n. 2
0
 public EnemyStatus()
 {
     this._enemyAiPattern  = new EnemyAIPattern();
     this._getChip         = 0;
     this._getExp          = 0;
     this._dropItemPattern = new EnemyDropItemPattern(new DropAssetPattern[0]);
     base.skillIds         = new string[0];
 }
Esempio n. 3
0
 public EnemyStatus(string prefabId, string groupId, int hp, int attackPower, int defencePower, int specialAttackPower, int specialDefencePower, int speed, int level, Tolerance tolerance, EnemyAIPattern enemyAiPattern, int getChip, int getExp, List <ItemDropResult> itemDropResult, string[] skillIds, int[] chipIdList, string[] monsterIntegrationIds) : base(prefabId, groupId, hp, attackPower, defencePower, specialAttackPower, specialDefencePower, speed, level, tolerance, skillIds, chipIdList, monsterIntegrationIds)
 {
     this._enemyAiPattern  = enemyAiPattern;
     this._getChip         = getChip;
     this._getExp          = getExp;
     this._dropItemPattern = new EnemyDropItemPattern(new DropAssetPattern[0]);
     this._itemDropResult  = itemDropResult;
 }
Esempio n. 4
0
 //200808 初期化された時にUnitクラスを受け取る
 public void Init(Enemy enemy, BattleMapManager battleMapManager, EnemyAIManager enemyAIManager, Main_Map map, int id)
 {
     this.enemy            = enemy;
     this.battleMapManager = battleMapManager;
     this.map            = map;
     this.enemyAIManager = enemyAIManager;
     this.enemyAIPattern = enemy.enemyAIPattern;
     this.actionTurn     = enemy.actionTurn;
     this.enemyId        = id;
 }
Esempio n. 5
0
    /// <summary>
    /// StageDatabaseで呼んで、ステージごとのユニット設定を行う
    /// </summary>
    /// <param name="Lv"></param>
    /// <param name="coordinate">ステージで初期配置されている座標</param>
    /// <param name="weapon">装備武器</param>
    /// <param name="carryItem">持ち物</param>
    /// <param name="enemyAIPattern">行動パターン</param>
    public void StageInit(int lv, Coordinate coordinate, List <Item> carryItem,
                          EnemyAIPattern enemyAIPattern)
    {
        this.lv             = lv;
        this.coordinate     = coordinate;
        this.carryItem      = carryItem;
        this.enemyAIPattern = enemyAIPattern;

        //装備フラグがtrueの武器、アクセサリを装備
        foreach (Item item in carryItem)
        {
            if (item.ItemType == ItemType.WEAPON && item.isEquip == true)
            {
                this.equipWeapon = item.weapon;
            }
            else if (item.ItemType == ItemType.ACCESSORY && item.isEquip == true)
            {
                this.equipAccessory = item.accessory;
            }
        }

        //敵キャラはレベルを渡すとレベルアップ分のステータスを反映してくれる
        GrowthDatabase growthDatabase = Resources.Load <GrowthDatabase>("growthDatabase");

        //成長率取得
        GrowthRate growthRate = growthDatabase.FindByName(name);
        int        lvUp       = lv - 1;

        //小数点以下切り捨て 成長率は整数で入っているので10で割ってやる
        this.maxhp += Mathf.FloorToInt(lvUp * growthRate.hpRate / 100);
        this.hp     = maxhp;

        this.latk += Mathf.FloorToInt(lvUp * growthRate.latkRate / 100);

        this.catk += Mathf.FloorToInt(lvUp * growthRate.catkRate / 100);

        this.dex += Mathf.FloorToInt(lvUp * growthRate.dexRate / 100);

        this.agi += Mathf.FloorToInt(lvUp * growthRate.agiRate / 100);

        this.luk += Mathf.FloorToInt(lvUp * growthRate.lukRate / 100);

        this.ldef += Mathf.FloorToInt(lvUp * growthRate.ldefRate / 100);

        this.cdef += Mathf.FloorToInt(lvUp * growthRate.cdefRate / 100);
    }
Esempio n. 6
0
 public CharacterStateControl(CharacterStatus status, Tolerance tolerance, CharacterDatas datas, SkillStatus[] skillStatuses, LeaderSkillStatus leaderCharacterLeaderSkill, CharacterDatas leaderCharacterData, LeaderSkillStatus myLeaderSkill = null, bool isEnemy = false)
 {
     this._sharedStatus    = SharedStatus.GetEmptyStatus();
     this._characterStatus = status;
     this._characterDatas  = datas;
     this._tolerance       = tolerance;
     this._skillStatus     = skillStatuses;
     this._isEnemy         = isEnemy;
     if (myLeaderSkill == null)
     {
         this._leaderSkillStatus = LeaderSkillStatus.GetUnHavingLeaderSkill();
     }
     else
     {
         this._leaderSkillStatus = myLeaderSkill;
     }
     this._leaderSkillResult = new LeaderSkillResult(this, leaderCharacterLeaderSkill, leaderCharacterData);
     this.StatusInitialize();
     if (status.GetType() == typeof(EnemyStatus))
     {
         this.enemyAi = this.enemyStatus.enemyAiPattern;
     }
     this.CheckEffectiveBonus();
 }
Esempio n. 7
0
 // 210304 一定ターン経過から行動開始するよう設定
 public void SetActionTurn(int turn)
 {
     enemyAIPattern  = EnemyAIPattern.WAIT;
     this.actionTurn = turn;
 }