Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

8ce158ea4512187cd2e9f128ef8fb1e4e096a67618cda8af7ee39d867fc320eb
Timestamp (utc)
2021-02-20 01:15:20
Fee Paid
0.00012708 BSV
(
0.00911481 BSV
-
0.00898773 BSV
)
Fee Rate
991.4 sat/KB
Version
1
Confirmations
316,037
Size Stats
12,810 B

3 Outputs

Total Output:
0.00898773 BSV
  • jrun cryptofightsM1{"in":0,"ref":["a7baf07f3435a6d3290350510945ee8aae34e1e11d20d4b52f46ba176b21a5aa_o1","a9025a452f1e2d9a65b349260a79ed7bed3c9f048eaeb07efcc4c09a0aa800af_o1"],"out":["8c9871de20703beb3d9b2d34b68e01cd02bcbc2e465dd2834b93d077c5163236"],"del":[],"cre":["n2Bd4cWhEQK1aVjb1R7EBGV9mrw3etvSdC"],"exec":[{"op":"DEPLOY","data":["class Fighter extends KronoJig {\n init({ owner, displayName, race, abilityScores, appearance }) {\n const {SkillType} = Constants;\n Fighter.validateStartingScores(race, abilityScores);\n this.displayName = displayName;\n this.race = race;\n this.abilityScores = abilityScores;\n this.appearance = appearance;\n\n this.xp = 0;\n this.hpBonus = 0;\n this.level = 1;\n\n this.skills = [\n SkillType.Attack,\n SkillType.Focus,\n SkillType.Hide,\n Fighter.initialSkills[race]\n ];\n\n this.owner = owner;\n }\n\n static validateStartingScores(race, abilityScores) {\n //console.log(`In validateStartingScores`);\n const costs = {\n 1: 1,\n 2: 2,\n 3: 4,\n 4: 7,\n 5: 11,\n 6: 16\n };\n\n let cost = 0;\n abilityScores.forEach((score, ability) => {\n const start = Fighter.initialScores[race][ability];\n //console.log(`In validateStartingScores - race = ${race}, score = ${score}, ability = ${ability}`);\n //console.log(`In validateStartingScores - start = ${start}`);\n const upgrade = score - start;\n //console.log(`In validateStartingScores - upgrade = ${upgrade}`);\n if (upgrade < 0) throw new Error('Invalid Ability Scores');\n if (upgrade > 0) {\n const points = costs[upgrade];\n if (!points) throw new Error('Invalid Ability Scores');\n cost += points;\n }\n });\n //console.log(`In validateStartingScores - cost = ${cost}`);\n if (cost === 15) return true;\n throw new Error('Invalid Ability Scores');\n }\n\n transfer(recipient) {\n this.owner = recipient;\n }\n\n recordVictory(battle) {\n // TODO: validate battle\n if (battle.constructor.owner !== Fighter.owner) throw new Error('Invalid Battle');\n\n this.xp += battle.xp;\n battle.destroy();\n }\n\n levelUp(ability, skillType) {\n //console.log(`Entered Fighter.levelUp with ability ${ability} and skillType ${skillType}`);\n if (this.xp < Fighter.LevelUpXP[this.level]) {\n throw new Error('Indequite XP');\n }\n //console.log(`Fighter::levelUp - current level ${this.level}`);\n this.level++;\n //console.log(`Fighter::levelUp - new level ${this.level}`);\n if (Fighter.SkillLevels.includes(this.level)) {\n //console.log(`Fighter::levelUp - in SkillLevels - 1`);\n if (!skillType) {\n throw new Error('Requested skill at Index ' + skillType + ' is not found!');\n }\n //console.log(`Fighter::levelUp - in SkillLevels - 2`);\n let skillInfo = Fighter.SkillData[skillType];\n //console.log(`Fighter::levelUp - in SkillLevels - 3`);\n if ((this.level - 1) < skillInfo.requiredLevel) {\n throw new Error(`Player doesn't meet skill level up requirements to unlock ${skillType}. Player is low level`);\n }\n //console.log(`Fighter::levelUp - in SkillLevels - 3.1`);\n skillInfo.requiredSkills.forEach(st => {\n if (!this.skills.includes(st)) {\n throw new Error(`Player doesn't meet skill level up requirements unlock ${skillType}. Missing ${st}`);\n }\n });\n //console.log(`Fighter::levelUp - in SkillLevels - 4`);\n\n this._applySkill(skillType);\n //console.log(`Fighter::levelUp - in SkillLevels - 5`);\n skillInfo.unlockableSkills.forEach(st => {\n this._applySkill(st);\n });\n //console.log(`Fighter::levelUp - in SkillLevels - 6`);\n }\n\n if (Fighter.AbilityScoreLevels.includes(this.level)) {\n this.abilityScores[ability]++;\n }\n \n this.hpBonus += 4; \n //console.log(`Fighter::levelUp - exiting function`);\n }\n\n _applySkill(skillType) {\n // TODO validate prerequesite for skillType\n this.skills.push(skillType);\n }\n\n static preDeploy() {\n const {AbilityScoreLevels, LevelUpXP, LobbiesPerLevel, TierPerLobby, Race, SkillData, SkillLevels, SkillType} = Fighter.deps.Constants;\n Fighter.initialScores = {};\n Fighter.initialScores[Race.Human] = [8, 8, 8];\n Fighter.initialScores[Race.Dwarf] = [9, 7, 7];\n Fighter.initialScores[Race.Elf] = [7, 7, 7];\n \n Fighter.initialSkills = {};\n Fighter.initialSkills[Race.Human] = SkillType.Human;\n Fighter.initialSkills[Race.Dwarf] = SkillType.Dwarven;\n Fighter.initialSkills[Race.Elf] = SkillType.Elven;\n \n Fighter.LevelUpXP = LevelUpXP;\n Fighter.LobbiesPerLevel = LobbiesPerLevel;\n Fighter.TierPerLobby = TierPerLobby;\n Fighter.SkillData = SkillData;\n Fighter.AbilityScoreLevels = AbilityScoreLevels;\n Fighter.SkillLevels = SkillLevels;\n }\n}",{"AbilityScoreLevels":[3,5,7,10,14,18],"LevelUpXP":[0,100,300,600,1200,2400,4800,9600,19200,38400,76800,128000,204800,332800,537600,870400,1408000,2278400,3686400,5964800,9651200],"LobbiesPerLevel":[{"lobbyIDs":[1]},{"lobbyIDs":[1,2]},{"lobbyIDs":[1,2,3]},{"lobbyIDs":[1,2,3,4]},{"lobbyIDs":[1,2,3,4,5]},{"lobbyIDs":[1,2,3,4,5,6]},{"lobbyIDs":[1,2,3,4,5,6,7]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]},{"lobbyIDs":[8]}],"SkillData":{"0":{"affectsOpponent":false,"isAttackAction":true,"origin":"attack","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"1":{"affectsOpponent":false,"origin":"focus","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"2":{"affectsOpponent":false,"origin":"hide","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"3":{"affectsOpponent":false,"isAttackAction":true,"origin":"burn","rank":0,"requiredLevel":0,"requiredSkills":[28],"unlockableSkills":[]},"4":{"affectsOpponent":false,"isAttackAction":true,"origin":"chill","rank":0,"requiredLevel":0,"requiredSkills":[28],"unlockableSkills":[]},"5":{"affectsOpponent":false,"origin":"coat-weapon","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"6":{"affectsOpponent":false,"isAttackAction":true,"origin":"dirty-fighting","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"7":{"affectsOpponent":false,"origin":"heal","rank":0,"requiredLevel":0,"requiredSkills":[20],"unlockableSkills":[]},"8":{"affectsOpponent":false,"origin":"hex","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"9":{"affectsOpponent":false,"origin":"mark","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"10":{"affectsOpponent":false,"origin":"meditate","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"11":{"affectsOpponent":false,"origin":"phase-shift","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"12":{"affectsOpponent":false,"isAttackAction":true,"origin":"pinning-strike","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"13":{"affectsOpponent":false,"isAttackAction":true,"origin":"power-attack","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"14":{"affectsOpponent":false,"isAttackAction":true,"origin":"shock","rank":0,"requiredLevel":0,"requiredSkills":[28],"unlockableSkills":[]},"15":{"affectsOpponent":false,"isAttackAction":true,"origin":"smite","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"16":{"affectsOpponent":false,"isAttackAction":true,"origin":"sneak-attack","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"17":{"affectsOpponent":true,"isAttackAction":true,"origin":"stun","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"18":{"affectsOpponent":false,"origin":"taunt","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"19":{"affectsOpponent":false,"origin":"battle-cry","rank":0,"requiredLevel":3,"requiredSkills":[],"unlockableSkills":[]},"20":{"affectsOpponent":false,"origin":"cleanse","rank":0,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"21":{"affectsOpponent":false,"origin":"Curse","rank":0,"requiredLevel":0,"requiredSkills":[8],"unlockableSkills":[]},"22":{"affectsOpponent":false,"isAttackAction":true,"origin":"fireball","rank":0,"requiredLevel":0,"requiredSkills":[28],"unlockableSkills":[]},"23":{"affectsOpponent":false,"isAttackAction":true,"origin":"freeze","rank":0,"requiredLevel":0,"requiredSkills":[28],"unlockableSkills":[]},"24":{"affectsOpponent":false,"isAttackAction":true,"origin":"gore","rank":0,"requiredLevel":0,"requiredSkills":[12],"unlockableSkills":[]},"25":{"affectsOpponent":false,"isAttackAction":true,"origin":"lightning-bolt","rank":0,"requiredLevel":0,"requiredSkills":[28],"unlockableSkills":[]},"26":{"affectsOpponent":false,"isAttackAction":true,"origin":"lock-and-load","rank":0,"requiredLevel":0,"requiredSkills":[30],"unlockableSkills":[]},"27":{"affectsOpponent":false,"origin":"second-wind","rank":0,"requiredLevel":0,"requiredSkills":[37],"unlockableSkills":[]},"28":{"affectsOpponent":false,"origin":"elementalist","rank":1,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[3,4,14]},"29":{"affectsOpponent":false,"origin":"runesmith","rank":1,"requiredLevel":0,"requiredSkills":[35],"unlockableSkills":[40,46]},"30":{"affectsOpponent":false,"origin":"sharpshooter","rank":1,"requiredLevel":0,"requiredSkills":[36],"unlockableSkills":[26,44]},"31":{"affectsOpponent":false,"origin":"dwarven","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"32":{"affectsOpponent":false,"origin":"elven","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"33":{"affectsOpponent":false,"origin":"human","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"34":{"affectsOpponent":false,"origin":"ambidextrous","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"35":{"affectsOpponent":false,"origin":"armored","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"36":{"affectsOpponent":false,"origin":"cirurgical","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"37":{"affectsOpponent":false,"origin":"durable","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"38":{"affectsOpponent":false,"origin":"strong","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"39":{"affectsOpponent":false,"origin":"unarmed","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]},"40":{"affectsOpponent":false,"origin":"improved-armored","rank":2,"requiredLevel":0,"requiredSkills":[29],"unlockableSkills":[]},"41":{"affectsOpponent":false,"origin":"improved-power-attack","rank":2,"requiredLevel":0,"requiredSkills":[13],"unlockableSkills":[]},"42":{"affectsOpponent":false,"origin":"improved-sneak-attack","rank":2,"requiredLevel":0,"requiredSkills":[16],"unlockableSkills":[]},"43":{"affectsOpponent":false,"origin":"opportunistic","rank":2,"requiredLevel":3,"requiredSkills":[],"unlockableSkills":[]},"44":{"affectsOpponent":false,"origin":"precise","rank":2,"requiredLevel":0,"requiredSkills":[30],"unlockableSkills":[]},"45":{"affectsOpponent":false,"origin":"vengeful","rank":2,"requiredLevel":3,"requiredSkills":[],"unlockableSkills":[]},"46":{"affectsOpponent":false,"origin":"warmongering","rank":2,"requiredLevel":0,"requiredSkills":[29],"unlockableSkills":[]},"47":{"affectsOpponent":false,"origin":"slippery","rank":2,"requiredLevel":0,"requiredSkills":[],"unlockableSkills":[]}},"SkillLevels":[2,4,6,8,12,16,20],"TierPerLobby":[1,1,2,2,3,3,3,3,4],"deps":{"Constants":{"$jig":0},"KronoJig":{"$jig":1}},"hash":"e4c7b16a47ee2f0a6c2c256e0ec69e9c339d3ab8eccfd60b089ab9344f8b7eb4","initialScores":{"0":[8,8,8],"1":[9,7,7],"2":[7,7,7]},"initialSkills":{"0":33,"1":31,"2":32}}]}]}
    https://whatsonchain.com/tx/8ce158ea4512187cd2e9f128ef8fb1e4e096a67618cda8af7ee39d867fc320eb