コード例 #1
0
        public void RemoveLoot(IBattleManager battleManager, int attackIndex, ICombatObject attacker, ICombatObject defender, out Resource actualLoot)
        {
            if (attackIndex != 0 || battleManager.Round < Config.battle_loot_begin_round)
            {
                actualLoot = new Resource();
                return;
            }

            var loot = battleFormulas.GetRewardResource(attacker, defender);

            city.BeginUpdate();
            city.Resource.Subtract(loot, formula.HiddenResource(city, true), out actualLoot);
            city.EndUpdate();
        }
コード例 #2
0
        public void RemoveLoot(IBattleManager battleManager, int attackIndex, ICombatObject attacker, ICombatObject defender, out Resource actualLoot)
        {
            if (attackIndex != 0)
            {
                actualLoot = new Resource();
                return;
            }

            var loot = battleFormulas.GetRewardResource(attacker, defender);

            barbarianTribe.BeginUpdate();
            barbarianTribe.Resource.Subtract(loot, out actualLoot);
            barbarianTribe.EndUpdate();
        }