Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a39bfee803 | |||
| 03f650ce3b | |||
| 35cbd84146 | |||
| c9f57dae9e | |||
| 83949d63b5 | |||
| 68aae5c917 | |||
| 0818fe8eab | |||
| f269cc4861 | |||
| ae183f27de | |||
| ec8f2b83cf |
@@ -59,12 +59,14 @@ const BOUNTY_POOL = [
|
|||||||
{ id: 'b_wither_skel_3', name: 'Slay 3 Wither Skeletons', target: 'minecraft:wither_skeleton', count: 3, type: 'kill', reward: 150, source: "Adventurer's Guild" },
|
{ id: 'b_wither_skel_3', name: 'Slay 3 Wither Skeletons', target: 'minecraft:wither_skeleton', count: 3, type: 'kill', reward: 150, source: "Adventurer's Guild" },
|
||||||
{ id: 'b_shulker_3', name: 'Slay 3 Shulkers', target: 'minecraft:shulker', count: 3, type: 'kill', reward: 200, source: "Adventurer's Guild" },
|
{ id: 'b_shulker_3', name: 'Slay 3 Shulkers', target: 'minecraft:shulker', count: 3, type: 'kill', reward: 200, source: "Adventurer's Guild" },
|
||||||
|
|
||||||
// ── Boss tier (rare picks) ──
|
// ── Boss tier (rare picks) — all vanilla 1.21.x ──
|
||||||
{ id: 'b_warden_1', name: 'Slay the Warden', target: 'minecraft:warden', count: 1, type: 'kill', reward: 800, source: "Adventurer's Guild" },
|
{ id: 'b_warden_1', name: 'Slay the Warden', target: 'minecraft:warden', count: 1, type: 'kill', reward: 800, source: "Adventurer's Guild" },
|
||||||
{ id: 'b_voidworm_1', name: 'Destroy a Void Worm', target: 'alexsmobs:void_worm', count: 1, type: 'kill', reward: 1200, source: "Adventurer's Guild" },
|
{ id: 'b_breeze_3', name: 'Hunt 3 Breezes', target: 'minecraft:breeze', count: 3, type: 'kill', reward: 250, source: "Adventurer's Guild" },
|
||||||
{ id: 'b_warped_mosco_1', name: 'Slay a Warped Mosco', target: 'alexsmobs:warped_mosco', count: 1, type: 'kill', reward: 700, source: "Adventurer's Guild" },
|
{ id: 'b_bogged_5', name: 'Slay 5 Bogged', target: 'minecraft:bogged', count: 5, type: 'kill', reward: 120, source: "Adventurer's Guild" },
|
||||||
{ id: 'b_farseer_1', name: 'Slay the Farseer', target: 'alexsmobs:farseer', count: 1, type: 'kill', reward: 900, source: "Adventurer's Guild" },
|
{ id: 'b_evoker_2', name: 'Slay 2 Evokers', target: 'minecraft:evoker', count: 2, type: 'kill', reward: 350, source: "Adventurer's Guild" },
|
||||||
{ id: 'b_skreecher_1', name: 'Slay a Skreecher', target: 'alexsmobs:skreecher', count: 1, type: 'kill', reward: 400, source: "Adventurer's Guild" },
|
{ id: 'b_vindicator_4', name: 'Slay 4 Vindicators', target: 'minecraft:vindicator', count: 4, type: 'kill', reward: 180, source: "Adventurer's Guild" },
|
||||||
|
{ id: 'b_piglin_brute_2', name: 'Slay 2 Piglin Brutes', target: 'minecraft:piglin_brute', count: 2, type: 'kill', reward: 400, source: "Adventurer's Guild" },
|
||||||
|
{ id: 'b_ravager_1', name: 'Hunt down a Ravager', target: 'minecraft:ravager', count: 1, type: 'kill', reward: 500, source: "Adventurer's Guild" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// Index pool by id for O(1) lookup
|
// Index pool by id for O(1) lookup
|
||||||
@@ -344,4 +346,14 @@ ServerEvents.commandRegistry(event => {
|
|||||||
event.register(bountyCmd);
|
event.register(bountyCmd);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// ─── First-login pool roll ─────────────────────────────────────────
|
||||||
|
// Without this, new players see an empty Bounty Board until they type
|
||||||
|
// /bns bounty list (which triggers ensurePoolFresh). The board reads
|
||||||
|
// bnsBountyPool from NBT; bnsBountyPool stays empty until rollDailyPool
|
||||||
|
// runs. This hook closes the gap so the screen is populated the first
|
||||||
|
// time it's opened.
|
||||||
|
PlayerEvents.loggedIn(event => {
|
||||||
|
ensurePoolFresh(event.player);
|
||||||
|
});
|
||||||
|
|
||||||
console.info('[bns/bounty_engine] loaded — ' + BOUNTY_POOL.length + ' bounties in catalogue');
|
console.info('[bns/bounty_engine] loaded — ' + BOUNTY_POOL.length + ' bounties in catalogue');
|
||||||
|
|||||||
@@ -109,19 +109,20 @@ ServerEvents.commandRegistry(event => {
|
|||||||
}
|
}
|
||||||
const nextTier = cur + 1;
|
const nextTier = cur + 1;
|
||||||
const nextCfg = bnsTier.config(nextTier);
|
const nextCfg = bnsTier.config(nextTier);
|
||||||
const balance = countCoins(player);
|
|
||||||
if (balance < nextCfg.cost) {
|
// Combined cash+bank deduction via bnstoolkit Java bridge.
|
||||||
|
// Pulls inventory coins first, then bank for the remainder.
|
||||||
|
const Bridge = Java.loadClass('uk.sijbers.bnstoolkit.economy.NumismaticsBridge');
|
||||||
|
const ok = Bridge.spend(player, nextCfg.cost);
|
||||||
|
if (!ok) {
|
||||||
|
const cash = countCoins(player);
|
||||||
|
const bank = Bridge.balanceOf(player);
|
||||||
player.tell(Text.red(
|
player.tell(Text.red(
|
||||||
'Upgrade to ' + nextCfg.name + ' costs ' + nextCfg.cost + ' spurs. You have ' + balance + '.'
|
'Upgrade to ' + nextCfg.name + ' costs ' + nextCfg.cost + ' spurs. ' +
|
||||||
|
'You have ' + cash + ' cash + ' + bank + ' bank = ' + (cash + bank) + ' total.'
|
||||||
));
|
));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
const took = takeCoins(player, nextCfg.cost);
|
|
||||||
if (took < nextCfg.cost) {
|
|
||||||
giveCoins(player, took);
|
|
||||||
player.tell(Text.red('Coin removal failed — refunded. Try again.'));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
// Promote via FTB Ranks
|
// Promote via FTB Ranks
|
||||||
const rankId = TIER_RANK_ID[nextTier];
|
const rankId = TIER_RANK_ID[nextTier];
|
||||||
Utils.server.runCommandSilent('ftbranks add ' + player.username + ' ' + rankId);
|
Utils.server.runCommandSilent('ftbranks add ' + player.username + ' ' + rankId);
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+2
-24
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"$schema": "Brass-and-Sigil pack.lock.json - generated, do not edit by hand unless you know what you are doing",
|
"$schema": "Brass-and-Sigil pack.lock.json - generated, do not edit by hand unless you know what you are doing",
|
||||||
"name": "Brass and Sigil",
|
"name": "Brass and Sigil",
|
||||||
"version": "0.38.1",
|
"version": "0.41.0",
|
||||||
"minecraft": "1.21.1",
|
"minecraft": "1.21.1",
|
||||||
"loader": {
|
"loader": {
|
||||||
"type": "neoforge",
|
"type": "neoforge",
|
||||||
"version": "21.1.228"
|
"version": "21.1.228"
|
||||||
},
|
},
|
||||||
"lockedAt": "2026-06-08T14:42:41Z",
|
"lockedAt": "2026-06-08T17:52:03Z",
|
||||||
"mods": [
|
"mods": [
|
||||||
{
|
{
|
||||||
"source": "modrinth",
|
"source": "modrinth",
|
||||||
@@ -130,17 +130,6 @@
|
|||||||
"size": 38629,
|
"size": 38629,
|
||||||
"side": "both"
|
"side": "both"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "modrinth",
|
|
||||||
"slug": "create-encased",
|
|
||||||
"versionId": "3sUW27Ho",
|
|
||||||
"version": "1.8.1-ht1",
|
|
||||||
"path": "mods/Create Encased-1.21.1-1.8.1-ht1.jar",
|
|
||||||
"url": "https://cdn.modrinth.com/data/hSSqdyU1/versions/3sUW27Ho/Create%20Encased-1.21.1-1.8.1-ht1.jar",
|
|
||||||
"sha1": "5ca3d7674676dda5dd472b0433505a54d5e920d0",
|
|
||||||
"size": 2574837,
|
|
||||||
"side": "both"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "modrinth",
|
"source": "modrinth",
|
||||||
"slug": "bellsandwhistles",
|
"slug": "bellsandwhistles",
|
||||||
@@ -1065,17 +1054,6 @@
|
|||||||
"size": 193381,
|
"size": 193381,
|
||||||
"side": "both"
|
"side": "both"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "modrinth",
|
|
||||||
"slug": "alexs-mobs(1.21.1)",
|
|
||||||
"versionId": "KSgki4uc",
|
|
||||||
"version": "1.22.17",
|
|
||||||
"path": "mods/alexsmobs-1.22.17.jar",
|
|
||||||
"url": "https://cdn.modrinth.com/data/EmNhnNnt/versions/KSgki4uc/alexsmobs-1.22.17.jar",
|
|
||||||
"sha1": "5070e8070f60650d773bfd9f1d031496f8f50259",
|
|
||||||
"size": 26620546,
|
|
||||||
"side": "both"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "modrinth",
|
"source": "modrinth",
|
||||||
"slug": "item-obliterator",
|
"slug": "item-obliterator",
|
||||||
|
|||||||
Reference in New Issue
Block a user