From 8d9f45ca8fbd0f5d471657e8186d6ed60c89841f Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Nov 2026 16:20:31 +0100 Subject: [PATCH] Spy Module: texture/model assets, unit test, docs Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_012wQrHUdrwThVfoqXVv4TT2 --- .../example/dunenpc/SmugglerCoverTest.java | 20 ++++++++++++ .../assets/dunerealms/items/spy_module.json | 1 + .../dunerealms/models/item/spy_module.json | 1 + .../dunerealms/textures/item/spy_module.png | Bin 0 -> 580 bytes docs/SPY-MODULE.md | 29 ++++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 DuneNPC/src/test/java/com/example/dunenpc/SmugglerCoverTest.java create mode 100644 DuneResourcePack/assets/dunerealms/items/spy_module.json create mode 100644 DuneResourcePack/assets/dunerealms/models/item/spy_module.json create mode 100644 DuneResourcePack/assets/dunerealms/textures/item/spy_module.png create mode 100644 docs/SPY-MODULE.md diff --git a/DuneNPC/src/test/java/com/example/dunenpc/SmugglerCoverTest.java b/DuneNPC/src/test/java/com/example/dunenpc/SmugglerCoverTest.java new file mode 100644 index 00000000..3ff128e3 --- /dev/null +++ b/DuneNPC/src/test/java/com/example/dunenpc/SmugglerCoverTest.java @@ -0,0 +1,20 @@ +package com.example.dunenpc; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; + +class SmugglerCoverTest { + @Test void bonusGrowsTwoPercentPerRunAndCapsAtTen() { + assertEquals(0, SmugglerCover.bonusPercent(0)); + assertEquals(4, SmugglerCover.bonusPercent(2)); + assertEquals(10, SmugglerCover.bonusPercent(5)); + assertEquals(10, SmugglerCover.bonusPercent(50)); + assertEquals(0, SmugglerCover.bonusPercent(-3)); + } + @Test void coverTimeGrowsTenSecondsPerRunAndCapsAt120() { + assertEquals(180, SmugglerCover.durationSeconds(180, 0)); + assertEquals(230, SmugglerCover.durationSeconds(180, 5)); + assertEquals(300, SmugglerCover.durationSeconds(180, 99)); + assertEquals(10, SmugglerCover.durationSeconds(0, 0)); + } +} diff --git a/DuneResourcePack/assets/dunerealms/items/spy_module.json b/DuneResourcePack/assets/dunerealms/items/spy_module.json new file mode 100644 index 00000000..d8ec4782 --- /dev/null +++ b/DuneResourcePack/assets/dunerealms/items/spy_module.json @@ -0,0 +1 @@ +{"model":{"type":"minecraft:model","model":"dunerealms:item/spy_module"}} diff --git a/DuneResourcePack/assets/dunerealms/models/item/spy_module.json b/DuneResourcePack/assets/dunerealms/models/item/spy_module.json new file mode 100644 index 00000000..bef7f042 --- /dev/null +++ b/DuneResourcePack/assets/dunerealms/models/item/spy_module.json @@ -0,0 +1 @@ +{"parent":"minecraft:item/generated","textures":{"layer0":"dunerealms:item/spy_module"}} diff --git a/DuneResourcePack/assets/dunerealms/textures/item/spy_module.png b/DuneResourcePack/assets/dunerealms/textures/item/spy_module.png new file mode 100644 index 0000000000000000000000000000000000000000..33e4ae07fa5923129894a7494770c3cc208e4500 GIT binary patch literal 580 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrVB+?4aSW-5dwX|du1KJWLtt}9 z2j_|dtO64hEEh1WTF5iqfklW@QZ+(JaY4h{1C7bccQn@?%=r5M)x62;%Ad^K`|Hx4 zpR4!oWCWV16&L%vb6<7!@A{{fHn#KE{gT=jSNSo*pP`VcL)c*s!y^^}^@bhhyXXHe znP30=-{V`s6?-hL+i%qRC9onCSTG*pRLJ|e`HlDe=l5%W6unTc`|81 zf1PuH3up>hksrk1JKugYs@<>uXYpJ8{=0hLc8ly;$})3>*QB8v`tH$h#y-3E^WPmV zH$Tf6_FjAg6VNKCDNyGj8w?iO{`Wi6vga>Xf9Ll3fB)SY6u$r!=i0N+@cI7G{W;6! zkL%}(qM5d1^?c?(KYtn2v|N7OeExa-|B`xh*~IKH6!&AdS?^ypf_Tu)a&mvv4FO#n_V=?DM- literal 0 HcmV?d00001 diff --git a/docs/SPY-MODULE.md b/docs/SPY-MODULE.md new file mode 100644 index 00000000..6fffdd4d --- /dev/null +++ b/docs/SPY-MODULE.md @@ -0,0 +1,29 @@ +# Spy Module (Smuggler / Spy ability) + +Status: written without compiling or testing. Needs a build and a two-player test. + +## Recipe (cookbook) +Shapeless, crafting table. Unlocked in the recipe book when a player accepts a smuggler contract. + +| Ingredient | Item | ei-id | +|---|---|---| +| Egg | Weirding Module (MK III) | `jerboa_egg` | +| Orange dye | Smuggled Spice | `smuggled_spice` | +| Clay ball | Jerboa Hide Paste (MK II) | `jerboa_hide_paste` | + +Result: **Spy Module**, Uncommon, MK IV (highest ingredient MK + 1), ei-id `spy_module`, item model `dunerealms:spy_module`. +Recipe key `dunenpc:spy_module`. A spy quest can call `SmugglerCover.unlock(player)` to grant it as well. + +## Active +Throw the egg at a player. It does no damage, knockback, sound or message to them. The thrower looks like the target +(armour, main hand, off hand) to every player within `spy.view-distance` blocks. Cosmetic only. 3 s cooldown. +Cover ends on attacking, being hurt, death, quit, world change, or after `spy.duration-seconds` (180 s). + +## Passive: Quiet Contacts +Per completed smuggling run: +2% payout (max +10%, paid as an extra deposit after the Trust levy) and +10 s cover time (max +120 s). +Runs are stored on the player as `dunenpc:smuggler_runs`. + +## Not done +- No `item-templates.json` entry (avoids breaking catalogue tests); add it so the catalogue lists the item. +- `DuneResourcePack.zip` is not rebuilt; only the source assets were added. +- No spy quest exists yet.