Example #1
0
 public SkillsGenerator(ISkillSelector skillSelector, ICollectionSelector collectionsSelector, IAdjustmentsSelector adjustmentsSelector, Dice dice)
 {
     this.skillSelector       = skillSelector;
     this.collectionsSelector = collectionsSelector;
     this.adjustmentsSelector = adjustmentsSelector;
     this.dice = dice;
 }
Example #2
0
    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();
    }
Example #3
0
 public SkillsGenerator(ISkillSelector skillSelector, ICollectionsSelector collectionsSelector, IAdjustmentsSelector adjustmentsSelector,
     IBooleanPercentileSelector booleanPercentileSelector)
 {
     this.skillSelector = skillSelector;
     this.collectionsSelector = collectionsSelector;
     this.adjustmentsSelector = adjustmentsSelector;
     this.booleanPercentileSelector = booleanPercentileSelector;
 }
Example #4
0
        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);
        }
Example #5
0
        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);
        }
Example #6
0
        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);
 }