public override void EnterNewLevel(int iLevel, bool bSend) { if (iLevel == 2) { if (this.bLocalOrServer) { this.xOwnerView.xEntity.xRenderComponent.SwitchAnimation((ushort)(658 + (int)this.xOwnerView.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying); } this.xOwnerView.xEntity.xRenderComponent.fAnimationTimeWarp = 0.7f; float fPassedTicks = (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks; (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying); (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks = fPassedTicks; } else if (iLevel == 3) { float fPassedTicks2 = (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks; (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying); (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks = fPassedTicks2; GlowParameters xParams = new GlowParameters(Color.White, new Vector2(0.006666667f, 0.006666667f), 0f, 1, new float[] { 1f, 0.5f, 0.25f }); xParams.SetExtraInfo(1f, 30, 10, 0.1f, 0.5f, 130); this.xGlowPartial = new GlowPartial(5, Color.LightGray, xParams); this.xOwnerView.xEntity.AddSmallGlow(this.xGlowPartial); (this.xTargetEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying); this.xTargetEffect.xRenderComponent.fAlpha = 1f; } else if (iLevel == 4) { GlowParameters xParams2 = new GlowParameters(Color.White, new Vector2(0.006666667f, 0.006666667f), 0f, 2, new float[] { 1f, 0.5f, 0.25f }); xParams2.SetExtraInfo(1f, 30, 20, 0.2f, 0.5f, 105); this.xGlowPartial = new GlowPartial(5, Color.LightGray, xParams2); this.xOwnerView.xEntity.AddSmallGlow(this.xGlowPartial); float fPassedTicks3 = (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks; (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(3, Animation.CancelOptions.IgnoreIfPlaying); (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks = fPassedTicks3; } else if (iLevel == 5) { GlowParameters xParams3 = new GlowParameters(Color.White, new Vector2(0.006666667f, 0.006666667f), 0f, 3, new float[] { 1f, 0.5f, 0.25f }); xParams3.SetExtraInfo(1f, 30, 30, 0.3f, 0.6f, 80); this.xGlowPartial = new GlowPartial(5, Color.LightGray, xParams3); this.xOwnerView.xEntity.AddSmallGlow(this.xGlowPartial); IEffect bass = Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects.ChargeEffect_RedBuff_Weapon)) as SortedAnimated; bass.xRenderComponent.xTransform = this.xOwnerView.xEntity.xTransform; bass.xRenderComponent.fVirtualHeight = this.xOwnerView.xEntity.xRenderComponent.fVirtualHeight + 1f; this.lxAttachedEffects.Add(bass); } base.EnterNewLevel(iLevel, bSend); }
public override void EnterNewLevel(int iLevel, bool bSend) { if (iLevel == 2) { if (this.bLocalOrServer && Utility.IsWithinRange((int)this.xOwnerView.xEntity.xRenderComponent.iActiveAnimation, 524, 527)) { this.xOwnerView.xEntity.xRenderComponent.SwitchAnimation((ushort)(528 + (int)this.xOwnerView.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying); } this.xOwnerView.xEntity.xRenderComponent.fAnimationTimeWarp = 0.7f; float fPassedTicks = (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks; (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying); (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks = fPassedTicks; } else if (iLevel == 3) { if (this.xSecondSlice == null && this.xOwnerView == Program.game.xLocalPlayer) { this.xSecondSlice = (Program.game._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects._SpellEffects_Wind_TargetArrow)) as SortedAnimated); this.xSecondSlice.xRenderComponent.xTransform = this.xOwnerView.xEntity.xTransform; this.xSecondSlice.xRenderComponent.fRotation = this.fRotation + 1.57079637f; Program.game._EntityMaster_AddWatcher(new FadeInRenderComponent(this.xSecondSlice.xRenderComponent, 10)); } float fPassedTicks2 = (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks; (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying); (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks = fPassedTicks2; GlowParameters xParams = new GlowParameters(Color.White, new Vector2(0.006666667f, 0.006666667f), 0f, 1, new float[] { 1f, 0.5f, 0.25f }); xParams.SetExtraInfo(1f, 30, 10, 0.1f, 0.5f, 130); this.xGlowPartial = new GlowPartial(5, Color.Yellow, xParams); this.xOwnerView.xEntity.AddSmallGlow(this.xGlowPartial); } else if (iLevel == 4) { GlowParameters xParams2 = new GlowParameters(Color.White, new Vector2(0.006666667f, 0.006666667f), 0f, 2, new float[] { 1f, 0.5f, 0.25f }); xParams2.SetExtraInfo(1f, 30, 20, 0.2f, 0.5f, 105); this.xGlowPartial = new GlowPartial(5, Color.Yellow, xParams2); this.xOwnerView.xEntity.AddSmallGlow(this.xGlowPartial); float fPassedTicks3 = (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks; (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(3, Animation.CancelOptions.IgnoreIfPlaying); (this.xefPowerBalls.xRenderComponent as AnimatedRenderComponent).fPassedTicks = fPassedTicks3; } else if (iLevel == 5) { GlowParameters xParams3 = new GlowParameters(Color.White, new Vector2(0.006666667f, 0.006666667f), 0f, 3, new float[] { 1f, 0.5f, 0.25f }); xParams3.SetExtraInfo(1f, 30, 30, 0.3f, 0.6f, 80); this.xGlowPartial = new GlowPartial(5, Color.Yellow, xParams3); this.xOwnerView.xEntity.AddSmallGlow(this.xGlowPartial); IEffect bass = Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects.ChargeEffect_RedBuff_Air)) as SortedAnimated; bass.xRenderComponent.xTransform = this.xOwnerView.xEntity.xTransform; bass.xRenderComponent.fVirtualHeight = this.xOwnerView.xEntity.xRenderComponent.fVirtualHeight + 1f; this.lxAttachedEffects.Add(bass); } base.EnterNewLevel(iLevel, bSend); }
public GlowPartial(int iTime, Color cColor, GlowParameters xAttachedParams) { this.iTimeLeft = iTime; this.cColor = cColor; this.xAttachedParams = xAttachedParams; }
public GlowEndAndBaseStatWrapper(GlowParameters xGlow, BaseStats xStats, BaseStats.StatusEffectSource enTypeToWatch) { this.xGlow = xGlow; this.xStats = xStats; this.enTypeToWatch = enTypeToWatch; }
public override void ExecuteSpellCallback() { if (Program.GetTheGame().xNetworkInfo.enCurrentRole == NetworkHelperInterface.NetworkRole.Client) { return; } float fAOERadius = 50f; ushort iHealAmount = 12; Game1 master = Program.GetTheGame(); master.xSoundSystem.PlayCue("Spells_Heal", this.xOwnerView.xEntity.xTransform); SortedAnimated knark = master._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects._SpellEffects_Light_HealPillarFront)) as SortedAnimated; knark.xParentRC = this.xOwnerView.xEntity.xRenderComponent; knark.xRenderComponent.xTransform = this.xOwnerView.xEntity.xTransform; knark = (master._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects._SpellEffects_Light_HealPillarBack)) as SortedAnimated); knark.xRenderComponent.xTransform = this.xOwnerView.xEntity.xTransform; knark.xParentRC = this.xOwnerView.xEntity.xRenderComponent; List<PlayerView> lxViews = new List<PlayerView>(); foreach (PlayerView xView in master.dixPlayers.Values) { if (!xView.xViewStats.bIsDead) { if (xView == this.xOwnerView) { lxViews.Add(xView); master._Player_Heal(xView, iHealAmount); } else if (Vector2.Distance(xView.xEntity.xTransform.v2Pos, this.xOwnerView.xEntity.xTransform.v2Pos) <= fAOERadius) { lxViews.Add(xView); master._Player_Heal(xView, iHealAmount); knark = (master._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects._SpellEffects_Light_HealPillarFront)) as SortedAnimated); knark.xParentRC = xView.xEntity.xRenderComponent; knark.xRenderComponent.xTransform = xView.xEntity.xTransform; knark = (master._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects._SpellEffects_Light_HealPillarBack)) as SortedAnimated); knark.xRenderComponent.xTransform = xView.xEntity.xTransform; knark.xParentRC = xView.xEntity.xRenderComponent; } } } if (this.iChargeLevel >= 3) { _Spells_HealInstance xInst = (_Spells_HealInstance)Program.GetTheGame()._EntityMaster_AddSpellInstance(SpellCodex.SpellTypes._Magic_Light_Heal, this.xOwnerView.xEntity, Vector2.Zero, false, new float[0]); xInst.xCastedPlayer = this.xOwnerView; xInst.iHealAmount = Convert.ToUInt16(iHealAmount / 5); xInst.iTimeToLive = 300; xInst.iHealInterval = 60; xInst.lxAffectedPlayers = lxViews; foreach (PlayerView xView2 in lxViews) { knark = (master._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects._SpellEffects_Light_HealRegenGlimmer)) as SortedAnimated); knark.xRenderComponent.xTransform = xView2.xEntity.xTransform; knark.xParentRC = xView2.xEntity.xRenderComponent; GlowParameters xGlowParams = new GlowParameters(Color.White, new Vector2(0.006666667f, 0.006666667f), 0f, 2, new float[] { 1f, 0.5f, 0.25f }); xGlowParams.SetExtraInfo(1f, 30, 30, 0.5f, 1f, 60); xView2.xEntity.AddSmallGlow(new GlowPartial(300, Color.LightGreen, xGlowParams)); } } if (master.xNetworkInfo.enCurrentRole == NetworkHelperInterface.NetworkRole.Server) { foreach (PlayerView xOtherView in master.dixPlayers.Values) { if (xOtherView != master.xLocalPlayer) { NetOutgoingMessage om = master.xNetworkInfo.server.CreateMessage(); om.Write(255); om.Write(0); om.Write((byte)lxViews.Count); foreach (PlayerView view in lxViews) { om.Write(view.iConnectionIdentifier); } master.xNetworkInfo.server.SendMessage(om, xOtherView.netConnection, NetDeliveryMethod.ReliableUnordered); } } } this.xOwnerView.xEntity.xBaseStats.RemoveMana(this.liSPCosts[this.iChargeLevel - 1]); this.bCasted = true; }