Snippets

chromawallet Draft01

Created by Riccardo Sibani

class seeds (log) {
    key rawData: byte_array; // essentially the tx hash    
}

class plot {
    key seed; // generates all the following properties and the mineral levels
    index temperature: integer;
    index hazardRate: integer;
    index trapsRate: integer; // since traps have little value on blockchain, we might not need additional informations (such as whcih traps, but they should aways be the same in one specific plot
    index digResistance: integer;
    index lightLevel: integer;
    index enemiesRate: integer; // for the enemies it goes the same as the traps
    index mutable roundsLeft: integer;
}

// minerals are just particular ft3 assets

class mineralsPerPlot {
    key ft3.asset, plot;
    index rate: integer;
}

character {
    name;
    gender: text;
}
 
// I create this middle table because I assume healthBar goes with levels, otherwise we can just add character inside the healthBar
class characterHealthBar {
    key character;
    index healthBar; 
}

// by having healthBar as a class I can create one and plug to any character
class healthBar {
    // health bar properties
     lifespan: integer;
     recorver: integer; 
     // character; // this is optional and allows to get rid of characterHealthBar table
     // etc
}

class characterOxygen {
    key character
    index oxygenCapacity;
    index oxygenTank;
}

class oxygenCapacity {
    consumption: integer; // m^3 per minute or something like that
}

class oxygenTank {
    name
    capacity: integer;
    timeToRefuel: integer;
    mutable price: integer;
    mutable currency: ft3.asset;
}

class characterVision {
    key character;
    index vision;
    index visor;
    index light;
}

class vision { 
    integer;
}

class visor {
    name;
    improvement: integer;
    mutable price: integer;
    mutable currency: ft3.asset;
}

class light {
    name;
    power: integer;
    mutable price: integer;
    mutable currency: ft3.asset;
}

// ... same for cooling, heating, storage

class characterPickaxe {
    key character;
    pickaxeModel;
    mutable wear: integer;
}

class pickaxeModel {
    name;
    capacity: integer; // when new
    mutable cost: integer;
    mutable currency: ft3.asset;
}


class characterArmor {
    key character;
    armorModel;
}

class armorModel {
    name;
    resistance: integer;
    mutable cost: integer;
    mutable currency: ft3.asset;
}

// same for the other durable items
// one time consumables can be set as a durable items with life == 1


class plotOwnership {
    key plot;
    character;
}


class plotOnSale {
    key plot;
    character;
    price: integer;
    currency: ft3.asset;
}

// ideally we should be able to sell everything. I'll work more on this concept
    

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.