Skip to content

Add Vinesweeper minigame - #1273

Open
HarleyGilpin wants to merge 7 commits into
GregHib:mainfrom
HarleyGilpin:feat/vinesweeper
Open

Add Vinesweeper minigame#1273
HarleyGilpin wants to merge 7 commits into
GregHib:mainfrom
HarleyGilpin:feat/vinesweeper

Conversation

@HarleyGilpin

@HarleyGilpin HarleyGilpin commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Vinesweeper at Winkin's Farm, region 25_73. Everything in content/minigame/vinesweeper/ and data/minigame/vinesweeper/.

Digging a hole with a spade turns it into the count of seeds hidden in the eight holes around it and gives one point per hole uncovered. A zero uncovers the 5x5 area around it, which is what the in-game instruction interface (685) describes rather than a recursive flood fill. Digging a seed by mistake costs ten points and leaves a dead plant for a farmer to clear.

Flagging a hole sends the nearest idle farmer and the nearest rabbit walking to it. If the rabbit gets there first and a seed is under the flag, it eats it and the flag is lost. If the farmer gets there and finds a seed, the flag comes back and the owner earns random(level, 4*level) points with players within five tiles getting half; on an empty hole the farmer keeps the flag. Either way the farmer resets every dug hole within three tiles and the field is reseeded to 13% of holes, capped at 300. Seeds and flag owners live in VinesweeperField, shared by everyone.

The reward shop is interface 686. The client draws it itself from enum 1589 (reward list, slot 0 is the pseudo-item 11209 for XP), enum 1365 (item to point cost) and varbit 4449 (points, varp 1195 bits 6-31), so the server only unlocks the item layer and handles Value/Buy 1/5/10/X clicks at slot / 5. Trading points for XP shows the client's own confirm layer (component 9, Proceed 14, Cancel 16) and applies enum 1369, which is the percentage of points that become experience per Farming level: 13% at level 1 up to 95% at 39, then 1:1 from level 40. The points overlay (689) reads the same varbit, so entering the area only opens it.

Flags: the first ten are free from Mrs Winkin or Farmer Blinkin, replacements are 500 coins each (or 50 points in the shop), ten carried at most. Blinkin sells ogleroots at 10 coins and spare ones are refunded on leaving the area, including logout. Feeding a rabbit gives 30 Hunter XP and hides it for 50 ticks. Ogleroots also turn up while digging.

Tool leprechauns, the goth leprechaun and Teclyn all have a Teleport option; it now asks and sends you to 1637,4709 with the curse projectile and "Avach nimporto!". The portal at 1637,4710 returns you to the tile you left from (Draynor if unknown).

Tests: VinesweeperTest covers digging, reveal, penalties, flag planting, farmer reward and clear, the rabbit race, the overlay and refund on leaving, rabbit feeding, flag purchases, shop buys, the XP exchange at level 1 and 40, and the teleport round trip. The full :game:test run has one failure, FarmingTest growth stages, which fails on main too.

Winkin's Farm: dig holes with a spade to reveal how many seeds are hidden
in the eight surrounding holes, flag the ones you think hide a seed, and
gnome farmers race the rabbits to check them.

Reward shop (interface 686) is drawn by the client from enums 1589/1365,
so the server only handles clicks and the points varbit 4449; the XP
exchange uses enum 1369 for the level based rate below level 40. Tool
leprechauns and Teclyn teleport in, the portal returns to where you left.

Removes the 326 plane-1 "mud" NPC spawns that were never visible.
@HarleyGilpin
HarleyGilpin marked this pull request as draft September 7, 2026 04:05
Animation 201 belongs to the player skeleton and rendered as a broken
pose on the leprechaun. The teleport plays only the curse cast graphic
and projectile on the caster, then the impact graphic and sound on the
player once they land.
shoot() returns the projectile time in client cycles, so the delay must
be converted to game ticks; two ticks minimum so the animation and cast
graphic are visible before the player moves.
@HarleyGilpin
HarleyGilpin marked this pull request as ready for review September 7, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant