public void EndPunch() { Program.game.xSoundSystem.PlayCue("Gund4m_Punch_End", this.xOwner.xTransform); Program.game.xCamera.SetShake(60); this.SetChillSpeed(); this.iCounter = 0; this.enCurrentAction = GundamHandAI.GundamHandAction.HasHit; this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(18 + this.HandAnimAdd), Animation.CancelOptions.IgnoreIfPlaying); if (this.xPunchAP != null) { this.xPunchAP.UnregisterCurrent(); this.xPunchAP = null; } }
public void ReadInfo(NetIncomingMessage msg) { this.xOwner.xRenderComponent.SwitchAnimation(msg.ReadUInt16(), Animation.CancelOptions.IgnoreIfPlaying); this.enCurrentAction = (GundamHandAI.GundamHandAction)msg.ReadInt32(); this.iCounter = msg.ReadInt32(); this.xOwner.xTransform.v2Pos = new Vector2(msg.ReadFloat(), msg.ReadFloat()); }
public void StartEndOfSmash() { this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_GroundShake; this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(this.HandAnimAdd + 10), Animation.CancelOptions.IgnoreIfPlaying); this.iCounter = 0; this.xOwner.xRenderComponent.fAnimationTimeWarp = 0.5f; }
public override void OnAttackHit(AttackCollisionData xAtColData, BaseStats xBaseStats) { if (!xAtColData.bShielded) { if (Program.GetTheGame().bEffectsOn) { IEffect kaktus = Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(xAtColData.v2PointOfImpact, SortedAnimated.SortedAnimatedEffects._HitEffect_Pang1)); kaktus.xRenderComponent.fVirtualHeight += this.xOwner.xRenderComponent.fVirtualHeight; kaktus.xRenderComponent.xTransform = xBaseStats.xOwner.xTransform; kaktus.xRenderComponent.v2OffsetRenderPos = new Vector2(0f, -10f); return; } } else if (xBaseStats.bPerfectStance && this.enCurrentAction == GundamHandAI.GundamHandAction.InHit) { this.EndPunch(); this.enCurrentAction = GundamHandAI.GundamHandAction.PerfectGuarded; base.SendClientInstruction(3, new float[0]); } }
public override void OnUpdate() { if (!this.bActive) { return; } if (this.xOwner.bToBeDestroyed) { return; } Random arg_21_0 = Program.GetTheGame().randomInLogic; if (!this.bInited) { this.bInited = true; this.iNextHardUpdate = 800; if (this.bIsRightHand) { (this.xOwner as Boss).EnterBattle(); this.xThisPlate = (Program.game._EntityMaster_AddDynamicEnvironment(DynamicEnvironmentCodex.ObjectTypes.PhaseShiftPlate, new Vector2(391f, 294f)) as PhaseShiftPlate); this.xThisPlate.xRenderComponent.fAlpha = 0f; this.xThisPlate.xRenderComponent.SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying); } else { this.xThisPlate = (Program.game._EntityMaster_AddDynamicEnvironment(DynamicEnvironmentCodex.ObjectTypes.PhaseShiftPlate, new Vector2(250f, 295f)) as PhaseShiftPlate); this.xThisPlate.xRenderComponent.fAlpha = 0f; this.xThisPlate.xRenderComponent.SwitchAnimation(4, Animation.CancelOptions.IgnoreIfPlaying); } } if (this.v2RandMoveDir != Vector2.Zero && this.xOwner.xRenderComponent.GetCurrentAnimation().bIsMoveCancellable) { this.xOwner.xTransform.v2Pos += this.fLocalMoveSpeed * this.v2RandMoveDir; } if (this.xOwner.xBaseStats.iHP <= 0) { this.xHead.KillingBlowOnHands(); this.iTimeSinceDeath++; if (this.bIsRightHand && this.IsReadyForSmash()) { this.OkLetsGo(); } } this.iCounter++; this.iNextHardUpdate--; if (this.bIsRightHand && this.enCurrentAction == GundamHandAI.GundamHandAction.Chillin && this.xHead.xLeftHand.enCurrentAction == GundamHandAI.GundamHandAction.Chillin && this.iCounter % 200 == 180) { this.xOwner.xRenderComponent.SwitchAnimation(28, Animation.CancelOptions.RestartIfPlaying); this.xHead.xLeftHand.xOwner.xRenderComponent.SwitchAnimation(29, Animation.CancelOptions.RestartIfPlaying); } if (this.enCurrentAction == GundamHandAI.GundamHandAction.PreparingHit) { this.xOwner.xRenderComponent.fVirtualHeight = 0f; if (this.xPlayerLockedOnto != null && (float)this.iCounter < MathHelper.Max((float)(60 - Program.game._Enemy_GetDifficultyModifier() * 10), 30f)) { if (MathHelper.Distance(this.xPlayerLockedOnto.xTransform.v2Pos.X, this.xOwner.xTransform.v2Pos.X) < this.fLocalMoveSpeed) { this.xOwner.xTransform.v2Pos.X = this.xPlayerLockedOnto.xTransform.v2Pos.X; } else if (this.xPlayerLockedOnto.xTransform.v2Pos.X < this.xOwner.xTransform.v2Pos.X) { if (!this.bIsRightHand || this.xOwner.xTransform.v2Pos.X > 400f) { TransformComponent expr_32A_cp_0 = this.xOwner.xTransform; expr_32A_cp_0.v2Pos.X = expr_32A_cp_0.v2Pos.X - this.fLocalMoveSpeed; } } else if (this.bIsRightHand || this.xOwner.xTransform.v2Pos.X < 250f) { TransformComponent expr_372_cp_0 = this.xOwner.xTransform; expr_372_cp_0.v2Pos.X = expr_372_cp_0.v2Pos.X + this.fLocalMoveSpeed; } } float fMoveBack = 2.5f - (float)this.iCounter / 35f * 2.5f; if (fMoveBack < 0.3f) { fMoveBack = 0.3f; } if (this.xOwner.xTransform.v2Pos.Y > 250f) { TransformComponent expr_3D8_cp_0 = this.xOwner.xTransform; expr_3D8_cp_0.v2Pos.Y = expr_3D8_cp_0.v2Pos.Y - fMoveBack; } if ((float)this.iCounter >= MathHelper.Max((float)(80 - Program.game._Enemy_GetDifficultyModifier() * 5), 55f) && CAS.NetworkRole != NetworkHelperInterface.NetworkRole.Client) { if (!this.bIsRightHand && this.xOwner.xTransform.v2Pos.X > 400f) { this.xHead.HandIsPissed(2); } else if (this.bIsRightHand && this.xOwner.xTransform.v2Pos.X < 250f) { this.xHead.HandIsPissed(2); } this.enCurrentAction = GundamHandAI.GundamHandAction.InHit; this.SetPunchSpeedAndAttackPhase(); base.SendClientInstruction(0, new float[0]); } } else if (this.enCurrentAction == GundamHandAI.GundamHandAction.InHit) { TransformComponent expr_4B3_cp_0 = this.xOwner.xTransform; expr_4B3_cp_0.v2Pos.Y = expr_4B3_cp_0.v2Pos.Y + this.fLocalMoveSpeed; Program.game._EffectMaster_AddEffect(new VFX_GenericGhostImage(this.xOwner.xTransform.v2Pos, this.xOwner.xRenderComponent)); if (this.xOwner.xTransform.v2Pos.Y > 380f) { this.xOwner.xTransform.v2Pos.Y = 380f; this.EndPunch(); Program.game._EffectMaster_AddEffect(new SortedAnimated(this.xOwner.xTransform.v2Pos, SortedAnimated.SortedAnimatedEffects._EnemyEffects_Boss_GundamPunch_HitEffect)); } } else if (this.enCurrentAction == GundamHandAI.GundamHandAction.HasHit) { if (this.iCounter < 25) { if (this.iCounter % 2 == 0) { Vector2 v2Mos = new Vector2(this.xOwner.xTransform.v2Pos.X - 125f + (float)Program.game.randomInVisual.Next(250), (float)(100 + Program.game.randomInVisual.Next(75))); (Program.game._EffectMaster_AddEffect(new _Effect_MovingAnimated(v2Mos, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_RoofRockMini, new Vector2(0f, 3f + (float)CAS.RandomInVisual.NextDouble() * 1f), 55, 15, 1f)) as _Effect_MovingAnimated).SetFadeIn(15); } if (this.iCounter % 12 == 0) { Vector2 v2Mos2 = new Vector2(this.xOwner.xTransform.v2Pos.X - 125f + (float)Program.game.randomInVisual.Next(250), (float)(100 + Program.game.randomInVisual.Next(75))); (Program.game._EffectMaster_AddEffect(new _Effect_MovingAnimated(v2Mos2, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_RoofRockSmall, new Vector2(0f, 3f + (float)CAS.RandomInVisual.NextDouble() * 1f), 55, 15, 1f)) as _Effect_MovingAnimated).SetFadeIn(20); } } if (this.iCounter > 60 - Program.game._Enemy_GetDifficultyModifier() * 5) { if (this.xOwner.xRenderComponent.iActiveAnimation >= 2) { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(4 + this.HandAnimAdd), Animation.CancelOptions.IgnoreIfPlaying); } Vector2 v2Dir = Vector2.Normalize(this.v2StartPos - this.xOwner.xTransform.v2Pos); this.xOwner.xTransform.v2Pos += v2Dir * this.fLocalMoveSpeed; if (Vector2.Distance(this.xOwner.xTransform.v2Pos, this.v2StartPos) < this.fLocalMoveSpeed) { this.xOwner.xTransform.v2Pos = this.v2StartPos; this.iNextHardUpdate = 600; this.enCurrentAction = GundamHandAI.GundamHandAction.Chillin; } } } else if (this.enCurrentAction == GundamHandAI.GundamHandAction.PerfectGuarded) { if (this.iCounter < 20) { TransformComponent expr_7C2_cp_0 = this.xOwner.xTransform; expr_7C2_cp_0.v2Pos.Y = expr_7C2_cp_0.v2Pos.Y - 10f * (1f - (float)this.iCounter / 20f); } if (this.iCounter == 60) { this.enCurrentAction = GundamHandAI.GundamHandAction.HasHit; } } else if (this.enCurrentAction == GundamHandAI.GundamHandAction.Smash_Prepare) { if (this.bIsRightHand) { if (this.xOwner.xTransform.v2Pos.X > 387f) { TransformComponent expr_840_cp_0 = this.xOwner.xTransform; expr_840_cp_0.v2Pos.X = expr_840_cp_0.v2Pos.X - (0.7f + 0.1f * (float)Program.game._Enemy_GetDifficultyModifier()); } if (this.iCounter == 1) { Program.game.xSoundSystem.PlayInterfaceCue("Gund4m_Smash"); } } else if (this.xOwner.xTransform.v2Pos.X < 252f) { TransformComponent expr_8AE_cp_0 = this.xOwner.xTransform; expr_8AE_cp_0.v2Pos.X = expr_8AE_cp_0.v2Pos.X + (0.7f + 0.1f * (float)Program.game._Enemy_GetDifficultyModifier()); } if (this.xOwner.xTransform.v2Pos.Y <= 200f) { if (CAS.NetworkRole != NetworkHelperInterface.NetworkRole.Client && (this.iCounter >= 60 - Program.game._Enemy_GetDifficultyModifier() * 5 || this.xHead.xOwner.xBaseStats.iHP <= 0)) { this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_Slam; this.iCounter = 0; if (this.xHead.xOwner.xBaseStats.iHP > 0) { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(this.HandAnimAdd + 8), Animation.CancelOptions.IgnoreIfPlaying); } else { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(this.HandAnimAdd + 20), Animation.CancelOptions.IgnoreIfPlaying); } if (this.bIsRightHand) { this.xHead.BashDown(); } base.SendClientInstruction(2, new float[0]); } } else { float fMoveBack2 = 5f - (float)this.iCounter / 15.5f * 2f; if (fMoveBack2 < 0.1f) { fMoveBack2 = 0.1f; } TransformComponent expr_9EA_cp_0 = this.xOwner.xTransform; expr_9EA_cp_0.v2Pos.Y = expr_9EA_cp_0.v2Pos.Y - fMoveBack2; } } else if (this.enCurrentAction == GundamHandAI.GundamHandAction.Smash_Slam) { if (this.xOwner.xTransform.v2Pos.Y < 310f) { TransformComponent expr_A35_cp_0 = this.xOwner.xTransform; expr_A35_cp_0.v2Pos.Y = expr_A35_cp_0.v2Pos.Y + 16f; if (this.xOwner.xTransform.v2Pos.Y > 310f) { this.xOwner.xTransform.v2Pos.Y = 310f; } } } else if (this.enCurrentAction == GundamHandAI.GundamHandAction.Smash_GroundIdle) { if (this.iCounter == 5 && Program.game.xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client && this.xSlamAP != null) { this.xSlamAP.UnregisterCurrent(); this.xSlamAP = null; } if (this.iCounter < 60) { if (this.iCounter % 2 == 0) { Vector2 v2Mos3 = new Vector2((float)(140 + Program.game.randomInVisual.Next(360)), (float)(100 + Program.game.randomInVisual.Next(75))); (Program.game._EffectMaster_AddEffect(new _Effect_MovingAnimated(v2Mos3, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_RoofRockMini, new Vector2(0f, 3f + (float)CAS.RandomInVisual.NextDouble() * 1f), 55, 15, 1f)) as _Effect_MovingAnimated).SetFadeIn(15); } if (this.iCounter % 12 == 0) { Vector2 v2Mos4 = new Vector2((float)(140 + Program.game.randomInVisual.Next(360)), (float)(100 + Program.game.randomInVisual.Next(75))); (Program.game._EffectMaster_AddEffect(new _Effect_MovingAnimated(v2Mos4, SortedAnimated.SortedAnimatedEffects._Unique_FlyingTemple_RoofRockSmall, new Vector2(0f, 3f + (float)CAS.RandomInVisual.NextDouble() * 1f), 55, 15, 1f)) as _Effect_MovingAnimated).SetFadeIn(20); } } if (this.xHead.xOwner.xBaseStats.iHP <= 0) { int iAdd = 55; if (this.iCounter == iAdd + 24 || this.iCounter == iAdd + 32 || this.iCounter == iAdd + 38 || this.iCounter == iAdd + 42) { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(24 + this.HandAnimAdd), Animation.CancelOptions.IgnoreIfPlaying); } if (this.iCounter == iAdd + 28 || this.iCounter == iAdd + 36 || this.iCounter == iAdd + 40 || this.iCounter == iAdd + 44) { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(22 + this.HandAnimAdd), Animation.CancelOptions.IgnoreIfPlaying); } if (this.iCounter == iAdd + 45) { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(26 + this.HandAnimAdd), Animation.CancelOptions.IgnoreIfPlaying); } } } else if (this.enCurrentAction == GundamHandAI.GundamHandAction.Smash_GroundShake) { if (this.xOwner.xRenderComponent.iActiveAnimation == 10 + this.HandAnimAdd && this.xOwner.xRenderComponent.fAnimationTimeWarp < 2f) { this.xOwner.xRenderComponent.fAnimationTimeWarp *= 1.008f; } } else if (this.enCurrentAction == GundamHandAI.GundamHandAction.Smash_Lift) { if ((this.xOwner.xRenderComponent.iActiveAnimation == 12 || this.xOwner.xRenderComponent.iActiveAnimation == 13) && this.xOwner.xRenderComponent.GetCurrentAnimation().iRenderedFrame < 3) { return; } float fMoveBack3 = 5f - (float)this.iCounter / 15f * 2f; if (this.xHead.xOwner.xBaseStats.iHP <= 0) { fMoveBack3 = 4f - (float)this.iCounter / 18f; } if (fMoveBack3 < 0.1f) { fMoveBack3 = 0.1f; } if (this.bIsRightHand) { Vector2 v2Target = new Vector2(430f, 250f); if (this.xHead.xOwner.xBaseStats.iHP <= 0) { v2Target.Y -= 150f; } if (v2Target != this.xOwner.xTransform.v2Pos) { if (Vector2.Distance(v2Target, this.xOwner.xTransform.v2Pos) < fMoveBack3) { this.xOwner.xTransform.v2Pos = v2Target; } else { Vector2 v2Move = Vector2.Normalize(v2Target - this.xOwner.xTransform.v2Pos); this.xOwner.xTransform.v2Pos += v2Move * fMoveBack3; } } } else { Vector2 v2Target2 = new Vector2(210f, 250f); if (this.xHead.xOwner.xBaseStats.iHP <= 0) { v2Target2.Y -= 150f; } if (v2Target2 != this.xOwner.xTransform.v2Pos) { if (Vector2.Distance(v2Target2, this.xOwner.xTransform.v2Pos) < fMoveBack3) { this.xOwner.xTransform.v2Pos = v2Target2; } else { Vector2 v2Move2 = Vector2.Normalize(v2Target2 - this.xOwner.xTransform.v2Pos); this.xOwner.xTransform.v2Pos += v2Move2 * fMoveBack3; } } } } else if (this.enCurrentAction == GundamHandAI.GundamHandAction.Smash_End) { Vector2 v2Dir2 = Vector2.Normalize(this.v2StartPos - this.xOwner.xTransform.v2Pos); this.xOwner.xTransform.v2Pos += v2Dir2 * this.fLocalMoveSpeed; if (Vector2.Distance(this.xOwner.xTransform.v2Pos, this.v2StartPos) < this.fLocalMoveSpeed) { this.xOwner.xTransform.v2Pos = this.v2StartPos; this.iNextHardUpdate = 600; this.enCurrentAction = GundamHandAI.GundamHandAction.Chillin; this.SetChillSpeed(); this.xOwner.xRenderComponent.fVirtualHeight = -100f; } } if (this.xOwner.xBaseStats.iHP > 0 && this.xOwner.xBaseStats.iHP < this.xOwner.xBaseStats.iMaxHP && this.iNextHardUpdate <= 0 && this.enCurrentAction == GundamHandAI.GundamHandAction.Chillin && CAS.NetworkRole != NetworkHelperInterface.NetworkRole.Client) { Rectangle recCheck; if (this.bIsRightHand) { recCheck = new Rectangle(357, 287, 274, 114); } else { recCheck = new Rectangle(11, 287, 272, 114); } List<WorldActor> lxTargets = Program.game._Enemy_GetTargetList(this, true); bool bFound = false; foreach (WorldActor x in lxTargets) { if (recCheck.Contains(Utility.Vector2ToPoint(x.xTransform.v2Pos))) { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(2 + this.HandAnimAdd), Animation.CancelOptions.IgnoreIfPlaying); this.xPlayerLockedOnto = x; this.enCurrentAction = GundamHandAI.GundamHandAction.PreparingHit; this.iCounter = 0; this.SetAimSpeed(); bFound = true; break; } } if (CAS.NetworkRole == NetworkHelperInterface.NetworkRole.Server) { NetOutgoingMessage om = base.CreateMessage(); om.Write(0); if (this.xPlayerLockedOnto == null) { this.iNextHardUpdate = 120; om.Write(0); } else if (bFound && this.xPlayerLockedOnto is PlayerEntity) { om.Write(1); om.Write((this.xPlayerLockedOnto as PlayerEntity).Owner.iConnectionIdentifier); } else { om.Write(10); } base.SendMessage(om); } } }
public override void OnAdvancedNetworkMessage(NetIncomingMessage msg) { if (CAS.NetworkRole == NetworkHelperInterface.NetworkRole.Client && msg.ReadByte() == 0) { byte byEntityType = msg.ReadByte(); if (byEntityType == 0) { this.xPlayerLockedOnto = null; this.iNextHardUpdate = 100; this.enCurrentAction = GundamHandAI.GundamHandAction.Chillin; return; } if (byEntityType == 1) { long iPlayerID = msg.ReadInt64(); this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(2 + this.HandAnimAdd), Animation.CancelOptions.IgnoreIfPlaying); this.xPlayerLockedOnto = Program.game.dixPlayers[iPlayerID].xEntity; this.enCurrentAction = GundamHandAI.GundamHandAction.PreparingHit; this.iCounter = 0; this.SetAimSpeed(); return; } } }
public override void OnAnimationCallback(AnimationInstruction xIns) { if (xIns.xEvent.afAlterableValues[0] == 0f) { this.xOwner.xRenderComponent.fVirtualHeight = -30f; this.xOwner.xCollisionComponent.DeactivateGroup(CollisionComponent.ColliderGroup.All); Program.game.xCamera.SetShake(50); this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_GroundIdle; this.iCounter = 0; List<int> liMos = Utility.GetListOfRandomNumbers(CAS.RandomInVisual, 0, 6, 3, false); for (int i = 0; i < liMos.Count; i++) { this.CreateSmashStone(liMos[i]); } if (Program.game.xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client && this.xSlamAP == null) { this.xSlamAP = new AttackPhase(this.xOwner); this.xSlamAP.lenLayers.Add(Collider.ColliderLayers.Enemies); this.xSlamAP.lenLayers.Add(Collider.ColliderLayers.Players); this.xSlamAP.lenLayers.Add(Collider.ColliderLayers.DynamicEnvironment); SphereCollider col = new SphereCollider(24f, new Vector2(0f, 1f) * 10f, this.xOwner.xTransform, 10000f, this.xOwner); this.xSlamAP.lxCurrentColliders.Add(col); col.xAttackPhase = this.xSlamAP; this.xSlamAP.xStats.iBreakingPower = 9; this.xSlamAP.xStats.fKnockBack = 35f; this.xSlamAP.xStats.v2SideKnockbackOverride = new Vector2(0f, 1f); this.xSlamAP.xStats.iBaseDamage = 100 + this.xOwner.xBaseStats.iBaseATK; this.xSlamAP.xStats.enShieldCrush = AttackStats.ShieldCrush.AllIncludingPerfectGuard; this.xSlamAP.xStats.enAttackElement = AttackStats.Element.Neutral; this.xSlamAP.xStats.enAttackType = AttackStats.Type.Physical; this.xSlamAP.xStats.bKnockbackShieldRedistribution = false; this.xSlamAP.xStats.sAttackHandle = "GundamSlam"; this.xSlamAP.RegisterCurrent(); this.xSlamAP.lxCurrentColliders[0].ibitLayers = this.xOwner.xCollisionComponent.ibitCurrentColliderLayer; } if (this.bIsRightHand) { this.xHead.SmashIsDown(); this.xThisPlate.xRenderComponent.SwitchAnimation(0, Animation.CancelOptions.IgnoreIfPlaying); return; } this.xThisPlate.xRenderComponent.SwitchAnimation(0, Animation.CancelOptions.IgnoreIfPlaying); return; } else { if (xIns.xEvent.afAlterableValues[0] == 1f) { this.xOwner.xRenderComponent.fVirtualHeight = 12f; this.xOwner.xCollisionComponent.ActivateGroup(CollisionComponent.ColliderGroup.All); this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_Lift; this.iCounter = 0; this.DisablePhasePlate(); return; } if (xIns.xEvent.afAlterableValues[0] == 2f) { this.xOwner.xRenderComponent.fVirtualHeight = -30f; this.xOwner.xCollisionComponent.DeactivateGroup(CollisionComponent.ColliderGroup.All); Program.game.xCamera.SetShake(50); this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_GroundIdle; this.iCounter = 0; List<int> liMos2 = Utility.GetListOfRandomNumbers(CAS.RandomInVisual, 0, 6, 5, false); for (int j = 0; j < liMos2.Count; j++) { this.CreateSmashStone(liMos2[j]); } if (Program.game.xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client && this.xSlamAP == null) { this.xSlamAP = new AttackPhase(this.xOwner); this.xSlamAP.lenLayers.Add(Collider.ColliderLayers.Enemies); this.xSlamAP.lenLayers.Add(Collider.ColliderLayers.Players); this.xSlamAP.lenLayers.Add(Collider.ColliderLayers.DynamicEnvironment); SphereCollider col2 = new SphereCollider(24f, new Vector2(0f, 1f) * 10f, this.xOwner.xTransform, 10000f, this.xOwner); this.xSlamAP.lxCurrentColliders.Add(col2); col2.xAttackPhase = this.xSlamAP; this.xSlamAP.xStats.iBreakingPower = 9; this.xSlamAP.xStats.fKnockBack = 35f; this.xSlamAP.xStats.v2SideKnockbackOverride = new Vector2(0f, 1f); this.xSlamAP.xStats.iBaseDamage = 75 + this.xOwner.xBaseStats.iBaseATK; this.xSlamAP.xStats.enShieldCrush = AttackStats.ShieldCrush.AllIncludingPerfectGuard; this.xSlamAP.xStats.enAttackElement = AttackStats.Element.Neutral; this.xSlamAP.xStats.enAttackType = AttackStats.Type.Physical; this.xSlamAP.xStats.bKnockbackShieldRedistribution = false; this.xSlamAP.xStats.sAttackHandle = "GundamSlam"; this.xSlamAP.RegisterCurrent(); this.xSlamAP.lxCurrentColliders[0].ibitLayers = this.xOwner.xCollisionComponent.ibitCurrentColliderLayer; } if (this.bIsRightHand) { this.xHead.SmashIsDown(); } } return; } }
public void OkLetsGoClient() { this.xOwner.xTransform.v2Pos = this.v2StartPos; if (this.bIsRightHand) { this.xHead.PrepareForSmash(); this.xHead.xLeftHand.OkLetsGoClient(); this.xOwner.xRenderComponent.SwitchAnimation(6, Animation.CancelOptions.IgnoreIfPlaying); ((this.xOwner as Boss).xHPRenderComponent as MiniBossHPRenderComponent).bForceClose = true; } else { this.xHead.xLeftHand.xOwner.xRenderComponent.SwitchAnimation(7, Animation.CancelOptions.IgnoreIfPlaying); } this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_Prepare; this.iCounter = 0; }
public void OkLetsGo() { if (CAS.NetworkRole == NetworkHelperInterface.NetworkRole.Client) { return; } if (this.bIsRightHand) { if (!this.xHead.xLeftHand.IsReadyForSmash() || this.xHead.iMissileCycle != 0 || this.xHead.iLaserPhaser != 0 || this.xHead.xOwner.xBaseStats.iHP <= 0) { return; } this.xHead.PrepareForSmash(); this.xHead.xLeftHand.OkLetsGo(); this.xOwner.xRenderComponent.SwitchAnimation(6, Animation.CancelOptions.IgnoreIfPlaying); ((this.xOwner as Boss).xHPRenderComponent as MiniBossHPRenderComponent).bForceClose = true; base.SendClientInstruction(1, new float[0]); } else { this.xHead.xLeftHand.xOwner.xRenderComponent.SwitchAnimation(7, Animation.CancelOptions.IgnoreIfPlaying); } this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_Prepare; this.iCounter = 0; }
public void LiftHand() { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(this.HandAnimAdd + 12), Animation.CancelOptions.IgnoreIfPlaying); this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_Lift; this.iCounter = 0; SortedAnimated xHole = Program.game._EffectMaster_AddEffect(new SortedAnimated(this.xOwner.xTransform.v2Pos + new Vector2(-53f, -17f), SortedAnimated.SortedAnimatedEffects._EnemyEffects_Boss_GundamSmash_FadingHole)) as SortedAnimated; if (this.bIsRightHand) { xHole.xRenderComponent.AsAnimated().SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying); } }
public override void InstructionsFromServer(byte byInstructionID, params float[] afParams) { if (byInstructionID == 0) { this.enCurrentAction = GundamHandAI.GundamHandAction.InHit; this.SetPunchSpeedAndAttackPhase(); return; } if (byInstructionID == 1) { this.OkLetsGoClient(); return; } if (byInstructionID == 2) { this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_Slam; this.iCounter = 0; if (this.xHead.xOwner.xBaseStats.iHP > 0) { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(this.HandAnimAdd + 8), Animation.CancelOptions.IgnoreIfPlaying); } else { this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(this.HandAnimAdd + 20), Animation.CancelOptions.IgnoreIfPlaying); } if (this.bIsRightHand) { this.xHead.BashDown(); return; } } else if (byInstructionID == 3) { this.EndPunch(); this.enCurrentAction = GundamHandAI.GundamHandAction.PerfectGuarded; } }
public void EndSmash() { if (this.xHead.xOwner.xBaseStats.iHP > 0) { this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_End; this.iCounter = 0; this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(this.HandAnimAdd + 16), Animation.CancelOptions.IgnoreIfPlaying); this.SetAimSpeed(); return; } this.enCurrentAction = GundamHandAI.GundamHandAction.Smash_Slam; this.iCounter = 0; this.xOwner.xRenderComponent.SwitchAnimation(Convert.ToUInt16(this.HandAnimAdd + 20), Animation.CancelOptions.IgnoreIfPlaying); if (this.bIsRightHand) { this.xHead.BashDown(); } }