Skip to content

Commit

Permalink
gold keys and ac bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
covernts committed Dec 8, 2024
1 parent 826b517 commit 7128f2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"type": "string",
"name": "Reward Type",
"default": "Orbs",
"one-of": ["Orbs", "Keys", "Diamonds"]
"one-of": ["Orbs", "Keys", "Diamonds", "Gold Keys"]
},
"reward-amount": {
"type": "int",
Expand Down
8 changes: 8 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/SecretLayer5.hpp>
#include <Geode/modify/GameStatsManager.hpp>

using namespace cocos2d;

GJRewardObject* parse() {
auto type = geode::Mod::get()->getSettingValue<std::string>("reward-type");
auto amount = geode::Mod::get()->getSettingValue<int64_t>("reward-amount");
auto gsm = GameStatsManager::sharedState();

if (type == "Orbs") {
gsm->incrementStat("14", amount);
return GJRewardObject::create(SpecialRewardItem::Orbs, amount, 1);
} else if (type == "Keys") {
gsm->incrementStat("21", amount);
return GJRewardObject::create(SpecialRewardItem::BonusKey, amount, 1);
} else if (type == "Diamonds") {
gsm->incrementStat("13", amount);
return GJRewardObject::create(SpecialRewardItem::Diamonds, amount, 1);
} else if (type == "Gold Keys") {
gsm->incrementStat("43", amount);
return GJRewardObject::create(SpecialRewardItem::GoldKey, amount, 1);
}

return nullptr;
Expand Down

0 comments on commit 7128f2d

Please sign in to comment.