Skip to content

Commit

Permalink
Clue edits
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-budd committed Feb 1, 2025
1 parent e8405b3 commit 44144f7
Show file tree
Hide file tree
Showing 34 changed files with 24 additions and 7 deletions.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/0_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/10_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/11_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/12_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/13_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/14_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/15_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/1_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/2_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/3_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/4_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/5_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/6_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/7_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/8_0
Binary file not shown.
Binary file not shown.
Binary file removed src/LongSprites/Clues/Default/MM_CLUE_DEFAULT/9_0
Binary file not shown.
Binary file not shown.
29 changes: 22 additions & 7 deletions src/Lua/Clues/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local GetMobjSpawnHeight, GetMapThingSpawnHeight = MM.require "Libs/MapThingLib"
local choosething = MM.require "Libs/choosething"
local shallowCopy = MM.require "Libs/shallowCopy"
local ZCollide = MM.require "Libs/zcollide"
local CLUE_MAXBOUNCE = 2*FU

local clueitemtiers = {
[1] = {
Expand All @@ -30,9 +31,12 @@ function MM:spawnClueMobj(p, pos)
mobj.drawonlyforplayer = p
mobj.color = p.skincolor

local mul = FU*3/2
local mul = FU*2
mobj.spritexscale = mul
mobj.spriteyscale = mul

mobj.clue_bounce = 0
mobj.clue_momz = CLUE_MAXBOUNCE

if pos.flip then
mobj.flags2 = $|MF2_OBJECTFLIP
Expand All @@ -52,6 +56,9 @@ local fallbackNums = {
}

function MM:giveOutClues(amount)
--Bruh
if (MM_N.dueling) then return end

MM.clues_positions = {}
local fallbackThings = {}
--local useNewClues = false
Expand Down Expand Up @@ -107,9 +114,6 @@ function MM:giveOutClues(amount)
amount = min(#MM.clues_positions, amount)
MM_N.clues_amount = amount

--Bruh
if (MM_N.dueling) then return end

for p in players.iterate do
MM:InitPlayerClues(p)
end
Expand Down Expand Up @@ -137,7 +141,18 @@ MM:addPlayerScript(function(p)
continue
end
clue.mobj.flags2 = $ &~MF2_DONTDRAW


do
clue.mobj.clue_momz = $ - FU/4

clue.mobj.clue_bounce = $ + clue.mobj.clue_momz
if clue.mobj.clue_bounce <= 0
clue.mobj.clue_bounce = 0
clue.mobj.clue_momz = CLUE_MAXBOUNCE
end
end
clue.mobj.spriteyoffset = clue.mobj.clue_bounce

if P_RandomChance(FU/2)
local wind = P_SpawnMobj(
pos.x + P_RandomRange(-18,18)*p.mo.scale,
Expand All @@ -154,8 +169,8 @@ MM:addPlayerScript(function(p)
--debugging + actual purpose
clue.mobj.radius = p.mo.radius*3/2
clue.mobj.height = p.mo.height*3/2
if abs(p.mo.x-pos.x) > clue.mobj.radius
or abs(p.mo.y-pos.y) > clue.mobj.radius
if abs(p.mo.x-pos.x) > clue.mobj.radius + p.mo.radius
or abs(p.mo.y-pos.y) > clue.mobj.radius + p.mo.radius
or not ZCollide(p.mo, clue.mobj) then
continue
end
Expand Down
2 changes: 2 additions & 0 deletions src/Lua/Functions/Scripts/endGame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ return function(self, endType)
)
reason = "surviving "..(p.mm.timesurvived/TICRATE).." seconds"
payout = FixedFloor(FixedMul(50*FU, percent)) >> FRACBITS

elseif (p.mm.role == MMROLE_MURDERER)
--dont get paid if you suck at the game
if (MM_N.peoplekilled >= MM_N.minimum_killed)
Expand All @@ -83,6 +84,7 @@ return function(self, endType)
reason = "killing "..MM_N.peoplekilled.." out of "..MM_N.numbertokill.." innocents"
payout = FixedFloor(FixedMul(amount, percent)) >> FRACBITS
end

--TODO: heroes
elseif (p.mm.role == MMROLE_SHERIFF)
local percent = FixedDiv(
Expand Down

0 comments on commit 44144f7

Please sign in to comment.