Advertisement
Guest User

Untitled

a guest
Feb 4th, 2021
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. local Mod = RegisterMod("Jesus", 1)
  2.  
  3. local Jesus = {
  4. DAMAGE = 0.06, -- These are all relative to Isaac's base stats.
  5. SPEED = 0.25,
  6. SHOTSPEED = 0,
  7. TEARHEIGHT = 0,
  8. TEARFALLINGSPEED = 0,
  9. LUCK = -2,
  10. FLYING = false,
  11. TEARFLAG = 1<<58, -- 0 is default
  12. TEARCOLOR = Color(1.0, 1.0, 1.0, 1.0, 0, 0, 0) -- Color(1.0, 1.0, 1.0, 1.0, 0, 0, 0) is default
  13. }
  14.  
  15. function Jesus:onCache(player, cacheFlag)
  16. if player:GetName() == "Jesus" then
  17. if cacheFlag == CacheFlag.CACHE_DAMAGE then
  18. player.Damage = player.Damage + Jesus.DAMAGE
  19. end
  20. if cacheFlag == CacheFlag.CACHE_SHOTSPEED then
  21. player.ShotSpeed = player.ShotSpeed + Jesus.SHOTSPEED
  22. end
  23. if cacheFlag == CacheFlag.CACHE_RANGE then
  24. player.TearHeight = player.TearHeight - Jesus.TEARHEIGHT
  25. player.TearFallingSpeed = player.TearFallingSpeed + Jesus.TEARFALLINGSPEED
  26. end
  27. if cacheFlag == CacheFlag.CACHE_SPEED then
  28. player.MoveSpeed = player.MoveSpeed + Jesus.SPEED
  29. end
  30. if cacheFlag == CacheFlag.CACHE_LUCK then
  31. player.Luck = player.Luck + Jesus.LUCK
  32. end
  33. if cacheFlag == CacheFlag.CACHE_FLYING and Jesus.FLYING then
  34. player.CanFly = true
  35. end
  36. if cacheFlag == CacheFlag.CACHE_TEARFLAG then
  37. player.TearFlags = player.TearFlags | Jesus.TEARFLAG
  38. end
  39. if cacheFlag == CacheFlag.CACHE_TEARCOLOR then
  40. player.TearColor = Jesus.TEARCOLOR
  41. end
  42. end
  43. end
  44.  
  45. local CostumeType = {
  46. Isaac.GetCostumeIdByPath("gfx/characters/JesusHair.anm2")
  47. }
  48.  
  49. function Jesus:onCache(player, cacheFlag)
  50. if player:GetName() == "Jesus" then
  51. player:AddNullCostume(JesusHair)
  52. costumeEquipped = true
  53. end
  54. end
  55.  
  56. Mod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, Jesus.onCache)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement