public override void OnEnter() { base.OnEnter(); this.swordController = base.GetComponent <PaladinSwordController>(); //Util.PlaySound(this.beginSoundString, base.gameObject); this.modelTransform = base.GetModelTransform(); if (this.swordController) { this.swordController.attacking = true; } if (this.modelTransform) { this.characterModel = this.modelTransform.GetComponent <CharacterModel>(); } Util.PlayAttackSpeedSound(EntityStates.Croco.Leap.leapSoundString, base.gameObject, 1.75f); base.PlayAnimation("FullBody, Override", "DashForward", "Whirlwind.playbackRate", AirDash.duration); if (NetworkServer.active) { base.characterBody.AddBuff(RoR2Content.Buffs.HiddenInvincibility); } this.dashVector = this.GetDashVector(); //this.CreateBlinkEffect(Util.GetCorePosition(base.gameObject)); }
public override void OnEnter() { base.OnEnter(); this.childLocator = base.GetModelChildLocator(); this.animator = base.GetModelAnimator(); if (base.healthComponent.combinedHealth >= (0.9f * base.healthComponent.fullCombinedHealth) || base.healthComponent.barrier > 0) { this.swordActive = true; this.swordTransition = StaticValues.maxSwordGlow; } else { this.swordActive = false; this.swordTransition = 0; } this.swordController = base.characterBody.GetComponent <PaladinSwordController>(); if (base.characterBody) { Transform modelTransform = base.GetModelTransform(); if (modelTransform) { this.swordMat = modelTransform.GetComponent <CharacterModel>().baseRendererInfos[0].defaultMaterial; } } if (this.childLocator) { string effectString = Modules.Effects.GetSkinInfo(this.swordController.skinName).passiveEffectName; if (effectString != "") { this.swordActiveEffect = this.childLocator.FindChild(effectString).gameObject; } } }
public override void OnEnter() { base.OnEnter(); this.duration = AirSlamAlt.leapDuration / (0.5f + (0.5f * this.attackSpeedStat)); this.hasFired = false; this.hasLanded = false; this.animator = base.GetModelAnimator(); this.swordController = base.GetComponent <PaladinSwordController>(); base.skillLocator.secondary.DeductStock(1); Vector3 direction = base.GetAimRay().direction; if (base.isAuthority) { base.characterBody.isSprinting = true; base.characterMotor.velocity *= 0.1f; base.SmallHop(base.characterMotor, AirSlamAlt.hopVelocity); } base.characterBody.bodyFlags |= CharacterBody.BodyFlags.IgnoreFallDamage; HitBoxGroup hitBoxGroup = null; Transform modelTransform = base.GetModelTransform(); string hitboxString = "LeapStrike"; if (modelTransform) { hitBoxGroup = Array.Find <HitBoxGroup>(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxString); } base.PlayAnimation("FullBody, Override", "LeapSlam2", "Whirlwind.playbackRate", this.duration * 1.5f); Util.PlaySound(Modules.Sounds.Lunge, base.gameObject); Util.PlaySound(Modules.Sounds.Cloth2, base.gameObject); this.swordController.airSlamStacks++; float dmg = AirSlam.damageCoefficient; this.attack = new OverlapAttack(); this.attack.damageType = DamageType.Stun1s; this.attack.attacker = base.gameObject; this.attack.inflictor = base.gameObject; this.attack.teamIndex = base.GetTeam(); this.attack.damage = ((0.5f + (0.5f * this.swordController.airSlamStacks)) * dmg) * this.damageStat; this.attack.procCoefficient = 1; this.attack.hitEffectPrefab = this.swordController.hitEffect; this.attack.forceVector = -Vector3.up * 6000f; this.attack.pushAwayForce = 500f; this.attack.hitBoxGroup = hitBoxGroup; this.attack.isCrit = base.RollCrit(); this.attack.impactSound = Modules.Assets.swordHitSoundEventL.index; if (this.swordController.isBlunt) { this.attack.impactSound = Modules.Assets.batHitSoundEventL.index; } }
public override void OnEnter() { base.OnEnter(); this.duration = this.baseDuration / this.attackSpeedStat; this.hasFired = false; this.animator = base.GetModelAnimator(); this.swordController = base.GetComponent <PaladinSwordController>(); base.StartAimMode(0.5f + this.duration, false); base.characterBody.isSprinting = false; base.skillLocator.secondary.DeductStock(1); if (this.swordController) { this.swordController.attacking = true; } HitBoxGroup hitBoxGroup = null; Transform modelTransform = base.GetModelTransform(); if (NetworkServer.active) { base.characterBody.AddBuff(RoR2Content.Buffs.Slow50); } string hitboxString = "SpinSlash"; if (this.swordController && this.swordController.swordActive) { hitboxString = "SpinSlashLarge"; } if (modelTransform) { hitBoxGroup = Array.Find <HitBoxGroup>(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxString); } base.PlayAnimation("FullBody, Override", "GroundSweepContinuous", "Whirlwind.playbackRate", this.duration * 1.1f); Util.PlaySound(Modules.Sounds.Cloth3, base.gameObject); this.attack = new OverlapAttack(); this.attack.damageType = DamageType.Stun1s; this.attack.attacker = base.gameObject; this.attack.inflictor = base.gameObject; this.attack.teamIndex = base.GetTeam(); this.attack.damage = GroundSweepAlt.damageCoefficient * this.damageStat; this.attack.procCoefficient = 1; this.attack.hitEffectPrefab = this.swordController.hitEffect; this.attack.forceVector = Vector3.up * 1600f; this.attack.pushAwayForce = -1500f; this.attack.hitBoxGroup = hitBoxGroup; this.attack.isCrit = base.RollCrit(); this.attack.impactSound = Modules.Assets.swordHitSoundEventM.index; if (this.swordController.isBlunt) { this.attack.impactSound = Modules.Assets.batHitSoundEventM.index; } }
public override void OnEnter() { base.OnEnter(); this.duration = this.baseDuration / this.attackSpeedStat; this.animator = base.GetModelAnimator(); this.childLocator = base.GetModelChildLocator(); this.swordController = base.GetComponent <PaladinSwordController>(); if (this.swordController) { this.swordController.attacking = true; } if (this.childLocator) { Transform transform = this.childLocator.FindChild("HandL"); if (transform && this.chargeEffectPrefab) { this.chargeEffectInstance = UnityEngine.Object.Instantiate <GameObject>(this.chargeEffectPrefab, transform.position, transform.rotation); this.chargeEffectInstance.transform.parent = transform; ScaleParticleSystemDuration component = this.chargeEffectInstance.GetComponent <ScaleParticleSystemDuration>(); ObjectScaleCurve component2 = this.chargeEffectInstance.GetComponent <ObjectScaleCurve>(); if (component) { component.newDuration = this.duration; } if (component2) { component2.timeMax = this.duration; } } } base.PlayAnimation("Gesture, Override", "ChargeSpell", "ChargeSpell.playbackRate", 0.4f * this.duration); this.loopSoundInstanceId = Util.PlayScaledSound(this.chargeSoundString, base.gameObject, this.attackSpeedStat); this.defaultCrosshairPrefab = base.characterBody.crosshairPrefab; if (this.crosshairOverridePrefab) { base.characterBody.crosshairPrefab = this.crosshairOverridePrefab; } base.StartAimMode(this.duration + 2f, false); }
public override void OnEnter() { base.OnEnter(); this.animator = base.GetModelAnimator(); this.childLocator = base.GetModelChildLocator(); this.swordController = base.GetComponent <PaladinSwordController>(); this.localUser = LocalUserManager.readOnlyLocalUsersList[0]; base.characterBody.hideCrosshair = true; if (base.GetAimAnimator()) { base.GetAimAnimator().enabled = false; } this.animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 0); this.animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 0); if (this.animDuration == 0 && this.duration != 0) { this.animDuration = this.duration; } if (this.duration > 0) { base.PlayAnimation("FullBody, Override", this.animString, "Emote.playbackRate", this.duration); } else { base.PlayAnimation("FullBody, Override", this.animString, "Emote.playbackRate", this.animDuration); } this.activePlayID = Util.PlaySound(soundString, base.gameObject); if (this.normalizeModel) { if (base.modelLocator) { base.modelLocator.normalizeToFloor = true; } } this.originalCameraParams = base.cameraTargetParams.cameraParams; base.cameraTargetParams.cameraParams = Modules.CameraParams.emoteCameraParamsPaladin; }
public override void OnEnter() { this.baseDuration = 15f; this.overrideDuration = 15f; this.muzzleflashEffectPrefab = Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/ExplosionSolarFlare"); this.projectilePrefab = null; this.castSoundString = Modules.Sounds.CastTorpor; this.swordController = base.gameObject.GetComponent <PaladinSwordController>(); base.OnEnter(); if (NetworkServer.active) { Vector3?vector = this.sunSpawnPosition; float oldMinDistance = ChannelSun.sunPlacementMinDistance; float oldIdealAltitude = ChannelSun.sunPlacementIdealAltitudeBonus; ChannelSun.sunPlacementMinDistance = 0f; ChannelSun.sunPlacementIdealAltitudeBonus = 0f; this.sunSpawnPosition = this.swordController.sunPosition + Vector3.up;//((vector != null) ? vector : ChannelSun.FindSunSpawnPosition(this.spellPosition)); if (this.sunSpawnPosition != null) { this.sunInstance = this.CreateSun(this.sunSpawnPosition.Value); } ChannelSun.sunPlacementMinDistance = oldMinDistance; ChannelSun.sunPlacementIdealAltitudeBonus = oldIdealAltitude; } Transform modelTransform = base.GetModelTransform(); if (modelTransform) { TemporaryOverlay temporaryOverlay = modelTransform.gameObject.AddComponent <TemporaryOverlay>(); temporaryOverlay.duration = this.baseDuration; temporaryOverlay.animateShaderAlpha = true; temporaryOverlay.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); temporaryOverlay.destroyComponentOnEnd = true; temporaryOverlay.originalMaterial = Resources.Load <Material>("Materials/matGrandparentTeleportOutBoom"); temporaryOverlay.AddToCharacerModel(modelTransform.GetComponent <CharacterModel>()); } }
public override void OnEnter() { this.chargeEffectPrefab = null; this.chargeSoundString = Modules.Sounds.ChannelHeal; this.maxSpellRadius = StaticValues.healRadius; this.baseDuration = 0.25f * StaticValues.healZoneChannelDuration; this.swordController = base.gameObject.GetComponent <PaladinSwordController>(); this.zooming = false; base.OnEnter(); ChildLocator childLocator = base.GetModelChildLocator(); if (childLocator) { this.chargeEffect = childLocator.FindChild("SmallHealChannelEffect").gameObject; this.chargeEffect.SetActive(false); this.chargeEffect.SetActive(true); } }
public override void OnEnter() { this.chargeEffectPrefab = null; this.chargeSoundString = Modules.Sounds.ChannelTorpor; this.maxSpellRadius = ScepterCastCruelSun.sunPrefabDiameter * 0.5f; this.baseDuration = StaticValues.cruelSunChannelDuration; this.swordController = base.gameObject.GetComponent <PaladinSwordController>(); this.overrideAreaIndicatorMat = Modules.Assets.areaIndicatorMat; base.OnEnter(); ChildLocator childLocator = base.GetModelChildLocator(); if (childLocator) { this.chargeEffect = childLocator.FindChild("ScepterCruelSunChannelEffect").gameObject; this.chargeEffect.SetActive(false); this.chargeEffect.SetActive(true); } }
public override void OnEnter() { base.OnEnter(); this.duration = this.baseDuration / this.attackSpeedStat; this.swordController = base.GetComponent <PaladinSwordController>(); if (this.swordController) { this.swordController.attacking = true; } base.PlayAnimation("Gesture, Override", "ThrowSpell", "ChargeSpell.playbackRate", this.duration); if (this.muzzleflashEffectPrefab) { EffectManager.SimpleMuzzleFlash(this.muzzleflashEffectPrefab, base.gameObject, "HandL", false); } Util.PlaySound(Modules.Sounds.ThrowLightningSpear, base.gameObject); this.Fire(); }
public override void OnEnter() { base.OnEnter(); this.duration = this.baseDuration / this.attackSpeedStat; this.earlyExitDuration = this.duration * Slash.earlyExitTime; this.hasFired = false; this.cancelling = false; this.animator = base.GetModelAnimator(); this.swordController = base.GetComponent <PaladinSwordController>(); base.StartAimMode(0.5f + this.duration, false); base.characterBody.isSprinting = false; this.inCombo = false; if (this.swordController) { this.swordController.attacking = true; } HitBoxGroup hitBoxGroup = null; Transform modelTransform = base.GetModelTransform(); if (modelTransform) { hitBoxGroup = Array.Find <HitBoxGroup>(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Sword"); } if (this.swingIndex > 1) { this.swingIndex = 0; this.inCombo = true; } Util.PlaySound(Modules.Sounds.Cloth1, base.gameObject); string animString = "Slash" + (1 + swingIndex).ToString(); if (this.inCombo) { if (!this.animator.GetBool("isMoving") && this.animator.GetBool("isGrounded")) { base.PlayCrossfade("FullBody, Override", "SlashCombo1", "Slash.playbackRate", this.duration, 0.05f); } base.PlayCrossfade("Gesture, Override", "SlashCombo1", "Slash.playbackRate", this.duration, 0.05f); } else { if (!this.animator.GetBool("isMoving") && this.animator.GetBool("isGrounded")) { base.PlayCrossfade("FullBody, Override", animString, "Slash.playbackRate", this.duration, 0.05f); } base.PlayCrossfade("Gesture, Override", animString, "Slash.playbackRate", this.duration, 0.05f); } float dmg = Slash.damageCoefficient; this.attack = new OverlapAttack(); this.attack.damageType = DamageType.Generic; this.attack.attacker = base.gameObject; this.attack.inflictor = base.gameObject; this.attack.teamIndex = base.GetTeam(); this.attack.damage = dmg * this.damageStat; this.attack.procCoefficient = 1; this.attack.hitEffectPrefab = this.swordController.hitEffect; this.attack.forceVector = Vector3.zero; this.attack.pushAwayForce = 750f; this.attack.hitBoxGroup = hitBoxGroup; this.attack.isCrit = base.RollCrit(); }
public override void OnEnter() { base.OnEnter(); this.duration = AirSlam.leapDuration / (0.75f + (0.25f * this.attackSpeedStat)); this.hasFired = false; this.hasLanded = false; this.animator = base.GetModelAnimator(); this.swordController = base.GetComponent <PaladinSwordController>(); this.previousAirControl = base.characterMotor.airControl; base.characterMotor.airControl = EntityStates.Croco.Leap.airControl; Vector3 direction = base.GetAimRay().direction; if (base.isAuthority) { base.characterBody.isSprinting = true; direction.y = Mathf.Max(direction.y, 1.25f * EntityStates.Croco.Leap.minimumY); Vector3 a = direction.normalized * (0.75f * EntityStates.Croco.Leap.aimVelocity) * this.moveSpeedStat; Vector3 b = Vector3.up * 0.95f * EntityStates.Croco.Leap.upwardVelocity; Vector3 b2 = new Vector3(direction.x, 0f, direction.z).normalized *(1.5f * EntityStates.Croco.Leap.forwardVelocity); base.characterMotor.Motor.ForceUnground(); base.characterMotor.velocity = a + b + b2; } base.characterDirection.moveVector = direction; base.characterBody.bodyFlags |= CharacterBody.BodyFlags.IgnoreFallDamage; HitBoxGroup hitBoxGroup = null; Transform modelTransform = base.GetModelTransform(); string hitboxString = "LeapStrike"; if (modelTransform) { hitBoxGroup = Array.Find <HitBoxGroup>(modelTransform.GetComponents <HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxString); } this.swordController.airSlamStacks = 1; base.PlayAnimation("FullBody, Override", "LeapSlam", "Whirlwind.playbackRate", this.duration * 1.5f); Util.PlaySound(Modules.Sounds.LeapSlam, base.gameObject); Util.PlaySound(Modules.Sounds.Cloth2, base.gameObject); float dmg = AirSlam.damageCoefficient; this.attack = new OverlapAttack(); this.attack.damageType = DamageType.Stun1s; this.attack.attacker = base.gameObject; this.attack.inflictor = base.gameObject; this.attack.teamIndex = base.GetTeam(); this.attack.damage = dmg * this.damageStat; this.attack.procCoefficient = 1; this.attack.hitEffectPrefab = this.swordController.hitEffect; this.attack.forceVector = -Vector3.up * 6000f; this.attack.pushAwayForce = 500f; this.attack.hitBoxGroup = hitBoxGroup; this.attack.isCrit = base.RollCrit(); }