Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Rock = RegisterMod("Rock", 1)
- local game = Game()
- local forgotten = false
- local soul = false
- local costume = false
- local ChangeTear = 0
- local timer = 0
- local RockSplosion = nil
- local bloodRock = nil
- bombtimer = 0
- bombtimercheck = 0
- epictimer = 0
- epictimercheck = 0
- Rock.ROCK = Isaac.GetItemIdByName("Silicosis")
- Rock.COSTUME_ROCK = Isaac.GetCostumeIdByPath("gfx/characters/silicosis_costume.anm2")
- Rock.FORGOTTENROCK = Isaac.GetCostumeIdByPath("gfx/characters/forgottenrock_costume.anm2")
- Rock.SOULROCK = Isaac.GetCostumeIdByPath("gfx/characters/soulrock_costume.anm2")
- function Rock:onCache(player, cacheFlag)
- if player:HasCollectible(Rock.ROCK) then
- if forgotten == false then
- if player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN then
- player:TryRemoveNullCostume(Rock.SOULROCK)
- player:AddNullCostume(Rock.FORGOTTENROCK)
- forgotten = true
- soul = false
- costume = true
- end
- end
- if soul == false then
- if player:GetPlayerType() == PlayerType.PLAYER_THESOUL then
- player:TryRemoveNullCostume(Rock.FORGOTTENROCK)
- player:AddNullCostume(Rock.SOULROCK)
- forgotten = false
- soul = true
- costume = true
- end
- end
- if costume == false then
- if player:GetPlayerType() == PlayerType.PLAYER_THESOUL == false and player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN == false then
- player:AddNullCostume(Rock.COSTUME_ROCK)
- costume = true
- end
- end
- end
- if cacheFlag == CacheFlag.CACHE_FIREDELAY then
- if player:HasCollectible(Rock.ROCK) and player:HasCollectible(531) == false and player:HasCollectible(118) == false and player:HasCollectible(2) == false
- and player:HasCollectible(153) == false and player:HasCollectible(149) == false and player:HasCollectible(229) == false and player:HasCollectible(52) == false
- and player:HasCollectible(169) == false and player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN == false then
- player.MaxFireDelay = math.floor(player.MaxFireDelay * 3.5 + 5)
- else
- if player:HasCollectible(Rock.ROCK) and player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN == false then
- player.MaxFireDelay = math.floor(player.MaxFireDelay * 1.2 + 25)
- end
- end
- if player:HasCollectible(114) and player:HasCollectible(Rock.ROCK) and player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN == false then
- player.MaxFireDelay = math.floor(player.MaxFireDelay * 0.7)
- end
- if player:HasCollectible(330) and player:HasCollectible(Rock.ROCK) and player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN == false then
- player.MaxFireDelay = math.floor(player.MaxFireDelay * 0.8)
- end
- end
- if cacheFlag == CacheFlag.CACHE_DAMAGE and player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN == false then
- if player:HasCollectible(Rock.ROCK) then
- if ChangeTear == 0 then
- ChangeTear = game:GetFrameCount()
- end
- if player:HasCollectible(330) then
- player.Damage = player.Damage * 1.25
- else
- player.Damage = player.Damage * 2.2 - 0.5
- if player.Damage <= 1.2 then
- player.Damage = 1.2
- end
- end
- if player.Damage == 3.50 then
- player.Damage = 3.5001
- end
- end
- end
- if cacheFlag == CacheFlag.CACHE_TEARCOLOR then
- if player:HasCollectible(Rock.ROCK) and player:HasCollectible(3) == false and player:HasCollectible(531) == false then
- player.TearColor = Color(0.5, 0.5, 0.5, 1, 0, 0, 0)
- player.LaserColor = Color(0, 1, 1, 1, 80, 80, 80)
- end
- end
- if cacheFlag == CacheFlag.CACHE_RANGE and player:HasCollectible(Rock.ROCK) then
- if player:HasCollectible(531) == false and player:HasCollectible(149) == false
- and player:HasCollectible(229) == false and player:HasCollectible(540) == false then
- player.TearFallingSpeed = player.TearFallingSpeed + 8
- player.TearFallingAcceleration = player.TearFallingAcceleration + 0.20
- player.TearHeight = player.TearHeight + 5
- if player:HasCollectible(224) then
- player.TearHeight = player.TearHeight - 7.5
- end
- if player:HasCollectible(440) then
- player.TearHeight = player.TearHeight - 15
- end
- if player:HasCollectible(531) then
- player.TearFallingSpeed = player.TearFallingSpeed + 20
- player.TearFallingAcceleration = player.TearFallingAcceleration - 0.50
- end
- end
- if player:HasCollectible(229) then
- player.TearFallingSpeed = player.TearFallingSpeed - 6.5
- end
- end
- if cacheFlag == CacheFlag.CACHE_SHOTSPEED and player:HasCollectible(Rock.ROCK) then
- player.ShotSpeed = player.ShotSpeed - 0.20
- end
- if cacheFlag == CacheFlag.CACHE_TEARFLAG and player:HasCollectible(52) == false then
- if player:HasCollectible(Rock.ROCK) then
- player.TearFlags = player.TearFlags | TearFlags.TEAR_PIERCING
- end
- end
- end
- Rock:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, Rock.onCache)
- function Rock:Spawner(player, cacheFlag)
- if player:HasCollectible(Rock.ROCK) then
- for _, entity in pairs(Isaac.GetRoomEntities()) do
- if entity.Type == EntityType.ENTITY_LASER and entity.SubType == 2 and player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN == false then
- if entity.FrameCount % 7 == 0 and entity.FrameCount >= 14 then
- Xrock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, entity.Position, Vector(0,0), player):ToEffect()
- Xrock:SetTimeout(3)
- Xrock:SetRadii(5.0, 5.0)
- end
- end
- if entity.Type == EntityType.ENTITY_EFFECT and entity.Variant == EffectVariant.BRIMSTONE_BALL then
- if entity:IsDead() == false and entity.FrameCount % 4 == 0 and entity.FrameCount >= 8 then
- local RockX = math.random(math.floor(-entity:ToEffect().SpriteScale.X * 15), math.floor(entity:ToEffect().SpriteScale.X * 30))
- local RockY = math.random(math.floor(-entity:ToEffect().SpriteScale.X * 15), math.floor(entity:ToEffect().SpriteScale.X * 30))
- bloodRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, entity.Position + Vector(RockX, RockY), Vector(0,0), player):ToEffect()
- bloodRock:SetTimeout(3)
- bloodRock:SetRadii(5.0, 5.0)
- end
- end
- if entity.Type == EntityType.ENTITY_TEAR and entity.Variant ~= TearVariant.CHAOS_CARD and entity.Variant ~= TearVariant.BOBS_HEAD and game:GetFrameCount() - entity.FrameCount >= ChangeTear then
- local Target = entity:ToTear()
- local MaxRad = math.floor(Target.CollisionDamage * 1.65)
- local MinRad = math.floor(Target.CollisionDamage * 0.75)
- if MaxRad >= 100 then
- MaxRad = 100
- end
- if MinRad >= 50 then
- MinRad = 50
- end
- if Target.SpawnerType == EntityType.ENTITY_PLAYER or Target.SpawnerVariant == FamiliarVariant.INCUBUS or Target.SpawnerVariant == FamiliarVariant.FATES_REWARD then
- if Target.FrameCount == 1 then
- Target.Height = Target.Height + math.random(-3,3)
- if player:HasCollectible(224) then
- Target.Height = Target.Height - 5
- end
- if player:HasCollectible(440) then
- Target.Height = Target.Height - 8
- end
- if Target.Variant == TearVariant.HUNGRY then
- Target.Velocity = Target.Velocity * 1.5
- end
- if Target.Variant ~= TearVariant.STONE and Target.Variant ~= TearVariant.BALLOON and Target.Variant ~= TearVariant.BALLOON_BRIMSTONE
- and Target.Variant ~= TearVariant.BALLOON_BOMB and Target.Variant ~= TearVariant.HUNGRY and Target.Variant ~= TearVariant.SCHYTHE
- and Target.Variant ~= TearVariant.FIRE_MIND and Target.Variant ~= TearVariant.MYSTERIOUS and Target.Variant ~= TearVariant.DARK_MATTER
- and Target.Variant ~= TearVariant.EGG and Target.Variant ~= TearVariant.BLACK_TOOTH and Target.Variant ~= TearVariant.NEEDLE
- and Target.Variant ~= TearVariant.TOOTH then
- local tearsprite = Target:GetSprite()
- tearsprite:Load("gfx/animations/effects/smoothrock.anm2", true)
- local sprite_size = math.floor(Target.CollisionDamage / 6 + 1 + Target.Scale / 1.4) -- 123467 (Damage progression in .anm2 file)
- if sprite_size > 7 then
- sprite_size = 7
- end
- if sprite_size == 5 then
- sprite_size = 4
- end
- if player:HasCollectible(329) then
- sprite_size = 6
- end
- tearsprite:Play("Rock"..sprite_size.."Roll")
- tearsprite:LoadGraphics()
- end
- if Target.Variant == TearVariant.FIRE_MIND or Target.Variant == TearVariant.MYSTERIOUS or Target.Variant == TearVariant.DARK_MATTER then
- Target.Scale = Target.Scale * 1.25
- end
- end
- if Target.Velocity.X >= 0.15 or Target.Velocity.X <= -0.15 or Target.Velocity.Y >= 0.15 or Target.Velocity.Y <= -0.15 or player:HasCollectible(329) then
- if (Target.Height >= -5 or Target:CollidesWithGrid()) then
- if player:HasCollectible(531) == false
- and player:HasCollectible(229) == false
- and player:HasCollectible(2) == false
- and player:HasCollectible(153) == false
- and player:HasCollectible(224) == false
- and player:HasCollectible(169) == false
- and player:HasCollectible(533) == false
- and player:HasCollectible(104) == false
- and player:HasCollectible(531) == false
- and player:HasCollectible(453) == false
- and player:HasCollectible(532) == false
- and player:HasCollectible(358) == false
- and player:HasCollectible(330) == false
- and player:HasCollectible(329) == false
- and player:HasCollectible(540) == false then
- reload = game:GetFrameCount()
- if reload >= timer + 2 then
- RockSplosion = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, Target.Position, Vector(0,0), player):ToEffect()
- RockSplosion:SetTimeout(3)
- RockSplosion:SetRadii(40.0 + MaxRad, 40.0 + MaxRad)
- timer = game:GetFrameCount()
- Target:Die()
- end
- end
- if (Target.Height >= -5 or Target:CollidesWithGrid()) then
- if player:HasCollectible(330) == false and player:HasCollectible(229) == false and player:HasCollectible(532) == false
- or player:HasCollectible(330) and player:HasCollectible(540) and math.random(3) == 1 and player:HasCollectible(229) == false
- or player:HasCollectible(229) and player:HasCollectible(540) and math.random(16) == 1 and player:HasCollectible(330) == false
- or player:HasCollectible(229) and player:HasCollectible(540) and player:HasCollectible(330) and math.random(20) == 1 then
- if player:HasCollectible(2)
- or player:HasCollectible(531)
- or player:HasCollectible(153)
- or player:HasCollectible(224)
- or player:HasCollectible(104)
- or player:HasCollectible(453)
- or player:HasCollectible(358)
- or player:HasCollectible(329)
- or player:HasCollectible(540) and Target.Position:Distance(player.Position) >= 75 then
- reload = game:GetFrameCount()
- if player:HasCollectible(329) then
- if Target.Position:Distance(player.Position) >= 100 then
- if player:HasCollectible(169) and reload >= timer + 2 then
- if player:HasCollectible(315) then
- RockSplosion = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, Target.Position, Vector(0,0), player):ToEffect()
- RockSplosion:SetTimeout(5)
- RockSplosion:SetRadii(50.0 + MaxRad, 20.0 + MinRad)
- timer = game:GetFrameCount()
- Target:Die()
- else
- RockSplosion = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, Target.Position, Vector(0,0), player):ToEffect()
- RockSplosion:SetTimeout(5)
- RockSplosion:SetRadii(20.0 + MinRad, 60.0 + MaxRad)
- timer = game:GetFrameCount()
- Target:Die()
- end
- elseif reload >= timer + 2 then
- RockSplosion = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, Target.Position, Vector(0,0), player):ToEffect()
- RockSplosion:SetTimeout(1)
- RockSplosion:SetRadii(25.0 + MaxRad, 25.0 + MaxRad)
- timer = game:GetFrameCount()
- Target:Die()
- end
- end
- elseif player:HasCollectible(169) and reload >= timer + 2 then
- if player:HasCollectible(315) then
- RockSplosion = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, Target.Position, Vector(0,0), player):ToEffect()
- RockSplosion:SetTimeout(5)
- RockSplosion:SetRadii(50.0 + MaxRad, 20.0 + MinRad)
- timer = game:GetFrameCount()
- Target:Die()
- else
- RockSplosion = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, Target.Position, Vector(0,0), player):ToEffect()
- RockSplosion:SetTimeout(5)
- RockSplosion:SetRadii(20.0 + MinRad, 50.0 + MaxRad)
- timer = game:GetFrameCount()
- Target:Die()
- end
- elseif reload >= timer + 2 then
- RockSplosion = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, Target.Position, Vector(0,0), player):ToEffect()
- RockSplosion:SetTimeout(1)
- RockSplosion:SetRadii(25.0 + MaxRad, 25.0 + MaxRad)
- timer = game:GetFrameCount()
- Target:Die()
- end
- end
- end
- end
- if (Target.Height >= -5 or Target:CollidesWithGrid()) then
- if player:HasCollectible(169) and player:HasCollectible(330) == false and player:HasCollectible(229) == false and player:HasCollectible(540) == false then
- reload = game:GetFrameCount()
- if reload >= timer + 2 then
- if player:HasCollectible(315) then
- RockSplosion = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, Target.Position, Vector(0,0), player):ToEffect()
- RockSplosion:SetTimeout(5)
- RockSplosion:SetRadii(70.0 + MaxRad, 30.0 + MinRad)
- timer = game:GetFrameCount()
- game:ShakeScreen(10)
- Target:Die()
- else
- RockSplosion = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 0, Target.Position, Vector(0,0), player):ToEffect()
- RockSplosion:SetTimeout(5)
- RockSplosion:SetRadii(30.0 + MinRad, 70.0 + MaxRad)
- timer = game:GetFrameCount()
- game:ShakeScreen(10)
- Target:Die()
- end
- end
- end
- end
- if Target.Height >= -7 and player:HasCollectible(540) then
- Target.Velocity = Target.Velocity + Vector(math.random(-1, 1), math.random(-1, 1))
- Target.Height = Target.Height - math.random(0, 4)
- end
- end
- local soyBonus = math.floor(Target.CollisionDamage * 15)
- if soyBonus >= 40 then
- soyBonus = 40
- end
- if Target.Variant == TearVariant.HUNGRY then
- if Target.FrameCount % 10 == 0 and Target.FrameCount > 6 and player:HasCollectible(229) == false and player:HasCollectible(330) == false then
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0)
- trailRock:SetTimeout(3)
- end
- else
- if Target.FrameCount % 6 == 0 and Target.FrameCount > 6 and player:HasCollectible(229) == false and player:HasCollectible(330) == false then
- if player:HasCollectible(329) then
- if Target.Position:Distance(player.Position) >= 100 and Target.FrameCount % 12 == 0 then
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0)
- trailRock:SetTimeout(3)
- end
- elseif player:HasCollectible(540) == false then
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0)-- Soy milk excluded, montros lung excluded, flat stone excluded, Ludo and Normal not excluded
- trailRock:SetTimeout(3)
- end
- end
- end
- if Target.FrameCount % 5 == 0 and Target.FrameCount >= 5 and player:HasCollectible(229) == false and player:HasCollectible(330) and player:HasCollectible(329) then
- if player:HasCollectible(329) then
- if Target.Position:Distance(player.Position) >= 100 and Target.FrameCount % 10 == 0 then
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0)
- trailRock:SetTimeout(3)
- end
- else
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0) -- Lung excluded, Soy milk required, ludo required
- trailRock:SetTimeout(3)
- end
- end
- if Target.Variant == TearVariant.HUNGRY then
- if Target.FrameCount % 10 == 0 and Target.FrameCount > 6 and player:HasCollectible(229) and math.random(60 - soyBonus) <= 10 then
- if player:HasCollectible(330) == false and player:HasCollectible(329) == false then
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0) -- lung required, soy milk excluded, ludo excluded
- trailRock:SetTimeout(3)
- end
- end
- else
- if Target.FrameCount % 6 == 0 and Target.FrameCount > 6 and player:HasCollectible(229) and math.random(80 - soyBonus) <= 10 and player:HasCollectible(540) == false then
- if player:HasCollectible(330) == false and player:HasCollectible(329) == false then
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0) -- lung required, soy milk excluded, ludo excluded, flat stone excluded
- trailRock:SetTimeout(3)
- end
- end
- end
- if Target.Variant == TearVariant.HUNGRY then
- if Target.FrameCount % 12 == 0 and Target.FrameCount > 6 and player:HasCollectible(229) and math.random(60 - soyBonus) <= 10 then
- if player:HasCollectible(330) or player:HasCollectible(329) then
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0)
- trailRock:SetTimeout(3)
- end
- end
- else
- if Target.FrameCount % 6 == 0 and Target.FrameCount > 6 and player:HasCollectible(229) and math.random(60 - soyBonus) <= 10 then
- if player:HasCollectible(330) or player:HasCollectible(329) then
- if player:HasCollectible(329) then
- if Target.Position:Distance(player.Position) >= 100 then
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0)
- trailRock:SetTimeout(3)
- end
- else
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0) -- lung required, soy milk OR ludo required
- trailRock:SetTimeout(3)
- end
- end
- end
- end
- if Target.FrameCount % 10 == 0 and Target.FrameCount > 6 and player:HasCollectible(330) and math.random(50 - soyBonus) <= 10 and player:HasCollectible(329) == false and player:HasCollectible(229) == false then
- if player:HasCollectible(540) == false or player:HasCollectible(540) and player:HasCollectible(532) then
- trailRock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Target.Position, Vector(0,0), player):ToEffect()
- trailRock:SetRadii(5.0, 5.0)
- trailRock:SetTimeout(3)
- end
- end
- end
- end
- end
- if entity.Type == EntityType.ENTITY_KNIFE then -- mom's knife synergy - Knives should only exist if player has mom's knife
- local Knife = entity:ToKnife() -- new variable for knife position
- if Knife.FrameCount % 4 == 0 and Knife:GetKnifeDistance() >= 75 then
- KnifeShock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Knife.Position, Vector(0,0), player):ToEffect()
- KnifeShock:SetRadii(5.0, 5.0)
- KnifeShock:SetTimeout(3)
- end
- end
- bombtimercheck = game:GetFrameCount()
- if entity.Type == EntityType.ENTITY_BOMBDROP and entity:GetSprite():IsPlaying("Explode") and entity.Variant ~= BombVariant.BOMB_TROLL
- and entity.Variant ~= BombVariant.BOMB_SUPERTROLL and bombtimercheck >= bombtimer then
- Bomber = entity:ToBomb()
- if Bomber.IsFetus then
- if player:HasCollectible(315) and Bomber.Variant == BombVariant.BOMB_MR_MEGA then
- Bombsplode = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Bomber.Position, Vector(0,0), player):ToEffect()
- Bombsplode:SetRadii(60, 30)
- Bombsplode:SetTimeout(5)
- bombtimer = game:GetFrameCount() + 5
- game:ShakeScreen(10)
- else
- if Bomber.Variant == BombVariant.BOMB_MR_MEGA then
- Bombsplode = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Bomber.Position, Vector(0,0), player):ToEffect()
- Bombsplode:SetRadii(30, 60)
- Bombsplode:SetTimeout(5)
- bombtimer = game:GetFrameCount() + 5
- game:ShakeScreen(10)
- else
- Bombsplode = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Bomber.Position, Vector(0,0), player):ToEffect()
- Bombsplode:SetRadii(35, 35)
- Bombsplode:SetTimeout(3)
- bombtimer = game:GetFrameCount() + 5
- end
- end
- end
- end
- epictimercheck = game:GetFrameCount()
- if entity.Type == EntityType.ENTITY_EFFECT and entity.Variant == EffectVariant.ROCKET
- and epictimercheck >= epictimer and entity.FrameCount >= 10
- and player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN == false then
- if player:HasCollectible(106) or player:HasCollectible(169) then
- if player:HasCollectible(315) then
- Epicsplode = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, entity.Position, Vector(0,0), player):ToEffect()
- Epicsplode:SetRadii(60, 30)
- Epicsplode:SetTimeout(5)
- epictimer = game:GetFrameCount() + 10
- game:ShakeScreen(15)
- else
- Epicsplode = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, entity.Position, Vector(0,0), player):ToEffect()
- Epicsplode:SetRadii(30, 60)
- Epicsplode:SetTimeout(5)
- epictimer = game:GetFrameCount() + 10
- game:ShakeScreen(15)
- end
- else
- Epicsplode = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, entity.Position, Vector(0,0), player):ToEffect()
- Epicsplode:SetRadii(45, 45)
- Epicsplode:SetTimeout(3)
- epictimer = game:GetFrameCount() + 10
- end
- end
- if entity.Type == EntityType.ENTITY_EFFECT and entity.Variant == EffectVariant.TARGET
- and player:GetPlayerType() == PlayerType.PLAYER_THEFORGOTTEN and entity.FrameCount % 4 == 0
- and entity.FrameCount <= 50 and entity.FrameCount >= 10 then
- Epicsplode = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, entity.Position, Vector(0,0), player):ToEffect()
- Epicsplode:SetRadii(5, 5)
- Epicsplode:SetTimeout(3)
- end
- end
- end
- if player:HasCollectible(Rock.ROCK) == false and costume == true then
- forgotten = false
- soul = false
- costume = false
- ChangeTear = 0
- player:TryRemoveNullCostume(Rock.COSTUME_ROCK)
- player:TryRemoveNullCostume(Rock.SOULROCK)
- player:TryRemoveNullCostume(Rock.FORGOTTENROCK)
- bombtimer = 0
- bombtimercheck = 0
- epictimer = 0
- epictimercheck = 0
- reload = 0
- timer = 0
- end
- player:AddCacheFlags(CacheFlag.CACHE_DAMAGE)
- player:AddCacheFlags(CacheFlag.CACHE_FIREDELAY)
- player:AddCacheFlags(CacheFlag.CACHE_RANGE)
- player:EvaluateItems()
- end
- Rock:AddCallback(ModCallbacks.MC_POST_PEFFECT_UPDATE, Rock.Spawner)
- function Rock:Laser(entity, amt, flag, source, countdown)
- local player = game:GetPlayer(0)
- Cross = entity
- if player:HasCollectible(Rock.ROCK)then
- if Cross:IsVulnerableEnemy() then
- if amt == player.Damage then
- if flag == DamageFlag.DAMAGE_LASER then
- local BrimRad = math.floor(player.Damage * 1.65)
- if BrimRad >= 40 then
- BrimRad = 40
- end
- if (Cross.HitPoints - amt) <= 0 and math.random(4) == 1 then
- BrimShock = Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.SHOCKWAVE, 1, Cross.Position, Vector(0,0), player):ToEffect()
- BrimShock:SetRadii(50.0, 50.0 + BrimRad)
- BrimShock:SetTimeout(3)
- end
- end
- end
- if amt == 10 then
- if Cross:CanShutDoors() == false then
- return false
- end
- end
- end
- end
- end
- Rock:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, Rock.Laser)
- function Rock:Bomb(entity)
- local player = game:GetPlayer(0)
- if entity.FrameCount == 1 then
- if player:HasCollectible(Rock.ROCK) then
- if entity.Type == EntityType.ENTITY_BOMBDROP and entity.Variant ~= BombVariant.BOMB_TROLL
- and entity.Variant ~= BombVariant.BOMB_SUPERTROLL and entity.SpawnerType == EntityType.ENTITY_PLAYER then
- timeBomb = entity:ToBomb()
- if timeBomb.IsFetus then
- timeBomb:SetExplosionCountdown(40 + math.random(-3, 3))
- end
- end
- end
- end
- end
- Rock:AddCallback(ModCallbacks.MC_POST_BOMB_UPDATE, Rock.Bomb)
Advertisement
Add Comment
Please, Sign In to add comment