Skip to content

Commit e5330a5

Browse files
committed
tweaks n stuff
1 parent f6e767b commit e5330a5

9 files changed

Lines changed: 23 additions & 22 deletions

File tree

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# v1.0.3
22
- Added additional info button to *Safe Mode* label in options menu
3+
- Raised *Ending Gamble* option Silly Tier to **High**
4+
- Tweaked some options' description
35
- Minor tweaks
46

57
# v1.0.2

src/hooks/Gambler.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ using namespace horrible::prelude;
1111

1212
static auto const o = Option::create(THIS_ID)
1313
->setName("Ending Gamble")
14-
->setDescription("When reaching 95% in a level, you have a chance at randomly being blasted way far back.\n<cl>suggested by Timered</c>")
14+
->setDescription("When reaching 95% in a level, you have a 50/50 chance at randomly being blasted way far back.\n<cl>suggested by Timered</c>")
1515
->setCategory(category::misc)
16-
->setSillyTier(SillyTier::Medium)
16+
->setSillyTier(SillyTier::High)
1717
->autoRegister();
1818

1919
class $modify(GamblerPlayLayer, PlayLayer) {
@@ -50,11 +50,7 @@ class $modify(GamblerPlayLayer, PlayLayer) {
5050

5151
// detect the moment the player first reaches or crosses 95
5252
if (getCurrentPercentInt() >= 95 && !f->triggered) {
53-
// roll a random number between 0 and 1
54-
auto roll = rng::flip();
55-
56-
log::info("Gambler roll: {}", roll);
57-
if (roll) {
53+
if (rng::flip()) {
5854
log::info("Gambler lost the bet!");
5955

6056
sfx::play(sfx::file::pop);

src/hooks/Mock.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using namespace horrible::prelude;
1212

1313
static auto const o = Option::create(THIS_ID)
1414
->setName("Mock your 90%+ Fail")
15-
->setDescription("Occasionally taunts you in the main menu with a screenshot of one of your 90%-99% fails.\n<cl>suggested by Wuffin</c>")
15+
->setDescription("Occasionally taunts you in the main menu with a screenshot of one of your 90%-99% fails.\n<co>Must be enabled with Safe Mode disabled to save new best records.</c>\n<cl>suggested by Wuffin</c>")
1616
->setCategory(category::misc)
1717
->setSillyTier(SillyTier::Medium)
1818
->setSupportedPlatforms({Platform::Windows, Platform::Android})
@@ -125,8 +125,8 @@ class $modify(MockPlayLayer, PlayLayer) {
125125
int id = m_level->m_levelID;
126126
int percentage = m_level->m_normalPercent;
127127

128-
log::info("Showing new best for level ID: {}", id);
129-
log::info("Level percentage: {}", percentage);
128+
log::debug("Showing new best for level ID: {}", id);
129+
log::debug("Level percentage: {}", percentage);
130130

131131
if (percentage >= 90) {
132132
auto director = CCDirector::sharedDirector();

src/hooks/Placebo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ using namespace horrible::prelude;
1212

1313
static auto const o = Option::create(THIS_ID)
1414
->setName("Placebo")
15-
->setDescription("A random chance that when you start a level, all the options you have enabled are disabled, or all the options you have disabled are enabled.\n<cl>suggested by tmdXD</c>")
15+
->setDescription("A <cc>1%</c> chance that when you start a level, all of your options get toggled to the opposite of their current state.\n<cl>suggested by tmdXD</c>")
1616
->setCategory(category::misc)
1717
->setSillyTier(SillyTier::High)
1818
->autoRegister();
1919

2020
void placeboEffect() {
2121
auto rnd = rng::fast();
22-
log::trace("placebo effect roll: {}", rnd);
22+
log::trace("placebo effect roll: {} / 1", rnd);
2323

2424
if (rnd <= 1) { // 1% chance :trol:
2525
log::warn("Placebo effect activated! Toggling all options...");

src/hooks/Sticky.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,25 @@ class $modify(StickyPlayerObject, PlayerObject) {
7070
};
7171

7272
bool onGround() {
73-
// log::trace("1: {} 2: {} 3: {} 4: {}", m_isOnGround ? "y" : "n", m_isOnGround2 ? "y" : "n", m_isOnGround3 ? "y" : "n", m_isOnGround4 ? "y" : "n");
74-
return m_isOnGround && m_isOnGround2 && m_isOnGround3 & m_isOnGround4;
73+
log::trace("1: {} 2: {} 3: {} 4: {}", m_isOnGround ? "y" : "n", m_isOnGround2 ? "y" : "n", m_isOnGround3 ? "y" : "n", m_isOnGround4 ? "y" : "n");
74+
return m_isOnGround && m_isOnGround2 && m_isOnGround3 && m_isOnGround4;
7575
};
7676

7777
void hitGround(GameObject* object, bool notFlipped) {
78+
if (!m_gameLayer) return PlayerObject::hitGround(object, notFlipped);
79+
7880
auto f = m_fields.self();
7981

8082
auto wasOnGround = f->m_onGround;
8183
PlayerObject::hitGround(object, notFlipped);
8284
auto nowOnGround = onGround();
8385

8486
if (m_hasEverJumped) {
85-
if (!wasOnGround && nowOnGround) {
87+
if (nowOnGround && !wasOnGround) {
8688
if (rng::fast() < f->chance) {
8789
f->m_defSpeed = m_playerSpeed;
8890
m_playerSpeed = 0.f;
91+
8992
if (f->m_clickLabel) f->m_clickLabel->setVisible(true);
9093
};
9194
};

src/hooks/obstructive/Confetti.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class $modify(ConfettiPlayLayer, PlayLayer) {
5050
};
5151

5252
void confetti(float) {
53-
log::info("unleashing confetti!");
53+
log::debug("unleashing confetti!");
5454

5555
sfx::play(sfx::file::bad);
5656
shakeCamera(0.875f, 2.5f, 0.00875f);

src/hooks/obstructive/Flipped.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class $modify(FlippedPlayLayer, PlayLayer) {
3636
};
3737

3838
void nextFlip() {
39-
log::trace("scheduling spam challenge");
40-
if (!m_hasCompletedLevel) scheduleOnce(schedule_selector(FlippedPlayLayer::flip), rng::get(30.f, 5.f) * chanceToDelayPct(m_fields->chance));
39+
log::trace("scheduling flip");
40+
if (!m_hasCompletedLevel) scheduleOnce(schedule_selector(FlippedPlayLayer::flip), rng::get(10.f, 2.5f) * chanceToDelayPct(m_fields->chance));
4141
};
4242

4343
void flip(float) {

src/hooks/obstructive/Math.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ class $modify(MathPlayLayer, PlayLayer) {
6262

6363
if (auto quiz = MathQuiz::create()) {
6464
// handle correct/wrong answer
65-
quiz->setCallback([this, quiz](bool correct) {
65+
quiz->setCallback([this](bool correct) {
6666
if (!correct) resetLevelFromStart();
6767
nextQuiz();
6868

6969
cursor::hide();
7070

71-
if (quiz) quiz->removeFromParent();
71+
cue::resetNode(m_fields->currentMath);
7272
});
7373

7474
m_uiLayer->addChild(quiz, HIGHEST_Z);

src/hooks/obstructive/Spam.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ class $modify(SpamPlayLayer, PlayLayer) {
7373
auto f = m_fields.self();
7474

7575
// handle correct/wrong answer
76-
spam->setCallback([this, spam](bool success) {
76+
spam->setCallback([this](bool success) {
7777
if (!success) resetLevelFromStart();
7878
nextSpam();
7979

8080
cursor::hide();
8181

82-
if (spam) spam->removeFromParent();
82+
cue::resetNode(m_fields->currentSpam);
8383
});
8484

8585
m_uiLayer->addChild(spam, HIGHEST_Z);

0 commit comments

Comments
 (0)