示例#1
0
 public CityEngageDefensePassiveAction(BattleProcedure battleProcedure,
                                       CityBattleProcedure cityBattleProcedure,
                                       IGameObjectLocator gameObjectLocator)
 {
     this.battleProcedure     = battleProcedure;
     this.cityBattleProcedure = cityBattleProcedure;
     this.gameObjectLocator   = gameObjectLocator;
 }
示例#2
0
 public CityEngageDefensePassiveAction(uint cityId,
                                       uint troopObjectId,
                                       FormationType formationType,
                                       BattleProcedure battleProcedure,
                                       CityBattleProcedure cityBattleProcedure,
                                       IGameObjectLocator gameObjectLocator)
     : this(battleProcedure, cityBattleProcedure, gameObjectLocator)
 {
     this.cityId        = cityId;
     this.troopObjectId = troopObjectId;
     this.formationType = formationType;
 }
示例#3
0
 public CityEngageAttackPassiveAction(uint cityId,
                                      uint troopObjectId,
                                      uint targetCityId,
                                      IBattleFormulas battleFormula,
                                      IGameObjectLocator gameObjectLocator,
                                      CityBattleProcedure cityBattleProcedure,
                                      IStructureCsvFactory structureCsvFactory,
                                      IDbManager dbManager,
                                      IStaminaMonitorFactory staminaMonitorFactory)
     : this(battleFormula, gameObjectLocator, cityBattleProcedure, structureCsvFactory, dbManager, staminaMonitorFactory)
 {
     this.cityId        = cityId;
     this.troopObjectId = troopObjectId;
     this.targetCityId  = targetCityId;
 }
示例#4
0
 public CityAttackChainAction(IActionFactory actionFactory,
                              Procedure procedure,
                              ILocker locker,
                              IGameObjectLocator gameObjectLocator,
                              CityBattleProcedure cityBattleProcedure,
                              BattleProcedure battleProcedure,
                              Formula formula)
 {
     this.actionFactory       = actionFactory;
     this.procedure           = procedure;
     this.locker              = locker;
     this.gameObjectLocator   = gameObjectLocator;
     this.cityBattleProcedure = cityBattleProcedure;
     this.battleProcedure     = battleProcedure;
     this.formula             = formula;
 }
示例#5
0
        public CityBattlePassiveAction(uint cityId,
                                       IActionFactory actionFactory,
                                       BattleProcedure battleProcedure,
                                       ILocker locker,
                                       IGameObjectLocator gameObjectLocator,
                                       IDbManager dbManager,
                                       Formula formula,
                                       CityBattleProcedure cityBattleProcedure,
                                       IWorld world,
                                       ITroopObjectInitializerFactory troopInitializerFactory)
            : this(actionFactory, battleProcedure, locker, gameObjectLocator, dbManager, formula, cityBattleProcedure, world, troopInitializerFactory)
        {
            this.cityId = cityId;

            RegisterCityBattleEvents();
        }
示例#6
0
        public CityEngageAttackPassiveAction(IBattleFormulas battleFormula,
                                             IGameObjectLocator gameObjectLocator,
                                             CityBattleProcedure cityBattleProcedure,
                                             IStructureCsvFactory structureCsvFactory,
                                             IDbManager dbManager,
                                             IStaminaMonitorFactory staminaMonitorFactory)
        {
            this.battleFormula         = battleFormula;
            this.gameObjectLocator     = gameObjectLocator;
            this.cityBattleProcedure   = cityBattleProcedure;
            this.structureCsvFactory   = structureCsvFactory;
            this.dbManager             = dbManager;
            this.staminaMonitorFactory = staminaMonitorFactory;

            bonus = new Resource();
        }
示例#7
0
        public void MoveFromBattleToNormal(CityBattleProcedure cityBattleProcedure, IGlobal global, TroopStub stub)
        {
            Global.Current = global;
            Global.Current.FireEvents.Returns(false);

            stub.AddFormation(FormationType.Normal);
            stub.AddFormation(FormationType.Garrison);
            stub.AddFormation(FormationType.InBattle);

            stub.AddUnit(FormationType.Normal, 101, 10);

            cityBattleProcedure.MoveUnitFormation(stub, FormationType.Normal, FormationType.InBattle);
            cityBattleProcedure.MoveUnitFormation(stub, FormationType.InBattle, FormationType.Normal);

            Assert.True(stub[FormationType.Normal].Type == FormationType.Normal);
            Assert.True(stub[FormationType.InBattle].Type == FormationType.InBattle);
        }
示例#8
0
 public CityAttackChainAction(uint cityId,
                              ITroopObjectInitializer troopObjectInitializer,
                              uint targetCityId,
                              Position target,
                              IActionFactory actionFactory,
                              Procedure procedure,
                              ILocker locker,
                              IGameObjectLocator gameObjectLocator,
                              CityBattleProcedure cityBattleProcedure,
                              BattleProcedure battleProcedure,
                              Formula formula)
     : this(actionFactory, procedure, locker, gameObjectLocator, cityBattleProcedure, battleProcedure, formula)
 {
     this.tmpTarget = target;
     this.cityId    = cityId;
     this.troopObjectInitializer = troopObjectInitializer;
     this.targetCityId           = targetCityId;
 }
示例#9
0
 public CityBattlePassiveAction(IActionFactory actionFactory,
                                BattleProcedure battleProcedure,
                                ILocker locker,
                                IGameObjectLocator gameObjectLocator,
                                IDbManager dbManager,
                                Formula formula,
                                CityBattleProcedure cityBattleProcedure,
                                IWorld world,
                                ITroopObjectInitializerFactory troopInitializerFactory)
 {
     this.actionFactory       = actionFactory;
     this.battleProcedure     = battleProcedure;
     this.locker              = locker;
     this.gameObjectLocator   = gameObjectLocator;
     this.dbManager           = dbManager;
     this.formula             = formula;
     this.cityBattleProcedure = cityBattleProcedure;
     this.world = world;
     this.troopInitializerFactory = troopInitializerFactory;
 }