Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

fishbay source realm

Package fishbay is a small onyx trial sea. It keeps Mint, Register, Leave, and Bite. Damage is floor(bite \* 100 / (h...

Overview

Package fishbay is a small onyx trial sea. It keeps Mint, Register, Leave, and Bite. Damage is floor(bite * 100 / (hpMax + 100)), at least 1. A kill pays GNOT and FISH from the smaller stake. FISH is drawn from fishmark. This realm does not mint FISH. Lay, the market, cheer, and party are not in this bay. shoal/fish stays the live NFT collection. This package is not that collection. The trial mint is 1 GNOT and the stake floor is 1 GNOT.

Functions 15

func Bite

crossing Action
1func Bite(cur realm, id, target int) int
source

Bite deals flat damage. A kill pays the smaller stake and draws 1 FISH per 1 GNOT of that stake.

func Init

crossing Action
1func Init(cur realm, who, up, lp, crew, ash address)
source

Init records the FISH reserve and the four GNOT sinks. The reserve must not also be a sink. Upgrade and burn may be the same address. Call this once, from an EOA, with no coins.

func Leave

crossing Action
1func Leave(cur realm, id int)
source

Leave returns the seated stake to the owner. A fish that is already out of the bay cannot leave.

func Mint

crossing Action
1func Mint(cur realm, name string) int
source

Mint sells one trial fish for 1 GNOT. The fee leaves this realm in the same call.

func Register

crossing Action
1func Register(cur realm, id int, stake int64)
source

Register seats a fish. The attached coins are the stake and must be at least 1 GNOT.

func Strike

Action
1func Strike(bite, hpMax int) int
source

Strike is the damage formula. Size and rarity are not inputs.

Dependencies

Source Files 2