public float GetCost()
 {
     return(cost + PerkManager.GetAbilityCost(prefabID, isFactionAbility));
 }
 public int GetEffAttackPerTurn()
 {
     return(effect.attackPerTurn + PerkManager.GetAbilityAttackPerTurn(prefabID, isFactionAbility));
 }
 public int GetEffSilentDuration()
 {
     return(effect.silentDuration + PerkManager.GetAbilitySilentDuration(prefabID, isFactionAbility));
 }
 public float GetEffFlankedModifier()
 {
     return(effect.flankedModifier + PerkManager.GetAbilityFlankedModifier(prefabID, isFactionAbility));
 }
 public float GetEffCritAvoidance()
 {
     return(effect.critAvoidance + PerkManager.GetAbilityCritAvoidance(prefabID, isFactionAbility));
 }
 public float GetEffStunChance()
 {
     return(effect.stunChance + PerkManager.GetAbilityStunChance(prefabID, isFactionAbility));
 }
 public float GetEffHPBuff()
 {
     return(effect.HP + PerkManager.GetAbilityHPBuff(prefabID, isFactionAbility));
 }
        //public float GetDamageMin(){ return unitStat.damageMin+PerkManager.GetAbilityDamage(prefabID, isFactionAbility); }
        //public float GetDamageMax(){ return unitStat.damageMax+PerkManager.GetAbilityDamage(prefabID, isFactionAbility); }

        public float GetEffHitChance()
        {
            return(effect.hitChance + PerkManager.GetAbilityHitChance(prefabID, isFactionAbility));
        }
 public int GetRange()
 {
     return(range + PerkManager.GetAbilityRange(prefabID, isFactionAbility));
 }
示例#10
0
 public int GetAOERange()
 {
     return(aoeRange + PerkManager.GetAbilityAOERange(prefabID, isFactionAbility));
 }
示例#11
0
 public float GetHitChance()
 {
     return(chanceToHit + PerkManager.GetAbilityHit(prefabID, isFactionAbility));
 }
示例#12
0
 public int GetUseLimit()
 {
     return(useLimit + PerkManager.GetAbilityUseLimit(prefabID, isFactionAbility));
 }
示例#13
0
 public int GetCooldown()
 {
     return(cooldown + PerkManager.GetAbilityCD(prefabID, isFactionAbility));
 }
示例#14
0
 public int GetEffCounterPerTurn()
 {
     return(effect.counterPerTurn + PerkManager.GetAbilityCounterPerTurn(prefabID, isFactionAbility));
 }
示例#15
0
 public float GetEffAPPerTurn()
 {
     return(effect.APPerTurn + PerkManager.GetAbilityAPPerTurn(prefabID, isFactionAbility));
 }
示例#16
0
 public float GetEffDamage()
 {
     return(effect.damage + PerkManager.GetAbilityDamage(prefabID, isFactionAbility));
 }
示例#17
0
 public float GetEffMoveAPCost()
 {
     return(effect.moveAPCost + PerkManager.GetAbilityMoveAPCost(prefabID, isFactionAbility));
 }
示例#18
0
 public float GetEffDodgeChance()
 {
     return(effect.dodgeChance + PerkManager.GetAbilityDodgeChance(prefabID, isFactionAbility));
 }
示例#19
0
 public float GetEffAttackAPCost()
 {
     return(effect.attackAPCost + PerkManager.GetAbilityAttackAPCost(prefabID, isFactionAbility));
 }
示例#20
0
 public float GetEffCritMultiplier()
 {
     return(effect.critMultiplier + PerkManager.GetAbilityCritMultiplier(prefabID, isFactionAbility));
 }
示例#21
0
 public float GetEffTurnPriority()
 {
     return(effect.turnPriority + PerkManager.GetAbilityTurnPriority(prefabID, isFactionAbility));
 }
示例#22
0
 public float GetEffSilentAvoidance()
 {
     return(effect.silentAvoidance + PerkManager.GetAbilitySilentAvoidance(prefabID, isFactionAbility));
 }
示例#23
0
 public int GetEffSight()
 {
     return(effect.sight + PerkManager.GetAbilitySight(prefabID, isFactionAbility));
 }
示例#24
0
 public float GetEffFlankingBonus()
 {
     return(effect.flankingBonus + PerkManager.GetAbilityFlankingBonus(prefabID, isFactionAbility));
 }
示例#25
0
 public int GetEffMovePerTurn()
 {
     return(effect.movePerTurn + PerkManager.GetAbilityMovePerTurn(prefabID, isFactionAbility));
 }
示例#26
0
        //load up the ability and setup the energy
        public void Init(int facID, bool startWithFullEnergy = false, bool isPlayerFaction = true)
        {
            factionID = facID;

            if (startWithFullEnergy)
            {
                energy = energyFull;
            }

            List <FactionAbility> dbList = AbilityManagerFaction.GetAbilityDBList();

            abilityList = new List <FactionAbility>();
            for (int i = 0; i < dbList.Count; i++)
            {
                if (dbList[i].onlyAvailableViaPerk)
                {
                    continue;
                }
                if (availableIDList.Contains(dbList[i].prefabID))
                {
                    abilityList.Add(dbList[i].Clone());
                }
                //if(!unavailableIDList.Contains(dbList[i].prefabID)) abilityList.Add(dbList[i].Clone());
            }

            //add ability unlocked via perk (PerkManager is carried forth from last level)
            if (isPlayerFaction)
            {
                List <int> perkAbilityXIDList = PerkManager.GetFactionAbilityXIDList();
                for (int n = 0; n < perkAbilityXIDList.Count; n++)
                {
                    for (int i = 0; i < abilityList.Count; i++)
                    {
                        if (perkAbilityXIDList[n] == abilityList[i].prefabID)
                        {
                            abilityList.RemoveAt(i);
                            i -= 1;
                        }
                    }
                }

                List <int> perkAbilityIDList = PerkManager.GetFactionAbilityIDList();
                for (int n = 0; n < perkAbilityIDList.Count; n++)
                {
                    for (int i = 0; i < dbList.Count; i++)
                    {
                        if (dbList[i].prefabID == perkAbilityIDList[n])
                        {
                            abilityList.Add(dbList[i].Clone());
                            break;
                        }
                    }
                }
            }


            for (int i = 0; i < abilityList.Count; i++)
            {
                abilityList[i].Init(factionID);
            }
        }
示例#27
0
        void Awake()
        {
            instance = this;

            TBData.ClearEndData();

            SettingDB settingDB = InitSetting();

            if (enableCover)
            {
                CoverSystem.SetFullCoverDodgeBonus(fullCoverBonus);
                CoverSystem.SetHalfCoverDodgeBonus(halfCoverBonus);
                CoverSystem.SetExposedCritChanceBonus(exposedCritBonus);
            }

            //get the instance of each component and initiate them, the order in which these component matters

            PerkManager perkManager = (PerkManager)FindObjectOfType(typeof(PerkManager));

            if (perkManager != null)
            {
                perkManager.Init();
            }

            AbilityManagerUnit abManagerUnit = (AbilityManagerUnit)FindObjectOfType(typeof(AbilityManagerUnit));

            if (abManagerUnit != null)
            {
                abManagerUnit.Init();
            }

            AbilityManagerFaction abManagerFac = (AbilityManagerFaction)FindObjectOfType(typeof(AbilityManagerFaction));

            if (abManagerFac != null)
            {
                abManagerFac.Init();
            }

            TurnControl turnControl = (TurnControl)FindObjectOfType(typeof(TurnControl));

            turnControl.Init();

            if (settingDB != null)
            {
                turnControl.turnMode  = settingDB.turnMode;
                turnControl.moveOrder = settingDB.moveOrder;
            }

            GridManager gridManager = (GridManager)FindObjectOfType(typeof(GridManager));

            if (settingDB != null)
            {
                gridManager.generateGridOnStart = settingDB.generateGridOnStart;
            }
            gridManager.Init();

            FactionManager factionManager = (FactionManager)FindObjectOfType(typeof(FactionManager));

            if (settingDB != null)
            {
                factionManager.generateUnitOnStart = settingDB.generateUnitOnStart;
            }
            factionManager.Init();

            CollectibleManager collectibleManager = (CollectibleManager)FindObjectOfType(typeof(CollectibleManager));

            if (settingDB != null)
            {
                collectibleManager.generateCollectibleOnStart = settingDB.generateCollectibleOnStart;
            }
            collectibleManager.Init();

            GridManager.SetupGridForFogOfWar();

            OverlayManager overlayManager = (OverlayManager)FindObjectOfType(typeof(OverlayManager));

            overlayManager.Init();

            defaultShootObject = Resources.Load("ScenePrefab/DefaultShootObject", typeof(GameObject)) as GameObject;

            gamePhase = _GamePhase.Initialization;
        }