public SkillsGenerator(ISkillSelector skillSelector, ICollectionSelector collectionsSelector, IAdjustmentsSelector adjustmentsSelector, Dice dice) { this.skillSelector = skillSelector; this.collectionsSelector = collectionsSelector; this.adjustmentsSelector = adjustmentsSelector; this.dice = dice; }
public virtual void LoadMonsterBase(Monster monsterBase, int level) { MonsterBase = monsterBase; Level = level; // BaseStats = MonsterBase.Stats; // BonusStats = MonsterBase.StatLevelVariance * (Level - MonsterBase.BaseLevel); // Skills = MonsterBase.Skills; StatusEffectInstances = new List <StatusEffectInstance>(); RecalculateStats(); TargeterAi = MonsterBase.TargeterAi; SkillAi = MonsterBase.SkillAi; monsterBattler = Instantiate(MonsterBase.MonsterBattler, RectTransform); image = monsterBattler.gameObject.Ensure <Image>(); CurrentHp = Stats.MaxHp; CurrentAp = GameSettings.Instance.InitialAp; BattleDictionary = new Dictionary <object, object>(); // Passives = MonsterBase.Passives; // StatusEffectInstances = new List<StatusEffectInstance>(); BattlerName = MonsterBase.MonsterName; HitSound = MonsterBase.HitSound; Debug.Log($"Inicializado Lv.{level} {BattlerName}"); BuildStatusEffectRect(); }
public SkillsGenerator(ISkillSelector skillSelector, ICollectionsSelector collectionsSelector, IAdjustmentsSelector adjustmentsSelector, IBooleanPercentileSelector booleanPercentileSelector) { this.skillSelector = skillSelector; this.collectionsSelector = collectionsSelector; this.adjustmentsSelector = adjustmentsSelector; this.booleanPercentileSelector = booleanPercentileSelector; }
public void Setup() { mockInnerSelector = new Mock <ICollectionSelector>(); mockBonusSelector = new Mock <IBonusSelector>(); skillSelector = new SkillSelector(mockInnerSelector.Object, mockBonusSelector.Object); bonusSelections = new List <BonusSelection>(); mockBonusSelector.Setup(s => s.SelectFor(TableNameConstants.TypeAndAmount.SkillBonuses, "creature")).Returns(bonusSelections); }
public Brain() { var stopping = new StoppingSkill(); helpme = new HelpMeSkill(this); Skills = new List <IBrainSkill> { stopping, helpme }; Sensors = new List <IBrainSensor>(); Presenters = new List <IBrainPresenter>(); SkillSelector = new SkillSelector(); SkillSelector.AssignSkill("stop", stopping); SkillSelector.AssignSkill("helpme", helpme); helpme.AddSkillHelp("helpme", helpme); helpme.AddSkillHelp("stop", stopping); }
public Action mAction; //当前行动 public override bool Init(int tid, byte lv) { mData = CSTable.StaticDataManager.SkillActive[tid]; mLvData = CSTable.StaticDataManager.SkillLevel[tid, lv]; if (null == mData || null == mLvData) { return(false); } BaseGameLogic <ISkillSelector> selectorLogic = (BaseGameLogic <ISkillSelector>)GameLogicManager.Instance.GetGameLogic(eGameLogicType.SkillSelector, (short)mData.selector); if (null != selectorLogic) { mSelector = selectorLogic.Logic; } BaseGameLogic <ISkillChecker> checkerLogic = (BaseGameLogic <ISkillChecker>)GameLogicManager.Instance.GetGameLogic(eGameLogicType.SkillChecker, (short)mData.checker); if (null != checkerLogic) { mChecker = checkerLogic.Logic; } BaseGameLogic <ISkillConsumer> consumerLogic = (BaseGameLogic <ISkillConsumer>)GameLogicManager.Instance.GetGameLogic(eGameLogicType.SkillConsumer, (short)mData.consumer); if (null != consumerLogic) { mConsumer = consumerLogic.Logic; } InitActionGroup(); //已学会技能 mStatus = eSkillStatus.Valid; return(true); }
public void Setup() { mockInnerSelector = new Mock<ICollectionsSelector>(); skillSelector = new SkillSelector(mockInnerSelector.Object); }