ForbodingAngel

Untitled

Sep 30th, 2014
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.80 KB | None | 0 0
  1. -- UNITDEF -- ELIGHTTANK3 --
  2. --------------------------------------------------------------------------------
  3.  
  4. local unitName = "elighttank3"
  5.  
  6. --------------------------------------------------------------------------------
  7.  
  8. local power = [[3 power]]
  9. local armortype = [[light]]
  10. local supply = [[3]]
  11.  
  12. local weapon1Damage = 60
  13. local weapon1AOE = 1
  14. local energycosttofire = weapon1Damage / 20 * ((weapon1AOE / 1000) + 1)
  15.  
  16. local function roundToFirstDecimal(energycosttofire)
  17. return math.round(energycosttofire*10)*0.1
  18. end
  19.  
  20. local unitDef = {
  21.  
  22. --mobileunit
  23. transportbyenemy = false;
  24. --**
  25.  
  26. acceleration = 1,
  27. brakeRate = 0.1,
  28. buildCostEnergy = 0,
  29. buildCostMetal = 27,
  30. builder = false,
  31. buildTime = 5,
  32. canAttack = true,
  33. cancollect = "1",
  34. canGuard = true,
  35. canHover = true,
  36. canMove = true,
  37. canPatrol = true,
  38. canstop = "1",
  39. category = "LIGHT NOTAIR RAID",
  40. corpse = "ammobox",
  41. description = [[Unit Type: Raider
  42. Armortype: ]] ..armortype.. [[
  43.  
  44. 45 Damage vs Light/Armored
  45. 60 Damage vs Building
  46.  
  47. Energy cost to fire: ]] .. roundToFirstDecimal(energycosttofire) .. [[
  48.  
  49. Requires +]] .. power .. [[
  50. Uses +]] .. supply .. [[ Supply]],
  51. energyMake = 0,
  52. energyStorage = 0,
  53. energyUse = 0,
  54. explodeAs = "smallExplosionGenericBlue",
  55. footprintX = 2,
  56. footprintZ = 2,
  57. iconType = "raider",
  58. idleAutoHeal = .5,
  59. idleTime = 2200,
  60. leaveTracks = false,
  61. maxDamage = 245,
  62. maxSlope = 26,
  63. maxVelocity = 5,
  64. maxReverseVelocity = 2,
  65. maxWaterDepth = 10,
  66. metalStorage = 0,
  67. movementClass = "HOVERTANK2",
  68. name = "Kite",
  69. noChaseCategory = "VTOL",
  70. objectName = "elighttank4.s3o",
  71. radarDistance = 0,
  72. repairable = false,
  73. selfDestructAs = "smallExplosionGenericBlue",
  74. side = "CORE",
  75. sightDistance = 550,
  76. smoothAnim = true,
  77. stealth = true,
  78. seismicSignature = 2,
  79. -- turnInPlace = false,
  80. -- turnInPlaceSpeedLimit = 5.5,
  81. turnInPlace = true,
  82. turnRate = 5000,
  83. -- turnrate = 475,
  84. unitname = "elighttank3",
  85. upright = true,
  86. workerTime = 0,
  87.  
  88. sfxtypes = {
  89. explosiongenerators = {
  90. "custom:electricity",
  91. "custom:dirt",
  92. "custom:blacksmoke",
  93. },
  94. pieceExplosionGenerators = {
  95. "deathceg0",
  96. "deathceg1",
  97. },
  98. },
  99.  
  100. sounds = {
  101. underattack = "unitsunderattack1",
  102. ok = {
  103. "ack",
  104. },
  105. select = {
  106. "unitselect",
  107. },
  108. },
  109. weapons = {
  110. [1] = {
  111. def = "lighttankweapon",
  112. badTargetCategory = "VTOL ARMORED WALL",
  113. },
  114. },
  115. customParams = {
  116. needed_cover = 1,
  117. death_sounds = "generic",
  118. RequireTech = power,
  119. armortype = armortype,
  120. nofriendlyfire = "1",
  121. supply_cost = supply,
  122. normalstex = "unittextures/lego2skin_explorernormal.dds",
  123. buckettex = "unittextures/lego2skin_explorerbucket.dds",
  124. factionname = "outer_colonies",
  125. helptext = [[]],
  126. },
  127. }
  128.  
  129.  
  130. --------------------------------------------------------------------------------
  131. -- Energy Per Shot Calculation is: dmg / 20 * ((aoe / 1000) + 1)
  132.  
  133. local weaponDefs = {
  134. lighttankweapon = {
  135. badTargetCategory = [[ARMORED BUILDING]],
  136. AreaOfEffect = weapon1AOE,
  137. avoidFriendly = false,
  138. avoidFeature = false,
  139. collideFriendly = false,
  140. collideFeature = false,
  141. craterBoost = 0,
  142. craterMult = 0,
  143. explosionGenerator = "custom:genericshellexplosion-medium-lightning",
  144. energypershot = weapon1Damage / 20 * ((weapon1AOE / 1000) + 1),
  145. impulseBoost = 0,
  146. impulseFactor = 0,
  147. interceptedByShieldType = 4,
  148. lineOfSight = true,
  149. name = "elighttank3weapon",
  150. noSelfDamage = true,
  151. range = 550,
  152. reloadtime = 1,
  153. WeaponType = "LightningCannon",
  154. rgbColor = "0.1 0.2 0.5",
  155. rgbColor2 = "0 0 1",
  156. soundStart = "jacobs.wav",
  157. startsmoke = "1",
  158. texture1 = "lightning",
  159. thickness = 5,
  160. turret = true,
  161. weaponVelocity = 400,
  162. customparams = {
  163. damagetype = "elighttank3",
  164.  
  165. --Upgrades--
  166. upgradeClass = "groundweapons",
  167. },
  168. damage = {
  169. default = weapon1Damage,
  170. },
  171. },
  172. }
  173. unitDef.weaponDefs = weaponDefs
  174.  
  175.  
  176. --------------------------------------------------------------------------------
  177.  
  178. return lowerkeys({ [unitName] = unitDef })
  179.  
  180. --------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment