Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream sync #678

Merged
merged 3 commits into from
Nov 22, 2024
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
6 changes: 6 additions & 0 deletions scripts/grower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3628,6 +3628,12 @@ end
R.shapes_applied = 1
end

if not R.shapes or table.empty(R.shapes) then
R.shapes = {}
else
R.shapes[cur_rule.name] = R.shapes[cur_rule.name] + 1
end

if cur_rule.is_absurd then
if R.absurd_shapes then
table.add_unique(R.absurd_shapes, cur_rule.name)
Expand Down
20 changes: 19 additions & 1 deletion scripts/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1002,13 +1002,31 @@ function Item_pickups_for_class(LEVEL, CL)
if not stats.health then
stats.health = 1
end

local pick1
local pick2
if R.zone.weap_palette
and not table.empty(R.zone.weap_palette)
and OB_CONFIG.secrets_bonus ~= nil then
pick1 = rand.key_by_probs(R.zone.weap_palette)
if rand.odds(33 + LEVEL.id) then
pick2 = rand.key_by_probs(R.zone.weap_palette)
end
end

if pick1 and not stats[GAME.WEAPONS[pick1].ammo] then
stats[GAME.WEAPONS[pick1].ammo] = 1
end
if pick2 and not stats[GAME.WEAPONS[pick2].ammo] then
stats[GAME.WEAPONS[pick2].ammo] = 1
end
end

for stat,qty in pairs(stats) do

-- this secret room is a treasure trove, baby!
if R.is_secret and OB_CONFIG.secrets_bonus ~= nil then
qty = R.svolume * SECRET_BONUS_FACTORS[OB_CONFIG.secrets_bonus]
qty = qty + (R.svolume/2) * SECRET_BONUS_FACTORS[OB_CONFIG.secrets_bonus]
end

select_pickups(R, item_list, stat, qty)
Expand Down
52 changes: 52 additions & 0 deletions scripts/shapes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14547,6 +14547,58 @@ GROW_SKULL_P1_STEEPNESS_HALF =
}
},

GROW_X_SHIFTED =
{
prob = 7,
skip_prob = 80,

structure =
{
"xxxx11xx..","xxxx11xx11",
"xxxx..xx..","xxxx11xx11",
"xxxx..x...","xxxx11x/11",
"x.........","x/1111111/",
".........x","/1111111/x",
"...x..xxxx","11/x11xxxx",
"..xx..xxxx","11xx11xxxx",
"..xx..xxxx","11xx11xxxx",
},

diagonals =
{
".1",
".1","1.",
".1","1.",
"1."
}
},

GROW_X_SHIFTED_NEW_AREA =
{
prob = 10,
skip_prob = 75,

structure =
{
"xxxx11xx..","xxxx11xxAA",
"xxxx..xx..","xxxx11xxAA",
"xxxx..x...","xxxx11x/AA",
"x.........","x/AAAAAAA/",
".........x","/AAAAAAA/x",
"...x..xxxx","AA/x11xxxx",
"..xx..xxxx","AAxx11xxxx",
"..xx..xxxx","AAxx11xxxx",
},

diagonals =
{
".A",
".A","A.",
".A","A.",
"A."
}
},

-- other shapes

GROW_DIAGONAL_STALK =
Expand Down