Exemplo n.º 1
0
 // Token: 0x060015B8 RID: 5560 RVA: 0x0005C818 File Offset: 0x0005AA18
 public override void OnServerBossDefeated(BossGroup bossGroup)
 {
     base.OnServerBossDefeated(bossGroup);
     if (TeleporterInteraction.instance)
     {
         TeleporterInteraction.instance.remainingChargeTimer = 0f;
     }
 }
Exemplo n.º 2
0
 // Token: 0x0600177F RID: 6015 RVA: 0x0006F4C0 File Offset: 0x0006D6C0
 public override void OnServerBossAdded(BossGroup bossGroup, CharacterMaster characterMaster)
 {
     base.OnServerBossAdded(bossGroup, characterMaster);
     if (this.stageClearCount >= 1)
     {
         if (characterMaster.inventory.GetEquipmentIndex() == EquipmentIndex.None)
         {
             characterMaster.inventory.SetEquipmentIndex(WeeklyRun.affixes[this.bossAffixRng.RangeInt(0, WeeklyRun.affixes.Length)]);
         }
         characterMaster.inventory.GiveItem(ItemIndex.BoostHp, 5);
         characterMaster.inventory.GiveItem(ItemIndex.BoostDamage, 1);
     }
 }
Exemplo n.º 3
0
 // Token: 0x060015B7 RID: 5559 RVA: 0x0005C7B4 File Offset: 0x0005A9B4
 public unsafe override void OnServerBossAdded(BossGroup bossGroup, CharacterMaster characterMaster)
 {
     base.OnServerBossAdded(bossGroup, characterMaster);
     if (this.stageClearCount >= 1)
     {
         if (characterMaster.inventory.GetEquipmentIndex() == EquipmentIndex.None)
         {
             characterMaster.inventory.SetEquipmentIndex(*this.bossAffixRng.NextElementUniform <EquipmentIndex>(WeeklyRun.affixes));
         }
         characterMaster.inventory.GiveItem(ItemIndex.BoostHp, 5);
         characterMaster.inventory.GiveItem(ItemIndex.BoostDamage, 1);
     }
 }
Exemplo n.º 4
0
 // Token: 0x06000DBF RID: 3519 RVA: 0x00043984 File Offset: 0x00041B84
 private bool AttemptSpawnOnTarget(GameObject spawnTarget)
 {
     if (spawnTarget)
     {
         if (this.currentMonsterCard == null)
         {
             this.currentMonsterCard       = this.monsterCards.Evaluate(this.rng.nextNormalizedFloat);
             this.lastAttemptedMonsterCard = this.currentMonsterCard;
             this.currentActiveEliteIndex  = EliteCatalog.eliteList[this.rng.RangeInt(0, EliteCatalog.eliteList.Count)];
         }
         bool  flag = !(this.currentMonsterCard.spawnCard as CharacterSpawnCard).noElites;
         float num  = CombatDirector.maximumNumberToSpawnBeforeSkipping * (flag ? CombatDirector.eliteMultiplierCost : 1f);
         if (this.currentMonsterCard.CardIsValid() && this.monsterCredit >= (float)this.currentMonsterCard.cost && (!this.skipSpawnIfTooCheap || this.monsterCredit <= (float)this.currentMonsterCard.cost * num))
         {
             SpawnCard             spawnCard             = this.currentMonsterCard.spawnCard;
             DirectorPlacementRule directorPlacementRule = new DirectorPlacementRule
             {
                 placementMode   = DirectorPlacementRule.PlacementMode.Approximate,
                 spawnOnTarget   = spawnTarget.transform,
                 preventOverhead = this.currentMonsterCard.preventOverhead
             };
             DirectorCore.GetMonsterSpawnDistance(this.currentMonsterCard.spawnDistance, out directorPlacementRule.minDistance, out directorPlacementRule.maxDistance);
             directorPlacementRule.minDistance *= this.spawnDistanceMultiplier;
             directorPlacementRule.maxDistance *= this.spawnDistanceMultiplier;
             GameObject gameObject = DirectorCore.instance.TrySpawnObject(spawnCard, directorPlacementRule, this.rng);
             if (gameObject)
             {
                 int             num2       = this.currentMonsterCard.cost;
                 float           num3       = 1f;
                 float           num4       = 1f;
                 CharacterMaster component  = gameObject.GetComponent <CharacterMaster>();
                 GameObject      bodyObject = component.GetBodyObject();
                 if (this.isBoss)
                 {
                     if (!this.bossGroup)
                     {
                         GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/NetworkedObjects/BossGroup"));
                         NetworkServer.Spawn(gameObject2);
                         this.bossGroup = gameObject2.GetComponent <BossGroup>();
                         this.bossGroup.dropPosition = this.dropPosition;
                     }
                     this.bossGroup.AddMember(component);
                 }
                 if (flag && (float)num2 * CombatDirector.eliteMultiplierCost <= this.monsterCredit)
                 {
                     num3 = 4.7f;
                     num4 = 2f;
                     component.inventory.SetEquipmentIndex(EliteCatalog.GetEliteDef(this.currentActiveEliteIndex).eliteEquipmentIndex);
                     num2 = (int)((float)num2 * CombatDirector.eliteMultiplierCost);
                 }
                 int num5 = num2;
                 this.monsterCredit -= (float)num5;
                 if (this.isBoss)
                 {
                     int livingPlayerCount = Run.instance.livingPlayerCount;
                     num3 *= Mathf.Pow((float)livingPlayerCount, 1f);
                 }
                 component.inventory.GiveItem(ItemIndex.BoostHp, Mathf.RoundToInt((num3 - 1f) * 10f));
                 component.inventory.GiveItem(ItemIndex.BoostDamage, Mathf.RoundToInt((num4 - 1f) * 10f));
                 DeathRewards component2 = bodyObject.GetComponent <DeathRewards>();
                 if (component2)
                 {
                     component2.expReward  = (uint)((float)num2 * this.expRewardCoefficient * Run.instance.compensatedDifficultyCoefficient);
                     component2.goldReward = (uint)((float)num2 * this.expRewardCoefficient * 2f * Run.instance.compensatedDifficultyCoefficient);
                 }
                 if (this.spawnEffectPrefab && NetworkServer.active)
                 {
                     Vector3       origin     = gameObject.transform.position;
                     CharacterBody component3 = bodyObject.GetComponent <CharacterBody>();
                     if (component3)
                     {
                         origin = component3.corePosition;
                     }
                     EffectManager.instance.SpawnEffect(this.spawnEffectPrefab, new EffectData
                     {
                         origin = origin
                     }, true);
                 }
                 return(true);
             }
         }
     }
     return(false);
 }
 // Token: 0x06001676 RID: 5750 RVA: 0x0006AF40 File Offset: 0x00069140
 private void UpdateMonstersClear()
 {
     this.monstersCleared = (BossGroup.GetTotalBossCount() == 0);
 }