mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 01:12:19 -05:00
[Difficulty Enhancement] Tree Stick Drops (#3171)
* Tree Stick Drops * Removed Unneeded i * formatting blunder * Stick Lottery * Change rand functions --------- Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
parent
3116a9c8b5
commit
0132d3b5e2
@ -652,6 +652,8 @@ void DrawEnhancementsMenu() {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable Bombchu Drops", "gBombchuDrops", true, false,
|
||||
forceEnableBombchuDrops, forceEnableBombchuDropsText, UIWidgets::CheckboxGraphics::Checkmark);
|
||||
UIWidgets::Tooltip("Bombchus will sometimes drop in place of bombs");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Trees Drop Sticks", "gTreeStickDrops", true, false);
|
||||
UIWidgets::Tooltip("Bonking into trees will have a chance to drop up to 3 sticks. Must already have obtained sticks.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("No Heart Drops", "gNoHeartDrops", true, false);
|
||||
UIWidgets::Tooltip("Disables heart drops, but not heart placements, like from a Deku Scrub running off\nThis simulates Hero Mode from other games in the series");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hyper Bosses", "gHyperBosses", true, false);
|
||||
|
@ -1523,7 +1523,7 @@ s16 func_8001F404(s16 dropId) {
|
||||
if (LINK_IS_ADULT) {
|
||||
if (dropId == ITEM00_SEEDS) {
|
||||
dropId = ITEM00_ARROWS_SMALL;
|
||||
} else if (dropId == ITEM00_STICK) {
|
||||
} else if ((dropId == ITEM00_STICK) && !(CVarGetInteger("gTreeStickDrops", 0))) {
|
||||
dropId = ITEM00_RUPEE_GREEN;
|
||||
}
|
||||
} else {
|
||||
|
@ -322,6 +322,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) {
|
||||
Vec3f dropsSpawnPt;
|
||||
s32 i;
|
||||
s32 leavesParams;
|
||||
s32 numDrops;
|
||||
|
||||
// Despawn extra trees in a group if out of range
|
||||
if ((this->spawnType == WOOD_SPAWN_SPAWNED) && (this->actor.parent != NULL)) {
|
||||
@ -351,6 +352,12 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) {
|
||||
dropsSpawnPt = this->actor.world.pos;
|
||||
dropsSpawnPt.y += 200.0f;
|
||||
|
||||
if ((this->unk_14C >= 0) && (this->unk_14C < 0x64) && (CVarGetInteger("gTreeStickDrops", 0)) && !(INV_CONTENT(ITEM_STICK) == ITEM_NONE)) {
|
||||
(numDrops = (Rand_ZeroOne() * 4));
|
||||
for (i = 0; i < numDrops; ++i) {
|
||||
Item_DropCollectible(play, &dropsSpawnPt, ITEM00_STICK);
|
||||
}
|
||||
} else {
|
||||
if ((this->unk_14C >= 0) && (this->unk_14C < 0x64)) {
|
||||
Item_DropCollectibleRandom(play, &this->actor, &dropsSpawnPt, this->unk_14C << 4);
|
||||
} else {
|
||||
@ -362,6 +369,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) {
|
||||
this->actor.home.rot.z = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Spawn falling leaves
|
||||
if (this->unk_14C >= -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user