Josh64

Untitled

Aug 30th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. local Mod = RegisterMod("Edith", 1)
  2. local game = Game()
  3.  
  4. local SaltWoman = {
  5. DAMAGE = -1,
  6. SPEED = 0.0,
  7. SHOTSPEED = 0.1,
  8. TEARHEIGHT = 4,
  9. TEARFALLINGSPEED = 0,
  10. LUCK = 1,
  11. FLYING = false,
  12. TEARFLAG = 0,
  13. TEARCOLOR = Color(1.0, 1.0, 1.0, 1.0, 0, 0, 0),
  14. HasHood = false
  15. }
  16.  
  17.  
  18. Mod.EDITH_HAIR = Isaac.GetCostumeIdByPath("gfx/characters/hood.anm2")
  19.  
  20. function Mod:onInit(player)
  21. if game:GetFrameCount() == 1 then
  22. if player:GetName() == "Edith"
  23. and SaltWoman.HasHood == false then
  24. SaltWoman.HasHood = true
  25. player:AddNullCostume(Mod.EDITH_HAIR)
  26. end
  27. end
  28. end
  29. Mod:AddCallback(ModCallbacks.MC_POST_PEFFECT_UPDATE, Mod.onInit)
  30.  
  31. function Mod:onCache(player, cacheFlag)
  32. if player:GetName() == "Edith" then
  33. if cacheFlag == CacheFlag.CACHE_DAMAGE then
  34. player.Damage = player.Damage + SaltWoman.DAMAGE
  35. end
  36. if cacheFlag == CacheFlag.CACHE_SHOTSPEED then
  37. player.ShotSpeed = player.ShotSpeed + SaltWoman.SHOTSPEED
  38. end
  39. if cacheFlag == CacheFlag.CACHE_RANGE then
  40. player.TearHeight = player.TearHeight - SaltWoman.TEARHEIGHT
  41. player.TearFallingSpeed = player.TearFallingSpeed + SaltWoman.TEARFALLINGSPEED
  42. end
  43. if cacheFlag == CacheFlag.CACHE_SPEED then
  44. player.MoveSpeed = player.MoveSpeed + SaltWoman.SPEED
  45. end
  46. if cacheFlag == CacheFlag.CACHE_LUCK then
  47. player.Luck = player.Luck + SaltWoman.LUCK
  48. end
  49. if cacheFlag == CacheFlag.CACHE_FLYING and SaltWoman.FLYING then
  50. player.CanFly = true
  51. end
  52. if cacheFlag == CacheFlag.CACHE_TEARFLAG then
  53. player.TearFlags = player.TearFlags | SaltWoman.TEARFLAG
  54. end
  55. if cacheFlag == CacheFlag.CACHE_TEARCOLOR then
  56. player.TearColor = SaltWoman.TEARCOLOR
  57. end
  58. end
  59. end
  60. Mod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, Mod.onCache)
Advertisement
Add Comment
Please, Sign In to add comment