Advertisement
Faecous

EditProjectileStats

Jul 16th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.87 KB | None | 0 0
  1.  
  2. if (parentUnit.Entity.Name == "Spear Thrower")
  3. {
  4. projectile.GetComponentInChildren<Compensation>().upwardsRangeCompensation *= 0.8f;
  5. projectile.GetComponentInChildren<Compensation>().rangePow *= 0.8f;
  6. projectile.GetComponentInChildren<Compensation>().positionPredictionAmount *= 1f;
  7. projectile.GetComponentInChildren<Compensation>().velocityPrediction = 0f;
  8. projectile.GetComponentInChildren<ProjectileHit>().damage *= 1f;
  9. projectile.GetComponentInChildren<ProjectileHit>().force *= 0.5f;
  10. projectile.GetComponentInChildren<ProjectileHit>().shakeAmount *= 2f;
  11. projectile.GetComponentInChildren<ProjectileHit>().blockPoweredNeeded *= 1f;
  12. projectile.GetComponentInChildren<ProjectileHit>().callEffectsOnArmor = true;
  13. projectile.GetComponentInChildren<ProjectileHit>().destroyOnHit = false;
  14. projectile.GetComponentInChildren<ProjectileHit>().ignoreTeamMates = true;
  15. projectile.transform.localScale += new Vector3(0f, 0f, 0f);
  16. projectile.transform.localScale -= new Vector3(0f, 0f, 0f);
  17. Renderer[] componentsInChildren = projectile.GetComponentsInChildren<Renderer>();
  18. checked
  19. {
  20. for (int i = 0; i < componentsInChildren.Length; i++)
  21. {
  22. componentsInChildren[i].material.color = new Color(1f, 1f, 1f);
  23. for (int j = 0; j < componentsInChildren[i].materials.Length; j++)
  24. {
  25. Color color;
  26. switch (j)
  27. {
  28. case 0:
  29. color = new Color(0f, 0f, 0f);
  30. break;
  31. case 1:
  32. color = new Color(0f, 0f, 0f);
  33. break;
  34. case 2:
  35. color = new Color(0f, 0f, 0f);
  36. break;
  37. default:
  38. color = new Color(0f, 0f, 0f);
  39. break;
  40. }
  41. componentsInChildren[i].materials[j].color = color;
  42. }
  43. }
  44. for (int k = 0; k < componentsInChildren.Length; k++)
  45. {
  46. switch (k)
  47. {
  48. case 0:
  49. componentsInChildren[k].enabled = true;
  50. break;
  51. case 1:
  52. componentsInChildren[k].enabled = true;
  53. break;
  54. case 2:
  55. componentsInChildren[k].enabled = true;
  56. break;
  57. default:
  58. componentsInChildren[k].enabled = true;
  59. break;
  60. }
  61. }
  62. }
  63. }
  64. checked
  65. {
  66. if (parentUnit.Entity.Name == "Midas")
  67. {
  68. projectile.GetComponentInChildren<ProjectileHit>().onlyCallHitEventsOnRigsLessThan = 1E+10f;
  69. projectile.GetComponentInChildren<ProjectileHit>().ignoreTeamMates = true;
  70. projectile.GetComponentInChildren<ProjectileHit>().callEffectsBeforeDamage = true;
  71. projectile.GetComponentInChildren<ProjectileHit>().callEffectsOnArmor = true;
  72. projectile.GetComponentInChildren<Compensation>().positionPredictionAmount = 0f;
  73. projectile.GetComponentInChildren<Compensation>().velocityPrediction = 0f;
  74. projectile.transform.localScale *= 0f;
  75. Renderer[] componentsInChildren2 = projectile.GetComponentsInChildren<Renderer>();
  76. for (int l = 0; l < componentsInChildren2.Length; l++)
  77. {
  78. switch (l)
  79. {
  80. case 0:
  81. componentsInChildren2[l].enabled = false;
  82. break;
  83. case 1:
  84. componentsInChildren2[l].enabled = false;
  85. break;
  86. case 2:
  87. componentsInChildren2[l].enabled = false;
  88. break;
  89. default:
  90. componentsInChildren2[l].enabled = false;
  91. break;
  92. }
  93. }
  94. }
  95. if (parentUnit.Entity.Name == "Placeholder")
  96. {
  97. MeshRenderer[] componentsInChildren3 = projectile.GetComponentsInChildren<MeshRenderer>();
  98. for (int m = 0; m < componentsInChildren3.Length; m++)
  99. {
  100. componentsInChildren3[m].enabled = false;
  101. }
  102. projectile.AddComponent<FernSpawner>().unitsToSpawn = new List<UnitBlueprint>
  103. {
  104. UManager.dico["Zombie Slave"]
  105. }.ToArray();
  106. projectile.GetComponent<FernSpawner>().u_numOfObjects = 3;
  107. projectile.GetComponent<FernSpawner>().u_startDelay = 0.1f;
  108. projectile.GetComponent<FernSpawner>().u_cd = 0f;
  109. projectile.GetComponent<FernSpawner>().u_triggerType = FernSpawner.TriggerType.Still;
  110. projectile.GetComponent<FernSpawner>().objectsToSpawn = new List<GameObject>
  111. {
  112. database.Weapons[28].GetComponent<RangeWeapon>().objectToSpawn.GetComponentInChildren<ProjectileHit>().objectsToSpawn[0].objectToSpawn
  113. }.ToArray();
  114. projectile.GetComponent<FernSpawner>().o_numOfObjects = 1;
  115. projectile.GetComponent<FernSpawner>().o_startDelay = 0f;
  116. projectile.GetComponent<FernSpawner>().o_cd = 0f;
  117. projectile.GetComponent<FernSpawner>().o_triggerType = FernSpawner.TriggerType.Still;
  118. ObjectToSpawn objectToSpawn = new ObjectToSpawn();
  119. objectToSpawn.objectToSpawn = database.CombatMoves[10].GetComponent<SpawnObject>().objectToSpawn;
  120. projectile.GetComponentInChildren<ProjectileHit>().objectsToSpawn = new List<ObjectToSpawn>
  121. {
  122. objectToSpawn
  123. }.ToArray();
  124. }
  125. }
  126. }
  127. }
  128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement