private void FireShockwave() { if (this.hasFiredShockwave) { return; } this.hasFiredShockwave = true; if (EntityStates.GrandParentBoss.SpawnState.spawnEffect) { EffectManager.SimpleMuzzleFlash(Resources.Load <GameObject>("prefabs/effects/impacteffects/GrandparentDeathEffect"), base.gameObject, "HandR", false); } if (base.isAuthority) { BlastAttack blastAttack = new BlastAttack(); blastAttack.attacker = base.gameObject; blastAttack.inflictor = base.gameObject; blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker); blastAttack.position = base.characterBody.corePosition; blastAttack.procCoefficient = 0f; blastAttack.radius = GigaImpact.blastAttackRadius; blastAttack.baseForce = GigaImpact.blastAttackForce; blastAttack.bonusForce = Vector3.up * GigaImpact.blastAttackBonusForce; blastAttack.baseDamage = GigaImpact.blastAttackDamageCoefficient * this.damageStat; blastAttack.falloffModel = BlastAttack.FalloffModel.Linear; blastAttack.damageColorIndex = DamageColorIndex.Item; blastAttack.attackerFiltering = AttackerFiltering.NeverHit; blastAttack.Fire(); } }
public override void OnEnter() { base.OnEnter(); duration = baseDuration / characterBody.attackSpeed; if (modelLocator && characterBody && rigidbody) { childLocator = modelLocator.modelTransform.GetComponent <ChildLocator>(); if (childLocator) { voidLanceCenter = childLocator.FindChild("VoidLanceCenter"); } var aimRay = GetAimRay(); bullseyeSearch = new BullseyeSearch(); bullseyeSearch.viewer = characterBody; bullseyeSearch.sortMode = BullseyeSearch.SortMode.DistanceAndAngle; bullseyeSearch.filterByDistinctEntity = true; bullseyeSearch.filterByLoS = true; bullseyeSearch.teamMaskFilter = TeamMask.allButNeutral; bullseyeSearch.teamMaskFilter.RemoveTeam(TeamComponent.GetObjectTeam(gameObject)); bullseyeSearch.minDistanceFilter = 3f; bullseyeSearch.maxDistanceFilter = 50f; bullseyeSearch.searchOrigin = aimRay.origin; bullseyeSearch.searchDirection = aimRay.direction; bullseyeSearch.maxAngleFilter = 30f; if (dragPenalty != 0f) { rigidbody.drag += dragPenalty; } } }
// Token: 0x06000571 RID: 1393 RVA: 0x00018B50 File Offset: 0x00016D50 public override void FixedUpdate() { base.FixedUpdate(); this.stopwatch += Time.fixedDeltaTime; if (this.stopwatch >= this.startDuration && !this.hasCastNova) { this.hasCastNova = true; EffectManager.instance.SpawnEffect(IceNova.novaEffectPrefab, new EffectData { origin = base.transform.position, scale = IceNova.novaRadius }, true); BlastAttack blastAttack = new BlastAttack(); blastAttack.radius = IceNova.novaRadius; blastAttack.procCoefficient = IceNova.procCoefficient; blastAttack.position = base.transform.position; blastAttack.attacker = base.gameObject; blastAttack.crit = Util.CheckRoll(base.characterBody.crit, base.characterBody.master); blastAttack.baseDamage = base.characterBody.damage * IceNova.damageCoefficient; blastAttack.falloffModel = BlastAttack.FalloffModel.None; blastAttack.damageType = DamageType.Freeze2s; blastAttack.baseForce = IceNova.force; blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker); blastAttack.Fire(); } if (this.stopwatch >= this.startDuration + this.endDuration && base.isAuthority) { this.outer.SetNextStateToMain(); return; } }
public override void OnEnter() { base.OnEnter(); Main.instance.RW_BlockSprintCrosshair.Add(base.characterBody); this.armorBuff = Main.RW_armorBuff; this.passive = this.gameObject.GetComponent <WispPassiveController>(); this.skin = this.characterBody.skinIndex; this.aimAnim = this.GetComponent <WispAimAnimationController>(); this.minDuration = baseMinDuration / this.attackSpeedStat; this.fireInterval = 1f / baseTickFreq; RoR2.Util.PlayScaledSound("Play_titanboss_R_laser_loop", this.gameObject, 0.5f); this.muzzle = this.GetModelTransform().Find("CannonPivot").Find("BeamParent"); this.beamEffect = UnityEngine.Object.Instantiate <GameObject>(Main.specialBeam, this.muzzle.position, this.muzzle.rotation); this.beamEffect.GetComponent <BitSkinController>().Apply(WispBitSkin.GetWispSkin(this.skin)); this.beamEffect.transform.parent = this.muzzle; this.beamEnd = this.beamEffect.transform.Find("End"); //this.beamEndSub = this.beamEnd.Find( "Sub" ); //this.beamEndSub.gameObject.SetActive( false ); //Create the charge and beam effects this.pos = Vector3.zero; this.team = TeamComponent.GetObjectTeam(this.gameObject); this.characterBody.AddBuff(this.armorBuff); this.cameraTargetParams.idealLocalCameraPos = this.camPos1; this.characterMotor.useGravity = false; }
private void Explode(Vector3 spawnPosition, bool isCrit, GameObject SoundGameObject) { Util.PlaySound("Play_item_use_fireballDash_explode", SoundGameObject ?? base.gameObject); EffectManager.SpawnEffect(Modules.Assets.yokoRifleExplosiveRoundExplosion, new EffectData { origin = spawnPosition, scale = (20f * explosionSizeMultiplier) }, true); new BlastAttack { position = spawnPosition, baseDamage = YokoScepterRifle.damageCoefficient * this.damageStat, baseForce = 100f, radius = (20f * explosionSizeMultiplier), attacker = base.gameObject, inflictor = base.gameObject, teamIndex = TeamComponent.GetObjectTeam(base.gameObject), crit = isCrit, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, bonusForce = Vector3.zero, falloffModel = BlastAttack.FalloffModel.Linear, damageType = DamageType.Generic, }.Fire(); }
public override void OnEnter() { hitEffectPrefab = SwipeForward.hitEffectPrefab; swingEffectPrefab = SwipeForward.swingEffectPrefab; base.OnEnter(); duration = baseDuration / attackSpeedStat; modelAnimator = GetModelAnimator(); Transform modelTransform = GetModelTransform(); attack = new OverlapAttack(); attack.attacker = base.gameObject; attack.inflictor = base.gameObject; attack.teamIndex = TeamComponent.GetObjectTeam(attack.attacker); attack.damage = damageCoefficient * damageStat; attack.damageType = DamageType.SuperBleedOnCrit; attack.hitEffectPrefab = hitEffectPrefab; attack.isCrit = Util.CheckRoll(critStat, base.characterBody.master); Util.PlaySound(attackString, base.gameObject); if ((bool)modelTransform) { attack.hitBoxGroup = Array.Find(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Sword"); } if ((bool)modelAnimator) { PlayAnimation("Gesture, Override", "SwipeForward", "SwipeForward.playbackRate", duration); PlayAnimation("Gesture, Additive", "SwipeForward", "SwipeForward.playbackRate", duration); } if ((bool)base.characterBody) { base.characterBody.SetAimTimer(2f); } }
// Token: 0x06002FFD RID: 12285 RVA: 0x000CDB9C File Offset: 0x000CBD9C public override void OnEnter() { base.OnEnter(); this.duration = Slam.baseDuration / this.attackSpeedStat; this.modelAnimator = base.GetModelAnimator(); Transform modelTransform = base.GetModelTransform(); this.attack = new OverlapAttack(); this.attack.attacker = base.gameObject; this.attack.inflictor = base.gameObject; this.attack.teamIndex = TeamComponent.GetObjectTeam(this.attack.attacker); this.attack.damage = Slam.impactDamageCoefficient * this.damageStat; this.attack.hitEffectPrefab = Slam.hitEffectPrefab; this.attack.isCrit = Util.CheckRoll(this.critStat, base.characterBody.master); if (modelTransform) { this.attack.hitBoxGroup = Array.Find <HitBoxGroup>(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Hammer"); ChildLocator component = modelTransform.GetComponent <ChildLocator>(); if (component) { this.hammerChildTransform = component.FindChild("SwingCenter"); } } if (this.modelAnimator) { base.PlayAnimation("Gesture", "Slam", "Slam.playbackRate", this.duration); } if (base.characterBody) { base.characterBody.SetAimTimer(2f); } }
// Token: 0x0600064C RID: 1612 RVA: 0x0001D694 File Offset: 0x0001B894 public override void OnEnter() { base.OnEnter(); this.duration = DoubleSlash.baseDuration / this.attackSpeedStat; this.modelAnimator = base.GetModelAnimator(); this.modelTransform = base.GetModelTransform(); base.characterMotor.walkSpeedPenaltyCoefficient = DoubleSlash.walkSpeedPenaltyCoefficient; this.attack = new OverlapAttack(); this.attack.attacker = base.gameObject; this.attack.inflictor = base.gameObject; this.attack.teamIndex = TeamComponent.GetObjectTeam(this.attack.attacker); this.attack.damage = DoubleSlash.damageCoefficient * this.damageStat; this.attack.hitEffectPrefab = DoubleSlash.hitEffectPrefab; this.attack.isCrit = Util.CheckRoll(this.critStat, base.characterBody.master); this.attack.procCoefficient = DoubleSlash.procCoefficient; this.attack.damageType = DamageType.BleedOnHit; Util.PlayScaledSound(DoubleSlash.enterSoundString, base.gameObject, this.attackSpeedStat); if (this.modelAnimator) { base.PlayAnimation("Gesture, Additive", "DoubleSlash", "DoubleSlash.playbackRate", this.duration); base.PlayAnimation("Gesture, Override", "DoubleSlash", "DoubleSlash.playbackRate", this.duration); } if (base.characterBody) { base.characterBody.SetAimTimer(this.duration + 2f); } }
// Token: 0x06000627 RID: 1575 RVA: 0x0001CABC File Offset: 0x0001ACBC public override void OnEnter() { base.OnEnter(); this.modelAnimator = base.GetModelAnimator(); this.modelTransform = base.GetModelTransform(); this.childLocator = this.modelTransform.GetComponent <ChildLocator>(); Util.PlaySound(GroundPound.initialAttackSoundString, base.gameObject); this.attack = new BlastAttack(); this.attack.attacker = base.gameObject; this.attack.inflictor = base.gameObject; this.attack.teamIndex = TeamComponent.GetObjectTeam(base.gameObject); this.attack.baseDamage = this.damageStat * GroundPound.damageCoefficient; this.attack.baseForce = GroundPound.forceMagnitude; this.attack.radius = GroundPound.blastAttackRadius; this.attack.falloffModel = BlastAttack.FalloffModel.SweetSpot; this.duration = GroundPound.baseDuration / this.attackSpeedStat; base.PlayCrossfade("Fullbody Override", "GroundPound", "GroundPound.playbackRate", this.duration, 0.2f); if (base.characterBody) { base.characterBody.SetAimTimer(this.duration + 3f); } if (this.modelTransform) { this.childLocator = this.modelTransform.GetComponent <ChildLocator>(); } }
public override void FixedUpdate() { base.FixedUpdate(); if ((bool)modelAnimator && modelAnimator.GetFloat("Slam.hitBoxActive") > 0.5f && !hasAttacked) { if (base.isAuthority) { if ((bool)base.characterDirection) { base.characterDirection.moveVector = base.characterDirection.forward; } if ((bool)modelTransform) { Transform transform = FindModelChild("SlamZone"); if ((bool)transform) { attack = new BlastAttack(); attack.attacker = base.gameObject; attack.inflictor = base.gameObject; attack.teamIndex = TeamComponent.GetObjectTeam(base.gameObject); attack.baseDamage = damageStat * damageCoefficient; attack.baseForce = forceMagnitude; attack.position = transform.position; attack.radius = radius; attack.Fire(); } } } hasAttacked = true; } if (base.fixedAge >= duration / attackSpeedStat && base.isAuthority) { outer.SetNextStateToMain(); } }
////// Hooks ////// private GameObject BulletAttack_ProcessHitList(On.RoR2.BulletAttack.orig_ProcessHitList orig, BulletAttack self, List <BulletAttack.BulletHit> hits, ref Vector3 endPosition, List <GameObject> ignoreList) { var retv = orig(self, hits, ref endPosition, ignoreList); if (!self.owner) { return(retv); } var body = self.owner.GetComponent <CharacterBody>(); var count = GetCount(body); if (count > 0) { var maxBounces = baseBounces + (count - 1) * stackBounces; var bounceEnd = endPosition - self.aimVector * 0.25f; //back ray off slightly for world clearance GameObject lastBounceTarget = null; var origDamage = self.damage; for (var i = 1; i <= maxBounces; i++) { if (!Util.CheckRoll(bounceChance, body.master)) { return(retv); } var enemies = GatherEnemies(TeamComponent.GetObjectTeam(self.owner), TeamIndex.Neutral) .Select(x => MiscUtil.GetRootWithLocators(x.gameObject)) .Select(obj => { if (obj == lastBounceTarget) { return(null, default);
public override void OnEnter() { base.OnEnter(); if (base.isAuthority && NetworkServer.active) { base.GetComponent <ServosOverclockController>().EnableOverclock(); new BlastAttack { attacker = base.gameObject, inflictor = base.gameObject, teamIndex = TeamComponent.GetObjectTeam(base.gameObject), baseDamage = this.damageStat * 2f, baseForce = 100, position = base.modelLocator.transform.position, radius = 50, procCoefficient = 10f, falloffModel = BlastAttack.FalloffModel.None, damageType = DamageType.Stun1s, crit = RollCrit() }.Fire(); if (PLAYERPAIN.hitEffectPrefab) { EffectManager.SpawnEffect(PLAYERPAIN.hitEffectPrefab, new EffectData { origin = base.transform.position, scale = 50 }, false); } } }
// Token: 0x06002EA0 RID: 11936 RVA: 0x000C63EC File Offset: 0x000C45EC private void Explode() { float t = (float)this.explosionIndex / (float)(ExplosionAttack.explosionCount - 1); float num = Mathf.Lerp(ExplosionAttack.minRadius, ExplosionAttack.maxRadius, t); EffectManager.SpawnEffect(ExplosionAttack.novaEffectPrefab, new EffectData { origin = base.transform.position, scale = num }, false); if (NetworkServer.active) { new BlastAttack { attacker = base.gameObject, inflictor = base.gameObject, teamIndex = TeamComponent.GetObjectTeam(base.gameObject), baseDamage = this.damageStat * ExplosionAttack.damageCoefficient * Mathf.Pow(ExplosionAttack.damageScaling, (float)this.explosionIndex), baseForce = ExplosionAttack.force, position = base.transform.position, radius = num, falloffModel = BlastAttack.FalloffModel.None }.Fire(); } }
// Token: 0x0600409D RID: 16541 RVA: 0x00100860 File Offset: 0x000FEA60 private void Detonate() { this.hasExploded = true; Util.PlaySound(JellyShockSkill.novaSoundString, base.gameObject); if (this.chargeEffect) { EntityState.Destroy(this.chargeEffect); } if (JellyShockSkill.novaEffectPrefab) { EffectManager.SpawnEffect(JellyShockSkill.novaEffectPrefab, new EffectData { origin = base.transform.position, scale = JellyShockSkill.novaRadius }, true); } new BlastAttack { attacker = base.gameObject, inflictor = base.gameObject, teamIndex = TeamComponent.GetObjectTeam(base.gameObject), baseDamage = this.damageStat * JellyShockSkill.novaDamageCoefficient, baseForce = 0f, bonusForce = Vector3.zero, position = base.transform.position, radius = JellyShockSkill.novaRadius, procCoefficient = 1f, attackerFiltering = AttackerFiltering.NeverHit }.Fire(); }
// Token: 0x06002D99 RID: 11673 RVA: 0x000C1638 File Offset: 0x000BF838 public override void OnExit() { EffectManager.SimpleMuzzleFlash(ChargeMeteor.muzzleflashEffect, base.gameObject, "Muzzle", false); if (this.areaIndicatorInstance) { if (this.fireMeteor) { float num = Util.Remap(Mathf.Clamp01(this.stopwatch / this.chargeDuration), 0f, 1f, ChargeMeteor.minDamageCoefficient, ChargeMeteor.maxDamageCoefficient); EffectManager.SpawnEffect(ChargeMeteor.meteorEffect, new EffectData { origin = this.areaIndicatorInstance.transform.position, scale = this.radius }, true); BlastAttack blastAttack = new BlastAttack(); blastAttack.radius = this.radius; blastAttack.procCoefficient = ChargeMeteor.procCoefficient; blastAttack.position = this.areaIndicatorInstance.transform.position; blastAttack.attacker = base.gameObject; blastAttack.crit = Util.CheckRoll(base.characterBody.crit, base.characterBody.master); blastAttack.baseDamage = base.characterBody.damage * num; blastAttack.falloffModel = BlastAttack.FalloffModel.SweetSpot; blastAttack.baseForce = ChargeMeteor.force; blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker); blastAttack.Fire(); } EntityState.Destroy(this.areaIndicatorInstance.gameObject); } base.OnExit(); }
private void FireShockwave() { Util.PlaySound("HenryFrenzyShockwave", base.gameObject); EffectData effectData = new EffectData(); effectData.origin = base.characterBody.corePosition; effectData.scale = 1; //EffectManager.SpawnEffect(Modules.Assets.frenzyShockwaveEffect, effectData, false); if (base.isAuthority) { BlastAttack blastAttack = new BlastAttack(); blastAttack.attacker = base.gameObject; blastAttack.inflictor = base.gameObject; blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker); blastAttack.position = base.characterBody.corePosition; blastAttack.procCoefficient = 0f; blastAttack.radius = RageEnterOut.shockwaveRadius; blastAttack.baseForce = RageEnterOut.shockwaveForce; blastAttack.bonusForce = Vector3.up * RageEnterOut.shockwaveBonusForce; blastAttack.baseDamage = 0f; blastAttack.falloffModel = BlastAttack.FalloffModel.None; blastAttack.damageColorIndex = DamageColorIndex.Item; blastAttack.attackerFiltering = AttackerFiltering.NeverHit; blastAttack.Fire(); } if (this.rageController) { this.rageController.EnterBerserk(); } }
// Token: 0x06002FA9 RID: 12201 RVA: 0x000CC4A8 File Offset: 0x000CA6A8 private void FireOrbGlaive() { if (!NetworkServer.active || this.hasTriedToThrowGlaive) { return; } this.hasTriedToThrowGlaive = true; LightningOrb lightningOrb = new LightningOrb(); lightningOrb.lightningType = LightningOrb.LightningType.HuntressGlaive; lightningOrb.damageValue = base.characterBody.damage * ThrowGlaive.damageCoefficient; lightningOrb.isCrit = Util.CheckRoll(base.characterBody.crit, base.characterBody.master); lightningOrb.teamIndex = TeamComponent.GetObjectTeam(base.gameObject); lightningOrb.attacker = base.gameObject; lightningOrb.procCoefficient = ThrowGlaive.glaiveProcCoefficient; lightningOrb.bouncesRemaining = ThrowGlaive.maxBounceCount; lightningOrb.speed = ThrowGlaive.glaiveTravelSpeed; lightningOrb.bouncedObjects = new List <HealthComponent>(); lightningOrb.range = ThrowGlaive.glaiveBounceRange; lightningOrb.damageCoefficientPerBounce = ThrowGlaive.damageCoefficientPerBounce; HurtBox hurtBox = this.initialOrbTarget; if (hurtBox) { this.hasSuccessfullyThrownGlaive = true; Transform transform = this.childLocator.FindChild("HandR"); EffectManager.SimpleMuzzleFlash(ThrowGlaive.muzzleFlashPrefab, base.gameObject, "HandR", true); lightningOrb.origin = transform.position; lightningOrb.target = hurtBox; OrbManager.instance.AddOrb(lightningOrb); } }
private void Explode(CharacterBody originBody, float mult, BlastAttack.FalloffModel falloffModel, GameObject effect, EffectData effectData) { if (originBody) { EffectManager.SpawnEffect(effect, effectData, true); if (base.isAuthority) { new BlastAttack { attacker = originBody.gameObject, inflictor = originBody.gameObject, teamIndex = TeamComponent.GetObjectTeam(base.gameObject), baseDamage = this.damageStat * Sacrifice.damageCoefficient * mult, procCoefficient = Sacrifice.procCoefficient, baseForce = Sacrifice.force, position = originBody.transform.position, radius = Sacrifice.radius * mult, crit = Util.CheckRoll(this.critStat, base.characterBody.master), falloffModel = falloffModel, attackerFiltering = AttackerFiltering.NeverHit }.Fire(); } } }
// Token: 0x06001D51 RID: 7505 RVA: 0x00088CD0 File Offset: 0x00086ED0 public override void OnArrival() { EffectManager.instance.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/LightningStrikeImpact"), new EffectData { origin = this.lastKnownTargetPosition }, true); if (this.attacker) { new BlastAttack { attacker = this.attacker, baseDamage = this.damageValue, baseForce = 0f, bonusForce = Vector3.down * 3000f, canHurtAttacker = false, crit = this.isCrit, damageColorIndex = DamageColorIndex.Item, damageType = DamageType.Stun1s, falloffModel = BlastAttack.FalloffModel.None, inflictor = null, position = this.lastKnownTargetPosition, procChainMask = default(ProcChainMask), procCoefficient = 1f, radius = 3f, teamIndex = TeamComponent.GetObjectTeam(this.attacker) }.Fire(); } }
// Token: 0x06000698 RID: 1688 RVA: 0x0001F688 File Offset: 0x0001D888 private void FireOrbArrow() { if (!NetworkServer.active || this.hasFiredArrow) { return; } this.hasFiredArrow = true; ArrowOrb arrowOrb = new ArrowOrb(); arrowOrb.damageValue = base.characterBody.damage * FireSeekingArrow.orbDamageCoefficient; arrowOrb.isCrit = Util.CheckRoll(base.characterBody.crit, base.characterBody.master); arrowOrb.teamIndex = TeamComponent.GetObjectTeam(base.gameObject); arrowOrb.attacker = base.gameObject; arrowOrb.procCoefficient = FireSeekingArrow.orbProcCoefficient; HurtBox hurtBox = this.initialOrbTarget; if (hurtBox) { Transform transform = this.childLocator.FindChild(FireSeekingArrow.muzzleString); EffectManager.instance.SimpleMuzzleFlash(FireSeekingArrow.muzzleflashEffectPrefab, base.gameObject, FireSeekingArrow.muzzleString, true); arrowOrb.origin = transform.position; arrowOrb.target = hurtBox; OrbManager.instance.AddOrb(arrowOrb); } }
// Token: 0x0600088E RID: 2190 RVA: 0x0002ADE8 File Offset: 0x00028FE8 public override void OnEnter() { base.OnEnter(); this.duration = SwipeForward.baseDuration / this.attackSpeedStat; this.modelAnimator = base.GetModelAnimator(); Transform modelTransform = base.GetModelTransform(); this.attack = new OverlapAttack(); this.attack.attacker = base.gameObject; this.attack.inflictor = base.gameObject; this.attack.teamIndex = TeamComponent.GetObjectTeam(this.attack.attacker); this.attack.damage = SwipeForward.damageCoefficient * this.damageStat; this.attack.hitEffectPrefab = SwipeForward.hitEffectPrefab; this.attack.isCrit = Util.CheckRoll(this.critStat, base.characterBody.master); Util.PlaySound(SwipeForward.attackString, base.gameObject); if (modelTransform) { this.attack.hitBoxGroup = Array.Find <HitBoxGroup>(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Sword"); } if (this.modelAnimator) { base.PlayAnimation("Gesture, Override", "SwipeForward", "SwipeForward.playbackRate", this.duration); base.PlayAnimation("Gesture, Additive", "SwipeForward", "SwipeForward.playbackRate", this.duration); } if (base.characterBody) { base.characterBody.SetAimTimer(2f); } }
// Token: 0x06002F99 RID: 12185 RVA: 0x000CBD3C File Offset: 0x000C9F3C private void FireOrbArrow() { if (hasFiredArrow || !NetworkServer.active) { return; } hasFiredArrow = true; LightningOrb lightningOrb = new LightningOrb(); lightningOrb.lightningType = (LightningOrb.LightningType)(-1); lightningOrb.damageValue = base.characterBody.damage * 0.5f; lightningOrb.isCrit = Util.CheckRoll(base.characterBody.crit, base.characterBody.master); lightningOrb.teamIndex = TeamComponent.GetObjectTeam(base.gameObject); lightningOrb.attacker = base.gameObject; lightningOrb.procCoefficient = 0.08f; lightningOrb.bouncesRemaining = 2; lightningOrb.speed = 55; lightningOrb.bouncedObjects = new List <HealthComponent>(); lightningOrb.range = 100; lightningOrb.damageCoefficientPerBounce = 1f; lightningOrb.SetFieldValue("canBounceOnSameTarget", true); HurtBox hurtBox = initialOrbTarget; if (hurtBox) { lightningOrb.origin = transform.position; lightningOrb.target = hurtBox; OrbManager.instance.AddOrb(lightningOrb); } }
// Token: 0x0600073F RID: 1855 RVA: 0x0002351C File Offset: 0x0002171C public override void FixedUpdate() { base.FixedUpdate(); if (this.modelAnimator && this.modelAnimator.GetFloat("Clap.hitBoxActive") > 0.5f && !this.hasAttacked) { if (base.isAuthority && this.modelTransform) { ChildLocator component = this.modelTransform.GetComponent <ChildLocator>(); if (component) { Transform transform = component.FindChild("ClapZone"); if (transform) { this.attack = new BlastAttack(); this.attack.attacker = base.gameObject; this.attack.inflictor = base.gameObject; this.attack.teamIndex = TeamComponent.GetObjectTeam(base.gameObject); this.attack.baseDamage = this.damageStat * ClapState.damageCoefficient; this.attack.baseForce = ClapState.forceMagnitude; this.attack.position = transform.position; this.attack.radius = ClapState.radius; this.attack.Fire(); } } } this.hasAttacked = true; EntityState.Destroy(this.leftHandChargeEffect); EntityState.Destroy(this.rightHandChargeEffect); } if (base.fixedAge >= ClapState.duration && base.isAuthority) { this.outer.SetNextStateToMain(); return; } }
private void Explode() { EffectManager.SpawnEffect(Survivor.Effects.weakStanBurnEffect, new EffectData { origin = base.transform.position, scale = 2.5f }, true);; if (base.isAuthority) { new BlastAttack { attacker = base.gameObject, inflictor = base.gameObject, teamIndex = TeamComponent.GetObjectTeam(base.gameObject), baseDamage = this.damageStat * WeakStanMain.damageCoefficient, procCoefficient = WeakStanMain.procCoefficient, baseForce = WeakStanMain.force, position = base.transform.position, radius = WeakStanMain.radius, crit = Util.CheckRoll(this.critStat, base.characterBody.master), falloffModel = BlastAttack.FalloffModel.None, attackerFiltering = AttackerFiltering.NeverHit }.Fire(); } }
// Token: 0x06002EFC RID: 12028 RVA: 0x000C81F4 File Offset: 0x000C63F4 private void CalculateBlinkDestination() { Vector3 vector = Vector3.zero; Ray aimRay = base.GetAimRay(); BullseyeSearch bullseyeSearch = new BullseyeSearch(); bullseyeSearch.searchOrigin = aimRay.origin; bullseyeSearch.searchDirection = aimRay.direction; bullseyeSearch.maxDistanceFilter = this.blinkDistance; bullseyeSearch.teamMaskFilter = TeamMask.allButNeutral; bullseyeSearch.filterByLoS = false; bullseyeSearch.teamMaskFilter.RemoveTeam(TeamComponent.GetObjectTeam(base.gameObject)); bullseyeSearch.sortMode = BullseyeSearch.SortMode.Angle; bullseyeSearch.RefreshCandidates(); HurtBox hurtBox = bullseyeSearch.GetResults().FirstOrDefault <HurtBox>(); if (hurtBox) { vector = hurtBox.transform.position - base.transform.position; } this.blinkDestination = base.transform.position; this.blinkStart = base.transform.position; NodeGraph groundNodes = SceneInfo.instance.groundNodes; NodeGraph.NodeIndex nodeIndex = groundNodes.FindClosestNode(base.transform.position + vector, base.characterBody.hullClassification); groundNodes.GetNodePosition(nodeIndex, out this.blinkDestination); this.blinkDestination += base.transform.position - base.characterBody.footPosition; base.characterDirection.forward = vector; }
public override void OnEnter() { procCoefficient = DoubleSlash.procCoefficient; selfForce = DoubleSlash.selfForce; hitEffectPrefab = DoubleSlash.hitEffectPrefab; swipeEffectPrefab = DoubleSlash.swipeEffectPrefab; enterSoundString = DoubleSlash.enterSoundString; slashSoundString = DoubleSlash.slashSoundString; walkSpeedPenaltyCoefficient = DoubleSlash.walkSpeedPenaltyCoefficient; base.OnEnter(); duration = baseDuration / attackSpeedStat; modelAnimator = GetModelAnimator(); modelTransform = GetModelTransform(); base.characterMotor.walkSpeedPenaltyCoefficient = walkSpeedPenaltyCoefficient; attack = new OverlapAttack(); attack.attacker = base.gameObject; attack.inflictor = base.gameObject; attack.teamIndex = TeamComponent.GetObjectTeam(attack.attacker); attack.damage = damageCoefficient * damageStat; attack.hitEffectPrefab = hitEffectPrefab; attack.isCrit = Util.CheckRoll(critStat, base.characterBody.master); attack.procCoefficient = procCoefficient; attack.damageType = DamageType.Generic; Util.PlayAttackSpeedSound(enterSoundString, base.gameObject, attackSpeedStat); if ((bool)modelAnimator) { PlayAnimation("Gesture, Additive", "DoubleSlash", "DoubleSlash.playbackRate", duration); PlayAnimation("Gesture, Override", "DoubleSlash", "DoubleSlash.playbackRate", duration); } if ((bool)base.characterBody) { base.characterBody.SetAimTimer(duration + 2f); } }
private void On_CMOnHitGround(On.RoR2.CharacterMotor.orig_OnHitGround orig, CharacterMotor self, CharacterMotor.HitGroundInfo ghi) { orig(self, ghi); if (!self.body) { return; } if (GetCount(self.body) > 0 && Math.Abs(ghi.velocity.y) > velThreshold) { float scalefac = Mathf.Lerp(0f, baseDamage + (GetCount(self.body) - 1f) * stackDamage, Mathf.InverseLerp(velThreshold, velMax + velThreshold, Math.Abs(ghi.velocity.y))); //most properties borrowed from H3AD-5T v2 BlastAttack blastAttack = new BlastAttack { attacker = self.body.gameObject, inflictor = self.body.gameObject, teamIndex = TeamComponent.GetObjectTeam(self.body.gameObject), position = ghi.position, procCoefficient = 0.5f, radius = 10f, baseForce = 2000f, bonusForce = Vector3.up * 2000f, baseDamage = self.body.damage * scalefac, falloffModel = BlastAttack.FalloffModel.SweetSpot, crit = Util.CheckRoll(self.body.crit, self.body.master), damageColorIndex = DamageColorIndex.Item, attackerFiltering = AttackerFiltering.NeverHit }; blastAttack.Fire(); EffectData effectData = new EffectData { origin = ghi.position, scale = 10f }; EffectManager.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/BootShockwave"), effectData, true); } }
private void LandingImpact() { base.characterMotor.velocity *= 0.1f; BlastAttack blastAttack = new BlastAttack(); blastAttack.radius = PeoplesElbow.slamRadius; blastAttack.procCoefficient = PeoplesElbow.slamProcCoefficient; blastAttack.position = base.characterBody.footPosition; blastAttack.attacker = base.gameObject; blastAttack.crit = base.RollCrit(); blastAttack.baseDamage = base.characterBody.damage * PeoplesElbow.slamDamageCoefficient; blastAttack.falloffModel = BlastAttack.FalloffModel.SweetSpot; blastAttack.baseForce = PeoplesElbow.slamForce; blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker); blastAttack.damageType = DamageType.Stun1s; blastAttack.attackerFiltering = AttackerFiltering.NeverHit; blastAttack.Fire(); EffectManager.SpawnEffect(EntityStates.LemurianBruiserMonster.SpawnState.spawnEffectPrefab, new EffectData { origin = base.characterBody.footPosition, scale = 4f }, true); }
// Token: 0x06003322 RID: 13090 RVA: 0x000DDA2C File Offset: 0x000DBC2C private void FireOrbs() { if (!NetworkServer.active) { return; } Transform transform = this.childLocator.FindChild(SpawnWards.muzzleString).transform; BullseyeSearch bullseyeSearch = new BullseyeSearch(); bullseyeSearch.searchOrigin = transform.position; bullseyeSearch.searchDirection = transform.forward; bullseyeSearch.maxDistanceFilter = SpawnWards.orbRange; bullseyeSearch.teamMaskFilter = TeamMask.allButNeutral; bullseyeSearch.teamMaskFilter.RemoveTeam(TeamComponent.GetObjectTeam(base.gameObject)); bullseyeSearch.sortMode = BullseyeSearch.SortMode.Distance; bullseyeSearch.RefreshCandidates(); EffectManager.SimpleMuzzleFlash(SpawnWards.muzzleflashEffectPrefab, base.gameObject, SpawnWards.muzzleString, true); List <HurtBox> list = bullseyeSearch.GetResults().ToList <HurtBox>(); for (int i = 0; i < list.Count; i++) { HurtBox target = list[i]; BeetleWardOrb beetleWardOrb = new BeetleWardOrb(); beetleWardOrb.origin = transform.position; beetleWardOrb.target = target; beetleWardOrb.speed = SpawnWards.orbTravelSpeed; OrbManager.instance.AddOrb(beetleWardOrb); } }
private void Fire() { if (this.hasFired) { return; } this.hasFired = true; Util.PlaySound("Play_parent_attack1_slam", base.gameObject); if (EntityStates.BeetleGuardMonster.GroundSlam.slamEffectPrefab) { EffectManager.SimpleMuzzleFlash(EntityStates.BeetleGuardMonster.GroundSlam.slamEffectPrefab, base.gameObject, "HandR", false); } this.flashController.Flash(); if (base.isAuthority) { BlastAttack blastAttack = new BlastAttack(); blastAttack.attacker = base.gameObject; blastAttack.inflictor = base.gameObject; blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker); blastAttack.position = base.FindModelChild("HandR").position; blastAttack.procCoefficient = 0f; blastAttack.radius = GigaImpact.impactAttackRadius; blastAttack.baseForce = GigaImpact.impactAttackForce; blastAttack.bonusForce = Vector3.up * GigaImpact.impactAttackBonusForce; blastAttack.baseDamage = GigaImpact.impactAttackDamageCoefficient * this.damageStat; blastAttack.falloffModel = BlastAttack.FalloffModel.SweetSpot; blastAttack.damageColorIndex = DamageColorIndex.Item; blastAttack.attackerFiltering = AttackerFiltering.NeverHit; blastAttack.Fire(); } }