Пример #1
0
        public BarbarianTribeBattlePassiveAction(uint barbarianTribeId,
                                                 ILocker locker,
                                                 IGameObjectLocator gameObjectLocator,
                                                 IDbManager dbManager,
                                                 Formula formula,
                                                 BarbarianTribeBattleProcedure barbarianTribeBattleProcedure,
                                                 IWorld world,
                                                 ISimpleStubGeneratorFactory simpleStubGeneratorFactory)
            : this(locker, gameObjectLocator, dbManager, formula, barbarianTribeBattleProcedure, world, simpleStubGeneratorFactory)
        {
            this.barbarianTribeId              = barbarianTribeId;
            this.locker                        = locker;
            this.gameObjectLocator             = gameObjectLocator;
            this.dbManager                     = dbManager;
            this.formula                       = formula;
            this.barbarianTribeBattleProcedure = barbarianTribeBattleProcedure;
            this.world = world;

            IBarbarianTribe barbarianTribe;

            if (!gameObjectLocator.TryGetObjects(barbarianTribeId, out barbarianTribe))
            {
                throw new Exception("Did not find barb tribe that was supposed to be having a battle");
            }

            simpleStubGenerator = simpleStubGeneratorFactory.CreateSimpleStubGenerator(formula.BarbarianTribeUnitRatios(), formula.BarbarianTribeUnitTypes());
        }
Пример #2
0
 public BarbarianTribeEngageAttackPassiveAction(IBattleFormulas battleFormula,
                                                IGameObjectLocator gameObjectLocator,
                                                BarbarianTribeBattleProcedure barbarianTribeBattleProcedure,
                                                Formula formula,
                                                IDbManager dbManager,
                                                IStaminaMonitorFactory staminaMonitorFactory)
 {
     this.battleFormula                 = battleFormula;
     this.gameObjectLocator             = gameObjectLocator;
     this.barbarianTribeBattleProcedure = barbarianTribeBattleProcedure;
     this.formula               = formula;
     this.dbManager             = dbManager;
     this.staminaMonitorFactory = staminaMonitorFactory;
 }
Пример #3
0
 public BarbarianTribeEngageAttackPassiveAction(uint cityId,
                                                uint troopObjectId,
                                                uint targetObjectId,
                                                IBattleFormulas battleFormula,
                                                IGameObjectLocator gameObjectLocator,
                                                BarbarianTribeBattleProcedure barbarianTribeBattleProcedure,
                                                Formula formula,
                                                IDbManager dbManager,
                                                IStaminaMonitorFactory staminaMonitorFactory)
     : this(battleFormula, gameObjectLocator, barbarianTribeBattleProcedure, formula, dbManager, staminaMonitorFactory)
 {
     this.cityId         = cityId;
     this.troopObjectId  = troopObjectId;
     this.targetObjectId = targetObjectId;
 }
Пример #4
0
        public BarbarianTribeBattlePassiveAction(ILocker locker,
                                                 IGameObjectLocator gameObjectLocator,
                                                 IDbManager dbManager,
                                                 Formula formula,
                                                 BarbarianTribeBattleProcedure barbarianTribeBattleProcedure,
                                                 IWorld world,
                                                 ISimpleStubGeneratorFactory simpleStubGeneratorFactory)
        {
            this.locker                        = locker;
            this.gameObjectLocator             = gameObjectLocator;
            this.dbManager                     = dbManager;
            this.formula                       = formula;
            this.barbarianTribeBattleProcedure = barbarianTribeBattleProcedure;
            this.world = world;

            simpleStubGenerator = simpleStubGeneratorFactory.CreateSimpleStubGenerator(formula.BarbarianTribeUnitRatios(), formula.BarbarianTribeUnitTypes());
        }