public UnitImpactExecutor(ContextLogic contextLogic, ImpactController logic, ConditionController condition, UnitsAccessor units) { _condition = condition; _contextLogic = contextLogic; _units = units; _logic = logic; }
public ConditionUnitChecker(ConditionController logic, ContextLogic contextLogic, BattleAccessor battle, UnitsAccessor units) { _contextLogic = contextLogic; _units = units; _battle = battle; _logic = logic; }
public ImpactConditionExecutor(ImpactController logic, ConditionController controller, ContextLogic context, BattleAccessor battle, ImpactType type) { _battle = battle; _controller = controller; _context = context; _logic = logic; Id = type; }
public ImpactRandomWeightExecutor(FormulaLogic formulaLogic, ConditionController condition, ImpactController impactLogic, SettingsAccessor settings, ImpactType type) { _condition = condition; _formulaLogic = formulaLogic; _impactLogic = impactLogic; _settings = settings; Id = type; }
//Start Method private void Start() { cursorChangerController = this.GetComponent <CursorChangerController>(); spellEffectController = this.GetComponent <SpellEffectController>(); manaController = this.GetComponent <ManaController>(); screenShakeController = this.GetComponent <ScreenShakeController>(); devourerController = this.GetComponent <DevourerController>(); screenFlashController = this.GetComponent <ScreenFlashController>(); corruptionController = this.GetComponent <CorruptionController>(); environmentController = this.GetComponent <EnvironmentController>(); conditionController = this.GetComponent <ConditionController>(); grimmoireController = this.GetComponent <GrimmoireController>(); enemySpawner = this.GetComponent <EnemySpawner>(); soundController = this.GetComponent <SoundController>(); }
public InternalAccessors(LogicData LogicData, IStateFactory factory) { Factory = factory; ConditionController = new ConditionController(); FormulaController = new FormulaController(); AchievementAccessor = new AchievementAccessor(); BattleAccessor = new BattleAccessor(); CutSceneAccessor = new CutSceneAccessor(); ExplorerAccessor = new ExplorerAccessor(); InventoryAccessor = new InventoryAccessor(); LogAccessor = new LogAccessor(); LogAccessor.Data = LogicData; PlayerAccessor = new PlayerAccessor(); ScorersAccessor = new ScorersAccessor(); SettingsAccessor = new SettingsAccessor(); ShopAccessor = new ShopAccessor(); UnitsAccessor = new UnitsAccessor(); }
public virtual void InitEffectCondition(ICommonSkill root, SkillEffectTable dbData) { if (dbData == null) { return; } // Init skill triggers var _dbEffectTriggerList = EffectTriggerTableReader.Instance.FindDefault(dbData.SkillID, dbData.EffectID); if (_dbEffectTriggerList != null) { List <TriggerTypeIDMapFormat> _skillTriggerMapList = new List <TriggerTypeIDMapFormat> (); _dbEffectTriggerList.ForEach(skillTrigger => { _skillTriggerMapList.Add(new TriggerTypeIDMapFormat(skillTrigger)); }); this.EffectCondition = new ConditionController(root, _skillTriggerMapList); } }
public ConditionDisjunctionChecker(ConditionController provider, ConditionType type) { _provider = provider; Id = type; }
public FormulaIfCalculator(FormulaController formula, ConditionController condition) { _condition = condition; _formula = formula; }
public ConditionChecker(ConditionController logic, ContextLogic context, BattleAccessor battle) { _logic = logic; _context = context; _battle = battle; }
public ImpactWhileExecutor(ImpactController logic, ConditionController condition, ImpactType type) { _condition = condition; _logic = logic; Id = type; }
public static ImpactLogic CreateClient(ScorersAccessor _scorers, PlayerAccessor _player, InventoryAccessor _inventory, ExplorerAccessor _explorer, UnitsAccessor _units, BattleAccessor _battle, SettingsAccessor _settings, AchievementAccessor _achievement, BattleLogic _battleLogic, FormulaLogic _formulaLogic, ConditionController _condition, ApplyChangeLogic _applyChangeLogic, BuffLogic _buff, ScorersLogic _scorersLogic, ContextLogic _contextLogic, ImpactController _impactController, LogicData _data) { return(new ImpactLogic { _scorers = _scorers, _player = _player, _inventory = _inventory, _explorer = _explorer, _units = _units, _battle = _battle, _settings = _settings, _achievement = _achievement, _battleLogic = _battleLogic, _formulaLogic = _formulaLogic, _condition = _condition, _applyChangeLogic = _applyChangeLogic, _buff = _buff, _scorersLogic = _scorersLogic, _contextLogic = _contextLogic, _impactController = _impactController, _data = _data, } ); }
public static FormulaLogic CreateClient(ContextLogic _contextLogic, ScorersAccessor _scorers, UnitsAccessor _units, BattleAccessor _battle, ExplorerAccessor _explorer, LogicData _data, PlayerAccessor _player, SettingsAccessor _settings, ConditionController _controller, FormulaController _formula, ScorersLogic _scorerLogic) { return(new FormulaLogic { _contextLogic = _contextLogic, _scorers = _scorers, _units = _units, _battle = _battle, _explorer = _explorer, _data = _data, _player = _player, _settings = _settings, _controller = _controller, _formula = _formula, _scorerLogic = _scorerLogic, } ); }
public ConditionBaseChecker(ConditionController logic, ConditionType type) { _logic = logic; Id = type; }
public void CheckStats() { if (this.ConditionCounter > 3) { this.Controller.updateConsole("Your Goku died lol."); // El personaje muere Running = false; Controller.Finish(); // Mensaje para el GUI de que murio } if (CurrentCondition != null) { this.Controller.updateConsole("Time: " + Time.GetCurrentTime().ToString() + " Day: " + Time.GetCurrentDay().ToString() + " Year: " + Time.GetCurrentYear().ToString()); Console.WriteLine("Random Event: " + CurrentActivity.Name); if (CurrentCondition.Cured((Character)this.CurrentCharacter)) { this.Controller.updateConsole("*** Your goku was cured! ***"); CurrentCondition = null; ConditionCounter = 0; } else { this.Controller.updateConsole("*** Be careful your goku is still sick ***"); CurrentCharacter = CurrentCondition.ExecuteStrat(CurrentCharacter); ConditionCounter++; this.Controller.updateConsole("Sick day coutner: " + this.ConditionCounter.ToString()); } } else { ICondition condition = null; Character character = (Character)CurrentCharacter; this.Controller.updateConsole("Time: " + Time.GetCurrentTime().ToString() + " Day: " + Time.GetCurrentDay().ToString() + " Year: " + Time.GetCurrentYear().ToString()); Console.WriteLine("Random Event: " + CurrentActivity.Name); if (character.Hp < 30 && character.Hunger < 30 && character.Thirst < 30 && newCondition()) { Console.WriteLine("Sick"); this.Controller.updateConditionAppearance("sick"); condition = ConditionController.findCondition("sick"); } else if (character.Energy < 30 && newCondition()) { Console.WriteLine("Tired"); this.Controller.updateConditionAppearance("tired"); condition = ConditionController.findCondition("tired"); } else if (character.Hunger > 100 && character.Thirst > 100 && newCondition()) { Console.WriteLine("Fat"); this.Controller.updateConditionAppearance("fat"); condition = ConditionController.findCondition("fat"); } else if (character.Hp < 30 && newCondition()) { Console.WriteLine("Beatup"); this.Controller.updateConditionAppearance("beatup"); condition = ConditionController.findCondition("beatup"); } CurrentCondition = condition; } if (this.CurrentCondition != null) { this.Controller.updateConditionAppearance(this.CurrentCondition.Name); this.Controller.updateConsole(((Character)this.CurrentCharacter).Name + " is currently " + this.CurrentCondition.Name); } }
public static GachaModule CreateClient(ImpactController _impactLogic, ScorersAccessor _scorers, InventoryAccessor _resources, UnitsAccessor _units, ExplorerAccessor _explorer, DropLogic _dropLogic, ConditionController _condition, FormulaLogic _formuls) { return(new GachaModule { _impactLogic = _impactLogic, _scorers = _scorers, _resources = _resources, _units = _units, _explorer = _explorer, _dropLogic = _dropLogic, _condition = _condition, _formuls = _formuls, } ); }
public static ConditionLogic CreateClient(InventoryAccessor _inventoryAccessor, ScorersAccessor _scorersAccessor, PlayerAccessor _profileAccessor, UnitsAccessor _unitAccessor, BattleAccessor _battleAccessor, ExplorerAccessor _explorerAccessor, SettingsAccessor _settingsAccessor, AchievementAccessor _achievementAccessor, FormulaLogic _formulaLogic, ContextLogic _contextLogic, ScorersLogic _scorerLogic, LogicData _data, ConditionController _controller) { return(new ConditionLogic { _inventoryAccessor = _inventoryAccessor, _scorersAccessor = _scorersAccessor, _profileAccessor = _profileAccessor, _unitAccessor = _unitAccessor, _battleAccessor = _battleAccessor, _explorerAccessor = _explorerAccessor, _settingsAccessor = _settingsAccessor, _achievementAccessor = _achievementAccessor, _formulaLogic = _formulaLogic, _contextLogic = _contextLogic, _scorerLogic = _scorerLogic, _data = _data, _controller = _controller, } ); }
//public long GetOffset(int gachaItemId) //{ // var item = Static.GachaItems[gachaItemId]; // int count = 0; // switch (item.RollsQuantity) // { // case TimeQuantityType.Hour: // count = 60 * 60; // break; // case TimeQuantityType.Hour6: // count = 6 * 60 * 60; // break; // case TimeQuantityType.Hour12: // count = 6 * 60 * 60; // break; // case TimeQuantityType.Day: // count = 24 * 60 * 60; // break; // case TimeQuantityType.Weak: // count = 7 * 24 * 60 * 60; // break; // } // return Static.GachaItems[gachaItemId].RollsPeriod * count; //} public (IGacha, IUniversalPrice, int) GetGacha(int gachaId, GachaCountType count, ConditionController condition) { var gachaItem = Static.GachaItems[gachaId]; IReadOnlyDictionary <int, IUniversalPrice> prices = null; int countDrop = 0; switch (count) { case GachaCountType.One: prices = gachaItem.Prices1; countDrop = 1; break; case GachaCountType.Ten: prices = gachaItem.Prices10; countDrop = 10; break; default: throw new ArgumentOutOfRangeException(nameof(count), count, null); } IUniversalPrice price = null; foreach (var ordered in prices.Keys.OrderBy(x => x)) { if (condition.Check(prices[ordered].Condition)) { price = prices[ordered]; break; } } return(gachaItem, price, countDrop); }