Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Actors/admonitor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ local sprite_jump_peak = Sprite.new("AdmonitorJumpPeak", path.combine(SPRITE_PAT
local sprite_fall = Sprite.new("AdmonitorFall", path.combine(SPRITE_PATH, "fall.png"), 1, 26, 33)
local sprite_death = Sprite.new("AdmonitorDeath", path.combine(SPRITE_PATH, "death.png"), 14, 33, 53)
local sprite_shoot1 = Sprite.new("AdmonitorShoot1", path.combine(SPRITE_PATH, "shoot1.png"), 30, 53, 86)
local sprite_ping = Sprite.new("AdmonitorPing", path.combine(SPRITE_PATH, "ping.png"), 1, 16, 18)

GM.elite_generate_palettes(sprite_palette)

Expand Down Expand Up @@ -70,6 +71,7 @@ Callback.add(puncher.on_create, function(actor)
actor.sprite_jump_peak = sprite_jump_peak
actor.sprite_fall = sprite_fall
actor.sprite_death = sprite_death
actor.sprite_ping = sprite_ping

actor.can_jump = true

Expand Down
2 changes: 2 additions & 0 deletions Actors/exploder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ local sprite_jump_peak = Sprite.new("ExploderJumpPeak", path.combine(SPRITE_PATH
local sprite_fall = Sprite.new("ExploderFall", path.combine(SPRITE_PATH, "fall.png"), 1, 24, 16)
local sprite_death = Sprite.new("ExploderDeath", path.combine(SPRITE_PATH, "death.png"), 7, 24, 33)
local sprite_shoot1 = Sprite.new("ExploderShoot1", path.combine(SPRITE_PATH, "shoot1.png"), 20, 32, 55)
local sprite_ping = Sprite.new("ExploderPing", path.combine(SPRITE_PATH, "ping.png"), 1, 12, 10)

GM.elite_generate_palettes(sprite_palette)

Expand Down Expand Up @@ -47,6 +48,7 @@ Callback.add(exploder.on_create, function(actor)
actor.sprite_jump_peak = sprite_jump_peak
actor.sprite_fall = sprite_fall
actor.sprite_death = sprite_death
actor.sprite_ping = sprite_ping

actor.can_jump = true

Expand Down
3 changes: 3 additions & 0 deletions Actors/mimic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ local sprite_portrait = Sprite.new("MimicPortrait", path.combine(SPRITE_PATH,
local sprite_inactive_idle = Sprite.new("MimicInactiveIdle", path.combine(SPRITE_PATH, "inactiveIdle.png"), 14, 30, 38)
local sprite_activate = Sprite.new("MimicActivate", path.combine(SPRITE_PATH, "spawn.png"), 18, 30, 60)
local sprite_vacuum = Sprite.new("MimicVacuumFX", path.combine(SPRITE_PATH, "vacuumParticle.png"), 4, 4, 4)
local sprite_ping = Sprite.new("MimicPing", path.combine(SPRITE_PATH, "ping.png"), 1, 14, 19)

local sound_spawn = Sound.new("MimicSpawn", path.combine(SOUND_PATH, "spawn.ogg"))
local sound_hit = Sound.new("MimicHit", path.combine(SOUND_PATH, "hit.ogg"))
Expand Down Expand Up @@ -172,6 +173,7 @@ Callback.add(mimic.on_create, function(actor)
actor.sprite_jump_peak = sprite_jump_peak
actor.sprite_fall = sprite_fall
actor.sprite_death = sprite_death
actor.sprite_ping = sprite_ping

actor.can_jump = true
actor.leap_max_distance = 3
Expand Down Expand Up @@ -431,6 +433,7 @@ mimicInactive:set_depth(90)

Callback.add(mimicInactive.on_create, function(self)
GM.interactable_init_cost(self, 0, 50)
self.sprite_ping = gm.constants.sPing_Chest2
self:interactable_init_name()
end)

Expand Down
10 changes: 10 additions & 0 deletions Artifacts/displacement.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
-- this one is kinda hard so ill try to explain literally everything lmao
-- ill be refering to the stage number as its "tier" here. for example, without the artifact of displacement active dried lake is tier 1, magma barracks is tier 4, temple of the elders is 5, risk of rain is 6, etc
-- ill be refering to the stage itself as "environment" or "env"

-- die
if HOTLOADING then return end
if Settings.enable_beta == false then return end -- only enable if beta is enabled

local loadout = Sprite.new("ArtifactOfDisplacementLoadout", path.combine(PATH, "Sprites/Artifacts/Displacement/loadout.png"), 3, 19, 19)
local pickup = Sprite.new("ArtifactOfDisplacementPickup", path.combine(PATH, "Sprites/Artifacts/Displacement/pickup.png"), 1, 20, 20)

Expand All @@ -13,10 +18,13 @@ local potentialEnvs = List.new() -- this is where we will put environments that
local validEnvs = List.new() -- this is where we will put all valid environments (no boar beach cuz its a secret and no risk of rain cuz its a final environment for example)

local hook = Hook.add_post(gm.constants.stage_roll_next, function(self, other, result, args)
print("hi")
if not displacement.active then return end

validEnvs:clear()

print("hi2")

for i = 1, 4 do -- go through 4 tiers of stages, we exclude tier 6 because we dont want to randomly go to risk of rain, and we exclude tier 5 stages because artifact of tempus can easily be cheesed if temple of the elders is chosen as one of the first stages (it also breaks the onstep code of the artifact's object for some reason? no clue why)
local envs = List.wrap(gm._mod_stage_get_pool_list(i)) -- get all environments in a tier
for _, env in ipairs(envs) do
Expand All @@ -41,6 +49,8 @@ local hook = Hook.add_post(gm.constants.stage_roll_next, function(self, other, r
local randomEnv = math.random(1, #potentialEnvs) -- pick a random environment from list of potential environments
local upcomingEnv = potentialEnvs[randomEnv] -- set the next environment to the one picked above

print(upcomingEnv)

result.value = upcomingEnv -- make the script transport you to the upcoming environment instead of the usual one

-- delete the selected environment from the list of potential ones so we dont encounter it again
Expand Down
4 changes: 4 additions & 0 deletions Artifacts/gathering.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
-- btw this should prolly be redone a bit to account for nucleus gems when that gets added
-- also also also thanks to onyx (0n_x) for optimizing this mess of an artifact! ! ! ! should be way less laggier now

-- die
if HOTLOADING then return end
if Settings.enable_beta == false then return end -- only enable if beta is enabled

local loadout = Sprite.new("ArtifactOfGatheringLoadout", path.combine(PATH, "Sprites/Artifacts/Gathering/loadout.png"), 3, 19, 19)
local pickup = Sprite.new("ArtifactOfGatheringPickup", path.combine(PATH, "Sprites/Artifacts/Gathering/pickup.png"), 1, 20, 20)

Expand Down
6 changes: 6 additions & 0 deletions Artifacts/multitude.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
-- artifact!!!! makes many enemy but weak enemy!!!
-- i tried commenting about everything you could get confused about

-- this is azuline from a year later

-- die
if HOTLOADING then return end
if Settings.enable_beta == false then return end -- only enable if beta is enabled

local loadout = Sprite.new("ArtifactOfMultitudeLoadout", path.combine(PATH, "Sprites/Artifacts/Multitude/loadout.png"), 3, 19, 19)
local pickup = Sprite.new("ArtifactOfMultitudePickup", path.combine(PATH, "Sprites/Artifacts/Multitude/pickup.png"), 1, 20, 20)

Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# SSR Changelog *spoilers below!!*

## 0.1.8
- Put Technician and all Artifacts behind "Unfinished Content" toggle in the settings due to their instability.
- Added skins back!
- Added ping functionality to all enemies.
- Updated Nemesis Mercenary's CSS sprite
- Added a Korean translation (pixelvoxel)
- Added a Chinese translation (Eskevor)
- Resprited Executioner's CSS sprite
- Updated to the last ReturnsAPI version
- Fixed many bugs.
- Crowned Denizu.

## 0.1.7
- Mod ported to ReturnsAPI
- Disabled skins (ReturnsAPI does not support them as of yet)
Expand Down
2 changes: 1 addition & 1 deletion Elites/empyrean.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local sound_teleport1 = Sound.new("EmpyreanTeleport1", path.combine(SOUND_PATH,
local sound_teleport2 = Sound.new("EmpyreanTeleport2", path.combine(SOUND_PATH, "teleport2.ogg"))
local sound_teleport3 = Sound.new("EmpyreanTeleport3", path.combine(SOUND_PATH, "teleport3.ogg"))

local empy = ssr_create_elite("empyrean")
local empy = Elite.new("empyrean")
empy.healthbar_icon = sprite_icon
empy.palette = gm.constants.sElitePaletteDummy
empy.blend_col = Color.WHITE
Expand Down
2 changes: 1 addition & 1 deletion Elites/poison.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local sprite_palette = Sprite.new("ElitePalettePoison", path.combine(SPRITE_PATH
local sound_poison_cloud = Sound.new("PoisonCloud", path.combine(SOUND_PATH, "poisonCloud.ogg"))
local sound_poison_inflict = Sound.new("PoisonInflict", path.combine(SOUND_PATH, "poisonInflict.ogg"))

local elitePoison = ssr_create_elite("poison")
local elitePoison = Elite.new("poison")
elitePoison.healthbar_icon = sprite_icon
elitePoison.palette = sprite_palette
elitePoison.blend_col = Color.PURPLE
Expand Down
2 changes: 1 addition & 1 deletion Gameplay/nemesis_spawn_portal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ end)
Callback.add(Callback.ON_STAGE_START, function()
if GM._mod_game_getDirector().stages_passed > 0 then return end
if Global.__gamemode_current >= 2 then return end
if Net.online then return end
if Global.coop > 0 then return end

if Instance.find(gm.constants.oP).is_nemesis then
local pod = Instance.find(gm.constants.oBase)
Expand Down
2 changes: 2 additions & 0 deletions Interactables/chirrsmas_present.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local sprite = Sprite.new("ChirrsmasPresent", path.combine(PATH, "Sprites/Interactables/ChirrsmasPresent/present.png"), 13, 41, 112)
local sprite_ping = Sprite.new("ChirrsmasPresentPing", path.combine(PATH, "Sprites/Interactables/ChirrsmasPresent/ping.png"), 1, 17, 17)

local firework = Object.new("ChirrsmasPresentFirework")
firework:set_sprite(gm.constants.sEFFirework)
Expand Down Expand Up @@ -45,6 +46,7 @@ present:set_depth(90)
Callback.add(present.on_create, function(self)
self:interactable_init()
self.mask_index = gm.constants.sChest1
self.sprite_ping = sprite_ping
self:interactable_init_name()
end)

Expand Down
5 changes: 4 additions & 1 deletion Items/balloon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ Callback.add(Callback.ON_STEP, function()
local b = data.balloons[i]

local tx = actor.ghost_x
local ty = actor.ghost_y-50
local ty = actor.y - 50
if actor.ghost_y then
ty = actor.ghost_y - 50
end

local ang = math.floor(i * 0.5) * GOLDEN_RATIO
local mag = math.sqrt(ang) * 1.8
Expand Down
79 changes: 79 additions & 0 deletions Items/denizuCrown.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
local sprite = Sprite.new("DenizuCrown", path.combine(PATH, "Sprites/Items/denizuCrown.png"), 1, 16, 16)
local effect = Sprite.new("DenizuCrownEffect", path.combine(PATH, "Sprites/Items/Effects/denizuCrown.png"), 1, 4, 6)

local crown = Item.new("denizuCrown")
crown:set_sprite(sprite)
crown:set_tier(ItemTier.SPECIAL)
crown.loot_tags = 0

local part_ice = Particle.new("denizuCrown")
part_ice:set_sprite(gm.constants.sEFIceCrystal, false, false, true)
part_ice:set_life(5, 10)
part_ice:set_alpha2(0.35, 0)
part_ice:set_scale(0.5, 0.5)

Callback.add(Callback.ON_STEP, function()
for _, actor in ipairs(crown:get_holding_actors()) do
if Instance.exists(actor) then
local data = Instance.get_data(actor)

if not data.crystal_time then
data.crystal_time = 0
elseif data.crystal_time < 78 then
data.crystal_time = data.crystal_time + 1
else
data.crystal_time = -78
end

data.global_time = Global._current_frame

local yy = actor.y
if actor.sprite_idle then
yy = yy - gm.sprite_get_height(actor.sprite_idle) * 1.33
else
yy = yy - 20
end

yy = yy - math.sin(data.global_time * 0.02) * 5

if data.global_time % 3 == 0 then
part_ice:set_orientation(math.sin(data.crystal_time * 0.02) * -15, math.sin(data.crystal_time * 0.02) * -15, 0, 0, false)
part_ice:create(actor.x - math.sin(data.crystal_time * 0.02) * 15, yy + 10 + math.cos((data.crystal_time + 156) / 50) * -3, 1, Particle.System.MIDDLE)
part_ice:set_orientation(math.sin(data.crystal_time * 0.02) * 15, math.sin(data.crystal_time * 0.02) * 15, 0, 0, false)
part_ice:create(actor.x + math.sin(data.crystal_time * 0.02) * 15, yy + 10 + math.cos((data.crystal_time + 156) / 50) * 3, 1, Particle.System.MIDDLE)
end
end
end
end)

crown.effect_display = EffectDisplay.func(function(actor_unwrapped)
local actor = Instance.wrap(actor_unwrapped)
local crystal_time = Instance.get_data(actor).crystal_time
local global_time = Instance.get_data(actor).global_time

local yy = actor.y
if actor.sprite_idle then
yy = yy - gm.sprite_get_height(actor.sprite_idle) * 1.33
else
yy = yy - 20
end

yy = yy - math.sin(global_time * 0.02) * 5

GM.draw_sprite_ext(gm.constants.sEFIceCrystal, 0, actor.x - math.sin(crystal_time * 0.02) * 15, yy + 10 + math.cos((crystal_time + 156) / 50) * -3, 0.5, 0.5, math.sin(crystal_time * 0.02) * -15, Color.WHITE, 0.80 + math.sin(global_time * 0.02) * -0.2)
GM.draw_sprite_ext(effect, 0, actor.x, yy, 1, 1, 0, Color.WHITE, 0.75 + math.sin(global_time * 0.02) * 0.1)
GM.draw_sprite_ext(gm.constants.sEFIceCrystal, 0, actor.x + math.sin(crystal_time * 0.02) * 15, yy + 10 + math.cos((crystal_time + 156) / 50) * 3, -0.5, 0.5, math.sin(crystal_time * 0.02) * -15, Color.WHITE, 0.80 + math.sin(global_time * 0.02) * -0.2)
end, EffectDisplay.DrawPriority.BODY_POST)

Callback.add(Callback.ON_STAGE_START, function()
for _, actor in ipairs(Instance.find_all(gm.constants.oP)) do
if actor:item_count(crown) <= 0 then
if (actor.user_name == "-" or actor.user_name_string_escaped == "-") or
(actor.user_name == "_" or actor.user_name_string_escaped == "_") or
(actor.user_name == "Denizu" or actor.user_name_string_escaped == "Denizu") or
(actor.user_name == "denizu" or actor.user_name_string_escaped == "denizu") then
actor:item_give(crown)
end
end
end
end)
44 changes: 23 additions & 21 deletions Items/dormantFungus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,32 @@ ItemLog.new_from_item(dungus)

Callback.add(Callback.ON_STEP, function()
for _, actor in ipairs(dungus:get_holding_actors()) do
if Instance.exists(actor) then
local stack = actor:item_count(dungus)

if (math.abs(actor.pHspeed) >= actor.pHmax * 0.98) or actor.pVspeed ~= 0 then
local data = Instance.get_data(actor)
if actor.pHspeed then
if Instance.exists(actor) then
local stack = actor:item_count(dungus)

if (math.abs(actor.pHspeed) >= actor.pHmax * 0.98) or actor.pVspeed ~= 0 then
local data = Instance.get_data(actor)

if not data.dungusTimer then
data.dungusTimer = 120
end
if data.dungusTimer <= 0 then
data.dungusTimer = 120

if Net.host then
actor:heal(math.ceil(actor.maxhp * (1 - 1 / (0.02 * stack + 1))))
if not data.dungusTimer then
data.dungusTimer = 120
end

actor:sound_play(sound, 1, 0.9 + math.random() * 0.2)

-- copied and pasted from uranium horseshoe basically
if actor:is_grounded() then
ssr_create_fadeout(actor.x, actor.bbox_bottom + 1, 1, sprite_footstep, 0.25, 0.05)
if data.dungusTimer <= 0 then
data.dungusTimer = 120

if Net.host then
actor:heal(math.ceil(actor.maxhp * (1 - 1 / (0.02 * stack + 1))))
end

actor:sound_play(sound, 1, 0.9 + math.random() * 0.2)

-- copied and pasted from uranium horseshoe basically
if actor:is_grounded() then
ssr_create_fadeout(actor.x, actor.bbox_bottom + 1, 1, sprite_footstep, 0.25, 0.05)
end
else
data.dungusTimer = data.dungusTimer - 1
end
else
data.dungusTimer = data.dungusTimer - 1
end
end
end
Expand Down
22 changes: 14 additions & 8 deletions Items/eclipseGummies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ buff.icon_sprite = sprite_buff
buff.icon_stack_subimage = true
buff.max_stack = 10
buff.is_timed = true

Callback.add(buff.on_apply, function(actor)
if actor:buff_count(buff) < 9 then
actor:sound_play(sound_buff.value, 3, 1 + 0.05 * actor:buff_count(buff))
else
actor:sound_play(sound_buff_max.value, 3, 1)
end
end)

RecalculateStats.add(function(actor, api)
local stack = actor:buff_count(buff)
Expand Down Expand Up @@ -154,6 +146,13 @@ Callback.add(obj_gummy.on_step, function(self)

Instance.get_data(actor).gummy_stack_strength = data.stack
actor:buff_apply(buff, 10 * 60)

if actor:buff_count(buff) < 9 then
actor:sound_play(sound_buff.value, 3, 1 + 0.05 * actor:buff_count(buff))
else
actor:sound_play(sound_buff_max.value, 3, 1)
end

self:destroy()
self:instance_destroy_sync()
end
Expand All @@ -169,6 +168,13 @@ Callback.add(obj_gummy.on_step, function(self)

Instance.get_data(actor).gummy_stack_strength = data.stack
actor:buff_apply(buff, 10 * 60)

if actor:buff_count(buff) < 9 then
actor:sound_play(sound_buff.value, 3, 1 + 0.05 * actor:buff_count(buff))
else
actor:sound_play(sound_buff_max.value, 3, 1)
end

self:destroy()
self:instance_destroy_sync()
end
Expand Down
12 changes: 10 additions & 2 deletions Items/iceTool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ local deserializer = function(buffer, self)

actor.pHspeed = -actor.pHmax * collision_dir
actor.image_xscale = -collision_dir

data.iceTool_jumps = data.iceTool_jumps - 1

if not data.iceTool_jumps then
data.iceTool_jumps = 0
else
data.iceTool_jumps = data.iceTool_jumps - 1
end

if actor:buff_count(buffIceTool) > 0 then
GM.set_buff_time_nosync(actor, buffIceTool, 30)
Expand Down Expand Up @@ -77,6 +81,10 @@ Callback.add(Callback.ON_STEP, function()
collision_dir = 1
end

if not data.iceTool_jumps then
data.iceTool_jumps = 0
end

local can_do_it = not actor:is_grounded() and collision_dir ~= 0 and data.iceTool_jumps > 0 and not actor:is_climbing()

-- do some dumb jank to make ice tool take precedence over hopoo feather
Expand Down
2 changes: 1 addition & 1 deletion Items/roulette.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Callback.add(rouletteObject.on_step, function(self)
self.image_index = self.buff_index
self.vspeed = -0.1

if Net.host and self.parent:item_count(roulette) > 0 then
if Net.host and Instance.exists(self.parent) and self.parent:item_count(roulette) > 0 then
roulette_clear_buffs(self.parent)

local new_buff = roulette_buffs[self.buff_index]
Expand Down
Loading
Loading