Skip to content
Open
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 mods/arena/arena-lighting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ local function on_level_init()
end
end

--[[
--- @param m MarioState
local function mario_update(m)
if gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_CITY then
Expand Down Expand Up @@ -43,4 +44,5 @@ local function mario_update(m)
end

hook_event(HOOK_MARIO_UPDATE, mario_update)
]]
hook_event(HOOK_ON_LEVEL_INIT, on_level_init)
43 changes: 42 additions & 1 deletion mods/arena/arena-player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ function mario_update(m)

-- update palette
if s.team == 1 then
-- restrict_palettes = true
--[[
network_player_set_override_palette_color(np, PANTS, { r = 225, g = 5, b = 49 })
network_player_set_override_palette_color(np, SHIRT, { r = 40, g = 10, b = 10 })
network_player_set_override_palette_color(np, GLOVES, network_player_get_palette_color(np, GLOVES))
Expand All @@ -453,7 +455,16 @@ function mario_update(m)
network_player_set_override_palette_color(np, SKIN, network_player_get_palette_color(np, SKIN))
network_player_set_override_palette_color(np, CAP, { r = 40, g = 10, b = 10 })
network_player_set_override_palette_color(np, EMBLEM, network_player_get_palette_color(np, EMBLEM))
]]
m.marioBodyState.shadeR = 255
m.marioBodyState.shadeG = 83
m.marioBodyState.shadeB = 29
m.marioBodyState.lightR = 255
m.marioBodyState.lightG = 255
m.marioBodyState.lightB = 255
elseif s.team == 2 then
-- restrict_palettes = true
--[[
network_player_set_override_palette_color(np, PANTS, { r = 63, g = 63, b = 255 })
network_player_set_override_palette_color(np, SHIRT, { r = 10, g = 10, b = 40 })
network_player_set_override_palette_color(np, GLOVES, network_player_get_palette_color(np, GLOVES))
Expand All @@ -462,8 +473,38 @@ function mario_update(m)
network_player_set_override_palette_color(np, SKIN, network_player_get_palette_color(np, SKIN))
network_player_set_override_palette_color(np, CAP, { r = 10, g = 10, b = 40 })
network_player_set_override_palette_color(np, EMBLEM, network_player_get_palette_color(np, EMBLEM))
]]
m.marioBodyState.shadeR = 0
m.marioBodyState.shadeG = 240
m.marioBodyState.shadeB = 255
m.marioBodyState.lightR = 255
m.marioBodyState.lightG = 255
m.marioBodyState.lightB = 255
else
network_player_reset_override_palette(np)
restrict_palettes = false
-- network_player_reset_override_palette(np)
if gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_CITY then
m.marioBodyState.lightR = 255
m.marioBodyState.lightG = 225
m.marioBodyState.lightB = 115
m.marioBodyState.shadeR = 19
m.marioBodyState.shadeG = 58
m.marioBodyState.shadeB = 212
elseif gNetworkPlayers[0].currLevelNum == LEVEL_ARENA_RAINBOW then
m.marioBodyState.lightR = 255
m.marioBodyState.lightG = 255
m.marioBodyState.lightB = 255
m.marioBodyState.shadeR = 19
m.marioBodyState.shadeG = 58
m.marioBodyState.shadeB = 212
else
m.marioBodyState.lightR = 255
m.marioBodyState.lightG = 255
m.marioBodyState.lightB = 255
m.marioBodyState.shadeR = 100
m.marioBodyState.shadeG = 100
m.marioBodyState.shadeB = 100
end
end

-- set metal
Expand Down
6 changes: 5 additions & 1 deletion mods/char-select-extra-chars-plus/!class-definitions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
--- @meta

--- @class LuigiState
--- @field public scuttle integer
--- @field public lastHurtCounter integer

--- @class ToadState

Expand Down Expand Up @@ -44,7 +46,7 @@
--- @field public peakHeight integer
--- @field public actionADone boolean
--- @field public actionBDone boolean
--- @field public bounced boolean
--- @field public bounceCooldown integer
--- @field public spindashState integer
--- @field public instashieldTimer integer
--- @field public oxygen integer
Expand All @@ -53,6 +55,8 @@
--- @field public physTimer integer
--- @field public lastforwardPos Vec3f
--- @field public realFVel number
--- @field public wallSpam number
--- @field public prevWallAngle number

--- @class CharacterState
--- @field public mario MarioState
Expand Down
23 changes: 20 additions & 3 deletions mods/char-select-extra-chars-plus/!misc-functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
--- @param accel? number
--- Plays a custom animation for MarioState `m`
function play_custom_anim(m, name, accel)
accel = accel or 0x10000

m.marioObj.header.gfx.animInfo.animAccel = accel
m.marioObj.header.gfx.animInfo.animAccel = accel or 0x10000

if (smlua_anim_util_get_current_animation_name(m.marioObj) ~= name or m.marioObj.header.gfx.animInfo.animID ~= -1) then
m.marioObj.header.gfx.animInfo.animID = -1
Expand All @@ -28,4 +26,23 @@ function string.split(str, splitAt)
table.insert(result, match)
end
return result
end

--- @param x integer
--- @param min integer
--- @param max integer
--- @param inclusive? boolean
--- @return boolean
function in_between(x, min, max, inclusive)
if inclusive then
if x >= min and x <= max then
return true
end
end

if x > min and x < max then
return true
end

return false
end
96 changes: 51 additions & 45 deletions mods/char-select-extra-chars-plus/a-movesets-vars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,56 @@
--- @type CharacterState[]
gCharacterStates = {}
for i = 0, (MAX_PLAYERS - 1) do
gCharacterStates[i] = {}
local m = gMarioStates[i]
local e = gCharacterStates[i]
e.mario = m
e.luigi = {}
e.toad = {}
e.wario = {}
e.waluigi = {}
e.toadette = {}
e.peach = {}
e.daisy = {}
e.yoshi = {}
e.birdo = {}
e.spike = {}
e.pauline = {}
e.rosalina = {}
e.wapeach = {}
e.donkeyKong = {}
e.sonic = {}
gCharacterStates[i] = {
mario = gMarioStates[i],
luigi = {
scuttle = 0,
lastHurtCounter = 0
},
toad = {},
wario = {},
waluigi = {},
toadette = {
averageForwardVel = 0
},
peach = {},
daisy = {},
yoshi = {},
birdo = {
spitTimer = 0,
framesSinceShoot = 255,
flameCharge = 0
},
spike = {},
pauline = {},
rosalina = {
canSpin = true,
orbitObjActive = false,
orbitObjDist = 0,
orbitObjAngle = 0
},
wapeach = {},
donkeyKong = {},
sonic = {
spinCharge = 0,
groundYVel = 0,
prevForwardVel = 0,
peakHeight = 0,
actionADone = false,
actionBDone = false,
bounceCooldown = 0,
spindashState = 0,
instashieldTimer = 0,
oxygen = 900, -- 30 seconds
prevVelY = 0,
prevHeight = 0,
physTimer = 0,
lastforwardPos = gVec3fZero(),
realFVel = 0,
wallSpam = 0,
prevWallAngle = -1
}
}

e.toadette.averageForwardVel = 0

e.birdo.spitTimer = 0
e.birdo.framesSinceShoot = 255
e.birdo.flameCharge = 0

e.rosalina.canSpin = true
e.rosalina.orbitObjActive = false
e.rosalina.orbitObjDist = 0
e.rosalina.orbitObjAngle = 0

e.sonic.spinCharge = 0
e.sonic.groundYVel = 0
e.sonic.prevForwardVel = 0
e.sonic.peakHeight = 0
e.sonic.actionADone = false
e.sonic.actionBDone = false
e.sonic.bounced = false
e.sonic.spindashState = 0
e.sonic.instashieldTimer = 0
e.sonic.oxygen = 900 -- 30 seconds
e.sonic.prevVelY = 0
e.sonic.prevHeight = 0
e.sonic.physTimer = 0
e.sonic.lastforwardPos = gVec3fZero()
e.sonic.realFVel = 0
gPlayerSyncTable[i].rings = 0
end
Binary file not shown.
Binary file modified mods/char-select-extra-chars-plus/actors/dizzy_circle_geo.bin
Binary file not shown.
Binary file removed mods/char-select-extra-chars-plus/actors/dk_geo.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading