Snippets
Created by
Riccardo Sibani
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
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)
You can clone a snippet to your computer for local editing. Learn more.