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)); }
public int GetAOERange() { return(aoeRange + PerkManager.GetAbilityAOERange(prefabID, isFactionAbility)); }
public float GetHitChance() { return(chanceToHit + PerkManager.GetAbilityHit(prefabID, isFactionAbility)); }
public int GetUseLimit() { return(useLimit + PerkManager.GetAbilityUseLimit(prefabID, isFactionAbility)); }
public int GetCooldown() { return(cooldown + PerkManager.GetAbilityCD(prefabID, isFactionAbility)); }
public int GetEffCounterPerTurn() { return(effect.counterPerTurn + PerkManager.GetAbilityCounterPerTurn(prefabID, isFactionAbility)); }
public float GetEffAPPerTurn() { return(effect.APPerTurn + PerkManager.GetAbilityAPPerTurn(prefabID, isFactionAbility)); }
public float GetEffDamage() { return(effect.damage + PerkManager.GetAbilityDamage(prefabID, isFactionAbility)); }
public float GetEffMoveAPCost() { return(effect.moveAPCost + PerkManager.GetAbilityMoveAPCost(prefabID, isFactionAbility)); }
public float GetEffDodgeChance() { return(effect.dodgeChance + PerkManager.GetAbilityDodgeChance(prefabID, isFactionAbility)); }
public float GetEffAttackAPCost() { return(effect.attackAPCost + PerkManager.GetAbilityAttackAPCost(prefabID, isFactionAbility)); }
public float GetEffCritMultiplier() { return(effect.critMultiplier + PerkManager.GetAbilityCritMultiplier(prefabID, isFactionAbility)); }
public float GetEffTurnPriority() { return(effect.turnPriority + PerkManager.GetAbilityTurnPriority(prefabID, isFactionAbility)); }
public float GetEffSilentAvoidance() { return(effect.silentAvoidance + PerkManager.GetAbilitySilentAvoidance(prefabID, isFactionAbility)); }
public int GetEffSight() { return(effect.sight + PerkManager.GetAbilitySight(prefabID, isFactionAbility)); }
public float GetEffFlankingBonus() { return(effect.flankingBonus + PerkManager.GetAbilityFlankingBonus(prefabID, isFactionAbility)); }
public int GetEffMovePerTurn() { return(effect.movePerTurn + PerkManager.GetAbilityMovePerTurn(prefabID, isFactionAbility)); }
//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); } }
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; }