fishlive source realm
Package fishlive is the person-versus-person sea. CommitMint pays 150 GNOT and stores only the caller and the commit ...
Package fishlive is the person-versus-person sea. CommitMint pays 150 GNOT and stores only the caller and the commit height. RevealMint, once the chain is at least two blocks later, rolls rarity and trait from sha256 of the caller, the commit height, that fixed height plus two, and the id. Waiting longer does not change the roll. The player does not pass trait, size, or rarity. Swim stays off chain. Register locks at least 10 GNOT. Leave returns it after 5 seconds. Settle pays one covered stake. There is no machine fish and no FISH draw. A seated wallet can settle any other seated fish. The realm does not replay the bite. The five older commons stay on shoal/fish. This package does not move them. fishlive-1.
33
func BoutsOf
Actionfunc CommitMint
crossing ActionCommitMint sells one unrevealed fish for 150 GNOT. The fee leaves this realm in the same call.
func CommitOf
Actionfunc Heal
crossing ActionHeal clears mustHeal outside the sea so Register can run again.
func Height
Actionfunc HpOf
Actionfunc InMatch
Actionfunc Init
crossing ActionInit records three GNOT sinks. They must be distinct. Call once, from an EOA, with no coins. Mint is 60/20/10 and the last tenth joins team. Kill cheer also joins team.
func Leave
crossing ActionLeave returns the seated stake once 5 seconds have passed since Register.
func MintPrice
Actionfunc Minted
Actionfunc MustHeal
Actionfunc Name
Actionfunc NameOf
Actionfunc OwnerOf
Actionfunc Pending
Actionfunc PoolOf
Actionfunc RarityOf
Actionfunc Register
crossing ActionRegister seats one revealed fish. The attached coins are the stake.
func Render
func RevealMint
crossing ActionRevealMint assigns rarity, trait, and the species name. Entropy is the commit height plus two.
func Revealed
Actionfunc Roll
Action1func Roll(caller address, commitH int64, entropyH int64, id int) (rarity string, trait string, bite int, hp int, speed int)Roll is the reveal hash. entropyH must be commitH+2. Trait adds 12%, half up.
func Settle
crossing ActionSettle pays the smaller stake to the killer's books. The NFT stays. HP falls to 30% and must heal. The caller has to own the killer. This realm does not check who bit whom.