-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNewSpells.cs
1420 lines (1246 loc) · 57.4 KB
/
NewSpells.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using Chaos.AnimatorExtensions;
using Chaos.ListExtensions;
using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace Mythical
{
public class RadiantDashState : Player.BaseDashState
{
// Token: 0x060030FB RID: 12539 RVA: 0x00166518 File Offset: 0x00164918
public RadiantDashState(FSM fsm, Player parentPlayer) : base(RadiantDashState.staticID, fsm, parentPlayer)
{
this.showEffects = false;
this.playSFX = false;
//this.empoweredStat.SetInitialBaseValue(true);
}
// Token: 0x060030FC RID: 12540 RVA: 0x00166551 File Offset: 0x00164951
public override void SetEmpowered(bool givenStatus, BoolVarStatMod givenMod)
{
}
// Token: 0x060030FD RID: 12541 RVA: 0x00166554 File Offset: 0x00164954
public override void OnEnter()
{
base.OnEnter();
this.startPosition = this.parent.transform.position;
this.endPosition = this.startPosition + this.inputVector * RadiantDashState.teleportRange * (IsEmpowered ? 1.5f:1) *(UnityEngine.Random.value<0.07f?0.1f:1f);
if (!Globals.CheckCircle(this.endPosition, 0.25f, ChaosCollisions.layerAllWallAndObst) || Pathfinder.GetPath(Pathfinder.connectedNodeMap, this.startPosition, this.endPosition, ChaosCollisions.layerAllWallAndObst) == null)
{
this.endPosition = Globals.GetLinecastVector(this.startPosition, this.endPosition, ChaosCollisions.layerAllWallAndObst) - this.inputVector * 0.3f;
if (Vector2.SqrMagnitude(this.endPosition - this.startPosition) < 1f)
{
this.endPosition = this.startPosition;
}
}
this.SpawnTeleportEffect(true);
string audioID = "ChaosBeamStart";
Vector2? soundOrigin = new Vector2?(this.startPosition);
float standardPitchRange = SoundManager.StandardPitchRange;
SoundManager.PlayAudioWithDistance(audioID, soundOrigin, null, 24f, 0.2f, standardPitchRange, false);
this.teleportStopwatch.IsRunning = true;
this.ToggleColliders(false);
}
// Token: 0x060030FE RID: 12542 RVA: 0x00166690 File Offset: 0x00164A90
public override void FixedUpdate()
{
if (!this.finishedDashing)
{
this.teleLerpValue = this.teleportStopwatch.TimePercentage;
if (this.teleLerpValue >= 1f)
{
this.finishedDashing = true;
this.parent.rigidbody2D.MovePosition(this.endPosition);
}
else
{
this.parent.rigidbody2D.MovePosition(Vector2.Lerp(this.startPosition, this.endPosition, this.teleLerpValue));
}
}
}
// Token: 0x060030FF RID: 12543 RVA: 0x00166714 File Offset: 0x00164B14
private void SpawnTeleportEffect(bool givenStart = true)
{
this.effectPosition = this.parent.attackOriginTrans.position;
if (givenStart)
{
AnimEffect poolItem = PoolManager.GetPoolItem<AnimEffect>("ChaosPortal");
Vector3 position = this.effectPosition;
string animName = "Depart";
Vector3? localEulerAngles = new Vector3?(new Vector3(0f, 0f, UnityEngine.Random.Range(0f, 360f)));
poolItem.Play(position, animName, 0f, default(Vector2), 1f, 1f, localEulerAngles);
}
else
{
PoolManager.GetPoolItem<AnimEffect>("ChaosPortal").Play(this.effectPosition, "Spawn", 0f, default(Vector2), 1f, 1f, null);
ChaosBurst.Spawn(this.effectPosition, 3);
}
SoundManager.PlayAudioWithDistance("Teleport", new Vector2?(this.effectPosition), null, 24f, 0.075f, 1f, false);
}
// Token: 0x06003100 RID: 12544 RVA: 0x0016681C File Offset: 0x00164C1C
public override void DashFinished()
{
base.DashFinished();
this.SpawnTeleportEffect(false);
string audioID = "EnemyDead";
Vector2? soundOrigin = new Vector2?(this.parent.transform.position);
float overridePitch = UnityEngine.Random.Range(1.1f, 1.2f);
SoundManager.PlayAudioWithDistance(audioID, soundOrigin, null, 24f, 0.35f, overridePitch, false);
this.ToggleColliders(true);
}
// Token: 0x06003101 RID: 12545 RVA: 0x00166884 File Offset: 0x00164C84
private void ToggleColliders(bool status)
{
this.parent.hurtBoxObj.SetActive(status);
this.parent.floorContact.SetActive(status);
this.parent.fall.disableFallTransition = !status;
if (status)
{
this.parent.Show();
}
else
{
this.parent.Hide();
}
}
// Token: 0x040033DC RID: 13276
public new static string staticID = "RadiantDash";
// Token: 0x040033DD RID: 13277
private static float teleportRange = 9f;
// Token: 0x040033DE RID: 13278
private ChaosQuickStopwatch teleportStopwatch = new ChaosQuickStopwatch(0.175f);
// Token: 0x040033DF RID: 13279
private float teleLerpValue;
// Token: 0x040033E0 RID: 13280
private Vector2 startPosition;
// Token: 0x040033E1 RID: 13281
private Vector2 endPosition;
// Token: 0x040033E2 RID: 13282
private Vector2 effectPosition;
}
public class UseShockLaceLine : Player.SkillState
{
// Token: 0x06003619 RID: 13849 RVA: 0x00191058 File Offset: 0x0018F458
public UseShockLaceLine(FSM parentFSM, Player parentEntity) : base(UseShockLaceLine.staticID, parentFSM, parentEntity)
{
this.hasSignatureVariant = true;
this.SetAnimTimes(0f, 0.2f, 0.1f, 0.8f, 0.9f, 1f);
}
// Token: 0x17000779 RID: 1913
// (get) Token: 0x0600361A RID: 13850 RVA: 0x0019108B File Offset: 0x0018F48B
public override string OnEnterAnimStr
{
get
{
return this.parent.PBAoEAnimStr;
}
}
// Token: 0x0600361B RID: 13851 RVA: 0x00191098 File Offset: 0x0018F498
public override void ExecuteSkill()
{
base.ExecuteSkill();
Vector2 Vec = this.inputVector;
if (isUltimate)
{
ShockLace shockLace = base.ChaosInst<ShockLace>(ShockLace.Prefab, new Vector2?(Globals.GetSafeLinecastVector(this.parent.transform.position, this.inputVector, 0, ChaosCollisions.layerAllWallAndObst)), null, null);
shockLace.SetSkillInfo(this.parent.skillCategory, this.skillID, this.inputVector);
shockLace.nodeCount = 8;
shockLace.atkRadius = 3f;
shockLace.atkCount = 20;
shockLace.atkInterval = 0.2f;
for (int i = 0; i < 12; i++)
{
Vector2 vec = Globals.GetRotatedCircleVector(12, i, this.inputVector);
shockLace = base.ChaosInst<ShockLace>(ShockLace.Prefab, new Vector2?(Globals.GetSafeLinecastVector(this.parent.transform.position, vec, 5, ChaosCollisions.layerAllWallAndObst)), null, null);
shockLace.SetSkillInfo(this.parent.skillCategory, this.skillID, vec);
shockLace.nodeCount = 8;
shockLace.atkRadius = 2f;
shockLace.atkCount = 10;
shockLace.atkInterval = 0.2f;
}
CameraController.ShakeCamera(0.25f, false);
} else
{
for (int i = 0; i < 3; i++)
{
ShockLace shockLace = base.ChaosInst<ShockLace>(ShockLace.Prefab, new Vector2?(Globals.GetSafeLinecastVector(this.parent.transform.position, Vec, 4f + ((8 - i) * i), ChaosCollisions.layerAllWallAndObst)), null, null);
shockLace.SetSkillInfo(this.parent.skillCategory, this.skillID, this.inputVector);
if (this.IsEmpowered)
{
shockLace.nodeCount = 6;
shockLace.atkRadius = 4.25f - (i);
shockLace.atkCount = 10;
shockLace.atkInterval = 0.2f;
}
else
{
shockLace.nodeCount = 6;
shockLace.atkRadius = 3.25f - (i);
shockLace.atkCount = 8;
shockLace.atkInterval = 0.3f;
}
CameraController.ShakeCamera(0.25f, false);
}
}
}
// Token: 0x0400390E RID: 14606
public new static string staticID = "Mythical::UseShockLaceLine";
}
public class UseSlicingBarrageGood : Player.SkillState
{
// Token: 0x0600364C RID: 13900 RVA: 0x00192BD0 File Offset: 0x00190FD0
public UseSlicingBarrageGood(FSM parentFSM, Player parentEntity) : base(UseSlicingBarrageGood.staticID, parentFSM, parentEntity)
{
this.hasSignatureVariant = true;
this.isMovementSkill = true;
this.isMeleeSkill = true;
this.SetAnimTimes(0.2f, 0.2f, 0.35f, 0.6f, 0.8f, 1f);
this.speedMod = new NumVarStatMod(UseSlicingBarrageGood.staticID, 8f, 5, VarStatModType.OverrideWithMods, false);
}
// Token: 0x0600364D RID: 13901 RVA: 0x00192C73 File Offset: 0x00191073
public override void OnEnter()
{
base.OnEnter();
this.atkStarted = false;
this.wasEmpowered = this.IsEmpowered;
this.parent.movement.EndMovement();
}
// Token: 0x0600364E RID: 13902 RVA: 0x00192CA0 File Offset: 0x001910A0
public override void ExecuteSkill()
{
if (!this.atkStarted)
{
this.atkStarted = true;
this.atkCounter = 0;
this.atkMaxCount = ((!this.isUltimate) ? ((!this.IsEmpowered) ? 7 : 10) : 13);
this.atkStopwatchID = ChaosStopwatch.Begin(0f, true, this.atkInterval, this.atkMaxCount, 0);
this.parent.movement.moveVector = this.parent.GetInputVector();
}
StopwatchState stopwatchState = ChaosStopwatch.CheckInterval(this.atkStopwatchID, true);
if (stopwatchState != StopwatchState.Running)
{
if (stopwatchState != StopwatchState.Ready)
{
if (stopwatchState == StopwatchState.Done)
{
base.ExecuteSkill();
}
}
else
{
this.atkCounter++;
this.isFinalAtk = (this.atkCounter >= this.atkMaxCount);
this.parent.movement.moveVector = this.parent.GetInputVector();
if (this.isFinalAtk)
{
CameraController.ShakeCamera(0.25f, false);
this.parent.anim.PlayDirectional(this.parent.PBAoEAnimStr, -1, this.animExecTime);
if (this.isUltimate)
{
this.speedMod.modValue = 40f;
this.CreateWindSlash(this.parent.GetInputVector(), true);
this.CreateWindSlash(this.parent.GetInputVector(), false);
}
else
{
this.speedMod.modValue = 30f;
this.CreateWindSlash(this.parent.GetInputVector(), false);
}
}
else
{
if (this.atkCounter > 1)
{
this.parent.anim.PlayDirectional(this.parent.NextHandAnimStr, -1, this.animExecTime);
}
if (this.isUltimate)
{
this.speedMod.modValue = 35f;
this.CreateWindSlash(this.parent.GetInputVector(), false);
}
else
{
this.speedMod.modValue = 25f;
this.CreateSlicingBarrage(this.parent.attackOriginTrans.position, this.parent.GetInputVector());
}
}
this.parent.movement.moveSpeedStat.Modify(this.speedMod, true);
this.parent.movement.MoveToMoveVector(0f, false);
}
}
}
// Token: 0x0600364F RID: 13903 RVA: 0x00192F84 File Offset: 0x00191384
private void CreateSlicingBarrage(Vector2 givenPosition, Vector2 givenVector)
{
this.currentSB = base.ChaosInst<SlicingBarrage>(SlicingBarrage.Prefab, new Vector2?(givenPosition + givenVector * 0.25f), new Quaternion?(Globals.GetRotationQuaternion(givenVector)), null);
this.currentSB.attack.SetAttackInfo(this.parent.skillCategory, this.skillID, 1, this.isUltimate);
this.currentSB.attack.knockbackOverwriteVector = this.inputVector;
int num = this.atkCounter % 3;
if (num != 1)
{
if (num == 2)
{
this.currentSB.transform.localScale = this.negScale;
}
}
else if (!this.parent.isFacingRight)
{
this.currentSB.transform.localScale = this.negScale;
}
this.currentSB.anim.speed = 0.75f;
this.currentSB.anim.Play((!this.wasEmpowered && !this.isFinalAtk) ? Player.UseSlicingBarrage.medAnimStr : Player.UseSlicingBarrage.lrgAnimStr, -1, 0f);
PoolManager.GetPoolItem<DustEmitter>().EmitDirBurst(4, Globals.GetRotationVector(givenVector).z, 4f, -1f, 0.3f, new Vector3?(givenPosition));
}
// Token: 0x06003650 RID: 13904 RVA: 0x001930F0 File Offset: 0x001914F0
private void CreateWindSlash(Vector2 givenVector, bool posOffset = false)
{
this.currentWS = (WindSlashProjectile)Projectile.CreateProjectile(this.parent, WindSlashProjectile.Prefab, new Vector3?(this.parent.attackOriginTrans.position), new Quaternion?(Globals.GetRotationQuaternion(givenVector)), null);
this.currentWS.moveVector = givenVector;
this.atkLevel = 1;
if (this.isUltimate)
{
this.currentWS.lifeTime = 0.5f;
this.currentWS.moveSpeed = 30f;
this.currentWS.flyTime = 0.24f;
this.atkLevel = 2;
}
this.currentWS.attackBox.SetAttackInfo(this.parent.skillCategory, this.skillID, this.atkLevel, this.isUltimate);
this.currentWS.attackBox.knockbackOverwriteVector = this.inputVector;
this.currentWS.alwaysWinCollision = true;
string text = Player.UseSlicingBarrage.audioID;
Vector2? soundOrigin = new Vector2?(this.parent.transform.position);
float overridePitch = UnityEngine.Random.Range(0.75f, 0.85f);
SoundManager.PlayAudioWithDistance(text, soundOrigin, null, 24f, -1f, overridePitch, false);
}
// Token: 0x06003651 RID: 13905 RVA: 0x00193306 File Offset: 0x00191706
public override void OnExit()
{
this.parent.movement.moveSpeedStat.Modify(this.speedMod, false);
base.OnExit();
}
// Token: 0x04003940 RID: 14656
public new static string staticID = "Mythical::UseSlicingBarrageGood";
// Token: 0x04003941 RID: 14657
private static string medAnimStr = "MedSlashAdvancing";
// Token: 0x04003942 RID: 14658
private static string lrgAnimStr = "LargeSlashAdvancing";
// Token: 0x04003943 RID: 14659
private static string audioID = "WindArrowEnd";
// Token: 0x04003945 RID: 14661
private Vector2 perpendVec;
// Token: 0x04003946 RID: 14662
private Vector3 negScale = new Vector3(-1f, 1f, 1f);
// Token: 0x04003947 RID: 14663
private SlicingBarrage currentSB;
// Token: 0x04003948 RID: 14664
private WindSlashProjectile currentWS;
// Token: 0x04003949 RID: 14665
private NumVarStatMod speedMod;
// Token: 0x0400394A RID: 14666
private int atkMaxCount = 7;
// Token: 0x0400394B RID: 14667
private float atkInterval = 0.1f;
// Token: 0x0400394C RID: 14668
private int atkStopwatchID;
// Token: 0x0400394D RID: 14669
private bool atkStarted;
// Token: 0x0400394E RID: 14670
private int atkCounter;
// Token: 0x0400394F RID: 14671
private int atkLevel;
// Token: 0x04003950 RID: 14672
private bool wasEmpowered;
// Token: 0x04003951 RID: 14673
private bool isFinalAtk;
}
public class UseCombustionWaveGood : Player.SkillState
{
// Token: 0x060033EB RID: 13291 RVA: 0x0017CCE8 File Offset: 0x0017B0E8
public UseCombustionWaveGood(FSM parentFSM, Player parentEntity) : base(UseCombustionWaveGood.staticID, parentFSM, parentEntity)
{
this.hasSignatureVariant = true;
this.SetAnimTimes(0.15f, 0.2f, 0.3f, 0.6f, 0.8f, 1f);
}
// Token: 0x17000744 RID: 1860
// (get) Token: 0x060033EC RID: 13292 RVA: 0x0017CD1B File Offset: 0x0017B11B
public override string OnEnterAnimStr
{
get
{
return this.parent.GSlamAnimStr;
}
}
// Token: 0x060033ED RID: 13293 RVA: 0x0017CD28 File Offset: 0x0017B128
public override void OnEnter()
{
base.OnEnter();
this.parent.ToggleEnemyFloorCollisions(false);
}
// Token: 0x060033EE RID: 13294 RVA: 0x0017CD3C File Offset: 0x0017B13C
public override void ExecuteSkill()
{
base.ExecuteSkill();
Vector2 v = Globals.GetPerpendicular(this.inputVector, true) * 0.4f;
if (this.isUltimate)
{
CreateWave((inputVector + (v*1.5f)).normalized);
CreateWave((inputVector - (v * 1.5f)).normalized);
CreateWave((inputVector).normalized);
CreateWave((inputVector + v).normalized);
CreateWave((inputVector - v).normalized);
} else
{
CreateWave((inputVector + v).normalized);
CreateWave((inputVector).normalized);
CreateWave((inputVector - v).normalized);
}
}
public void CreateWave(Vector2 vector)
{
this.currentCW = base.ChaosInst<CombustionWave>(CombustionWave.Prefab, new Vector2?(this.parent.transform.position), null, null);
this.currentCW.SetSkillData(this.parent.skillCategory, this.skillID, -1, false, false);
this.currentCW.moveVector = vector*1.5f;
this.currentCW.maxWaveCount = this.isUltimate?8:6;
this.currentCW.spawnRate = 0.15f;
this.currentCW.isEmpowered = this.IsEmpowered;
}
// Token: 0x060033EF RID: 13295 RVA: 0x0017CDE1 File Offset: 0x0017B1E1
public override void OnExit()
{
base.OnExit();
this.parent.ToggleEnemyFloorCollisions(true);
}
// Token: 0x040036BE RID: 14014
public new static string staticID = "Mythical::UseCombustionWaveGood";
// Token: 0x040036BF RID: 14015
private CombustionWave currentCW;
}
public class UseRandomMinion : Player.UseBaseMinion
{
// Token: 0x060035F3 RID: 13811 RVA: 0x00190170 File Offset: 0x0018E570
public UseRandomMinion(FSM parentFSM, Player parentEntity) : base(UseRandomMinion.staticID, parentFSM, parentEntity)
{
this.minionPrefab = FireMinion.Prefab;
this.hasSignatureVariant = true;
}
public override void SummonAllMinions()
{
List<GameObject> prefabs = new List<GameObject>()
{
FireMinion.prefab,
EarthMinion.prefab,
WaterMinion.prefab,
LightningMinion.prefab,
WindMinion.prefab,
ChaosMinion.prefab
};
List<string> strings = new List<string>()
{
"UseFireMinion",
"UseEarthMinion",
"UseWaterMinion",
"UseLightningMinion",
"UseWindMinion",
"UseChaosMinion",
};
List<GameObject> inst = new List<GameObject>();
int id = UnityEngine.Random.Range(0, prefabs.Count);
if (this.isUltimate)
{
inst.AddRange(prefabs);
}
this.minionList.RemoveNullValues<BasicMinion>();
this.parent.CleanUpPlayerSummonsList();
this.currentCount = 0;
while (this.currentCount < this.summonCount)
{
if (!isUltimate)
{
id = UnityEngine.Random.Range(0, prefabs.Count);
inst.Clear();
inst.Add(prefabs[id]);
}
foreach (GameObject o in inst)
{
zz = strings[prefabs.IndexOf(o)];
this.minionPrefab = o;
this.SummonMinion();
if (!isUltimate)
{
this.LimitToMaxMinions();
}
this.currentCount++;
}
}
}
public override BasicMinion SummonMinion()
{
this.currentMinion = base.ChaosInst<BasicMinion>(this.minionPrefab, new Vector2?(this.GetSpawnLocation()+new Vector2(UnityEngine.Random.value*3-1.5f, UnityEngine.Random.value * 3 - 1.5f)), null, null);
this.currentMinion.gameObject.name = this.minionPrefab.name + this.parent.skillCategory;
this.currentMinion.parentTrans = this.parent.transform;
this.currentMinion.parentSummonList = this.parent.playerSummonsList;
this.currentMinion.SetSkillInfo(this.parent.skillCategory, zz, this.currentLevel, this.isUltimate);
this.currentMinion.summonDuration = this.summonDuration;
this.currentMinion.startingHealth = this.summonHealth;
this.currentMinion.isEmpowered = this.IsEmpowered;
if (Inventory.EitherPlayerHasItem(FlatDamage.staticID) && FlatDamage.damageMod != null)
{
this.currentMinion.health.damageTakenStat.Modify(FlatDamage.damageMod, true);
}
this.minionList.Add(this.currentMinion);
this.parent.playerSummonsList.Add(this.currentMinion.gameObject);
return this.currentMinion;
}
string zz = "";
// Token: 0x040038EB RID: 14571
public new static string staticID = "Mythical::UseRandomMinions";
}
public class DragonCross : Player.MeleeAttackState
{
// Token: 0x0600312A RID: 12586 RVA: 0x0016801C File Offset: 0x0016641C
public DragonCross(FSM parentFSM, Player parentEntity) : base(DragonCross.staticID, parentFSM, parentEntity)
{
this.isBasic = true;
this.setParent = false;
this.destroyAttackObjectOnExit = false;
this.maxComboCount = 3;
this.animStartTime = 0.2f;
this.animExecTime = 0.4f;
this.baseCancelThreshold = 0.6f;
this.finalCancelThreshold = 0.7f;
this.baseRunThreshold = 0.8f;
this.finalRunThreshold = 0.85f;
this.baseExitThreshold = 1f;
this.finalExitThreshold = 1f;
this.flipObjectForBackhand = false;
this.attackMoveSpeedMod = new NumVarStatMod(this.atkMoveModStr, 0f, 10, VarStatModType.OverrideWithMods, false);
this.finalAttackMoveSpeedMod = this.attackMoveSpeedMod;
this.sfxNames = new string[this.maxComboCount];
for (int i = 0; i < this.maxComboCount; i++)
{
this.sfxNames[i] = "FlameLight";
}
this.autoHoldStat.BaseValue = true;
}
// Token: 0x17000709 RID: 1801
// (get) Token: 0x0600312B RID: 12587 RVA: 0x00168136 File Offset: 0x00166536
public bool IsDoubleShot
{
get
{
return base.HitsRemaining == 0;
}
}
// Token: 0x0600312C RID: 12588 RVA: 0x00168144 File Offset: 0x00166544
public override void SetEmpowered(bool givenStatus, BoolVarStatMod givenMod)
{
base.SetEmpowered(givenStatus, givenMod);
}
// Token: 0x0600312D RID: 12589 RVA: 0x001681A8 File Offset: 0x001665A8
public override void SetMoveSpeedAndCancelThreshold(int attackCount)
{
if (this.IsDoubleShot)
{
this.cancelThreshold = this.finalCancelThreshold;
this.parent.movement.moveSpeedStat.AddMod(this.finalAttackMoveSpeedMod);
}
else
{
this.cancelThreshold = this.baseCancelThreshold;
this.parent.movement.moveSpeedStat.AddMod(this.attackMoveSpeedMod);
}
}
// Token: 0x0600312E RID: 12590 RVA: 0x00168213 File Offset: 0x00166613
public override void PlayAnimation(int attackCount)
{
this.parent.anim.PlayDirectional((!this.IsDoubleShot) ? this.parent.NextHandAnimStr : this.parent.PBAoEAnimStr, -1, this.animStartTime);
}
// Token: 0x0600312F RID: 12591 RVA: 0x00168254 File Offset: 0x00166654
public override void ExecuteAttack()
{
this.HandleComboCount(this.comboCounter);
this.HandleSelfTransition(this.comboCounter);
this.AnnounceSkillExecuteEvent();
if (this.IsDoubleShot)
{
FireFireArc((Vector2)this.parent.attackOriginTrans.position + this.inputVector, inputVector, true);
FireFireArc((Vector2)this.parent.attackOriginTrans.position + this.inputVector, inputVector, false);
CameraController.ShakeCamera(0.15f, false);
this.parent.movement.EndMovement();
this.parent.movement.moveVector = -this.inputVector;
this.parent.movement.MoveToMoveVector(20, false);
}
else
{
bool arc = ((!this.parent.isFacingRight) ? this.parent.playForehandAnim : (!this.parent.playForehandAnim));
FireFireArc((Vector2)this.parent.attackOriginTrans.position + this.inputVector , inputVector, arc);
//this.CreateFireCross((!this.parent.isFacingRight) ? Globals.GetPerpendicular(this.inputVector, this.parent.forehandAnimPlayed) : Globals.GetPerpendicular(this.inputVector, !this.parent.forehandAnimPlayed), false);
}
base.CancelToDash(false);
}
private void FireFireArc(Vector2 givenPosition, Vector2 givenVector, bool positiveArc)
{
this.currentFA = (FireArc)this.CreateProjectile(FireArc.Prefab, new Vector3?(givenPosition + UnityEngine.Random.insideUnitCircle * 0.5f), new Quaternion?(Globals.GetRotationQuaternion(givenVector)), null, true);
this.currentFA.targetVector = givenVector;
this.currentFA.attackBox.knockbackOverwriteVector = givenVector;
this.currentFA.positiveApproach = positiveArc;
this.currentFA.arcRange = 3;
this.currentFA.flyTime *= 0.4f;
this.currentFA.moveSpeed *= 0.7f;
this.currentFA.lifeTime *= 0.3f;
this.currentFA.disableOnHit = true;
this.currentFA.projectileSpriteRenderer.sprite = SampleSkillLoader.newArc;
darkArcs.Add(this.currentFA);
ParticleSystem ps = this.currentFA.GetComponentInChildren<ParticleSystem>();
ParticleSystem.MainModule main = ps.main;
main.startColor = new Color(0.5f, 0.5f, 0, 0.784f);
ParticleSystem.ColorOverLifetimeModule colorOverLifetime = ps.colorOverLifetime;
Gradient grad = new Gradient();
grad.SetKeys(new GradientColorKey[]
{
new GradientColorKey()
{
color = new Color(0.4f, 0f, 0.4f, 0.784f),
time = 0f
},
new GradientColorKey()
{
color = new Color(0.3f, 0f, 0.3f, 0.584f),
time = 0.5f
},
new GradientColorKey()
{
color = new Color(0.2f, 0f, 0.2f, 0.384f),
time = 1f
}
},colorOverLifetime.color.gradient.alphaKeys);
colorOverLifetime.color = grad;
}
public Projectile CreateProjectile(GameObject prefab, Vector3? givenPosition = null, Quaternion? givenQuaternion = null, Transform parentTrans = null, bool setAtkInfo = true)
{
this.newProjectile = Projectile.CreateProjectile(this.parent, prefab, new Vector3?((givenPosition == null) ? this.parent.attackOriginTrans.position : givenPosition.Value), new Quaternion?((givenQuaternion == null) ? Quaternion.identity : givenQuaternion.Value), parentTrans ?? this.parent.transform.parent);
if (setAtkInfo)
{
this.SetProjectileAtkInfo(this.newProjectile);
}
return this.newProjectile;
}
public void SetProjectileAtkInfo(Projectile projectile)
{
projectile.attackBox.SetAttackInfo(this.parent.skillCategory, this.skillID, this.currentLevel, false);
projectile.UpdateCalculatedDamage(true);
}
public override void OnEnter()
{
base.OnEnter();
CameraController.ShakeCamera(0.25f, false);
this.fbEmitter = PoolManager.GetPoolItem<FireBurst>();
}
// Token: 0x04003400 RID: 13312
public new static string staticID = "Mythical::DragonCross";
// Token: 0x04003401 RID: 13313
private FireArc currentFA;
private FireBurst fbEmitter;
private Projectile newProjectile;
public static List<FireArc> darkArcs = new List<FireArc>();
}
public class UseFrostRing : Player.ProjectileAttackState
{
// Token: 0x060034ED RID: 13549 RVA: 0x001860F8 File Offset: 0x001844F8
public UseFrostRing(FSM parentFSM, Player parentEntity) : base(UseFrostRing.staticID, parentFSM, parentEntity)
{
this.SetAnimTimes(0.1f, 0.2f, 0.3f, 0.4f, 0.75f, 1f);
}
// Token: 0x1700075A RID: 1882
// (get) Token: 0x060034EE RID: 13550 RVA: 0x00186148 File Offset: 0x00184548
public override string OnEnterAnimStr
{
get
{
return (!this.parent.isFacingRight) ? this.parent.ForehandAnimStr : this.parent.BackhandAnimStr;
}
}
// Token: 0x060034EF RID: 13551 RVA: 0x00186178 File Offset: 0x00184578
public override void OnEnter()
{
base.OnEnter();
this.shotStarted = false;
this.shotFinished = false;
base.SetSkillLevel((!this.IsEmpowered) ? 1 : 2);
this.parent.movement.moveVector = -this.inputVector;
this.parent.movement.MoveToMoveVector(18, false);
}
// Token: 0x060034F0 RID: 13552 RVA: 0x00186264 File Offset: 0x00184664
public override void ExecuteSkill()
{
if (!this.shotStarted)
{
this.shotStarted = true;
this.shotStopwatchID = ChaosStopwatch.Begin(0f, true, 4f, 1, 0);
SoundManager.PlayWithDistAndSPR("StandardThrow", this.parent.transform.position, 1f);
SoundManager.PlayWithDistAndSPR("IceDash", this.parent.transform.position, 1f);
CameraController.ShakeCamera(0.3f, false);
FrostFanProjectiles.Clear();
EndPositions.Clear();
for (int i = 0; i < 24; i++)
{
Vector2 v = Globals.GetRotatedCircleVector(24, i, this.inputVector);
float dist = Vector2.Distance(v.normalized * 0.5f, this.inputVector.normalized*0.5f);
float fac = (1 - dist)*0.75f + 0.25f;
this.ThrowFrostFanProjectile(this.parent.attackOriginTrans.position, v);
EndPositions.Add((Vector2)this.parent.attackOriginTrans.position + v * ((9 + (i % 2)) * fac * (IsEmpowered ? 1.25f : 1)));
}
}
base.ExecuteSkill();
}
// Token: 0x060034F1 RID: 13553 RVA: 0x001863E4 File Offset: 0x001847E4
public override void FixedUpdate()
{
if (!this.shotStarted || this.shotFinished)
{
return;
}
if (!this.shotFinished)
{
for (int i = 0; i < 24; i++)
{
FrostFanProjectile ffp = FrostFanProjectiles[i];
if (ffp != null)
{
ffp.transform.position = Vector2.Lerp(ffp.transform.position, EndPositions[i], Time.fixedDeltaTime * (IsEmpowered ? 6 : 4));
}
}
}
}
// Token: 0x060034F2 RID: 13554 RVA: 0x00186548 File Offset: 0x00184948
private void ThrowFrostFanProjectile(Vector2 givenPosition, Vector2 givenVector)
{
this.currentFP = (FrostFanProjectile)this.CreateProjectile(FrostFanProjectile.Prefab, new Vector3?(givenPosition + givenVector), new Quaternion?(Globals.GetRotationQuaternion(givenVector)), null, true);
FrostFanProjectiles.Add(this.currentFP);
this.currentFP.lifeTime = 4;
this.currentFP.flyTime = 4;
this.FireProjectile(this.currentFP, givenVector*0.03f, true, 0f, 0f, string.Empty, false);
PoolManager.GetPoolItem<ParticleEffect>("IcicleBreakEffect").Emit(new int?(2), new Vector3?(givenPosition + givenVector), null, null, 0f, null, null);
}
public List<FrostFanProjectile> FrostFanProjectiles = new List<FrostFanProjectile>();
public List<Vector3> EndPositions = new List<Vector3>();
// Token: 0x040037C8 RID: 14280
public new static string staticID = "Mythical::UseFrostRing";
// Token: 0x040037C9 RID: 14281
private static int projectileCount = 5;
// Token: 0x040037CA RID: 14282
private int shotCounter;
// Token: 0x040037CB RID: 14283
private int shotStopwatchID;
// Token: 0x040037CC RID: 14284
private bool shotStarted;
// Token: 0x040037CD RID: 14285
private bool shotFinished;
// Token: 0x040037CE RID: 14286
private List<Vector2> targetVecList = new List<Vector2>();
// Token: 0x040037CF RID: 14287
private Vector2 perpendOffset;
// Token: 0x040037D0 RID: 14288
private Vector2 attackPosition;
// Token: 0x040037D1 RID: 14289
private static float moveSpeed = 12f;
// Token: 0x040037D2 RID: 14290
private FrostFanProjectile currentFP;
// Token: 0x040037D3 RID: 14291
private int ultCounter;
// Token: 0x040037D4 RID: 14292
private bool ultFinalShot;
}
public class ObsidianDash : Player.BaseDashState
{
public ObsidianDash(FSM fsm, Player parentPlayer) : base(ObsidianDash.staticID, fsm, parentPlayer)
{
this.isProjectileSkill = true;
this.isDash = true;
base.InitChargeSkillSettings(1, 0f, this.skillData, this);
}
// Token: 0x06003731 RID: 14129 RVA: 0x0019C1B7 File Offset: 0x0019A5B7
public override void SetEmpowered(bool givenStatus, BoolVarStatMod givenMod)
{
base.SetEmpowered(givenStatus, givenMod);
if (this.IsEmpowered)
{
this.spawnCount = 5;
this.spawnOffset = 2;
}
else
{
this.spawnCount = 3;
this.spawnOffset = 1;
}
}
// Token: 0x06003732 RID: 14130 RVA: 0x0019C1F0 File Offset: 0x0019A5F0
public override void OnEnter()
{
base.OnEnter();
if (!this.cooldownReady)
{
return;
}
this.spawnPos = (Vector2)this.parent.attackOriginTrans.position + this.parent.movement.moveVector.normalized * 0.5f;
for (int i = 0; i < this.spawnCount; i++)
{
Vector2 v = Globals.GetRotatedCircleVector(36, i - this.spawnOffset, this.parent.movement.moveVector.normalized);
this.CreateEarthCascade(this.spawnPos + v,v,0);
}
}
private void CreateEarthCascade(Vector2 givenPosition, Vector2 givenVector, float givenDelay = 0f)
{
this.currentEC = (EarthCascade)this.CreateProjectile(EarthCascade.Prefab, new Vector3?(givenPosition), null, null, true);
this.currentEC.disableOnHit = !this.IsEmpowered;
this.FireProjectile(this.currentEC, givenVector, true, 0f, 0f, string.Empty, false);
this.currentEC.SetReleaseVars(givenVector, givenDelay);
if (this.isUltimate)
{
this.currentEC.disableOnHit = false;
}
}
public virtual Projectile CreateProjectile(GameObject prefab, Vector3? givenPosition = null, Quaternion? givenQuaternion = null, Transform parentTrans = null, bool setAtkInfo = true)
{
this.newProjectile = Projectile.CreateProjectile(this.parent, prefab, new Vector3?((givenPosition == null) ? this.parent.attackOriginTrans.position : givenPosition.Value), new Quaternion?((givenQuaternion == null) ? Quaternion.identity : givenQuaternion.Value), parentTrans ?? this.parent.transform.parent);
if (setAtkInfo)
{
this.SetProjectileAtkInfo(this.newProjectile);
}
return this.newProjectile;
}
public virtual void FireProjectile(Projectile projectile, Vector2 moveVector, bool setKnockbackVector = true, float newMoveSpeed = 0f, float newFlyTime = 0f, string audioString = "", bool setAtkInfo = false)
{
projectile.transform.SetParent(null);
if (setAtkInfo)
{
this.SetProjectileAtkInfo(projectile);
}
projectile.moveVector = moveVector;
if (setKnockbackVector)
{
projectile.attackBox.knockbackOverwriteVector = moveVector;
}
if (newMoveSpeed != 0f)
{
projectile.moveSpeed = newMoveSpeed;
}
if (newFlyTime != 0f)
{
projectile.flyTime = newFlyTime;
projectile.lifeTime = newFlyTime * 2f;
}
projectile.RefreshFlightTime(false);
if (audioString != string.Empty)
{
SoundManager.PlayWithDistAndSPR(audioString, projectile.transform.position, 1f);
}
}
// Token: 0x060031AC RID: 12716 RVA: 0x0016A9BF File Offset: 0x00168DBF
public virtual void SetProjectileAtkInfo(Projectile projectile)
{
projectile.attackBox.SetAttackInfo(this.parent.skillCategory, this.skillID, this.currentLevel, this.isUltimate);
projectile.UpdateCalculatedDamage(true);
}
// Token: 0x04003479 RID: 13433
private Projectile newProjectile;
// Token: 0x04003A4D RID: 14925
public new static string staticID = "Mythical::ObsidianDash";
// Token: 0x04003A4E RID: 14926
private Vector2 spawnPos;
private EarthCascade currentEC;
// Token: 0x04003A4F RID: 14927
private EarthDrillProjectile currentDP;
// Token: 0x04003A50 RID: 14928
private RockBurstDirectionalEffect currentFX;
// Token: 0x04003A51 RID: 14929
private int spawnCount = 3;
// Token: 0x04003A52 RID: 14930
private int spawnOffset = 1;
}
public class DarkDragonDash : Player.BaseDashState
{
public DarkDragonDash(FSM fsm, Player parentPlayer) : base(DarkDragonDash.staticID, fsm, parentPlayer)
{
this.isProjectileSkill = true;
this.isDash = true;
base.InitChargeSkillSettings(1, 0f, this.skillData, this);
}
// Token: 0x06003732 RID: 14130 RVA: 0x0019C1F0 File Offset: 0x0019A5F0
public override void OnEnter()
{
base.OnEnter();
if (!this.cooldownReady)
{
return;
}