Пример #1
0
        private static void SpawnBox(DungeonBoostType type, Player player, Vector3 position)
        {
            if (type != DungeonBoostType.None)
            {
                DungeonBoost.DungeonBoostProperties properties2 = new DungeonBoost.DungeonBoostProperties();
                properties2.Type                  = type;
                properties2.ActivationType        = DungeonBoostActivationType.DestructibleHit;
                properties2.DoDestroyOnActivation = true;
                properties2.Radius                = ConfigDungeonBoosts.BOX_RADIUS;
                DungeonBoost.DungeonBoostProperties props = properties2;
                switch (type)
                {
                case DungeonBoostType.BuffBox:
                case DungeonBoostType.ExplosiveBox:
                    props.BuffPerkType = LangUtil.GetRandomValueFromList <PerkType>(ConfigPerks.DUNGEON_BOOST_PERK_POOLS[type]);
                    break;

                case DungeonBoostType.ResourceBox:
                    props.ShopEntryId = CmdRollDungeonBoostResourceBoxLootTable.ExecuteStatic(App.Binder.ConfigLootTables.DungeonBoostResourceBoxLootTable, player);
                    break;
                }
                DungeonBoost dungeonBoost = GameLogic.Binder.DungeonBoostPool.getObject();
                dungeonBoost.gameObject.SetActive(true);
                dungeonBoost.initialize(position, props);
                GameLogic.Binder.EventBus.DungeonBoostSpawned(dungeonBoost);
            }
        }
 private void onDungeonBoostActivated(DungeonBoost dungeonBoost, SkillType fromSkill)
 {
     if (ConfigDungeonBoosts.IsBox(dungeonBoost.Properties.Type))
     {
         for (int i = 0; i < this.m_heroStats.Count; i++)
         {
             HeroStats stats = this.m_heroStats[i];
             if (fromSkill != SkillType.NONE)
             {
                 string key = fromSkill.ToString();
                 if (!stats.SkillDungeonBoostBoxDestructionCounts.ContainsKey(key))
                 {
                     stats.SkillDungeonBoostBoxDestructionCounts.Add(key, 1.0);
                 }
                 else
                 {
                     Dictionary <string, double> dictionary;
                     string str2;
                     double num2 = dictionary[str2];
                     (dictionary = stats.SkillDungeonBoostBoxDestructionCounts)[str2 = key] = num2 + 1.0;
                 }
             }
             stats.DungeonBoostBoxesDestroyed++;
         }
     }
 }
Пример #3
0
        private void onDungeonBoostActivated(DungeonBoost dungeonBoost, SkillType fromSkill)
        {
            Buff          buff4;
            ActiveDungeon activeDungeon = GameLogic.Binder.GameState.ActiveDungeon;

            if (activeDungeon.hasDungeonModifier(DungeonModifierType.DungeonBoostBoxBonusSkillDamage))
            {
                buff4                 = new Buff();
                buff4.BaseStat1       = BaseStatProperty.SkillDamage;
                buff4.Modifier        = ConfigDungeonModifiers.DungeonBoostBoxBonusSkillDamage.SkillDamageModifier;
                buff4.DurationSeconds = ConfigDungeonModifiers.DungeonBoostBoxBonusSkillDamage.BuffDurationSeconds;
                Buff buff = buff4;
                this.startBuff(activeDungeon.PrimaryPlayerCharacter, buff);
            }
            if (activeDungeon.hasDungeonModifier(DungeonModifierType.DungeonBoostBoxBonusWeaponDamage))
            {
                buff4                 = new Buff();
                buff4.BaseStat1       = BaseStatProperty.DamagePerHit;
                buff4.Modifier        = ConfigDungeonModifiers.DungeonBoostBoxBonusWeaponDamage.DamagePerHitModifier;
                buff4.DurationSeconds = ConfigDungeonModifiers.DungeonBoostBoxBonusWeaponDamage.BuffDurationSeconds;
                Buff buff2 = buff4;
                this.startBuff(activeDungeon.PrimaryPlayerCharacter, buff2);
            }
            if (activeDungeon.hasDungeonModifier(DungeonModifierType.DungeonBoostBoxBonusUniversalDamage))
            {
                buff4                 = new Buff();
                buff4.BaseStat1       = BaseStatProperty.DamagePerHit;
                buff4.BaseStat2       = BaseStatProperty.SkillDamage;
                buff4.Modifier        = ConfigDungeonModifiers.DungeonBoostBoxBonusUniversalDamage.Modifier;
                buff4.DurationSeconds = ConfigDungeonModifiers.DungeonBoostBoxBonusUniversalDamage.BuffDurationSeconds;
                Buff buff3 = buff4;
                this.startBuff(activeDungeon.PrimaryPlayerCharacter, buff3);
            }
        }
Пример #4
0
 private void onDungeonBoostActivated(DungeonBoost dungeonBoost, SkillType fromSkill)
 {
     if (dungeonBoost.Properties.Type == DungeonBoostType.EmptyBox)
     {
         ActiveDungeon activeDungeon  = GameLogic.Binder.GameState.ActiveDungeon;
         Player        player         = GameLogic.Binder.GameState.Player;
         double        baseCoinReward = App.Binder.ConfigMeta.MinionCoinDropCurve(activeDungeon.Floor);
         double        v = player.calculateStandardCoinRoll(baseCoinReward, GameLogic.CharacterType.UNSPECIFIED, 1) * App.Binder.ConfigMeta.DUNGEON_BOOST_EMPTY_BOX_COIN_GAIN_CONTROLLER;
         if (activeDungeon.hasDungeonModifier(DungeonModifierType.DungeonBoostBoxBonusCoins))
         {
             v *= ConfigDungeonModifiers.DungeonBoostBoxBonusCoins.CoinMultiplier;
         }
         v = MathUtil.Clamp(v, 1.0, double.MaxValue);
         CmdGainResources.ExecuteStatic(player, ResourceType.Coin, v, true, "TRACKING_ID_GAMEPLAY_LOOT_GAIN", new Vector3?(dungeonBoost.Transform.position));
     }
 }
 public CmdActivateDungeonBoost(DungeonBoost dungeonBoost, [Optional, DefaultParameterValue(0)] SkillType fromSkill)
 {
     this.m_dungeonBoost = dungeonBoost;
     this.m_fromSkill    = fromSkill;
 }